From 9c7505a22f6c249184228de7c6f256a4d880dfed Mon Sep 17 00:00:00 2001 From: zhaowei <zhaowei> Date: 星期五, 14 三月 2025 09:36:06 +0800 Subject: [PATCH] 1、设备类管理页面完成增删改查功能 2、产品结构树工序及工步层级引入设备类概念由系统参数配置决定是否展示,若设备类存在时则NC文档挂载在设备类下不存在时则按照对应工序或工步层级下 3、产品结构树工序及工步层级的刀具列表实现增删改查功能 4、新增设备类管理页面并完成布局 5、产品结构树接口调整,产品结构树节点实体信息通过点击后调取接口获取 6、产品结构树搜素输入框增加防抖机制,避免每次输入都重新计算消耗性能使页面卡顿 7、新增工序及工步层级的刀具列表并添加系统权限 8、用户管理页面移除新增用户时的密码校验 9、产品结构树各层级属性信息展示由每行3列调整为每行4列 10、产品结构树页面在工序和工步层级实现对设备类的增删改查功能 --- src/views/dnc/base/modules/ProductStructure/ProductStructureMainBottom.vue | 58 ++++++++++++++++++++++++++++++++++++++++------------------ 1 files changed, 40 insertions(+), 18 deletions(-) diff --git a/src/views/dnc/base/modules/ProductStructure/ProductStructureMainBottom.vue b/src/views/dnc/base/modules/ProductStructure/ProductStructureMainBottom.vue index c00a390..ddaa77d 100644 --- a/src/views/dnc/base/modules/ProductStructure/ProductStructureMainBottom.vue +++ b/src/views/dnc/base/modules/ProductStructure/ProductStructureMainBottom.vue @@ -1,6 +1,7 @@ <template> - <div v-if="currentLevelInfo.type!==4"> - <a-tabs v-model="activeTabKey" v-if="Object.keys(currentLevelInfo).length>0" @change="handleTabChange"> + <div v-if="+currentLevelInfo.type!==4" style="height: 100%"> + <a-tabs style="height: 100%" v-model="activeTabKey" v-if="Object.keys(currentLevelInfo).length>0" + @change="handleTabChange"> <a-tab-pane :key="1" tab="灞炴�т俊鎭�" v-if="+currentLevelInfo.type===1"> <ProductInfo :currentLevelDetails="currentLevelInfo.entity" :size="containerSize"/> </a-tab-pane> @@ -21,8 +22,10 @@ <ProcessStepInfo :currentLevelDetails="currentLevelInfo.entity" :size="containerSize"/> </a-tab-pane> - <a-tab-pane :key="2" tab="鍒�鍏蜂俊鎭�" v-if="+currentLevelInfo.type===5||+currentLevelInfo.type===6"> - <CutterInfo :currentLevelDetails="currentLevelInfo.entity" :size="containerSize"/> + <!--绯荤粺鍙傛暟閰嶇疆涓嫢鍙傛暟涓�1鏃舵墠灞曠ず瀵瑰簲灞傜骇鐨勫垁鍏峰垪琛�--> + <a-tab-pane :key="2" tab="鍒�鍏峰垪琛�" + v-if="+currentLevelInfo.type===5&&isProcessHasCutterList||+currentLevelInfo.type===6&&isProcessStepHasCutterList"> + <CutterTableList ref="cutterTableListRef" :currentLevelInfo="currentLevelInfo" :size="containerSize"/> </a-tab-pane> <template v-if="currentLevelInfo.hasOwnProperty('attributionType')"> @@ -57,19 +60,19 @@ import ComponentInfo from './Component/ComponentInfo' import PartInfo from './Part/PartInfo' import ProcessInfo from './Process/ProcessInfo' +import ProcessStepInfo from './ProcessStep/ProcessStepInfo' +import CutterTableList from './Cutter/CutterTableList' import DocumentInfo from '../../../common/DocumentInfo' import DocumentVersionTableList from '../../../common/DocumentVersionTableList' import UseDocumentEquipmentTableList from './Document/UseNcDocumentEquipmentTableList' -import ProcessStepInfo from './ProcessStep/ProcessStepInfo' import FilePreview from '../../../common/FilePreview' import TableContextMenu from '../../../common/TableContextMenu' -import CutterInfo from '@views/dnc/base/modules/ProductStructure/Cutter/CutterInfo.vue' -import dncApi from '@/api/dnc' +import { getAction } from '@/api/manage' export default { name: 'ProductStructureMainBottom', components: { - CutterInfo, + CutterTableList, TableContextMenu, FilePreview, ProcessStepInfo, @@ -85,6 +88,8 @@ return { activeTabKey: 1, containerSize: 'small', + isProcessHasCutterList: false, + isProcessStepHasCutterList: false, currentLevelInfo: {}, currentRightClickedTableRowInfo: {}, hasLoadedDataTabKeyArray: [] @@ -94,30 +99,47 @@ this.$bus.$on('sendCurrentClickedDocumentInfo', this.receiveCurrentLevelInfo) this.$bus.$on('sendCurrentTreeNodeInfo', this.receiveCurrentLevelInfo) this.$bus.$on('reloadMainBottomTableData', this.reloadMainBottomTableData) + this.getCutterListDisplayPermission('dnc_cutter_process', 'isProcessHasCutterList') + this.getCutterListDisplayPermission('dnc_cutter_step', 'isProcessStepHasCutterList') }, methods: { + /** + * 鑾峰彇鍒�鍏峰垪琛ㄥ湪宸ュ簭鍜屽伐姝ュ眰绾х殑灞曠ず鏉冮檺 + * @param settingKey 鍚勫眰绾у睍绀烘潈闄恔ey + * @param dataProperty 缁勪欢data涓殑灞炴�у�肩敤鏉ユ帶鍒舵槸鍚﹀睍绀� + */ + getCutterListDisplayPermission(settingKey, dataProperty) { + getAction(`/system/sysParams/query/by/settingKey?settingKey=${settingKey}`).then(res => { + if (res.success) { + this[dataProperty] = res.result.settingValue === '1' + } + }) + }, + /** * 鎺ユ敹鏍戠粍浠朵互鍙婅〃鏍间紶鏉ョ殑褰撳墠閫変腑鎴栫偣鍑荤殑椤逛俊鎭� * @param levelInfo 褰撳墠灞傜骇淇℃伅 */ receiveCurrentLevelInfo(levelInfo) { - const { id, type } = levelInfo - dncApi.getProductStructureTreeNodeEntityApi({ id, type }) - .then(res => { - if (res.success) { - console.log('res-------------', res) - this.currentLevelInfo = Object.assign(levelInfo, { entity: res.result[0] }) - } - }) + this.currentLevelInfo = levelInfo this.activeTabKey = 1 this.hasLoadedDataTabKeyArray = [] }, + /** + * tab鏍忓垏鎹㈡椂瑙﹀彂 + * @param activeTabKey 褰撳墠婵�娲荤殑tabKey + */ handleTabChange(activeTabKey) { if (!this.hasLoadedDataTabKeyArray.includes(activeTabKey)) { switch (activeTabKey) { case 2: - this.$nextTick(() => this.$refs.filePreviewRef.getFilePreviewByApi()) + if (this.currentLevelInfo.hasOwnProperty('attributionType')) { + console.log('ref', this.$refs.filePreviewRef) + this.$nextTick(() => this.$refs.filePreviewRef.getFilePreviewByApi()) + } else { + this.$nextTick(() => this.$refs.cutterTableListRef.setQueryParamAndLoadData(1)) + } break case 3: this.$nextTick(() => this.$refs.documentVersionTableRef.loadData()) @@ -172,6 +194,6 @@ } /deep/ .ant-tabs-tabpane { - overflow: auto; + overflow: hidden auto; } </style> \ No newline at end of file -- Gitblit v1.9.3