Browse Source

Merge branch 'develop' of http://39.106.31.193:9211/mengff/jihe-hs into develop

wangqin
zhangzhang 1 year ago
parent
commit
d75b6c66b5
  1. 8
      ruoyi-ui/src/utils/request.js
  2. 8
      ruoyi-ui/src/views/JiHeExpressway/components/Adaptation.vue
  3. 17
      ruoyi-ui/src/views/JiHeExpressway/components/RoadStateCard/index.vue
  4. 54
      ruoyi-ui/src/views/JiHeExpressway/components/infoBoard/BoardInfoEditor.vue
  5. 4
      ruoyi-ui/src/views/JiHeExpressway/components/infoBoard/BoardPreview.vue
  6. 2
      ruoyi-ui/src/views/JiHeExpressway/components/infoBoard/BoardTplPreview.vue
  7. 3
      ruoyi-ui/src/views/JiHeExpressway/mixins/InfoBoard.js
  8. 2
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/ConditionStatistics/index.vue
  9. 2
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/TrafficIncidents/index.vue
  10. 5
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/FocusedMonitoring/index.vue
  11. 69
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/map.js
  12. 32
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Thumbnail/index.vue
  13. 6
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/index.vue
  14. 12
      ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/eventQuery/index.vue
  15. 15
      ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/eventQuery/progressBar.vue
  16. 19
      ruoyi-ui/src/views/JiHeExpressway/pages/service/board/index.vue
  17. 4
      ruoyi-ui/src/views/JiHeExpressway/utils/enum.js
  18. 4
      ruoyi-ui/vue.config.js

8
ruoyi-ui/src/utils/request.js

