|
@@ -102,6 +102,7 @@ export default {
|
|
|
dataSource: [],
|
|
|
url: {
|
|
|
list: '/tpmParams/tpmParams/list',
|
|
|
+ listparams: '/tpmParams/tpmParams/queryByEquipId',
|
|
|
},
|
|
|
// 表头
|
|
|
columns: [
|
|
@@ -116,23 +117,11 @@ export default {
|
|
|
},
|
|
|
},
|
|
|
{
|
|
|
- title: '点位名称',
|
|
|
- align: 'center',
|
|
|
- // dataIndex: 'tagname',
|
|
|
- dataIndex: 'tagname',
|
|
|
- },
|
|
|
- {
|
|
|
title: '时间',
|
|
|
align: 'center',
|
|
|
// dataIndex: 'logtime',
|
|
|
dataIndex: 'logtime',
|
|
|
},
|
|
|
- {
|
|
|
- title: '值',
|
|
|
- align: 'center',
|
|
|
- // dataIndex: 'tagvalue2',
|
|
|
- dataIndex: 'tagvalue',
|
|
|
- },
|
|
|
],
|
|
|
}
|
|
|
},
|
|
@@ -228,10 +217,42 @@ export default {
|
|
|
return
|
|
|
}
|
|
|
_this.loading = true
|
|
|
- getAction(this.url.list, _this.queryParams).then((response) => {
|
|
|
- _this.dataSource = response.result
|
|
|
+ // 获取图表信息
|
|
|
+ getAction(_this.url.listparams, _this.queryParams).then((res) => {
|
|
|
+ if (res.success) {
|
|
|
+ _this.columns = [
|
|
|
+ {
|
|
|
+ title: '序号',
|
|
|
+ dataIndex: '',
|
|
|
+ key: 'rowIndex',
|
|
|
+ width: 60,
|
|
|
+ align: 'center',
|
|
|
+ customRender: function (t, r, index) {
|
|
|
+ return parseInt(index) + 1;
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '时间',
|
|
|
+ align: 'center',
|
|
|
+ dataIndex: 'logtime',
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ console.log("listparams", res.result)
|
|
|
+ res.result.forEach(function(item) {
|
|
|
+ if (item.symbol !== 'TIME') {
|
|
|
+ _this.columns.push({
|
|
|
+ title: item.symbol,
|
|
|
+ align: 'center',
|
|
|
+ dataIndex: item.symbol,
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ getAction(_this.url.list, _this.queryParams).then((response) => {
|
|
|
+ _this.dataSource = response.result
|
|
|
|
|
|
- this.loading = false
|
|
|
+ _this.loading = false
|
|
|
+ })
|
|
|
+ }
|
|
|
})
|
|
|
},
|
|
|
},
|