Browse Source

更新

wangqin
hui 7 months ago
parent
commit
0af02a834a
  1. 6
      ruoyi-ui/src/common/menuData.js
  2. 3
      ruoyi-ui/src/views/JiHeExpressway/pages/control/device/strategy/components/AddNEditDialog.vue
  3. 19
      ruoyi-ui/src/views/JiHeExpressway/pages/control/device/strategy/components/TaskItem.vue
  4. 18
      ruoyi-ui/src/views/JiHeExpressway/pages/control/device/strategy/components/taskEditDialog.vue
  5. 33
      ruoyi-ui/src/views/JiHeExpressway/pages/perception/topology/index.vue
  6. 3
      ruoyi-ui/src/views/JiHeExpressway/utils/api/batch.js
  7. 6
      ruoyi-ui/vue.config.js

6
ruoyi-ui/src/common/menuData.js

@ -37,6 +37,12 @@ export default [
name: "perceptionTrafficSituation", name: "perceptionTrafficSituation",
component: "perception/trafficSituation/index.vue", component: "perception/trafficSituation/index.vue",
}, },
{
title: "网络拓扑",
name: "perceptionTopology",
path: "/perception/topology",
component: "perception/topology/index.vue"
}
], ],
}, },
{ {

3
ruoyi-ui/src/views/JiHeExpressway/pages/control/device/strategy/components/AddNEditDialog.vue

@ -34,6 +34,9 @@
</div> </div>
</div> </div>
<div> <div>
<!--
<p v-for="item, index1 in taskGroup.tasksEdit">
{{ item.jobId }}</p> -->
<TaskItem v-for="item, index1 in taskGroup.tasksEdit" :propData="item" :groupId="propData.id" <TaskItem v-for="item, index1 in taskGroup.tasksEdit" :propData="item" :groupId="propData.id"
:time="taskGroup.time" @onModify="newV=>onModifyItem(newV, item)"> :time="taskGroup.time" @onModify="newV=>onModifyItem(newV, item)">
</TaskItem> </TaskItem>

19
ruoyi-ui/src/views/JiHeExpressway/pages/control/device/strategy/components/TaskItem.vue

@ -3,16 +3,17 @@
<el-form> <el-form>
<div class="flex" style="justify-content: space-between;"> <div class="flex" style="justify-content: space-between;">
<div> <div>
设备类型:<span>{{ deviceTypeDic[editData.deviceType].label }}</span> 设备类型:
<span v-if="editData.deviceType">{{ deviceTypeDic[editData.deviceType].label }}</span>
</div> </div>
<div> <div>
设备: 设备:
<!-- {{ deviceDic }} --> <template v-if="editData.devices">
<span v-for="item,index in editData.devices"> <span v-for="item,index in editData.devices">
{{ deviceDic[item.id].deviceName }} {{ deviceDic[item.id].deviceName }}
</span>{{ editData.devices.length }}个设备 </span>{{ editData.devices.length }}
</template>
</div> </div>
<!-- <div>{{ editData.params }}</div> -->
<template v-if="editData.deviceType=='2'"> <template v-if="editData.deviceType=='2'">
<BoardRecordPreview :tpl="editData.params" style=" width:300px; height: 100%;"> <BoardRecordPreview :tpl="editData.params" style=" width:300px; height: 100%;">
</BoardRecordPreview> </BoardRecordPreview>
@ -81,8 +82,9 @@ export default {
this.initBasicData().then(res=>{ this.initBasicData().then(res=>{
let temp = JSON.parse(this.propData.callParameter)[0]; //callParameter let temp = JSON.parse(this.propData.callParameter || '[{}]')[0]; //callParameter
//BoardRecordPreview //BoardRecordPreview
if(temp.functions){
temp.functions[1].params.CONTENT = temp.functions[1].params.CONTENT.replaceAll(/\\n/g, '\\\\n').replaceAll(/=/g, '\\=').replaceAll(/,/g, '\\,').replaceAll(/&nbsp/g, ' '); temp.functions[1].params.CONTENT = temp.functions[1].params.CONTENT.replaceAll(/\\n/g, '\\\\n').replaceAll(/=/g, '\\=').replaceAll(/,/g, '\\,').replaceAll(/&nbsp/g, ' ');
this.editData = { this.editData = {
id: this.propData.jobId, id: this.propData.jobId,
@ -92,7 +94,9 @@ export default {
params: temp.functions[1].params, params: temp.functions[1].params,
screenSize: temp.screenSize screenSize: temp.screenSize
}; };
console.log(this.editData , "+++======"); }else{
this.editData = {};
}
this.isCompReady = true; this.isCompReady = true;
}) })
}, },
@ -100,7 +104,8 @@ export default {
onModify(){ onModify(){
this.isEditingTask = true; this.isEditingTask = true;
}, },
onSubmit(){ onSubmit(para){
this.emit("onSubmit");
this.isEditingTask = false; this.isEditingTask = false;
// let devices = _.filter(this.deviceOptions, item=>{ // let devices = _.filter(this.deviceOptions, item=>{
// this.editData.devices.includes(item.id); // this.editData.devices.includes(item.id);

18
ruoyi-ui/src/views/JiHeExpressway/pages/control/device/strategy/components/taskEditDialog.vue

@ -206,12 +206,7 @@ export default {
// { "STAY": 90, "ACTION": "1", "SPEED": "0", "COLOR": "ffff00", "FONT": "3", "FONT_SIZE": "24", "CONTENT": "\\\\n", "width": "160", "height": "80", "formatStyle": "2" } // { "STAY": 90, "ACTION": "1", "SPEED": "0", "COLOR": "ffff00", "FONT": "3", "FONT_SIZE": "24", "CONTENT": "\\\\n", "width": "160", "height": "80", "formatStyle": "2" }
this.editData.type2 = BoardUtils.contentToDeviceItem(this.propData.params); this.editData.type2 = BoardUtils.contentToDeviceItem(this.propData.params);
}else{ }else{
let arr = this.propData.screenSize.split("*");
this.editData.type2 = {
displayAreaWidth: +arr[0],
displayAreaHeight: +arr[1]
};
alert(JSON.stringify());
} }
}, },
onEditBoard(){ onEditBoard(){
@ -264,7 +259,7 @@ export default {
this.deviceArr.forEach((item,index)=>{ this.deviceArr.forEach((item,index)=>{
if (this.editData.devices.includes(item.id)){ if (this.editData.devices.includes(item.id)){
let temp = { let temp = {
jobId: item.id, id: item.id,
iotDeviceId: item.iotDeviceId, iotDeviceId: item.iotDeviceId,
deviceType: item.deviceType, deviceType: item.deviceType,
direction: item.direction direction: item.direction
@ -278,11 +273,11 @@ export default {
let params = this.processParams(); let params = this.processParams();
if(this.mode == "add"){ if(this.mode == "add"){
} }
addTaskRequest(this.groupId, devices, params, { deviceType: this.searchData.deviceType, screenSize: this.filterData.screenSize }).then(res=>{ alert(111)
addTaskRequest(this.groupId, this.time, devices, params, { deviceType: this.searchData.deviceType, screenSize: this.filterData.screenSize }).then(res=>{
console.log(res) console.log(res)
}); });
this.$emit("onSubmit") this.$emit("onSubmit")
@ -325,6 +320,11 @@ export default {
}, },
resetEditData(){ resetEditData(){
this.editData.devices = []; this.editData.devices = [];
let arr = this.filterData.screenSize.split("*");
this.editData.type2 = {
displayAreaWidth: +arr[0],
displayAreaHeight: +arr[1]
};
} }
} }
}; };

33
ruoyi-ui/src/views/JiHeExpressway/pages/perception/topology/index.vue

@ -0,0 +1,33 @@
<template>
<div class='topolog'>
<p>网络拓扑</p>
</div>
</template>
<script>
export default {
name: 'InDevelopment',
components: {
},
mounted() {
}
}
</script>
<style lang='scss' scoped>
.topolog {
width: 100%;
height: 100%;
position: relative;
z-index: 6;
color: white;
display: flex;
justify-content: center;
align-items: center;
p {
font-size: 200px;
}
}
</style>

3
ruoyi-ui/src/views/JiHeExpressway/utils/api/batch.js

@ -1,7 +1,7 @@
import request from '@/utils/request' import request from '@/utils/request'
export function addTaskRequest(jobGroup, devices, params, others) { export function addTaskRequest(jobGroup, time, devices, params, others) {
let temp = [{ let temp = [{
...others, ...others,
devices: devices, devices: devices,
@ -28,6 +28,7 @@ export function addTaskRequest(jobGroup, devices, params, others) {
}]; }];
let data = { let data = {
jobGroup, jobGroup,
time,
callParameter: JSON.stringify(temp) callParameter: JSON.stringify(temp)
} }
// console.log(JSON.stringify(data)); // console.log(JSON.stringify(data));

6
ruoyi-ui/vue.config.js

@ -48,13 +48,13 @@ module.exports = {
// target: `http://10.168.56.206:8087`, //孟 // target: `http://10.168.56.206:8087`, //孟
// target: `http://10.168.78.135:8087`, //孟 // target: `http://10.168.78.135:8087`, //孟
// target: `http://10.168.78.135:8087`, // target: `http://10.168.78.135:8087`,
// target: `http://10.0.81.202:8087`, //现场后台 // target: `http://10.0.81.202:8087`, //现场后台s
// 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`, //王思祥
// target: `http://10.168.72.174:8087`, //赵祥龙 target: `http://10.168.72.174:8087`, //赵祥龙
// target: `http://10.168.65.156:8097`, //孟 // target: `http://10.168.65.156:8097`, //孟
// target: `http://10.168.56.165:8087`, //王家宝 // target: `http://10.168.56.165:8087`, //王家宝
// target: `http://10.168.77.128:8087`, //王兴琳 // target: `http://10.168.77.128:8087`, //王兴琳

Loading…
Cancel
Save