Browse Source

bug

wangqin
zhangzhang 8 months ago
parent
commit
401d55cddb
  1. 7
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/Camera/index.vue
  2. 7
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/index.vue
  3. 62
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/plan/addAndEditDialog/index.vue
  4. 53
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/plan/formTable/index.vue
  5. 61
      ruoyi-ui/src/views/JiHeExpressway/utils/enum.js

7
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/Camera/index.vue

@ -22,7 +22,10 @@
/>
</template>
</Descriptions>
<div style="width: 50%; display: flex; margin-top: 18px">
<div
v-if="PanoramicCameraTypes.indexOf(dialogData.childType) == -1"
style="width: 50%; display: flex; margin-top: 18px"
>
<span
style="
color: #3de8ff;
@ -72,6 +75,7 @@ import Video from "@screen/components/Video";
import Descriptions from "@screen/components/Descriptions.vue";
import CameraControlDialog from "./components/CameraControlDialog.vue";
import LineChart from "../../LineChart/index.vue";
import { PanoramicCameraTypes } from "@screen/utils/enum.js";
import {
getRoadInfoByStakeMark,
@ -96,6 +100,7 @@ export default {
},
data() {
return {
PanoramicCameraTypes,
activeName: "first",
controlDialogVisible: false,
data: {},

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

@ -161,7 +161,7 @@ export default {
getData() {
if (this.activeName === '-1') {
request({
url: `/perceivedEvents/warning/perceivedEventsList`,
url: `/perceivedEvents/warning/perceivedEventsList`,//
method: "post",
params: { pageNum: this.searchData.pageNum, pageSize: this.searchData.pageSize },
data: { ...this.searchData, warningState: 1 }
@ -255,9 +255,9 @@ export default {
},
firstBtnClick(id) {
console.log("id", id);
if (this.activeName == '-1') {
if (this.activeName == '-1') { //
request({
url: `/perceivedEvents/warning/getWarningById`,
url: `/perceivedEvents/warning/getWarningById`,//
method: "post",
data: { id }
}).then((result) => {
@ -297,6 +297,7 @@ export default {
if (result.code != 200) return Message.error(result?.msg);
let data = result.data;
data.stringDirection = gzDirectionMapping[data.direction] || data.direction;
data.startTime = data?.occurrenceTime || '';
data.videoList = [];
if (data.otherConfig) {

62
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/plan/addAndEditDialog/index.vue

@ -245,15 +245,17 @@ export default {
})
},
async loadData() {
if (this.deviceData.length <= 0) {
let result = await request({
url: `business/device/query?deviceType=2`,
method: "get",
})
if (result.code != 200) return Message.error(result?.msg);
async loadData(deviceType = 1) {
this.deviceData = [];
let result = await request({
url: `business/device/query?deviceType=${deviceType}`,
method: "get",
})
if (result.code != 200) return Message.error(result?.msg);
if (deviceType == 1) {
this.deviceData = result.data.filter(it => it.childType !== '1-1')
} else {
this.deviceData = result.data;
// return result.data;
}
return this.deviceData;
},
@ -312,32 +314,32 @@ export default {
// this.submitting = false;
let secondFormTable = this.$refs['secondFormTable'].tableData || [];
let thirdFormTable = this.$refs['thirdFormTable'].tableData || [];
let flg = false;
for (let item of secondFormTable) {
if (this.areAllValuesEmpty(item)) { flg = true; break };
}
if (flg) return Message.warning('执行操作子项不能为空!');
for (let item of thirdFormTable) {
if (this.areAllValuesEmpty(item)) { flg = true; break };
}
if (flg) return Message.warning('恢复操作子项不能为空!');
console.log('12', secondFormTable);
console.log('34', thirdFormTable);
// let flg = false;
// for (let item of secondFormTable) {
// if (this.areAllValuesEmpty(item)) { flg = true; break };
// }
// if (flg) return Message.warning('');
// for (let item of thirdFormTable) {
// if (this.areAllValuesEmpty(item)) { flg = true; break };
// }
// if (flg) return Message.warning('');
// console.log('12', secondFormTable);
// console.log('34', thirdFormTable);
let dcArr = [];
// let id = '';
// if (this.dialogType == 2) id = this.planId;
// secondFormTable.forEach(it => {
// dcArr.push(this.formatData(it, 1, id));
// })
// thirdFormTable.forEach(it => {
// dcArr.push(this.formatData(it, 2, id));
// })
let id = '';
if (this.dialogType == 2) id = this.planId;
secondFormTable.forEach(it => {
dcArr.push(this.formatData(it, 1, id));
})
thirdFormTable.forEach(it => {
dcArr.push(this.formatData(it, 2, id));
})
console.log({
...this.formData,
dcExecuteAction: dcArr
})
return;
// return;
if (this.dialogType == 1) {//
request({
url: `/business/plans`,
@ -385,7 +387,7 @@ export default {
},
areAllValuesEmpty(obj) {
console.log('ass',obj)
console.log('ass', obj)
return Object.keys(obj).every(function (key) {
const value = obj[key];
return (
@ -413,7 +415,7 @@ export default {
.EventAddPlanDialog {
gap: 9px;
width: 1080px;
width: 1280px;
height: 310px;
display: flex;
flex-direction: column;

53
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/plan/formTable/index.vue

@ -11,7 +11,7 @@
</template>
</ElTableColumn>
<ElTableColumn prop="searchRule" width="260">
<ElTableColumn prop="searchRule" width="230">
<template slot-scope="scope">
<div class="plhx">
<el-select v-model="scope.row.searchRule" placeholder="检索规则条件">
@ -32,7 +32,7 @@
</template>
</ElTableColumn>
<ElTableColumn prop="deviceList" width="370">
<ElTableColumn prop="deviceList" width="400">
<template slot-scope="scope">
<div class="mjs">
<el-select v-if="scope.row.searchRule == 1" v-model="scope.row.deviceList" placeholder="请选择设备"
@ -50,23 +50,23 @@
<el-option v-for="item in gzmsOptions" :key="item.value" :label="item.label"
:value="item.value"></el-option>
</el-select>
<el-input-number v-if="scope.row.deviceType == 10" placeholder="操作时长(分钟)"
<el-input-number v-if="scope.row.deviceType == 10" placeholder="时长(分钟)"
v-model="scope.row.operationDuration" :min="0" :max="999"></el-input-number>
<div v-if="scope.row.deviceType == 12" class="mjs">
<el-select v-model="scope.row.controlModel" placeholder="请选择控制模式">
<el-option label="手动模式" value="00"></el-option>
<el-option label="自动模式" value="01"></el-option>
<el-option label="万年历" value="02"></el-option>
</el-select>
<el-time-picker v-if="scope.row.controlModel == '01'" v-model="scope.row.time" is-range
style="" range-separator="-" placeholder="选择时间" value-format="HH:mm" format="HH:mm">
</el-time-picker>
<el-select v-model="scope.row.state" placeholder="工作状态">
<el-option v-for="item in gzztOptions" :key="item.value" :label="item.label"
:value="item.value"></el-option>
</el-select>
</div>
<el-select v-if="scope.row.deviceType == 12" v-model="scope.row.controlModel"
placeholder="请选择模式">
<el-option label="手动模式" value="00"></el-option>
<el-option label="自动模式" value="01"></el-option>
<el-option label="万年历" value="02"></el-option>
</el-select>
<el-time-picker v-if="scope.row.controlModel == '01' && scope.row.deviceType == 12"
v-model="scope.row.time" is-range style="" range-separator="-" placeholder="选择时间"
value-format="HH:mm" format="HH:mm">
</el-time-picker>
<el-select v-if="scope.row.deviceType == 12" v-model="scope.row.state" placeholder="工作状态">
<el-option v-for="item in gzztOptions" :key="item.value" :label="item.label"
:value="item.value"></el-option>
</el-select>
<el-input v-if="scope.row.deviceType == 5" v-model="scope.row.content"
placeholder="请输入发布内容"></el-input>
@ -220,7 +220,7 @@ export default {
}
},
async created() {
let loadData = await this.loadData();
let loadData = await this.loadData(1);
// console.log('aa',loadData)
this.sbOptions = loadData;
},
@ -238,17 +238,10 @@ export default {
// })
},
changeDeviceType(value) {
async changeDeviceType(value) {
this.deviceType = value;
// if(value == 1){
// this.searchRule = 1
// }else if(value == 2){
// this.searchRule = 1
// }else if(value == 3){
// this.searchRule = 1
// }else if(value == 4){
// this.searchRule = 1
// }
console.log('value', value)
this.sbOptions = await this.loadData(value);
},
onAdd(id) {
this.tableData.push({
@ -303,6 +296,10 @@ export default {
}
}
.ms {
width: 160px;
}
.plhx {
display: flex;
}

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

@ -847,15 +847,15 @@ export const gzmsMap = {
export const planDeviceMap = {
1: "摄像机",
2: "可变信息标志",
3: "气象监测器",
4: "出口诱导灯",
// 3: "气象监测器",
// 4: "出口诱导灯",
5: "路段语音广播",
6: "护栏碰撞",
7: "毫米波雷达",
// 6: "护栏碰撞",
// 7: "毫米波雷达",
8: "合流区预警",
9: "智慧锥桶",
// 9: "智慧锥桶",
10: "激光疲劳唤醒",
11: "类交通量调查站",
// 11: "一类交通量调查站",
12: "行车诱导",
13: "智能设备箱",
14: "光线在线监测",
@ -870,42 +870,42 @@ export const planDeviceOptions = [
value: 2,
label: "可变信息标志",
},
{
value: 3,
label: "气象监测器",
},
{
value: 4,
label: "出口诱导灯",
},
// {
// value: 3,
// label: "气象监测器",
// },
// {
// value: 4,
// label: "出口诱导灯",
// },
{
value: 5,
label: "路段语音广播",
},
{
value: 6,
label: "护栏碰撞",
},
{
value: 7,
label: "毫米波雷达",
},
// {
// value: 6,
// label: "护栏碰撞",
// },
// {
// value: 7,
// label: "毫米波雷达",
// },
{
value: 8,
label: "合流区预警",
},
{
value: 9,
label: "智慧锥桶",
},
// {
// value: 9,
// label: "智慧锥桶",
// },
{
value: 10,
label: "激光疲劳唤醒",
},
{
value: 11,
label: "类交通量调查站",
},
// {
// value: 11,
// label: "一类交通量调查站",
// },
{
value: 12,
label: "行车诱导",
@ -984,6 +984,7 @@ const BoardChildTypes = {
"2-3": "雨棚可变信息标志",
"2-4": "站前悬臂式可变信息标志",
};
export const PanoramicCameraTypes = Object.keys(CameraChildTypes).slice(3, 5);
export const ChildTypes = {
1: CameraChildTypes,

Loading…
Cancel
Save