| | |
| | | }, |
| | | |
| | | //-------------------------设备结构树------------------------------------------------ |
| | | // 获取设备树 |
| | | getDeviceTreeDataApi: () => getAction('/nc/device/queryTreeListByProduction'), |
| | | // 删除文档 |
| | | deleteDeviceRelativeDocumentApi: ({ docId, attributionId }) => deleteAction(`doc/relative/delete/device/${docId}/${attributionId}`), |
| | | // 获取有权限的用户列表 |
| | |
| | | // 移除用户权限 |
| | | removeDeviceTreePermissionFromUser: ({ treeNodeType, treeNodeId, isAssignSonNode, userIdArray }) => { |
| | | return postAction(`/nc/device/assign/remove/user/${treeNodeType}/${treeNodeId}/${isAssignSonNode}`, userIdArray) |
| | | }, |
| | | } |
| | | } |
| | |
| | | |
| | | actions: { |
| | | // 产线树 |
| | | QueryProduction({ commit },type='MDC') { |
| | | QueryProduction({ commit }) { |
| | | return new Promise((resolve, reject) => { |
| | | getAction("/mdc/mdcEquipment/queryTreeListByProduction",{type}).then(response => { |
| | | getAction("/mdc/mdcEquipment/queryTreeListByProduction").then(response => { |
| | | if(response.success){ |
| | | const result = response.result |
| | | Vue.ls.set(SYS_PRODUCTION, result) |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { mapActions } from 'vuex' |
| | | import { deleteAction } from '@/api/manage' |
| | | import dncApi from '@/api/dnc' |
| | | import DeviceStructureTreeContextMenu from './DeviceStructureTreeContextMenu' |
| | | import AssignPermissionModal from './Permission/AssignPermissionModal' |
| | | |
| | |
| | | this.$bus.$on('handleSwitchDeviceDocClassCode', this.setCurrentDeviceDocClassCode) |
| | | }, |
| | | methods: { |
| | | ...mapActions(['QueryProduction']), |
| | | |
| | | getTreeDataByApi() { |
| | | this.loading = true |
| | | this.cardLoading = true |
| | | this.QueryProduction('DNC').then(res => { |
| | | if (res.success) { |
| | | this.dataList = [] |
| | | this.allTreeKeys = [] |
| | | this.treeDataSource = res.result |
| | | this.generateList(this.treeDataSource) |
| | | this.expandedKeys = this.allTreeKeys |
| | | this.$bus.$emit('sendCurrentTreeNodeInfo', this.treeDataSource[0]) |
| | | } else { |
| | | this.$message.warn(res.message) |
| | | } |
| | | }).finally(() => { |
| | | this.loading = false |
| | | this.cardLoading = false |
| | | }) |
| | | dncApi.getDeviceTreeDataApi() |
| | | .then(res => { |
| | | if (res.success) { |
| | | this.dataList = [] |
| | | this.allTreeKeys = [] |
| | | this.treeDataSource = res.result |
| | | this.generateList(this.treeDataSource) |
| | | this.expandedKeys = this.allTreeKeys |
| | | this.$bus.$emit('sendCurrentTreeNodeInfo', this.treeDataSource[0]) |
| | | } else { |
| | | this.$message.warn(res.message) |
| | | } |
| | | }) |
| | | .finally(() => { |
| | | this.loading = false |
| | | this.cardLoading = false |
| | | }) |
| | | }, |
| | | |
| | | setCurrentDeviceDocClassCode(documentActiveTabKey) { |
| | |
| | | import { getAction } from '@/api/manage' |
| | | import dncApi from '@/api/dnc' |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import { mapActions } from 'vuex' |
| | | |
| | | export default { |
| | | name: 'NcDocumentAssignModal', |
| | |
| | | } |
| | | }, |
| | | methods: { |
| | | ...mapActions(['QueryProduction']), |
| | | |
| | | // 获取当前工序或工步对应文档列表 |
| | | loadData() { |
| | | this.dataSource = [] |
| | |
| | | getDocumentAssignDeviceTreeByApi() { |
| | | this.spinning = true |
| | | this.treeDataSource = [] |
| | | this.QueryProduction('DNC') |
| | | dncApi.getDeviceTreeDataApi() |
| | | .then(res => { |
| | | if (res.success) { |
| | | this.dataList = [] |