From 232febf29b40995d7cdef2a6e5a7a4c1e8668008 Mon Sep 17 00:00:00 2001 From: zhangherong <571457620@qq.com> Date: 星期一, 03 三月 2025 14:51:42 +0800 Subject: [PATCH] art: 【设备台账-新增】页面,点击“设备所属分类”下拉选项,已经删除的“设备分类”仍显示,有误! --- src/views/eam/EquipmentListOfAll.vue | 158 ++++++++++++++++++++++++++++++++++++++++++---------- 1 files changed, 128 insertions(+), 30 deletions(-) diff --git a/src/views/eam/EquipmentListOfAll.vue b/src/views/eam/EquipmentListOfAll.vue index b1edc06..39acaef 100644 --- a/src/views/eam/EquipmentListOfAll.vue +++ b/src/views/eam/EquipmentListOfAll.vue @@ -1,7 +1,7 @@ <template> <a-card :bordered="false" - title="鎵�鏈夎澶�" + title="" > <!-- 鏌ヨ鍖哄煙 --> <div class="table-page-search-wrapper"> @@ -20,7 +20,7 @@ :wrapperCol="wrapperCol" > <a-textarea - placeholder="璇疯緭鍏ユ墍鏈夌粺涓�缂栫爜,椤荤敤绌烘牸闅斿紑,鍚﹀垯鍙兘鏌ヨ鍑洪敊璇俊鎭�" + placeholder="璇疯緭鍏ユ墍鏈夌粺涓�缂栫爜,姣忎釜缁熶竴缂栫爜鍗犵敤涓�琛�,鍚﹀垯鏌ヨ淇℃伅鍙兘浼氬嚭閿�" v-model="queryParam.nums" :auto-size="{ minRows: 2, maxRows:2 }" ></a-textarea> @@ -35,7 +35,7 @@ :wrapperCol="wrapperCol" > <j-dict-select-tag - dictCode="mom_eam_equipment_category,name,id" + dictCode="mom_eam_equipment_category,name,id,del_flag!='1'" placeholder="璇疯緭鍏ユ悳绱㈡潯浠跺苟閫夋嫨" v-model="queryParam.equipmentCategoryId" /> @@ -89,7 +89,7 @@ allow-clear placeholder="璇烽�夋嫨宸ュ尯" :triggerChange="true" - dictCode="mom_base_area,name,id,del_flag!='1'" + dictCode="mom_base_area,name,id,del_flag!='1' and type = '2'" v-model="queryParam.factoryModelId" /> </a-form-item> @@ -115,12 +115,17 @@ :labelCol="labelCol" :wrapperCol="wrapperCol" > - <a-tree-select + <!-- <a-tree-select style="width: 100%" :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }" :tree-data="treeData" placeholder="璇烽�夋嫨缁存姢閮ㄩ棬" tree-default-expand-all + v-model="queryParam.manageId" + /> --> + <j-dict-select-tag + dictCode="sys_depart,depart_name,id" + placeholder="璇烽�夋嫨缁存姢閮ㄩ棬" v-model="queryParam.manageId" /> </a-form-item> @@ -131,12 +136,17 @@ :labelCol="labelCol" :wrapperCol="wrapperCol" > - <a-tree-select + <!-- <a-tree-select style="width: 100%" :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }" :tree-data="treeData" placeholder="璇烽�夋嫨浣跨敤閮ㄩ棬" tree-default-expand-all + v-model="queryParam.useId" + /> --> + <j-dict-select-tag + dictCode="sys_depart,depart_name,id" + placeholder="璇烽�夋嫨浣跨敤閮ㄩ棬" v-model="queryParam.useId" /> </a-form-item> @@ -326,6 +336,11 @@ icon="calendar" v-has="'equipmentAccount:add&delete&import&Edit'" >璁剧疆鍏抽敭璁惧鏍囪瘑</a-button> + <a-button + type="primary" + @click="handleDownload" + icon="download" + >妯$増涓嬭浇</a-button> </div> <!-- table鍖哄煙-begin --> <div> @@ -354,7 +369,16 @@ :customRow="clickThenSelect" @change="handleTableChange" > - + <!-- 鐐瑰嚮鎶�鏈姸鎬佸垪锛岃烦杞埌鎶�鏈姸鎬侀壌瀹氶〉闈� --> + <template + slot="technologyStatus" + slot-scope="text,record" + > + <a + href="javascript:eam/EquipmentCalibrationOrder;" + @click="handleTechnologyStatus(record)" + >{{record.technologyStatus_dictText}}</a> + </template> <template slot="htmlSlot" slot-scope="text" @@ -483,6 +507,26 @@ class="error" >鍚�</span> </span> + + <span + slot="name" + slot-scope="text" + > + <j-ellipsis + :value="text" + :length="8" + /> + </span> + + <template + slot="num" + slot-scope="text,record" + > + <a + href="javascript:;" + @click="handleDetail(record)" + >{{record.num}}</a> + </template> <span slot="action" @@ -647,8 +691,9 @@ import { JeecgListMixin } from '@/mixins/JeecgListMixin' import { mixinDevice } from '@/utils/mixin' +import JEllipsis from '@/components/jeecg/JEllipsis' import EquipmentModal from './modules/equipmentNew/EquipmentModal' -import { getAction } from '@/api/manage' +import { getAction, downFile } from '@/api/manage' import EquipmentProcessParametersList from './modules/equipmentNew/EquipmentProcessParametersList' import EquipmentDocumentList from './modules/equipmentNew/EquipmentDocumentList' import EquipmentPrecisionParametersList from './modules/equipmentNew/EquipmentPrecisionParametersList' @@ -694,6 +739,7 @@ SecondMaintenanceList, ThirdMaintenanceList, KeyEquipmentUpdateModel, + JEllipsis, }, data() { return { @@ -722,14 +768,21 @@ dataIndex: 'isLineEquip_dictText', }, { + title: '鍏抽敭璁惧鏍囪瘑', + align: "center", + dataIndex: 'specificEquipment_dictText', + }, + { title: '缁熶竴缂栫爜', align: "center", dataIndex: 'num', + scopedSlots: { customRender: 'num' }, }, { title: '璁惧鍚嶇О', align: "center", dataIndex: 'name', + scopedSlots: { customRender: 'name' }, }, { title: '鍨嬪彿', @@ -751,37 +804,38 @@ align: "center", dataIndex: 'useId_dictText', }, - { - title: '缁存姢閮ㄩ棬', - align: "center", - dataIndex: 'manageId_dictText', - }, - { - title: '缁翠慨鐝粍', - align: "center", - dataIndex: 'teamId_dictText', - }, + // { + // title: '缁存姢閮ㄩ棬', + // align: "center", + // dataIndex: 'manageId_dictText', + // }, + // { + // title: '缁翠慨鐝粍', + // align: "center", + // dataIndex: 'teamId_dictText', + // }, { title: 'ABC鏍囪瘑', align: "center", dataIndex: 'equipmentImportanceId', }, - { - title: '鍏抽敭璁惧鏍囪瘑', - align: "center", - dataIndex: 'specificEquipment_dictText', - }, + { title: '鎶�鏈姸鎬�', align: "center", dataIndex: 'technologyStatus_dictText', + scopedSlots: { customRender: 'technologyStatus' }, }, { title: '鎶�鏈姸鎬侀壌瀹氱被鍨�', align: "center", dataIndex: 'technologyStatusVerificationType_dictText', }, - + { + title: '涓嬫鎶�鏈姸鎬侀壌瀹氭椂闂�', + align: "center", + dataIndex: 'nextTechnologyStatusQualificationTime', + }, { title: '鐢熶骇绾跨紪鍙�', align: "center", @@ -808,11 +862,7 @@ // dataIndex: 'fireExtinguisher', // }, - // { - // title: '鐏伀鍣ㄦ湁鏁堟湡', - // align: "center", - // dataIndex: 'fireExtinguisherValidityPeriod', - // }, + // { // title: '鎿嶄綔绯荤粺', // align: "center", @@ -932,13 +982,15 @@ }, ], url: { - list: "/eam/equipment/getEquipmentList", + list: "/eam/equipment/getEquipmentTZList", delete: "/eam/equipment/delete", deleteBatch: "/eam/equipment/deleteBatch", active: "/eam/equipment/active", exportXlsUrl: '/eam/equipment/exportXls', importExcelUrl: "/eam/equipment/importExcel", loadOptions: '/sys/sysDepart/loadDepartTreeOptions', + uploadList: '/sys/upload/list', + download: '/sys/upload/downloadFile', }, dictOptions: { }, @@ -1128,6 +1180,52 @@ handleUpdateKeyEquipment() { this.$refs.keyEquipmentUpdate.add(); }, + //鎶�鏈姸鎬佽烦杞� + handleTechnologyStatus(record) { + //璺敱鏄痚am/EquipmentCalibrationOrder + this.$router.push({ + path: '/eam/EquipmentCalibrationOrder', + query: { + equipmentId: record.id, + technologyStatus: record.technologyStatus, + technologyStatusVerificationType: record.technologyStatusVerificationType, + } + }) + }, + + handleDownload() { + var params = {}//鏌ヨ鏉′欢 + params.type = "equipment" + params.pageNo = 1 + params.pageSize = 10 + getAction(this.url.uploadList, params).then((res2) => { + if (res2.success) { + if (res2.result.records.length > 0) { + downFile(this.url.download, { id: res2.result.records[0].id }).then((res) => { + if (!res) { + this.$message.warning('鏂囦欢涓嬭浇澶辫触') + return + } else { + let fileName = res2.result.records[0].name + if (typeof window.navigator.msSaveBlob !== 'undefined') { + window.navigator.msSaveBlob(new Blob([res]), fileName) + } else { + let url = window.URL.createObjectURL(new Blob([res])) + let link = document.createElement('a') + link.style.display = 'none' + link.href = url + link.setAttribute('download', fileName) + document.body.appendChild(link) + link.click() + document.body.removeChild(link) //涓嬭浇瀹屾垚绉婚櫎鍏冪礌 + window.URL.revokeObjectURL(url) //閲婃斁鎺塨lob瀵硅薄 + } + } + }) + } + } + }) + }, } } </script> -- Gitblit v1.9.3