12
0

update 设备全参数查询

Dieser Commit ist enthalten in:
lb 2023-09-11 15:24:11 +08:00
Ursprung 4e05b3e3d6
Commit f2f3a9e850
2 geänderte Dateien mit 98 neuen und 65 gelöschten Zeilen

Datei anzeigen

@ -12,31 +12,7 @@
ref="search-bar"
@headBtnClick="handleSearchBarBtnClick" />
<!-- <base-table
:table-props="[
{ type: 'index', label: '序号' },
{ prop: 'name', label: '设备名称', align: 'center' },
{ prop: 'code', label: '设备代码', align: 'center' },
{ prop: 'time', label: '时间', align: 'center' },
]"
:table-data="[
{ index: 1, name: '1', code: 'c1', time: '2021-08-31 09:14:19' },
{ index: 2, name: '2', code: 'c2', time: '2021-08-31 09:14:19' },
{ index: 3, name: '3', code: 'c3', time: '2021-08-31 09:14:19' },
{ index: 4, name: '4', code: 'c4', time: '2021-08-31 09:14:19' },
{ index: 5, name: '5', code: 'c5', time: '2021-08-31 09:14:19' },
]"
:span-method="
({ rowIndex, columnIndex }) => {
if (rowIndex == 1 && columnIndex == 0) {
return [1, 3];
}
return [1, 1];
}
"
@emitFun="(val) => handleEmitFun(table, val)"></base-table> -->
<div class="tables">
<div v-if="tableList.length" class="tables">
<div class="custom-table" v-for="table in tableList" :key="table.key">
<!-- {{ JSON.stringify(spanMethod) }} -->
<base-table
@ -58,16 +34,14 @@
getListFor(table, { page, limit, current })
" />
</div>
<!-- v-show="table.dataManager?.total > 0"
:total="table.dataManager?.total || 0" -->
<!-- @size-change="($event) => handleSizeChange(table, $event)" -->
</div>
<div v-else style="margin-top: 20px; color: #c7c7c7; text-align: center;">暂无数据</div>
</div>
</template>
<script>
import LocalDataManager from './utils/local-data-manager';
import response from './response';
// import response from './response';
import moment from 'moment';
export default {
@ -123,14 +97,14 @@ export default {
time: [new Date(aWeekAgo), new Date(today)],
},
tableList: [
{
key: 'base-table__key__1',
tableProps: [],
list: [],
pageNo: 1,
pageSize: 3,
total: 0,
},
// {
// key: 'base-table__key__1',
// tableProps: [],
// list: [],
// pageNo: 1,
// pageSize: 3,
// total: 0,
// },
],
};
},
@ -152,7 +126,7 @@ export default {
if (this.name)
this.$set(this.searchBarFormConfig[1], 'defaultSelect', this.name);
this.handleResponse();
// this.handleResponse();
},
methods: {
buildProps(table) {
@ -199,11 +173,9 @@ export default {
return { props, firstLineData };
},
handleResponse() {
handleResponse(response) {
const { code, data } = response;
if (code == 0) {
console.log('response', code, data);
//
data.forEach((table, index) => {
console.log('handle index:', index, table);
@ -220,26 +192,28 @@ export default {
//
const { data } = table;
data.forEach((row, idx) => {
const listItem = {
index: idx + 1,
time: moment(+row.time).format('YYYY-MM-DD HH:mm:ss'),
plcCode: row.plcCode,
};
row.data.forEach((column) => {
listItem[column.dynamicName] = column.dynamicValue;
if (data) {
data.forEach((row, idx) => {
const listItem = {
index: idx + 1,
time: moment(+row.time).format('YYYY-MM-DD HH:mm:ss'),
plcCode: row.plcCode,
};
row.data.forEach((column) => {
listItem[column.dynamicName] = column.dynamicValue;
});
this.tableList[index].list.push(listItem);
this.tableList[index].total++;
});
this.tableList[index].list.push(listItem);
this.tableList[index].total++;
});
//
const { pageNo, pageSize, list } = this.tableList[index];
this.tableList[index].dataManager = new LocalDataManager(
list,
pageNo,
pageSize
);
//
const { pageNo, pageSize, list } = this.tableList[index];
this.tableList[index].dataManager = new LocalDataManager(
list,
pageNo,
pageSize
);
}
});
}
},
@ -255,12 +229,13 @@ export default {
/** 查询 */
async handleQuery() {
const { data } = this.$axios({
url: '/monitoring/equipment-monitor/runLog',
method: 'get',
params: this.queryParams,
});
console.log('data', data);
this.handleResponse(
await this.$axios({
url: '/monitoring/equipment-monitor/runLog',
method: 'get',
params: this.queryParams,
})
);
},
async handleSearchBarBtnClick({ btnName, timeVal }) {

Datei anzeigen

@ -1859,6 +1859,11 @@ address@^1.1.2:
resolved "https://registry.npmmirror.com/address/-/address-1.2.1.tgz"
integrity sha512-B+6bi5D34+fDYENiH5qOlA0cV2rAGKuWZ9LeyUUehbXy8e0VS9e498yO0Jeeh+iM+6KbfudHTFjXw2MmJD4QRA==
adler-32@~1.3.0:
version "1.3.1"
resolved "https://registry.npmmirror.com/adler-32/-/adler-32-1.3.1.tgz#1dbf0b36dda0012189a32b3679061932df1821e2"
integrity sha512-ynZ4w/nUUv5rrsR8UUGoe1VC9hZj6V5hU9Qw1HlMDJGEJw5S7TfTErWTjMys6M7vr0YWcPqs3qAr4ss0nDfP+A==
aes-decrypter@1.0.3:
version "1.0.3"
resolved "https://registry.npmmirror.com/aes-decrypter/-/aes-decrypter-1.0.3.tgz"
@ -2739,6 +2744,14 @@ caseless@~0.12.0:
resolved "https://registry.npmmirror.com/caseless/-/caseless-0.12.0.tgz"
integrity sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==
cfb@~1.2.1:
version "1.2.2"
resolved "https://registry.npmmirror.com/cfb/-/cfb-1.2.2.tgz#94e687628c700e5155436dac05f74e08df23bc44"
integrity sha512-KfdUZsSOw19/ObEWasvBP/Ac4reZvAGauZhs6S/gqNhXhI7cKwvlH7ulj+dOEYnca4bm4SGo8C1bTAQvnTjgQA==
dependencies:
adler-32 "~1.3.0"
crc-32 "~1.2.0"
chalk@2.3.0:
version "2.3.0"
resolved "https://registry.npmmirror.com/chalk/-/chalk-2.3.0.tgz"
@ -2999,6 +3012,11 @@ code-brick-zj@^1.0.2:
resolved "https://registry.npmmirror.com/code-brick-zj/-/code-brick-zj-1.0.2.tgz#f9f5fa97faa65262e887a3a15014827ac95b1fea"
integrity sha512-V8XwYqXjIPMfPCaZMja4I2MJPT45EEnzRmTL1Ps6aMsmUQ/PhZ48OwUvddBFNqNZeVV13aPm1b5K1c3ogfad8Q==
codepage@~1.15.0:
version "1.15.0"
resolved "https://registry.npmmirror.com/codepage/-/codepage-1.15.0.tgz#2e00519024b39424ec66eeb3ec07227e692618ab"
integrity sha512-3g6NUTPd/YtuuGrhMnOMRjFc+LJw/bnMp3+0r/Wcz3IXUuCosKRJvMphm5+Q+bvTVGcJJuRvVLuYba+WojaFaA==
collection-visit@^1.0.0:
version "1.0.0"
resolved "https://registry.npmmirror.com/collection-visit/-/collection-visit-1.0.0.tgz"
@ -3324,6 +3342,11 @@ cosmiconfig@^5.0.0:
js-yaml "^3.13.1"
parse-json "^4.0.0"
crc-32@~1.2.0, crc-32@~1.2.1:
version "1.2.2"
resolved "https://registry.npmmirror.com/crc-32/-/crc-32-1.2.2.tgz#3cad35a934b8bf71f25ca524b6da51fb7eace2ff"
integrity sha512-ROmzCKrTnOwybPcJApAA6WBWij23HVfGVNKqqrZpuyZOHqK2CwHSvpGuyt/UNNvaIjEd8X5IFGp4Mh+Ie1IHJQ==
create-ecdh@^4.0.0:
version "4.0.4"
resolved "https://registry.npmmirror.com/create-ecdh/-/create-ecdh-4.0.4.tgz"
@ -4849,6 +4872,11 @@ forwarded@0.2.0:
resolved "https://registry.npmmirror.com/forwarded/-/forwarded-0.2.0.tgz"
integrity sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==
frac@~1.1.2:
version "1.1.2"
resolved "https://registry.npmmirror.com/frac/-/frac-1.1.2.tgz#3d74f7f6478c88a1b5020306d747dc6313c74d0b"
integrity sha512-w/XBfkibaTl3YDqASwfDUqkna4Z2p9cFSr1aHDt0WoMTECnRfBOv2WArlZILlqgWlmdIlALXGpM2AOhEk5W3IA==
fragment-cache@^0.2.1:
version "0.2.1"
resolved "https://registry.npmmirror.com/fragment-cache/-/fragment-cache-0.2.1.tgz"
@ -9131,6 +9159,13 @@ sprintf-js@~1.0.2:
resolved "https://registry.npmmirror.com/sprintf-js/-/sprintf-js-1.0.3.tgz"
integrity sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==
ssf@~0.11.2:
version "0.11.2"
resolved "https://registry.npmmirror.com/ssf/-/ssf-0.11.2.tgz#0b99698b237548d088fc43cdf2b70c1a7512c06c"
integrity sha512-+idbmIXoYET47hH+d7dfm2epdOMUDjqcB4648sTZ+t2JwoyBFL/insLfB/racrDmsKB3diwsDA696pZMieAC5g==
dependencies:
frac "~1.1.2"
sshpk@^1.7.0:
version "1.17.0"
resolved "https://registry.npmmirror.com/sshpk/-/sshpk-1.17.0.tgz"
@ -10461,11 +10496,21 @@ which@^2.0.1:
dependencies:
isexe "^2.0.0"
wmf@~1.0.1:
version "1.0.2"
resolved "https://registry.npmmirror.com/wmf/-/wmf-1.0.2.tgz#7d19d621071a08c2bdc6b7e688a9c435298cc2da"
integrity sha512-/p9K7bEh0Dj6WbXg4JG0xvLQmIadrner1bi45VMJTfnbVHsc7yIajZyoSoK60/dtVBs12Fm6WkUI5/3WAVsNMw==
word-wrap@^1.2.3:
version "1.2.3"
resolved "https://registry.npmmirror.com/word-wrap/-/word-wrap-1.2.3.tgz"
integrity sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==
word@~0.3.0:
version "0.3.0"
resolved "https://registry.npmmirror.com/word/-/word-0.3.0.tgz#8542157e4f8e849f4a363a288992d47612db9961"
integrity sha512-OELeY0Q61OXpdUfTp+oweA/vtLVg5VDOXh+3he3PNzLGG/y0oylSOC1xRVj0+l4vQ3tj/bB1HVHv1ocXkQceFA==
worker-farm@^1.7.0:
version "1.7.0"
resolved "https://registry.npmmirror.com/worker-farm/-/worker-farm-1.7.0.tgz"
@ -10522,6 +10567,19 @@ xhr@2.4.0:
parse-headers "^2.0.0"
xtend "^4.0.0"
xlsx@^0.18.5:
version "0.18.5"
resolved "https://registry.npmmirror.com/xlsx/-/xlsx-0.18.5.tgz#16711b9113c848076b8a177022799ad356eba7d0"
integrity sha512-dmg3LCjBPHZnQp5/F/+nnTa+miPJxUXB6vtk42YjBBKayDNagxGEeIdWApkYPOf3Z3pm3k62Knjzp7lMeTEtFQ==
dependencies:
adler-32 "~1.3.0"
cfb "~1.2.1"
codepage "~1.15.0"
crc-32 "~1.2.1"
ssf "~0.11.2"
wmf "~1.0.1"
word "~0.3.0"
xml-js@1.6.11:
version "1.6.11"
resolved "https://registry.npmmirror.com/xml-js/-/xml-js-1.6.11.tgz"