diff --git a/ruoyi-ui/src/utils/request.js b/ruoyi-ui/src/utils/request.js
index d31b22f7..1acab51b 100644
--- a/ruoyi-ui/src/utils/request.js
+++ b/ruoyi-ui/src/utils/request.js
@@ -141,6 +141,14 @@ service.interceptors.response.use(res => {
else if (message.includes("Request failed with status code")) {
message = "系统接口" + message.substr(message.length - 3) + "异常";
}
+ else if (message.includes("client_offline"))
+ {
+ message = "设备离线"
+ }
+ else if (message.includes("time_out"))
+ {
+ message = "连接超时"
+ }
Message({
message: message,
type: 'error',
diff --git a/ruoyi-ui/src/views/JiHeExpressway/components/Adaptation.vue b/ruoyi-ui/src/views/JiHeExpressway/components/Adaptation.vue
index ff5a269d..8d34a74d 100644
--- a/ruoyi-ui/src/views/JiHeExpressway/components/Adaptation.vue
+++ b/ruoyi-ui/src/views/JiHeExpressway/components/Adaptation.vue
@@ -101,10 +101,10 @@ export default {
mounted() {
this.initScale();
- window.addEventListener(
- "resize",
- _.debounce(this.initScale.bind(this), 360)
- );
+ // window.addEventListener(
+ // "resize",
+ // _.debounce(this.initScale.bind(this), 360)
+ // );
},
};
diff --git a/ruoyi-ui/src/views/JiHeExpressway/components/RoadStateCard/index.vue b/ruoyi-ui/src/views/JiHeExpressway/components/RoadStateCard/index.vue
index c2db7f75..bdbee4b9 100644
--- a/ruoyi-ui/src/views/JiHeExpressway/components/RoadStateCard/index.vue
+++ b/ruoyi-ui/src/views/JiHeExpressway/components/RoadStateCard/index.vue
@@ -2,8 +2,14 @@
-
![]()
+
+
+
+
+
+
-
+
@@ -135,6 +141,15 @@ export default {
width: 212px;
height: 159px;
}
+
+ .icon {
+ display:inline-block;
+ width: 212px;
+ height: 159px;
+ line-height: 157px;
+ text-align: center;
+ border: 1px solid #fff;
+ }
}
.right {
diff --git a/ruoyi-ui/src/views/JiHeExpressway/components/infoBoard/BoardInfoEditor.vue b/ruoyi-ui/src/views/JiHeExpressway/components/infoBoard/BoardInfoEditor.vue
index 5a34ea16..54ba5735 100644
--- a/ruoyi-ui/src/views/JiHeExpressway/components/infoBoard/BoardInfoEditor.vue
+++ b/ruoyi-ui/src/views/JiHeExpressway/components/infoBoard/BoardInfoEditor.vue
@@ -101,6 +101,7 @@
:key="item.dictValue"
:label="item.dictLabel"
:value="item.dictValue"
+ v-if="+(item.dictValue.replace('px',''))<=maxFontSize"
>
@@ -191,6 +192,7 @@ import { debounce } from "lodash";
export default {
data() {
return {
+ maxFontSize:100,
alignmentNum: 2,
content: "",
boardWidth: "",
@@ -316,6 +318,17 @@ export default {
speechSpeed: "0",
font: "3",
},
+ templateDefault: {
+ category: "",
+ formatStyle: "2",
+ content: "",
+ fontColor: "",
+ fontSize: "",
+ fontType: "",
+ stopTime: 50,
+ inScreenMode: "",
+ screenSize: "",
+ },
isLocked: false,
};
},
@@ -361,6 +374,26 @@ export default {
},
},
watch: {
+ screenSize(newV){
+
+ if(newV){
+ let boardH = newV.split("*")[1];
+ let fontSize = "20";
+ if (['64', '48'].includes(boardH)) {
+ this.maxFontSize = +boardH
+ fontSize = boardH + ""
+ } else if (['80'].includes(boardH)) {
+ this.maxFontSize = +boardH / 2
+ fontSize = +boardH / 2 + ""
+ } else if (['160'].includes(boardH)) {
+ this.maxFontSize = +boardH / 2
+ fontSize = +boardH / 4 + ""
+ }
+ this.deviceCttDefault.fontSize = fontSize
+ this.templateDefault.screenSize = newV;
+ this.templateDefault.fontSize = fontSize;
+ }
+ },
visible: {
handler(newV) {
this.dialogVisible = newV;
@@ -400,21 +433,30 @@ export default {
},
mounted() {},
created() {
+ this.templateDefault.fontType = this.fontTypeList[0].dictValue //设置模板的默认值
this.getDicts("iot_devices_font_color").then((res) => {
this.colorList = res.data;
+ this.templateDefault.fontColor = this.colorList[0].dictValue
// console.log(this.colorList, "字体颜色");
});
this.getDicts("iot_device_font_inScreen_mode").then((res) => {
this.inScreenModeList = res.data;
+ this.templateDefault.inScreenMode = this.inScreenModeList[0].dictValue
// console.log(this.inScreenModeList, "入屏方式");
});
this.getDicts("iot_template_category").then((res) => {
this.templateCategoryList = res.data;
+ this.templateDefault.category = this.templateCategoryList[0].dictValue
});
this.getDicts("iot_device_font_size").then((res) => {
this.fontSizeList = res.data;
+ // this.templateDefault.fontSize = this.fontSizeList[0].dictValue
// this.dataForm.FONT_SIZE = res.data[1].dictValue
});
+
+
+
+
},
methods: {
initData() {
@@ -433,17 +475,7 @@ export default {
if (this.mode == "add") {
let tempTpl = null;
if (this.type == "template") {
- tempTpl = {
- category: this.templateCategoryList[0].dictValue,
- formatStyle: 0,
- content: "",
- fontColor: this.colorList[0].dictValue,
- fontSize: this.fontSizeList[0].dictValue,
- fontType: this.fontTypeList[0].dictValue,
- stopTime: 50,
- inScreenMode: this.inScreenModeList[0].dictValue,
- screenSize: this.screenSize,
- };
+ tempTpl = _.merge({}, this.templateDefault, this.tpl);
} else {
tempTpl = _.merge({}, this.deviceCttDefault, this.tpl.origin); //首页弹窗,新增设备项时,需要传设备尺寸过来
}
diff --git a/ruoyi-ui/src/views/JiHeExpressway/components/infoBoard/BoardPreview.vue b/ruoyi-ui/src/views/JiHeExpressway/components/infoBoard/BoardPreview.vue
index 005fa7d5..51c3e6da 100644
--- a/ruoyi-ui/src/views/JiHeExpressway/components/infoBoard/BoardPreview.vue
+++ b/ruoyi-ui/src/views/JiHeExpressway/components/infoBoard/BoardPreview.vue
@@ -40,7 +40,7 @@ export default {
},
tpl:{
handler(newV){
- this.contentArr = this.tpl.textContent.replaceAll(/\\\\n/g, '\n').replaceAll(/ /g, ' ').split('\n');
+ this.contentArr = this.tpl.textContent.replaceAll(/\\\\n/g, '\n').replaceAll(/\\=/g, '=').replaceAll(/\\,/g, ',').replaceAll(/ /g, ' ').split('\n');
this.setStyle();
},
deep:true,
@@ -113,6 +113,8 @@ export default {
color: #f00;
line-height: 1;
margin-bottom: 0;
+ word-break: keep-all;
+ white-space: nowrap;
}
}
}
diff --git a/ruoyi-ui/src/views/JiHeExpressway/components/infoBoard/BoardTplPreview.vue b/ruoyi-ui/src/views/JiHeExpressway/components/infoBoard/BoardTplPreview.vue
index 71f8144c..473dbb38 100644
--- a/ruoyi-ui/src/views/JiHeExpressway/components/infoBoard/BoardTplPreview.vue
+++ b/ruoyi-ui/src/views/JiHeExpressway/components/infoBoard/BoardTplPreview.vue
@@ -110,6 +110,8 @@ export default {
color: #f00;
line-height: 1;
margin-bottom: 0;
+ word-break: keep-all;
+ white-space: nowrap;
}
}
}
diff --git a/ruoyi-ui/src/views/JiHeExpressway/mixins/InfoBoard.js b/ruoyi-ui/src/views/JiHeExpressway/mixins/InfoBoard.js
index 0dcc45a8..5d9b420e 100644
--- a/ruoyi-ui/src/views/JiHeExpressway/mixins/InfoBoard.js
+++ b/ruoyi-ui/src/views/JiHeExpressway/mixins/InfoBoard.js
@@ -11,13 +11,14 @@ export default{
// 新增待下发
____onAddDeviceItem() {
let arr = this.selectedSize.split("*");
+
this.editDialog = {
visible: true,
mode: "add",
type: "device",
tpl: {
"textContent": "",
- origin: {
+ "origin": {
displayAreaWidth: +arr[0],
displayAreaHeight: +arr[1]
}
diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/ConditionStatistics/index.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/ConditionStatistics/index.vue
index 0953fe23..2abe0e3b 100644
--- a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/ConditionStatistics/index.vue
+++ b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/ConditionStatistics/index.vue
@@ -5,7 +5,7 @@
-
预警事件
+
交通事件
今日:{{ earlyWarningEvents.day }} 起
diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/TrafficIncidents/index.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/TrafficIncidents/index.vue
index 944d0c5f..6985b889 100644
--- a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/TrafficIncidents/index.vue
+++ b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/TrafficIncidents/index.vue
@@ -132,7 +132,7 @@ export default {
if (code != 200) return;
this.data = { ...data, ...this.data };
- console.log(data);
+ console.log('trafficIncidents',data);
})
.catch((err) => {});
},
diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/FocusedMonitoring/index.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/FocusedMonitoring/index.vue
index 39d4a78f..b99c98e0 100644
--- a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/FocusedMonitoring/index.vue
+++ b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/FocusedMonitoring/index.vue
@@ -17,7 +17,7 @@
{{ trafficIncidents[0] }}
/{{ trafficIncidents[1] }}
-
交通事件
+
交通事故
{{ constructionSection }}
@@ -44,6 +44,7 @@
+
+
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/service/board/index.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/service/board/index.vue
index 516e4897..14477d93 100644
--- a/ruoyi-ui/src/views/JiHeExpressway/pages/service/board/index.vue
+++ b/ruoyi-ui/src/views/JiHeExpressway/pages/service/board/index.vue
@@ -57,8 +57,8 @@
:key="index"
>
{{ itm.deviceName }}
-
-
+
+
@@ -455,7 +455,7 @@ export default {
res.data.forEach((item) => {
this.boardSizeDic[item.dictValue] = {
label: item.dictLabel,
- list: [],
+ list: []
};
});
});
@@ -533,6 +533,7 @@ export default {
if (_.isString(item.otherConfig)) {
item.otherConfig = JSON.parse(item.otherConfig);
}
+ item.iotDeviceId = item.iotDeviceId || "null_" + item.id;
this.boardSizeDic[item.otherConfig.screenSize].list.push(item);
if (!this.selectedSize) {
this.selectedSize = item.otherConfig.screenSize;
@@ -569,7 +570,7 @@ export default {
this.selectedBdMsg = [];
this.selectedBdMsg = _.cloneDeep(testDeviceInfo.data["3A"].content);
} else {
- if (!deviceFrom.iotDeviceId) {
+ if (!deviceFrom.iotDeviceId || deviceFrom.iotDeviceId.includes("null_")) {
this.$message.warning("设备未接入!");
return;
}
@@ -586,12 +587,16 @@ export default {
}
},
____onAddTemplate() {
+
+ // if(selectedSize){
+ // fontSize = "64px"
+ // }
this.editDialog = {
visible: true,
mode: "add",
type: "template",
tpl: {
- content: "",
+ content: ""
},
};
},
@@ -783,8 +788,8 @@ export default {
return;
}
this.checkedDeviceIds = [arr.pop()];
- if (!this.checkedDeviceIds[0]) {
- this.$message.warning("该设备缺少iotDeviceId参数!");
+ if (!this.checkedDeviceIds[0] || this.checkedDeviceIds[0].includes("null_")) {
+ this.$message.warning("设备未接入!");
}
this.selectedDevice = _.find(this.boardSizeDic[this.selectedSize].list, {
iotDeviceId: this.checkedDeviceIds[0],
diff --git a/ruoyi-ui/src/views/JiHeExpressway/utils/enum.js b/ruoyi-ui/src/views/JiHeExpressway/utils/enum.js
index cad7cfc3..208678ee 100644
--- a/ruoyi-ui/src/views/JiHeExpressway/utils/enum.js
+++ b/ruoyi-ui/src/views/JiHeExpressway/utils/enum.js
@@ -40,13 +40,13 @@ export const CameraDirectionEnum = {
// text: "上下行 (双向)",
// },
1: {
- text: "上行(菏泽方向)",
+ text: "菏泽方向",
},
2: {
text: "中",
},
3: {
- text: "下行(济南方向)",
+ text: "济南方向",
},
};
diff --git a/ruoyi-ui/vue.config.js b/ruoyi-ui/vue.config.js
index 25f5969a..388187f1 100644
--- a/ruoyi-ui/vue.config.js
+++ b/ruoyi-ui/vue.config.js
@@ -51,8 +51,8 @@ module.exports = {
// 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.66.196:8087`, //正晨后台 连现场物联 刘文阁2
- target: `http://10.168.68.42:8087`, //王思祥
+ target: `http://10.168.66.196:8087`, //正晨后台 连现场物联 刘文阁2
+ // target: `http://10.168.68.42:8087`, //王思祥
changeOrigin: true,
pathRewrite: {
["^" + process.env.VUE_APP_BASE_API]: "",