diff --git a/src/components/Sidebar.vue b/src/components/Sidebar.vue index 86812df..ba87caa 100644 --- a/src/components/Sidebar.vue +++ b/src/components/Sidebar.vue @@ -134,6 +134,10 @@ export default { index: "/userManagement", title: "用户管理", }, + { + index: "/roleManagement", + title: "角色管理", + }, { index: "/globalTools", title: "全局设置", diff --git a/src/router/index.js b/src/router/index.js index 8d12c45..3e76802 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -71,6 +71,12 @@ const routes = [ name: "userManagement", meta: { title: "用户管理", icon: "el-icon-monitor", keepAlive: true }, }, + { + path: "/roleManagement", + component: () => import("../views/system/roleManagement/index.vue"), + name: "roleManagement", + meta: { title: "角色管理", icon: "el-icon-monitor", keepAlive: true }, + }, { path: "/globalTools", component: () => import("../views/system/globalTools/index.vue"), diff --git a/src/views/photographicDevice/components/parameterSetDialog.vue b/src/views/photographicDevice/components/parameterSetDialog.vue index acc8299..99b0d27 100644 --- a/src/views/photographicDevice/components/parameterSetDialog.vue +++ b/src/views/photographicDevice/components/parameterSetDialog.vue @@ -21,7 +21,7 @@ - - + + + - 查询 - 设置 + 查询 + 设置 +

+ {{ $moment(lookTime).format("YYYY-MM-DD HH:mm:ss") }} +

- --> +
{}); }, + handleFocus() { + if (this.deviceTimeForm.newzztime == "") { + this.deviceTimeForm.newzztime = new Date(); + console.log(this.deviceTimeForm.newzztime); + } + }, //装置时间查询 - searchTime() {}, + searchTime() { + if (this.rowData.isonline || this.rowData.onlinestatus === 1) { + this.timeLoading = true; + // --act=time --cmdid=XY-SIMULATOR-0015 --flag=1 --time=20230101122322 + let params = [ + { + name: "act", + value: "time", + }, + { + name: "flag", + value: 0, + }, + ]; + this.setTermFn(params); + } else { + this.$message({ + duration: 1500, + showClose: true, + message: "装置下线,发送指令失败", + type: "error", + }); + } + }, //装置时间设置 - setTime() {}, + //设置装置时间: .\bin\xympadmn.exe --server=127.0.0.1 --port=6891 --act=time --cmdid=XY-SIMULATOR-0015 --flag=1 --time=20230101122322 + setTime() { + if (this.rowData.isonline || this.rowData.onlinestatus === 1) { + console.log(this.deviceTimeForm.newzztime); + if (this.deviceTimeForm.newzztime !== "") { + this.timesetLoading = true; + let params = [ + { + name: "act", + value: "time", + }, + { + name: "flag", + value: 1, + }, + { + name: "time", + value: this.deviceTimeForm.newzztime, + }, + ]; + this.setTermFn(params); + } else { + console.log("error submit!!"); + this.$message({ + duration: 1500, + showClose: true, + message: "请填写新装置时间", + type: "error", + }); + return false; + } + } else { + this.$message({ + duration: 1500, + showClose: true, + message: "装置下线,发送指令失败", + type: "error", + }); + } + }, //采样参数重置数据 samphandleClick() { this.samplingForm = {}; @@ -1103,33 +1202,64 @@ export default { idSearch() { if (this.rowData.isonline || this.rowData.onlinestatus === 1) { this.idLoading = true; - let params = [ - { - name: "act", - value: "termid", - }, - { - name: "flag", - value: 0, - }, - { - name: "rf", - value: 255, - }, - { - name: "newcmdid", - value: "", - }, - { - name: "compid", - value: "", - }, - { - name: "orgid", - value: "", - }, - ]; - this.setTermFn(params); + console.log(this.rowData); + if (this.rowData.protocol == 65284) { + let params = [ + { + name: "act", + value: "termid", + }, + { + name: "flag", + value: 0, + }, + { + name: "rf", + value: 2, + }, + { + name: "newcmdid", + value: "", + }, + { + name: "compid", + value: "", + }, + { + name: "orgid", + value: "", + }, + ]; + this.setTermFn(params); + } else { + let params = [ + { + name: "act", + value: "termid", + }, + { + name: "flag", + value: 0, + }, + { + name: "rf", + value: 255, + }, + { + name: "newcmdid", + value: "", + }, + { + name: "compid", + value: "", + }, + { + name: "orgid", + value: "", + }, + ]; + this.setTermFn(params); + } } else { this.$message({ duration: 1500, @@ -1418,6 +1548,8 @@ export default { window.clearInterval(this.timer); this.timer = null; this.i = 0; + this.timeLoading = false; + this.timesetLoading = false; this.sampLoading = false; this.sampSetLoading = false; this.upperLoading = false; @@ -1432,6 +1564,16 @@ export default { console.log("终止轮询"); // && res.data.result == 255 console.log(JSON.parse(res.data.data)); + //时间 + console.log(this.tabName); + this.deviceTimeForm = JSON.parse(res.data.data); + if (this.tabName == "装置时间") { + this.showLookTime = true; + this.deviceTimeForm.zztime = this.deviceTimeForm.timestamp * 1000; + console.log(this.deviceTimeForm.zztime); + return; + } + //采集参数 this.samplingForm = JSON.parse(res.data.data); //ip地址解析开始 this.upperComputer = JSON.parse(res.data.data); @@ -1443,7 +1585,7 @@ export default { console.log("我是空"); this.osdParams.textContent = ""; } - console.log(this.tabName); + if (this.tabName == "上位机信息") { let hexArray = this.upperComputer.ip .toString(16) @@ -1477,6 +1619,8 @@ export default { message: "暂未获取到信息,请稍后再试!!", type: "warning", }); + this.timeLoading = false; + this.timesetLoading = false; this.sampLoading = false; this.sampSetLoading = false; this.upperLoading = false; @@ -1562,8 +1706,9 @@ export default { this.lookTime = ""; this.showLookTime = false; this.isShow = false; - this.activeName = "2"; + this.activeName = "1"; this.tabsActive = "first"; + this.deviceTimeForm = {}; this.samplingForm = {}; this.upperComputer = {}; this.idParameter = {}; diff --git a/src/views/realTimeMonitor/components/parameterArea.vue b/src/views/realTimeMonitor/components/parameterArea.vue index 61d6bec..097dc44 100644 --- a/src/views/realTimeMonitor/components/parameterArea.vue +++ b/src/views/realTimeMonitor/components/parameterArea.vue @@ -93,6 +93,7 @@ + @@ -158,6 +159,7 @@ import cableButton from "./cableButton.vue"; import gpsButton from "./gpsButton.vue"; import uploadpic from "./uploadpic.vue"; import parameterSetDialog from "../../photographicDevice/components/parameterSetDialog.vue"; +import setAppButton from "./setAppButton.vue"; import { getChannelByTermidJoggle, updateTermCamera, @@ -177,6 +179,7 @@ export default { parameterSetDialog, uploadpic, setChannelButton, + setAppButton, }, data() { return { diff --git a/src/views/realTimeMonitor/components/setAppButton.vue b/src/views/realTimeMonitor/components/setAppButton.vue new file mode 100644 index 0000000..244b726 --- /dev/null +++ b/src/views/realTimeMonitor/components/setAppButton.vue @@ -0,0 +1,34 @@ + + diff --git a/src/views/realTimeMonitor/components/setAppDialog.vue b/src/views/realTimeMonitor/components/setAppDialog.vue new file mode 100644 index 0000000..ac8c288 --- /dev/null +++ b/src/views/realTimeMonitor/components/setAppDialog.vue @@ -0,0 +1,619 @@ + + + diff --git a/src/views/realTimeMonitor/components/setChannelDialog.vue b/src/views/realTimeMonitor/components/setChannelDialog.vue index 2679a5b..790c9d8 100644 --- a/src/views/realTimeMonitor/components/setChannelDialog.vue +++ b/src/views/realTimeMonitor/components/setChannelDialog.vue @@ -7,8 +7,13 @@ width="640px" @close="handleclose" > -
装置编号:{{ areaData.cmdid }}
-
+
+ 装置编号:{{ areaData.cmdid + }}刷新 +
+
+ +
+ + +