bufix 0705 zentao

This commit is contained in:
lb
2023-07-05 14:52:04 +08:00
parent f076e23a67
commit b8765af77f
23 changed files with 287 additions and 236 deletions

View File

@@ -75,6 +75,7 @@ export default {
inject: ["urls"],
data() {
return {
// dialogVisible: false,
loadingStatus: false,
page: 1,
size: 20,
@@ -203,6 +204,11 @@ export default {
},
handleClose() {
// clear list
setTimeout(() => {
this.dataList.splice(0);
this.totalPage = 0;
}, 300);
this.$emit("update:dialogVisible", false);
},
},

View File

@@ -481,7 +481,7 @@ export default {
IsNotAvaliable(col) {
return this.detailMode || (col.disableOnEdit && this.editMode);
},
handleFilelistUpdate(newFilelist) {
handleFilelistUpdate(newFilelist, isDelete=false) {
// TODO: 直接访问 .files 可能不太合适
this.dataForm.files = newFilelist.map((file) => ({
id: file.id,
@@ -490,9 +490,9 @@ export default {
typeCode: file.typeCode,
}));
// 更新请求
if ("id" in this.dataForm && this.dataForm.id !== null && this.dataForm.id !== undefined) this.addOrUpdate("PUT");
else
this.$notify({
// if ("id" in this.dataForm && this.dataForm.id != null) this.addOrUpdate("PUT");
// else
!isDelete && this.$notify({
title: "等待保存",
message: "已添加文件,请手动点击保存!",
type: "warning",

View File

@@ -90,7 +90,7 @@ export default {
})
.then(() => {
this.uploadedFileList = this.uploadedFileList.filter((file) => file.id.toString() !== fileId.toString());
this.$emit("update-file-list", this.uploadedFileList);
this.$emit("update-file-list", this.uploadedFileList, true); // is delete, set to true
this.$message({
type: "success",
message: "删除成功!",