From 65a5e8c7ec6d6eab78b76c5831eaf40c30e23c61 Mon Sep 17 00:00:00 2001 From: zhaowei <zhaowei> Date: 星期五, 13 九月 2024 14:56:50 +0800 Subject: [PATCH] 1、设备管理页面设备种类字段改成重要程度字段;新增设备异常状态字段,若表格记录的设备状态不为正常时,则标红此表格记录 2、设备利用率、设备开动率、班次利用率以及设备综合效率分析新增按照重要程度字段查询表格数据;左侧树数据新增参数key,用来过滤异常状态设备 3、设备利用率页面新增设备型号字段 --- src/views/mdc/base/EquipmentList.vue | 148 +++++++++++++++++++++++++++++++++++-------------- 1 files changed, 106 insertions(+), 42 deletions(-) diff --git a/src/views/mdc/base/EquipmentList.vue b/src/views/mdc/base/EquipmentList.vue index 009143b..d254554 100644 --- a/src/views/mdc/base/EquipmentList.vue +++ b/src/views/mdc/base/EquipmentList.vue @@ -6,19 +6,19 @@ <a-form layout="inline" @keyup.enter.native="searchQuery"> <a-row :gutter="24"> - <a-col :md="4" :sm="4"> + <a-col :md="6" :sm="6"> <a-form-item label="璁惧缂栧彿"> <a-input placeholder="璇疯緭鍏ヨ澶囩紪鍙�" v-model="queryParam.equipmentId"></a-input> </a-form-item> </a-col> - <a-col :md="4" :sm="4"> + <a-col :md="6" :sm="6"> <a-form-item label="璁惧鍚嶇О"> <a-input placeholder="璇疯緭鍏ヨ澶囧悕绉�" v-model="queryParam.equipmentName"></a-input> </a-form-item> </a-col> - <a-col :md="4" :sm="4"> + <a-col :md="6" :sm="6"> <a-form-item label="杞﹂棿鍚嶇О"> <!--<a-input placeholder="璇疯緭鍏ヨ溅闂村悕绉�" v-model="queryParam.productionName"></a-input>--> <a-tree-select v-model="queryParam.productionName" :treeData="workshopTreeData" placeholder="璇烽�夋嫨杞﹂棿" @@ -26,29 +26,45 @@ </a-form-item> </a-col> - <a-col :md="4" :sm="4"> - <a-form-item label="璁惧绾у埆"> - <j-dict-select-tag placeholder="璇烽�夋嫨璁惧绾у埆" dictCode="device_level" v-model="queryParam.deviceLevel" - allow-clear/> - </a-form-item> - </a-col> + <template v-if="toggleSearchStatus"> + <a-col :md="6" :sm="6"> + <a-form-item label="璁惧绾у埆"> + <j-dict-select-tag placeholder="璇烽�夋嫨璁惧绾у埆" dictCode="device_level" v-model="queryParam.deviceLevel" + allow-clear/> + </a-form-item> + </a-col> + <a-col :md="6" :sm="6"> + <a-form-item label="璁惧绉嶇被"> + <j-dict-select-tag placeholder="璇烽�夋嫨璁惧绉嶇被" dictCode="device_category" v-model="queryParam.deviceCategory" + allow-clear/> + </a-form-item> + </a-col> - <a-col :md="4" :sm="4"> - <a-form-item label="璁惧绉嶇被"> - <j-dict-select-tag placeholder="璇烽�夋嫨璁惧绉嶇被" dictCode="device_category" v-model="queryParam.deviceCategory" - allow-clear/> - </a-form-item> - </a-col> + <a-col :md="6" :sm="6"> + <a-form-item label="寮傚父鐘舵��"> + <j-dict-select-tag placeholder="璇烽�夋嫨璁惧寮傚父鐘舵��" dictCode="device_abnormal_status" + v-model="queryParam.deviceAbnormalStatus" + allow-clear/> + </a-form-item> + </a-col> + </template> - <a-col :md="4" :sm="4"> + <a-col :md="6" :sm="6"> <a-button type="primary" @click="searchQuery" icon="search">鏌ヨ</a-button> <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">閲嶇疆</a-button> + <a + @click="toggleSearchStatus=!toggleSearchStatus" + style="margin-left: 8px" + > + {{ toggleSearchStatus ? '鏀惰捣' : '灞曞紑' }} + <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/> + </a> </a-col> </a-row> </a-form> </div> - <!-- 鎿嶄綔鎸夐挳鍖哄煙 --> + <!-- 鎿嶄綔鎸夐挳鍖哄煙路 --> <div class="table-operator" style="border-top: 5px"> <a-button @click="handleAdd" type="primary" icon="plus">娣诲姞璁惧</a-button> <a-button type="primary" icon="download" @click="handleExportXls('璁惧淇℃伅')">瀵煎嚭</a-button> @@ -86,6 +102,33 @@ :loading="loading" :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" @change="handleTableChange"> + <!--<template slot="equipmentId" slot-scope="text,record">--> + <!--<div :style="{color:record.deviceAbnormalStatus===1?null:'#f00'}">{{text}}</div>--> + <!--</template>--> + <!--<template slot="equipmentName" slot-scope="text,record">--> + <!--<div :style="{color:record.deviceAbnormalStatus===1?null:'#f00'}">{{text}}</div>--> + <!--</template>--> + <!--<template slot="productionName" slot-scope="text,record">--> + <!--<div :style="{color:record.deviceAbnormalStatus===1?null:'#f00'}">{{text}}</div>--> + <!--</template>--> + <!--<template slot="equipmentType" slot-scope="text,record">--> + <!--<div :style="{color:record.deviceAbnormalStatus===1?null:'#f00'}">{{text}}</div>--> + <!--</template>--> + <!--<template slot="driveType" slot-scope="text,record">--> + <!--<div :style="{color:record.deviceAbnormalStatus===1?null:'#f00'}">{{text}}</div>--> + <!--</template>--> + <!--<template slot="equipmentIp" slot-scope="text,record">--> + <!--<div :style="{color:record.deviceAbnormalStatus===1?null:'#f00'}">{{text}}</div>--> + <!--</template>--> + <!--<template slot="devicePower" slot-scope="text,record">--> + <!--<div :style="{color:record.deviceAbnormalStatus===1?null:'#f00'}">{{text}}</div>--> + <!--</template>--> + <!--<template slot="systemVersion" slot-scope="text,record">--> + <!--<div :style="{color:record.deviceAbnormalStatus===1?null:'#f00'}">{{text}}</div>--> + <!--</template>--> + <template slot="deviceAbnormalStatus" slot-scope="text,record"> + <div :style="{color:text&&text!==1?'#f00':null}">{{record.deviceAbnormalStatus_dictText}}</div> + </template> <span slot="action" slot-scope="text, record"> <a @click="handleEdit(record)">缂栬緫</a> @@ -108,8 +151,6 @@ </a-menu> </a-dropdown> </span> - - </a-table> </div> <!-- table鍖哄煙-end --> @@ -124,11 +165,13 @@ import { JeecgListMixin } from '@/mixins/JeecgListMixin' import { queryProductionTreeList } from '@/api/api' import { mapActions } from 'vuex' + import Template1 from '../../jeecg/JVxeDemo/layout-demo/Template1' export default { name: 'EquipmentList', mixins: [JeecgListMixin], components: { + Template1, UserModal }, data() { @@ -164,6 +207,7 @@ align: 'center', dataIndex: 'equipmentId', width: 200 + // sorter: true }, { title: '璁惧鍚嶇О', @@ -180,14 +224,16 @@ { title: '璁惧绫诲瀷', align: 'center', - width: 200, + width: 180, dataIndex: 'equipmentType' }, + { title: '椹卞姩绫诲瀷', align: 'center', width: 200, dataIndex: 'driveType' + // sorter: true }, { title: '鏈哄簥IP', @@ -198,21 +244,26 @@ { title: '璁惧鍔熺巼', align: 'center', - width: 200, + width: 150, dataIndex: 'devicePower' }, - { - title: '閮ㄩ棬', - align: 'center', - width: 200, - dataIndex: 'orgCodeTxt' - }, - + // { + // title: '閮ㄩ棬', + // align: "center", + // width: 200, + // dataIndex: 'orgCodeTxt' + // }, { title: '绯荤粺鐗堟湰', align: 'center', - width: 200, + width: 150, dataIndex: 'systemVersion' + }, + { + title: '寮傚父鐘舵��', + align: 'center', + width: 100, + dataIndex: 'deviceAbnormalStatus' }, { title: '鎿嶄綔', @@ -222,7 +273,6 @@ width: 150, fixed: 'right' } - ], url: { list: '/mdc/mdcEquipment/list', @@ -261,46 +311,53 @@ title: '璁惧缂栧彿', align: 'center', dataIndex: 'equipmentId', - width: 200 + width: 200, + scopedSlots: { customRender: 'equipmentId' } // sorter: true }, { title: '璁惧鍚嶇О', align: 'center', width: 200, - dataIndex: 'equipmentName' + dataIndex: 'equipmentName', + scopedSlots: { customRender: 'equipmentName' } }, { title: '杞﹂棿', align: 'center', width: 200, - dataIndex: 'productionName' + dataIndex: 'productionName', + scopedSlots: { customRender: 'productionName' } }, { title: '璁惧绫诲瀷', align: 'center', - width: 200, - dataIndex: 'equipmentType' + width: 180, + dataIndex: 'equipmentType', + scopedSlots: { customRender: 'equipmentType' } }, { title: '椹卞姩绫诲瀷', align: 'center', width: 200, - dataIndex: 'driveType' + dataIndex: 'driveType', + scopedSlots: { customRender: 'driveType' } // sorter: true }, { title: '鏈哄簥IP', align: 'center', width: 200, - dataIndex: 'equipmentIp' + dataIndex: 'equipmentIp', + scopedSlots: { customRender: 'equipmentIp' } }, { title: '璁惧鍔熺巼', align: 'center', - width: 200, - dataIndex: 'devicePower' + width: 150, + dataIndex: 'devicePower', + scopedSlots: { customRender: 'devicePower' } }, // { // title: '閮ㄩ棬', @@ -308,12 +365,19 @@ // width: 200, // dataIndex: 'orgCodeTxt' // }, - { title: '绯荤粺鐗堟湰', align: 'center', - width: 200, - dataIndex: 'systemVersion' + width: 150, + dataIndex: 'systemVersion', + scopedSlots: { customRender: 'systemVersion' } + }, + { + title: '寮傚父鐘舵��', + align: 'center', + width: 100, + dataIndex: 'deviceAbnormalStatus', + scopedSlots: { customRender: 'deviceAbnormalStatus' } }, { title: '鎿嶄綔', -- Gitblit v1.9.3