From 5552a52b7907d85d1dc31db481cb367bad435c7a Mon Sep 17 00:00:00 2001 From: zty Date: Mon, 1 Jul 2024 14:08:01 +0800 Subject: [PATCH] =?UTF-8?q?:feat:consulting/device.view.py=20=E8=AE=BE?= =?UTF-8?q?=E5=A4=87=E5=8F=B0=E8=B4=A6=E6=90=9C=E7=B4=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/dist/index.html | 2 +- client/src/api/device.js | 7 ++ client/src/router/index.js | 2 +- client/src/views/ability/qualityTaskDo.vue | 2 - client/src/views/consulting/device.vue | 86 ++++++++++++++++--- .../informatiomCollect/qualityActive.vue | 64 ++++++++++---- .../informatiomCollect/qualityCommend.vue | 31 ++++++- 7 files changed, 160 insertions(+), 34 deletions(-) diff --git a/client/dist/index.html b/client/dist/index.html index 9c13441..c7fbd95 100644 --- a/client/dist/index.html +++ b/client/dist/index.html @@ -1 +1 @@ -vue Admin Template
\ No newline at end of file +vue Admin Template
\ No newline at end of file diff --git a/client/src/api/device.js b/client/src/api/device.js index fef8206..d688d54 100644 --- a/client/src/api/device.js +++ b/client/src/api/device.js @@ -16,4 +16,11 @@ export function DeviceImp(data) { method: 'post', data }) +} + +export function getDeviceListAll() { + return request({ + url: '/consulting/device/no_page', + method: 'get', + }) } \ No newline at end of file diff --git a/client/src/router/index.js b/client/src/router/index.js index 6f8ef3f..39efd54 100644 --- a/client/src/router/index.js +++ b/client/src/router/index.js @@ -207,7 +207,7 @@ export const asyncRoutes = [ path: 'device', name: 'device', component: () => import('@/views/consulting/device.vue'), - meta: { title: '设备台账', perms: ['policy_view'] } + meta: { title: '设备台账', perms: ['device_view'] } }, { path: 'validation', name: 'validation', diff --git a/client/src/views/ability/qualityTaskDo.vue b/client/src/views/ability/qualityTaskDo.vue index 1cfd1bd..d4785fa 100644 --- a/client/src/views/ability/qualityTaskDo.vue +++ b/client/src/views/ability/qualityTaskDo.vue @@ -379,8 +379,6 @@ this.qtaskId = sessionStorage.getItem('qtaskId'); this.getOptions(); this.getQtaskDept(); - - }, methods: { //领域类型和领域名称 diff --git a/client/src/views/consulting/device.vue b/client/src/views/consulting/device.vue index 676be35..2f07bd9 100644 --- a/client/src/views/consulting/device.vue +++ b/client/src/views/consulting/device.vue @@ -17,6 +17,7 @@ icon="el-icon-upload" :disabled="checkPermission['device_import']" >导入Excel + 清除所有过滤器 - - + - - + - - + - - + - - + @@ -59,8 +85,13 @@ - - + @@ -145,6 +176,7 @@ import { getDeviceList, DeviceImp, + getDeviceListAll, } from "@/api/device"; import checkPermission from "@/utils/permission"; import Pagination from "@/components/Pagination"; // secondary package based on el-pagination @@ -163,6 +195,12 @@ export default { fileList:[], Content: defaultContent, listLoading:false, + devicelist:[], + companylist:[], + speclist:[], + procurement_timelist:[], + manufactorlist:[], + dec_parameterlist:[], dialogVisible: false, listQuery: { page: 1, @@ -178,6 +216,9 @@ export default { }, }; }, + mounted(){ + this.getALLData(); + }, computed: {}, watch: { filterOrgText(val) { @@ -209,6 +250,10 @@ export default { that.Content.excel_path = null; } }, + filterHandler(value, row, column) { + const property = column['property']; + return row[property] === value; + }, importExcel(){ this.dialogVisible = true; }, @@ -223,6 +268,23 @@ export default { } }); }, + clearFilter() { + this.getList(); + this.$refs.filterTable.clearFilter(); + }, + getALLData(){ + getDeviceListAll().then((response) => { + if (response.data){ + this.devicelist = Array.from(new Set(response.data.map(item => JSON.stringify({text:item.device_name, value:item.device_name})))).map(item => JSON.parse(item)); + this.companylist = Array.from(new Set(response.data.map(item => JSON.stringify({text:item.company_name, value:item.company_name})))).map(item => JSON.parse(item)); + this.speclist = Array.from(new Set(response.data.map(item => JSON.stringify({text:item.spec, value:item.spec})))).map(item => JSON.parse(item)); + this.procurement_timelist = Array.from(new Set(response.data.map(item => JSON.stringify({text:item.procurement_time, value:item.procurement_time})))).map(item => JSON.parse(item)); + this.manufactorlist = Array.from(new Set(response.data.map(item => JSON.stringify({text:item.manufactor, value:item.manufactor})))).map(item => JSON.parse(item)); + this.dec_parameterlist = Array.from(new Set(response.data.map(item => JSON.stringify({text:item.dec_parameter, value:item.dec_parameter})))).map(item => JSON.parse(item)); + } + }); + + }, async confirm(){ let that = this; this.dialogVisible = false; diff --git a/client/src/views/informatiomCollect/qualityActive.vue b/client/src/views/informatiomCollect/qualityActive.vue index 6ba8981..e31453a 100644 --- a/client/src/views/informatiomCollect/qualityActive.vue +++ b/client/src/views/informatiomCollect/qualityActive.vue @@ -23,11 +23,11 @@ - +