diff --git a/src/api/infoApi.js b/src/api/infoApi.js index ecaed75..93b5b1b 100644 --- a/src/api/infoApi.js +++ b/src/api/infoApi.js @@ -111,7 +111,7 @@ const infoApi = { }, // 获取通讯状态 getTxStatus(params) { - return postPBRequest(`/driver`, params, 54004); + return postPBRequest(`/driver`, params, 54002); }, // 获取支持的通讯驱动 diff --git a/src/components/PzSet.vue b/src/components/PzSet.vue index 320a89e..e1efa94 100644 --- a/src/components/PzSet.vue +++ b/src/components/PzSet.vue @@ -344,7 +344,9 @@ export default { } const res = await infoApi.getCom(parm); if (res.code == 0) { - state.comArr = res.data; + state.comArr = res.data.sort((a,b) => { + return (a.name > b.name ? 1 : -1) + }); state.form2.com_name = state.comArr[0].name; } }; diff --git a/src/components/Sidebar.vue b/src/components/Sidebar.vue index bd5269a..9d9b7d2 100644 --- a/src/components/Sidebar.vue +++ b/src/components/Sidebar.vue @@ -63,13 +63,13 @@ export default { iconName: 'Management', children: [], }, - { - id: 2, - name: "规则引擎", - index: "/rules", - iconName: 'Management', - children: [], - }, + // { + // id: 2, + // name: "规则引擎", + // index: "/rules", + // iconName: 'Management', + // children: [], + // }, // { // id: 4, // name: "透传管理", @@ -98,11 +98,11 @@ export default { // name: "实时数据", // index: "/data", // }, - { - id: 3 - 3, - name: "上报管理", - index: "/report", - }, + // { + // id: 3 - 3, + // name: "上报管理", + // index: "/report", + // }, ], }, ], diff --git a/src/views/Model.vue b/src/views/Model.vue index 21f3c6d..db1ca4d 100644 --- a/src/views/Model.vue +++ b/src/views/Model.vue @@ -4,7 +4,7 @@
新增
- @@ -85,7 +85,9 @@ export default { const res = await infoApi.getMb(); if (res.code == 0) { // 获取数据 - state.tableData = res.data; + state.tableData = res.data.sort((a,b) => { + return (a.name > b.name ? 1 : -1) + }); } else { } }; diff --git a/src/views/Page.vue b/src/views/Page.vue index 7d00668..81d01ab 100644 --- a/src/views/Page.vue +++ b/src/views/Page.vue @@ -4,7 +4,7 @@
新增
- @@ -14,16 +14,9 @@ {{ qudongOptions[scope.row.type] }} - @@ -159,7 +152,9 @@ export default { } const res = await infoApi.getTx(param); if (res.code == 0) { - state.tableData = res.data; + state.tableData = res.data.sort((a,b) => { + return (a.name > b.name ? 1 : -1) + }); } }; const dialogClose = () => { @@ -271,6 +266,18 @@ export default { state.dialogVisible4 = true; } + + const getTextColor = (type) => { + if(type == 1) { + return '' + } + if(type == 2) { + return 'green' + } + if(type == 3) { + return 'red' + } + } return { ...toRefs(state), addData, @@ -288,7 +295,8 @@ export default { dialogSuccess4, openPz, openDetails, - viewData + viewData, + getTextColor }; }, };