1、产品结构树以及设备结构树中的列表增加行选中样式
2、产品结构树实现点击设备类出现设备类下挂载的NC程序列表
3、产品结构树实现在设备类中导入NC程序功能
| | |
| | | |
| | | <template v-else> |
| | | <a-tabs> |
| | | <a-tab-pane :key="1" tab="车é´å±æ§"> |
| | | <a-tab-pane :key="1" tab="屿§"> |
| | | <WorkshopInfo :currentLevelDetails="currentTreeNodeInfo" :size="containerSize"/> |
| | | </a-tab-pane> |
| | | </a-tabs> |
| | |
| | | |
| | | customRow(record) { |
| | | return { |
| | | style: { |
| | | backgroundColor: this.currentClickedDocumentInfo.docId === record.docId ? '#BAE7FF' : 'transparent' |
| | | }, |
| | | on: { |
| | | contextmenu: event => { |
| | | event.preventDefault() |
| | |
| | | |
| | | customRow(record) { |
| | | return { |
| | | style: { |
| | | backgroundColor: this.currentClickedDocumentInfo.docId === record.docId ? '#BAE7FF' : 'transparent' |
| | | }, |
| | | on: { |
| | | contextmenu: event => { |
| | | event.preventDefault() |
| | |
| | | <template> |
| | | <a-descriptions bordered :size="size"> |
| | | <a-descriptions-item label="车é´åç§°">{{currentLevelDetails.title}}</a-descriptions-item> |
| | | <a-descriptions-item label="åç§°">{{currentLevelDetails.title}}</a-descriptions-item> |
| | | <a-descriptions-item label="夿³¨">{{currentLevelDetails.memo}}</a-descriptions-item> |
| | | </a-descriptions> |
| | | </template> |
| | |
| | | this.$nextTick(() => { |
| | | if (this.$refs.realForm) { |
| | | this.$refs.realForm.getWorkshopListByApi() |
| | | this.$refs.realForm.handleProductionChange() |
| | | this.$refs.realForm.handleProductionChange(tableRowInfo.productionId) |
| | | this.$refs.realForm.edit({ ...tableRowInfo }) |
| | | } |
| | | }) |
| | |
| | | }, |
| | | |
| | | // 车é´éæ©æ¹å忏
空设å¤ç±»éæ©å¹¶éæ°è·å设å¤ç±»å表 |
| | | handleProductionChange() { |
| | | handleProductionChange(value) { |
| | | if (this.model.deviceManagementId) delete this.model.deviceManagementId |
| | | if (this.model.deviceManagementId_dictText) delete this.model.deviceManagementId_dictText |
| | | dncApi.getDeviceCustomTypeListByProductionIdApi(this.model.productionId) |
| | | dncApi.getDeviceCustomTypeListByProductionIdApi(value) |
| | | .then(res => { |
| | | if (res.success) this.deviceCustomTypeList = res.result |
| | | }) |
| | |
| | | <template> |
| | | <div style="flex: 0.25;margin-right: 10px"> |
| | | <a-table :columns="columns" :data-source="dataSource" bordered :pagination="false" |
| | | :scroll="{y:189}" :customRow="customRow" :size="size" rowKey="id" @change="handleTableChange"> |
| | | :scroll="{y:265}" :customRow="customRow" :size="size" rowKey="id" @change="handleTableChange"> |
| | | |
| | | </a-table> |
| | | </div> |
| | |
| | | |
| | | customRow(record) { |
| | | return { |
| | | style: { |
| | | backgroundColor: this.currentClickedTypeInfo.id === record.id ? '#BAE7FF' : 'transparent' |
| | | }, |
| | | on: { |
| | | contextmenu: event => { |
| | | event.preventDefault() |
| | |
| | | this.$emit('handleTableContextMenuOpen', this.currentRightClickedTypeInfo) |
| | | }, |
| | | click: () => { |
| | | if (this.currentClickedTypeInfo.docId === record.docId) return |
| | | if (this.currentClickedTypeInfo.id === record.id) return |
| | | this.currentClickedTypeInfo = Object.assign({}, record) |
| | | // this.$bus.$emit('sendCurrentClickedDocumentInfo', record) |
| | | this.$bus.$emit('sendCurrentClickedTypeInfo', record) |
| | | } |
| | | } |
| | | } |
| | |
| | | <template> |
| | | <div style="flex: 1"> |
| | | <a-table :columns="columns" :data-source="dataSource" bordered :pagination="ipagination" |
| | | :scroll="{y:189}" :customRow="customRow" :size="size" rowKey="docId" @change="handleTableChange"> |
| | | :scroll="{y:265}" :customRow="customRow" :size="size" rowKey="docId" @change="handleTableChange"> |
| | | |
| | | </a-table> |
| | | |
| | |
| | | components: { NcDocumentAssignModal, DocumentModal }, |
| | | mixins: [JeecgListMixin], |
| | | props: { |
| | | currentTreeNodeInfo: { |
| | | currentNCDocumentAttributionInfo: { |
| | | type: Object |
| | | }, |
| | | size: { |
| | |
| | | } |
| | | }, |
| | | watch: { |
| | | currentTreeNodeInfo: { |
| | | currentNCDocumentAttributionInfo: { |
| | | handler(value) { |
| | | this.currentClickedDocumentInfo = {} |
| | | }, |
| | |
| | | this.$message.error('请设置url.list屿§!') |
| | | return |
| | | } |
| | | console.log('currentNCDocumentAttributionInfo', this.currentNCDocumentAttributionInfo) |
| | | const { attributionId, attributionType, docClassCode } = this.currentNCDocumentAttributionInfo |
| | | //å è½½æ°æ® è¥ä¼ å
¥åæ°1åå 载第ä¸é¡µçå
容 |
| | | if (arg === 1) this.ipagination.current = 1 |
| | | var params = this.getQueryParams()//æ¥è¯¢æ¡ä»¶ |
| | | params.attributionId = this.currentTreeNodeInfo.id |
| | | params.attributionType = this.currentTreeNodeInfo.type |
| | | params.docClassCode = 'NC' |
| | | params.attributionId = attributionId |
| | | params.attributionType = attributionType |
| | | params.docClassCode = docClassCode |
| | | if (!params) return false |
| | | this.dataSource = [] |
| | | this.loading = true |
| | |
| | | |
| | | customRow(record) { |
| | | return { |
| | | style: { |
| | | backgroundColor: this.currentClickedDocumentInfo.docId === record.docId ? '#BAE7FF' : 'transparent' |
| | | }, |
| | | on: { |
| | | contextmenu: event => { |
| | | event.preventDefault() |
| | |
| | | <template> |
| | | <div> |
| | | <a-table :columns="columns" :data-source="dataSource" bordered :pagination="ipagination" |
| | | :scroll="{y:189}" :customRow="customRow" :size="size" rowKey="docId" @change="handleTableChange"> |
| | | :scroll="{y:265}" :customRow="customRow" :size="size" rowKey="docId" @change="handleTableChange"> |
| | | |
| | | </a-table> |
| | | |
| | |
| | | |
| | | customRow(record) { |
| | | return { |
| | | style: { |
| | | backgroundColor: this.currentClickedDocumentInfo.docId === record.docId ? '#BAE7FF' : 'transparent' |
| | | }, |
| | | on: { |
| | | contextmenu: event => { |
| | | event.preventDefault() |
| | |
| | | <ProcessStepInfo :currentLevelDetails="currentLevelInfo.entity" :size="containerSize"/> |
| | | </a-tab-pane> |
| | | |
| | | <a-tab-pane :key="1" tab="设å¤å表" v-if="currentLevelInfo.hasOwnProperty('deviceManagementId')"> |
| | | <!-- <ProcessStepInfo :currentLevelDetails="currentLevelInfo" :size="containerSize"/>--> |
| | | 设å¤å表 |
| | | </a-tab-pane> |
| | | |
| | | <!--ç³»ç»åæ°é
ç½®ä¸è¥åæ°ä¸º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')"> |
| | | <template v-if="currentLevelInfo.hasOwnProperty('docId')"> |
| | | <a-tab-pane :key="1" tab="ææ¡£å±æ§"> |
| | | <DocumentInfo :currentLevelDetails="currentLevelInfo" :size="containerSize"/> |
| | | </a-tab-pane> |
| | |
| | | }, |
| | | created() { |
| | | this.$bus.$on('sendCurrentClickedDocumentInfo', this.receiveCurrentLevelInfo) |
| | | this.$bus.$on('sendCurrentClickedTypeInfo', this.receiveCurrentLevelInfo) |
| | | this.$bus.$on('sendCurrentTreeNodeInfo', this.receiveCurrentLevelInfo) |
| | | this.$bus.$on('reloadMainBottomTableData', this.reloadMainBottomTableData) |
| | | this.getCutterListDisplayPermission('dnc_cutter_process', 'isProcessHasCutterList') |
| | |
| | | ref="deviceCustomTypeTableList" :currentTreeNodeInfo="currentTreeNodeInfo" |
| | | @handleTableContextMenuOpen="handleTableContextMenuOpen" :size="tableContainerSize"/> |
| | | |
| | | <NcDocumentTableList ref="ncDocumentTableListRef" :currentTreeNodeInfo="currentTreeNodeInfo" |
| | | <NcDocumentTableList ref="ncDocumentTableListRef" |
| | | :currentNCDocumentAttributionInfo="currentNCDocumentAttributionInfo" |
| | | @handleTableContextMenuOpen="handleTableContextMenuOpen" :size="tableContainerSize"/> |
| | | </div> |
| | | </a-tab-pane> |
| | |
| | | isProcessStepHasDeviceTypeList: false, |
| | | currentRightClickedTableRowInfo: {}, |
| | | currentTreeNodeInfo: {}, |
| | | currentClickedTypeInfo: {}, |
| | | currentNCDocumentAttributionInfo: {},//å½åNCææ¡£çæå±çº§å³ç¶çº§ç详ç»ä¿¡æ¯ï¼å¼å
¥è®¾å¤ç±»åNCæè½½è³è®¾å¤ç±»ä¸åä¹åæè½½å¨å·¥åºåå·¥æ¥ä¸ï¼ |
| | | hasLoadedDataTabKeyArray: [] |
| | | } |
| | | }, |
| | | created() { |
| | | this.$bus.$on('sendCurrentTreeNodeInfo', this.receiveCurrentTreeNodeInfo) |
| | | this.$bus.$on('sendCurrentClickedTypeInfo', this.receiveCurrentClickedTypeInfo) |
| | | this.$bus.$on('reloadDocumentListData', this.reloadDocumentListData) |
| | | this.$bus.$on('tableMenuItemMethodTrigger', this.triggerCorrespondingMethod) |
| | | this.getDeviceTypeListDisplayPermission('dnc_device_type_process', 'isProcessHasDeviceTypeList') |
| | |
| | | this.hasLoadedDataTabKeyArray.push(this.activeTabKey) |
| | | }, |
| | | |
| | | receiveCurrentClickedTypeInfo(record) { |
| | | const { id, attributionType } = record |
| | | this.currentClickedTypeInfo = Object.assign({}, record) |
| | | this.currentNCDocumentAttributionInfo = Object.assign({}, { |
| | | attributionId: id, |
| | | attributionType, |
| | | docClassCode: 'NC' |
| | | }) |
| | | this.$nextTick(() => { |
| | | if (this.$refs.ncDocumentTableListRef) this.$refs.ncDocumentTableListRef.loadData(1) |
| | | }) |
| | | }, |
| | | |
| | | /** |
| | | * æ§å¶å³é®èåå¼å¯ |
| | | * @param record å½åè¡¨æ ¼è¡ä¿¡æ¯ |
| | |
| | | /** |
| | | * ææ¡£ä»¥åNCç¨åºå¯¼å
¥/åºåº/å
¥åºæåå触åéæ°å è½½ææ¡£å表 |
| | | * @param docClassCode ææ¡£ç±»å« |
| | | * @param attributionId èç¹Id |
| | | * @param attributionType ææ¡£ç¶çº§typeç±»å |
| | | * @param attributionId ææ¡£ç¶çº§Id |
| | | */ |
| | | reloadDocumentListData({ docClassCode, attributionId }) { |
| | | // 妿ä¸ä¼ çææ¡£ä¸æ¯æå±äºå½åæå±ç¤ºèç¹çææ¡£åä¸éæ°è·åææ¡£å表 |
| | | reloadDocumentListData({ docClassCode, attributionType, attributionId }) { |
| | | console.log('docClassCode, attributionType, attributionId', docClassCode, attributionType, attributionId) |
| | | // 卿¤å¤è®¾å¤NCææ¡£ç¶çº§åæ°æ¯å¯æ¤æ¹æ³æ¯ç»ææ 以å设å¤ç±»ä¸¤ç§ä¸å导å
¥æ¹å¼çå
±ååºå£ |
| | | this.currentNCDocumentAttributionInfo = Object.assign({}, { docClassCode, attributionId, attributionType }) |
| | | // è¥å¼å
¥è®¾å¤ç±»ååªéè¦å¤æå½ååºç°çææ¡£æå±æ¯å¦æ¯å½åå·¦é®éä¸çææ¡£ï¼è¥ä¸æ¯å½åéä¸çææ¡£åä¸å·æ°ææ¡£å表(é¿å
æ æå·æ°) |
| | | if (this.currentRightClickedTableRowInfo.hasOwnProperty('deviceManagementId')) { |
| | | if (this.currentClickedTypeInfo.id !== attributionId) return |
| | | } else { |
| | | if (this.currentTreeNodeInfo.id !== attributionId) return |
| | | } |
| | | if (docClassCode === 'NC') { |
| | | this.$nextTick(() => { |
| | | if (this.$refs.ncDocumentTableListRef) this.$refs.ncDocumentTableListRef.loadData(1) |
| | | }) |
| | | } else { |
| | | if (this.$refs.otherDocumentTableListRef) this.$refs.otherDocumentTableListRef.loadData(1) |
| | | } |
| | |
| | | |
| | | // å é¤å½åå³é®éä¸ææ¡£ |
| | | handleDelete() { |
| | | const { docId, param, attributionId } = this.currentRightClickedTableRowInfo |
| | | const { docId, param, attributionId, attributionType } = this.currentRightClickedTableRowInfo |
| | | const that = this |
| | | that.$confirm({ |
| | | title: 'æç¤º', |
| | |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }) |
| | | that.reloadDocumentListData({ docClassCode: param, attributionId }) |
| | | that.reloadDocumentListData({ docClassCode: param, attributionId, attributionType }) |
| | | } else { |
| | | that.$notification.warning({ |
| | | message: 'æ¶æ¯', |
| | |
| | | */ |
| | | handlePull(menuLabel) { |
| | | const that = this |
| | | const { docId, docName, param, attributionId } = this.currentRightClickedTableRowInfo |
| | | const { docId, docName, param, attributionId, attributionType } = this.currentRightClickedTableRowInfo |
| | | that.$confirm({ |
| | | title: 'æç¤º', |
| | | content: `确认${menuLabel}åï¼`, |
| | |
| | | .then(res => { |
| | | console.log('res------------------', res) |
| | | if (res.success) { |
| | | that.reloadDocumentListData({ docClassCode: param, attributionId }) |
| | | that.reloadDocumentListData({ docClassCode: param, attributionId, attributionType }) |
| | | that.$notification.success({ |
| | | message: 'æ¶æ¯', |
| | | description: `${menuLabel}æå` |
| | |
| | | */ |
| | | handleCancelPull(menuLabel) { |
| | | const that = this |
| | | const { docId, param, attributionId } = this.currentRightClickedTableRowInfo |
| | | const { docId, param, attributionId, attributionType } = this.currentRightClickedTableRowInfo |
| | | that.$confirm({ |
| | | title: 'æç¤º', |
| | | content: `确认${menuLabel}åï¼`, |
| | |
| | | dncApi.documentCancelOutboundApi(docId) |
| | | .then(res => { |
| | | if (res.success) { |
| | | this.reloadDocumentListData({ docClassCode: param, attributionId }) |
| | | this.reloadDocumentListData({ docClassCode: param, attributionId, attributionType }) |
| | | that.$notification.success({ |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | |
| | | */ |
| | | handlePublish(menuLabel) { |
| | | const that = this |
| | | const { docId, param, attributionId } = this.currentRightClickedTableRowInfo |
| | | const { docId, param, attributionId, attributionType } = this.currentRightClickedTableRowInfo |
| | | that.$confirm({ |
| | | title: 'æç¤º', |
| | | content: `确认${menuLabel}åï¼`, |
| | |
| | | dncApi.documentPublishApi(docId) |
| | | .then(res => { |
| | | if (res.success) { |
| | | this.reloadDocumentListData({ docClassCode: param, attributionId }) |
| | | this.reloadDocumentListData({ docClassCode: param, attributionId, attributionType }) |
| | | this.$bus.$emit('reloadMainBottomTableData', 'documentVersion') |
| | | that.$notification.success({ |
| | | message: 'æ¶æ¯', |
| | |
| | | */ |
| | | handleRepublish(menuLabel) { |
| | | const that = this |
| | | const { docId, param, attributionId } = this.currentRightClickedTableRowInfo |
| | | const { docId, param, attributionId, attributionType } = this.currentRightClickedTableRowInfo |
| | | that.$confirm({ |
| | | title: 'æç¤º', |
| | | content: `确认${menuLabel}åï¼`, |
| | |
| | | dncApi.documentRepublishApi(docId) |
| | | .then(res => { |
| | | if (res.success) { |
| | | this.reloadDocumentListData({ docClassCode: param, attributionId }) |
| | | this.reloadDocumentListData({ docClassCode: param, attributionId, attributionType }) |
| | | that.$notification.success({ |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | |
| | | */ |
| | | handlePigeonhole(menuLabel) { |
| | | const that = this |
| | | const { docId, param, attributionId } = this.currentRightClickedTableRowInfo |
| | | const { docId, param, attributionId, attributionType } = this.currentRightClickedTableRowInfo |
| | | that.$confirm({ |
| | | title: 'æç¤º', |
| | | content: `${menuLabel}åä¸å¯åæ¶ï¼ç¡®è®¤${menuLabel}åï¼`, |
| | |
| | | dncApi.documentPigeonholeApi(docId) |
| | | .then(res => { |
| | | if (res.success) { |
| | | this.reloadDocumentListData({ docClassCode: param, attributionId }) |
| | | this.reloadDocumentListData({ docClassCode: param, attributionId, attributionType }) |
| | | that.$notification.success({ |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | |
| | | </a-tooltip> |
| | | <a-button type="primary" v-has="'product_add'" icon="plus" style="margin-left: 8px" |
| | | @click="$refs.productModalFormRef.triggerCorrespondingMethod({modalTitle:'æ·»å 产å',methodName:'handleProductAdd'})"> |
| | | æ·»å 产å |
| | | 产å |
| | | </a-button> |
| | | <!-- <a-dropdown :trigger="['click']" placement="bottomCenter" style="margin: 0 8px">--> |
| | | <!-- <a-menu slot="overlay">--> |
| | |
| | | } else { |
| | | this.ipagination.total = 0 |
| | | } |
| | | } |
| | | else this.$message.warning(res.message) |
| | | } else this.$message.warning(res.message) |
| | | }).finally(() => { |
| | | this.loading = false |
| | | }) |
| | |
| | | // 确认æ¹éå é¤ææ¡£ |
| | | confirmBatchDeleteDocument() { |
| | | const that = this |
| | | const { selectedRowKeys, $notification, $confirm, currentDocumentInfo: { param, attributionId, attributionType } } = that |
| | | const { |
| | | selectedRowKeys, |
| | | $notification, |
| | | $confirm, |
| | | currentDocumentInfo: { param, attributionId, attributionType } |
| | | } = that |
| | | |
| | | if (selectedRowKeys.length === 0) { |
| | | $notification.warning({ |
| | |
| | | hasRequestedCount++ |
| | | if (hasRequestedCount === selectedRowKeys.length && hasRequestedSuccessCount > 0) { |
| | | this.loadData() |
| | | this.$emit('reloadDocumentListData', { docClassCode: param, attributionId }) |
| | | this.$emit('reloadDocumentListData', { docClassCode: param, attributionId, attributionType }) |
| | | } |
| | | }) |
| | | }) |
| | |
| | | attributionType = treeNodeInfo.type |
| | | docClassCode = treeNodeInfo.param |
| | | } else { |
| | | attributionId = tableRowInfo.attributionId |
| | | // è¥å·¥åºåå·¥æ¥å±çº§ä¸æè®¾å¤ç±»æ¶å导å
¥NCçåæ°éè¦è°æ´ |
| | | attributionId = tableRowInfo.param==='deviceCustomType'?tableRowInfo.id:tableRowInfo.attributionId |
| | | attributionType = tableRowInfo.attributionType |
| | | docClassCode = tableRowInfo.param |
| | | docClassCode = tableRowInfo.param==='deviceCustomType'?'NC':tableRowInfo.param |
| | | } |
| | | this.setModalTitle(modalTitle, docClassCode) |
| | | this.uploadParams = Object.assign({}, { attributionId, attributionType, docClassCode }) |
| | |
| | | deviceCustomType:[ |
| | | { label: 'ç¼è¾è®¾å¤ç±»ä¿¡æ¯', code: 'type_edit', subMenu: [], icon: 'edit', isCommonMethod: false }, |
| | | { label: 'å é¤', code: 'type_delete', subMenu: [], icon: 'delete', isCommonMethod: false }, |
| | | { label: '导å
¥NCç¨åº', code: 'type_document_import', subMenu: [], icon: 'import', isCommonMethod: true }, |
| | | { label: '导å
¥NCç¨åº', code: 'type_import', subMenu: [], icon: 'import', isCommonMethod: true }, |
| | | ], |
| | | //NCææ¡£ |
| | | NC: [ |
| | |
| | | methodName = 'handle' + menuKeyArray.map(item => item[0].toUpperCase() + item.slice(1)).join('') |
| | | } |
| | | console.log('tableRowInfo---------------------------------------', this.tableRowInfo) |
| | | console.log('methodName---------------------------------------', methodName) |
| | | this.$bus.$emit('tableMenuItemMethodTrigger', { |
| | | methodName, |
| | | modalTitle, |