修改进度管理bug
This commit is contained in:
@ -173,8 +173,6 @@ const getInfo = () => {
|
||||
const res = await getPrelimScheme(routeParams.value.id);
|
||||
Object.assign(form.value, res.data);
|
||||
form.value.file = res.data.ossId;
|
||||
showFileList.value = false;
|
||||
|
||||
loading.value = false;
|
||||
buttonLoading.value = false;
|
||||
});
|
||||
@ -188,11 +186,10 @@ const submitForm = async (status1: string) => {
|
||||
if (form.value.id) {
|
||||
if (!updateFileStatus.value) return proxy?.$modal.msgError('请上传图纸文件');
|
||||
buttonLoading.value = true;
|
||||
let data = { id: form.value.id, projectId: form.value.id, file: form.value.file };
|
||||
if (form.value.file === form.value.ossId) {
|
||||
let data = { id: form.value.id, projectId: form.value.projectId, file: form.value.file };
|
||||
if (form.value.file === form.value.ossId && !isUpdateFile.value) {
|
||||
data.file = '';
|
||||
res = await updatePrelimScheme(data).finally(() => (buttonLoading.value = false));
|
||||
|
||||
if (res.code == 200) {
|
||||
dialog.visible = false;
|
||||
submit(status.value, form.value);
|
||||
@ -286,10 +283,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;
|
||||
};
|
||||
@ -297,6 +295,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