From 52d772dfea526a4b3d8b6a6f0746884efccbb706 Mon Sep 17 00:00:00 2001 From: zhaowei <zhaowei> Date: 星期五, 11 四月 2025 14:22:09 +0800 Subject: [PATCH] 1、调整全局domianUrl为/jeecg-boot 2、设备台账页面实现查询设备对应点检工单功能 3、工作流我的待办设备维修分类详情弹窗布局及功能逻辑调整 4、工作流我的待办页面表格样式调整 --- src/views/eam/maintenance/EamInspectionOrderList.vue | 582 ++++++++++---------- src/views/eam/maintenance/modules/EamInspectionOrderModalXq.vue | 2 src/views/flowable/workflow/repairOrder/RepairOrderApprovalModal.vue | 507 +++++++++--------- src/config/index.js | 2 src/views/eam/repair/EamRepairOrderList.vue | 71 - src/views/eam/maintenance/modules/EamInspectionOrderModal.vue | 1 src/views/flowable/workflow/FlowTodo.vue | 486 ++++++++-------- src/views/eam/equipment/EamEquipmentList.vue | 5 8 files changed, 817 insertions(+), 839 deletions(-) diff --git a/src/config/index.js b/src/config/index.js index 5a274be..ad4f310 100644 --- a/src/config/index.js +++ b/src/config/index.js @@ -2,7 +2,7 @@ import Vue from 'vue' //璁剧疆鍏ㄥ眬API_BASE_URL Vue.prototype.API_BASE_URL = window._CONFIG.VUE_APP_API_BASE_URL?window._CONFIG.VUE_APP_API_BASE_URL:process.env.VUE_APP_API_BASE_URL -window._CONFIG['domianURL'] = Vue.prototype.API_BASE_URL +window._CONFIG['domianURL'] = '/jeecg-boot' //鍗曠偣鐧诲綍鍦板潃 window._CONFIG['casPrefixUrl'] = window._CONFIG.VUE_APP_CAS_BASE_URL?window._CONFIG.VUE_APP_CAS_BASE_URL:process.env.VUE_APP_CAS_BASE_URL window._CONFIG['onlinePreviewDomainURL'] = window._CONFIG.VUE_APP_ONLINE_BASE_URL?window._CONFIG.VUE_APP_ONLINE_BASE_URL:process.env.VUE_APP_ONLINE_BASE_URL diff --git a/src/views/eam/equipment/EamEquipmentList.vue b/src/views/eam/equipment/EamEquipmentList.vue index 4dc9dda..1d7ca59 100644 --- a/src/views/eam/equipment/EamEquipmentList.vue +++ b/src/views/eam/equipment/EamEquipmentList.vue @@ -173,6 +173,9 @@ <a-tab-pane tab="缁翠慨宸ュ崟" :key="2"> <eam-repair-order-list ref="tabPaneTableListRef2" :isDisplayOperation="false"/> </a-tab-pane> + <a-tab-pane tab="鐐规宸ュ崟" :key="3"> + <eam-inspection-order-list ref="tabPaneTableListRef3" :isDisplayOperation="false"/> + </a-tab-pane> </a-tabs> <!-- 琛ㄥ崟鍖哄煙 --> @@ -194,11 +197,13 @@ import ResumeDrawer from '@views/eam/equipment/modules/ResumeDrawer.vue' import EamMaintenanceStandardList from '@views/eam/base/EamMaintenanceStandardList.vue' import EamRepairOrderList from '../repair/EamRepairOrderList' + import EamInspectionOrderList from '../maintenance/EamInspectionOrderList' export default { name: 'EamEquipmentList', mixins: [JeecgListMixin], components: { + EamInspectionOrderList, EamRepairOrderList, EamMaintenanceStandardList, ResumeDrawer, diff --git a/src/views/eam/maintenance/EamInspectionOrderList.vue b/src/views/eam/maintenance/EamInspectionOrderList.vue index 085ec74..f753dcd 100644 --- a/src/views/eam/maintenance/EamInspectionOrderList.vue +++ b/src/views/eam/maintenance/EamInspectionOrderList.vue @@ -1,7 +1,7 @@ <template> <a-card :bordered="false"> <!-- 鏌ヨ鍖哄煙 --> - <div class="table-page-search-wrapper"> + <div class="table-page-search-wrapper" v-if="isDisplayOperation"> <a-form layout="inline" @keyup.enter.native="searchQuery"> <a-row :gutter="24"> <a-col :xl="6" :lg="7" :md="8" :sm="24"> @@ -42,21 +42,30 @@ <!-- 鏌ヨ鍖哄煙-END --> <!-- 鎿嶄綔鎸夐挳鍖哄煙 --> - <div class="table-operator"> + <div class="table-operator" v-if="isDisplayOperation"> <a-button @click="handleAdd" type="primary" icon="plus">鏂板</a-button> <a-dropdown v-if="selectedRowKeys.length > 0"> <a-menu slot="overlay"> - <a-menu-item key="1" @click="batchZf(5)"><a-icon type="snippets"/>浣滃簾</a-menu-item> - <a-menu-item key="2" @click="batchLq(2)"><a-icon type="form"/>棰嗗彇</a-menu-item> + <a-menu-item key="1" @click="batchZf(5)"> + <a-icon type="snippets"/> + 浣滃簾 + </a-menu-item> + <a-menu-item key="2" @click="batchLq(2)"> + <a-icon type="form"/> + 棰嗗彇 + </a-menu-item> </a-menu> - <a-button style="margin-left: 8px"> 鎵归噺鎿嶄綔 <a-icon type="down" /></a-button> + <a-button style="margin-left: 8px"> 鎵归噺鎿嶄綔 + <a-icon type="down"/> + </a-button> </a-dropdown> </div> <!-- table鍖哄煙-begin --> <div> - <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> - <i class="anticon anticon-info-circle ant-alert-icon"></i> 宸查�夋嫨 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>椤� + <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;" v-if="isDisplayOperation"> + <i class="anticon anticon-info-circle ant-alert-icon"></i> 宸查�夋嫨 <a style="font-weight: 600">{{ + selectedRowKeys.length }}</a>椤� <a style="margin-left: 24px" @click="onClearSelected">娓呯┖</a> </div> @@ -79,7 +88,8 @@ </template> <template slot="imgSlot" slot-scope="text,record"> <span v-if="!text" style="font-size: 12px;font-style: italic;">鏃犲浘鐗�</span> - <img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/> + <img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" + style="max-width:80px;font-size: 12px;font-style: italic;"/> </template> <template slot="fileSlot" slot-scope="text"> <span v-if="!text" style="font-size: 12px;font-style: italic;">鏃犳枃浠�</span> @@ -95,31 +105,37 @@ </template> <span slot="action" slot-scope="text, record"> - <a v-if="record.inspectionStatus === '1'" @click="handleEdit(record)">缂栬緫</a> + <template v-if="record.inspectionStatus === '1'"> + <a @click="handleEdit(record)">缂栬緫</a> - <a-divider v-if="record.inspectionStatus === '1'" type="vertical" /> + <a-divider type="vertical"/> - <a-popconfirm v-if="record.inspectionStatus === '1'" title="纭畾棰嗗彇鍚�?" @confirm="() => handleInspection(record.id)"> + <a-popconfirm title="纭畾棰嗗彇鍚�?" + @confirm="() => handleInspection(record.id)"> <a>棰嗗彇</a> </a-popconfirm> - <a-divider v-if="record.inspectionStatus === '1'" type="vertical" /> + <a-divider type="vertical"/> <a-dropdown> - <a class="ant-dropdown-link">鏇村 <a-icon type="down" /></a> + <a class="ant-dropdown-link">鏇村 <a-icon type="down"/></a> <a-menu slot="overlay"> <a-menu-item> <a @click="handleDetail(record)">璇︽儏</a> </a-menu-item> - <a-menu-item v-if="record.inspectionStatus === '1'" > + <a-menu-item> <a-popconfirm title="纭畾浣滃簾鍚�?" @confirm="() => handleOrReceive(record.id)"> <a>浣滃簾</a> </a-popconfirm> </a-menu-item> </a-menu> </a-dropdown> - </span> + </template> + <template v-else> + <a @click="handleDetail(record)">璇︽儏</a> + </template> + </span> </a-table> </div> @@ -130,283 +146,277 @@ <script> -import '@/assets/less/TableExpand.less' -import { mixinDevice } from '@/utils/mixin' -import { JeecgListMixin } from '@/mixins/JeecgListMixin' -import EamInspectionOrderModal from './modules/EamInspectionOrderModal' -import EamInspectionOrderModalXq from './modules/EamInspectionOrderModalXq.vue' -import { deleteAction, getAction } from '@api/manage' + import '@/assets/less/TableExpand.less' + import { mixinDevice } from '@/utils/mixin' + import { JeecgListMixin } from '@/mixins/JeecgListMixin' + import EamInspectionOrderModal from './modules/EamInspectionOrderModal' + import EamInspectionOrderModalXq from './modules/EamInspectionOrderModalXq.vue' + import { deleteAction, getAction } from '@api/manage' -export default { - name: 'EamInspectionOrderList', - mixins:[JeecgListMixin, mixinDevice], - components: { - EamInspectionOrderModal, - EamInspectionOrderModalXq - }, - data () { - return { - description: 'eam_inspection_order绠$悊椤甸潰', - // 琛ㄥご - columns: [ - { - title: '#', - dataIndex: '', - key:'rowIndex', - width:60, - align:"center", - customRender:function (t,r,index) { - return parseInt(index)+1; + export default { + name: 'EamInspectionOrderList', + mixins: [JeecgListMixin, mixinDevice], + components: { + EamInspectionOrderModal, + EamInspectionOrderModalXq + }, + props: { + isDisplayOperation: { + type: Boolean, + default: true + } + }, + data() { + return { + description: 'eam_inspection_order绠$悊椤甸潰', + disableMixinCreated: true, + // 琛ㄥご + columns: [ + { + title: '#', + dataIndex: '', + key: 'rowIndex', + width: 60, + align: 'center', + customRender: function(t, r, index) { + return parseInt(index) + 1 + } + }, + { + title: '宸ュ崟鍙�', + align: 'center', + dataIndex: 'orderNum' + }, + { + title: '璁惧缂栧彿', + align: 'center', + dataIndex: 'equipmentId_dictText' + }, + { + title: '鏍囧噯缂栫爜', + align: 'center', + dataIndex: 'standardId_dictText' + }, + { + title: '鐐规鏃ユ湡', + align: 'center', + dataIndex: 'inspectionDate', + customRender: function(text) { + return !text ? '' : (text.length > 10 ? text.substr(0, 10) : text) + } + }, + { + title: '鐐规杩囨湡鏃堕棿', + align: 'center', + dataIndex: 'expirationTime', + customRender: function(text) { + return !text ? '' : (text.length > 10 ? text.substr(0, 10) : text) + } + }, + { + title: '鍒涘缓鏂瑰紡', + align: 'center', + dataIndex: 'creationMethod_dictText' + }, + { + title: '鐐规鐘舵��', + align: 'center', + dataIndex: 'inspectionStatus_dictText' + }, + { + title: '鐐规鏃堕棿', + align: 'center', + dataIndex: 'operateTime', + customRender: function(text) { + return !text ? '' : (text.length > 10 ? text.substr(0, 10) : text) + } + }, + { + title: '鐐规浜�', + align: 'center', + dataIndex: 'operator_dictText' + }, + { + title: '鐝粍闀跨‘璁�', + align: 'center', + dataIndex: 'confirmUser' + }, + { + title: '纭鏃堕棿', + align: 'center', + dataIndex: 'confirmTime', + customRender: function(text) { + return !text ? '' : (text.length > 10 ? text.substr(0, 10) : text) + } } + ], + url: { + list: '/eam/eamInspectionOrder/list', + cancelInspectionOrder: "/eam/eamInspectionOrder/cancelInspectionOrder", + deleteBatch: '/eam/eamInspectionOrder/deleteBatch', + exportXlsUrl: '/eam/eamInspectionOrder/exportXls', + importExcelUrl: 'eam/eamInspectionOrder/importExcel', + receiveInspectionOrder: 'eam/eamInspectionOrder/receiveInspectionOrder', + cancelOrReceive: 'eam/eamInspectionOrder/cancelOrReceive' }, - { - title:'宸ュ崟鍙�', - align:"center", - dataIndex: 'orderNum' - }, - { - title:'璁惧缂栧彿', - align:"center", - dataIndex: 'equipmentId_dictText' - }, - { - title:'鏍囧噯缂栫爜', - align:"center", - dataIndex: 'standardId_dictText' - }, - { - title:'鐐规鏃ユ湡', - align:"center", - dataIndex: 'inspectionDate', - customRender:function (text) { - return !text?"":(text.length>10?text.substr(0,10):text) - } - }, - { - title:'鐐规杩囨湡鏃堕棿', - align:"center", - dataIndex: 'expirationTime', - customRender:function (text) { - return !text?"":(text.length>10?text.substr(0,10):text) - } - }, - { - title:'鍒涘缓鏂瑰紡', - align:"center", - dataIndex: 'creationMethod_dictText' - }, - { - title:'鐐规鐘舵��', - align:"center", - dataIndex: 'inspectionStatus_dictText' - }, - { - title:'鐐规鏃堕棿', - align:"center", - dataIndex: 'operateTime', - customRender:function (text) { - return !text?"":(text.length>10?text.substr(0,10):text) - } - }, - { - title:'鐐规浜�', - align:"center", - dataIndex: 'operator_dictText' - }, - { - title:'鐝粍闀跨‘璁�', - align:"center", - dataIndex: 'confirmUser' - }, - { - title:'纭鏃堕棿', - align:"center", - dataIndex: 'confirmTime', - customRender:function (text) { - return !text?"":(text.length>10?text.substr(0,10):text) - } - }, - { - title: '鎿嶄綔', - dataIndex: 'action', - align:"center", - fixed:"right", - width:147, - scopedSlots: { customRender: 'action' } - } - ], - url: { - list: "/eam/eamInspectionOrder/list", - cancelInspectionOrder: "/eam/eamInspectionOrder/cancelInspectionOrder", - deleteBatch: "/eam/eamInspectionOrder/deleteBatch", - exportXlsUrl: "/eam/eamInspectionOrder/exportXls", - importExcelUrl: "eam/eamInspectionOrder/importExcel", - receiveInspectionOrder : "eam/eamInspectionOrder/receiveInspectionOrder", - cancelOrReceive: "eam/eamInspectionOrder/cancelOrReceive" + dictOptions: {}, + superFieldList: [] + } + }, + created() { + if (!this.isDisplayOperation) { + return + } + const operationColumn = { + title: '鎿嶄綔', + dataIndex: 'action', + align: 'center', + fixed: 'right', + width: 147, + scopedSlots: { customRender: 'action' } + } + this.columns = [...this.columns, operationColumn] + this.loadData(1) + }, + computed: { + importExcelUrl: function() { + return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}` + } + }, + methods: { + initDictConfig() { }, - dictOptions:{}, - superFieldList:[], + //璇︽儏 + handleDetail: function(record) { + this.$refs.modalFormXq.edit(record) + this.$refs.modalFormXq.title = '璇︽儏' + this.$refs.modalFormXq.disableSubmit = true + }, + handleInspection(id) { + if (!this.url.receiveInspectionOrder) { + this.$message.error('璇疯缃畊rl.receiveInspectionOrder!') + return + } + var that = this + getAction(that.url.receiveInspectionOrder, { id: id }).then((res) => { + if (res.success) { + that.$notification.success({ + message: '娑堟伅', + description: res.message + }) + that.loadData() + } else { + // that.$message.warning(res.message); + that.$notification.warning({ + message: '娑堟伅', + description: res.message + }) + } + }) + }, + handleOrReceive(id){ + if (!this.url.cancelInspectionOrder) { + this.$message.error("璇疯缃畊rl.cancelInspectionOrder!") + return + } + var that = this; + getAction(that.url.cancelInspectionOrder, { id: id }).then((res) => { + if (res.success) { + that.$notification.success({ + message: '娑堟伅', + description: res.message + }); + that.loadData(); + } else { + // that.$message.warning(res.message); + that.$notification.warning({ + message: '娑堟伅', + description: res.message + }); + } + }); + }, + batchZf(type) { + if (this.selectedRowKeys.length <= 0) { + this.$notification.warning({ + message: '娑堟伅', + description: '璇烽�夋嫨涓�鏉¤褰�' + }) + } else { + var ids = '' + for (var a = 0; a < this.selectedRowKeys.length; a++) { + ids += this.selectedRowKeys[a] + ',' + } + var that = this + this.$confirm({ + title: '纭浣滃簾', + content: '鏄惁浣滃簾閫変腑鏁版嵁锛屽彧鏈夊緟鐐规鐘舵�佺殑鏁版嵁鎵嶅彲浣滃簾鎴愬姛?', + onOk: function() { + that.loading = true + getAction(that.url.cancelOrReceive, { ids: ids, type: type }).then((res) => { + if (res.success) { + that.$notification.success({ + message: '娑堟伅', + description: res.message + }) + that.loadData() + that.onClearSelected() + } else { + // that.$message.warning(res.message); + that.$notification.warning({ + message: '娑堟伅', + description: res.message + }) + } + }).finally(() => { + that.loading = false + }) + } + }) + } + }, + batchLq(type) { + if (this.selectedRowKeys.length <= 0) { + this.$notification.warning({ + message: '娑堟伅', + description: '璇烽�夋嫨涓�鏉¤褰�' + }) + } else { + var ids = '' + for (var a = 0; a < this.selectedRowKeys.length; a++) { + ids += this.selectedRowKeys[a] + ',' + } + var that = this + this.$confirm({ + title: '纭棰嗗彇', + content: '鏄惁棰嗗彇閫変腑鏁版嵁锛屽彧鏈夊緟鐐规鐘舵�佺殑鏁版嵁鎵嶅彲棰嗗彇鎴愬姛?', + onOk: function() { + that.loading = true + getAction(that.url.cancelOrReceive, { ids: ids, type: type }).then((res) => { + if (res.success) { + that.$notification.success({ + message: '娑堟伅', + description: res.message + }) + that.loadData() + that.onClearSelected() + } else { + // that.$message.warning(res.message); + that.$notification.warning({ + message: '娑堟伅', + description: res.message + }) + } + }).finally(() => { + that.loading = false + }) + } + }) + } + } } - }, - created() { - this.getSuperFieldList(); - }, - computed: { - importExcelUrl: function(){ - return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; - }, - }, - methods: { - initDictConfig(){ - }, - getSuperFieldList(){ - let fieldList=[]; - fieldList.push({type:'string',value:'orderNum',text:'宸ュ崟鍙�',dictCode:''}) - fieldList.push({type:'string',value:'equipmentId',text:'璁惧ID',dictCode:''}) - fieldList.push({type:'string',value:'standardId',text:'鏍囧噯ID',dictCode:''}) - fieldList.push({type:'date',value:'inspectionDate',text:'鐐规鏃ユ湡'}) - fieldList.push({type:'date',value:'operateTime',text:'鐐规鏃堕棿'}) - fieldList.push({type:'string',value:'operator',text:'鐐规浜�',dictCode:''}) - fieldList.push({type:'date',value:'expirationTime',text:'鐐规杩囨湡鏃堕棿'}) - fieldList.push({type:'string',value:'creationMethod',text:'鍒涘缓鏂瑰紡',dictCode:''}) - fieldList.push({type:'string',value:'inspectionStatus',text:'鐐规鐘舵��',dictCode:''}) - fieldList.push({type:'string',value:'confirmUser',text:'璁惧绠$悊鍛樼‘璁�',dictCode:''}) - fieldList.push({type:'date',value:'confirmTime',text:'纭鏃堕棿'}) - fieldList.push({type:'string',value:'remark',text:'澶囨敞',dictCode:''}) - fieldList.push({type:'string',value:'imageFiles',text:'鐓х墖鏂囦欢ids;id浠ラ�楀彿鍒嗛殧',dictCode:''}) - this.superFieldList = fieldList - }, - //璇︽儏 - handleDetail: function(record) { - this.$refs.modalFormXq.edit(record); - this.$refs.modalFormXq.title = "璇︽儏"; - this.$refs.modalFormXq.disableSubmit = true; - }, - handleInspection(id) { - if (!this.url.receiveInspectionOrder) { - this.$message.error("璇疯缃畊rl.receiveInspectionOrder!") - return - } - var that = this; - getAction(that.url.receiveInspectionOrder, { id: id }).then((res) => { - if (res.success) { - that.$notification.success({ - message: '娑堟伅', - description: res.message - }); - that.loadData(); - } else { - // that.$message.warning(res.message); - that.$notification.warning({ - message: '娑堟伅', - description: res.message - }); - } - }); - }, - handleOrReceive(id){ - if (!this.url.cancelInspectionOrder) { - this.$message.error("璇疯缃畊rl.cancelInspectionOrder!") - return - } - var that = this; - getAction(that.url.cancelInspectionOrder, { id: id }).then((res) => { - if (res.success) { - that.$notification.success({ - message: '娑堟伅', - description: res.message - }); - that.loadData(); - } else { - // that.$message.warning(res.message); - that.$notification.warning({ - message: '娑堟伅', - description: res.message - }); - } - }); - }, - batchZf(type){ - if (this.selectedRowKeys.length <= 0) { - this.$notification.warning({ - message:'娑堟伅', - description:"璇烽�夋嫨涓�鏉¤褰�" - }); - } else { - var ids = ""; - for (var a = 0; a < this.selectedRowKeys.length; a++) { - ids += this.selectedRowKeys[a] + ","; - } - var that = this; - this.$confirm({ - title: "纭浣滃簾", - content: "鏄惁浣滃簾閫変腑鏁版嵁锛屽彧鏈夊緟鐐规鐘舵�佺殑鏁版嵁鎵嶅彲浣滃簾鎴愬姛?", - onOk: function () { - that.loading = true; - getAction(that.url.cancelOrReceive, {ids: ids,type:type}).then((res) => { - if (res.success) { - that.$notification.success({ - message:'娑堟伅', - description:res.message - }); - that.loadData(); - that.onClearSelected(); - } else { - // that.$message.warning(res.message); - that.$notification.warning({ - message:'娑堟伅', - description:res.message - }); - } - }).finally(() => { - that.loading = false; - }); - } - }); - } - }, - batchLq(type){ - if (this.selectedRowKeys.length <= 0) { - this.$notification.warning({ - message:'娑堟伅', - description:"璇烽�夋嫨涓�鏉¤褰�" - }); - } else { - var ids = ""; - for (var a = 0; a < this.selectedRowKeys.length; a++) { - ids += this.selectedRowKeys[a] + ","; - } - var that = this; - this.$confirm({ - title: "纭棰嗗彇", - content: "鏄惁棰嗗彇閫変腑鏁版嵁锛屽彧鏈夊緟鐐规鐘舵�佺殑鏁版嵁鎵嶅彲棰嗗彇鎴愬姛?", - onOk: function () { - that.loading = true; - getAction(that.url.cancelOrReceive, {ids: ids,type:type}).then((res) => { - if (res.success) { - that.$notification.success({ - message:'娑堟伅', - description:res.message - }); - that.loadData(); - that.onClearSelected(); - } else { - // that.$message.warning(res.message); - that.$notification.warning({ - message:'娑堟伅', - description:res.message - }); - } - }).finally(() => { - that.loading = false; - }); - } - }); - } - }, } -} </script> <style scoped> -@import '~@assets/less/common.less'; + @import '~@assets/less/common.less'; </style> \ No newline at end of file diff --git a/src/views/eam/maintenance/modules/EamInspectionOrderModal.vue b/src/views/eam/maintenance/modules/EamInspectionOrderModal.vue index 4c49a93..0ea19b4 100644 --- a/src/views/eam/maintenance/modules/EamInspectionOrderModal.vue +++ b/src/views/eam/maintenance/modules/EamInspectionOrderModal.vue @@ -5,6 +5,7 @@ :visible="visible" :confirmLoading="confirmLoading" switchFullscreen + centered @ok="handleOk" @cancel="handleCancel" cancelText="鍏抽棴"> diff --git a/src/views/eam/maintenance/modules/EamInspectionOrderModalXq.vue b/src/views/eam/maintenance/modules/EamInspectionOrderModalXq.vue index ab6bebf..bcd44eb 100644 --- a/src/views/eam/maintenance/modules/EamInspectionOrderModalXq.vue +++ b/src/views/eam/maintenance/modules/EamInspectionOrderModalXq.vue @@ -8,6 +8,7 @@ switchFullscreen @ok="handleOk" @cancel="handleCancel" + centered cancelText="鍏抽棴"> <a-spin :spinning="false"> @@ -183,6 +184,7 @@ detailOrder: '/eam/eamInspectionOrderDetail/queryList' }, maintenanceCategory: 'POINT_INSPECTION', + disableSubmit:false, standardId:"", detail: { loading: false, diff --git a/src/views/eam/repair/EamRepairOrderList.vue b/src/views/eam/repair/EamRepairOrderList.vue index d905fc3..4da6b7c 100644 --- a/src/views/eam/repair/EamRepairOrderList.vue +++ b/src/views/eam/repair/EamRepairOrderList.vue @@ -80,31 +80,7 @@ :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" @change="handleTableChange" :scroll="{x:'max-content'}" - > - - <span slot="action" slot-scope="text, record"> - <a @click="handleOpenApplySparePartsModal(record)">鐢宠澶囦欢</a> - - <a-divider type="vertical"/> - - <a @click="handleOpenRepairCompletedModal(record)">瀹屾垚缁翠慨</a> - - <!--<a @click="handleEdit(record)">缂栬緫</a>--> - - <!--<a-divider type="vertical"/>--> - <!--<a-dropdown>--> - <!--<a class="ant-dropdown-link">鏇村 <a-icon type="down"/></a>--> - <!--<a-menu slot="overlay">--> - <!--<a-menu-item>--> - <!--<a-popconfirm title="纭畾鍒犻櫎鍚�?" @confirm="() => handleDelete(record.id)">--> - <!--<a>鍒犻櫎</a>--> - <!--</a-popconfirm>--> - <!--</a-menu-item>--> - <!--</a-menu>--> - <!--</a-dropdown>--> - </span> - - </a-table> + /> </div> <!-- table鍖哄煙-end --> @@ -167,6 +143,12 @@ width: 100 }, { + title: '缁翠慨璐熻矗浜�', + align: 'center', + dataIndex: 'repairer', + width: 100 + }, + { title: '缁翠慨寮�濮嬫椂闂�', align: 'center', dataIndex: 'actualStartTime', @@ -188,7 +170,7 @@ title: '缁翠慨缁撴灉鎻忚堪', align: 'center', dataIndex: 'repairDescription', - width: 300 + // width: 300 }, { title: '缁翠慨鍥剧墖', @@ -196,11 +178,7 @@ dataIndex: 'imageFiles', width: 100 }, - { - title: '缁翠慨璐熻矗浜�', - align: 'center', - dataIndex: 'repairer' - }, + // { // title: '鏄惁濮斿', // align: 'center', @@ -251,13 +229,13 @@ return } this.initDictData('report_repair_status') - const operationColumn = { - title: '鎿嶄綔', - dataIndex: 'action', - align: 'center', - scopedSlots: { customRender: 'action' } - } - this.columns = [...this.columns, operationColumn] + // const operationColumn = { + // title: '鎿嶄綔', + // dataIndex: 'action', + // align: 'center', + // scopedSlots: { customRender: 'action' } + // } + // this.columns = [...this.columns, operationColumn] this.loadData(1) }, methods: { @@ -283,24 +261,7 @@ // 寮�鍚鍙栨晠闅滀繚淇崟寮圭獥 handleOpenReceiveFaultModal() { this.$refs.receiveFaultModalRef.visible = true - this.$refs.receiveFaultModalRef.loadData() }, - - /** - * 寮�鍚敵璇峰浠跺脊绐� - * @param record 琛ㄦ牸琛屼俊鎭� - */ - handleOpenApplySparePartsModal(record) { - - }, - - /** - * 寮�鍚畬鎴愮淮淇脊绐� - * @param record 琛ㄦ牸琛屼俊鎭� - */ - handleOpenRepairCompletedModal(record) { - - } } } </script> diff --git a/src/views/flowable/workflow/FlowTodo.vue b/src/views/flowable/workflow/FlowTodo.vue index 42b5430..0929e14 100644 --- a/src/views/flowable/workflow/FlowTodo.vue +++ b/src/views/flowable/workflow/FlowTodo.vue @@ -11,7 +11,8 @@ <a-row :gutter="24"> <a-col :xl="6" :lg="7" :md="8" :sm="24"> <a-form-item label="娴佺▼鍒嗙被"> - <j-dict-select-tag placeholder="璇烽�夋嫨娴佺▼鍒嗙被" v-model="queryParam.category" dictCode="flow_type"></j-dict-select-tag> + <j-dict-select-tag placeholder="璇烽�夋嫨娴佺▼鍒嗙被" v-model="queryParam.category" + dictCode="flow_type"></j-dict-select-tag> </a-form-item> </a-col> <a-col :xl="6" :lg="7" :md="8" :sm="24"> @@ -26,9 +27,11 @@ </a-col> <a-col :xl="10" :lg="11" :md="12" :sm="24"> <a-form-item label="褰撳墠鎿嶄綔鏃堕棿"> - <j-date :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" placeholder="璇烽�夋嫨寮�濮嬫椂闂�" class="query-group-cust" v-model="queryParam.startTime"></j-date> + <j-date :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" placeholder="璇烽�夋嫨寮�濮嬫椂闂�" class="query-group-cust" + v-model="queryParam.startTime"></j-date> <span class="query-group-split-cust"></span> - <j-date :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" placeholder="璇烽�夋嫨缁撴潫鏃堕棿" class="query-group-cust" v-model="queryParam.endTime"></j-date> + <j-date :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" placeholder="璇烽�夋嫨缁撴潫鏃堕棿" class="query-group-cust" + v-model="queryParam.endTime"></j-date> </a-form-item> </a-col> <a-col :xl="6" :lg="7" :md="8" :sm="24"> @@ -44,19 +47,24 @@ <!-- 鎿嶄綔鎸夐挳鍖哄煙 --> <div class="table-operator"> - <a-dropdown v-if="selectedRowKeys.length > 0 "> - <a-menu slot="overlay"> - <a-menu-item key="1" @click="batchHandle"><a-icon type="delete"/>鎵归噺澶勭悊</a-menu-item> - </a-menu> - <a-button style="margin-left: 8px"> 鎵归噺鎿嶄綔 <a-icon type="down" /></a-button> - </a-dropdown> + <a-dropdown v-if="selectedRowKeys.length > 0 "> + <a-menu slot="overlay"> + <a-menu-item key="1" @click="batchHandle"> + <a-icon type="delete"/> + 鎵归噺澶勭悊 + </a-menu-item> + </a-menu> + <a-button style="margin-left: 8px"> 鎵归噺鎿嶄綔 + <a-icon type="down"/> + </a-button> + </a-dropdown> </div> <!-- table鍖哄煙-begin --> <div> <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> <i class="anticon anticon-info-circle ant-alert-icon"></i>宸查�夋嫨 <a style="font-weight: 600">{{ - selectedRowKeys.length }}</a>椤� + selectedRowKeys.length }}</a>椤� <a style="margin-left: 24px" @click="onClearSelected">娓呯┖</a> </div> @@ -73,26 +81,6 @@ :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" @change="handleTableChange"> - <template slot="htmlSlot" slot-scope="text"> - <div v-html="text"></div> - </template> - <template slot="imgSlot" slot-scope="text"> - <span v-if="!text" style="font-size: 12px;font-style: italic;">鏃犲浘鐗�</span> - <img v-else :src="getImgView(text)" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/> - </template> - <template slot="fileSlot" slot-scope="text"> - <span v-if="!text" style="font-size: 12px;font-style: italic;">鏃犳枃浠�</span> - <a-button - v-else - :ghost="true" - type="primary" - icon="download" - size="small" - @click="downloadFile(text)"> - 涓嬭浇 - </a-button> - </template> - <span slot="action" slot-scope="text, record"> <a @click="handelDetial(record,text)">鏌ョ湅璇︽儏</a> </span> @@ -101,234 +89,246 @@ </div> <AssignFileStreamHandle ref="modalFormApproval" :selectShenpiData="selectShenpiData"></AssignFileStreamHandle> - <DispatchFileHandle ref="modalFormDispatchFileXq" :selectShenpiData="selectDispatchFileXqData" @searchReset="searchReset"></DispatchFileHandle> - <DispatchFileBachHandleStyle ref="modalFormDispatchFileBatch" @searchReset="searchReset" @ok="modalFormOk"></DispatchFileBachHandleStyle> - <InspectionOrderHandle ref="modalFormInspectionOrder" :selectShenpiData="selectInspectionOrderData" @searchReset="searchReset"></InspectionOrderHandle> - <InspectionOrderHandleBzz ref="modalFormInspectionOrderBzz" :selectShenpiData="selectInspectionOrderDataBzz" @searchReset="searchReset"></InspectionOrderHandleBzz> - <week-maintenance-approval-modal ref = "weekMaintenanceApprovalModal" ></week-maintenance-approval-modal> - <repair-order-approval-modal ref="repairOrderApprovalModal" :selectShenpiData="selectRepairOrderData" ></repair-order-approval-modal> + <DispatchFileHandle ref="modalFormDispatchFileXq" :selectShenpiData="selectDispatchFileXqData" + @searchReset="searchReset"></DispatchFileHandle> + <DispatchFileBachHandleStyle ref="modalFormDispatchFileBatch" @searchReset="searchReset" + @ok="modalFormOk"></DispatchFileBachHandleStyle> + <InspectionOrderHandle ref="modalFormInspectionOrder" :selectShenpiData="selectInspectionOrderData" + @searchReset="searchReset"></InspectionOrderHandle> + <InspectionOrderHandleBzz ref="modalFormInspectionOrderBzz" :selectShenpiData="selectInspectionOrderDataBzz" + @searchReset="searchReset"></InspectionOrderHandleBzz> + <week-maintenance-approval-modal ref="weekMaintenanceApprovalModal"></week-maintenance-approval-modal> + <repair-order-approval-modal ref="repairOrderApprovalModal" + :selectShenpiData="selectRepairOrderData"></repair-order-approval-modal> </a-card> </template> <script> -import '@/assets/less/TableExpand.less' -import { mixinDevice } from '@/utils/mixin' -import { JeecgListMixin } from '@/mixins/JeecgListMixin' -import JDictSelectTag from '@/components/dict/JDictSelectTag.vue' -import AssignFileStreamHandle from '@views/flowable/workflow/assignFileStream/AssignFileStreamHandle.vue' -import DispatchFileHandle from '@views/flowable/workflow/dispatchFile/DispatchFileHandle.vue' -import DispatchFileBachHandleStyle from '@views/flowable/workflow/dispatchFile/DispatchFileBachHandleStyle#Drawer.vue' -import WeekMaintenanceApprovalModal from '@views/flowable/workflow/weekMaintenance/WeekMaintenanceApprovalModal' -import RepairOrderApprovalModal from '@views/flowable/workflow/repairOrder/RepairOrderApprovalModal' -import InspectionOrderHandle from '@views/flowable/workflow/InspectionOrder/InspectionOrderHandle.vue' -import InspectionOrderHandleBzz from '@views/flowable/workflow/InspectionOrder/InspectionOrderHandleBzz.vue' + import '@/assets/less/TableExpand.less' + import { mixinDevice } from '@/utils/mixin' + import { JeecgListMixin } from '@/mixins/JeecgListMixin' + import JDictSelectTag from '@/components/dict/JDictSelectTag.vue' + import AssignFileStreamHandle from '@views/flowable/workflow/assignFileStream/AssignFileStreamHandle.vue' + import DispatchFileHandle from '@views/flowable/workflow/dispatchFile/DispatchFileHandle.vue' + import DispatchFileBachHandleStyle from '@views/flowable/workflow/dispatchFile/DispatchFileBachHandleStyle#Drawer.vue' + import WeekMaintenanceApprovalModal from '@views/flowable/workflow/weekMaintenance/WeekMaintenanceApprovalModal' + import RepairOrderApprovalModal from '@views/flowable/workflow/repairOrder/RepairOrderApprovalModal' + import InspectionOrderHandle from '@views/flowable/workflow/InspectionOrder/InspectionOrderHandle.vue' + import InspectionOrderHandleBzz from '@views/flowable/workflow/InspectionOrder/InspectionOrderHandleBzz.vue' -import { getAction } from '@api/manage' -export default { - name: 'NcDeviceCharactersList', - mixins:[JeecgListMixin, mixinDevice], - components: { - AssignFileStreamHandle, - JDictSelectTag, - DispatchFileHandle, - DispatchFileBachHandleStyle, - WeekMaintenanceApprovalModal, - RepairOrderApprovalModal, - InspectionOrderHandle, - InspectionOrderHandleBzz, - }, - data () { - return { - description: '宸ヤ綔娴�-鎴戠殑寰呭姙', - // 琛ㄥご - columns: [ - { - title: '搴忓彿', - dataIndex: '', - key:'rowIndex', - width:200, - align:"center", - customRender:function (t,r,index) { - return parseInt(index)+1; + import { getAction } from '@api/manage' + + export default { + name: 'NcDeviceCharactersList', + mixins: [JeecgListMixin, mixinDevice], + components: { + AssignFileStreamHandle, + JDictSelectTag, + DispatchFileHandle, + DispatchFileBachHandleStyle, + WeekMaintenanceApprovalModal, + RepairOrderApprovalModal, + InspectionOrderHandle, + InspectionOrderHandleBzz + }, + data() { + return { + description: '宸ヤ綔娴�-鎴戠殑寰呭姙', + // 琛ㄥご + columns: [ + { + title: '搴忓彿', + dataIndex: '', + key: 'rowIndex', + width: 60, + align: 'center', + customRender: function(t, r, index) { + return parseInt(index) + 1 + } + }, + { + title: '娴佺▼鍒嗙被', + align: 'center', + dataIndex: 'category_dictText', + width: 300 + }, + { + title: '娴佺▼鍚嶇О', + align: 'center', + dataIndex: 'flowName', + width: 200 + }, + { + title: '娴佺▼涓氬姟绠�瑕佹弿杩�', + align: 'center', + dataIndex: 'title', + width: 500 + }, + { + title: '涓婁竴姝ュ鐞嗕汉', + align: 'center', + dataIndex: 'preNodeAssignee_dictText', + width: 150 + }, + { + title: '鍓嶉┍鑺傜偣', + align: 'center', + dataIndex: 'preNode', + width: 200 + }, + { + title: '褰撳墠鑺傜偣', + align: 'center', + dataIndex: 'name', + width: 200 + }, + { + title: '褰撳墠鑺傜偣寮�濮嬫椂闂�', + align: 'center', + dataIndex: 'createTime', + width: 200 + }, + { + title: '鎿嶄綔', + dataIndex: 'action', + scopedSlots: { customRender: 'action' }, + align: 'center', + width: 150, + fixed: 'right' } + ], + url: { + list: '/assign/flow/toTaskBySelf', + isSameNode: '/assign/flow/isSameNode' }, - { - title: '娴佺▼鍒嗙被', - align: "center", - dataIndex: 'category_dictText', - width: 200, - }, - { - title: '娴佺▼鍚嶇О', - align: "center", - dataIndex: 'flowName', - width: 200, - }, - { - title: '娴佺▼涓氬姟绠�瑕佹弿杩�', - align: "center", - dataIndex: 'title', - width:300 - }, - { - title: '涓婁竴姝ュ鐞嗕汉', - align: "center", - dataIndex: 'preNodeAssignee_dictText', - width:200 - }, - { - title: '鍓嶉┍鑺傜偣', - align: "center", - dataIndex: 'preNode', - width:200 - }, - { - title: '褰撳墠鑺傜偣', - align: "center", - dataIndex: 'name', - width:200 - }, - { - title: '褰撳墠鑺傜偣寮�濮嬫椂闂�', - align: "center", - dataIndex: 'createTime', - width:300 - }, - { - title: '鎿嶄綔', - dataIndex: 'action', - scopedSlots: { customRender: 'action' }, - align: 'center', - width: 200, - fixed: 'right' + dictOptions: {}, + selectShenpiData: {}, + selectDispatchFileXqData: {}, + selectInspectionOrderData: {}, + selectInspectionOrderDataBzz: {}, + selectBachData: {}, + selectRepairOrderData: {}, + //涓氬姟淇℃伅ID + dataId: undefined + } + }, + created() { + }, + computed: { + importExcelUrl: function() { + return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}` + } + }, + methods: { + handelDetial(item, index) { + console.log('鐐瑰嚮浜嗚鎯�') + console.log('item----->', item) + console.log('index----->', index) + let approcesstype = this.splitAprocessType(item.category) + console.log('approcesstype--->', approcesstype) + switch (approcesstype) { + case 'drApproval': + this.handDrDetial(item) + break + case 'ggApproval': + this.handDispatchFileDetial(item) + break + case 'sbdjApproval': + this.handInspectionOrder(item) + break + case 'WEEK_MAINTENANCE': + this.handleWeekMaintenance(item) + break + case 'eam_repair': + this.handleRepairOrder(item) + break + default: + alert('娌℃壘鍒拌娴佺▼') } - ], - url: { - list: '/assign/flow/toTaskBySelf', - isSameNode: '/assign/flow/isSameNode' }, - dictOptions:{}, - selectShenpiData: {}, - selectDispatchFileXqData:{}, - selectInspectionOrderData:{}, - selectInspectionOrderDataBzz:{}, - selectBachData:{}, - selectRepairOrderData: {}, - //涓氬姟淇℃伅ID - dataId: undefined, - } - }, - created() { - }, - computed: { - importExcelUrl: function(){ - return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; - }, - }, - methods: { - handelDetial(item, index) { - console.log('鐐瑰嚮浜嗚鎯�') - console.log('item----->', item) - console.log('index----->', index) - let approcesstype = this.splitAprocessType(item.category) - console.log('approcesstype--->', approcesstype) - switch (approcesstype) { - case 'drApproval': - this.handDrDetial(item) - break - case 'ggApproval': - this.handDispatchFileDetial(item) - break - case 'sbdjApproval': - this.handInspectionOrder(item) - break - case 'WEEK_MAINTENANCE': - this.handleWeekMaintenance(item) - break - case 'eam_repair': - this.handleRepairOrder(item) - break - default: - alert('娌℃壘鍒拌娴佺▼') - } - }, - splitAprocessType(title) { - let parts = title.split('锛�') // 娉ㄦ剰鍐掑彿鏄叏瑙掑瓧绗︼紝浣跨敤瀵瑰簲鐨勫瓧杩涜鍒嗗壊 - let result = parts[0] - return result - }, - handDrDetial(item) { - this.selectShenpiData = item - this.$refs.modalFormApproval.clearTableSource() - this.$refs.modalFormApproval.getAllApproveData(item) - }, - searchReset() { - this.queryParam = {} - this.loadData(1); - }, - handDispatchFileDetial(item){ - console.log('item----->', item) - this.selectDispatchFileXqData = item - this.$refs.modalFormDispatchFileXq.clearTableSource() - this.$refs.modalFormDispatchFileXq.getAllApproveData(item) - }, - handInspectionOrder(item) { - console.log('item----->', item) - if (item.taskDefKey ==='Confirmed_completed'){ - this.selectInspectionOrderDataBzz = item - this.$refs.modalFormInspectionOrderBzz .clearTableSource() - this.$refs.modalFormInspectionOrderBzz .getAllApproveData(item) - }else { - this.selectInspectionOrderData = item - this.$refs.modalFormInspectionOrder.clearTableSource() - this.$refs.modalFormInspectionOrder.getAllApproveData(item) - } - }, - batchHandle() { - if (this.selectedRowKeys.length <= 0) { - this.$notification.warning({ - message: '娑堟伅', - description: "璇烽�夋嫨涓�鏉¤褰�" - }); - return; - } else { - let ids = ""; - for (var a = 0; a < this.selectedRowKeys.length; a++) { - ids += this.selectedRowKeys[a] + ","; + splitAprocessType(title) { + let parts = title.split('锛�') // 娉ㄦ剰鍐掑彿鏄叏瑙掑瓧绗︼紝浣跨敤瀵瑰簲鐨勫瓧杩涜鍒嗗壊 + let result = parts[0] + return result + }, + handDrDetial(item) { + this.selectShenpiData = item + this.$refs.modalFormApproval.clearTableSource() + this.$refs.modalFormApproval.getAllApproveData(item) + }, + searchReset() { + this.queryParam = {} + this.loadData(1) + }, + handDispatchFileDetial(item) { + console.log('item----->', item) + this.selectDispatchFileXqData = item + this.$refs.modalFormDispatchFileXq.clearTableSource() + this.$refs.modalFormDispatchFileXq.getAllApproveData(item) + }, + handInspectionOrder(item) { + console.log('item----->', item) + if (item.taskDefKey === 'Confirmed_completed') { + this.selectInspectionOrderDataBzz = item + this.$refs.modalFormInspectionOrderBzz.clearTableSource() + this.$refs.modalFormInspectionOrderBzz.getAllApproveData(item) + } else { + this.selectInspectionOrderData = item + this.$refs.modalFormInspectionOrder.clearTableSource() + this.$refs.modalFormInspectionOrder.getAllApproveData(item) } - getAction(this.url.isSameNode+"?taskIds="+ids).then((res)=>{ - if(res.success){ - let taskDefKey=res.result - this.selectBachData.taskIds = ids - this.selectBachData.taskDefKey = taskDefKey - this.$refs.modalFormDispatchFileBatch.title="鎵归噺澶勭悊"; - this.$refs.modalFormDispatchFileBatch.edit(this.selectBachData) - this.$refs.modalFormDispatchFileBatch.disableSubmit = false; - }else{ - this.$notification.warning({ - message: '娑堟伅', - description: res.message - }); + }, + batchHandle() { + if (this.selectedRowKeys.length <= 0) { + this.$notification.warning({ + message: '娑堟伅', + description: '璇烽�夋嫨涓�鏉¤褰�' + }) + return + } else { + let ids = '' + for (var a = 0; a < this.selectedRowKeys.length; a++) { + ids += this.selectedRowKeys[a] + ',' } - }) + getAction(this.url.isSameNode + '?taskIds=' + ids).then((res) => { + if (res.success) { + let taskDefKey = res.result + this.selectBachData.taskIds = ids + this.selectBachData.taskDefKey = taskDefKey + this.$refs.modalFormDispatchFileBatch.title = '鎵归噺澶勭悊' + this.$refs.modalFormDispatchFileBatch.edit(this.selectBachData) + this.$refs.modalFormDispatchFileBatch.disableSubmit = false + } else { + this.$notification.warning({ + message: '娑堟伅', + description: res.message + }) + } + }) + } + }, + handleWeekMaintenance(item) { + if (item && item.dataId) { + this.$refs.weekMaintenanceApprovalModal.handleDetail(item.dataId) + this.$refs.weekMaintenanceApprovalModal.title = item.name + this.$refs.weekMaintenanceApprovalModal.disableSubmit = false + } + }, + + /** + * 鐐瑰嚮璁惧缁翠慨鍒嗙被娴佺▼璇︽儏鏃惰Е鍙� + * @param record + */ + handleRepairOrder(record) { + this.selectRepairOrderData = Object.assign({}, record) + this.$refs.repairOrderApprovalModal.visible = true + this.$refs.repairOrderApprovalModal.getAllApproveData(record) + this.$refs.repairOrderApprovalModal.getBasicInformation(record) } - }, - handleWeekMaintenance(item) { - if(item && item.dataId) { - this.$refs.weekMaintenanceApprovalModal.handleDetail(item.dataId) - this.$refs.weekMaintenanceApprovalModal.title = item.name; - this.$refs.weekMaintenanceApprovalModal.disableSubmit = false; - } - }, - handleRepairOrder(item) { - this.selectRepairOrderData = item - this.$refs.repairOrderApprovalModal.clearTableSource() - this.$refs.repairOrderApprovalModal.getAllApproveData(item) } } -} </script> <style scoped> -@import '~@assets/less/common.less'; + @import '~@assets/less/common.less'; </style> \ No newline at end of file diff --git a/src/views/flowable/workflow/repairOrder/RepairOrderApprovalModal.vue b/src/views/flowable/workflow/repairOrder/RepairOrderApprovalModal.vue index 01a921c..98b7bea 100644 --- a/src/views/flowable/workflow/repairOrder/RepairOrderApprovalModal.vue +++ b/src/views/flowable/workflow/repairOrder/RepairOrderApprovalModal.vue @@ -1,16 +1,16 @@ <template> <a-modal - :title="title" - :width="width" + :width="1000" :visible="visible" - :footer="null" @cancel="handCancel" + :mask-closable="false" + centered > <a-card :bordered="false"> <div> <b>{{ selectShenpiData.title }}</b> - <br> - <br> + <br/> + <br/> <a-tag color="blue"> 澶勭悊浜� {{ selectShenpiData.assignee }} </a-tag> @@ -19,37 +19,49 @@ </a-tag> <br> <br> - <button @click="fetchAndShowBmp" class="btn-custom">鎵撳紑娴佺▼鍥�</button> - <div v-if="imageSrc"> - <img :src="imageSrc" alt="Fetched Image" /> + <a-button @click="fetchAndShowBmp" :loading="showBmpButtonLoading" class="btn-custom">娴佺▼鍥�</a-button> + <div v-if="imageSrc&&isDisplayBmp"> + <img :src="imageSrc" alt="Fetched Image"/> </div> - <hr class="shallow-hr"> + <hr class="shallow-hr"/> </div> <div> <b>鎸囨淳璇︽儏</b> <br> <a-form :form='form'> <a-spin :spinning="spinning"> - <a-tabs default-active-key='1' @change='callback'> + <a-tabs default-active-key='1'> <a-tab-pane key='1' tab='鍩烘湰淇℃伅'> - <a-form-model ref='form' :model='tableRowRecord' :rules='validatorRules'> + <a-form-model ref='form' :model='tableRowRecord' :rules='validatorRules' :labelCol='labelCol' + :wrapperCol='wrapperCol'> <a-row> <a-col :span='span'> - <a-form-model-item label='浜у搧鍚嶇О' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='productName'> - <a-input :disabled='coldisabled' v-model='tableRowRecord.productName'></a-input> + <a-form-model-item label='宸ュ崟缂栧彿'> + <a-input :readOnly='inputReadOnly' v-model='tableRowRecord.repairCode'/> </a-form-model-item> </a-col> <a-col :span='span'> - <a-form-model-item label='閮ㄤ欢鍚嶇О' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='componentId'> - <a-input :disabled='coldisabled' v-model='tableRowRecord.componentName'></a-input> + <a-form-model-item label='璁惧缂栧彿'> + <a-input :readOnly='inputReadOnly' v-model='tableRowRecord.equipmentId_dictText'/> + </a-form-model-item> + </a-col> + <a-col :span='span'> + <a-form-model-item label='鍗曟嵁鐘舵��'> + <a-input :readOnly='inputReadOnly' v-model='tableRowRecord.repairStatus_dictText'/> + </a-form-model-item> + </a-col> + <a-col :span='span'> + <a-form-model-item label='缁翠慨璐熻矗浜�'> + <a-input :readOnly='inputReadOnly' v-model='tableRowRecord.repairer'/> </a-form-model-item> </a-col> </a-row> </a-form-model> </a-tab-pane> + <a-tab-pane key='2' tab='娴佺▼鑺傜偣'> <a-card> - <a-timeline style="padding:0 1% 0 12%" > + <a-timeline style="padding:0 1% 0 12%"> <a-timeline-item color='white' v-for="(item,index1) in hitaskDataSource" :key="index1"> <div class="bottom"> <p>寮�濮嬫椂闂达細{{item.startTime}}</p> @@ -57,8 +69,8 @@ <p>澶勭悊浜猴細{{item.assignee}}</p> <p>鍔炵悊绫诲瀷锛歿{item.bllx_dictText}}</p> <p v-if="item.name == '鎻愪氦鐢宠'">鎸囨淳鍘熷洜锛歿{item.cause}}</p> - <p v-else >澶勭悊鎰忚锛歿{item.cause}}</p> - <div class="left_qiu"><span>{{item.name}}</span></div> + <p v-else>澶勭悊鎰忚锛歿{item.cause}}</p> + <div class="left_qiu"><span>{{item.name}}</span></div> </div> </a-timeline-item> </a-timeline> @@ -73,265 +85,252 @@ <br> <b>瀹℃壒璇︽儏</b> <br> - <a-form-model ref="form" :model="approveData" :rules="validatorRules" slot="detail"> + <br> + <a-form-model ref="form" :model="approveData" :rules="validatorRules" :labelCol='labelCol' + :wrapperCol='wrapperCol'> <a-row> - <a-col :span="24" class="btxx"> - <a-form-item label="瀹℃壒鐘舵��" :labelCol="labelCol" :wrapperCol="wrapperCol"> - <j-dict-select-tag type='list' v-model='assignFileStream.status' dictCode='dnc_assign_stream_status' placeholder="璇烽�夋嫨瀹℃壒鐘舵��" /> - </a-form-item> + <a-col :span="24"> + <a-form-model-item label="鏄惁闇�瑕侀鐢ㄥ浠�" prop="status"> + <a-radio-group v-model="approveData.status"> + <a-radio :value="1">鏄�</a-radio> + <a-radio :value="0">鍚�</a-radio> + </a-radio-group> + </a-form-model-item> </a-col> - <a-col :span="24" class="btxx"> - <a-form-model-item label="瀹℃壒鎰忚" :labelCol="labelCol" :wrapperCol="wrapperCol"> - <a-textarea v-model="assignFileStream.approveContent" rows="4" placeholder="璇疯緭鍏ュ鎵规剰瑙�"/> - </a-form-model-item > - </a-col> + + <template v-if="approveData.status===0"> + <a-col :span="24"> + <a-form-model-item label="鏁呴殰鍘熷洜" prop="faultReason"> + <a-input v-model="approveData.faultReason" rows="4" placeholder="璇疯緭鍏ユ晠闅滃師鍥�"/> + </a-form-model-item> + </a-col> + <a-col :span="24"> + <a-form-model-item label="缁翠慨缁撴灉鎻忚堪" prop="repairResultDescription"> + <a-textarea v-model="approveData.repairResultDescription" placeholder="璇疯緭鍏ョ淮淇粨鏋滄弿杩�"/> + </a-form-model-item> + </a-col> + <a-col :span="24"> + <a-form-model-item label="缁翠慨鍥剧墖"> + <j-image-upload v-model="approveData.imageFiles" :is-multiple="true" :number="3"/> + </a-form-model-item> + </a-col> + </template> </a-row> - <div class="table-operator" style="text-align: right;"> - <a-button @click="handleQueXiaoTask" type="primary" icon="close">鍙栨秷</a-button> - <a-button @click="submitForm">鎻� 浜�</a-button> - </div> </a-form-model> </div> </a-card> - + <template slot="footer"> + <div> + <a-button @click="handCancel">鍙栨秷</a-button> + <a-button @click="submitForm" type="primary">鎻� 浜�</a-button> + </div> + </template> </a-modal> </template> <script> + import '@assets/less/TableExpand.less' + import { getAction, deleteAction, postAction, downFile, httpAction } from '@api/manage' -import '@assets/less/TableExpand.less' -import { mixinDevice } from '@/utils/mixin' -import { getAction, deleteAction, postAction, downFile, httpAction } from '@api/manage' - -export default { - name: 'RepairOrderApprovalModal', - mixins: [mixinDevice], - props: { - selectShenpiData: { - type: Object, - required: true - } - }, - - data() { - return { - form: this.$form.createForm(this), - span: 12, - span1: 8, - coldisabled: true, - spinning: false, - tableRowRecord: {}, - assignFileStream:{}, - tableDataSource: [], - usageDataSource: [], - hitaskDataSource:[], - bomForm: {}, - approveContent:"", - imageSrc: null, - drawerVisible: true, - labelCol: { - xs: { span: 24 }, - sm: { span: 5 } - }, - wrapperCol: { - xs: { span: 30 }, - sm: { span: 16 } - }, - validatorRules: { - }, - approveData: {}, - flowData: {}, - title: '', - width: 1000, - visible: false, - // 琛ㄥご - url: { - queryBomDataById: '/eam/eamRepairOrder/queryById', - diagramView: '/assign/flow/diagramView', - queryHisTaskList:'/assign/flow/queryHisTaskList', - approve:"/activit/assign/file/approve", - }, - dictOptions: {}, - superFieldList: [], - workflowSource: [] - } - }, - created() { - }, - computed: {}, - methods: { - callback() { - }, - handCancel() { - this.visible = false - }, - clearTableSource() { - this.tableDataSource = [] - this.usageDataSource = [] - }, - fetchAndShowBmp() { - console.log('flowData----->', this.flowData) - try { - let parm = { - processDefinitionId: this.flowData.processDefinitionId, - processInstanceId:this.flowData.processInstanceId, - TaskDefinitionKey:this.flowData.processDefinitionKey - } - downFile(this.url.diagramView,parm,'get').then((res=>{ - console.log('Pica------>',res) - const urlObject = window.URL.createObjectURL(new Blob([res])) - this.imageSrc = urlObject - })) - } catch (error) { - console.error('Error fetching image blob:', error) - alert('鏃犳硶鍔犺浇鍥剧墖锛岃绋嶅悗鍐嶈瘯銆�') + export default { + name: 'RepairOrderApprovalModal', + props: { + selectShenpiData: { + type: Object, + required: true } }, - handleQueXiaoTask(){ - this.visible = false - this.routeReload() + data() { + return { + form: this.$form.createForm(this), + span: 12, + inputReadOnly: true, + spinning: false, + tableRowRecord: {}, + assignFileStream: {}, + hitaskDataSource: [], + imageSrc: null, + labelCol: { + xs: { span: 24 }, + sm: { span: 5 } + }, + wrapperCol: { + xs: { span: 24 }, + sm: { span: 16 } + }, + validatorRules: { + status: [ + { required: true, message: '璇烽�夋嫨鏄惁闇�瑕侀鐢ㄥ浠�' } + ], + faultReason: [ + { required: true, message: '璇疯緭鍏ユ晠闅滃師鍥�' } + ], + repairResultDescription: [ + { required: true, message: '璇疯緭鍏ョ淮淇粨鏋滄弿杩�' } + ] + }, + approveData: {}, + flowData: {}, + visible: false, + // 琛ㄥご + url: { + queryBomDataById: '/eam/eamRepairOrder/queryById', + diagramView: '/assign/flow/diagramView', + queryHisTaskList: '/assign/flow/queryHisTaskList', + approve: '/activit/assign/file/approve' + }, + isDisplayBmp: false, + showBmpButtonLoading: false + } }, - submitForm () { - const that = this; - if (!that.assignFileStream.status==null || that.assignFileStream.status===undefined){ - this.$message.warning('璇烽�夋嫨瀹℃壒鐘舵�侊紒') - return false; - } - if (!that.assignFileStream.approveContent==null || that.assignFileStream.approveContent===undefined) { - this.$message.warning('璇疯緭鍏ュ鎵规剰瑙侊紒') - return false; - } - // 瑙﹀彂琛ㄥ崟楠岃瘉 - this.form.validateFields((err, values) => { - if (!err) { - that.confirmLoading = true; - let url=this.url.approve - let method = 'post'; - let flowTaskVo = {} - flowTaskVo.status=that.assignFileStream.status; - flowTaskVo.approveContent =that.assignFileStream.approveContent; - flowTaskVo.comment =that.assignFileStream.approveContent; - flowTaskVo.secretLevel = that.assignFileStream.secretLevel; - flowTaskVo.dataId = this.selectShenpiData.dataId - flowTaskVo.taskId = this.selectShenpiData.id - flowTaskVo.userId = this.selectShenpiData.assignee - flowTaskVo.instanceId = this.selectShenpiData.procInstId - flowTaskVo.targetKey = this.selectShenpiData.taskDefKey - flowTaskVo.values = this.selectShenpiData.variables - flowTaskVo.assignee = this.selectShenpiData.assignee - flowTaskVo.secretLevel = that.assignFileStream.secretLevel; - console.log("琛ㄥ崟鎻愪氦鏁版嵁",flowTaskVo) - httpAction(url,flowTaskVo,method).then((res)=>{ - if(res.success){ - that.$message.success(res.message); - that.$emit('ok'); - }else{ - that.$message.warning(res.message); - } - }).finally(() => { - that.confirmLoading = false; + created() { + }, + methods: { + /** + * 鑾峰彇寰呭姙璁板綍鐨勫熀鏈俊鎭� + * @param record 寰呭姙璁板綍淇℃伅 + */ + getAllApproveData(record) { + console.log('selectShenpiData----->', this.selectShenpiData) + this.flowData = Object.assign({}, record) + const param = { 'procInstId': record.dataId } + getAction(this.url.queryHisTaskList, param) + .then(res => { + this.hitaskDataSource = res.result }) - } + }, - }) - }, - getAllApproveData(item) { - console.log('selectShenpiData----->', this.selectShenpiData) - this.flowData = item - let param = { - 'id': item.dataId - } - let parmhis={ - 'procInstId': item.dataId - } - getAction(this.url.queryHisTaskList,parmhis).then(res=>{ - this.hitaskDataSource=res.result - getAction(this.url.queryBomDataById, param).then((res => { - if (res.success) { - this.tableRowRecord = res.result - console.log('this.tableRowRecord----->', this.tableRowRecord) + /** + * 鑾峰彇寰呭姙璁板綍鐨勫熀鏈俊鎭� + * @param record 寰呭姙璁板綍淇℃伅 + */ + getBasicInformation(record) { + this.spinning = true + const that = this + const param = { id: record.dataId } + this.tableRowRecord = this.approveData = {} + getAction(this.url.queryBomDataById, param) + .then((res => { + if (res.success) { + that.tableRowRecord = res.result + console.log('this.tableRowRecord----->', that.tableRowRecord) + } + })) + .finally(() => { + that.spinning = false + }) + }, + + // 鑾峰彇骞跺睍寮�娴佺▼鍥� + fetchAndShowBmp() { + this.isDisplayBmp = !this.isDisplayBmp + if (!this.imageSrc) { + this.showBmpButtonLoading = true + const that = this + let param = { + processDefinitionId: this.flowData.processDefinitionId, + processInstanceId: this.flowData.processInstanceId, + TaskDefinitionKey: this.flowData.processDefinitionKey } - })) - }).finally( - this.visible = true, - console.log('this.approveData---->', this.approveData) - ) + downFile(this.url.diagramView, param, 'get') + .then((res => { + const urlObject = window.URL.createObjectURL(new Blob([res])) + this.imageSrc = urlObject + })) + .catch(err => { + that.$notification.error({ + message: '娑堟伅', + description: res.message + }) + }) + .finally(() => { + this.showBmpButtonLoading = false + }) + } + }, + + submitForm() { + const that = this + // 瑙﹀彂琛ㄥ崟楠岃瘉 + this.$refs.form.validate(valid => { + if (valid) { + that.confirmLoading = true + const flowTaskVo = {} + flowTaskVo.status = that.approveData.status + flowTaskVo.approveContent = flowTaskVo.comment = that.approveData.approveContent + flowTaskVo.dataId = this.selectShenpiData.dataId + flowTaskVo.taskId = this.selectShenpiData.id + flowTaskVo.userId = flowTaskVo.assignee = this.selectShenpiData.assignee + flowTaskVo.instanceId = this.selectShenpiData.procInstId + flowTaskVo.targetKey = this.selectShenpiData.taskDefKey + flowTaskVo.values = this.selectShenpiData.variables + console.log('琛ㄥ崟鎻愪氦鏁版嵁', flowTaskVo) + // httpAction(this.url.approve, flowTaskVo, 'post') + // .then((res) => { + // if (res.success) { + // that.$message.success(res.message) + // that.$emit('ok') + // } else { + // that.$message.warning(res.message) + // } + // }).finally(() => { + // that.confirmLoading = false + // }) + } else { + return false + } + }) + }, + + handCancel() { + this.visible = false + this.isDisplayBmp = false + this.imageSrc = null + } } } -} </script> <style scoped> -.shallow-hr { - border: 0; - height: 1px; /* 鍒嗙晫绾跨殑楂樺害 */ - background-color: rgba(0, 0, 0, 0.1); /* 浣跨敤 RGBA 棰滆壊锛屽苟璁剧疆杈冧綆鐨勯�忔槑搴� */ - margin: 20px 0; /* 鍒嗙晫绾夸笂涓嬬殑澶栬竟璺� */ -} -.btn-custom { - background-color: #4CAF50; /* 缁胯壊鑳屾櫙 */ - color: white; /* 鐧借壊鏂囧瓧 */ - border: none; /* 鏃犺竟妗� */ - padding: 5px 15px; /* 鍐呰竟璺� */ - text-align: center; /* 鏂囧瓧灞呬腑 */ - text-decoration: none; /* 鏃犱笅鍒掔嚎 */ - display: inline-block; /* 琛屽唴鍧楀厓绱� */ - font-size: 12px; /* 瀛椾綋澶у皬 */ - margin: 4px 2px; /* 澶栬竟璺� */ - cursor: pointer; /* 榧犳爣鎮仠鏃舵樉绀烘墜鍨� */ - border-radius: 4px; /* 鍦嗚杈规 */ -} + .shallow-hr { + border: 0; + height: 1px; /* 鍒嗙晫绾跨殑楂樺害 */ + background-color: rgba(0, 0, 0, 0.1); /* 浣跨敤 RGBA 棰滆壊锛屽苟璁剧疆杈冧綆鐨勯�忔槑搴� */ + margin: 20px 0; /* 鍒嗙晫绾夸笂涓嬬殑澶栬竟璺� */ + } -.bold-large-label { - font-weight: bold; - font-size: 20px; /* 鎴栦綘闇�瑕佺殑浠讳綍澶у皬 */ -} -.left_qiu{ - position: absolute; - left: -74px; - top: 0; - width:54px; - border-radius: 50%; - height:54px; - font-size: 13px; - margin: auto; - display: flex; - flex-wrap: wrap; - align-items: center; - justify-content: center; - background: #0099ff; - transform: translate(0, 0); -} -/deep/ .ant-timeline-item-tail{ - left: -29px !important; -} -.left_qiu span{ - width: 3em; - display: block; - color: #fff; - text-align: center; -} -.img{ - width: 75%; -} + .btn-custom { + background-color: #4CAF50; /* 缁胯壊鑳屾櫙 */ + color: #fff; /* 鐧借壊鏂囧瓧 */ + } -.wrap{ - clear: both; - width: 100%; - display: flex; - height: 50px; - border: 1px solid #ccc; - /* background-color: aqua; */ -} -.box{ - width:21%; - height:50px; - border-right: 1px solid #ccc; - line-height: 50px; - /* background: red; */ - text-align:center; - margin: auto; -} + .left_qiu { + position: absolute; + left: -74px; + top: 0; + width: 54px; + border-radius: 50%; + height: 54px; + font-size: 13px; + margin: auto; + display: flex; + flex-wrap: wrap; + align-items: center; + justify-content: center; + background: #0099ff; + transform: translate(0, 0); + } -@import '~@assets/less/common.less'; + /deep/ .ant-timeline-item-tail { + left: -29px !important; + } + + .left_qiu span { + width: 3em; + display: block; + color: #fff; + text-align: center; + } + + @import '~@assets/less/common.less'; </style> \ No newline at end of file -- Gitblit v1.9.3