2 Star 1 Fork 5

alone_snake / vitepro

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
12.js 5.90 KB
一键复制 编辑 原始数据 按行查看 历史
Fizz Pang 提交于 2022-02-19 12:28 . 12
const myres = [{
"ID": 0,
"tagID": 35,
"meterID": 1,
"tagDate": "2021-04-15T01:00:00.000Z",
"value": 0,
"cTag": "电总表",
"cMeter": "电能虚拟总表",
"iMeterID": 2994,
"iGroupID": 935,
"cUnit": "kWh",
"cGroup": "涂装车间"
}, {
"ID": 1,
"tagID": 35,
"meterID": 1,
"tagDate": "2021-04-15T02:00:00.000Z",
"value": 0,
"cTag": "电总表",
"cMeter": "电能虚拟总表",
"iMeterID": 2994,
"iGroupID": 935,
"cUnit": "kWh",
"cGroup": "涂装车间"
}, {
"ID": 2,
"tagID": 35,
"meterID": 1,
"tagDate": "2021-04-15T03:00:00.000Z",
"value": 0,
"cTag": "电总表",
"cMeter": "电能虚拟总表",
"iMeterID": 2994,
"iGroupID": 935,
"cUnit": "kWh",
"cGroup": "涂装车间"
}, {
"ID": 3,
"tagID": 35,
"meterID": 1,
"tagDate": "2021-04-15T04:00:00.000Z",
"value": 0,
"cTag": "电总表",
"cMeter": "电能虚拟总表",
"iMeterID": 2994,
"iGroupID": 935,
"cUnit": "kWh",
"cGroup": "涂装车间"
}, {
"ID": 4,
"tagID": 35,
"meterID": 1,
"tagDate": "2021-04-15T05:00:00.000Z",
"value": 0,
"cTag": "电总表",
"cMeter": "电能虚拟总表",
"iMeterID": 2994,
"iGroupID": 935,
"cUnit": "kWh",
"cGroup": "涂装车间"
}, {
"ID": 5,
"tagID": 35,
"meterID": 1,
"tagDate": "2021-04-15T06:00:00.000Z",
"value": 0,
"cTag": "电总表",
"cMeter": "电能虚拟总表",
"iMeterID": 2994,
"iGroupID": 935,
"cUnit": "kWh",
"cGroup": "涂装车间"
}, {
"ID": 6,
"tagID": 35,
"meterID": 1,
"tagDate": "2021-04-15T07:00:00.000Z",
"value": 0,
"cTag": "电总表",
"cMeter": "电能虚拟总表",
"iMeterID": 2994,
"iGroupID": 935,
"cUnit": "kWh",
"cGroup": "涂装车间"
}, {
"ID": 7,
"tagID": 35,
"meterID": 1,
"tagDate": "2021-04-15T08:00:00.000Z",
"value": 4.32000000000005,
"cTag": "电总表",
"cMeter": "电能虚拟总表",
"iMeterID": 2994,
"iGroupID": 935,
"cUnit": "kWh",
"cGroup": "涂装车间"
}, {
"ID": 8,
"tagID": 35,
"meterID": 1,
"tagDate": "2021-04-15T09:00:00.000Z",
"value": 0.37999999999999545,
"cTag": "电总表",
"cMeter": "电能虚拟总表",
"iMeterID": 2994,
"iGroupID": 935,
"cUnit": "kWh",
"cGroup": "涂装车间"
}, {
"ID": 9,
"tagID": 35,
"meterID": 1,
"tagDate": "2021-04-15T10:00:00.000Z",
"value": 0.339999999999975,
"cTag": "电总表",
"cMeter": "电能虚拟总表",
"iMeterID": 2994,
"iGroupID": 935,
"cUnit": "kWh",
"cGroup": "涂装车间"
}, {
"ID": 10,
"tagID": 35,
"meterID": 1,
"tagDate": "2021-04-15T11:00:00.000Z",
"value": 0.34000000000003183,
"cTag": "电总表",
"cMeter": "电能虚拟总表",
"iMeterID": 2994,
"iGroupID": 935,
"cUnit": "kWh",
"cGroup": "涂装车间"
}, {
"ID": 11,
"tagID": 35,
"meterID": 1,
"tagDate": "2021-04-15T12:00:00.000Z",
"value": 0.3199999999999932,
"cTag": "电总表",
"cMeter": "电能虚拟总表",
"iMeterID": 2994,
"iGroupID": 935,
"cUnit": "kWh",
"cGroup": "涂装车间"
}, {
"ID": 12,
"tagID": 35,
"meterID": 1,
"tagDate": "2021-04-15T13:00:00.000Z",
"value": 0.3599999999999568,
"cTag": "电总表",
"cMeter": "电能虚拟总表",
"iMeterID": 2994,
"iGroupID": 935,
"cUnit": "kWh",
"cGroup": "涂装车间"
}, {
"ID": 13,
"tagID": 35,
"meterID": 1,
"tagDate": "2021-04-15T14:00:00.000Z",
"value": 0.4000000000000341,
"cTag": "电总表",
"cMeter": "电能虚拟总表",
"iMeterID": 2994,
"iGroupID": 935,
"cUnit": "kWh",
"cGroup": "涂装车间"
}, {
"ID": 14,
"tagID": 35,
"meterID": 1,
"tagDate": "2021-04-15T15:00:00.000Z",
"value": 0.38999999999998636,
"cTag": "电总表",
"cMeter": "电能虚拟总表",
"iMeterID": 2994,
"iGroupID": 935,
"cUnit": "kWh",
"cGroup": "涂装车间"
}, {
"ID": 15,
"tagID": 35,
"meterID": 1,
"tagDate": "2021-04-15T16:00:00.000Z",
"value": 0.36000000000001364,
"cTag": "电总表",
"cMeter": "电能虚拟总表",
"iMeterID": 2994,
"iGroupID": 935,
"cUnit": "kWh",
"cGroup": "涂装车间"
}, {
"ID": 16,
"tagID": 35,
"meterID": 1,
"tagDate": "2021-04-15T17:00:00.000Z",
"value": 0.5199999999999818,
"cTag": "电总表",
"cMeter": "电能虚拟总表",
"iMeterID": 2994,
"iGroupID": 935,
"cUnit": "kWh",
"cGroup": "涂装车间"
}, {
"ID": 17,
"tagID": 35,
"meterID": 1,
"tagDate": "2021-04-15T18:00:00.000Z",
"value": 0.13999999999998636,
"cTag": "电总表",
"cMeter": "电能虚拟总表",
"iMeterID": 2994,
"iGroupID": 935,
"cUnit": "kWh",
"cGroup": "涂装车间"
}, {
"ID": 18,
"tagID": 35,
"meterID": 1,
"tagDate": "2021-04-15T19:00:00.000Z",
"value": null,
"cTag": "电总表",
"cMeter": "电能虚拟总表",
"iMeterID": 2994,
"iGroupID": 935,
"cUnit": "kWh",
"cGroup": "涂装车间"
}, {
"ID": 19,
"tagID": 35,
"meterID": 1,
"tagDate": "2021-04-15T20:00:00.000Z",
"value": null,
"cTag": "电总表",
"cMeter": "电能虚拟总表",
"iMeterID": 2994,
"iGroupID": 935,
"cUnit": "kWh",
"cGroup": "涂装车间"
}, {
"ID": 20,
"tagID": 35,
"meterID": 1,
"tagDate": "2021-04-15T21:00:00.000Z",
"value": null,
"cTag": "电总表",
"cMeter": "电能虚拟总表",
"iMeterID": 2994,
"iGroupID": 935,
"cUnit": "kWh",
"cGroup": "涂装车间"
}, {
"ID": 21,
"tagID": 35,
"meterID": 1,
"tagDate": "2021-04-15T22:00:00.000Z",
"value": null,
"cTag": "电总表",
"cMeter": "电能虚拟总表",
"iMeterID": 2994,
"iGroupID": 935,
"cUnit": "kWh",
"cGroup": "涂装车间"
}, {
"ID": 22,
"tagID": 35,
"meterID": 1,
"tagDate": "2021-04-15T23:00:00.000Z",
"value": null,
"cTag": "电总表",
"cMeter": "电能虚拟总表",
"iMeterID": 2994,
"iGroupID": 935,
"cUnit": "kWh",
"cGroup": "涂装车间"
}, {
"ID": 23,
"tagID": 35,
"meterID": 1,
"tagDate": "2021-04-16T00:00:00.000Z",
"value": null,
"cTag": "电总表",
"cMeter": "电能虚拟总表",
"iMeterID": 2994,
"iGroupID": 935,
"cUnit": "kWh",
"cGroup": "涂装车间"
}]
const res = msg.payload.map(x => {
return {
x: x.x,
y: x.y
}
})
const payload = [
{
"series": ["折线1"],
"data": [res],
"labels": ["labels1"]
}
]
msg.payload = payload
return msg;
1
https://gitee.com/alone_snake/vitepro.git
git@gitee.com:alone_snake/vitepro.git
alone_snake
vitepro
vitepro
master

搜索帮助