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/DocumentBatchDeleteModal.vue | 20 src/views/dnc/common/ProductStructureTree.vue | 385 --------- src/views/dnc/base/modules/ProductStructure/Document/UseNcDocumentEquipmentTableList.vue | 2 src/views/dnc/base/modules/ProductStructure/Part/PartModal.vue | 94 ++ src/views/dnc/base/modules/ProductStructure/ProcessStep/ProcessStepInfo.vue | 25 src/views/dnc/base/modules/ProductStructure/Document/DocumentModalForm.vue | 123 +++ src/views/dnc/common/TableContextMenu.vue | 73 + src/views/dnc/base/ProductStructure.vue | 7 src/views/dnc/base/modules/ProductStructure/Document/NcDocumentTableList.vue | 33 src/views/dnc/base/modules/ProductStructure/Document/DocumentModal.vue | 61 + src/views/dnc/common/ImportFileModal.vue | 1 src/views/dnc/base/modules/ProductStructure/Process/ProcessInfo.vue | 25 src/views/dnc/base/modules/ProductStructure/Process/ProcessModal.vue | 44 + src/views/dnc/base/modules/ProductStructure/Document/OtherDocumentTableList.vue | 25 src/views/dnc/base/modules/ProductStructure/Process/ProcessModalForm.vue | 43 src/api/dnc.js | 5 /dev/null | 248 ------ src/views/dnc/base/modules/ProductStructure/Document/NcDocumentAssignModal.vue | 805 +++++++++++++++++++++ src/views/dnc/base/modules/ProductStructure/Product/ProductModalForm.vue | 2 src/views/dnc/base/modules/ProductStructure/ProductStructureMainTop.vue | 9 src/views/dnc/base/modules/ProductStructure/Component/ComponentModalForm.vue | 2 src/views/dnc/base/modules/ProductStructure/Part/PartModalForm.vue | 174 ++++ src/views/dnc/base/modules/ProductStructure/ProductStructureMainBottom.vue | 10 23 files changed, 1,530 insertions(+), 686 deletions(-) diff --git a/src/api/dnc.js b/src/api/dnc.js new file mode 100644 index 0000000..d0628ec --- /dev/null +++ b/src/api/dnc.js @@ -0,0 +1,5 @@ +import { getAction, deleteAction, putAction, postAction, httpAction } from '@/api/manage' + +export default { + getProductStructureTreeApi: () => getAction('/nc/product/load/tree') +} \ No newline at end of file diff --git a/src/views/dnc/base/ProductStructure.vue b/src/views/dnc/base/ProductStructure.vue index 0effc31..373fc27 100644 --- a/src/views/dnc/base/ProductStructure.vue +++ b/src/views/dnc/base/ProductStructure.vue @@ -8,18 +8,23 @@ <ProductStructureMain/> </a-col> </a-row> + + <!--瀵煎叆鏂囦欢鍏叡寮圭獥--> + <ImportFileModal/> </a-card> </template> <script> import ProductStructureTree from '../common/ProductStructureTree' import ProductStructureMain from './modules/ProductStructure/ProductStructureMain' + import ImportFileModal from '../common/ImportFileModal' export default { name: 'ProductStructure', components: { ProductStructureTree, - ProductStructureMain + ProductStructureMain, + ImportFileModal }, data() { return {} diff --git a/src/views/dnc/base/modules/ProductStructure/Component/ComponentModalForm.vue b/src/views/dnc/base/modules/ProductStructure/Component/ComponentModalForm.vue index b6e6eef..e80380c 100644 --- a/src/views/dnc/base/modules/ProductStructure/Component/ComponentModalForm.vue +++ b/src/views/dnc/base/modules/ProductStructure/Component/ComponentModalForm.vue @@ -22,7 +22,7 @@ </a-col> <a-col :span="12"> <a-form-model-item label="瑙勬牸"> - <a-input v-model="model.productName" placeholder="璇疯緭鍏ヨ鏍�"></a-input> + <a-input v-model="model.componentScale" placeholder="璇疯緭鍏ヨ鏍�"></a-input> </a-form-model-item> </a-col> </a-row> diff --git a/src/views/dnc/base/modules/ProductStructure/Document/DocumentBatchDeleteModal.vue b/src/views/dnc/base/modules/ProductStructure/Document/DocumentBatchDeleteModal.vue new file mode 100644 index 0000000..6d307fe --- /dev/null +++ b/src/views/dnc/base/modules/ProductStructure/Document/DocumentBatchDeleteModal.vue @@ -0,0 +1,20 @@ +<template> + <div> + + </div> +</template> + +<script> + export default { + name: 'DocumentBatchDeleteModal', + components: {}, + data() { + return {} + }, + methods: {} + } +</script> + +<style scoped> + +</style> \ No newline at end of file diff --git a/src/views/dnc/base/modules/ProductStructure/Document/DocumentModal.vue b/src/views/dnc/base/modules/ProductStructure/Document/DocumentModal.vue new file mode 100644 index 0000000..ed32a12 --- /dev/null +++ b/src/views/dnc/base/modules/ProductStructure/Document/DocumentModal.vue @@ -0,0 +1,61 @@ +<template> + <j-modal + :title="title" + :width="width" + :visible="visible" + switchFullscreen + :maskClosable="false" + @ok="handleOk" + @cancel="handleCancel" + cancelText="鍏抽棴"> + <DocumentModalForm ref="realForm" @ok="submitCallback"/> + </j-modal> +</template> + +<script> + import DocumentModalForm from './DocumentModalForm.vue' + + export default { + name: 'DocumentModal', + components: { + DocumentModalForm + }, + props: { + currentTreeNodeInfo: { + type: Object + } + }, + data() { + return { + title: '', + width: 500, + visible: false + } + }, + methods: { + add() { + this.visible = true + this.$nextTick(() => { + this.$refs.realForm.add() + }) + }, + edit(record) { + this.visible = true + this.$nextTick(() => { + this.$refs.realForm.edit(record) + }) + }, + handleOk() { + this.$refs.realForm.submitForm() + }, + submitCallback() { + this.$emit('ok') + this.visible = false + }, + handleCancel() { + this.$emit('close') + this.visible = false + } + } + } +</script> \ No newline at end of file diff --git a/src/views/dnc/base/modules/ProductStructure/Document/DocumentModalForm.vue b/src/views/dnc/base/modules/ProductStructure/Document/DocumentModalForm.vue new file mode 100644 index 0000000..6a66dae --- /dev/null +++ b/src/views/dnc/base/modules/ProductStructure/Document/DocumentModalForm.vue @@ -0,0 +1,123 @@ +<template> + <a-spin :spinning="confirmLoading"> + <a-form-model ref="form" :model="model" :rules="validatorRules" :labelCol="labelColLong" + :wrapperCol="wrapperColLong"> + <a-row> + <a-col :span="24"> + <a-form-model-item label="鏂囨。鍘熷悕绉�" prop="docName"> + <a-input v-model="model.docName" placeholder="璇疯緭鍏ユ枃妗e師鍚嶇О"></a-input> + </a-form-model-item> + </a-col> + </a-row> + + <a-row> + <a-col :span="24"> + <a-form-model-item label="璁惧缂栧彿"> + <a-select v-model="model.productNo" placeholder="璇烽�夋嫨璁惧缂栧彿"></a-select> + </a-form-model-item> + </a-col> + </a-row> + + <a-row> + <a-col :span="24"> + <a-form-model-item label="浠g爜鐗堟湰"> + <a-input v-model="model.docAlias" placeholder="璇疯緭鍏ヤ唬鐮佺増鏈�"></a-input> + </a-form-model-item> + </a-col> + </a-row> + + <a-row> + <a-col :span="24"> + <a-form-model-item label="鎻忚堪"> + <a-textarea v-model="model.description" placeholder="璇疯緭鍏ユ枃妗f弿杩�"></a-textarea> + </a-form-model-item> + </a-col> + </a-row> + </a-form-model> + </a-spin> +</template> + +<script> + import { httpAction, getAction } from '@/api/manage' + + export default { + name: 'DocumentModalForm', + components: {}, + data() { + return { + model: {}, + labelColLong: { + xs: { span: 24 }, + sm: { span: 5 } + }, + wrapperColLong: { + xs: { span: 24 }, + sm: { span: 19 } + }, + confirmLoading: false, + validatorRules: { + docName: [ + { required: true, message: '璇疯緭鍏ユ枃妗e師鍚嶇О!' } + ], + }, + url: { + add: '/mdc/mdcPartProcessInfo/add', + edit: '/mdc/mdcPartProcessInfo/edit' + } + } + }, + computed: { + formDisabled() { + return this.disabled + } + }, + created() { + //澶囦唤model鍘熷鍊� + this.modelDefault = JSON.parse(JSON.stringify(this.model)) + }, + methods: { + add() { + this.edit(this.modelDefault) + }, + + edit(record) { + this.model = Object.assign({}, record) + console.log('model', this.model) + this.visible = true + }, + + submitForm() { + const that = this + // 瑙﹀彂琛ㄥ崟楠岃瘉 + this.$refs.form.validate(valid => { + if (valid) { + that.confirmLoading = true + let httpUrl = '' + let method = 'post' + if (!this.model.id) { + httpUrl += this.url.add + } else { + httpUrl += this.url.edit + } + httpAction(httpUrl, this.model, method).then((res) => { + if (res.success) { + that.$notification.success({ + message: '娑堟伅', + description: res.message + }) + that.$emit('ok') + } else { + that.$notification.warning({ + message: '娑堟伅', + description: res.message + }) + } + }).finally(() => { + that.confirmLoading = false + }) + } + }) + } + } + } +</script> diff --git a/src/views/dnc/base/modules/ProductStructure/Document/NcDocumentAssignModal.vue b/src/views/dnc/base/modules/ProductStructure/Document/NcDocumentAssignModal.vue new file mode 100644 index 0000000..8934eb2 --- /dev/null +++ b/src/views/dnc/base/modules/ProductStructure/Document/NcDocumentAssignModal.vue @@ -0,0 +1,805 @@ +<template> + <a-modal width="75%" :title="title" :visible="visible" @cancel="visible=false" :maskClosable="false" centered> + <div class="tabs-container"> + <div style="width: 72%"> + <a-tabs> + <a-tab-pane tab="鏂囨。鍒楄〃"> + <div class="table-page-search-wrapper"> + <a-form layout="inline" @keyup.enter.native="searchQuery"> + <a-row :gutter="24"> + <a-col :md="7" :sm="7"> + <a-form-item label="鏂囦欢鍚嶇О"> + <a-input placeholder="璇疯緭鍏ユ枃浠跺悕绉�" v-model="queryParam.docName"></a-input> + </a-form-item> + </a-col> + + <a-col :md="11" :sm="11"> + <a-form-item label="涓婁紶鏃堕棿"> + <a-range-picker placeholder="璇烽�夋嫨涓婁紶鏃堕棿" v-model="queryParam.collectTime"></a-range-picker> + </a-form-item> + </a-col> + + <a-col :md="4" :sm="4"> + <a-button type="primary" @click="searchQuery" icon="search">鏌ヨ</a-button> + </a-col> + </a-row> + </a-form> + </div> + + + <a-table :columns="columns" :data-source="dataSource" bordered :pagination="false" + :scroll="{y:440}" :size="size" rowKey="docId"> + + </a-table> + </a-tab-pane> + </a-tabs> + </div> + + <div style="width: 25%"> + <a-tabs> + <a-tab-pane tab="璁惧鍒楄〃"> + + </a-tab-pane> + </a-tabs> + </div> + </div> + </a-modal> +</template> + +<script> + import { JeecgListMixin } from '@/mixins/JeecgListMixin' + + export default { + name: 'NcDocumentAssignModal', + components: {}, + data() { + return { + disableMixinCreated: true, + visible: false, + title: '', + columns: [ + { + title: '搴忓彿', + dataIndex: 'rowIndex', + key: 'rowIndex', + width: 65, + align: 'center', + customRender: function(t, r, index) { + return parseInt(index) + 1 + } + }, + { title: '鏂囦欢鍚嶇О', dataIndex: 'docName', align: 'center', width: 300 }, + { title: '璁惧缂栧彿', dataIndex: 'docCode', align: 'center' }, + { title: '鍑哄簱鐘舵��', dataIndex: 'pullStatus', align: 'center' }, + { title: '鐘� 鎬�', dataIndex: 'docStatus', align: 'center' }, + { title: '涓婁紶鏃堕棿', dataIndex: 'createTime', align: 'center', width: 200 } + ], + dataSource: [ + { + 'docId': '1872116579179859971', + 'docName': 'api-ms-win-core-heap-l1-1-0.dll', + 'docAlias': null, + 'docCode': null, + 'docSuffix': 'dll', + 'docStatus': 1, + 'publishFileId': '1872116579423129601', + 'publishVersion': 'a.1', + 'description': null, + 'createTime': '2024-12-26 11:05:50', + 'updateTime': null, + 'createUser': '1254966905669160962', + 'updateUser': null, + 'docClassCode': null, + 'pullStatus': 1, + 'pullUser': null, + 'attributionType': 5, + 'attributionId': '1327523708556668930', + 'classificationId': '1257965381181095938', + 'syncStatus': null + }, + { + 'docId': '1872116579179859972', + 'docName': 'api-ms-win-core-libraryloader-l1-1-0.dll', + 'docAlias': null, + 'docCode': null, + 'docSuffix': 'dll', + 'docStatus': 1, + 'publishFileId': '1872116579423129606', + 'publishVersion': 'a.1', + 'description': null, + 'createTime': '2024-12-26 11:05:50', + 'updateTime': null, + 'createUser': '1254966905669160962', + 'updateUser': null, + 'docClassCode': null, + 'pullStatus': 1, + 'pullUser': null, + 'attributionType': 5, + 'attributionId': '1327523708556668930', + 'classificationId': '1257965381181095938', + 'syncStatus': null + }, + { + 'docId': '1872116581352509442', + 'docName': 'api-ms-win-core-processthreads-l1-1-1.dll', + 'docAlias': null, + 'docCode': null, + 'docSuffix': 'dll', + 'docStatus': 1, + 'publishFileId': '1872116581453172737', + 'publishVersion': 'a.1', + 'description': null, + 'createTime': '2024-12-26 11:05:50', + 'updateTime': null, + 'createUser': '1254966905669160962', + 'updateUser': null, + 'docClassCode': null, + 'pullStatus': 1, + 'pullUser': null, + 'attributionType': 5, + 'attributionId': '1327523708556668930', + 'classificationId': '1257965381181095938', + 'syncStatus': null + }, + { + 'docId': '1872116581352509441', + 'docName': 'api-ms-win-core-profile-l1-1-0.dll', + 'docAlias': null, + 'docCode': null, + 'docSuffix': 'dll', + 'docStatus': 1, + 'publishFileId': '1872116581453172738', + 'publishVersion': 'a.1', + 'description': null, + 'createTime': '2024-12-26 11:05:50', + 'updateTime': null, + 'createUser': '1254966905669160962', + 'updateUser': null, + 'docClassCode': null, + 'pullStatus': 1, + 'pullUser': null, + 'attributionType': 5, + 'attributionId': '1327523708556668930', + 'classificationId': '1257965381181095938', + 'syncStatus': null + }, + { + 'docId': '1872116581398646787', + 'docName': 'api-ms-win-core-processenvironment-l1-1-0.dll', + 'docAlias': null, + 'docCode': null, + 'docSuffix': 'dll', + 'docStatus': 1, + 'publishFileId': '1872116581499310083', + 'publishVersion': 'a.1', + 'description': null, + 'createTime': '2024-12-26 11:05:50', + 'updateTime': null, + 'createUser': '1254966905669160962', + 'updateUser': null, + 'docClassCode': null, + 'pullStatus': 1, + 'pullUser': null, + 'attributionType': 5, + 'attributionId': '1327523708556668930', + 'classificationId': '1257965381181095938', + 'syncStatus': null + }, + { + 'docId': '1872116581394452482', + 'docName': 'api-ms-win-core-processthreads-l1-1-0.dll', + 'docAlias': null, + 'docCode': null, + 'docSuffix': 'dll', + 'docStatus': 1, + 'publishFileId': '1872116581499310082', + 'publishVersion': 'a.1', + 'description': null, + 'createTime': '2024-12-26 11:05:50', + 'updateTime': null, + 'createUser': '1254966905669160962', + 'updateUser': null, + 'docClassCode': null, + 'pullStatus': 1, + 'pullUser': null, + 'attributionType': 5, + 'attributionId': '1327523708556668930', + 'classificationId': '1257965381181095938', + 'syncStatus': null + }, + { + 'docId': '1872116581398646786', + 'docName': 'api-ms-win-core-namedpipe-l1-1-0.dll', + 'docAlias': null, + 'docCode': null, + 'docSuffix': 'dll', + 'docStatus': 1, + 'publishFileId': '1872116581503504385', + 'publishVersion': 'a.1', + 'description': null, + 'createTime': '2024-12-26 11:05:50', + 'updateTime': null, + 'createUser': '1254966905669160962', + 'updateUser': null, + 'docClassCode': null, + 'pullStatus': 1, + 'pullUser': null, + 'attributionType': 5, + 'attributionId': '1327523708556668930', + 'classificationId': '1257965381181095938', + 'syncStatus': null + }, + { + 'docId': '1872116581398646791', + 'docName': 'api-ms-win-core-rtlsupport-l1-1-0.dll', + 'docAlias': null, + 'docCode': null, + 'docSuffix': 'dll', + 'docStatus': 1, + 'publishFileId': '1872116581503504386', + 'publishVersion': 'a.1', + 'description': null, + 'createTime': '2024-12-26 11:05:50', + 'updateTime': null, + 'createUser': '1254966905669160962', + 'updateUser': null, + 'docClassCode': null, + 'pullStatus': 1, + 'pullUser': null, + 'attributionType': 5, + 'attributionId': '1327523708556668930', + 'classificationId': '1257965381181095938', + 'syncStatus': null + }, + { + 'docId': '1872116583265112065', + 'docName': 'api-ms-win-core-synch-l1-1-0.dll', + 'docAlias': null, + 'docCode': null, + 'docSuffix': 'dll', + 'docStatus': 1, + 'publishFileId': '1872116583357386754', + 'publishVersion': 'a.1', + 'description': null, + 'createTime': '2024-12-26 11:05:50', + 'updateTime': null, + 'createUser': '1254966905669160962', + 'updateUser': null, + 'docClassCode': null, + 'pullStatus': 1, + 'pullUser': null, + 'attributionType': 5, + 'attributionId': '1327523708556668930', + 'classificationId': '1257965381181095938', + 'syncStatus': null + }, + { + 'docId': '1872116583298666502', + 'docName': 'api-ms-win-core-timezone-l1-1-0.dll', + 'docAlias': null, + 'docCode': null, + 'docSuffix': 'dll', + 'docStatus': 1, + 'publishFileId': '1872116583386746881', + 'publishVersion': 'a.1', + 'description': null, + 'createTime': '2024-12-26 11:05:50', + 'updateTime': null, + 'createUser': '1254966905669160962', + 'updateUser': null, + 'docClassCode': null, + 'pullStatus': 1, + 'pullUser': null, + 'attributionType': 5, + 'attributionId': '1327523708556668930', + 'classificationId': '1257965381181095938', + 'syncStatus': null + }, + { + 'docId': '1872116583298666498', + 'docName': 'api-ms-win-core-sysinfo-l1-1-0.dll', + 'docAlias': null, + 'docCode': null, + 'docSuffix': 'dll', + 'docStatus': 1, + 'publishFileId': '1872116583399329795', + 'publishVersion': 'a.1', + 'description': null, + 'createTime': '2024-12-26 11:05:50', + 'updateTime': null, + 'createUser': '1254966905669160962', + 'updateUser': null, + 'docClassCode': null, + 'pullStatus': 1, + 'pullUser': null, + 'attributionType': 5, + 'attributionId': '1327523708556668930', + 'classificationId': '1257965381181095938', + 'syncStatus': null + }, + { + 'docId': '1872116583298666499', + 'docName': 'api-ms-win-core-util-l1-1-0.dll', + 'docAlias': null, + 'docCode': null, + 'docSuffix': 'dll', + 'docStatus': 1, + 'publishFileId': '1872116583399329794', + 'publishVersion': 'a.1', + 'description': null, + 'createTime': '2024-12-26 11:05:50', + 'updateTime': null, + 'createUser': '1254966905669160962', + 'updateUser': null, + 'docClassCode': null, + 'pullStatus': 1, + 'pullUser': null, + 'attributionType': 5, + 'attributionId': '1327523708556668930', + 'classificationId': '1257965381181095938', + 'syncStatus': null + }, + { + 'docId': '1872116585123188739', + 'docName': 'api-ms-win-crt-convert-l1-1-0.dll', + 'docAlias': null, + 'docCode': null, + 'docSuffix': 'dll', + 'docStatus': 1, + 'publishFileId': '1872116585219657730', + 'publishVersion': 'a.1', + 'description': null, + 'createTime': '2024-12-26 11:05:51', + 'updateTime': null, + 'createUser': '1254966905669160962', + 'updateUser': null, + 'docClassCode': null, + 'pullStatus': 1, + 'pullUser': null, + 'attributionType': 5, + 'attributionId': '1327523708556668930', + 'classificationId': '1257965381181095938', + 'syncStatus': null + }, + { + 'docId': '1872116585123188738', + 'docName': 'api-ms-win-crt-heap-l1-1-0.dll', + 'docAlias': null, + 'docCode': null, + 'docSuffix': 'dll', + 'docStatus': 1, + 'publishFileId': '1872116585219657729', + 'publishVersion': 'a.1', + 'description': null, + 'createTime': '2024-12-26 11:05:51', + 'updateTime': null, + 'createUser': '1254966905669160962', + 'updateUser': null, + 'docClassCode': null, + 'pullStatus': 1, + 'pullUser': null, + 'attributionType': 5, + 'attributionId': '1327523708556668930', + 'classificationId': '1257965381181095938', + 'syncStatus': null + }, + { + 'docId': '1872116585131577347', + 'docName': 'api-ms-win-crt-environment-l1-1-0.dll', + 'docAlias': null, + 'docCode': null, + 'docSuffix': 'dll', + 'docStatus': 1, + 'publishFileId': '1872116585223852035', + 'publishVersion': 'a.1', + 'description': null, + 'createTime': '2024-12-26 11:05:51', + 'updateTime': null, + 'createUser': '1254966905669160962', + 'updateUser': null, + 'docClassCode': null, + 'pullStatus': 1, + 'pullUser': null, + 'attributionType': 5, + 'attributionId': '1327523708556668930', + 'classificationId': '1257965381181095938', + 'syncStatus': null + }, + { + 'docId': '1872116585131577350', + 'docName': 'api-ms-win-crt-conio-l1-1-0.dll', + 'docAlias': null, + 'docCode': null, + 'docSuffix': 'dll', + 'docStatus': 1, + 'publishFileId': '1872116585223852036', + 'publishVersion': 'a.1', + 'description': null, + 'createTime': '2024-12-26 11:05:51', + 'updateTime': null, + 'createUser': '1254966905669160962', + 'updateUser': null, + 'docClassCode': null, + 'pullStatus': 1, + 'pullUser': null, + 'attributionType': 5, + 'attributionId': '1327523708556668930', + 'classificationId': '1257965381181095938', + 'syncStatus': null + }, + { + 'docId': '1872116585131577346', + 'docName': 'api-ms-win-crt-locale-l1-1-0.dll', + 'docAlias': null, + 'docCode': null, + 'docSuffix': 'dll', + 'docStatus': 1, + 'publishFileId': '1872116585223852034', + 'publishVersion': 'a.1', + 'description': null, + 'createTime': '2024-12-26 11:05:51', + 'updateTime': null, + 'createUser': '1254966905669160962', + 'updateUser': null, + 'docClassCode': null, + 'pullStatus': 1, + 'pullUser': null, + 'attributionType': 5, + 'attributionId': '1327523708556668930', + 'classificationId': '1257965381181095938', + 'syncStatus': null + }, + { + 'docId': '1872116585139965954', + 'docName': 'api-ms-win-crt-filesystem-l1-1-0.dll', + 'docAlias': null, + 'docCode': null, + 'docSuffix': 'dll', + 'docStatus': 1, + 'publishFileId': '1872116585232240641', + 'publishVersion': 'a.1', + 'description': null, + 'createTime': '2024-12-26 11:05:51', + 'updateTime': null, + 'createUser': '1254966905669160962', + 'updateUser': null, + 'docClassCode': null, + 'pullStatus': 1, + 'pullUser': null, + 'attributionType': 5, + 'attributionId': '1327523708556668930', + 'classificationId': '1257965381181095938', + 'syncStatus': null + }, + { + 'docId': '1872116587392307203', + 'docName': 'api-ms-win-crt-stdio-l1-1-0.dll', + 'docAlias': null, + 'docCode': null, + 'docSuffix': 'dll', + 'docStatus': 1, + 'publishFileId': '1872116587505553412', + 'publishVersion': 'a.1', + 'description': null, + 'createTime': '2024-12-26 11:05:52', + 'updateTime': null, + 'createUser': '1254966905669160962', + 'updateUser': null, + 'docClassCode': null, + 'pullStatus': 1, + 'pullUser': null, + 'attributionType': 5, + 'attributionId': '1327523708556668930', + 'classificationId': '1257965381181095938', + 'syncStatus': null + }, + { + 'docId': '1872116587392307207', + 'docName': 'api-ms-win-crt-process-l1-1-0.dll', + 'docAlias': null, + 'docCode': null, + 'docSuffix': 'dll', + 'docStatus': 1, + 'publishFileId': '1872116587505553409', + 'publishVersion': 'a.1', + 'description': null, + 'createTime': '2024-12-26 11:05:51', + 'updateTime': null, + 'createUser': '1254966905669160962', + 'updateUser': null, + 'docClassCode': null, + 'pullStatus': 1, + 'pullUser': null, + 'attributionType': 5, + 'attributionId': '1327523708556668930', + 'classificationId': '1257965381181095938', + 'syncStatus': null + }, + { + 'docId': '1872116587379724289', + 'docName': 'api-ms-win-crt-multibyte-l1-1-0.dll', + 'docAlias': null, + 'docCode': null, + 'docSuffix': 'dll', + 'docStatus': 1, + 'publishFileId': '1872116587497164802', + 'publishVersion': 'a.1', + 'description': null, + 'createTime': '2024-12-26 11:05:51', + 'updateTime': null, + 'createUser': '1254966905669160962', + 'updateUser': null, + 'docClassCode': null, + 'pullStatus': 1, + 'pullUser': null, + 'attributionType': 5, + 'attributionId': '1327523708556668930', + 'classificationId': '1257965381181095938', + 'syncStatus': null + }, + { + 'docId': '1872116587388112901', + 'docName': 'api-ms-win-crt-private-l1-1-0.dll', + 'docAlias': null, + 'docCode': null, + 'docSuffix': 'dll', + 'docStatus': 1, + 'publishFileId': '1872116587497164801', + 'publishVersion': 'a.1', + 'description': null, + 'createTime': '2024-12-26 11:05:52', + 'updateTime': null, + 'createUser': '1254966905669160962', + 'updateUser': null, + 'docClassCode': null, + 'pullStatus': 1, + 'pullUser': null, + 'attributionType': 5, + 'attributionId': '1327523708556668930', + 'classificationId': '1257965381181095938', + 'syncStatus': null + }, + { + 'docId': '1872116587388112899', + 'docName': 'api-ms-win-crt-runtime-l1-1-0.dll', + 'docAlias': null, + 'docCode': null, + 'docSuffix': 'dll', + 'docStatus': 1, + 'publishFileId': '1872116587505553410', + 'publishVersion': 'a.1', + 'description': null, + 'createTime': '2024-12-26 11:05:51', + 'updateTime': null, + 'createUser': '1254966905669160962', + 'updateUser': null, + 'docClassCode': null, + 'pullStatus': 1, + 'pullUser': null, + 'attributionType': 5, + 'attributionId': '1327523708556668930', + 'classificationId': '1257965381181095938', + 'syncStatus': null + }, + { + 'docId': '1872116587392307205', + 'docName': 'api-ms-win-crt-math-l1-1-0.dll', + 'docAlias': null, + 'docCode': null, + 'docSuffix': 'dll', + 'docStatus': 1, + 'publishFileId': '1872116587505553411', + 'publishVersion': 'a.1', + 'description': null, + 'createTime': '2024-12-26 11:05:51', + 'updateTime': null, + 'createUser': '1254966905669160962', + 'updateUser': null, + 'docClassCode': null, + 'pullStatus': 1, + 'pullUser': null, + 'attributionType': 5, + 'attributionId': '1327523708556668930', + 'classificationId': '1257965381181095938', + 'syncStatus': null + }, + { + 'docId': '1872116589451710466', + 'docName': 'api-ms-win-crt-string-l1-1-0.dll', + 'docAlias': null, + 'docCode': null, + 'docSuffix': 'dll', + 'docStatus': 1, + 'publishFileId': '1872116589644648450', + 'publishVersion': 'a.1', + 'description': null, + 'createTime': '2024-12-26 11:05:52', + 'updateTime': null, + 'createUser': '1254966905669160962', + 'updateUser': null, + 'docClassCode': null, + 'pullStatus': 1, + 'pullUser': null, + 'attributionType': 5, + 'attributionId': '1327523708556668930', + 'classificationId': '1257965381181095938', + 'syncStatus': null + }, + { + 'docId': '1872116589472681986', + 'docName': 'api-ms-win-crt-time-l1-1-0.dll', + 'docAlias': null, + 'docCode': null, + 'docSuffix': 'dll', + 'docStatus': 1, + 'publishFileId': '1872116589653037060', + 'publishVersion': 'a.1', + 'description': null, + 'createTime': '2024-12-26 11:05:52', + 'updateTime': null, + 'createUser': '1254966905669160962', + 'updateUser': null, + 'docClassCode': null, + 'pullStatus': 1, + 'pullUser': null, + 'attributionType': 5, + 'attributionId': '1327523708556668930', + 'classificationId': '1257965381181095938', + 'syncStatus': null + }, + { + 'docId': '1872116589472681987', + 'docName': 'api-ms-win-crt-utility-l1-1-0.dll', + 'docAlias': null, + 'docCode': null, + 'docSuffix': 'dll', + 'docStatus': 1, + 'publishFileId': '1872116589653037058', + 'publishVersion': 'a.1', + 'description': null, + 'createTime': '2024-12-26 11:05:52', + 'updateTime': null, + 'createUser': '1254966905669160962', + 'updateUser': null, + 'docClassCode': null, + 'pullStatus': 1, + 'pullUser': null, + 'attributionType': 5, + 'attributionId': '1327523708556668930', + 'classificationId': '1257965381181095938', + 'syncStatus': null + }, + { + 'docId': '1872116589472681985', + 'docName': 'chrome_100_qq.pak', + 'docAlias': null, + 'docCode': null, + 'docSuffix': 'pak', + 'docStatus': 1, + 'publishFileId': '1872116589653037059', + 'publishVersion': 'a.1', + 'description': null, + 'createTime': '2024-12-26 11:05:52', + 'updateTime': null, + 'createUser': '1254966905669160962', + 'updateUser': null, + 'docClassCode': null, + 'pullStatus': 1, + 'pullUser': null, + 'attributionType': 5, + 'attributionId': '1327523708556668930', + 'classificationId': '1257965381181095938', + 'syncStatus': null + }, + { + 'docId': '1872116589787254785', + 'docName': 'chrome_200_qq.pak', + 'docAlias': null, + 'docCode': null, + 'docSuffix': 'pak', + 'docStatus': 1, + 'publishFileId': '1872116589896306690', + 'publishVersion': 'a.1', + 'description': null, + 'createTime': '2024-12-26 11:05:52', + 'updateTime': null, + 'createUser': '1254966905669160962', + 'updateUser': null, + 'docClassCode': null, + 'pullStatus': 1, + 'pullUser': null, + 'attributionType': 5, + 'attributionId': '1327523708556668930', + 'classificationId': '1257965381181095938', + 'syncStatus': null + }, + { + 'docId': '1872116590152159233', + 'docName': 'd3dcompiler_47.dll', + 'docAlias': null, + 'docCode': null, + 'docSuffix': 'dll', + 'docStatus': 1, + 'publishFileId': '1872116590277988354', + 'publishVersion': 'a.1', + 'description': null, + 'createTime': '2024-12-26 11:05:52', + 'updateTime': null, + 'createUser': '1254966905669160962', + 'updateUser': null, + 'docClassCode': null, + 'pullStatus': 1, + 'pullUser': null, + 'attributionType': 5, + 'attributionId': '1327523708556668930', + 'classificationId': '1257965381181095938', + 'syncStatus': null + }, + { + 'docId': '1872116591695663106', + 'docName': 'ffmpeg.dll', + 'docAlias': null, + 'docCode': null, + 'docSuffix': 'dll', + 'docStatus': 1, + 'publishFileId': '1872116591783743489', + 'publishVersion': 'a.1', + 'description': null, + 'createTime': '2024-12-26 11:05:52', + 'updateTime': null, + 'createUser': '1254966905669160962', + 'updateUser': null, + 'docClassCode': null, + 'pullStatus': 1, + 'pullUser': null, + 'attributionType': 5, + 'attributionId': '1327523708556668930', + 'classificationId': '1257965381181095938', + 'syncStatus': null + }, + { + 'docId': '1878649744767254529', + 'docName': 'avatar2.jpg', + 'docAlias': null, + 'docCode': null, + 'docSuffix': 'jpg', + 'docStatus': 1, + 'publishFileId': '1878649744901472258', + 'publishVersion': 'a.1', + 'description': null, + 'createTime': '2025-01-13 11:46:18', + 'updateTime': null, + 'createUser': '1254966905669160962', + 'updateUser': null, + 'docClassCode': null, + 'pullStatus': 1, + 'pullUser': null, + 'attributionType': 5, + 'attributionId': '1327523708556668930', + 'classificationId': '1257965381181095938', + 'syncStatus': null + } + ], + queryParam: {}, + url: { + list: '' + } + } + }, + watch: { + visible: { + handler(value) { + if (value) this.loadData(1) + } + } + }, + methods: {} + } +</script> + +<style scoped> + .tabs-container { + display: flex; + justify-content: space-between; + } +</style> \ No newline at end of file diff --git a/src/views/dnc/base/modules/ProductStructure/Document/NcDocumentTableList.vue b/src/views/dnc/base/modules/ProductStructure/Document/NcDocumentTableList.vue index f4f7136..f8364fe 100644 --- a/src/views/dnc/base/modules/ProductStructure/Document/NcDocumentTableList.vue +++ b/src/views/dnc/base/modules/ProductStructure/Document/NcDocumentTableList.vue @@ -1,16 +1,24 @@ <template> - <a-table :columns="columns" :data-source="dataSource" bordered :pagination="ipagination" - :scroll="{y:189}" :customRow="customRow" :size="size" rowKey="docId"> + <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"/> + + <NcDocumentAssignModal ref="documentAssignModalRef"/> + </div> </template> <script> import { JeecgListMixin } from '@/mixins/JeecgListMixin' + import DocumentModal from './DocumentModal' + import NcDocumentAssignModal from './NcDocumentAssignModal' export default { name: 'NcDocumentTableList', - components: {}, + components: { NcDocumentAssignModal, DocumentModal }, mixins: [JeecgListMixin], props: { size: { @@ -176,6 +184,9 @@ } } }, + created() { + this.$bus.$on('tableMenuItemMethodTrigger', this.triggerCorrespondingMethod) + }, methods: { customRow(record) { return { @@ -189,6 +200,20 @@ } } } + }, + + handleDocumentEdit(record, modalTitle) { + this.$refs.modalForm.edit(record) + this.$refs.modalForm.title = modalTitle + }, + + handleDocumentAssign(record, modalTitle) { + this.$refs.documentAssignModalRef.title = modalTitle + this.$refs.documentAssignModalRef.visible = true + }, + + triggerCorrespondingMethod({ methodName, level, modalTitle, tableRowInfo }) { + if (this[methodName] && tableRowInfo.attributionType === 5) this[methodName](tableRowInfo, modalTitle) } } } 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) } } } diff --git a/src/views/dnc/base/modules/ProductStructure/Document/UseDocumentEquipmentTableList.vue b/src/views/dnc/base/modules/ProductStructure/Document/UseNcDocumentEquipmentTableList.vue similarity index 96% rename from src/views/dnc/base/modules/ProductStructure/Document/UseDocumentEquipmentTableList.vue rename to src/views/dnc/base/modules/ProductStructure/Document/UseNcDocumentEquipmentTableList.vue index 423f62c..085b567 100644 --- a/src/views/dnc/base/modules/ProductStructure/Document/UseDocumentEquipmentTableList.vue +++ b/src/views/dnc/base/modules/ProductStructure/Document/UseNcDocumentEquipmentTableList.vue @@ -8,7 +8,7 @@ import { JeecgListMixin } from '@/mixins/JeecgListMixin' export default { - name: 'UseDocumentEquipmentTableList', + name: 'UseNcDocumentEquipmentTableList', components: {}, mixins: [JeecgListMixin], data() { diff --git a/src/views/dnc/base/modules/ProductStructure/Part/PartModal.vue b/src/views/dnc/base/modules/ProductStructure/Part/PartModal.vue new file mode 100644 index 0000000..263951c --- /dev/null +++ b/src/views/dnc/base/modules/ProductStructure/Part/PartModal.vue @@ -0,0 +1,94 @@ +<template> + <j-modal + :title="title" + :width="width" + :visible="visible" + switchFullscreen + :maskClosable="false" + @ok="handleOk" + @cancel="handleCancel" + cancelText="鍏抽棴"> + <PartModalForm ref="realForm" @ok="submitCallback"/> + </j-modal> +</template> + +<script> + import PartModalForm from './PartModalForm.vue' + + export default { + name: 'PartModal', + components: { + PartModalForm + }, + props: { + currentTreeNodeInfo: { + type: Object + } + }, + data() { + return { + title: '', + width: 700, + visible: false + } + }, + created() { + this.$bus.$on('treeMenuItemMethodTrigger', this.triggerCorrespondingMethod) + }, + methods: { + /** + * 娣诲姞褰撳墠閮ㄤ欢闆朵欢 + * @param modalTitle + */ + handleComponentAddChild(modalTitle) { + this.title = modalTitle + this.visible = true + this.$nextTick(() => { + this.$refs.realForm.add() + }) + }, + + /** + * 娣诲姞闆朵欢 + * @param modalTitle + */ + handlePartsAdd(modalTitle) { + this.title = modalTitle + this.visible = true + this.$nextTick(() => { + this.$refs.realForm.add() + }) + }, + + /** + * 缂栬緫闆朵欢淇℃伅 + * @param modalTitle + */ + handlePartsEdit(modalTitle) { + this.title = modalTitle + this.visible = true + this.$nextTick(() => { + this.$refs.realForm.edit(this.currentTreeNodeInfo.entity) + }) + }, + + handleOk() { + this.$refs.realForm.submitForm() + }, + + submitCallback() { + this.$emit('ok') + this.visible = false + }, + + handleCancel() { + this.$emit('close') + this.visible = false + }, + + triggerCorrespondingMethod({ methodName, modalTitle }) { + if (this[methodName]) this[methodName](modalTitle) + } + } + } +</script> \ No newline at end of file diff --git a/src/views/dnc/base/modules/ProductStructure/Part/PartModalForm.vue b/src/views/dnc/base/modules/ProductStructure/Part/PartModalForm.vue new file mode 100644 index 0000000..43aad42 --- /dev/null +++ b/src/views/dnc/base/modules/ProductStructure/Part/PartModalForm.vue @@ -0,0 +1,174 @@ +<template> + <a-spin :spinning="confirmLoading"> + <a-form-model ref="form" :model="model" :rules="validatorRules" :labelCol="labelCol" :wrapperCol="wrapperCol"> + <a-row> + <a-col :span="12"> + <a-form-model-item label="闆朵欢鍚嶇О" prop="partsName"> + <a-input v-model="model.partsName" placeholder="璇疯緭鍏ラ浂浠跺悕绉�"></a-input> + </a-form-model-item> + </a-col> + <a-col :span="12"> + <a-form-model-item label="浠e彿" prop="partsCode"> + <a-input v-model="model.partsCode" placeholder="璇疯緭鍏ヤ唬鍙�"></a-input> + </a-form-model-item> + </a-col> + </a-row> + + <a-row> + <a-col :span="12"> + <a-form-model-item label="闆朵欢鍨嬪彿"> + <a-input v-model="model.partsModel" placeholder="闆朵欢鍨嬪彿"></a-input> + </a-form-model-item> + </a-col> + <a-col :span="12"> + <a-form-model-item label="瑙勬牸"> + <a-input v-model="model.partsScale" placeholder="璇疯緭鍏ヨ鏍�"></a-input> + </a-form-model-item> + </a-col> + </a-row> + + <a-row> + <a-col :span="12"> + <a-form-model-item label="閲嶉噺"> + <a-input v-model="model.partsWeight" placeholder="璇疯緭鍏ラ噸閲�"></a-input> + </a-form-model-item> + </a-col> + <a-col :span="12"> + <a-form-model-item label="瑁呴厤绫诲瀷" :labelCol="labelCol" :wrapperCol="wrapperCol"> + <a-input v-model="model.assembleType" placeholder="璇疯緭鍏ヨ閰嶇被鍨�"></a-input> + </a-form-model-item> + </a-col> + </a-row> + + <a-row> + <a-col :span="12"> + <a-form-model-item label="鐗╂枡缂栫爜"> + <a-input v-model="model.materielCode" placeholder="璇疯緭鍏ョ墿鏂欑紪鐮�"></a-input> + </a-form-model-item> + </a-col> + <a-col :span="12"> + <a-form-model-item label="缁撴瀯绫诲瀷"> + <a-input v-model="model.structureType" placeholder="璇疯緭鍏ョ粨鏋勭被鍨�"></a-input> + </a-form-model-item> + </a-col> + </a-row> + + <a-row> + <a-col :span="12"> + <a-form-model-item label="澶勭悊绫诲瀷"> + <a-input v-model="model.processType" placeholder="璇疯緭鍏ュ鐞嗙被鍨�"></a-input> + </a-form-model-item> + </a-col> + <a-col :span="12"> + <a-form-model-item label="鐢熶骇绫诲瀷"> + <a-input v-model="model.produceType" placeholder="璇疯緭鍏ョ敓浜х被鍨�"></a-input> + </a-form-model-item> + </a-col> + </a-row> + + <a-row> + <a-col :span="24"> + <a-form-model-item label="鎻忚堪" :labelCol="labelColLong" :wrapperCol="wrapperColLong"> + <a-textarea v-model="model.description" placeholder="璇疯緭鍏ユ弿杩�"></a-textarea> + </a-form-model-item> + </a-col> + </a-row> + </a-form-model> + </a-spin> +</template> + +<script> + import { httpAction, getAction } from '@/api/manage' + + export default { + name: 'PartModalForm', + components: {}, + data() { + return { + model: {}, + labelCol: { + xs: { span: 24 }, + sm: { span: 8 } + }, + wrapperCol: { + xs: { span: 24 }, + sm: { span: 14 } + }, + labelColLong: { + xs: { span: 24 }, + sm: { span: 4 } + }, + wrapperColLong: { + xs: { span: 24 }, + sm: { span: 19 } + }, + confirmLoading: false, + validatorRules: { + partsName: [ + { required: true, message: '璇疯緭鍏ラ浂浠跺悕绉�!' } + ], + partsCode: [ + { required: true, message: '璇疯緭鍏ヤ唬鍙�!' } + ] + }, + url: { + add: '/mdc/mdcPartProcessInfo/add', + edit: '/mdc/mdcPartProcessInfo/edit' + } + } + }, + computed: { + formDisabled() { + return this.disabled + } + }, + created() { + //澶囦唤model鍘熷鍊� + this.modelDefault = JSON.parse(JSON.stringify(this.model)) + }, + methods: { + add() { + this.edit(this.modelDefault) + }, + + edit(record) { + this.model = Object.assign({}, record) + console.log('model', this.model) + this.visible = true + }, + + submitForm() { + const that = this + // 瑙﹀彂琛ㄥ崟楠岃瘉 + this.$refs.form.validate(valid => { + if (valid) { + that.confirmLoading = true + let httpUrl = '' + let method = 'post' + if (!this.model.id) { + httpUrl += this.url.add + } else { + httpUrl += this.url.edit + } + httpAction(httpUrl, this.model, method).then((res) => { + if (res.success) { + that.$notification.success({ + message: '娑堟伅', + description: res.message + }) + that.$emit('ok') + } else { + that.$notification.warning({ + message: '娑堟伅', + description: res.message + }) + } + }).finally(() => { + that.confirmLoading = false + }) + } + }) + } + } + } +</script> diff --git a/src/views/dnc/base/modules/ProductStructure/Process/ProcessInfo.vue b/src/views/dnc/base/modules/ProductStructure/Process/ProcessInfo.vue index e440a15..ab46336 100644 --- a/src/views/dnc/base/modules/ProductStructure/Process/ProcessInfo.vue +++ b/src/views/dnc/base/modules/ProductStructure/Process/ProcessInfo.vue @@ -1,17 +1,17 @@ <template> <a-descriptions bordered :size="size"> - <a-descriptions-item label="宸ュ簭鍚嶇О">{{currentLevelDetails.processName|isValueNull}}</a-descriptions-item> - <a-descriptions-item label="宸ュ簭鍙�">{{currentLevelDetails.processCode|isValueNull}}</a-descriptions-item> - <a-descriptions-item label="宸ヨ壓缂栧彿 ">{{currentLevelDetails.craftNo|isValueNull}}</a-descriptions-item> - <a-descriptions-item label="宸ュ簭绫诲瀷">{{currentLevelDetails.processType|isValueNull}}</a-descriptions-item> - <a-descriptions-item label="鍔犲伐璁惧鍨嬪彿">{{currentLevelDetails.processingEquipmentModel|isValueNull}} + <a-descriptions-item label="宸ュ簭鍚嶇О">{{currentLevelDetails.processName}}</a-descriptions-item> + <a-descriptions-item label="宸ュ簭鍙�">{{currentLevelDetails.processCode}}</a-descriptions-item> + <a-descriptions-item label="宸ヨ壓缂栧彿 ">{{currentLevelDetails.craftNo}}</a-descriptions-item> + <a-descriptions-item label="宸ュ簭绫诲瀷">{{currentLevelDetails.processType}}</a-descriptions-item> + <a-descriptions-item label="鍔犲伐璁惧鍨嬪彿">{{currentLevelDetails.processingEquipmentModel}} </a-descriptions-item> - <a-descriptions-item label="鍔犲伐璁惧绫诲瀷">{{currentLevelDetails.processingEquipmentOs|isValueNull}}</a-descriptions-item> - <a-descriptions-item label="鍔犲伐璁惧缂栧彿">{{currentLevelDetails.processingEquipmentCode|isValueNull}} + <a-descriptions-item label="鍔犲伐璁惧绫诲瀷">{{currentLevelDetails.processingEquipmentOs}}</a-descriptions-item> + <a-descriptions-item label="鍔犲伐璁惧缂栧彿">{{currentLevelDetails.processingEquipmentCode}} </a-descriptions-item> - <a-descriptions-item label="宸ヨ缂栧彿">{{currentLevelDetails.assembleStep|isValueNull}}</a-descriptions-item> - <a-descriptions-item label="宸ヨ鍚嶇О ">{{currentLevelDetails.assembleName|isValueNull}}</a-descriptions-item> - <a-descriptions-item label="鎻忚堪" :span="3">{{currentLevelDetails.description|isValueNull}}</a-descriptions-item> + <a-descriptions-item label="宸ヨ缂栧彿">{{currentLevelDetails.assembleStep}}</a-descriptions-item> + <a-descriptions-item label="宸ヨ鍚嶇О ">{{currentLevelDetails.assembleName}}</a-descriptions-item> + <a-descriptions-item label="鎻忚堪" :span="3">{{currentLevelDetails.description}}</a-descriptions-item> </a-descriptions> </template> @@ -25,11 +25,6 @@ }, size: { type: String - } - }, - filters: { - isValueNull(value) { - return !value || value == null ? '' : value } }, data() { diff --git a/src/views/dnc/base/modules/ProductStructure/Process/ProcessModal.vue b/src/views/dnc/base/modules/ProductStructure/Process/ProcessModal.vue index 60bea4b..fa309d6 100644 --- a/src/views/dnc/base/modules/ProductStructure/Process/ProcessModal.vue +++ b/src/views/dnc/base/modules/ProductStructure/Process/ProcessModal.vue @@ -20,6 +20,11 @@ components: { ProcessModalForm }, + props: { + currentTreeNodeInfo: { + type: Object + } + }, data() { return { title: '', @@ -27,29 +32,62 @@ visible: false } }, + created() { + this.$bus.$on('treeMenuItemMethodTrigger', this.triggerCorrespondingMethod) + }, methods: { - add() { + /** + * 鍒涘缓 + * @param modalTitle + */ + handleComponentAddRelative(modalTitle) { + this.title = modalTitle this.visible = true this.$nextTick(() => { this.$refs.realForm.add() }) }, - edit(record) { + + handleProcessAdd(modalTitle) { + this.title = modalTitle this.visible = true this.$nextTick(() => { - this.$refs.realForm.edit(record) + this.$refs.realForm.add() }) }, + + handlePartsAddRelative(modalTitle) { + this.title = modalTitle + this.visible = true + this.$nextTick(() => { + this.$refs.realForm.add() + }) + }, + + handleProcessEdit(modalTitle) { + this.title = modalTitle + this.visible = true + this.$nextTick(() => { + this.$refs.realForm.edit(this.currentTreeNodeInfo.entity) + }) + }, + handleOk() { this.$refs.realForm.submitForm() }, + submitCallback() { this.$emit('ok') this.visible = false }, + handleCancel() { this.$emit('close') this.visible = false + }, + + triggerCorrespondingMethod({ methodName, modalTitle }) { + if (this[methodName]) this[methodName](modalTitle) } } } diff --git a/src/views/dnc/base/modules/ProductStructure/Process/ProcessModalForm.vue b/src/views/dnc/base/modules/ProductStructure/Process/ProcessModalForm.vue index cd0e076..34603da 100644 --- a/src/views/dnc/base/modules/ProductStructure/Process/ProcessModalForm.vue +++ b/src/views/dnc/base/modules/ProductStructure/Process/ProcessModalForm.vue @@ -1,14 +1,14 @@ <template> <a-spin :spinning="confirmLoading"> - <a-form-model ref="form" :model="model" :rules="validatorRules"> + <a-form-model ref="form" :model="model" :rules="validatorRules" :labelCol="labelCol" :wrapperCol="wrapperCol"> <a-row> <a-col :span="12"> - <a-form-model-item label="宸ュ簭鍙�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="processCode"> + <a-form-model-item label="宸ュ簭鍙�" prop="processCode"> <a-input v-model="model.processCode" placeholder="璇疯緭鍏ュ伐搴忓彿"></a-input> </a-form-model-item> </a-col> <a-col :span="12"> - <a-form-model-item label="宸ュ簭鍚嶇О" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="processName"> + <a-form-model-item label="宸ュ簭鍚嶇О" prop="processName"> <a-input v-model="model.processName" placeholder="璇疯緭鍏ュ伐搴忓悕绉�"></a-input> </a-form-model-item> </a-col> @@ -24,12 +24,12 @@ <a-row> <a-col :span="12"> - <a-form-model-item label="宸ヨ壓缂栧彿" :labelCol="labelCol" :wrapperCol="wrapperCol"> + <a-form-model-item label="宸ヨ壓缂栧彿"> <a-input v-model="model.craftNo" placeholder="璇疯緭鍏ュ伐鑹虹紪鍙�"></a-input> </a-form-model-item> </a-col> <a-col :span="12"> - <a-form-model-item label="宸ヨ壓瑙勭▼鐗堟湰" :labelCol="labelCol" :wrapperCol="wrapperCol"> + <a-form-model-item label="宸ヨ壓瑙勭▼鐗堟湰"> <a-input v-model="model.craftVersion" placeholder="璇疯緭鍏ュ伐鑹鸿绋嬬増鏈�"></a-input> </a-form-model-item> </a-col> @@ -37,12 +37,12 @@ <a-row> <a-col :span="12"> - <a-form-model-item label="宸ュ簭绫诲瀷" :labelCol="labelCol" :wrapperCol="wrapperCol"> + <a-form-model-item label="宸ュ簭绫诲瀷"> <a-input v-model="model.processType" placeholder="璇疯緭鍏ュ伐搴忕被鍨�"></a-input> </a-form-model-item> </a-col> <a-col :span="12"> - <a-form-model-item label="宸ュ簭鎻忚堪" :labelCol="labelCol" :wrapperCol="wrapperCol"> + <a-form-model-item label="宸ュ簭鎻忚堪"> <a-input v-model="model.description" placeholder="璇疯緭鍏ュ伐搴忔弿杩�"></a-input> </a-form-model-item> </a-col> @@ -50,12 +50,12 @@ <a-row> <a-col :span="12"> - <a-form-model-item label="宸ヨ缂栧彿" :labelCol="labelCol" :wrapperCol="wrapperCol"> + <a-form-model-item label="宸ヨ缂栧彿"> <a-input v-model="model.assembleStep" placeholder="璇疯緭鍏ュ伐瑁呯紪鍙�"></a-input> </a-form-model-item> </a-col> <a-col :span="12"> - <a-form-model-item label="宸ヨ鍚嶇О" :labelCol="labelCol" :wrapperCol="wrapperCol"> + <a-form-model-item label="宸ヨ鍚嶇О"> <a-input v-model="model.assembleName" placeholder="璇疯緭鍏ュ伐瑁呭悕绉�"></a-input> </a-form-model-item> </a-col> @@ -96,23 +96,11 @@ }, confirmLoading: false, validatorRules: { - equipmentIds: [ - { required: true, message: '璇烽�夋嫨璁惧!' } + processCode: [ + { required: true, message: '璇疯緭鍏ュ伐搴忓彿!' } ], - partId: [ - { required: true, message: '璇疯緭鍏ラ浂浠跺彿!' } - ], - standardProcessLong: [ - { required: true, message: '璇疯緭鍏ユ爣鍑嗗姞宸ュ伐鏃�(min)!' } - ], - processCount: [ - { required: true, message: '璇疯緭鍏ュ姞宸ラ浂浠舵暟閲�!' } - ], - passCount: [ - { required: true, message: '璇疯緭鍏ュ悎鏍奸浂浠舵暟閲�!' } - ], - theDate: [ - { required: true, message: '璇烽�夋嫨鏃ユ湡!' } + processName: [ + { required: true, message: '璇疯緭鍏ュ伐搴忓悕绉�!' } ] }, url: { @@ -138,11 +126,6 @@ this.model = Object.assign({}, { equipmentIds: record.equipmentId }, record) console.log('model', this.model) this.visible = true - }, - inputNumberChange() { - if (this.model.standardProcessLong && this.model.processCount) { - this.model.totalProcessLong = this.model.standardProcessLong * this.model.processCount - } }, submitForm() { const that = this diff --git a/src/views/dnc/base/modules/ProductStructure/Process/ProcessTableList.vue b/src/views/dnc/base/modules/ProductStructure/Process/ProcessTableList.vue deleted file mode 100644 index 142402e..0000000 --- a/src/views/dnc/base/modules/ProductStructure/Process/ProcessTableList.vue +++ /dev/null @@ -1,248 +0,0 @@ -<template> - <div> - <a-table :columns="columns" :data-source="dataSource" bordered :pagination="false" - :scroll="{y:227}" :customRow="customRow" :size="size" rowKey="processId"> - - </a-table> - - <ProcessModal ref="modalForm" @ok="modalFormOk"/> - - <ImportFileModal ref="importFileModal"/> - </div> -</template> - -<script> - import { JeecgListMixin } from '@/mixins/JeecgListMixin' - import ProcessModal from './ProcessModal' - import ImportFileModal from '../../../../common/ImportFileModal' - - export default { - name: 'ProcessTableList', - components: { ImportFileModal, ProcessModal }, - mixins: [JeecgListMixin], - props: { - size: { - type: String - } - }, - data() { - return { - columns: [ - { - title: '宸ュ簭鍙�', - dataIndex: 'processCode', - align: 'center', - sorter: (a, b) => a.processNo - b.processNo, - sortDirections: ['descend', 'ascend'] - }, - { - title: '宸ュ簭缂栧彿', - dataIndex: 'craftNo', - align: 'center', - sorter: (a, b) => a.processId - b.processId, - sortDirections: ['descend', 'ascend'] - }, - { - title: '宸ュ簭鍚嶇О', - dataIndex: 'processName', - align: 'center', - sorter: (a, b) => a.processName.length - b.processName.length, - sortDirections: ['descend', 'ascend'] - } - ], - dataSource: [ - { - 'processId': '1327516286572163080', - 'productId': '1326377675659276290', - 'componentId': '1327516286505054210', - 'partsId': null, - 'processName': null, - 'processCode': '1', - 'craftNo': null, - 'craftVersion': null, - 'processType': null, - 'processingEquipmentModel': null, - 'processingEquipmentCode': null, - 'assembleStep': null, - 'assembleName': null, - 'description': null - }, - { - 'processId': '1701841077007798274', - 'productId': '1326377675659276290', - 'componentId': '1327516286505054210', - 'partsId': null, - 'processName': '2113', - 'processCode': '111', - 'craftNo': '', - 'craftVersion': '', - 'processType': 0, - 'processingEquipmentModel': '', - 'processingEquipmentCode': '', - 'assembleStep': '', - 'assembleName': '', - 'description': '' - }, - { - 'processId': '1875082575626289153', - 'productId': '1326377675659276290', - 'componentId': '1327516286505054210', - 'partsId': null, - 'processName': '333', - 'processCode': '3213', - 'craftNo': '', - 'craftVersion': '', - 'processType': 0, - 'processingEquipmentModel': '', - 'processingEquipmentCode': '', - 'assembleStep': '', - 'assembleName': '', - 'description': '' - }, - { - 'processId': '1875082597210177537', - 'productId': '1326377675659276290', - 'componentId': '1327516286505054210', - 'partsId': null, - 'processName': '123', - 'processCode': 'sd', - 'craftNo': '', - 'craftVersion': '', - 'processType': 0, - 'processingEquipmentModel': '', - 'processingEquipmentCode': '', - 'assembleStep': '', - 'assembleName': '', - 'description': '' - }, - { - 'processId': '1875082616835325954', - 'productId': '1326377675659276290', - 'componentId': '1327516286505054210', - 'partsId': null, - 'processName': 'dadas', - 'processCode': 'sadsa', - 'craftNo': '', - 'craftVersion': '', - 'processType': 0, - 'processingEquipmentModel': '', - 'processingEquipmentCode': '', - 'assembleStep': '', - 'assembleName': '', - 'description': '' - }, - { - 'processId': '1875082638553432066', - 'productId': '1326377675659276290', - 'componentId': '1327516286505054210', - 'partsId': null, - 'processName': '1213', - 'processCode': 'das', - 'craftNo': '', - 'craftVersion': '', - 'processType': 0, - 'processingEquipmentModel': '', - 'processingEquipmentCode': '', - 'assembleStep': '', - 'assembleName': '', - 'description': '' - }, - { - 'processId': '1875082668072943617', - 'productId': '1326377675659276290', - 'componentId': '1327516286505054210', - 'partsId': null, - 'processName': 'zxccz', - 'processCode': 'asdasda', - 'craftNo': '', - 'craftVersion': '', - 'processType': 0, - 'processingEquipmentModel': '', - 'processingEquipmentCode': '', - 'assembleStep': '', - 'assembleName': '', - 'description': '' - } - ], - currentRowInfo: {}, - url: { - list: '', - add: '', - edit: '', - delete: '' - } - } - }, - created() { - this.$bus.$on('menuItemMethodTrigger', this.triggerCorrespondingMethod) - }, - methods: { - /** - * 鑷畾涔夎〃鏍艰鍔熻兘 - * @param record 琛ㄦ牸琛屼俊鎭� - * @returns {{on: {contextmenu: on.contextmenu, click: on.click}}} 杩斿洖浜嬩欢鏂规硶瀵硅薄 - */ - customRow(record) { - return { - on: { - contextmenu: event => { - event.preventDefault() - this.currentRowInfo = Object.assign({}, record) - this.$emit('handleTableContextMenuOpen', { objectId: record.processId, param: 'process' }) - }, - click: () => { - this.$bus.$emit('sendCurrentLevelInfo', record) - } - } - } - }, - - /** - * 鐐瑰嚮鍒涘缓宸ュ簭鑿滃崟鏃惰Е鍙� - * @param modalTitle - */ - handleProcessAdd(modalTitle) { - this.$refs.modalForm.add() - this.$refs.modalForm.title = modalTitle - }, - - /** - * 鐐瑰嚮缂栬緫宸ュ簭鑿滃崟鏃惰Е鍙� - * @param modalTitle - */ - handleProcessEdit(modalTitle) { - this.$refs.modalForm.edit(this.currentRowInfo) - this.$refs.modalForm.title = modalTitle - }, - - /** - * 鐐瑰嚮鍒犻櫎鏃惰Е鍙� - */ - handleProcessDelete() { - this.$confirm({ - title: '鎻愮ず', - content: '纭鍒犻櫎姝ゆ潯璁板綍鍚楋紵', - okText: '纭', - okType: 'danger', - cancelText: '鍙栨秷', - onOk: () => { - this.handleDelete(this.currentRowInfo.processId) - } - }) - }, - - handleProcessImport(modalTitle) { - this.$refs.importFileModal.visible = true - this.$refs.importFileModal.title = modalTitle - }, - - triggerCorrespondingMethod({ methodName, level, modalTitle }) { - if (level === 'process') this[methodName](modalTitle) - } - } - } -</script> - -<style scoped> - -</style> \ No newline at end of file diff --git a/src/views/dnc/base/modules/ProductStructure/ProcessStep/ProcessStepInfo.vue b/src/views/dnc/base/modules/ProductStructure/ProcessStep/ProcessStepInfo.vue index 07987c5..3264e39 100644 --- a/src/views/dnc/base/modules/ProductStructure/ProcessStep/ProcessStepInfo.vue +++ b/src/views/dnc/base/modules/ProductStructure/ProcessStep/ProcessStepInfo.vue @@ -1,13 +1,32 @@ <template> - <div> - - </div> + <a-descriptions bordered :size="size"> + <a-descriptions-item label="宸ユ鍚嶇О">{{currentLevelDetails.processName}}</a-descriptions-item> + <a-descriptions-item label="宸ユ鍙�">{{currentLevelDetails.processCode}}</a-descriptions-item> + <a-descriptions-item label="宸ヨ壓缂栧彿 ">{{currentLevelDetails.craftNo}}</a-descriptions-item> + <a-descriptions-item label="宸ュ簭绫诲瀷">{{currentLevelDetails.processType}}</a-descriptions-item> + <a-descriptions-item label="鍔犲伐璁惧鍨嬪彿">{{currentLevelDetails.processingEquipmentModel}} + </a-descriptions-item> + <a-descriptions-item label="鍔犲伐璁惧绫诲瀷">{{currentLevelDetails.processingEquipmentOs}}</a-descriptions-item> + <a-descriptions-item label="鍔犲伐璁惧缂栧彿">{{currentLevelDetails.processingEquipmentCode}} + </a-descriptions-item> + <a-descriptions-item label="宸ヨ缂栧彿">{{currentLevelDetails.assembleStep}}</a-descriptions-item> + <a-descriptions-item label="宸ヨ鍚嶇О ">{{currentLevelDetails.assembleName}}</a-descriptions-item> + <a-descriptions-item label="鎻忚堪" :span="3">{{currentLevelDetails.description}}</a-descriptions-item> + </a-descriptions> </template> <script> export default { name: 'ProcessStepInfo', components: {}, + props: { + currentLevelDetails: { + type: Object + }, + size: { + type: String + } + }, data() { return {} }, diff --git a/src/views/dnc/base/modules/ProductStructure/Product/ProductModalForm.vue b/src/views/dnc/base/modules/ProductStructure/Product/ProductModalForm.vue index 83f50a6..2f79dd6 100644 --- a/src/views/dnc/base/modules/ProductStructure/Product/ProductModalForm.vue +++ b/src/views/dnc/base/modules/ProductStructure/Product/ProductModalForm.vue @@ -21,7 +21,7 @@ <a-row> <a-col :span="24"> <a-form-model-item label="浜у搧鍨嬪彿"> - <a-textarea v-model="model.productModel" placeholder="璇疯緭鍏ヤ骇鍝佸瀷鍙�"></a-textarea> + <a-input v-model="model.productModel" placeholder="璇疯緭鍏ヤ骇鍝佸瀷鍙�"></a-input> </a-form-model-item> </a-col> </a-row> diff --git a/src/views/dnc/base/modules/ProductStructure/ProductStructureMainBottom.vue b/src/views/dnc/base/modules/ProductStructure/ProductStructureMainBottom.vue index 8651ed1..2556e05 100644 --- a/src/views/dnc/base/modules/ProductStructure/ProductStructureMainBottom.vue +++ b/src/views/dnc/base/modules/ProductStructure/ProductStructureMainBottom.vue @@ -12,8 +12,12 @@ <PartInfo :currentLevelDetails="currentLevelInfo.entity" :size="descriptionsContainerSize"/> </a-tab-pane> - <a-tab-pane :key="1" tab="宸ュ簭灞炴��" v-if="currentLevelInfo.hasOwnProperty('processType')"> + <a-tab-pane :key="1" tab="宸ュ簭灞炴��" v-if="currentLevelInfo.type===4"> <ProcessInfo :currentLevelDetails="currentLevelInfo" :size="descriptionsContainerSize"/> + </a-tab-pane> + + <a-tab-pane :key="1" tab="宸ユ灞炴��" v-if="currentLevelInfo.type===5"> + <ProcessStepInfo :currentLevelDetails="currentLevelInfo" :size="descriptionsContainerSize"/> </a-tab-pane> <template v-if="currentLevelInfo.hasOwnProperty('attributionType')"> @@ -43,11 +47,13 @@ import ProcessInfo from './Process/ProcessInfo' import DocumentInfo from './Document/DocumentInfo' import DocumentVersionTableList from './Document/DocumentVersionTableList' - import UseDocumentEquipmentTableList from './Document/UseDocumentEquipmentTableList' + import UseDocumentEquipmentTableList from './Document/UseNcDocumentEquipmentTableList' + import ProcessStepInfo from './ProcessStep/ProcessStepInfo' export default { name: 'ProductStructureMainBottom', components: { + ProcessStepInfo, UseDocumentEquipmentTableList, DocumentVersionTableList, DocumentInfo, diff --git a/src/views/dnc/base/modules/ProductStructure/ProductStructureMainTop.vue b/src/views/dnc/base/modules/ProductStructure/ProductStructureMainTop.vue index 9a6a8e1..e6bb019 100644 --- a/src/views/dnc/base/modules/ProductStructure/ProductStructureMainTop.vue +++ b/src/views/dnc/base/modules/ProductStructure/ProductStructureMainTop.vue @@ -9,24 +9,23 @@ <OtherDocumentTableList @handleTableContextMenuOpen="handleTableContextMenuOpen" :size="tableContainerSize"/> </a-tab-pane> - <TableContextMenu :currentTableRowInfo="currentTableRowInfo" ref="tableContextMenuRef"/> + <TableContextMenu :tableRowInfo="currentRightClickedTableRowInfo" ref="tableContextMenuRef"/> </a-tabs> </template> <script> - import ProcessTableList from './Process/ProcessTableList' import NcDocumentTableList from './Document/NcDocumentTableList' import OtherDocumentTableList from './Document/OtherDocumentTableList' import TableContextMenu from '../../../common/TableContextMenu' export default { name: 'ProductStructureMainTop', - components: { TableContextMenu, OtherDocumentTableList, NcDocumentTableList, ProcessTableList }, + components: { TableContextMenu, OtherDocumentTableList, NcDocumentTableList }, data() { return { activeTabKey: '1', tableContainerSize: 'small', - currentTableRowInfo: {}, + currentRightClickedTableRowInfo: {}, currentTreeNodeInfo: {} } }, @@ -39,7 +38,7 @@ * @param record 褰撳墠琛ㄦ牸琛屼俊鎭� */ handleTableContextMenuOpen(record) { - this.currentTableRowInfo = Object.assign({}, record) + this.currentRightClickedTableRowInfo = Object.assign({}, record) this.$refs.tableContextMenuRef.currentMenuLevel = record.param this.$refs.tableContextMenuRef.menuStyle.top = event.clientY + 'px' this.$refs.tableContextMenuRef.menuStyle.left = event.clientX + 'px' diff --git a/src/views/dnc/common/ImportFileModal.vue b/src/views/dnc/common/ImportFileModal.vue index 3ed0cb5..13aee43 100644 --- a/src/views/dnc/common/ImportFileModal.vue +++ b/src/views/dnc/common/ImportFileModal.vue @@ -39,6 +39,7 @@ }, created() { this.$bus.$on('treeMenuItemMethodTrigger', this.triggerCorrespondingMethod) + this.$bus.$on('tableMenuItemMethodTrigger', this.triggerCorrespondingMethod) }, methods: { handleImport(modalTitle) { diff --git a/src/views/dnc/common/ProductStructureTree.vue b/src/views/dnc/common/ProductStructureTree.vue index 2d85dbf..de6e889 100644 --- a/src/views/dnc/common/ProductStructureTree.vue +++ b/src/views/dnc/common/ProductStructureTree.vue @@ -36,6 +36,8 @@ <a-icon slot="product" type="shopping"/> <a-icon slot="component" type="camera"/> <a-icon slot="part" type="hdd"/> + <a-icon slot="process" type="apartment"/> + <a-icon slot="processStep" type="tool"/> </a-tree> </div> </div> @@ -43,26 +45,29 @@ <!--浜у搧寮圭獥--> <ProductModal ref="productModalFormRef" :currentTreeNodeInfo="rightClickSelected"/> - <!--闆朵欢寮圭獥--> + <!--閮ㄤ欢寮圭獥--> <ComponentModal :currentTreeNodeInfo="rightClickSelected"/> - <!--瀵煎叆鏂囦欢鍏叡寮圭獥--> - <ImportFileModal/> + <!--闆朵欢寮圭獥--> + <PartModal :currentTreeNodeInfo="rightClickSelected"/> + <!--宸ュ簭寮圭獥--> + <ProcessModal :currentTreeNodeInfo="rightClickSelected"/> </a-card> </template> <script> - import { deleteAction } from '@/api/manage' - import { mapActions } from 'vuex' + import dncApi from '@/api/dnc' import ProductStructureTreeContextMenu from './modules/ProductStructureTree/ProductStructureTreeContextMenu' import ProductModal from '../base/modules/ProductStructure/Product/ProductModal' - import ImportFileModal from './ImportFileModal' import ComponentModal from '../base/modules/ProductStructure/Component/ComponentModal' + import PartModal from '../base/modules/ProductStructure/Part/PartModal' + import ProcessModal from '../base/modules/ProductStructure/Process/ProcessModal' export default { name: 'ProductStructureTree', components: { + ProcessModal, + PartModal, ComponentModal, - ImportFileModal, ProductModal, ProductStructureTreeContextMenu }, @@ -91,339 +96,15 @@ this.$bus.$on('treeMenuItemMethodTrigger', this.triggerCorrespondingMethod) }, methods: { - ...mapActions(['QueryProduction']), - queryTreeData() { this.loading = true this.cardLoading = true - this.QueryProduction().then(res => { + dncApi.getProductStructureTreeApi().then(res => { + console.log('res', res) if (res.success) { this.dataList = [] this.allTreeKeys = [] - // this.treeDataSource = res.result - this.treeDataSource = [ - { - 'id': '1869253349344432129', - 'label': '[璁╁浜篯娴嬭瘯', - 'iconClass': '', - 'parentId': '1869253349344432129', - 'children': [ - { - 'id': '1869254044432879617', - 'label': '[378]qgwqg', - 'iconClass': '', - 'parentId': '1869253349344432129', - 'children': [ - { - 'id': '1869260302133137410', - 'label': '[ggjuk]璋旇皵鍘�', - 'iconClass': '', - 'parentId': '1869254044432879617', - 'children': [ - { - 'id': '1869294654070075393', - 'label': '[8989]qwfq', - 'iconClass': '', - 'parentId': '1869260302133137410', - 'children': null, - 'type': 2, - 'entity': { - 'componentId': '1869294654070075393', - 'parentId': '1869260302133137410', - 'productId': '1869253349344432129', - 'componentName': 'qwfq', - 'materielCode': '', - 'materielDesp': '', - 'componentModel': '', - 'componentScale': '', - 'componentWeight': null, - 'rankLevel': 3, - 'assembleType': null, - 'produceType': null, - 'processType': null, - 'structureType': null, - 'componentCode': '8989', - 'componentStatus': 1, - 'description': '', - 'createTime': '2024-12-18 16:12:30', - 'updateTime': null, - 'createUser': '1254966905669160962', - 'updateUser': '' - }, - 'leaf': false, - 'rfield': '1869253349344432129' - }, - { - 'id': '1869294701801254913', - 'label': '[888]7878', - 'iconClass': '', - 'parentId': '1869260302133137410', - 'children': null, - 'type': 2, - 'entity': { - 'componentId': '1869294701801254913', - 'parentId': '1869260302133137410', - 'productId': '1869253349344432129', - 'componentName': '7878', - 'materielCode': '', - 'materielDesp': '', - 'componentModel': '', - 'componentScale': '', - 'componentWeight': null, - 'rankLevel': 3, - 'assembleType': null, - 'produceType': null, - 'processType': null, - 'structureType': null, - 'componentCode': '888', - 'componentStatus': 1, - 'description': '', - 'createTime': '2024-12-18 16:12:41', - 'updateTime': null, - 'createUser': '1254966905669160962', - 'updateUser': '' - }, - 'leaf': false, - 'rfield': '1869253349344432129' - }, - { - 'id': '1869294780935188482', - 'label': '[6855]ww', - 'iconClass': '', - 'parentId': '1869260302133137410', - 'children': null, - 'type': 2, - 'entity': { - 'componentId': '1869294780935188482', - 'parentId': '1869260302133137410', - 'productId': '1869253349344432129', - 'componentName': 'ww', - 'materielCode': '', - 'materielDesp': '', - 'componentModel': '', - 'componentScale': '', - 'componentWeight': null, - 'rankLevel': 3, - 'assembleType': null, - 'produceType': null, - 'processType': null, - 'structureType': null, - 'componentCode': '6855', - 'componentStatus': 1, - 'description': '', - 'createTime': '2024-12-18 16:13:00', - 'updateTime': null, - 'createUser': '1254966905669160962', - 'updateUser': '' - }, - 'leaf': false, - 'rfield': '1869253349344432129' - }, - { - 'id': '1876199480437153794', - 'label': '[354]zzzzzzzzzzzzzzzzz', - 'iconClass': '', - 'parentId': '1869260302133137410', - 'children': null, - 'type': 3, - 'entity': { - 'partsId': '1876199480437153794', - 'partsName': 'zzzzzzzzzzzzzzzzz', - 'productId': '1869253349344432129', - 'componentId': '1869260302133137410', - 'materielCode': '', - 'materielDesp': '', - 'partsModel': '', - 'partsScale': '', - 'partsWeight': null, - 'assembleType': null, - 'produceType': null, - 'processType': null, - 'structureType': null, - 'partsCode': '354', - 'partsStatus': 1, - 'description': '', - 'createTime': '2025-01-06 17:29:49', - 'updateTime': null, - 'createUser': '1254966905669160962', - 'updateUser': '' - }, - 'leaf': false, - 'rfield': '1869260302133137410' - } - ], - 'type': 2, - 'entity': { - 'componentId': '1869260302133137410', - 'parentId': '1869254044432879617', - 'productId': '1869253349344432129', - 'componentName': '璋旇皵鍘�', - 'materielCode': '', - 'materielDesp': '', - 'componentModel': '', - 'componentScale': '', - 'componentWeight': null, - 'rankLevel': 2, - 'assembleType': null, - 'produceType': null, - 'processType': null, - 'structureType': null, - 'componentCode': 'ggjuk', - 'componentStatus': 1, - 'description': '', - 'createTime': '2024-12-18 13:56:00', - 'updateTime': null, - 'createUser': '1254966905669160962', - 'updateUser': '' - }, - 'leaf': false, - 'rfield': '1869253349344432129' - } - ], - 'type': 2, - 'entity': { - 'componentId': '1869254044432879617', - 'parentId': null, - 'productId': '1869253349344432129', - 'componentName': 'qgwqg', - 'materielCode': '', - 'materielDesp': '', - 'componentModel': '', - 'componentScale': '', - 'componentWeight': null, - 'rankLevel': 1, - 'assembleType': null, - 'produceType': null, - 'processType': null, - 'structureType': null, - 'componentCode': '378', - 'componentStatus': 1, - 'description': '88', - 'createTime': '2022-12-18 13:32:48', - 'updateTime': '2024-12-18 13:32:48', - 'createUser': '1254966905669160962', - 'updateUser': '1254966905669160962' - }, - 'leaf': false, - 'rfield': '1869253349344432129' - }, - { - 'id': '1869253419041181697', - 'label': '[876]涓哄叏鍥藉墠浜旂粰', - 'iconClass': '', - 'parentId': '1869253349344432129', - 'children': null, - 'type': 2, - 'entity': { - 'componentId': '1869253419041181697', - 'parentId': null, - 'productId': '1869253349344432129', - 'componentName': '涓哄叏鍥藉墠浜旂粰', - 'materielCode': '', - 'materielDesp': '', - 'componentModel': '56', - 'componentScale': '', - 'componentWeight': null, - 'rankLevel': 1, - 'assembleType': null, - 'produceType': null, - 'processType': null, - 'structureType': null, - 'componentCode': '876', - 'componentStatus': 1, - 'description': '', - 'createTime': '2024-12-18 13:28:39', - 'updateTime': '2024-12-18 14:03:55', - 'createUser': '1254966905669160962', - 'updateUser': '1254966905669160962' - }, - 'leaf': false, - 'rfield': '1869253349344432129' - }, - { - 'id': '1869294861876867073', - 'label': '[777]he', - 'iconClass': '', - 'parentId': '1869253349344432129', - 'children': [ - { - 'id': '1876087437913108481', - 'label': '[ddd]鍜岀淮鎶�', - 'iconClass': '', - 'parentId': '1869294861876867073', - 'children': null, - 'type': 2, - 'entity': { - 'componentId': '1876087437913108481', - 'parentId': '1869294861876867073', - 'productId': '1869253349344432129', - 'componentName': '鍜岀淮鎶�', - 'materielCode': '', - 'materielDesp': '', - 'componentModel': '', - 'componentScale': '', - 'componentWeight': null, - 'rankLevel': 2, - 'assembleType': null, - 'produceType': null, - 'processType': null, - 'structureType': null, - 'componentCode': 'ddd', - 'componentStatus': 1, - 'description': '', - 'createTime': '2025-01-06 10:04:36', - 'updateTime': null, - 'createUser': '1254966905669160962', - 'updateUser': '' - }, - 'leaf': false, - 'rfield': '1869253349344432129' - } - ], - 'type': 2, - 'entity': { - 'componentId': '1869294861876867073', - 'parentId': null, - 'productId': '1869253349344432129', - 'componentName': 'he', - 'materielCode': '', - 'materielDesp': '', - 'componentModel': '', - 'componentScale': '', - 'componentWeight': null, - 'rankLevel': 1, - 'assembleType': null, - 'produceType': null, - 'processType': null, - 'structureType': null, - 'componentCode': '777', - 'componentStatus': 1, - 'description': '', - 'createTime': '2024-12-18 16:13:20', - 'updateTime': null, - 'createUser': '1254966905669160962', - 'updateUser': '' - }, - 'leaf': false, - 'rfield': '1869253349344432129' - } - ], - 'type': 1, - 'entity': { - 'productId': '1869253349344432129', - 'productNo': '璁╁浜�', - 'productModel': '', - 'productName': '娴嬭瘯', - 'productStatus': 1, - 'createTime': '2024-12-18 13:28:22', - 'updateTime': null, - 'createUser': '1254966905669160962', - 'updateUser': null - }, - 'leaf': false, - 'rfield': null - } - ] + this.treeDataSource = res.list this.generateList(this.treeDataSource) // this.expandedKeys = this.allTreeKeys this.expandedKeys = [this.treeDataSource[0].id] @@ -477,21 +158,21 @@ return } const that = this - deleteAction(that.url.delete, { id: this.rightClickSelected.id }) - .then((res) => { - if (res.success) { - that.queryTreeData() - that.$notification.success({ - message: '娑堟伅', - description: res.message - }) - } else { - that.$notification.warning({ - message: '娑堟伅', - description: res.message - }) - } - }) + // deleteAction(that.url.delete, { id: this.rightClickSelected.id }) + // .then((res) => { + // if (res.success) { + // that.queryTreeData() + // that.$notification.success({ + // message: '娑堟伅', + // description: res.message + // }) + // } else { + // that.$notification.warning({ + // message: '娑堟伅', + // description: res.message + // }) + // } + // }) } }) }, @@ -582,6 +263,12 @@ case 3: treeNode.slots = { icon: 'part' } break + case 4: + treeNode.slots = { icon: 'process' } + break + case 5: + treeNode.slots = { icon: 'processStep' } + break default: } } diff --git a/src/views/dnc/common/TableContextMenu.vue b/src/views/dnc/common/TableContextMenu.vue index dd10da2..b9dcdbe 100644 --- a/src/views/dnc/common/TableContextMenu.vue +++ b/src/views/dnc/common/TableContextMenu.vue @@ -24,7 +24,7 @@ name: 'TableContextMenu', components: {}, props: { - currentTableRowInfo: { + tableRowInfo: { type: Object } }, @@ -43,25 +43,46 @@ defaultContextMenuList: { //鏂囨。 document: [ - { show: true, label: '缂栬緫鏂囨。淇℃伅', code: 'document_edit', subMenu: [], icon: 'edit' }, - { show: true, label: '鎸囨淳鍒拌澶�', code: 'document_assign', subMenu: [], icon: 'cluster' }, - { show: false, label: '瀵煎嚭NC绋嬪簭', code: 'document_export', subMenu: [], icon: 'export' }, - { show: true, label: '瀵煎叆NC绋嬪簭', code: 'document_import', subMenu: [], icon: 'import' }, - { show: true, label: '涓嬭浇', code: 'document_download', subMenu: [], icon: 'download' }, - { show: true, label: '鍒犻櫎', code: 'document_delete', subMenu: [], icon: 'delete' }, - { show: true, label: '鎵归噺鍒犻櫎', code: 'document_batch_remove', subMenu: [], icon: 'delete' }, + { show: true, label: '缂栬緫鏂囨。淇℃伅', code: 'document_edit', subMenu: [], icon: 'edit', isCommonMethod: false }, + { + show: true, + label: '鎸囨淳鍒拌澶�', + code: 'document_assign', + subMenu: [], + icon: 'cluster', + isCommonMethod: false + }, + { + show: false, + label: '瀵煎嚭NC绋嬪簭', + code: 'document_export', + subMenu: [], + icon: 'export', + isCommonMethod: true + }, + { show: true, label: '瀵煎叆NC绋嬪簭', code: 'document_import', subMenu: [], icon: 'import', isCommonMethod: true }, + { show: true, label: '涓嬭浇', code: 'document_download', subMenu: [], icon: 'download', isCommonMethod: true }, + { show: true, label: '鍒犻櫎', code: 'document_delete', subMenu: [], icon: 'delete', isCommonMethod: true }, + { + show: true, + label: '鎵归噺鍒犻櫎', + code: 'document_batch_remove', + subMenu: [], + icon: 'delete', + isCommonMethod: false + }, { show: true, label: '鐢熷懡鍛ㄦ湡', subMenu: [ - { show: true, label: '鍑哄簱', code: 'document_pull', icon: 'export' }, - { show: true, label: '鍙栨秷鍑哄簱', code: 'document_cancel_pull', icon: 'stop' }, - { show: true, label: '鍏ュ簱', code: 'document_push', icon: 'import' }, - { show: true, label: '鍙戝竷', code: 'document_publish', icon: 'flag' }, - { show: true, label: '閲嶆柊鍙戝竷', code: 'document_republish', icon: 'reload' }, - { show: true, label: '褰掓。', code: 'document_pigeonhole', icon: 'database' } + { show: true, label: '鍑哄簱', code: 'document_pull', icon: 'export', isCommonMethod: false }, + { show: true, label: '鍙栨秷鍑哄簱', code: 'document_cancel_pull', icon: 'stop', isCommonMethod: false }, + { show: true, label: '鍏ュ簱', code: 'document_push', icon: 'import', isCommonMethod: true }, + { show: true, label: '鍙戝竷', code: 'document_publish', icon: 'flag', isCommonMethod: false }, + { show: true, label: '閲嶆柊鍙戝竷', code: 'document_republish', icon: 'reload', isCommonMethod: false }, + { show: true, label: '褰掓。', code: 'document_pigeonhole', icon: 'database', isCommonMethod: false } ], - icon: 'delete' + icon: 'hourglass' } ] } @@ -69,11 +90,25 @@ }, methods: { menuItemClick({ item, key }) { - // process_add => handleProcessAdd 瑙﹀彂瀵瑰簲缁勪欢浜嬩欢 - const methodName = 'handle' + key.split('_').map(item => item[0].toUpperCase() + item.slice(1)).join('') + const menuKeyArray = key.split('_') + const isCommonMethod = this.defaultContextMenuList[this.currentMenuLevel].find(item => item.code === key).isCommonMethod + let methodName + // 鍒ゆ柇鏄惁涓哄叕鍏辨柟娉曪紝濡傛灉涓哄叕鍏辨柟娉曞垯鎴彇涓撴湁灞炴�roduct/component/part/process绛夊瓧娈� + if (isCommonMethod) { + // product_add => handleAdd 瑙﹀彂鍏叡鐖剁骇缁勪欢浜嬩欢 + methodName = 'handle' + menuKeyArray.map(item => item[0].toUpperCase() + item.slice(1)).slice(1).join('') + } else { + // product_add => handleProcessAdd 瑙﹀彂瀵瑰簲缁勪欢浜嬩欢 + methodName = 'handle' + menuKeyArray.map(item => item[0].toUpperCase() + item.slice(1)).join('') + } const modalTitle = this.defaultContextMenuList[this.currentMenuLevel].find(item => item.code === key).label - console.log('key', key) - this.$bus.$emit('menuItemMethodTrigger', { level: this.currentMenuLevel, methodName, modalTitle }) + console.log('methodName---------------------------------------', methodName) + console.log('tableRowInfo---------------------------------------', this.tableRowInfo) + this.$bus.$emit('tableMenuItemMethodTrigger', { + methodName, + modalTitle, + tableRowInfo: this.tableRowInfo + }) } } } -- Gitblit v1.9.3