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> </template>
</Descriptions> </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 <span
style=" style="
color: #3de8ff; color: #3de8ff;
@ -72,6 +75,7 @@ import Video from "@screen/components/Video";
import Descriptions from "@screen/components/Descriptions.vue"; import Descriptions from "@screen/components/Descriptions.vue";
import CameraControlDialog from "./components/CameraControlDialog.vue"; import CameraControlDialog from "./components/CameraControlDialog.vue";
import LineChart from "../../LineChart/index.vue"; import LineChart from "../../LineChart/index.vue";
import { PanoramicCameraTypes } from "@screen/utils/enum.js";
import { import {
getRoadInfoByStakeMark, getRoadInfoByStakeMark,
@ -96,6 +100,7 @@ export default {
}, },
data() { data() {
return { return {
PanoramicCameraTypes,
activeName: "first", activeName: "first",
controlDialogVisible: false, controlDialogVisible: false,
data: {}, data: {},

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

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

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

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

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

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

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

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

Loading…
Cancel
Save