Browse Source

完善设备管控

wangqin
hui 7 months ago
parent
commit
93cc07cb20
  1. 7
      ruoyi-ui/src/views/JiHeExpressway/pages/control/device/strategy/components/AddNEditDialog.vue
  2. 31
      ruoyi-ui/src/views/JiHeExpressway/pages/control/device/strategy/components/TaskItem.vue
  3. 17
      ruoyi-ui/src/views/JiHeExpressway/pages/control/device/strategy/components/taskEditDialog.vue
  4. 10
      ruoyi-ui/src/views/JiHeExpressway/pages/control/device/strategy/components/timeEditDialog.vue
  5. 8
      ruoyi-ui/src/views/JiHeExpressway/pages/datav/gisAndBim/index.vue
  6. 11
      ruoyi-ui/src/views/JiHeExpressway/utils/api/batch.js

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

@ -128,6 +128,7 @@ export default {
return this.visible;
},
set(val) {
this.$emit("onSuccess");
this.$emit("update:value", val);
},
},
@ -143,6 +144,7 @@ export default {
// : {
// ...this.propData,
// };
this.taskGroupsEditing = [];
this.initEditingData();
this.getTaskList();
},
@ -163,6 +165,7 @@ export default {
methods: {
onSubmitTaskItem(){
this.isEditing = false;
this.selectedTaskGroup = {};
request({
url: `/business/dcBatchFunctionsJobGroup/${this.propData.id}`,
method: "GET"
@ -207,9 +210,9 @@ export default {
},
onSubmitTime(time){
this.isShowTimeEdit = false;
if (this.selectedTaskGroup){
if (Object.keys(this.selectedTaskGroup).length>0){
this.selectedTaskGroup.time = time;
this.selectedTaskGroup = {};
}else{
this.taskGroupsEditing.push({ time, tasks: [] });
}

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

@ -18,15 +18,18 @@
</BoardRecordPreview>
</template>
<template v-if="editData.deviceType == '5'">
<p class="text">{{ editData.params.text }}</p>
<p class="text">内容{{ editData.params.text }}</p>
</template>
<template v-if="editData.deviceType == '2'">
<template v-if="editData.deviceType == '10'">
<div class="center">
<p>{{ gzmsDic[editData.params.SETMD] }}</p>
<p>时长{{ editData.params.SETTM }}</p>
</div>
</template>
<template v-if="editData.deviceType == '2'">
<template v-if="editData.deviceType == '12'">
</template>
<template v-if="editData.deviceType == '2'">
<template v-if="editData.deviceType == '13'">
</template>
@ -45,7 +48,7 @@
<script>
import request from "@/utils/request";
import { deviceTypeDic } from "@screen/utils/enum.js"
import { deviceTypeDic, gzmsMap } from "@screen/utils/enum.js"
import { getDeviceList } from "@screen/utils/api/device.js"
import taskEditDialog from "./taskEditDialog.vue";
import BoardRecordPreview from '@screen/components/infoBoard/BoardRecordPreview.vue'
@ -66,6 +69,7 @@ export default {
isEditingTask: false,
selectedType:"",
deviceTypeDic:"",
gzmsMap:"",
deviceDic:{},
deviceList:[]
};
@ -78,6 +82,7 @@ export default {
},
mounted() {
this.deviceTypeDic = deviceTypeDic;
this.gzmsDic = gzmsMap;
this.isCompReady = true;
console.log(JSON.parse(this.propData.callParameter || '[{}]')[0], "++++=====######");
this.initBasicData().then(res=>{
@ -86,16 +91,23 @@ export default {
//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, ' ');
let paramsIndex = 0;
let params = {};
if (temp.deviceType == '2'){
paramsIndex = 1;
params = temp.functions[1].params
} else if (temp.deviceType == '5'){
params = temp.functions[0].params
} else if (temp.deviceType == '10') {
params = {
SETMD: temp.functions[0].params.SET,
SETTM: temp.functions[1].params.SET,
}
}
this.editData = {
id: this.propData.jobId,
direction: temp.direction,
deviceType: temp.deviceType,
devices: temp.devices,
params: temp.functions[paramsIndex].params,
params,
screenSize: temp.screenSize
};
}else{
@ -159,6 +171,7 @@ export default {
.content{ width: 300px; display: flex; align-items: stretch;
.board{ flex: 1; }
.text{ flex: 1; display: flex; align-items: center; justify-content: center; word-break: break-all;}
.center{ flex: 1; text-align: center;}
}
.button{ width:140px; margin-left: 10px}
}

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

@ -69,13 +69,13 @@
<template v-else-if="searchData.deviceType == '10'">
<!-- 激光疲劳唤醒 -->
<el-form-item label="工作模式">
<el-select v-model="editData.type10.mode" placeholder="请选择">
<el-select v-model="editData.type10.SETMD" placeholder="请选择">
<el-option v-for="value,key in gzmsMap" :key="key" :label="value" :value="key" />
</el-select>
</el-form-item>
<el-form-item label="工作时长">
<el-col :span="8">
<el-input-number v-model="editData.type10.timeLength" :min="1" :max="600" label="描述文字" />
<el-input-number v-model="editData.type10.SETTM" :min="0" :max="100000" />
</el-col>
<!-- <el-col :span="4" style="margin-left: 10px;">分钟</el-col> -->
</el-form-item>
@ -206,8 +206,8 @@ export default {
// { "STAY": 90, "ACTION": "1", "SPEED": "0", "COLOR": "ffff00", "FONT": "3", "FONT_SIZE": "24", "CONTENT": "\\\\n", "width": "160", "height": "80", "formatStyle": "2" }
if (this.propData.deviceType == "2"){
this.editData.type2 = BoardUtils.contentToDeviceItem(this.propData.params);
} else if (this.propData.deviceType == "5"){
this.editData.type5 = { ...this.propData.params};
} else if (this.propData.deviceType == "5" || this.propData.deviceType == "10"){
this.editData["type" + this.propData.deviceType] = { ...this.propData.params};
}
}else{
this.searchData.deviceType = "";
@ -304,17 +304,16 @@ export default {
}
} else if (this.searchData.deviceType == "10") {
return {
mode: editData.type10.mode,
timeLength: editData.type10.timeLength
SETMD: this.editData.type10.SETMD,
SETTM: this.editData.type10.SETTM
}
} else if (this.searchData.deviceType == "12") {
return {
mode: editData.type12.mode,
timeLength: editData.type12.timeLength
}
} else if (this.searchData.deviceType == "13") {
return {
switch: editData.type13.switch
}
}
},

10
ruoyi-ui/src/views/JiHeExpressway/pages/control/device/strategy/components/timeEditDialog.vue

@ -1,11 +1,11 @@
<template>
<Dialog v-model="modelVisible" title="修改" width="400px" label-width="120px">
<Dialog v-model="modelVisible" title="触发时间设置" width="400px" label-width="120px">
<el-form>
<el-form-item label="时">
<el-input v-model="editData.hour"></el-input>
<el-form-item label="时(支持cron表达式)">
<el-input v-model="editData.hour"></el-input>
</el-form-item>
<el-form-item label="分">
<el-input v-model="editData.minute"></el-input>
<el-form-item label="分(支持cron表达式)">
<el-input v-model="editData.minute"></el-input>
</el-form-item>
<el-form-item>
<el-button size="mini" type="primary" @click="onSubmit">保存</el-button>

8
ruoyi-ui/src/views/JiHeExpressway/pages/datav/gisAndBim/index.vue

@ -37,10 +37,10 @@ export default {
}
},
mounted() {
this.alarmUrl = "http://10.0.86.37:81/?HoveringMouse=true&LightMode=false";
// getConfigKey("dc.alarmUrl").then((res) => {
// this.alarmUrl = res.msg
// });
// this.alarmUrl = "http://10.0.86.37:81/?HoveringMouse=true&LightMode=false";
getConfigKey("dc.gisAndBim").then((res) => {
this.alarmUrl = res.msg
});
}
}
</script>

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

@ -46,6 +46,17 @@ export function submitTaskRequest(id, jobGroup, time, devices, params, others) {
}
]
} else if (deviceType == '10') { //疲劳唤醒
functions = [
{
"functionId": "SETMD",
"params": { SET: params.SETMD }
},
{
"functionId": "SETTM",
"params": { SET: params.SETTM }
}
]
}
let temp = [{

Loading…
Cancel
Save