add AttachmentDialog

This commit is contained in:
lb
2023-07-10 10:57:50 +08:00
parent 3b101e022d
commit e12d6d161b
2 changed files with 124 additions and 6 deletions

View File

@@ -44,6 +44,9 @@
:dialog-visible.sync="carPayloadDialogVisible"
:configs="carPayloadDialogConfigs"
@refreshDataList="getList" />
<AttachmentDialog ref="attachmentDialog" v-if="needAttachmentDialog" />
<DialogUpload
ref="upload-dialog"
v-if="uploadDialogVisible"
@@ -69,6 +72,7 @@ import DialogCarPayload from "@/components/DialogCarPayload.vue";
import DialogUpload from "@/components/DialogUpload.vue";
import Overlay from "@/components/Overlay.vue";
import moment from "moment";
import AttachmentDialog from "@/components/attachmentDialog.vue";
const DIALOG_WITH_MENU = "DialogWithMenu";
const DIALOG_JUST_FORM = "DialogJustForm";
@@ -84,6 +88,7 @@ export default {
DialogCarPayload,
DialogUpload,
Overlay,
AttachmentDialog,
},
props: {
navigator: {
@@ -167,6 +172,7 @@ export default {
uploadDialogVisible: false,
overlayVisible: false,
cachedSearchCondition: {},
needAttachmentDialog: false,
};
},
inject: ["urls"],
@@ -337,7 +343,11 @@ export default {
break;
}
case "toggle-attachment-dialog": {
alert("查看附件");
// alert("查看附件");
this.needAttachmentDialog = true;
setTimeout(() => {
this.$refs["attachmentDialog"].init();
}, 300);
break;
}
case "view-blender-batch-details": {
@@ -446,11 +456,12 @@ export default {
if (shouldShowOverlay) this.overlayVisible = false;
})
.catch((errMsg) => {
errMsg !== 'cancel' && this.$message({
message: errMsg,
type: "error",
duration: 1500,
});
errMsg !== "cancel" &&
this.$message({
message: errMsg,
type: "error",
duration: 1500,
});
if (shouldShowOverlay) this.overlayVisible = false;
});
break;