From 7e5c7390e7006297bcd8b810f9159a0b91aac991 Mon Sep 17 00:00:00 2001 From: cwchen <1048842385@qq.com> Date: Thu, 18 Sep 2025 18:02:29 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A7=BB=E4=BA=A4=E7=94=B3=E8=AF=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/common/fileTree.vue | 45 ++-------------- .../filesTransfer/apply/prop/applyForm.vue | 51 ++++++++++++------- 2 files changed, 37 insertions(+), 59 deletions(-) diff --git a/src/views/common/fileTree.vue b/src/views/common/fileTree.vue index 35bdce4..4c9cd8b 100644 --- a/src/views/common/fileTree.vue +++ b/src/views/common/fileTree.vue @@ -3,28 +3,13 @@
- - - - - - - - 选择 - - - - - +
取消 确认 -
@@ -40,7 +25,7 @@ import Treeselect from "@riophae/vue-treeselect"; import "@riophae/vue-treeselect/dist/vue-treeselect.css"; export default { name: "FileTree", - props: ["width", "dataForm", "title", "disabled", "isAdd", "rowData"], + props: ["width", "dataForm", "title", "disabled", "rowData"], dicts: ['data_class_type'], components: { Treeselect}, data() { @@ -48,37 +33,15 @@ export default { lDialog: this.width > 500 ? "w700" : "w500", dialogVisible: true, isDisabled: true, - form: { - proId: undefined, - deptId: undefined, - remark: '', - }, - treeDataList: [], - proList: [], - loading: null, - rules: { - proId: [ - { required: true, message: '请选择项目', trigger: 'change' } - ], - deptId: [ - { required: true, message: '请选择接收组织', trigger: 'change' } - ], - }, - fileTreeVisible: false, }; }, created() { - this.initFormData(); + // this.initFormData(); }, methods: { /** 初始化表单数据 */ async initFormData() { - await getDeptSelectApi().then(res => { - this.treeDataList = res.data; - }); - await getProSelectApi().then(res => { - this.proList = res.data; - }); + if (this.isAdd === 'edit' && this.rowData) { // 编辑模式:填充表单数据 this.form = { diff --git a/src/views/filesTransfer/apply/prop/applyForm.vue b/src/views/filesTransfer/apply/prop/applyForm.vue index 8286c74..47fe6b9 100644 --- a/src/views/filesTransfer/apply/prop/applyForm.vue +++ b/src/views/filesTransfer/apply/prop/applyForm.vue @@ -14,8 +14,16 @@ 选择 - + @@ -24,9 +32,9 @@ 确认 - + -