|
@@ -54,9 +54,9 @@
|
|
|
popper-class="search-select"
|
|
|
:options="cascaderOptions"
|
|
|
:props="cascaderProps"
|
|
|
- v-model="cascaderSel"
|
|
|
+ @change="getCascaderChange"
|
|
|
collapse-tags
|
|
|
- :clearable="true"
|
|
|
+ clearable
|
|
|
></el-cascader>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -112,35 +112,27 @@
|
|
|
custom-class="modal"
|
|
|
:close-on-click-modal="false"
|
|
|
>
|
|
|
- <div class="searchForm">
|
|
|
- <el-select
|
|
|
- @change="searchTime(selectValue)"
|
|
|
- class="inputs"
|
|
|
- v-model="selectValue"
|
|
|
- placeholder="请选择"
|
|
|
- >
|
|
|
- <el-option
|
|
|
- v-for="item in timeoptions"
|
|
|
- :key="item.value"
|
|
|
- :label="item.label"
|
|
|
- :value="item.value"
|
|
|
+ <div class="searchForm">
|
|
|
+ <el-select
|
|
|
+ @change="searchTime(selectValue)"
|
|
|
+ class="inputs"
|
|
|
+ v-model="selectValue"
|
|
|
+ placeholder="请选择"
|
|
|
>
|
|
|
- </el-option>
|
|
|
- </el-select>
|
|
|
- <div class="choose">
|
|
|
- <button class="btn"
|
|
|
- @click="switchChange(60)"
|
|
|
- >
|
|
|
- 等间隔
|
|
|
- </button>
|
|
|
- <button class="btn"
|
|
|
- @click="switchChange(0)"
|
|
|
- >
|
|
|
- 原始数据
|
|
|
- </button>
|
|
|
+ <el-option
|
|
|
+ v-for="item in timeoptions"
|
|
|
+ :key="item.value"
|
|
|
+ :label="item.label"
|
|
|
+ :value="item.value"
|
|
|
+ >
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ <div class="choose">
|
|
|
+ <button class="btn" @click="switchChange(60)">等间隔</button>
|
|
|
+ <button class="btn" @click="switchChange(0)">原始数据</button>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
-
|
|
|
+
|
|
|
<multiple-y-line-chart-normal
|
|
|
height="500px"
|
|
|
:list="Analysis"
|
|
@@ -165,8 +157,8 @@ export default {
|
|
|
chooseTime: [],
|
|
|
wpvalue: "",
|
|
|
wpid: "",
|
|
|
- wtId:"",
|
|
|
- descName:"",
|
|
|
+ wtId: "",
|
|
|
+ descName: "",
|
|
|
AnalysisName: "",
|
|
|
AnalysisUnit: "",
|
|
|
Analysis: [
|
|
@@ -283,7 +275,19 @@ export default {
|
|
|
new Date(new Date().setDate(new Date().getDate() - 1))
|
|
|
).formatDate("yyyy-MM-dd"),
|
|
|
enddate: new Date(new Date()).formatDate("yyyy-MM-dd"),
|
|
|
- tableData: {column: [{name: "风机编号",field: "name",},{name: "主轴温度温差大于8度",field: "v1",align: "left",slot: true,},{name: "浆叶角过小",field: "v2",align: "left",slot: true,},],data: [{name: "MG01_01",v1: {count: 12,time: 0,},},],},
|
|
|
+ tableData: {
|
|
|
+ column: [
|
|
|
+ { name: "风机编号", field: "name" },
|
|
|
+ {
|
|
|
+ name: "主轴温度温差大于8度",
|
|
|
+ field: "v1",
|
|
|
+ align: "left",
|
|
|
+ slot: true,
|
|
|
+ },
|
|
|
+ { name: "浆叶角过小", field: "v2", align: "left", slot: true },
|
|
|
+ ],
|
|
|
+ data: [{ name: "MG01_01", v1: { count: 12, time: 0 } }],
|
|
|
+ },
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
@@ -359,16 +363,16 @@ export default {
|
|
|
value: [],
|
|
|
},
|
|
|
];
|
|
|
- aKey1.forEach((keyEle,keyIndex)=>{
|
|
|
- // console.log('keyindex:',res.data[keyIndex]);
|
|
|
- aList1[keyIndex].title = res.data[keyIndex].name;
|
|
|
- res.data[keyIndex].data.forEach((rEle)=>{
|
|
|
- aList1[keyIndex].value.push({
|
|
|
- text:new Date(rEle.ts).formatDate("hh:mm"),
|
|
|
- value:rEle.doubleValue
|
|
|
- })
|
|
|
- })
|
|
|
- })
|
|
|
+ aKey1.forEach((keyEle, keyIndex) => {
|
|
|
+ // console.log('keyindex:',res.data[keyIndex]);
|
|
|
+ aList1[keyIndex].title = res.data[keyIndex].name;
|
|
|
+ res.data[keyIndex].data.forEach((rEle) => {
|
|
|
+ aList1[keyIndex].value.push({
|
|
|
+ text: new Date(rEle.ts).formatDate("hh:mm"),
|
|
|
+ value: rEle.doubleValue,
|
|
|
+ });
|
|
|
+ });
|
|
|
+ });
|
|
|
// aKey1.forEach((keyEle, keyIndex) => {
|
|
|
// res.data.forEach((rEle) => {
|
|
|
// rEle.data.forEach((tEle) => {
|
|
@@ -387,8 +391,8 @@ export default {
|
|
|
let aKey2 = ["doubleValue", "doubleValue"];
|
|
|
let aList2 = [
|
|
|
{
|
|
|
- title: "",
|
|
|
- // yAxisIndex:"",
|
|
|
+ title: "",
|
|
|
+ // yAxisIndex:"",
|
|
|
smooth: true,
|
|
|
value: [],
|
|
|
},
|
|
@@ -425,16 +429,16 @@ export default {
|
|
|
});
|
|
|
that.AnalysisYAxises = yaxises1;
|
|
|
console.log("AnalysisYAxises:", that.AnalysisYAxises);
|
|
|
- aKey2.forEach((keyEle,keyIndex)=>{
|
|
|
- // console.log('keyindex:',res.data[keyIndex]);
|
|
|
- aList2[keyIndex].title = res.data[keyIndex].name;
|
|
|
- res.data[keyIndex].data.forEach((rEle)=>{
|
|
|
- aList2[keyIndex].value.push({
|
|
|
- text:new Date(rEle.ts).formatDate("hh:mm"),
|
|
|
- value:rEle.doubleValue
|
|
|
- })
|
|
|
- })
|
|
|
- })
|
|
|
+ aKey2.forEach((keyEle, keyIndex) => {
|
|
|
+ // console.log('keyindex:',res.data[keyIndex]);
|
|
|
+ aList2[keyIndex].title = res.data[keyIndex].name;
|
|
|
+ res.data[keyIndex].data.forEach((rEle) => {
|
|
|
+ aList2[keyIndex].value.push({
|
|
|
+ text: new Date(rEle.ts).formatDate("hh:mm"),
|
|
|
+ value: rEle.doubleValue,
|
|
|
+ });
|
|
|
+ });
|
|
|
+ });
|
|
|
// res.data.forEach((rEle,rIndex)=>{
|
|
|
// console.log('rele:',rEle)
|
|
|
// })
|
|
@@ -448,7 +452,7 @@ export default {
|
|
|
// text: new Date(tEle.ts).formatDate("hh:mm"),
|
|
|
// // value: tEle[keyEle],
|
|
|
// // value:res.data[keyIndex].data[tIndex].doubleValue
|
|
|
-
|
|
|
+
|
|
|
// });
|
|
|
// });
|
|
|
// });
|
|
@@ -515,16 +519,16 @@ export default {
|
|
|
});
|
|
|
that.AnalysisYAxises = yaxises2;
|
|
|
console.log("AnalysisYAxises:", that.AnalysisYAxises);
|
|
|
- aKey4.forEach((keyEle,keyIndex)=>{
|
|
|
- // console.log('keyindex:',res.data[keyIndex]);
|
|
|
- aList4[keyIndex].title = res.data[keyIndex].name;
|
|
|
- res.data[keyIndex].data.forEach((rEle)=>{
|
|
|
- aList4[keyIndex].value.push({
|
|
|
- text:new Date(rEle.ts).formatDate("hh:mm"),
|
|
|
- value:rEle.doubleValue
|
|
|
- })
|
|
|
- })
|
|
|
- })
|
|
|
+ aKey4.forEach((keyEle, keyIndex) => {
|
|
|
+ // console.log('keyindex:',res.data[keyIndex]);
|
|
|
+ aList4[keyIndex].title = res.data[keyIndex].name;
|
|
|
+ res.data[keyIndex].data.forEach((rEle) => {
|
|
|
+ aList4[keyIndex].value.push({
|
|
|
+ text: new Date(rEle.ts).formatDate("hh:mm"),
|
|
|
+ value: rEle.doubleValue,
|
|
|
+ });
|
|
|
+ });
|
|
|
+ });
|
|
|
// aKey4.forEach((keyEle, keyIndex) => {
|
|
|
// res.data.forEach((rEle) => {
|
|
|
// // aList4[keyIndex].yAxisIndex = keyIndex;
|
|
@@ -541,24 +545,39 @@ export default {
|
|
|
// });
|
|
|
that.Analysis = aList4;
|
|
|
console.log("that.Analysis4:", that.Analysis);
|
|
|
- }else if (res.data.length == 0) {
|
|
|
- that.dialogVisible = false;
|
|
|
- that.BASE.showMsg({
|
|
|
- type: "warning",
|
|
|
- msg: "暂无数据",
|
|
|
- });
|
|
|
+ } else if (res.data.length == 0) {
|
|
|
+ that.dialogVisible = false;
|
|
|
+ that.BASE.showMsg({
|
|
|
+ type: "warning",
|
|
|
+ msg: "暂无数据",
|
|
|
+ });
|
|
|
}
|
|
|
-
|
|
|
},
|
|
|
});
|
|
|
},
|
|
|
+ getCascaderChange(res) {
|
|
|
+ this.cascaderSel=res || [];
|
|
|
+ },
|
|
|
//切换数据类型
|
|
|
switchChange(interval) {
|
|
|
- if(interval == 0){
|
|
|
- this.requestDetailData(this.wpvalue,this.startdate,this.enddate,0,this.wtId,this.descName)
|
|
|
- }
|
|
|
- else if(interval == 60){
|
|
|
- this.requestDetailData(this.wpvalue,this.startdate,this.enddate,60,this.wtId,this.descName)
|
|
|
+ if (interval == 0) {
|
|
|
+ this.requestDetailData(
|
|
|
+ this.wpvalue,
|
|
|
+ this.startdate,
|
|
|
+ this.enddate,
|
|
|
+ 0,
|
|
|
+ this.wtId,
|
|
|
+ this.descName
|
|
|
+ );
|
|
|
+ } else if (interval == 60) {
|
|
|
+ this.requestDetailData(
|
|
|
+ this.wpvalue,
|
|
|
+ this.startdate,
|
|
|
+ this.enddate,
|
|
|
+ 60,
|
|
|
+ this.wtId,
|
|
|
+ this.descName
|
|
|
+ );
|
|
|
}
|
|
|
// this.switchFlag = !this.switchFlag;
|
|
|
// this.selectValue = "60";
|
|
@@ -575,7 +594,14 @@ export default {
|
|
|
},
|
|
|
searchTime(values) {
|
|
|
console.log("values:", values);
|
|
|
- this.requestDetailData(this.wpvalue,this.startdate,this.enddate,values,this.wtId,this.descName)
|
|
|
+ this.requestDetailData(
|
|
|
+ this.wpvalue,
|
|
|
+ this.startdate,
|
|
|
+ this.enddate,
|
|
|
+ values,
|
|
|
+ this.wtId,
|
|
|
+ this.descName
|
|
|
+ );
|
|
|
// let times = [];
|
|
|
// this.chooseTime.forEach((item) => {
|
|
|
// times.push(dayjs(item).valueOf());
|
|
@@ -773,12 +799,12 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- .searchForm{
|
|
|
+ .searchForm {
|
|
|
display: flex;
|
|
|
margin-left: 36px;
|
|
|
- .inputs{
|
|
|
+ .inputs {
|
|
|
width: 15%;
|
|
|
- margin-right: 18px;
|
|
|
+ margin-right: 18px;
|
|
|
}
|
|
|
}
|
|
|
}
|