@ -141,6 +141,14 @@ service.interceptors.response.use(res => {
else if (message.includes("Request failed with status code")) { else if (message.includes("Request failed with status code")) {
message = "系统接口" + message.substr(message.length - 3) + "异常"; message = "系统接口" + message.substr(message.length - 3) + "异常";
} }
else if (message.includes("client_offline"))
{
message = "设备离线"
}
else if (message.includes("time_out"))
{
message = "连接超时"
}
Message({ Message({
message: message, message: message,
type: 'error', type: 'error',

8
ruoyi-ui/src/views/JiHeExpressway/components/Adaptation.vue

@ -101,10 +101,10 @@ export default {
mounted() { mounted() {
this.initScale(); this.initScale();
window.addEventListener( // window.addEventListener(
"resize", // "resize",
_.debounce(this.initScale.bind(this), 360) // _.debounce(this.initScale.bind(this), 360)
); // );
}, },
}; };
</script> </script>

17
ruoyi-ui/src/views/JiHeExpressway/components/RoadStateCard/index.vue

@ -2,8 +2,14 @@
<BorderRadiusImage class='RoadStateCard' borderRadius="2px" <BorderRadiusImage class='RoadStateCard' borderRadius="2px"
borderColor="linear-gradient(360deg, rgba(55, 231, 255, 0.3), rgba(55, 231, 255, 0))" borderWidth="2px"> borderColor="linear-gradient(360deg, rgba(55, 231, 255, 0.3), rgba(55, 231, 255, 0))" borderWidth="2px">
<div class="left"> <div class="left">
<img :src="(cardData.pictures ? cardData.pictures[0] : null) || require(`./test.png`)"> <!-- <img :src="(cardData.pictures ? cardData.pictures[0] : null) || require(`./test.png`)"> -->
<!-- <img :src="require(`./test.png`)"> --> <!-- <img :src="require(`./test.png`)"> -->
<ElImage style="width: 212px; height: 159px;" :src="cardData.pictures ? cardData.pictures[0] : null"
:preview-src-list="cardData.pictures || []">
<div slot="error">
<i class="el-icon-picture-outline icon"></i>
</div>
</ElImage>
</div> </div>
<div class="right"> <div class="right">
<div class="info"> <div class="info">
@ -135,6 +141,15 @@ export default {
width: 212px; width: 212px;
height: 159px; height: 159px;
} }
.icon {
display:inline-block;
width: 212px;
height: 159px;
line-height: 157px;
text-align: center;
border: 1px solid #fff;
}
} }
.right { .right {

54
ruoyi-ui/src/views/JiHeExpressway/components/infoBoard/BoardInfoEditor.vue

@ -101,6 +101,7 @@
:key="item.dictValue" :key="item.dictValue"
:label="item.dictLabel" :label="item.dictLabel"
:value="item.dictValue" :value="item.dictValue"
v-if="+(item.dictValue.replace('px',''))<=maxFontSize"
> >
</el-option> </el-option>
</el-select> </el-select>
@ -191,6 +192,7 @@ import { debounce } from "lodash";
export default { export default {
data() { data() {
return { return {
maxFontSize:100,
alignmentNum: 2, alignmentNum: 2,
content: "", content: "",
boardWidth: "", boardWidth: "",
@ -316,6 +318,17 @@ export default {
speechSpeed: "0", speechSpeed: "0",
font: "3", font: "3",
}, },
templateDefault: {
category: "",
formatStyle: "2",
content: "",
fontColor: "",
fontSize: "",
fontType: "",
stopTime: 50,
inScreenMode: "",
screenSize: "",
},
isLocked: false, isLocked: false,
}; };
}, },
@ -361,6 +374,26 @@ export default {
}, },
}, },
watch: { 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: { visible: {
handler(newV) { handler(newV) {
this.dialogVisible = newV; this.dialogVisible = newV;
@ -400,21 +433,30 @@ export default {
}, },
mounted() {}, mounted() {},
created() { created() {
this.templateDefault.fontType = this.fontTypeList[0].dictValue //
this.getDicts("iot_devices_font_color").then((res) => { this.getDicts("iot_devices_font_color").then((res) => {
this.colorList = res.data; this.colorList = res.data;
this.templateDefault.fontColor = this.colorList[0].dictValue
// console.log(this.colorList, ""); // console.log(this.colorList, "");
}); });
this.getDicts("iot_device_font_inScreen_mode").then((res) => { this.getDicts("iot_device_font_inScreen_mode").then((res) => {
this.inScreenModeList = res.data; this.inScreenModeList = res.data;
this.templateDefault.inScreenMode = this.inScreenModeList[0].dictValue
// console.log(this.inScreenModeList, ""); // console.log(this.inScreenModeList, "");
}); });
this.getDicts("iot_template_category").then((res) => { this.getDicts("iot_template_category").then((res) => {
this.templateCategoryList = res.data; this.templateCategoryList = res.data;
this.templateDefault.category = this.templateCategoryList[0].dictValue
}); });
this.getDicts("iot_device_font_size").then((res) => { this.getDicts("iot_device_font_size").then((res) => {
this.fontSizeList = res.data; this.fontSizeList = res.data;
// this.templateDefault.fontSize = this.fontSizeList[0].dictValue
// this.dataForm.FONT_SIZE = res.data[1].dictValue // this.dataForm.FONT_SIZE = res.data[1].dictValue
}); });
}, },
methods: { methods: {
initData() { initData() {
@ -433,17 +475,7 @@ export default {
if (this.mode == "add") { if (this.mode == "add") {
let tempTpl = null; let tempTpl = null;
if (this.type == "template") { if (this.type == "template") {
tempTpl = { tempTpl = _.merge({}, this.templateDefault, this.tpl);
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,
};
} else { } else {
tempTpl = _.merge({}, this.deviceCttDefault, this.tpl.origin); // tempTpl = _.merge({}, this.deviceCttDefault, this.tpl.origin); //
} }

4
ruoyi-ui/src/views/JiHeExpressway/components/infoBoard/BoardPreview.vue

@ -40,7 +40,7 @@ export default {
}, },
tpl:{ tpl:{
handler(newV){ handler(newV){
this.contentArr = this.tpl.textContent.replaceAll(/\\\\n/g, '\n').replaceAll(/ /g, '&nbsp').split('\n'); this.contentArr = this.tpl.textContent.replaceAll(/\\\\n/g, '\n').replaceAll(/\\=/g, '=').replaceAll(/\\,/g, ',').replaceAll(/ /g, '&nbsp').split('\n');
this.setStyle(); this.setStyle();
}, },
deep:true, deep:true,
@ -113,6 +113,8 @@ export default {
color: #f00; color: #f00;
line-height: 1; line-height: 1;
margin-bottom: 0; margin-bottom: 0;
word-break: keep-all;
white-space: nowrap;
} }
} }
} }

2
ruoyi-ui/src/views/JiHeExpressway/components/infoBoard/BoardTplPreview.vue

@ -110,6 +110,8 @@ export default {
color: #f00; color: #f00;
line-height: 1; line-height: 1;
margin-bottom: 0; margin-bottom: 0;
word-break: keep-all;
white-space: nowrap;
} }
} }
} }

3
ruoyi-ui/src/views/JiHeExpressway/mixins/InfoBoard.js

@ -11,13 +11,14 @@ export default{
// 新增待下发 // 新增待下发
____onAddDeviceItem() { ____onAddDeviceItem() {
let arr = this.selectedSize.split("*"); let arr = this.selectedSize.split("*");
this.editDialog = { this.editDialog = {
visible: true, visible: true,
mode: "add", mode: "add",
type: "device", type: "device",
tpl: { tpl: {
"textContent": "", "textContent": "",
origin: { "origin": {
displayAreaWidth: +arr[0], displayAreaWidth: +arr[0],
displayAreaHeight: +arr[1] displayAreaHeight: +arr[1]
} }

2
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/ConditionStatistics/index.vue

@ -5,7 +5,7 @@
<img class="icon-right keep-ratio" origin="right" src="@screen/images/icon/icon_right.png" /> <img class="icon-right keep-ratio" origin="right" src="@screen/images/icon/icon_right.png" />
</div> </div>
<div class="content-r-t-box"> <div class="content-r-t-box">
<div class="box-title keep-ratio" origin="left"><span>预警事件</span></div> <div class="box-title keep-ratio" origin="left"><span>交通事件</span></div>
<div class="box-content"> <div class="box-content">
<div class="box-content-l"> <div class="box-content-l">
<div class="event-item keep-ratio" origin="left">今日<span>{{ earlyWarningEvents.day }}</span> </div> <div class="event-item keep-ratio" origin="left">今日<span>{{ earlyWarningEvents.day }}</span> </div>

2
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/TrafficIncidents/index.vue

@ -132,7 +132,7 @@ export default {
if (code != 200) return; if (code != 200) return;
this.data = { ...data, ...this.data }; this.data = { ...data, ...this.data };
console.log(data); console.log('trafficIncidents',data);
}) })
.catch((err) => {}); .catch((err) => {});
}, },

5
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/FocusedMonitoring/index.vue

@ -17,7 +17,7 @@
<span class="abnormal">{{ trafficIncidents[0] }}</span> <span class="abnormal">{{ trafficIncidents[0] }}</span>
<span>/{{ trafficIncidents[1] }}</span> <span>/{{ trafficIncidents[1] }}</span>
</p> </p>
<div>交通事</div> <div>交通事</div>
</div> </div>
<div class="monitor-item keep-ratio"> <div class="monitor-item keep-ratio">
<span>{{ constructionSection }}</span> <span>{{ constructionSection }}</span>
@ -44,6 +44,7 @@
</div> </div>
</Bg2> </Bg2>
</template> </template>
<script> <script>
import Bg2 from "@screen/components/Decorations/bg-2.vue" import Bg2 from "@screen/components/Decorations/bg-2.vue"
import request from "@/utils/request"; import request from "@/utils/request";
@ -96,6 +97,7 @@ export default {
} }
} }
</script> </script>
<style lang="less"> <style lang="less">
.content-l-t { .content-l-t {
width: 100%; width: 100%;
@ -184,6 +186,7 @@ export default {
width: 131px; width: 131px;
height: 35px; height: 35px;
display: flex; display: flex;
letter-spacing: 2px;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
background: url("~@screen/images/bg/box_bg_004.png") no-repeat; background: url("~@screen/images/bg/box_bg_004.png") no-repeat;

69
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/map.js

@ -2,6 +2,7 @@ import { loadAMap } from "@screen/pages/Home/components/AMapContainer/loadAMap.j
// import { Message } from "element-ui"; // import { Message } from "element-ui";
import Vue from "vue"; import Vue from "vue";
import { lngLatMap } from "./buttonEvent"; import { lngLatMap } from "./buttonEvent";
import { upperFirst } from "lodash";
/** /**
* @typedef {Object} Point * @typedef {Object} Point
* @property {number} weight - The weight of the item. * @property {number} weight - The weight of the item.
@ -252,26 +253,24 @@ export class MarkerCluster {
const findIndex = this.data.findIndex( const findIndex = this.data.findIndex(
(removeData) => removeData === item (removeData) => removeData === item
); );
const { stakeMark } = item.extData; let { stakeMark } = item.extData;
stakeMark = upperFirst(stakeMark); //统一格式 大写K
const existNode = graphInstance.getCellById(stakeMark); const existNode = graphInstance.getCellById(stakeMark);
const lnglat = item.lnglat; const lnglat = item.lnglat;
if (lnglat) { if (lnglat) {
const { lat, lng } = getLatAndLng(lnglat); const { lat, lng } = getLatAndLng(lnglat);
const lngLatStr = `${lng}/${lat}`; const lngLatStr = `${lng}/${lat}`;
const lngLatArr = lngLatMap[lngLatStr]; //已是移除后的数据集 const lngLatArr = lngLatMap[lngLatStr]; //已是移除后的数据集
console.log(lngLatArr, lngLatArr?.length, "length");
if (existNode) { if (existNode) {
window.graphInstance.removeNode(existNode.id);
if (lngLatArr) { if (lngLatArr) {
if (lngLatArr.length === 0) console.log(); if (lngLatArr.length === 0)
// window.graphInstance.removeNode(stakeMark); window.graphInstance.removeNode(existNode.id);
else { else {
//移除并重新添加 //更新节点
// window.graphInstance.removeNode(stakeMark); const updateNode = graphInstance.getCellById(stakeMark);
console.log("重新ADD", lngLatArr); updateNode.updateData(getDataConf(lngLatArr, item.extData));
// addInGraphHandle(lngLatArr);
} }
} //else window.graphInstance.removeNode(stakeMark); } else window.graphInstance.removeNode(stakeMark);
} }
} }
if (findIndex > -1) this.data.splice(findIndex, 1); if (findIndex > -1) this.data.splice(findIndex, 1);
@ -373,11 +372,11 @@ export function marksAddInGraph(data) {
export function addInGraphHandle(data) { export function addInGraphHandle(data) {
const graphInstance = window.graphInstance; const graphInstance = window.graphInstance;
const nowBg = getState(data) ? normalBg : faultBg;
const extData = data[0].extData; const extData = data[0].extData;
const { item: eventItem } = data[0].config; const { item: eventItem } = data[0].config;
if (eventItem.id.match("./事件专题")) { if (eventItem.id.match("./事件专题")) {
let { stakeMark, lang } = extData; let { stakeMark, lang } = extData;
stakeMark = upperFirst(stakeMark); //统一格式 大写K
const distance = const distance =
(Number( (Number(
stakeMark.replace(/\.\d+/, "").replace("+", ".").replace(/[Kk]/, "") stakeMark.replace(/\.\d+/, "").replace("+", ".").replace(/[Kk]/, "")
@ -386,28 +385,12 @@ export function addInGraphHandle(data) {
window.canvasRatio + window.canvasRatio +
window.canvasWidth * window.offsetRatio; //K54+394 开始到K208+979计算的比例尺 window.canvasWidth * window.offsetRatio; //K54+394 开始到K208+979计算的比例尺
const node = {}; const node = { shape: "custom-html", effect: ["data"] };
if (data.length === 1) { node.data = getDataConf(data, extData);
node.shape = "singleNode-html";
node.data = {
nowBg,
src: `${getIcon(data[0])}`,
extData,
};
} else {
node.shape = "multiNode-html";
node.data = {
nowBg,
// width: `${36 + `${data.length}`.length * 15}px`,
length: data.length,
extData,
};
}
const existNode = graphInstance.getCellById(stakeMark); const existNode = graphInstance.getCellById(stakeMark);
if (existNode) { if (existNode) {
graphInstance.removeCell(existNode.id); existNode.updateData(node.data);
} } else {
console.log(lang, "lang");
// setTimeout(() => { // setTimeout(() => {
graphInstance.addNode({ graphInstance.addNode({
x: distance, x: distance,
@ -420,6 +403,30 @@ export function addInGraphHandle(data) {
}); });
// }, 0); // }, 0);
} }
console.log(lang, "lang");
}
}
function getDataConf(data, extData) {
let dataConf;
const nowBg = getState(data) ? normalBg : faultBg;
if (data.length === 1) {
dataConf = {
shape: "singleNode-html",
nowBg,
src: `${getIcon(data[0])}`,
extData,
};
} else {
dataConf = {
shape: "multiNode-html",
nowBg,
// width: `${36 + `${data.length}`.length * 15}px`,
length: data.length,
extData,
};
}
return dataConf;
} }
export function getLatAndLng(lnglat) { export function getLatAndLng(lnglat) {

32
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Thumbnail/index.vue

@ -11,13 +11,13 @@ import { actualLocationList, canvasList } from "./data.js";
const mouseenterDebounceFunc = debounce(({ node }) => { const mouseenterDebounceFunc = debounce(({ node }) => {
if (["singleNode-html", "multiNode-html"].indexOf(node.shape) >= 0) { if (["custom-html"].indexOf(node.shape) >= 0) {
node.setZIndex(100); node.setZIndex(100);
console.log(node); console.log(node);
} }
}, 0); }, 0);
const mouseleaveDebounceFunc = debounce(({ node }) => { const mouseleaveDebounceFunc = debounce(({ node }) => {
if (["singleNode-html", "multiNode-html"].indexOf(node.shape) >= 0) { if (["custom-html"].indexOf(node.shape) >= 0) {
node.setZIndex(1); node.setZIndex(1);
} }
}, 0); }, 0);
@ -25,7 +25,7 @@ const mouseleaveDebounceFunc = debounce(({ node }) => {
const clickDebounceFunc = debounce(({ node }) => { const clickDebounceFunc = debounce(({ node }) => {
const mapIns = Vue.prototype.mapIns; const mapIns = Vue.prototype.mapIns;
if (["singleNode-html", "multiNode-html"].indexOf(node.shape) >= 0) { if (["custom-html"].indexOf(node.shape) >= 0) {
const extData = node.getData()?.extData; const extData = node.getData()?.extData;
if (extData) { if (extData) {
mapIns.setZoomAndCenter(18, [extData.longitude, extData.latitude]); mapIns.setZoomAndCenter(18, [extData.longitude, extData.latitude]);
@ -188,16 +188,18 @@ export default {
graph.on('node:click', clickDebounceFunc); graph.on('node:click', clickDebounceFunc);
Shape.HTML.register({ Shape.HTML.register({
shape: 'singleNode-html', shape: 'custom-html',
width: 160, width: 160,
height: 80, height: 80,
html(node) { html(node) {
const data = node.getData(); const data = node.getData();
const { shape, nowBg, src, length } = data;
const { height, width } = node.prop().size; const { height, width } = node.prop().size;
const div = document.createElement('div') const div = document.createElement('div')
if (shape === "singleNode-html") {
div.innerHTML = ` div.innerHTML = `
<div style=" <div style="
background-image: url(${data.nowBg}); background-image: url(${nowBg});
background-size: 100% 100%; background-size: 100% 100%;
background-repeat: no-repeat; background-repeat: no-repeat;
width: ${width * 1.2}px; width: ${width * 1.2}px;
@ -209,24 +211,14 @@ export default {
width: ${width * 0.8}px; width: ${width * 0.8}px;
height: ${height * 0.8}px; height: ${height * 0.8}px;
margin-top: ${height * 0.1}px; margin-top: ${height * 0.1}px;
" src='${data.src}' " src='${src}'
> >
</div> </div>
`; `;
return div } else if (shape === "multiNode-html") {
},
})
Shape.HTML.register({
shape: 'multiNode-html',
width: 160,
height: 80,
html(node) {
const data = node.getData();
const { height, width } = node.prop().size;
const div = document.createElement('div')
div.innerHTML = ` div.innerHTML = `
<div style=" <div style="
background-image: url(${data.nowBg}); background-image: url(${nowBg});
background-size: 100% 100%; background-size: 100% 100%;
background-repeat: no-repeat; background-repeat: no-repeat;
display: flex; display: flex;
@ -234,12 +226,14 @@ export default {
align-items: center; align-items: center;
padding-bottom: ${height * 0.1}px; padding-bottom: ${height * 0.1}px;
"> ">
${data.length} ${length}
</div> </div>
`; `;
}
return div return div
}, },
}) })
window.graphInstance = graph; window.graphInstance = graph;
graph.addNodes(baseData.nodes); graph.addNodes(baseData.nodes);

6
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/index.vue

@ -359,8 +359,8 @@ export default {
data.visibility = otherConfig.visibility; data.visibility = otherConfig.visibility;
data.pictures = otherConfig.pictures || []; data.pictures = otherConfig.pictures || [];
// data.videoList = otherConfig.videoList || [] data.videoList = otherConfig.videoList || []
data.videoList = otherConfig.videoList || ['https://sf1-cdn-tos.huoshanstatic.com/obj/media-fe/xgplayer_doc_video/mp4/xgplayer-demo-480p.mp4'] // data.videoList = otherConfig.videoList || ['https://sf1-cdn-tos.huoshanstatic.com/obj/media-fe/xgplayer_doc_video/mp4/xgplayer-demo-480p.mp4']
} }
this.detailDialogFormData = data; this.detailDialogFormData = data;
@ -377,7 +377,7 @@ export default {
let data = result.data; let data = result.data;
data.stringDirection = gzDirectionMapping[data.direction] || data.direction; data.stringDirection = gzDirectionMapping[data.direction] || data.direction;
data.videoList = ['https://sf1-cdn-tos.huoshanstatic.com/obj/media-fe/xgplayer_doc_video/mp4/xgplayer-demo-480p.mp4']; data.videoList = [];
if (data.otherConfig) { if (data.otherConfig) {
let otherConfig = JSON.parse(data.otherConfig); let otherConfig = JSON.parse(data.otherConfig);
// data.pictures = otherConfig.pictures || []; // data.pictures = otherConfig.pictures || [];

12
ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/eventQuery/index.vue

@ -1,7 +1,8 @@
<template> <template>
<div class="congestion"> <div class="congestion">
<div class="board"> <div class="board">
<ProgressBar class="keep-ratio" @selectItem="selectProgress" :dataList="dataList" :selectIndex="selectIndex" /> <ProgressBar class="keep-ratio" @selectItem="selectProgress" :dataList="dataList" :selectIndex="selectIndex"
:reset="reset" />
<div class="searchPanel"> <div class="searchPanel">
<RadioGroup :options="[ <RadioGroup :options="[
{ key: '1', label: '菏泽' }, { key: '1', label: '菏泽' },
@ -26,7 +27,8 @@
: '' : ''
" placeholder="请选择" :clearable="false" /> " placeholder="请选择" :clearable="false" />
<el-button type="primary" size="mini" class="btnSearch" @click="searchQuery" icon="el-icon-search">查询</el-button> <el-button type="primary" size="mini" class="btnSearch" @click="searchQuery"
icon="el-icon-search">查询</el-button>
<el-button class="btnReset" size="mini" icon="el-icon-refresh-left" @click="onReset">重置</el-button> <el-button class="btnReset" size="mini" icon="el-icon-refresh-left" @click="onReset">重置</el-button>
</div> </div>
</div> </div>
@ -151,6 +153,7 @@ export default {
dataList: [], dataList: [],
selectIndex: 2, selectIndex: 2,
selectId: 2, selectId: 2,
reset: false,
type: "year", type: "year",
chart1List: [], chart1List: [],
chart2List: [], chart2List: [],
@ -206,16 +209,17 @@ export default {
selectProgress(item, index) { selectProgress(item, index) {
this.selectIndex = index; this.selectIndex = index;
this.selectId = item.id; this.selectId = item.id;
this.reset = false;
this.searchQuery(); this.searchQuery();
}, },
onReset() { onReset() {
this.direction = "1"; this.direction = "1";
this.type = "year"; this.type = "year";
this.dateTime = "2024"; this.dateTime = "2024";
this.selectId = this.dataList[0].id;
this.selectId = 2; this.selectId = 2;
this.selectIndex = 2; this.selectIndex = 2;
this.searchQuery() this.reset = true;
this.searchQuery();
}, },
searchQuery() { searchQuery() {
let startTime = ""; let startTime = "";

15
ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/eventQuery/progressBar.vue

@ -36,6 +36,10 @@ export default {
selectIndex: { selectIndex: {
type: Number, type: Number,
default: 1 default: 1
},
reset: {
type: Boolean,
default: false
} }
}, },
data() { data() {
@ -46,6 +50,16 @@ export default {
}, },
created() { created() {
},
watch: {
reset: {
handler(newV) {
if (newV) {
this.selectLine = -1;
}
},
immediate: true,
},
}, },
methods: { methods: {
selectItem(index, num, item) { selectItem(index, num, item) {
@ -205,4 +219,3 @@ export default {
} }
} }
</style> </style>

19
ruoyi-ui/src/views/JiHeExpressway/pages/service/board/index.vue

@ -57,8 +57,8 @@
:key="index" :key="index"
> >
<div class="title">{{ itm.deviceName }}</div> <div class="title">{{ itm.deviceName }}</div>
<el-tooltip :content="(item.deviceState == 0 || item.deviceState == null) ? '离线' : '在线'" placement="top"> <el-tooltip :content="(itm.deviceState == 0 || itm.deviceState == null) ? '离线' : '在线'" placement="top">
<img src="@/assets/jihe/images/offline.svg" class="state" v-if="item.deviceState==0 || item.deviceState==null"> <img src="@/assets/jihe/images/offline.svg" class="state" v-if="itm.deviceState=='0' || itm.deviceState==null">
<img src="@/assets/jihe/images/online.svg" class="state" v-else> <img src="@/assets/jihe/images/online.svg" class="state" v-else>
</el-tooltip> </el-tooltip>
<el-tooltip content="回读" placement="top"> <el-tooltip content="回读" placement="top">
@ -455,7 +455,7 @@ export default {
res.data.forEach((item) => { res.data.forEach((item) => {
this.boardSizeDic[item.dictValue] = { this.boardSizeDic[item.dictValue] = {
label: item.dictLabel, label: item.dictLabel,
list: [], list: []
}; };
}); });
}); });
@ -533,6 +533,7 @@ export default {
if (_.isString(item.otherConfig)) { if (_.isString(item.otherConfig)) {
item.otherConfig = JSON.parse(item.otherConfig); item.otherConfig = JSON.parse(item.otherConfig);
} }
item.iotDeviceId = item.iotDeviceId || "null_" + item.id;
this.boardSizeDic[item.otherConfig.screenSize].list.push(item); this.boardSizeDic[item.otherConfig.screenSize].list.push(item);
if (!this.selectedSize) { if (!this.selectedSize) {
this.selectedSize = item.otherConfig.screenSize; this.selectedSize = item.otherConfig.screenSize;
@ -569,7 +570,7 @@ export default {
this.selectedBdMsg = []; this.selectedBdMsg = [];
this.selectedBdMsg = _.cloneDeep(testDeviceInfo.data["3A"].content); this.selectedBdMsg = _.cloneDeep(testDeviceInfo.data["3A"].content);
} else { } else {
if (!deviceFrom.iotDeviceId) { if (!deviceFrom.iotDeviceId || deviceFrom.iotDeviceId.includes("null_")) {
this.$message.warning("设备未接入!"); this.$message.warning("设备未接入!");
return; return;
} }
@ -586,12 +587,16 @@ export default {
} }
}, },
____onAddTemplate() { ____onAddTemplate() {
// if(selectedSize){
// fontSize = "64px"
// }
this.editDialog = { this.editDialog = {
visible: true, visible: true,
mode: "add", mode: "add",
type: "template", type: "template",
tpl: { tpl: {
content: "", content: ""
}, },
}; };
}, },
@ -783,8 +788,8 @@ export default {
return; return;
} }
this.checkedDeviceIds = [arr.pop()]; this.checkedDeviceIds = [arr.pop()];
if (!this.checkedDeviceIds[0]) { if (!this.checkedDeviceIds[0] || this.checkedDeviceIds[0].includes("null_")) {
this.$message.warning("该设备缺少iotDeviceId参数!"); this.$message.warning("设备未接入!");
} }
this.selectedDevice = _.find(this.boardSizeDic[this.selectedSize].list, { this.selectedDevice = _.find(this.boardSizeDic[this.selectedSize].list, {
iotDeviceId: this.checkedDeviceIds[0], iotDeviceId: this.checkedDeviceIds[0],

4
ruoyi-ui/src/views/JiHeExpressway/utils/enum.js

@ -40,13 +40,13 @@ export const CameraDirectionEnum = {
// text: "上下行 (双向)", // text: "上下行 (双向)",
// }, // },
1: { 1: {
text: "上行(菏泽方向)", text: "菏泽方向",
}, },
2: { 2: {
text: "中", text: "中",
}, },
3: { 3: {
text: "下行(济南方向)", text: "济南方向",
}, },
}; };

4
ruoyi-ui/vue.config.js

@ -51,8 +51,8 @@ module.exports = {
// target: `http://10.0.81.204:8087`, //现场后台 刘文阁 // target: `http://10.0.81.204:8087`, //现场后台 刘文阁
// target: `http://10.168.69.255: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.66.196:8087`, //正晨后台 连现场物联 刘文阁2
target: `http://10.168.68.42:8087`, //王思祥 // target: `http://10.168.68.42:8087`, //王思祥
changeOrigin: true, changeOrigin: true,
pathRewrite: { pathRewrite: {
["^" + process.env.VUE_APP_BASE_API]: "", ["^" + process.env.VUE_APP_BASE_API]: "",

Loading…
Cancel
Save