Browse Source

故障样本库完成

mw_666 3 years ago
parent
commit
f04da2f50b
1 changed files with 9 additions and 12 deletions
  1. 9 12
      src/views/sampleDatabase/fault/point.vue

+ 9 - 12
src/views/sampleDatabase/fault/point.vue

@@ -190,10 +190,8 @@
 			onClickOption(e, row) { // 操作按钮
 				let that = this;
 				if ("config" == e.target.getAttribute("value")) { //原始数据
-					that.time = [that.st - (3600 * 1000), that.st];
-					that.point = [row.point];
-					that.pointdes = [row.pointdes];
-					that.requestDetailData(that.point, that.pointdes, that.time, that.selectValue);
+					that.requestDetailData([row.point], [row.pointdes], [Date.parse(new Date(that.time[0])), Date.parse(
+						new Date(that.time[1]))], that.selectValue);
 				}
 			},
 			list(data) {
@@ -212,12 +210,6 @@
 						};
 						that.tableData.data.push(obj);
 					}
-					that.point = [data[0].point];
-					that.pointdes = [data[0].pointdes];
-					that.requestDetailData([data[0].point], 
-					[data[0].pointdes], 
-					[Date.parse(new Date(that.time[0])), Date.parse(new Date(that.time[1]))], 
-					that.selectValue);
 				}
 			},
 			switchChange(interval, status) {
@@ -268,14 +260,19 @@
 						}
 					},
 				});
-
 			},
 			dbfx() {
 				var that = this;
-				if (that.point.length <= 5) {
+				if (that.point.length <= 5 && that.point.length != 0) {
 					that.Powertrend = [];
 					that.requestDetailData(that.point, that.pointdes, [Date.parse(new Date(that.time[0])), Date.parse(
 						new Date(that.time[1]))], that.selectValue);
+				}else{
+					this.BASE.showMsg({
+						type: "warning",
+						msg: "请选择测点后再对标",
+					});
+					return
 				}
 			},
 			clearDb() { //清空对标状态