综合查询相关接口不再使用中文categoryName统一使用deviceCategory
This commit is contained in:
@ -10,7 +10,7 @@
|
||||
append-to-body
|
||||
width="1000px"
|
||||
class="ems-dialog"
|
||||
:before-close="handleColsed"
|
||||
:before-close="handleClosed"
|
||||
>
|
||||
<el-card
|
||||
shadow="always"
|
||||
@ -50,14 +50,14 @@ export default {
|
||||
},
|
||||
computed: {
|
||||
isDtdc() {
|
||||
return this.categoryName === "单体电池";
|
||||
return this.deviceCategory === "BATTERY";
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
show(val) {
|
||||
if (!val) {
|
||||
this.pointName = "";
|
||||
this.categoryName = "";
|
||||
this.deviceCategory = "";
|
||||
this.deviceId = "";
|
||||
this.dataUnit = 1;
|
||||
this.child = "";
|
||||
@ -88,15 +88,15 @@ export default {
|
||||
dataRange: [],
|
||||
child: "", //单体电池需要数据
|
||||
pointName: "",
|
||||
categoryName: "",
|
||||
deviceCategory: "",
|
||||
deviceId: "",
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
showChart({ pointName, categoryName, deviceId, child = "" }) {
|
||||
showChart({ pointName, deviceCategory, deviceId, child = "" }) {
|
||||
//初始化数据
|
||||
this.pointName = pointName;
|
||||
this.categoryName = categoryName;
|
||||
this.deviceCategory = deviceCategory;
|
||||
this.deviceId = deviceId;
|
||||
child && (this.child = child);
|
||||
this.show = true;
|
||||
@ -123,7 +123,7 @@ export default {
|
||||
dataRange: [start = "", end = ""],
|
||||
child,
|
||||
deviceId,
|
||||
categoryName,
|
||||
deviceCategory,
|
||||
pointName,
|
||||
} = this;
|
||||
let siteDeviceMap = {};
|
||||
@ -146,7 +146,7 @@ export default {
|
||||
siteIds: [siteId],
|
||||
deviceId,
|
||||
dataUnit,
|
||||
categoryName,
|
||||
deviceCategory,
|
||||
pointName,
|
||||
startDate,
|
||||
endDate,
|
||||
@ -170,9 +170,9 @@ export default {
|
||||
dataset.push({
|
||||
name: `${
|
||||
this.isDtdc
|
||||
? `${inner.parentDeviceId ? inner.parentDeviceId + "-" : ""}`
|
||||
: ""
|
||||
}${this.isDtdc ? inner.deviceId : this.pointName}`,
|
||||
? `${inner.parentDeviceId ? inner.parentDeviceId + "-" : ""}${inner.deviceId}`
|
||||
: `${inner.deviceId}`
|
||||
}`,
|
||||
type: "line",
|
||||
xdata: [],
|
||||
data: [],
|
||||
@ -228,7 +228,7 @@ export default {
|
||||
this.dataRange = val || [];
|
||||
this.getDate();
|
||||
},
|
||||
handleColsed(done) {
|
||||
handleClosed(done) {
|
||||
if (!this.chart) {
|
||||
return done();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user