From fcb15b6e0f1afa7bc07887ec9580be87700a2764 Mon Sep 17 00:00:00 2001
From: “linengliang” <vanSuperEnergy@163.com>
Date: 星期一, 04 十二月 2023 17:21:06 +0800
Subject: [PATCH] 保养标准
---
src/views/mdc/base/modules/comparativeAnalysis/comparativeAnalysismain.vue | 112 ++++++++++++++++++++++++++++++++++++--------------------
1 files changed, 72 insertions(+), 40 deletions(-)
diff --git a/src/views/mdc/base/modules/comparativeAnalysis/comparativeAnalysismain.vue b/src/views/mdc/base/modules/comparativeAnalysis/comparativeAnalysismain.vue
index a948d79..9f19ba1 100644
--- a/src/views/mdc/base/modules/comparativeAnalysis/comparativeAnalysismain.vue
+++ b/src/views/mdc/base/modules/comparativeAnalysis/comparativeAnalysismain.vue
@@ -1,5 +1,5 @@
<template>
- <a-card :bordered="false" class="device_list">
+ <div :bordered="false" class="device_list">
<div class="com_box">
<!-- 鏌ヨ鍖哄煙 -->
<div style="width: 100%; background-color: #fff" class="table-page-search-wrapper">
@@ -12,9 +12,15 @@
<!--</a-col>-->
<a-col :md="5" :sm="5">
<a-form-item label="椹卞姩绫诲瀷">
- <j-dict-select-tag placeholder="璇烽�夋嫨椹卞姩绫诲瀷"
- :triggerChange="true" dictCode="mdc_driveType"
- v-model="queryParam.driveType" allow-clear/>
+ <!--<j-dict-select-tag placeholder="璇烽�夋嫨椹卞姩绫诲瀷"-->
+ <!--:triggerChange="true" dictCode="mdc_driveType"-->
+ <!--v-model="queryParam.driveType" allow-clear/>-->
+ <a-auto-complete
+ v-model="queryParam.driveType"
+ :data-source="driveTypeList"
+ placeholder="椹卞姩绫诲瀷"
+ :filter-option="filterOption"
+ />
</a-form-item>
</a-col>
<a-col :md="9" :sm="9" :xs="4">
@@ -47,7 +53,7 @@
</div>
<!-- table鍖哄煙-end -->
</div>
- </a-card>
+ </div>
</template>
<script>
@@ -68,6 +74,7 @@
import JEllipsis from '@/components/jeecg/JEllipsis'
import Tooltip from 'ant-design-vue/es/tooltip'
import { ajaxGetDictItems, getDictItemsFromCache, duplicateCheck } from '@/api/api'
+ import api from '@/api/mdc'
export default {
name: 'comparativeAnalysismain',
// mixins: [JeecgListMixin],
@@ -102,7 +109,8 @@
url: {
comparativeAnalysis:'/mdc/efficiencyReport/comparativeAnalysis'
},
- AnalysisList:{}
+ AnalysisList:{},
+ driveTypeList:[]
}
},
watch:{
@@ -128,7 +136,6 @@
}
},
nodePeople(val){
-
if (JSON.stringify(val) != '{}') {
if (val.equipmentId) {
// this.$set(this.queryParam, 'tierName', val.title)
@@ -169,40 +176,46 @@
})
},
searchQuery(){
- this.AnalysisList = []
- this.AnalysisBarList = []
- this.AnalysisGauge = []
- this.AnalysisPie = []
- if(this.queryParams.typeTree == "1"){
- this.queryParams.parentId = this.queryParamEquip.parentId
- // this.queryParams.equipmentId = this.queryParamEquip.equipmentId
-
- }else{
- this.queryParams.parentId = this.queryParamEquip.parentId
-
- // this.queryParams.equipmentId = ""
- }
- this.AnalysisList = [];
- //鑾峰彇鏌ヨ鏉′欢
- this.queryParam.parentId = this.queryParams.parentId;
- this.queryParam.equipmentId = this.queryParams.equipmentId;
- this.queryParam.typeTree = this.queryParams.typeTree
- getAction(this.url.comparativeAnalysis,this.queryParam).then((res) => {
- if(res.success){
- this.AnalysisList = res.result
- this.AnalysisBarList = res.result.graphics
- this.AnalysisGauge = res.result.meters
- this.AnalysisPie.push(res.result.pieCharts)
+ if(this.dates&&this.dates.length>0){
+ this.AnalysisList = []
+ this.AnalysisBarList = []
+ this.AnalysisGauge = []
+ this.AnalysisPie = []
+ if(this.queryParams.typeTree == "1"){
+ this.queryParams.parentId = this.queryParamEquip.parentId
+ // this.queryParams.equipmentId = this.queryParamEquip.equipmentId
}else{
- // this.$message.warning(res.message)
- this.$notification.warning({
- message:'娑堟伅',
- description:res.message
- });
+ this.queryParams.parentId = this.queryParamEquip.parentId
+ // this.queryParams.equipmentId = ""
}
- }).finally(() => {
- this.loading = false
- })
+ this.AnalysisList = []
+ //鑾峰彇鏌ヨ鏉′欢
+ this.queryParam.parentId = this.queryParams.parentId;
+ this.queryParam.equipmentId = this.queryParams.equipmentId;
+ this.queryParam.typeTree = this.queryParams.typeTree
+ getAction(this.url.comparativeAnalysis,this.queryParam).then((res) => {
+ if(res.success){
+ this.AnalysisList = res.result
+ this.AnalysisBarList = res.result.graphics
+ this.AnalysisGauge = res.result.meters
+ this.AnalysisPie.push(res.result.pieCharts)
+ }else{
+ // this.$message.warning(res.message)
+ this.$notification.warning({
+ message:'娑堟伅',
+ description:res.message
+ });
+ }
+ }).finally(() => {
+ this.loading = false
+ })
+ }else{
+ this.$notification.warning({
+ message:'鎻愮ず' ,
+ description:'璇烽�夋嫨鏃堕棿'
+ })
+ }
+
},
searchReset() {
this.AnalysisList = []
@@ -278,7 +291,25 @@
this.loading = false
})
}
-
+ },
+ /**
+ * 璋冪敤鎺ュ彛鑾峰彇鎺у埗绯荤粺绫诲瀷
+ */
+ getDriveTypeByApi(){
+ api.getDriveTypeApi().then((res)=>{
+ this.driveTypeList=res.result.map(item=>item.value)
+ })
+ },
+ /**
+ * 鑱旀兂杈撳叆妗嗙瓫閫夊姛鑳�
+ * @param input 杈撳叆鐨勫唴瀹�
+ * @param option 閰嶇疆
+ * @returns {boolean} 鍒ゆ柇鏄惁绛涢��
+ */
+ filterOption(input, option) {
+ return (
+ option.componentOptions.children[0].text.toUpperCase().indexOf(input.toUpperCase()) >= 0
+ );
},
// onChange(value, dateString) {
// // console.log('Selected Time: ', value);
@@ -398,6 +429,7 @@
this.queryParam.endTime = moment(this.dates[1]).format('YYYYMMDD')
this.queryParam.typeTree = "1";
this.loadAnalysis();
+ this.getDriveTypeByApi()
}
}
</script>
--
Gitblit v1.9.3