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. 41
      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",
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>
<!--
<p v-for="item, index1 in taskGroup.tasksEdit">
{{ item.jobId }}</p> -->
<TaskItem v-for="item, index1 in taskGroup.tasksEdit" :propData="item" :groupId="propData.id"
:time="taskGroup.time" @onModify="newV=>onModifyItem(newV, item)">
</TaskItem>

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

@ -3,16 +3,17 @@
<el-form>
<div class="flex" style="justify-content: space-between;">
<div>
设备类型:<span>{{ deviceTypeDic[editData.deviceType].label }}</span>
设备类型:
<span v-if="editData.deviceType">{{ deviceTypeDic[editData.deviceType].label }}</span>
</div>
<div>
设备:
<!-- {{ deviceDic }} -->
<span v-for="item,index in editData.devices">
{{ deviceDic[item.id].deviceName }}
</span>{{ editData.devices.length }}个设备
<template v-if="editData.devices">
<span v-for="item,index in editData.devices">
{{ deviceDic[item.id].deviceName }}
</span>{{ editData.devices.length }}
</template>
</div>
<!-- <div>{{ editData.params }}</div> -->
<template v-if="editData.deviceType=='2'">
<BoardRecordPreview :tpl="editData.params" style=" width:300px; height: 100%;">
</BoardRecordPreview>
@ -81,18 +82,21 @@ export default {
this.initBasicData().then(res=>{
let temp = JSON.parse(this.propData.callParameter)[0]; //callParameter
let temp = JSON.parse(this.propData.callParameter || '[{}]')[0]; //callParameter
//BoardRecordPreview
temp.functions[1].params.CONTENT = temp.functions[1].params.CONTENT.replaceAll(/\\n/g, '\\\\n').replaceAll(/=/g, '\\=').replaceAll(/,/g, '\\,').replaceAll(/&nbsp/g, ' ');
this.editData = {
id: this.propData.jobId,
direction: temp.direction,
deviceType: temp.deviceType,
devices: temp.devices,
params: temp.functions[1].params,
screenSize: temp.screenSize
};
console.log(this.editData , "+++======");
if(temp.functions){
temp.functions[1].params.CONTENT = temp.functions[1].params.CONTENT.replaceAll(/\\n/g, '\\\\n').replaceAll(/=/g, '\\=').replaceAll(/,/g, '\\,').replaceAll(/&nbsp/g, ' ');
this.editData = {
id: this.propData.jobId,
direction: temp.direction,
deviceType: temp.deviceType,
devices: temp.devices,
params: temp.functions[1].params,
screenSize: temp.screenSize
};
}else{
this.editData = {};
}
this.isCompReady = true;
})
},
@ -100,7 +104,8 @@ export default {
onModify(){
this.isEditingTask = true;
},
onSubmit(){
onSubmit(para){
this.emit("onSubmit");
this.isEditingTask = false;
// let devices = _.filter(this.deviceOptions, item=>{
// 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" }
this.editData.type2 = BoardUtils.contentToDeviceItem(this.propData.params);
}else{
let arr = this.propData.screenSize.split("*");
this.editData.type2 = {
displayAreaWidth: +arr[0],
displayAreaHeight: +arr[1]
};
alert(JSON.stringify());
}
},
onEditBoard(){
@ -264,7 +259,7 @@ export default {
this.deviceArr.forEach((item,index)=>{
if (this.editData.devices.includes(item.id)){
let temp = {
jobId: item.id,
id: item.id,
iotDeviceId: item.iotDeviceId,
deviceType: item.deviceType,
direction: item.direction
@ -278,11 +273,11 @@ export default {
let params = this.processParams();
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)
});
this.$emit("onSubmit")
@ -325,6 +320,11 @@ export default {
},
resetEditData(){
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'
export function addTaskRequest(jobGroup, devices, params, others) {
export function addTaskRequest(jobGroup, time, devices, params, others) {
let temp = [{
...others,
devices: devices,
@ -28,6 +28,7 @@ export function addTaskRequest(jobGroup, devices, params, others) {
}];
let data = {
jobGroup,
time,
callParameter: JSON.stringify(temp)
}
// 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.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.168.69.255: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.72.174:8087`, //赵祥龙
target: `http://10.168.72.174:8087`, //赵祥龙
// target: `http://10.168.65.156:8097`, //孟
// target: `http://10.168.56.165:8087`, //王家宝
// target: `http://10.168.77.128:8087`, //王兴琳

Loading…
Cancel
Save