From 58848b1a18d29929ba84b0336860f258b913070f Mon Sep 17 00:00:00 2001 From: zhaowei <zhaowei> Date: 星期一, 13 一月 2025 17:18:48 +0800 Subject: [PATCH] 产品结构树数据由后台数据库驱动 --- src/views/dnc/base/modules/ProductStructure/Document/OtherDocumentTableList.vue | 25 +++++++++++++++++++++---- 1 files changed, 21 insertions(+), 4 deletions(-) diff --git a/src/views/dnc/base/modules/ProductStructure/Document/OtherDocumentTableList.vue b/src/views/dnc/base/modules/ProductStructure/Document/OtherDocumentTableList.vue index 7ba6363..d58789b 100644 --- a/src/views/dnc/base/modules/ProductStructure/Document/OtherDocumentTableList.vue +++ b/src/views/dnc/base/modules/ProductStructure/Document/OtherDocumentTableList.vue @@ -1,16 +1,21 @@ <template> - <a-table :columns="columns" :data-source="dataSource" bordered :pagination="ipagination" - :scroll="{y:189}" :customRow="customRow" :size="size"> + <div> + <a-table :columns="columns" :data-source="dataSource" bordered :pagination="ipagination" + :scroll="{y:189}" :customRow="customRow" :size="size" rowKey="docId"> - </a-table> + </a-table> + + <DocumentModal ref="modalForm" @ok="modalFormOk"/> + </div> </template> <script> import { JeecgListMixin } from '@/mixins/JeecgListMixin' + import DocumentModal from './DocumentModal' export default { name: 'OtherDocumentTableList', - components: {}, + components: { DocumentModal }, mixins: [JeecgListMixin], props: { size: { @@ -110,6 +115,9 @@ } } }, + created() { + this.$bus.$on('tableMenuItemMethodTrigger', this.triggerCorrespondingMethod) + }, methods: { customRow(record) { return { @@ -123,6 +131,15 @@ } } } + }, + + handleDocumentEdit(record, modalTitle) { + this.$refs.modalForm.edit(record) + this.$refs.modalForm.title = modalTitle + }, + + triggerCorrespondingMethod({ methodName, level, modalTitle, tableRowInfo }) { + if (this[methodName] && tableRowInfo.attributionType === 1) this[methodName](tableRowInfo, modalTitle) } } } -- Gitblit v1.9.3