修改测试问题
This commit is contained in:
@@ -291,6 +291,7 @@
|
||||
<a-form-item ref="name" label="关键字" name="emissionFactors">
|
||||
<a-input-search
|
||||
v-model:value="editFormState.emissionFactors"
|
||||
@search="searchKey"
|
||||
placeholder="请输入关键字" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
@@ -848,7 +849,7 @@
|
||||
const openVoucher = ref(false);
|
||||
const downLoadVoucher = () => {
|
||||
fetch(carbonInventoryCheck.voucherDownloadList, { bizType: 2 }).then((res) => {
|
||||
voucherData.value = res.data
|
||||
voucherData.value = res.data;
|
||||
});
|
||||
openVoucher.value = true;
|
||||
};
|
||||
@@ -898,6 +899,7 @@
|
||||
uid: item.id.toString(), // 使用文件的id作为唯一标识
|
||||
name: item.fileName, // 文件名
|
||||
status: 'done', // 设置默认状态为已完成
|
||||
type: 'done',
|
||||
url: item.filePath, // 文件的URL,这里假设用示例的URL格式
|
||||
}));
|
||||
});
|
||||
@@ -909,6 +911,10 @@
|
||||
total.value = res.data.total;
|
||||
});
|
||||
};
|
||||
const searchKey = () => {
|
||||
queryData.value.emissionSources = editFormState.value.emissionFactors;
|
||||
getNewTable();
|
||||
};
|
||||
// 数据来源选择框改变
|
||||
const canEdit = ref(false);
|
||||
const automatic = ref(false);
|
||||
@@ -957,7 +963,9 @@
|
||||
message.error(`${info.file.name} 文件上传失败`);
|
||||
}
|
||||
};
|
||||
const delIds = ref([]);
|
||||
const handleFileRemove = (file) => {
|
||||
delIds.value.push(file.uid);
|
||||
const newFileList = [];
|
||||
fileList.value.forEach((item) => {
|
||||
if (item.uid !== file.uid) {
|
||||
@@ -985,14 +993,20 @@
|
||||
if (fileList.value.length !== 0) {
|
||||
const formData = ref(new FormData());
|
||||
fileList.value.forEach((file) => {
|
||||
formData.value.append('files', file.originFileObj);
|
||||
if (file.type !== 'done') {
|
||||
formData.value.append('files', file.originFileObj);
|
||||
}
|
||||
});
|
||||
formData.value.append('bizType', 2);
|
||||
formData.value.append('bizId', editFormState.value.id);
|
||||
delIds.value.forEach((item) => {
|
||||
formData.value.append('deleteList', item);
|
||||
});
|
||||
fetch(uploadPic.uploadfiles, formData.value)
|
||||
.then((res) => {
|
||||
message.success('操作成功!');
|
||||
editData.value = false;
|
||||
delIds.value = [];
|
||||
getPFYTableList(getTableId.value);
|
||||
})
|
||||
.catch((error) => {
|
||||
@@ -1000,6 +1014,7 @@
|
||||
});
|
||||
} else {
|
||||
editData.value = false;
|
||||
delIds.value = [];
|
||||
getPFYTableList(getTableId.value);
|
||||
}
|
||||
});
|
||||
@@ -1010,6 +1025,7 @@
|
||||
};
|
||||
const onCloseEditData = () => {
|
||||
editData.value = false;
|
||||
delIds.value = [];
|
||||
editFormState.value = {
|
||||
orgId: orgId.value,
|
||||
};
|
||||
|
Reference in New Issue
Block a user