diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/SmartDevice/components/DeviceParams.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/SmartDevice/components/DeviceParams.vue index f3ae6362..e246f8c9 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/SmartDevice/components/DeviceParams.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/SmartDevice/components/DeviceParams.vue @@ -50,14 +50,10 @@ export default { created() { // https://www.yuque.com/dayuanzhong-ovjwn/gkht0m/ww776d5kzs72ilzh?singleDoc= // 获取设备参数 - // request({ - // url: `/business/device/properties/latest/${this.dialogData.iotDeviceId || '10.0.36.143-1883'}`, - // method: "get", - // params: {} - // }) - Promise.resolve({ - code: 200, - data: [{ "id": "ab58aab1e4c5fcf0457b3f1d808be44e", "deviceId": "10.0.36.143-1883", "property": "1", "propertyName": "状态包", "type": "object", "numberValue": null, "objectValue": { "dc_out_electricity_2": 0, "dc_out_electricity_1": 0, "power_status": "1", "dc_out_voltage_2": 11.3238, "fan_status": "0", "dc_out_voltage_1": 11.3125, "ac_out_voltage_2": 232.5156, "ac_out_voltage_1": 231.1293, "ac_out_electricity_1": 0, "temperature": "7.9", "humidity": "40.6", "ac_out_electricity_2": 0.1964, "door_status": "1" }, "geoValue": null, "value": { "dc_out_electricity_2": 0, "dc_out_electricity_1": 0, "power_status": "1", "dc_out_voltage_2": 11.3238, "fan_status": "0", "dc_out_voltage_1": 11.3125, "ac_out_voltage_2": 232.5156, "ac_out_voltage_1": 231.1293, "ac_out_electricity_1": 0, "temperature": "7.9", "humidity": "40.6", "ac_out_electricity_2": 0.1964, "door_status": "1" }, "formatValue": { "dc_out_electricity_2": "0.00A", "dc_out_electricity_1": "0.00A", "power_status": "1", "dc_out_voltage_2": "11.32V", "fan_status": "0", "dc_out_voltage_1": "11.31V", "ac_out_voltage_2": "232.52V", "ac_out_voltage_1": "231.13V", "ac_out_electricity_1": "0.00A", "temperature": "7.9", "humidity": "40.6", "ac_out_electricity_2": "0.20A", "door_status": "1" }, "createTime": 1707187234249, "timestamp": 1707187234249, "formatTime": null, "state": null }] + request({ + url: `/business/device/properties/latest/${this.dialogData.iotDeviceId || '10.0.36.143-1883'}`, + method: "get", + params: {} }).then(result => { if (result.code != 200) return; const [deviceInfo] = result.data; diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/index.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/index.vue index a1288fdd..8f2328dd 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/index.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/index.vue @@ -128,7 +128,7 @@ export default { this.searchData.eventState = activeName == "-1" ? null : activeName; - this.getData(); + this.getData(activeName); }, getStateCardBind(item) { const { state, textColor, text } = tabMap[this.activeName]; @@ -140,15 +140,29 @@ export default { }; }, getData() { - request({ - url: `/dc/system/event/list`, - method: "get", - params: this.searchData, - }).then((result) => { - if (result.code != 200) return Message.error(result?.msg); - this.data = result.rows; - this.total = result.total; - }); + + if (this.activeName == '-1') { + request({ + url: `/perceivedEvents/warning/perceivedEventsList`, + method: "post", + data: this.searchData, + }).then((result) => { + if (result.code != 200) return Message.error(result?.msg); + this.data = result.rows; + this.total = result.total; + }); + } else { + request({ + url: `/dc/system/event/list`, + method: "get", + params: this.searchData, + }).then((result) => { + if (result.code != 200) return Message.error(result?.msg); + this.data = result.rows; + this.total = result.total; + }); + } + // request({ // url: `/dc/system/event/count`, diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/service/sensitive/components/AddNEditDialog.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/service/sensitive/components/AddNEditDialog.vue index 3cc86f02..0324ea60 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/service/sensitive/components/AddNEditDialog.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/service/sensitive/components/AddNEditDialog.vue @@ -38,7 +38,8 @@ export default { }, props: { visible: Boolean, - data: Object + data: Object, + dataAll: Array }, data() { return { @@ -70,11 +71,25 @@ export default { } }, methods: { + checkRepeat(word){ + let temp = _.find(this.dataAll, { word: word }); + if (temp && Object.keys(temp).length>0) { + this.$message.error("该关键词已存在。"); + return false + } else { + return true; + } + }, handleSubmit() { this.$refs.FormConfigRef.validate() .then((data) => { - this.submitting = true; + data.word = data.word.trim(); + + if(!this.checkRepeat(data.word)){ + return ; + } + this.submitting = true; if (this.data) data.id = this.data.id; request({ diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/service/sensitive/index.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/service/sensitive/index.vue index 505e8bd5..23b4321f 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/service/sensitive/index.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/service/sensitive/index.vue @@ -50,7 +50,7 @@ - ; + ; @@ -138,7 +138,7 @@ export default { handleExport() { exportFile({ url: "/business/dcInfoBoardVocabulary/export", - filename: "管辖路段", + filename: "情报板敏感词", data: this.getSearchData() }); }, diff --git a/ruoyi-ui/vue.config.js b/ruoyi-ui/vue.config.js index 505b56e0..cb0b8db2 100644 --- a/ruoyi-ui/vue.config.js +++ b/ruoyi-ui/vue.config.js @@ -49,9 +49,9 @@ module.exports = { // target: `http://10.0.81.202:8087`, //现场后台 // target: `http://10.0.81.204:8087`, //现场后台 刘文阁 // target: `http://10.168.69.255:8087`, //正晨后台 连现场物联 刘文阁 - // target: `http://10.168.78.135:8087`, //王钦 + target: `http://10.168.78.135:8087`, //王钦 // target: `http://10.168.66.196:8087`, //正晨后台 连现场物联 刘文阁2 - target: `http://10.168.68.42:8087`, //王思祥 + // target: `http://10.168.68.42:8087`, //王思祥 changeOrigin: true, pathRewrite: { ["^" + process.env.VUE_APP_BASE_API]: "",