1、产品结构树页面新增工步功能
2、产品结构树页面新增导入文档或NC程序功能
已重命名2个文件
已添加2个文件
已修改19个文件
| | |
| | | import { getAction, deleteAction, putAction, postAction, httpAction } from '@/api/manage' |
| | | import { getAction, deleteAction, putAction, postAction, httpAction, uploadAction } from '@/api/manage' |
| | | import querystring from 'querystring' |
| | | |
| | | export default { |
| | | //-------------------------产åç»ææ ------------------------------------------------ |
| | | getProductStructureTreeApi: () => getAction('/nc/product/load/tree'), |
| | | |
| | | // 导å
¥ææ¡£ |
| | | importDocumentFromLocalApi: (params, formData) => { |
| | | const paramsStringify = querystring.stringify(params) |
| | | return uploadAction(`/nc/doc/add?${paramsStringify}`, formData) |
| | | } |
| | | } |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import ProductStructureTree from '../common/ProductStructureTree' |
| | | import ProductStructureTree from './modules/ProductStructure/ProductStructureTree' |
| | | import ProductStructureMain from './modules/ProductStructure/ProductStructureMain' |
| | | import ImportFileModal from '../common/ImportFileModal' |
| | | |
| | |
| | | this.visible = true |
| | | this.isAddNextLevel = true |
| | | this.$nextTick(() => { |
| | | this.$refs.realForm.add({ productId: this.currentTreeNodeInfo.id }) |
| | | if (this.$refs.realForm) { |
| | | this.$refs.realForm.add({ productId: this.currentTreeNodeInfo.entity.productId }) |
| | | } |
| | | }) |
| | | }, |
| | | |
| | |
| | | this.visible = true |
| | | this.isAddNextLevel = true |
| | | this.$nextTick(() => { |
| | | this.$refs.realForm.add({ |
| | | productId: this.currentTreeNodeInfo.parentId, |
| | | parentId: this.currentTreeNodeInfo.id |
| | | }) |
| | | if (this.$refs.realForm) { |
| | | this.$refs.realForm.add({ |
| | | productId: this.currentTreeNodeInfo.entity.productId, |
| | | parentId: this.currentTreeNodeInfo.entity.componentId |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | |
| | |
| | | this.visible = true |
| | | this.isAddNextLevel = false |
| | | this.$nextTick(() => { |
| | | this.$refs.realForm.edit({ id: this.currentTreeNodeInfo.id, ...this.currentTreeNodeInfo.entity }) |
| | | if (this.$refs.realForm) { |
| | | this.$refs.realForm.edit({ id: this.currentTreeNodeInfo.id, ...this.currentTreeNodeInfo.entity }) |
| | | } |
| | | }) |
| | | }, |
| | | |
| | |
| | | } |
| | | } |
| | | }, |
| | | computed: { |
| | | formDisabled() { |
| | | return this.disabled |
| | | } |
| | | }, |
| | | created() { |
| | | //å¤ä»½modelåå§å¼ |
| | | this.modelDefault = JSON.parse(JSON.stringify(this.model)) |
| | |
| | | } |
| | | } |
| | | }, |
| | | computed: { |
| | | formDisabled() { |
| | | return this.disabled |
| | | } |
| | | }, |
| | | created() { |
| | | //å¤ä»½modelåå§å¼ |
| | | this.modelDefault = JSON.parse(JSON.stringify(this.model)) |
| | |
| | | //å è½½æ°æ® è¥ä¼ å
¥åæ°1åå 载第ä¸é¡µçå
容 |
| | | if (arg === 1) this.ipagination.current = 1 |
| | | var params = this.getQueryParams()//æ¥è¯¢æ¡ä»¶ |
| | | console.log('currentTreeNodeInfo', this.currentTreeNodeInfo) |
| | | params.attributionId = this.currentTreeNodeInfo.id |
| | | params.attributionType = this.currentTreeNodeInfo.type |
| | | params.docClassCode = 'NC' |
| | | if (!params) return false |
| | | this.dataSource = [] |
| | | this.loading = true |
| | | getAction(this.url.list + `/${this.ipagination.current}/${this.ipagination.pageSize}`, params).then((res) => { |
| | | if (res.success) { |
| | |
| | | //å è½½æ°æ® è¥ä¼ å
¥åæ°1åå 载第ä¸é¡µçå
容 |
| | | if (arg === 1) this.ipagination.current = 1 |
| | | var params = this.getQueryParams()//æ¥è¯¢æ¡ä»¶ |
| | | console.log('currentTreeNodeInfo', this.currentTreeNodeInfo) |
| | | params.attributionId = this.currentTreeNodeInfo.id |
| | | params.attributionType = this.currentTreeNodeInfo.type |
| | | params.docClassCode = 'OTHER' |
| | | if (!params) return false |
| | | this.dataSource = [] |
| | | this.loading = true |
| | | getAction(this.url.list + `/${this.ipagination.current}/${this.ipagination.pageSize}`, params).then((res) => { |
| | | if (res.success) { |
| | |
| | | this.visible = true |
| | | this.isAddNextLevel = true |
| | | this.$nextTick(() => { |
| | | this.$refs.realForm.add({ |
| | | productId: this.currentTreeNodeInfo.rfield, |
| | | componentId: this.currentTreeNodeInfo.id |
| | | }) |
| | | if (this.$refs.realForm) { |
| | | this.$refs.realForm.add({ |
| | | productId: this.currentTreeNodeInfo.entity.productId, |
| | | componentId: this.currentTreeNodeInfo.entity.componentId |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | |
| | |
| | | this.visible = true |
| | | this.isAddNextLevel = false |
| | | this.$nextTick(() => { |
| | | this.$refs.realForm.add({ |
| | | productId: this.currentTreeNodeInfo.rfield, |
| | | componentId: this.currentTreeNodeInfo.parentId |
| | | }) |
| | | if (this.$refs.realForm) { |
| | | this.$refs.realForm.add({ |
| | | productId: this.currentTreeNodeInfo.productId, |
| | | componentId: this.currentTreeNodeInfo.componentId |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | |
| | |
| | | this.visible = true |
| | | this.isAddNextLevel = false |
| | | this.$nextTick(() => { |
| | | this.$refs.realForm.edit({ id: this.currentTreeNodeInfo.id, ...this.currentTreeNodeInfo.entity }) |
| | | if (this.$refs.realForm) { |
| | | this.$refs.realForm.edit({ id: this.currentTreeNodeInfo.id, ...this.currentTreeNodeInfo.entity }) |
| | | } |
| | | }) |
| | | }, |
| | | |
| | |
| | | } |
| | | } |
| | | }, |
| | | computed: { |
| | | formDisabled() { |
| | | return this.disabled |
| | | } |
| | | }, |
| | | created() { |
| | | //å¤ä»½modelåå§å¼ |
| | | this.modelDefault = JSON.parse(JSON.stringify(this.model)) |
| | |
| | | <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.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> |
| | |
| | | return { |
| | | title: '', |
| | | width: 700, |
| | | visible: false |
| | | visible: false, |
| | | isAddNextLevel: false // æ¯å¦ä¸ºæ·»å ä¸çº§ï¼ä½ä¸ºæ èç¹æ¯å¦å±å¼ç夿 |
| | | } |
| | | }, |
| | | created() { |
| | |
| | | }, |
| | | methods: { |
| | | /** |
| | | * å建 |
| | | * @param modalTitle |
| | | * ç¹å»é¨ä»¶å建é¨ä»¶ä¸çº§å·¥åº |
| | | */ |
| | | handleComponentAddRelative(modalTitle) { |
| | | this.title = modalTitle |
| | | handleComponentAddRelative() { |
| | | this.isAddNextLevel = true |
| | | this.visible = true |
| | | this.$nextTick(() => { |
| | | this.$refs.realForm.add() |
| | | if (this.$refs.realForm) { |
| | | this.$refs.realForm.add({ |
| | | productId: this.currentTreeNodeInfo.entity.productId, |
| | | componentId: this.currentTreeNodeInfo.entity.componentId |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | handleProcessAdd(modalTitle) { |
| | | this.title = modalTitle |
| | | |
| | | /** |
| | | * ç¹å»é¶ä»¶å建é¶ä»¶ä¸çº§å·¥åº |
| | | */ |
| | | handlePartsAddRelative() { |
| | | this.isAddNextLevel = true |
| | | this.visible = true |
| | | this.$nextTick(() => { |
| | | this.$refs.realForm.add() |
| | | if (this.$refs.realForm) { |
| | | this.$refs.realForm.add({ |
| | | productId: this.currentTreeNodeInfo.entity.productId, |
| | | componentId: this.currentTreeNodeInfo.entity.componentId, |
| | | partsId: this.currentTreeNodeInfo.entity.partsId |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | handlePartsAddRelative(modalTitle) { |
| | | this.title = modalTitle |
| | | /** |
| | | * ç¹å»å·¥åºæ·»å åçº§å·¥åº |
| | | */ |
| | | handleProcessAdd() { |
| | | this.isAddNextLevel = false |
| | | this.visible = true |
| | | this.$nextTick(() => { |
| | | this.$refs.realForm.add() |
| | | if (this.$refs.realForm) { |
| | | this.$refs.realForm.add({ |
| | | productId: this.currentTreeNodeInfo.entity.productId, |
| | | componentId: this.currentTreeNodeInfo.entity.componentId, |
| | | partsId: this.currentTreeNodeInfo.entity.partsId |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | handleProcessEdit(modalTitle) { |
| | | this.title = modalTitle |
| | | /** |
| | | * ç¼è¾å·¥åºä¿¡æ¯ |
| | | */ |
| | | handleProcessEdit() { |
| | | this.isAddNextLevel = false |
| | | this.visible = true |
| | | this.$nextTick(() => { |
| | | this.$refs.realForm.edit(this.currentTreeNodeInfo.entity) |
| | | if (this.$refs.realForm) { |
| | | this.$refs.realForm.edit({ id: this.currentTreeNodeInfo.id, ...this.currentTreeNodeInfo.entity }) |
| | | } |
| | | }) |
| | | }, |
| | | |
| | |
| | | }, |
| | | |
| | | submitCallback() { |
| | | this.$emit('submitSuccess') |
| | | this.$emit('submitSuccess', this.isAddNextLevel) |
| | | this.visible = false |
| | | }, |
| | | |
| | |
| | | }, |
| | | |
| | | triggerCorrespondingMethod({ methodName, modalTitle }) { |
| | | if (this[methodName]) this[methodName](modalTitle) |
| | | if (this[methodName]) { |
| | | this[methodName]() |
| | | this.title = modalTitle |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | </a-col> |
| | | </a-row> |
| | | </a-form-model> |
| | | |
| | | <select-device-drawer ref="selectDeviceDrawer" @selectFinished="selectOK" :title="'éæ©è®¾å¤'"/> |
| | | </a-spin> |
| | | </template> |
| | | |
| | | <script> |
| | | import { httpAction, getAction } from '@/api/manage' |
| | | import SelectDeviceDrawer from '@/views/system/modules/SelectDeviceDrawer' |
| | | |
| | | export default { |
| | | name: 'ProcessModalForm', |
| | | components: { SelectDeviceDrawer }, |
| | | components: {}, |
| | | data() { |
| | | return { |
| | | model: { |
| | | passCount: 0 |
| | | processType: 0 |
| | | }, |
| | | labelCol: { |
| | | xs: { span: 24 }, |
| | |
| | | ] |
| | | }, |
| | | url: { |
| | | add: '/mdc/mdcPartProcessInfo/add', |
| | | edit: '/mdc/mdcPartProcessInfo/edit' |
| | | add: '/nc/stream/process/add', |
| | | edit: '/nc/stream/process/edit' |
| | | } |
| | | } |
| | | }, |
| | | computed: { |
| | | formDisabled() { |
| | | return this.disabled |
| | | } |
| | | }, |
| | | created() { |
| | |
| | | this.modelDefault = JSON.parse(JSON.stringify(this.model)) |
| | | }, |
| | | methods: { |
| | | add() { |
| | | this.edit(this.modelDefault) |
| | | add(params) { |
| | | this.edit({ ...this.modelDefault, ...params }) |
| | | }, |
| | | edit(record) { |
| | | this.model = Object.assign({}, { equipmentIds: record.equipmentId }, record) |
| | | this.model = Object.assign({}, record) |
| | | console.log('model', this.model) |
| | | this.visible = true |
| | | }, |
| | | submitForm() { |
| | | const that = this |
| | |
| | | if (valid) { |
| | | that.confirmLoading = true |
| | | let httpUrl = '' |
| | | let method = 'post' |
| | | let method = '' |
| | | if (!this.model.id) { |
| | | httpUrl += this.url.add |
| | | method = 'post' |
| | | } else { |
| | | httpUrl += this.url.edit |
| | | httpUrl += this.url.edit + `/${this.model.id}` |
| | | method = 'put' |
| | | } |
| | | httpAction(httpUrl, this.model, method).then((res) => { |
| | | if (res.success) { |
| | |
| | | } |
| | | |
| | | }) |
| | | }, |
| | | deviceSearch() { |
| | | this.$refs.selectDeviceDrawer.visible = true |
| | | this.$refs.selectDeviceDrawer.selectedRowKeys = [] |
| | | this.$refs.selectDeviceDrawer.selectedRows = [] |
| | | this.$refs.selectDeviceDrawer.checkedKeys = this.model.equipmentIds ? this.model.equipmentIds.split(',') : [] |
| | | }, |
| | | /** |
| | | * 鿩已æè®¾å¤åç¹å»ç¡®å®æ¶è§¦å |
| | | * @param data 已鿩çè®¾å¤ |
| | | */ |
| | | selectOK(data) { |
| | | this.$set(this.model, 'equipmentIds', data.join(',')) |
| | | if (this.model.equipmentIds) this.$refs.form.clearValidate('equipmentIds') |
| | | } |
| | | } |
| | | } |
| | |
| | | <template> |
| | | <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.stepName}}</a-descriptions-item> |
| | | <a-descriptions-item label="å·¥æ¥å·">{{currentLevelDetails.stepCode}}</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.stepType}}</a-descriptions-item> |
| | | <a-descriptions-item label="å 工设å¤ç¼å·">{{currentLevelDetails.deviceNo}}</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> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <j-modal |
| | | :title="title" |
| | | :width="width" |
| | | :visible="visible" |
| | | switchFullscreen |
| | | :maskClosable="false" |
| | | @ok="handleOk" |
| | | @cancel="handleCancel" |
| | | cancelText="å
³é"> |
| | | <ProcessStepModalForm ref="realForm" @ok="submitCallback"/> |
| | | </j-modal> |
| | | </template> |
| | | |
| | | <script> |
| | | import ProcessStepModalForm from './ProcessStepModalForm.vue' |
| | | |
| | | export default { |
| | | name: 'ProcessStepModal', |
| | | components: { |
| | | ProcessStepModalForm |
| | | }, |
| | | props: { |
| | | currentTreeNodeInfo: { |
| | | type: Object |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | title: '', |
| | | width: 700, |
| | | visible: false, |
| | | isAddNextLevel: false // æ¯å¦ä¸ºæ·»å ä¸çº§ï¼ä½ä¸ºæ èç¹æ¯å¦å±å¼ç夿 |
| | | } |
| | | }, |
| | | created() { |
| | | this.$bus.$on('treeMenuItemMethodTrigger', this.triggerCorrespondingMethod) |
| | | }, |
| | | methods: { |
| | | /** |
| | | * ç¹å»å·¥åºå建工åºä¸çº§å·¥æ¥ |
| | | */ |
| | | handleProcessAddChild() { |
| | | this.isAddNextLevel = true |
| | | this.visible = true |
| | | this.$nextTick(() => { |
| | | if (this.$refs.realForm) { |
| | | this.$refs.realForm.add({ |
| | | productId: this.currentTreeNodeInfo.entity.productId, |
| | | componentId: this.currentTreeNodeInfo.entity.componentId, |
| | | partsId: this.currentTreeNodeInfo.entity.partsId, |
| | | processId: this.currentTreeNodeInfo.entity.processId |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | |
| | | /** |
| | | * ç¹å»å·¥æ¥æ·»å åçº§å·¥æ¥ |
| | | */ |
| | | handleProcessStepAdd() { |
| | | this.isAddNextLevel = false |
| | | this.visible = true |
| | | this.$nextTick(() => { |
| | | if (this.$refs.realForm) { |
| | | this.$refs.realForm.add({ |
| | | productId: this.currentTreeNodeInfo.entity.productId, |
| | | componentId: this.currentTreeNodeInfo.entity.componentId, |
| | | partsId: this.currentTreeNodeInfo.entity.partsId, |
| | | processId: this.currentTreeNodeInfo.entity.processId |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | /** |
| | | * ç¼è¾å·¥åºä¿¡æ¯ |
| | | */ |
| | | handleProcessStepEdit() { |
| | | this.isAddNextLevel = false |
| | | this.visible = true |
| | | this.$nextTick(() => { |
| | | if (this.$refs.realForm) { |
| | | this.$refs.realForm.edit({ id: this.currentTreeNodeInfo.id, ...this.currentTreeNodeInfo.entity }) |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | handleOk() { |
| | | this.$refs.realForm.submitForm() |
| | | }, |
| | | |
| | | submitCallback() { |
| | | this.$emit('submitSuccess', this.isAddNextLevel) |
| | | this.visible = false |
| | | }, |
| | | |
| | | handleCancel() { |
| | | this.$emit('close') |
| | | this.visible = false |
| | | }, |
| | | |
| | | triggerCorrespondingMethod({ methodName, modalTitle }) { |
| | | if (this[methodName]) { |
| | | this[methodName]() |
| | | this.title = modalTitle |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </script> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <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="stepCode"> |
| | | <a-input v-model="model.stepCode" placeholder="请è¾å
¥å·¥åºå·"></a-input> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="å·¥æ¥åç§°" prop="stepName"> |
| | | <a-input v-model="model.stepName" 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-select v-model="model.deviceNo" placeholder="è¯·éæ©å 工设å¤ç¼å·"></a-select> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | |
| | | <a-row> |
| | | <a-col :span="12"> |
| | | <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="å·¥èºè§ç¨çæ¬"> |
| | | <a-input v-model="model.craftVersion" 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.stepType" placeholder="请è¾å
¥å·¥æ¥ç±»å"></a-input> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="å·¥æ¥æè¿°"> |
| | | <a-input v-model="model.description" 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.assembleNo" placeholder="请è¾å
¥å·¥è£
ç¼å·"></a-input> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="å·¥è£
åç§°"> |
| | | <a-input v-model="model.assembleName" placeholder="请è¾å
¥å·¥è£
åç§°"></a-input> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | </a-form-model> |
| | | </a-spin> |
| | | </template> |
| | | |
| | | <script> |
| | | import { httpAction } from '@/api/manage' |
| | | |
| | | export default { |
| | | name: 'ProcessStepModalForm', |
| | | components: {}, |
| | | data() { |
| | | return { |
| | | model: { |
| | | stepType: 0 |
| | | }, |
| | | 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: { |
| | | stepCode: [ |
| | | { required: true, message: '请è¾å
¥å·¥æ¥å·!' } |
| | | ], |
| | | stepName: [ |
| | | { required: true, message: '请è¾å
¥å·¥æ¥åç§°!' } |
| | | ] |
| | | }, |
| | | url: { |
| | | add: '/nc/workStep/add', |
| | | edit: '/nc/workStep/edit' |
| | | } |
| | | } |
| | | }, |
| | | created() { |
| | | //å¤ä»½modelåå§å¼ |
| | | this.modelDefault = JSON.parse(JSON.stringify(this.model)) |
| | | }, |
| | | methods: { |
| | | add(params) { |
| | | this.edit({ ...this.modelDefault, ...params }) |
| | | }, |
| | | edit(record) { |
| | | this.model = Object.assign({}, record) |
| | | console.log('model', this.model) |
| | | }, |
| | | submitForm() { |
| | | const that = this |
| | | // 触å表åéªè¯ |
| | | this.$refs.form.validate(valid => { |
| | | if (valid) { |
| | | that.confirmLoading = true |
| | | let httpUrl = '' |
| | | let method = '' |
| | | if (!this.model.id) { |
| | | httpUrl += this.url.add |
| | | method = 'post' |
| | | } else { |
| | | httpUrl += this.url.edit + `/${this.model.id}` |
| | | method = 'put' |
| | | } |
| | | 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> |
| | |
| | | return { |
| | | title: '', |
| | | width: 500, |
| | | visible: false, |
| | | visible: false |
| | | } |
| | | }, |
| | | created() { |
| | |
| | | handleProductAdd() { |
| | | this.visible = true |
| | | this.$nextTick(() => { |
| | | this.$refs.realForm.add() |
| | | if (this.$refs.realForm) this.$refs.realForm.add() |
| | | }) |
| | | }, |
| | | |
| | |
| | | handleProductEdit() { |
| | | this.visible = true |
| | | this.$nextTick(() => { |
| | | this.$refs.realForm.edit({ id: this.currentTreeNodeInfo.id, ...this.currentTreeNodeInfo.entity }) |
| | | if (this.$refs.realForm) { |
| | | this.$refs.realForm.edit({ id: this.currentTreeNodeInfo.id, ...this.currentTreeNodeInfo.entity }) |
| | | } |
| | | }) |
| | | }, |
| | | |
| | |
| | | } |
| | | } |
| | | }, |
| | | computed: { |
| | | formDisabled() { |
| | | return this.disabled |
| | | } |
| | | }, |
| | | created() { |
| | | //å¤ä»½modelåå§å¼ |
| | | this.modelDefault = JSON.parse(JSON.stringify(this.model)) |
| | |
| | | <PartInfo :currentLevelDetails="currentLevelInfo.entity" :size="descriptionsContainerSize"/> |
| | | </a-tab-pane> |
| | | |
| | | <a-tab-pane :key="1" tab="å·¥åºå±æ§" v-if="currentLevelInfo.type===4"> |
| | | <ProcessInfo :currentLevelDetails="currentLevelInfo" :size="descriptionsContainerSize"/> |
| | | <a-tab-pane :key="1" tab="å·¥åºå±æ§" v-if="currentLevelInfo.type===5"> |
| | | <ProcessInfo :currentLevelDetails="currentLevelInfo.entity" :size="descriptionsContainerSize"/> |
| | | </a-tab-pane> |
| | | |
| | | <a-tab-pane :key="1" tab="å·¥æ¥å±æ§" v-if="currentLevelInfo.type===5"> |
| | | <ProcessStepInfo :currentLevelDetails="currentLevelInfo" :size="descriptionsContainerSize"/> |
| | | <a-tab-pane :key="1" tab="å·¥æ¥å±æ§" v-if="currentLevelInfo.type===6"> |
| | | <ProcessStepInfo :currentLevelDetails="currentLevelInfo.entity" :size="descriptionsContainerSize"/> |
| | | </a-tab-pane> |
| | | |
| | | <template v-if="currentLevelInfo.hasOwnProperty('attributionType')"> |
| | |
| | | <template> |
| | | <a-tabs v-model="activeTabKey" @change="handleTabChange" @contextmenu.native="e=>e.preventDefault()" |
| | | <a-tabs v-model="activeTabKey" @contextmenu.native="e=>e.preventDefault()" |
| | | v-if="Object.keys(currentTreeNodeInfo).length!==0"> |
| | | <a-tab-pane :key="1" tab="NCææ¡£" v-if="currentTreeNodeInfo.type!==1"> |
| | | <a-tab-pane :key="1" tab="NCææ¡£" v-if="currentTreeNodeInfo.type===5||currentTreeNodeInfo.type===6"> |
| | | <NcDocumentTableList ref="ncDocumentTableListRef" :currentTreeNodeInfo="currentTreeNodeInfo" |
| | | @handleTableContextMenuOpen="handleTableContextMenuOpen" :size="tableContainerSize"/> |
| | | </a-tab-pane> |
| | | |
| | | <a-tab-pane :key="2" tab="å
¶ä»ææ¡£"> |
| | | <a-tab-pane :key="1" tab="å
¶ä»ææ¡£" v-else> |
| | | <OtherDocumentTableList ref="otherDocumentTableListRef" :currentTreeNodeInfo="currentTreeNodeInfo" |
| | | @handleTableContextMenuOpen="handleTableContextMenuOpen" :size="tableContainerSize"/> |
| | | </a-tab-pane> |
| | |
| | | components: { TableContextMenu, OtherDocumentTableList, NcDocumentTableList }, |
| | | data() { |
| | | return { |
| | | activeTabKey: null, |
| | | hasLoadingDataTabKey: [], |
| | | activeTabKey: 1, |
| | | tableContainerSize: 'small', |
| | | currentRightClickedTableRowInfo: {}, |
| | | currentTreeNodeInfo: {} |
| | |
| | | }, |
| | | created() { |
| | | this.$bus.$on('sendCurrentTreeNodeInfo', this.receiveCurrentTreeNodeInfo) |
| | | }, |
| | | watch: { |
| | | activeTabKey: { |
| | | handler(value) { |
| | | // tab忢æ¶å è½½å¯¹åºææ¡£å表ï¼å½åæ èç¹ä¸å·²ç»å è½½è¿çææ¡£å表ä¸åéå¤å è½½ |
| | | if (!this.hasLoadingDataTabKey.includes(value)) { |
| | | if (value === 1) this.$nextTick(() => this.$refs.ncDocumentTableListRef.loadData(1)) |
| | | else this.$nextTick(() => this.$refs.otherDocumentTableListRef.loadData(1)) |
| | | this.hasLoadingDataTabKey.push(value) |
| | | } |
| | | }, |
| | | deep: true |
| | | } |
| | | this.$bus.$on('importFileSuccess', this.reloadDocumentListData) |
| | | }, |
| | | methods: { |
| | | /** |
| | |
| | | // 仿 ç»ä»¶æ¥åæ èç¹ä¿¡æ¯åä»ç¶ç»ä»¶æµå
¥åç»ä»¶ |
| | | this.currentTreeNodeInfo = treeNodeInfo |
| | | // æ¸
空ä¸ä¸èç¹å·²ç»å è½½è¿å¾ææ¡£å表tabKey |
| | | this.hasLoadingDataTabKey = [] |
| | | if (treeNodeInfo.type !== 1) { |
| | | this.activeTabKey = 1 |
| | | this.$nextTick(() => this.$refs.ncDocumentTableListRef.loadData(1)) |
| | | if (treeNodeInfo.type === 5 || treeNodeInfo.type === 6) { |
| | | this.$nextTick(() => { |
| | | if (this.$refs.ncDocumentTableListRef) this.$refs.ncDocumentTableListRef.loadData(1) |
| | | }) |
| | | } else { |
| | | this.activeTabKey = 2 |
| | | this.$nextTick(() => this.$refs.otherDocumentTableListRef.loadData(1)) |
| | | this.$nextTick(() => { |
| | | if (this.$refs.otherDocumentTableListRef) this.$refs.otherDocumentTableListRef.loadData(1) |
| | | }) |
| | | } |
| | | this.hasLoadingDataTabKey.push(this.activeTabKey) |
| | | }, |
| | | |
| | | handleTabChange(activeTabKey) { |
| | | // tab忢æ¶å è½½å¯¹åºææ¡£å表ï¼å½åæ èç¹ä¸å·²ç»å è½½è¿çææ¡£å表ä¸åéå¤å è½½ |
| | | if (!this.hasLoadingDataTabKey.includes(activeTabKey)) { |
| | | if (activeTabKey === 1) this.$nextTick(() => this.$refs.ncDocumentTableListRef.loadData(1)) |
| | | else this.$nextTick(() => this.$refs.otherDocumentTableListRef.loadData(1)) |
| | | this.hasLoadingDataTabKey.push(activeTabKey) |
| | | /** |
| | | * ä¸ä¼ æä»¶æåå触å |
| | | * @param docClassCode ææ¡£ç±»å« |
| | | * @param attributionId èç¹Id |
| | | */ |
| | | reloadDocumentListData({ docClassCode, attributionId }) { |
| | | // 妿ä¸ä¼ çææ¡£ä¸æ¯æå±äºå½åæå±ç¤ºèç¹çææ¡£åä¸éæ°è·åææ¡£å表 |
| | | if (this.currentTreeNodeInfo.id !== attributionId) return |
| | | if (docClassCode === 'NC') { |
| | | if (this.$refs.ncDocumentTableListRef) this.$refs.ncDocumentTableListRef.loadData(1) |
| | | } else { |
| | | if (this.$refs.otherDocumentTableListRef) this.$refs.otherDocumentTableListRef.loadData(1) |
| | | } |
| | | }, |
| | | |
ÎļþÃû´Ó src/views/dnc/common/ProductStructureTree.vue ÐÞ¸Ä |
| | |
| | | <a-card class="tree_con" :loading="cardLoading" :bordered="false" @contextmenu.native="e=>e.preventDefault()"> |
| | | <a-spin :spinning="loading"> |
| | | <div style="display: flex;flex-direction: column;height: 100%"> |
| | | |
| | | <div style="display: flex"> |
| | | <a-input placeholder="è¾å
¥å
³é®åè¿è¡æç´¢" allowClear v-model="searchInput" |
| | | @change="handleSearchInputChange"/> |
| | |
| | | </div> |
| | | |
| | | <!--产åç»ææ --> |
| | | <div style="flex: 1;overflow:auto;margin-top: 10px"> |
| | | <div class="" style="flex: 1;overflow:auto;margin-top: 10px"> |
| | | <a-tree ref="tree" show-icon :checkStrictly="checkStrictly" :expandedKeys.sync="expandedKeys" |
| | | :selectedKeys="selectedKeys" :treeData="treeDataSource" :autoExpandParent="autoExpandParent" |
| | | @select="handleTreeSelect" @expand="handleTreeExpand" @rightClick="handleTreeRightClick"> |
| | |
| | | <PartModal :currentTreeNodeInfo="rightClickSelected" @submitSuccess="modalFormSubmitSuccess"/> |
| | | <!--å·¥åºå¼¹çª--> |
| | | <ProcessModal :currentTreeNodeInfo="rightClickSelected" @submitSuccess="modalFormSubmitSuccess"/> |
| | | <!--å·¥æ¥å¼¹çª--> |
| | | <ProcessStepModal :currentTreeNodeInfo="rightClickSelected" @submitSuccess="modalFormSubmitSuccess"/> |
| | | </a-card> |
| | | </template> |
| | | |
| | | <script> |
| | | import dncApi from '@/api/dnc' |
| | | import { deleteAction } from '@/api/manage' |
| | | import ProductStructureTreeContextMenu from './modules/ProductStructureTree/ProductStructureTreeContextMenu' |
| | | import ProductModal from '../base/modules/ProductStructure/Product/ProductModal' |
| | | import ComponentModal from '../base/modules/ProductStructure/Component/ComponentModal' |
| | | import PartModal from '../base/modules/ProductStructure/Part/PartModal' |
| | | import ProcessModal from '../base/modules/ProductStructure/Process/ProcessModal' |
| | | import ProductStructureTreeContextMenu from './ProductStructureTreeContextMenu' |
| | | import ProductModal from './Product/ProductModal' |
| | | import ComponentModal from './Component/ComponentModal' |
| | | import PartModal from './Part/PartModal' |
| | | import ProcessModal from './Process/ProcessModal' |
| | | import ProcessStepModal from './ProcessStep/ProcessStepModal' |
| | | |
| | | export default { |
| | | name: 'ProductStructureTree', |
| | | components: { |
| | | ProcessStepModal, |
| | | ProcessModal, |
| | | PartModal, |
| | | ComponentModal, |
| | |
| | | case 3: |
| | | treeNode.slots = { icon: 'part' } |
| | | break |
| | | case 4: |
| | | case 5: |
| | | treeNode.slots = { icon: 'process' } |
| | | break |
| | | case 5: |
| | | case 6: |
| | | treeNode.slots = { icon: 'processStep' } |
| | | break |
| | | default: |
| | |
| | | </script> |
| | | |
| | | <style lang="less" scoped> |
| | | |
| | | /deep/ .ant-card-body { |
| | | padding: 0 12px 0 0; |
| | | } |
| | |
| | | width: calc(100% - 24px) !important; |
| | | } |
| | | |
| | | .tree_con { |
| | | overflow: hidden; |
| | | ::-webkit-scrollbar { |
| | | width: 8px; |
| | | } |
| | | |
| | | @media screen and (min-width: 1920px) { |
ÎļþÃû´Ó src/views/dnc/common/modules/ProductStructureTree/ProductStructureTreeContextMenu.vue ÐÞ¸Ä |
| | |
| | | <template #overlay> |
| | | <a-menu @click="({ key: menuKey }) => onContextMenuClick(treeParams.treeKey, menuKey)" |
| | | @contextmenu="event=>event.preventDefault()"> |
| | | <template v-for="item in defaultContextMenuList[getCurrentMenuLevel]"> |
| | | <a-menu-item :key="item.code" v-if="item.show"> |
| | | <a-icon :type="item.icon"/> |
| | | {{item.label}} |
| | | </a-menu-item> |
| | | </template> |
| | | <a-menu-item v-for="item in defaultContextMenuList[getCurrentMenuLevel]" :key="item.code" v-has="item.code"> |
| | | <a-icon :type="item.icon"/> |
| | | {{item.label}} |
| | | </a-menu-item> |
| | | </a-menu> |
| | | </template> |
| | | </a-dropdown> |
| | |
| | | //å·¥åº |
| | | process: [ |
| | | { show: true, label: 'å建工åº', code: 'process_add', icon: 'plus', isCommonMethod: false }, |
| | | { show: true, label: 'å建工æ¥', code: 'process_add_child', icon: 'plus', isCommonMethod: false }, |
| | | { show: true, label: 'ç¼è¾å·¥åºä¿¡æ¯', code: 'process_edit', icon: 'edit', isCommonMethod: false }, |
| | | { show: true, label: 'å é¤', code: 'process_delete', icon: 'delete', isCommonMethod: true }, |
| | | { show: false, label: '导åºNCç¨åº', code: 'process_export', icon: 'import', isCommonMethod: true }, |
| | | { show: true, label: '导å
¥NCç¨åº', code: 'process_import', icon: 'export', isCommonMethod: true } |
| | | ], |
| | | //å·¥æ¥ |
| | | processStep: [ |
| | | { show: true, label: 'å建工æ¥', code: 'processStep_add', icon: 'plus', isCommonMethod: false }, |
| | | { show: true, label: 'ç¼è¾å·¥æ¥ä¿¡æ¯', code: 'processStep_edit', icon: 'edit', isCommonMethod: false }, |
| | | { show: true, label: 'å é¤', code: 'processStep_delete', icon: 'delete', isCommonMethod: true }, |
| | | { show: false, label: '导åºNCç¨åº', code: 'processStep_export', icon: 'import', isCommonMethod: true }, |
| | | { show: true, label: '导å
¥NCç¨åº', code: 'processStep_import', icon: 'export', isCommonMethod: true } |
| | | ] |
| | | } |
| | | } |
| | |
| | | return 'component' |
| | | case 3: |
| | | return 'part' |
| | | case 4: |
| | | return 'process' |
| | | case 5: |
| | | return 'process' |
| | | case 6: |
| | | return 'processStep' |
| | | } |
| | | } |
| | |
| | | methods: { |
| | | onContextMenuClick(treeKey, menuKey) { |
| | | const level = this.getCurrentMenuLevel |
| | | console.log('level---------------------', level) |
| | | const menuKeyArray = menuKey.split('_') |
| | | const isCommonMethod = this.defaultContextMenuList[level].find(item => item.code === menuKey).isCommonMethod |
| | | // product_add => handleAdd 触å对åºç»ä»¶äºä»¶ |
| | |
| | | methodName = 'handle' + menuKeyArray.map(item => item[0].toUpperCase() + item.slice(1)).join('') |
| | | } |
| | | console.log('methodName------------------------------------', methodName) |
| | | console.log('treeParams------------------------------------', this.treeParams) |
| | | const modalTitle = this.defaultContextMenuList[level].find(item => item.code === menuKey).label |
| | | this.$bus.$emit('treeMenuItemMethodTrigger', { methodName, modalTitle }) |
| | | this.$bus.$emit('treeMenuItemMethodTrigger', { methodName, modalTitle, treeNodeInfo: this.treeParams }) |
| | | } |
| | | } |
| | | } |
| | |
| | | <template> |
| | | <a-modal :title="title" :visible="visible" @cancel="handleModalClose" :maskClosable="false"> |
| | | <a-upload :multiple="true" :file-list="fileList" :remove="handleRemove" :before-upload="beforeUpload"> |
| | | <a-button type="primary"> |
| | | <a-button type="primary" :disabled="uploading"> |
| | | <a-icon type="import"/> |
| | | éåæä»¶ |
| | | </a-button> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import dncApi from '@/api/dnc' |
| | | |
| | | export default { |
| | | name: 'ImportFileModal', |
| | | components: {}, |
| | |
| | | visible: false, |
| | | title: '', |
| | | fileList: [], |
| | | uploadParams: {}, |
| | | uploading: false |
| | | } |
| | | }, |
| | |
| | | this.$bus.$on('tableMenuItemMethodTrigger', this.triggerCorrespondingMethod) |
| | | }, |
| | | methods: { |
| | | handleImport(modalTitle) { |
| | | this.handleModalOpen(modalTitle) |
| | | /** |
| | | * ç¹å»å¯¼å
¥ææ¡£æNCç¨åºæ¶è§¦å |
| | | * @param treeNodeInfo ç¹å»æ èç¹å³é®èå导å
¥ç¨åºæ¶ä¼ å
¥æ èç¹ä¿¡æ¯ |
| | | * @param tableRowInfo ç¹å»è¡¨æ ¼è¡å³é®èå导å
¥ç¨åºæ¶ä¼ å
¥è¡ä¿¡æ¯ |
| | | */ |
| | | handleImport(treeNodeInfo, tableRowInfo) { |
| | | let attributionId // ææ¡£æå±å±çº§Id |
| | | let attributionType // ææ¡£æå±å±çº§ç±»å |
| | | let docClassCode // ææ¡£ç±»å |
| | | if (treeNodeInfo) { |
| | | attributionId = treeNodeInfo.treeKey |
| | | attributionType = treeNodeInfo.type |
| | | } else { |
| | | attributionId = tableRowInfo.attributionId |
| | | attributionType = tableRowInfo.attributionType |
| | | } |
| | | if (attributionType === 5 || attributionType === 6) docClassCode = 'NC' |
| | | else docClassCode = 'OTHER' |
| | | this.uploadParams = Object.assign({}, { attributionId, attributionType, docClassCode }) |
| | | this.visible = true |
| | | }, |
| | | |
| | | handleRemove(file) { |
| | |
| | | }, |
| | | |
| | | beforeUpload(file) { |
| | | this.fileList = [...this.fileList, file] |
| | | if (!this.fileList.find(item => item.name === file.name)) this.fileList = [...this.fileList, file] |
| | | return false |
| | | }, |
| | | |
| | | handleUpload() { |
| | | const { fileList } = this |
| | | const formData = new FormData() |
| | | fileList.forEach(file => { |
| | | formData.append('files[]', file) |
| | | }) |
| | | const { fileList, $notification } = this |
| | | this.uploading = true |
| | | |
| | | // You can use any AJAX library you like |
| | | request({ |
| | | url: 'https://www.mocky.io/v2/5cc8019d300000980a055e76', |
| | | method: 'post', |
| | | processData: false, |
| | | data: formData, |
| | | success: () => { |
| | | this.fileList = [] |
| | | this.uploading = false |
| | | this.$message.success('upload successfully.') |
| | | }, |
| | | error: () => { |
| | | this.uploading = false |
| | | this.$message.error('upload failed.') |
| | | } |
| | | let uploadedFileCount = 0 |
| | | let uploadSuccessFileCount = 0 |
| | | fileList.forEach((file, index) => { |
| | | const formData = new FormData() |
| | | formData.append('file', file) |
| | | file.status = 'uploading' |
| | | dncApi.importDocumentFromLocalApi(this.uploadParams, formData) |
| | | .then(res => { |
| | | if (res.success) { |
| | | file.status = 'done' |
| | | uploadSuccessFileCount++ |
| | | $notification.success({ |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }) |
| | | } else { |
| | | file.status = 'error' |
| | | $notification.error({ |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }) |
| | | } |
| | | }) |
| | | .catch(err => { |
| | | file.status = 'error' |
| | | }) |
| | | .finally(() => { |
| | | uploadedFileCount++ |
| | | fileList.splice(index, 1, file) |
| | | if (uploadedFileCount === fileList.length) { |
| | | if (uploadSuccessFileCount > 0) this.$bus.$emit('importFileSuccess', this.uploadParams) |
| | | this.uploading = false |
| | | } |
| | | }) |
| | | }) |
| | | }, |
| | | |
| | | /** |
| | | * æ§å¶æä»¶ä¸ä¼ çªå£å¼å¯å¹¶è®¾ç½®çªå£æ é¢ |
| | | * @param modalTitle çªå£æ é¢ |
| | | */ |
| | | handleModalOpen(modalTitle) { |
| | | this.title = modalTitle |
| | | this.visible = true |
| | | }, |
| | | |
| | | /** |
| | |
| | | this.fileList = [] |
| | | }, |
| | | |
| | | triggerCorrespondingMethod({ methodName, modalTitle }) { |
| | | if (this[methodName]) this[methodName](modalTitle) |
| | | triggerCorrespondingMethod({ methodName, modalTitle, treeNodeInfo, tableRowInfo }) { |
| | | if (this[methodName]) { |
| | | this[methodName](treeNodeInfo, tableRowInfo) |
| | | this.title = modalTitle |
| | | |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | defaultContextMenuList: { |
| | | //ææ¡£ |
| | | document: [ |
| | | { show: true, label: 'ç¼è¾ææ¡£ä¿¡æ¯', code: 'document_edit', subMenu: [], icon: 'edit', isCommonMethod: false }, |
| | | { label: 'ç¼è¾ææ¡£ä¿¡æ¯', code: 'document_edit', subMenu: [], icon: 'edit', isCommonMethod: false }, |
| | | { label: 'ææ´¾å°è®¾å¤', code: 'document_assign', subMenu: [], icon: 'cluster', isCommonMethod: false }, |
| | | { label: '导åºNCç¨åº', code: 'document_export', subMenu: [], icon: 'export', isCommonMethod: true }, |
| | | { label: '导å
¥NCç¨åº', code: 'document_import', subMenu: [], icon: 'import', isCommonMethod: true }, |
| | | { label: 'ä¸è½½', code: 'document_download', subMenu: [], icon: 'download', isCommonMethod: true }, |
| | | { label: 'å é¤', code: 'document_delete', subMenu: [], icon: 'delete', isCommonMethod: true }, |
| | | { label: 'æ¹éå é¤', code: 'document_batch_remove', subMenu: [], icon: 'delete', 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', 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 } |
| | | { label: 'åºåº', code: 'document_pull', icon: 'export', isCommonMethod: false }, |
| | | { label: 'åæ¶åºåº', code: 'document_cancel_pull', icon: 'stop', isCommonMethod: false }, |
| | | { label: 'å
¥åº', code: 'document_push', icon: 'import', isCommonMethod: true }, |
| | | { label: 'åå¸', code: 'document_publish', icon: 'flag', isCommonMethod: false }, |
| | | { label: 'éæ°åå¸', code: 'document_republish', icon: 'reload', isCommonMethod: false }, |
| | | { label: '彿¡£', code: 'document_pigeonhole', icon: 'database', isCommonMethod: false } |
| | | ], |
| | | icon: 'hourglass' |
| | | } |
| | | ], |
| | | //æä»¶ |
| | | file: [ |
| | | { label: 'æå®å½åçæ¬', code: 'file_assign', isCommonMethod: false },//æä»¶-æå®å½åçæ¬ |
| | | { label: 'æ¯å¯¹', code: 'file_add_relative', isCommonMethod: false }//æ¯å¯¹ |
| | | ] |
| | | } |
| | | } |
| | | }, |
| | | computed: { |
| | | getCurrentDocumentType() { |
| | | if (this.tableRowInfo.attributionType === 5 || this.tableRowInfo.attributionType === 6) return 'NC' |
| | | else return 'OTHER' |
| | | } |
| | | }, |
| | | methods: { |
| | | menuItemClick({ item, key }) { |
| | | const menuKeyArray = key.split('_') |