From 73b4af8accf59b71bf7e5856cfe40d45a3e3e84e Mon Sep 17 00:00:00 2001 From: zhaowei <zhaowei> Date: 星期五, 27 九月 2024 16:26:52 +0800 Subject: [PATCH] 1、设备综合效率分析页面新增百分比筛选查询 2、新增OEE统计页面并完成相应功能 --- src/views/mdc/base/modules/OEEAnalysis/OEEAnalysisList.vue | 189 ++++++++++++++++++++++++++++++++-------------- 1 files changed, 131 insertions(+), 58 deletions(-) diff --git a/src/views/mdc/base/modules/OEEAnalysis/OEEAnalysisList.vue b/src/views/mdc/base/modules/OEEAnalysis/OEEAnalysisList.vue index 67b8784..760f961 100644 --- a/src/views/mdc/base/modules/OEEAnalysis/OEEAnalysisList.vue +++ b/src/views/mdc/base/modules/OEEAnalysis/OEEAnalysisList.vue @@ -5,7 +5,7 @@ <div class="table-page-search-wrapper"> <a-form layout="inline" @keyup.enter.native="searchQuery"> <a-row :gutter="24"> - <a-col :md="5" :sm="5" :xs="5"> + <a-col :md="6" :sm="6" :xs="6"> <a-form-item label="璁惧绫诲瀷"> <a-select :value="queryParams.equipmentType" @@ -21,7 +21,7 @@ </a-select> </a-form-item> </a-col> - <a-col :md="5" :sm="5" :xs="5"> + <a-col :md="6" :sm="6" :xs="6"> <a-form-item label="椹卞姩绫诲瀷"> <a-select :value="queryParams.driveType" @@ -32,38 +32,6 @@ @change="selectChange($event,'driveType')" > <a-select-option v-for="(item,index) in driveTypeList" :value="item.value" :key="index"> - {{item.label}} - </a-select-option> - </a-select> - </a-form-item> - </a-col> - <a-col :md="4" :sm="4" :xs="4"> - <a-form-item label="璁惧绾у埆"> - <a-select - :value="queryParams.deviceLevel" - mode="multiple" - placeholder="璇烽�夋嫨璁惧绾у埆" - allow-clear - :maxTagCount="1" - @change="selectChange($event,'deviceLevel')" - > - <a-select-option v-for="(item,index) in device_level_list" :value="item.value" :key="index"> - {{item.label}} - </a-select-option> - </a-select> - </a-form-item> - </a-col> - <a-col :md="5" :sm="5" :xs="5"> - <a-form-item label="璁惧绉嶇被"> - <a-select - :value="queryParams.deviceCategory" - mode="multiple" - placeholder="璇烽�夋嫨璁惧绉嶇被" - allow-clear - :maxTagCount="1" - @change="selectChange($event,'deviceCategory')" - > - <a-select-option v-for="(item,index) in device_category_list" :value="item.value" :key="index"> {{item.label}} </a-select-option> </a-select> @@ -81,7 +49,103 @@ /> </a-form-item> </a-col> + <!-- <a-col :md="5" :sm="5" :xs="5">--> + <!-- <a-form-item label="璁惧绉嶇被">--> + <!-- <a-select--> + <!-- :value="queryParams.deviceCategory"--> + <!-- mode="multiple"--> + <!-- placeholder="璇烽�夋嫨璁惧绉嶇被"--> + <!-- allow-clear--> + <!-- :maxTagCount="1"--> + <!-- @change="selectChange($event,'deviceCategory')"--> + <!-- >--> + <!-- <a-select-option v-for="(item,index) in device_category_list" :value="item.value" :key="index">--> + <!-- {{item.label}}--> + <!-- </a-select-option>--> + <!-- </a-select>--> + <!-- </a-form-item>--> + <!-- </a-col>--> + <a-col :md="5" :sm="5" :xs="5"> + <a-form-item label="璁惧绾у埆"> + <a-select + :value="queryParams.deviceLevel" + mode="multiple" + placeholder="璇烽�夋嫨璁惧绾у埆" + allow-clear + :maxTagCount="1" + @change="selectChange($event,'deviceLevel')" + > + <a-select-option v-for="(item,index) in device_level_list" :value="item.value" :key="index"> + {{item.label}} + </a-select-option> + </a-select> + </a-form-item> + </a-col> + <a-col :md="2" :sm="2"> + <a + @click="toggleSearchStatus=!toggleSearchStatus" + @selectstart="$event.preventDefault()" + style="display: inline-block;height: 32px;line-height: 32px" + > + {{ toggleSearchStatus ? '鏀惰捣' : '灞曞紑' }} + <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/> + </a> + </a-col> + </a-row> + <a-row :gutter="24" v-if="toggleSearchStatus"> + + <!--<a-col :md="5" :sm="5" :xs="5">--> + <!--<a-form-item label="鏁版嵁鍒嗗竷">--> + <!--<a-select--> + <!--:value="queryParams.deviceLevel"--> + <!--mode="multiple"--> + <!--placeholder="璇烽�夋嫨鏁版嵁鍒嗗竷"--> + <!--allow-clear--> + <!--:maxTagCount="1"--> + <!--@change="selectChange($event,'deviceLevel')"--> + <!-->--> + <!--<a-select-option v-for="(item,index) in device_level_list" :value="item.value" :key="index">--> + <!--{{item.label}}--> + <!--</a-select-option>--> + <!--</a-select>--> + <!--</a-form-item>--> + <!--</a-col>--> + <a-col :md="6" :sm="6" :xs="6"> + <a-form-item label="閲嶈绋嬪害"> + <a-select + :value="queryParams.deviceImportanceLevel" + mode="multiple" + placeholder="璇烽�夋嫨璁惧閲嶈绋嬪害" + allow-clear + :maxTagCount="1" + @change="selectChange($event,'deviceImportanceLevel')" + > + <a-select-option v-for="(item,index) in device_importance_level_list" :value="item.value" + :key="index"> + {{item.label}} + </a-select-option> + </a-select> + </a-form-item> + </a-col> + + <a-col :md="6" :sm="6" :xs="6"> + <a-form-item label="鐧惧垎姣旂瓫閫�"> + <a-select + :value="queryParams.percentageLevel" + mode="multiple" + placeholder="璇烽�夋嫨鐧惧垎姣旂瓫閫�" + allow-clear + :maxTagCount="1" + @change="selectChange($event,'percentageLevel')" + > + <a-select-option v-for="(item,index) in percentage_level_list" :value="item.value" + :key="index"> + {{item.label}} + </a-select-option> + </a-select> + </a-form-item> + </a-col> </a-row> <a-row :gutter="24" style="margin-bottom: 20px"> @@ -106,7 +170,7 @@ :loading="tableLoading" :pagination="false" :scroll="{x:'max-content',y:scrollY}" bordered> <!--<template slot="equipmentModel" slot-scope="text, record">--> - <!--<editable-cell :text="text" @change="onCellChange(record.id, 'equipmentModel', $event)"/>--> + <!--<editable-cell :text="text" @change="onCellChange(record.id, 'equipmentModel', $event)"/>--> <!--</template>--> </a-table> </div> @@ -138,7 +202,7 @@ export default { name: 'OEEAnalysisList', - components: { }, + components: {}, data() { return { dates: [moment().subtract('month', 1), moment().subtract('month', 1)], @@ -150,7 +214,9 @@ equipmentType: [], driveType: [], deviceLevel: [], - deviceCategory: [] + deviceCategory: [], + deviceImportanceLevel: [], + percentageLevel: [] }, queryParamEquip: {}, queryParamPeople: {}, @@ -163,7 +229,7 @@ title: '搴忓彿', dataIndex: '', key: 'rowIndex', - width: 70, + width: 60, align: 'center', customRender: function(t, r, index) { return parseInt(index) + 1 @@ -173,10 +239,10 @@ title: '杞﹂棿', align: 'center', dataIndex: 'productionName', - width: 200 + width: 110 }, { - title: '璁惧缁熶竴缂栧彿', + title: '璁惧缂栧彿', align: 'center', dataIndex: 'equipmentId', width: 120 @@ -184,13 +250,13 @@ { title: '璁惧鍚嶇О', align: 'center', - width: 200, + width: 120, dataIndex: 'equipmentName' }, { title: '璁惧鍨嬪彿', align: 'center', - width: 200, + width: 120, dataIndex: 'equipmentModel', scopedSlots: { customRender: 'equipmentModel' } }, @@ -203,32 +269,32 @@ { title: '鐝', align: 'center', - width: 300, + width: 100, dataIndex: 'shift' }, { title: '姣忕彮灏忔椂', dataIndex: 'shiftTimeCount', align: 'center', - width: 110 + width: 100 }, { title: '鍔犵彮鏃堕棿锛堝垎閽燂級', dataIndex: 'overtime', align: 'center', - width: 110 + width: 100 }, { title: '瀹為檯鐝骇澶╂暟', dataIndex: 'actualWorkDayCount', align: 'center', - width: 120 + width: 100 }, { title: '鏈堝害瀹為檯鐝骇鎬绘椂闂达紙鍒嗛挓锛�', dataIndex: 'monthActualWorkDayTimeCount', align: 'center', - width: 110 + width: 100 }, { title: '闈炶鍒掑仠鏈烘崯澶憋紙鍒嗛挓锛夛紙涓�涓湀锛�', @@ -255,7 +321,7 @@ title: '璁″垝绛変换鍔�', dataIndex: 'plannedTaskDuration', align: 'center', - width: 110 + width: 100 }, { title: '妫�楠�', @@ -284,26 +350,26 @@ title: '浼氳/鍩硅', dataIndex: 'conferenceTrainingDuration', align: 'center', - width: 110 + width: 100 }, { title: '鍏朵粬浼戞伅绛�', dataIndex: 'otherRestDuration', align: 'center', - width: 110 + width: 100 }] }, { title: '璐熻嵎鏃堕棿锛堝皬鏃讹級', dataIndex: 'loadTime', align: 'center', - width: 110 + width: 100 }, { title: '鏃堕棿寮�鍔ㄧ巼', dataIndex: 'timeActuationRate', align: 'center', - width: 110, + width: 100, customRender: text => text != 0 ? parseFloat((text * 100).toFixed(2)) + '%' : 0 }, // { @@ -322,7 +388,7 @@ title: '鎬ц兘寮�鍔ㄧ巼', dataIndex: 'performanceRate', align: 'center', - width: 110, + width: 100, customRender: text => text != 0 ? parseFloat((text * 100).toFixed(2)) + '%' : 0 }, { @@ -342,7 +408,7 @@ title: '璁惧缁煎悎鏁堢巼', dataIndex: 'overallEquipmentEfficiency', align: 'center', - width: 120, + width: 100, customRender: text => text != 0 ? parseFloat((text * 100).toFixed(2)) + '%' : 0 } ], @@ -351,8 +417,10 @@ equipmentTypeList: [], device_level_list: [], device_category_list: [], + percentage_level_list: [], scrollY: 465, - tableLoading: false + tableLoading: false, + toggleSearchStatus: false } }, props: { nodeTree: '', Type: '', nodePeople: '' }, @@ -373,6 +441,8 @@ this.queryGroup() this.initDictData('device_level') this.initDictData('device_category') + this.initDictData('device_importance_level') + this.initDictData('percentage_level') }, mounted() { window.addEventListener('resize', this.handleWindowResize) @@ -467,9 +537,12 @@ this.queryParam.equipmentId = '' } Object.keys(this.queryParams).forEach(item => { - this.queryParam[item] = this.queryParams[item].join() - // 姝ゅ涓轰繚璇佹帴鍙e弬鏁颁笉澶氫綑锛屽彲鐪佺暐 - if (this.queryParams[item].length === 0) delete this.queryParam[item] + if (Array.isArray(this.queryParams[item])) { + // 姝ゅ涓轰繚璇佹帴鍙e弬鏁颁笉澶氫綑锛屽彲鐪佺暐 + this.queryParam[item] = this.queryParams[item].join() + if (this.queryParams[item].length === 0) delete this.queryParam[item] + console.log('this.queryParam', this.queryParam) + } }) this.loadData() }, -- Gitblit v1.9.3