bufix 0705 zentao
This commit is contained in:
@@ -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);
|
||||
},
|
||||
},
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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: "删除成功!",
|
||||
|
||||
Reference in New Issue
Block a user