|
|
@ -1,12 +1,13 @@ |
|
|
<template> |
|
|
<template> |
|
|
<el-dialog |
|
|
<el-dialog |
|
|
title="纸张管理" |
|
|
title="纸张管理" |
|
|
:visible="visible" |
|
|
|
|
|
|
|
|
:visible.sync="dialogVisible" |
|
|
:close-on-click-modal="false" |
|
|
:close-on-click-modal="false" |
|
|
width="900px" |
|
|
width="900px" |
|
|
top="5vh" |
|
|
top="5vh" |
|
|
custom-class="paper-management-dialog" |
|
|
custom-class="paper-management-dialog" |
|
|
@close="handleClose" |
|
|
|
|
|
|
|
|
:append-to-body="true" |
|
|
|
|
|
@close="handleDialogClose" |
|
|
> |
|
|
> |
|
|
<div class="paper-management-content"> |
|
|
<div class="paper-management-content"> |
|
|
<!-- 纸张表单区域 --> |
|
|
<!-- 纸张表单区域 --> |
|
|
@ -73,7 +74,8 @@ export default { |
|
|
paperList: [], |
|
|
paperList: [], |
|
|
currentPaper: null, |
|
|
currentPaper: null, |
|
|
isEditMode: false, |
|
|
isEditMode: false, |
|
|
listLoading: false |
|
|
|
|
|
|
|
|
listLoading: false, |
|
|
|
|
|
dialogVisible: false |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
computed: { |
|
|
computed: { |
|
|
@ -85,15 +87,25 @@ export default { |
|
|
watch: { |
|
|
watch: { |
|
|
visible: { |
|
|
visible: { |
|
|
handler(newVal) { |
|
|
handler(newVal) { |
|
|
|
|
|
this.dialogVisible = newVal |
|
|
if (newVal) { |
|
|
if (newVal) { |
|
|
this.initDialog() |
|
|
this.initDialog() |
|
|
} else { |
|
|
|
|
|
this.resetDialog() |
|
|
|
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
immediate: true |
|
|
immediate: true |
|
|
|
|
|
}, |
|
|
|
|
|
dialogVisible(newVal) { |
|
|
|
|
|
// 当对话框关闭时,通知父组件 |
|
|
|
|
|
this.$emit('update:visible', newVal) |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
beforeDestroy() { |
|
|
|
|
|
// 确保组件销毁前清理状态 |
|
|
|
|
|
this.paperList = [] |
|
|
|
|
|
this.currentPaper = null |
|
|
|
|
|
this.isEditMode = false |
|
|
|
|
|
this.listLoading = false |
|
|
|
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
// 初始化对话框 |
|
|
// 初始化对话框 |
|
|
async initDialog() { |
|
|
async initDialog() { |
|
|
@ -232,7 +244,15 @@ export default { |
|
|
|
|
|
|
|
|
// 关闭对话框 |
|
|
// 关闭对话框 |
|
|
handleClose() { |
|
|
handleClose() { |
|
|
this.$emit('update:visible', false) |
|
|
|
|
|
|
|
|
this.dialogVisible = false |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
// 对话框关闭事件处理 |
|
|
|
|
|
handleDialogClose() { |
|
|
|
|
|
// 延迟清理状态,避免销毁时机冲突 |
|
|
|
|
|
this.$nextTick(() => { |
|
|
|
|
|
this.resetDialog() |
|
|
|
|
|
}) |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
@ -352,15 +372,8 @@ export default { |
|
|
.paper-management-dialog { |
|
|
.paper-management-dialog { |
|
|
border-radius: 8px !important; |
|
|
border-radius: 8px !important; |
|
|
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12) !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 { |
|
|
.paper-management-dialog .el-dialog__header { |
|
|
padding: 16px 20px 12px !important; |
|
|
padding: 16px 20px 12px !important; |
|
|
border-bottom: 1px solid #e4e7ed !important; |
|
|
border-bottom: 1px solid #e4e7ed !important; |
|
|
|