合并
This commit is contained in:
@ -185,8 +185,6 @@ const getInfo = () => {
|
||||
const res = await getScheme(routeParams.value.id);
|
||||
Object.assign(form.value, res.data);
|
||||
form.value.file = res.data.ossId;
|
||||
showFileList.value = false;
|
||||
|
||||
loading.value = false;
|
||||
buttonLoading.value = false;
|
||||
});
|
||||
@ -202,7 +200,7 @@ const submitForm = async (status1: string) => {
|
||||
buttonLoading.value = true;
|
||||
|
||||
let data = { id: form.value.id, projectId: form.value.id, file: form.value.file };
|
||||
if (form.value.file === form.value.ossId) {
|
||||
if (form.value.file === form.value.ossId && !isUpdateFile.value) {
|
||||
data.file = '';
|
||||
res = await updateScheme(data).finally(() => (buttonLoading.value = false));
|
||||
if (res.code == 200) {
|
||||
@ -298,10 +296,11 @@ const handleUploadSuccess = (list, res) => {
|
||||
};
|
||||
const fileStatus = ref(false);
|
||||
const updateFileStatus = ref(true);
|
||||
|
||||
const isUpdateFile = ref(false);
|
||||
const handleFileChange = (file, fileList) => {
|
||||
if (form.value.id) {
|
||||
updateFileStatus.value = true;
|
||||
isUpdateFile.value = true;
|
||||
}
|
||||
fileStatus.value = true;
|
||||
};
|
||||
@ -309,6 +308,7 @@ const handleFileChange = (file, fileList) => {
|
||||
const handleFileRemove = (file, fileList) => {
|
||||
if (form.value.id) {
|
||||
updateFileStatus.value = false;
|
||||
isUpdateFile.value = false;
|
||||
}
|
||||
showFileList.value = true;
|
||||
|
||||
|
Reference in New Issue
Block a user