Browse Source

自定义纸张大小&数据源配置

master
han\hanst 5 months ago
parent
commit
c80197d5ba
  1. 9
      src/views/modules/labelSetting/components/DataSourceManagementDialog.vue
  2. 12
      src/views/modules/labelSetting/components/PaperList.vue
  3. 39
      src/views/modules/labelSetting/components/PaperManagementDialog.vue

9
src/views/modules/labelSetting/components/DataSourceManagementDialog.vue

@ -5,6 +5,7 @@
width="500px"
:before-close="handleClose"
:close-on-click-modal="false"
:append-to-body="true"
>
<div class="data-source-management">
<!-- 标签类型选择 -->
@ -15,6 +16,7 @@
placeholder="请选择标签类型"
@change="handleLabelTypeChange"
style="width: 200px;"
:popper-append-to-body="true"
>
<el-option
v-for="item in labelTypes"
@ -225,6 +227,13 @@ export default {
},
handleClose() {
//
this.selectedLabelType = '';
this.viewFields = [];
this.modifiedFields.clear();
this.loading = false;
this.saving = false;
this.dialogVisible = false;
}
}

12
src/views/modules/labelSetting/components/PaperList.vue

@ -505,16 +505,4 @@ export default {
}
</style>
<!-- 修复对话框遮挡层问题 -->
<style>
/* 删除确认对话框的z-index要高于纸张管理对话框 */
.el-dialog__wrapper {
z-index: 2100 !important;
}
.el-overlay {
z-index: 2099 !important;
}
</style>

39
src/views/modules/labelSetting/components/PaperManagementDialog.vue

@ -1,12 +1,13 @@
<template>
<el-dialog
title="纸张管理"
:visible="visible"
:visible.sync="dialogVisible"
:close-on-click-modal="false"
width="900px"
top="5vh"
custom-class="paper-management-dialog"
@close="handleClose"
:append-to-body="true"
@close="handleDialogClose"
>
<div class="paper-management-content">
<!-- 纸张表单区域 -->
@ -73,7 +74,8 @@ export default {
paperList: [],
currentPaper: null,
isEditMode: false,
listLoading: false
listLoading: false,
dialogVisible: false
}
},
computed: {
@ -85,15 +87,25 @@ export default {
watch: {
visible: {
handler(newVal) {
this.dialogVisible = newVal
if (newVal) {
this.initDialog()
} else {
this.resetDialog()
}
},
immediate: true
},
dialogVisible(newVal) {
//
this.$emit('update:visible', newVal)
}
},
beforeDestroy() {
//
this.paperList = []
this.currentPaper = null
this.isEditMode = false
this.listLoading = false
},
methods: {
//
async initDialog() {
@ -232,7 +244,15 @@ export default {
//
handleClose() {
this.$emit('update:visible', false)
this.dialogVisible = false
},
//
handleDialogClose() {
//
this.$nextTick(() => {
this.resetDialog()
})
}
}
}
@ -352,15 +372,8 @@ export default {
.paper-management-dialog {
border-radius: 8px !important;
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12) !important;
z-index: 2000 !important;
}
.paper-management-dialog .el-dialog__wrapper {
z-index: 2000 !important;
}
.paper-management-dialog .el-dialog__header {
padding: 16px 20px 12px !important;
border-bottom: 1px solid #e4e7ed !important;

Loading…
Cancel
Save