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 +++++++++++++++++++++++++++++---------------------------- 1 files changed, 296 insertions(+), 286 deletions(-) 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 -- Gitblit v1.9.3