Browse Source

Merge branch 'develop' of http://39.106.31.193:9211/mengff/jihe-hs into develop

wangqin
zhangzhang 7 months ago
parent
commit
3f8a7fb8ab
  1. 48
      ruoyi-ui/src/views/JiHeExpressway/pages/control/device/strategy/components/AddNEditDialog.vue
  2. 80
      ruoyi-ui/src/views/JiHeExpressway/pages/control/device/strategy/components/TaskItem.vue
  3. 42
      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. 3
      ruoyi-ui/src/views/JiHeExpressway/pages/control/device/strategy/index.vue
  6. 8
      ruoyi-ui/src/views/JiHeExpressway/pages/datav/gisAndBim/index.vue
  7. 33
      ruoyi-ui/src/views/JiHeExpressway/utils/api/batch.js

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

@ -128,6 +128,7 @@ export default {
return this.visible; return this.visible;
}, },
set(val) { set(val) {
this.$emit("onSuccess");
this.$emit("update:value", val); this.$emit("update:value", val);
}, },
}, },
@ -143,6 +144,7 @@ export default {
// : { // : {
// ...this.propData, // ...this.propData,
// }; // };
this.taskGroupsEditing = [];
this.initEditingData(); this.initEditingData();
this.getTaskList(); this.getTaskList();
}, },
@ -163,6 +165,7 @@ export default {
methods: { methods: {
onSubmitTaskItem(){ onSubmitTaskItem(){
this.isEditing = false; this.isEditing = false;
this.selectedTaskGroup = {};
request({ request({
url: `/business/dcBatchFunctionsJobGroup/${this.propData.id}`, url: `/business/dcBatchFunctionsJobGroup/${this.propData.id}`,
method: "GET" method: "GET"
@ -186,30 +189,41 @@ export default {
this.isShowTimeEdit = true; this.isShowTimeEdit = true;
}, },
onDeleteTaskGroup(taskG){ onDeleteTaskGroup(taskG){
request({ this.$confirm("确定要删除该任务组么?", "操作确认", {
url: `/business/dcBatchFunctionsJob/time/${this.propData.id}/${taskG.time}`, confirmButtonText: "确定",
method: "DELETE" cancelButtonText: "取消",
}).then(res => { type: "warning",
}).then(() => {
request({ request({
url: `/business/dcBatchFunctionsJobGroup/${this.propData.id}`, url: `/business/dcBatchFunctionsJob/time/${this.propData.id}/${taskG.time}`,
method: "GET" method: "DELETE"
}).then(res => { }).then(res => {
this.editData = { request({
id: res.data.id, url: `/business/dcBatchFunctionsJobGroup/${this.propData.id}`,
groupName: res.data.groupName, method: "GET"
status: res.data.status, }).then(res => {
remark: res.data.remark, this.editData = {
detailedConfiguration: res.data.detailedConfiguration id: res.data.id,
} groupName: res.data.groupName,
this.getTaskList(); //task status: res.data.status,
remark: res.data.remark,
detailedConfiguration: res.data.detailedConfiguration
}
this.getTaskList(); //task
});
});
})
.catch(() => {
this.$message.warn("取消删除。");
}); });
});
}, },
onSubmitTime(time){ onSubmitTime(time){
this.isShowTimeEdit = false; this.isShowTimeEdit = false;
if (Object.keys(this.selectedTaskGroup).length>0){
if (this.selectedTaskGroup){
this.selectedTaskGroup.time = time; this.selectedTaskGroup.time = time;
this.selectedTaskGroup = {};
}else{ }else{
this.taskGroupsEditing.push({ time, tasks: [] }); this.taskGroupsEditing.push({ time, tasks: [] });
} }

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

@ -18,16 +18,26 @@
</BoardRecordPreview> </BoardRecordPreview>
</template> </template>
<template v-if="editData.deviceType == '5'"> <template v-if="editData.deviceType == '5'">
<p class="text">{{ editData.params.text }}</p> <p class="text">内容{{ editData.params.text }}</p>
</template> </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>
<template v-if="editData.deviceType == '2'">
<template v-if="editData.deviceType == '12'">
<div class="center">
<p>{{ gzmsDic[editData.params.SETMD] }}</p>
<p>时长{{ editData.params.SETTM }}</p>
</div>
</template> </template>
<template v-if="editData.deviceType == '2'"> <template v-if="editData.deviceType == '13'">
<div class="center">
<p>{{ gzmsDic[editData.params.SETMD] }}</p>
<p>时长{{ editData.params.SETTM }}</p>
</div>
</template> </template>
</div> </div>
@ -45,7 +55,7 @@
<script> <script>
import request from "@/utils/request"; 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 { getDeviceList } from "@screen/utils/api/device.js"
import taskEditDialog from "./taskEditDialog.vue"; import taskEditDialog from "./taskEditDialog.vue";
import BoardRecordPreview from '@screen/components/infoBoard/BoardRecordPreview.vue' import BoardRecordPreview from '@screen/components/infoBoard/BoardRecordPreview.vue'
@ -66,6 +76,7 @@ export default {
isEditingTask: false, isEditingTask: false,
selectedType:"", selectedType:"",
deviceTypeDic:"", deviceTypeDic:"",
gzmsMap:"",
deviceDic:{}, deviceDic:{},
deviceList:[] deviceList:[]
}; };
@ -78,6 +89,7 @@ export default {
}, },
mounted() { mounted() {
this.deviceTypeDic = deviceTypeDic; this.deviceTypeDic = deviceTypeDic;
this.gzmsDic = gzmsMap;
this.isCompReady = true; this.isCompReady = true;
console.log(JSON.parse(this.propData.callParameter || '[{}]')[0], "++++=====######"); console.log(JSON.parse(this.propData.callParameter || '[{}]')[0], "++++=====######");
this.initBasicData().then(res=>{ this.initBasicData().then(res=>{
@ -86,16 +98,33 @@ export default {
//BoardRecordPreview //BoardRecordPreview
if(temp.functions){ 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, ' ');
let paramsIndex = 0; let params = {};
if (temp.deviceType == '2'){ 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,
}
} else if (temp.deviceType == '12') {
params = {
SETMD: temp.functions[0].params.SET,
SETTM: temp.functions[1].params.SET,
}
} else if (temp.deviceType == '13') {
params = {
SETMD: temp.functions[0].params.SET,
SETTM: temp.functions[1].params.SET,
}
} }
this.editData = { this.editData = {
id: this.propData.jobId, id: this.propData.jobId,
direction: temp.direction, direction: temp.direction,
deviceType: temp.deviceType, deviceType: temp.deviceType,
devices: temp.devices, devices: temp.devices,
params: temp.functions[paramsIndex].params, params,
screenSize: temp.screenSize screenSize: temp.screenSize
}; };
}else{ }else{
@ -118,18 +147,26 @@ export default {
// this.$emit("onModify", {devices}); // this.$emit("onModify", {devices});
}, },
onDelete(){ onDelete(){
request({ this.$confirm("确定要删除该任务么?", "操作确认", {
url: `/business/dcBatchFunctionsJob/` + this.propData.jobId, confirmButtonText: "确定",
method: "DELETE", cancelButtonText: "取消",
// params: { type: "warning",
// jobGroup: this.propData.id }).then(() => {
// },
}) request({
.then((result) => { url: `/business/dcBatchFunctionsJob/` + this.propData.jobId,
if (result.code != 200) return; method: "DELETE",
this.$message.success("删除成功"); // params: {
this.$emit("onSubmit"); // jobGroup: this.propData.id
// },
}) })
.then((result) => {
if (result.code != 200) return;
this.$message.success("删除成功");
this.$emit("onSubmit");
})
});
}, },
initBasicData(){ initBasicData(){
@ -159,6 +196,7 @@ export default {
.content{ width: 300px; display: flex; align-items: stretch; .content{ width: 300px; display: flex; align-items: stretch;
.board{ flex: 1; } .board{ flex: 1; }
.text{ flex: 1; display: flex; align-items: center; justify-content: center; word-break: break-all;} .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} .button{ width:140px; margin-left: 10px}
} }

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

@ -69,13 +69,13 @@
<template v-else-if="searchData.deviceType == '10'"> <template v-else-if="searchData.deviceType == '10'">
<!-- 激光疲劳唤醒 --> <!-- 激光疲劳唤醒 -->
<el-form-item label="工作模式"> <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-option v-for="value,key in gzmsMap" :key="key" :label="value" :value="key" />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="工作时长"> <el-form-item label="工作时长">
<el-col :span="8"> <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>
<!-- <el-col :span="4" style="margin-left: 10px;">分钟</el-col> --> <!-- <el-col :span="4" style="margin-left: 10px;">分钟</el-col> -->
</el-form-item> </el-form-item>
@ -83,14 +83,14 @@
<template v-else-if="searchData.deviceType == '12'"> <template v-else-if="searchData.deviceType == '12'">
<!-- 行车诱导 --> <!-- 行车诱导 -->
<el-form-item label="工作状态"> <el-form-item label="工作模式">
<el-select v-model="editData.type12.mode" placeholder="请选择"> <el-select v-model="editData.type12.SETMD" placeholder="请选择">
<el-option v-for="value, key in gzztMap" :key="key" :label="value" :value="key" /> <el-option v-for="value, key in gzmsMap" :key="key" :label="value" :value="key" />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="工作时长"> <el-form-item label="工作时长">
<el-col :span="8"> <el-col :span="8">
<el-input-number v-model="editData.type12.timeLength" :min="1" :max="600" label="描述文字" /> <el-input-number v-model="editData.type12.SETTM" :min="0" :max="100000" />
</el-col> </el-col>
<!-- <el-col :span="4" style="margin-left: 10px;">分钟</el-col> --> <!-- <el-col :span="4" style="margin-left: 10px;">分钟</el-col> -->
</el-form-item> </el-form-item>
@ -98,13 +98,20 @@
<template v-else-if="searchData.deviceType == '13'"> <template v-else-if="searchData.deviceType == '13'">
<!-- 智能设备箱 --> <!-- 智能设备箱 -->
<el-form-item label="开启"> <el-form-item label="工作模式">
<el-switch v-model="editData.type13.switch"> <el-select v-model="editData.type13.SETMD" placeholder="请选择">
<!-- active-color="#13ce66" inactive-color="#ff4949" --> <el-option v-for="value, key in gzmsMap" :key="key" :label="value" :value="key" />
</el-switch> </el-select>
</el-form-item>
<el-form-item label="工作时长">
<el-col :span="8">
<el-input-number v-model="editData.type13.SETTM" :min="0" :max="100000" />
</el-col>
<!-- <el-col :span="4" style="margin-left: 10px;">分钟</el-col> -->
</el-form-item> </el-form-item>
</template> </template>
<el-form-item> <el-form-item>
<el-button size="mini" type="primary" @click="onSubmit">保存</el-button> <el-button size="mini" type="primary" @click="onSubmit">保存</el-button>
</el-form-item> </el-form-item>
@ -206,8 +213,8 @@ 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" }
if (this.propData.deviceType == "2"){ if (this.propData.deviceType == "2"){
this.editData.type2 = BoardUtils.contentToDeviceItem(this.propData.params); this.editData.type2 = BoardUtils.contentToDeviceItem(this.propData.params);
} else if (this.propData.deviceType == "5"){ } else if (["5","10","12","13"].includes(this.propData.deviceType)){
this.editData.type5 = { ...this.propData.params}; this.editData["type" + this.propData.deviceType] = { ...this.propData.params};
} }
}else{ }else{
this.searchData.deviceType = ""; this.searchData.deviceType = "";
@ -304,17 +311,18 @@ export default {
} }
} else if (this.searchData.deviceType == "10") { } else if (this.searchData.deviceType == "10") {
return { return {
mode: editData.type10.mode, SETMD: this.editData.type10.SETMD,
timeLength: editData.type10.timeLength SETTM: this.editData.type10.SETTM
} }
} else if (this.searchData.deviceType == "12") { } else if (this.searchData.deviceType == "12") {
return { return {
mode: editData.type12.mode, SETMD: this.editData.type12.SETMD,
timeLength: editData.type12.timeLength SETTM: this.editData.type12.SETTM
} }
} else if (this.searchData.deviceType == "13") { } else if (this.searchData.deviceType == "13") {
return { return {
switch: editData.type13.switch SETMD: this.editData.type13.SETMD,
SETTM: this.editData.type13.SETTM
} }
} }
}, },

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

@ -1,11 +1,11 @@
<template> <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>
<el-form-item label="时"> <el-form-item label="时(支持cron表达式)">
<el-input v-model="editData.hour"></el-input> <el-input v-model="editData.hour"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="分"> <el-form-item label="分(支持cron表达式)">
<el-input v-model="editData.minute"></el-input> <el-input v-model="editData.minute"></el-input>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button size="mini" type="primary" @click="onSubmit">保存</el-button> <el-button size="mini" type="primary" @click="onSubmit">保存</el-button>

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

@ -96,6 +96,7 @@ export default {
}, },
data() { data() {
return { return {
searchData:{},
activeOption: { activeOption: {
active: { active: {
text: "开" text: "开"
@ -194,7 +195,7 @@ export default {
this.getData(); this.getData();
}, },
onReset(){ onReset(){
this.searchData.word = undefined; this.searchData && (this.searchData.word = undefined);
// console.log(this.$refs["form"] , "__-========="); // console.log(this.$refs["form"] , "__-=========");
this.$refs["form"].handleResetForm(); this.$refs["form"].handleResetForm();
this.getData(); this.getData();

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

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

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

@ -46,6 +46,39 @@ 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 }
}
]
} else if (deviceType == '12') { //行车诱导
functions = [
{
"functionId": "SETMD",
"params": { SET: params.SETMD }
},
{
"functionId": "SETTM",
"params": { SET: params.SETTM }
}
]
} else if (deviceType == '13') { //智能设备箱
functions = [
{
"functionId": "SETMD",
"params": { SET: params.SETMD }
},
{
"functionId": "SETTM",
"params": { SET: params.SETTM }
}
]
} }
let temp = [{ let temp = [{

Loading…
Cancel
Save