Browse Source

修改

wangqin
hui 7 months ago
parent
commit
b7f28a6db0
  1. 6
      ruoyi-ui/src/views/JiHeExpressway/components/infoBoard/BoardInfoEditor.vue
  2. 13
      ruoyi-ui/src/views/JiHeExpressway/mixins/InfoBoard.js
  3. 102
      ruoyi-ui/src/views/JiHeExpressway/pages/control/device/strategy/components/AddNEditDialog.vue
  4. 63
      ruoyi-ui/src/views/JiHeExpressway/pages/control/device/strategy/components/TaskItem.vue
  5. 31
      ruoyi-ui/src/views/JiHeExpressway/pages/control/device/strategy/components/taskEditDialog.vue
  6. 26
      ruoyi-ui/src/views/JiHeExpressway/pages/control/device/strategy/components/timeEditDialog.vue
  7. 22
      ruoyi-ui/src/views/JiHeExpressway/pages/control/device/strategy/index.vue
  8. 55
      ruoyi-ui/src/views/JiHeExpressway/pages/datav/gisAndBim/index.vue
  9. 7
      ruoyi-ui/src/views/JiHeExpressway/utils/api/batch.js
  10. 4
      ruoyi-ui/vue.config.js

6
ruoyi-ui/src/views/JiHeExpressway/components/infoBoard/BoardInfoEditor.vue

@ -182,13 +182,10 @@ import {
getFontSizeByDevicePixel,
uploadBoardEditInfo,
} from "@/api/board/template";
import { devicessize } from "@/api/information/api.js";
import { checkIotBoardContent } from "@/api/board/vocabulary";
import BoardPreview from "@screen/components/infoBoard/BoardPreview.vue";
import BoardTplPreview from "@screen/components/infoBoard/BoardTplPreview.vue";
import infoBoardUtils from "@screen/utils/infoBoard.js";
import { checkBoardContent } from "@/api/board/board";
import { debounce } from "lodash";
export default {
data() {
return {
@ -303,8 +300,8 @@ export default {
textContent: "",
fontStyle: "0",
displayAreaWidth: "768",
playbackDuration: "50",
displayAreaHeight: "64",
playbackDuration: "50",
volume: "0",
xCoordinate: "0",
screenEntrySpeed: "1",
@ -483,7 +480,6 @@ export default {
this.mode
);
} else {
console.log(this.tpl , "tttttttttppplllll")
this.dataForm = infoBoardUtils.dialogSourceFormat(
this.tpl,
this.type,

13
ruoyi-ui/src/views/JiHeExpressway/mixins/InfoBoard.js

@ -45,13 +45,16 @@ export default {
};
},
// 发布信息
____publishInfo() {
____publishInfo() {
let deviceList = [];
if (this.isMultiControl && !this.selectItems.length) {
return Message.error("请至少选择一个设备!");
if (this.isMultiControl){
if (!this.selectItems.length) {
return Message.error("请至少选择一个设备!");
}
const selectItems = this.selectItems.map((item) => JSON.parse(item));
deviceList = selectItems;
}
const selectItems = this.selectItems.map((item) => JSON.parse(item));
if (this.isMultiControl) deviceList = selectItems;
else {
if (this.selectedDevice) deviceList = [this.selectedDevice];
else deviceList = this.selectedDevices;

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

@ -1,6 +1,5 @@
<template>
<Dialog v-model="modelVisible" :title="propData ? '修改' : '新增'" width="1400px">
{{ editData }}
<div class="AddNEditDialog">
<!-- <Form :value="propData" class="form" ref="basicInfoForm" :formList="formList" column="1" labelWidth="80px" /> -->
<el-form ref="basicInfoForm" :model="editData" label-width="80px" :rules="groupBasicRules">
@ -25,22 +24,27 @@
<div class="fl-around task_op">
<el-button size="mini" type="primary" @click="onAddTaskGroup">新增任务组</el-button>
</div>
<div class="task" v-for="taskGroup,index in taskGroupsEditing">
<div class="fl-around task_info">
<el-input v-model="taskGroup.time" style="width: 180px;"></el-input>
<div class="fl-around task_op">
<el-button size="mini" type="primary" @click="onAddTaskItem(taskGroup)">新增子任务</el-button>
<el-button size="mini" type="primary">删除</el-button>
<div class="all_groups">
<div class="task_group" v-for="taskGroup,index in taskGroupsEditing">
<div class="fl-around task_info">
<div class="time_show">
<el-input placeholder="请输入内容" v-model="taskGroup.time" style="width: 180px;" disabled>
</el-input>
<i class="icon el-icon-edit-outline" @click='onModifyTime(taskGroup)'></i>
</div>
<div class="fl-around task_op">
<el-button size="mini" type="primary" @click="onAddTaskItem(taskGroup)">新增子任务</el-button>
<el-button size="mini" type="danger" @click="onDeleteTaskGroup(taskGroup)">删除任务组</el-button>
</div>
</div>
<div>
<TaskItem v-for="item, index1 in taskGroup.tasksEdit" :propData="item" :groupId="propData.id"
:time="taskGroup.time" @onSubmit="onSubmitTaskItem">
</TaskItem>
</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>
</div>
</div>
</template>
</div>
@ -52,7 +56,7 @@
<taskEditDialog v-model="isEditing" :groupId="propData.id" :time="selectedTaskGroup.time" :propData="{}"
@onSubmit="onSubmitTaskItem" />
<timeEditDialog v-model="isShowTimeEdit" @onSubmit="onSubmitTime" />
<timeEditDialog v-model="isShowTimeEdit" :propData="editingTime" @onSubmit="onSubmitTime" />
</Dialog>
</template>
@ -99,6 +103,7 @@ export default {
// }
};
return {
editingTime:"",
editData:{},
mode:"",
isEditing:false,
@ -156,18 +161,61 @@ export default {
},
methods: {
onSubmitTaskItem(){
this.getTaskList(); //task
this.isEditing = false;
request({
url: `/business/dcBatchFunctionsJobGroup/${this.propData.id}`,
method: "GET"
}).then(res=>{
this.editData = {
id: res.data.id,
groupName: res.data.groupName,
status: res.data.status,
remark: res.data.remark,
detailedConfiguration: res.data.detailedConfiguration
}
this.getTaskList(); //task
});
},
onAddTaskGroup(){
this.isShowTimeEdit = true;
},
onModifyTime(taskG){
this.editingTime = taskG.time;
this.selectedTaskGroup = taskG;
this.isShowTimeEdit = true;
},
onDeleteTaskGroup(taskG){
request({
url: `/business/dcBatchFunctionsJob/time/${this.propData.id}/${taskG.time}`,
method: "DELETE"
}).then(res => {
request({
url: `/business/dcBatchFunctionsJobGroup/${this.propData.id}`,
method: "GET"
}).then(res => {
this.editData = {
id: res.data.id,
groupName: res.data.groupName,
status: res.data.status,
remark: res.data.remark,
detailedConfiguration: res.data.detailedConfiguration
}
this.getTaskList(); //task
});
});
},
onSubmitTime(time){
this.isShowTimeEdit = false;
this.taskGroupsEditing.push({ time, tasks: [] });
if (this.selectedTaskGroup){
this.selectedTaskGroup.time = time;
}else{
this.taskGroupsEditing.push({ time, tasks: [] });
}
let detailedConfiguration =[];
this.taskGroupsEditing.forEach(item=>{
detailedConfiguration.push({time:item.time, tasks:_.map(item.tasksEdit, "id")});
detailedConfiguration.push({time:item.time, tasks:_.map(item.tasksEdit, "jobId")});
});
request({
url: `/business/dcBatchFunctionsJobGroup`,
@ -179,6 +227,7 @@ export default {
})
.then((result) => {
if (result.code != 200) return;
Message.success(`提交成功!`);
})
},
@ -186,10 +235,6 @@ export default {
this.selectedTaskGroup = taskG;
this.isEditing = true;
},
onModifyItem(newV , oldV){
console.log(newV, oldV , "修改条目》》》")
// oldV.devices
},
initEditingData(){
if(this.propData?.id){
this.mode = "edit"
@ -212,7 +257,7 @@ export default {
},
getTaskList(){
this.taskGroupsEditing = JSON.parse(this.propData.detailedConfiguration);
this.taskGroupsEditing = JSON.parse(this.editData.detailedConfiguration);
// this.taskGroupsEditing = [{time:"08:00:00",tasks:[1],tasksEdit:[]}];
//
@ -312,9 +357,16 @@ export default {
font-size: 12px;
}
}
.task{
.all_groups{
max-height:500px;
overflow-y: scroll;
}
.task_group{
border: 1px solid #FFF;
.task_info{
.time_show{
color: #0AC;
}
}
.task_op{
}

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

@ -1,21 +1,21 @@
<template>
<div class="task_editor_box" v-if="isCompReady">
<el-form>
<div class="flex" style="justify-content: space-between;">
<div>
设备类型:
<span v-if="editData.deviceType">{{ deviceTypeDic[editData.deviceType].label }}</span>
</div>
<div>
设备:
<template v-if="editData.devices">
<span v-for="item,index in editData.devices">
{{ deviceDic[item.id].deviceName }}
</span>{{ editData.devices.length }}
</template>
</div>
<div class="flex main_ctt">
<div class="device_type">
设备类型:
<span v-if="editData.deviceType">{{ deviceTypeDic[editData.deviceType].label }}</span>
</div>
<div class="devices">
<template v-if="editData.devices">
<span v-for="item,index in editData.devices" v-if="index<5" class="title">
{{ deviceDic[item.id].deviceName }}
</span>
<span v-if="editData.devices.length >= 6" class="other">{{ editData.devices.length }}个设备</span>
</template>
</div>
<div class="content">
<template v-if="editData.deviceType=='2'">
<BoardRecordPreview :tpl="editData.params" style=" width:300px; height: 100%;">
<BoardRecordPreview :tpl="editData.params" class="board">
</BoardRecordPreview>
</template>
<template v-if="editData.deviceType == '5'">
@ -31,12 +31,12 @@
</template>
<el-form-item>
<el-button size="mini" type="primary" @click="onModify">修改</el-button>
<el-button size="mini" type="danger" @click="onDelete">删除</el-button>
</el-form-item>
</div>
</el-form>
<div class="button">
<el-button size="mini" type="primary" @click="onModify">修改</el-button>
<el-button size="mini" type="danger" @click="onDelete">删除</el-button>
</div>
</div>
<taskEditDialog v-model="isEditingTask" :groupId="groupId" :time="time" :deviceDic="deviceDic"
:deviceList="deviceList" :propData="editData" @onSubmit="onSubmit" />
@ -79,13 +79,14 @@ export default {
},
mounted() {
this.deviceTypeDic = deviceTypeDic;
this.isCompReady = true;
console.log(JSON.parse(this.propData.callParameter || '[{}]')[0], "++++=====######");
this.initBasicData().then(res=>{
let temp = JSON.parse(this.propData.callParameter || '[{}]')[0]; //callParameter
//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, ' ');
// 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,
@ -105,7 +106,7 @@ export default {
this.isEditingTask = true;
},
onSubmit(para){
this.emit("onSubmit");
this.$emit("onSubmit");
this.isEditingTask = false;
// let devices = _.filter(this.deviceOptions, item=>{
// this.editData.devices.includes(item.id);
@ -123,7 +124,8 @@ export default {
})
.then((result) => {
if (result.code != 200) return;
Message.success("删除成功");
this.$message.success("删除成功");
this.$emit("onSubmit");
})
},
initBasicData(){
@ -144,6 +146,17 @@ export default {
<style lang="scss" scoped>
.task_editor_box{
.main_ctt{ align-items: stretch; border-top:1px dashed #0AC; padding: 6px 0; max-height: 80px;
.device_type{ width: 200px; display: flex; flex-direction: row; align-items: center; }
.devices{ flex: 1; display: flex; flex-wrap: wrap; align-items: flex-start;
span{ font-size:14px; margin:0 4px 3px 0; border-radius: 3px; white-space: nowrap; word-break: break-all; float: left;}
.title{border: 1px solid #0AC; padding: 2px 8px;}
.other{padding: 3px 8px;}
}
.content{ width: 300px; display: flex; align-items: stretch;
.board{ flex: 1; }
}
.button{ width:140px; margin-left: 10px}
}
}
</style>

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

@ -121,7 +121,7 @@ import { getDeviceList } from "@screen/utils/api/device.js"
import BoardPreview from "@screen/components/infoBoard/BoardPreview.vue";
import BoardInfoEditor from "@screen/components/infoBoard/BoardInfoEditor";
import BoardUtils from "@screen/utils/infoBoard.js"
import { addTaskRequest } from "@screen/utils/api/batch.js"
import { submitTaskRequest } from "@screen/utils/api/batch.js"
export default {
name: "taskEditDialog",
components: {
@ -206,15 +206,27 @@ 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{
this.searchData.deviceType = "";
this.searchData.direction = "";
this.filterData.screenSize = "";
this.editData.devices = [];
this.editData.type2 = {};
}
},
onEditBoard(){
let arr = this.filterData.screenSize.split("*");
console.log(arr, "传入的尺寸")
this.editDialog = {
visible: true,
mode: this.mode,
type: "device",
tpl:this.editData.type2
tpl: {
...this.editData.type2,
origin:{
displayAreaWidth: arr[0],
displayAreaHeight: arr[1]
}
}
// {
// "residenceTime": "90",
// "intonation": "0",
@ -250,6 +262,7 @@ export default {
};
},
____onEditSubmit(data){
this.editDialog.visible = false;
this.editData.type2 = data.data;
},
@ -276,11 +289,9 @@ export default {
if(this.mode == "add"){
}
alert(111)
addTaskRequest(this.groupId, this.time, devices, params, { deviceType: this.searchData.deviceType, screenSize: this.filterData.screenSize }).then(res=>{
console.log(res)
submitTaskRequest(this.propData.id, this.groupId, this.time, devices, params, { deviceType: this.searchData.deviceType, screenSize: this.filterData.screenSize }).then(res=>{
this.$emit("onSubmit")
});
this.$emit("onSubmit")
},
processParams(){
if(this.searchData.deviceType == "2"){
@ -322,8 +333,10 @@ export default {
this.editData.devices = [];
let arr = this.filterData.screenSize.split("*");
this.editData.type2 = {
displayAreaWidth: +arr[0],
displayAreaHeight: +arr[1]
origin:{
displayAreaWidth: +arr[0],
displayAreaHeight: +arr[1]
}
};
}
}

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

@ -1,24 +1,12 @@
<template>
<Dialog v-model="modelVisible" title="修改" width="400px" label-width="120px">
<el-form>
<el-form-item label="触发时间">
<el-col :span="4">
<el-form-item label="时">
<el-input v-model="editData.hour"></el-input>
</el-col>
<el-col :span="1">
:
</el-col>
<el-col :span="4">
</el-form-item>
<el-form-item label="钟">
<el-input v-model="editData.minute"></el-input>
</el-col>
<el-col :span="1">
:
</el-col>
<el-col :span="4">
<el-input v-model="editData.second"></el-input>
</el-col>
</el-form-item>
<el-form-item>
<el-button size="mini" type="primary" @click="onSubmit">保存</el-button>
</el-form-item>
@ -39,14 +27,13 @@ export default {
},
props: {
visible: Boolean,
propData: Object
propData: String
},
data() {
return {
editData:{
hour:"",
minute:"",
second:""
minute:""
}
};
},
@ -73,14 +60,13 @@ export default {
},
methods: {
onSubmit(){
let time = [this.editData.hour.trim(), this.editData.minute.trim(), this.editData.second.trim()].join(":");
let time = [this.editData.hour.trim(), this.editData.minute.trim(), "00"].join(":");
this.$emit("onSubmit", time)
},
transformData(){
let arr = this.propData.split(":");
this.editData.hour = arr[0];
this.editData.minute = arr[1];
this.editData.second = arr[2];
}
}
};

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

@ -9,12 +9,12 @@
</template>
新增
</ButtonGradient>
<ButtonGradient @click.native="handleExport">
<!-- <ButtonGradient @click.native="handleExport">
<template #prefix>
<img src="@screen/images/export.svg" />
</template>
导出
</ButtonGradient>
</ButtonGradient> -->
<ButtonGradient @click.native="onReset">
<template #prefix>
<img src="@screen/images/refresh.svg" />
@ -23,7 +23,7 @@
</ButtonGradient>
</div>
<InputSearch style="width: 402px" type="input" params="word" :disable="true" placeholder="请输入敏感词,回车搜索"
<InputSearch style="width: 402px" type="input" params="word" :disable="true" placeholder="请输入关键词,回车搜索"
@handleSearch="handleSearch" ref="form" />
</div>
@ -151,7 +151,7 @@ export default {
},
getSearchData() {
let params = {
word: this.searchData?.word,
groupName: this.searchData?.word,
pageSize: this.pageSize,
pageNum: this.currentPage,
};
@ -182,13 +182,13 @@ export default {
this.isShowDialog = true;
this.dialogData = data||{};
},
handleExport() {
exportFile({
url: "/business/dcInfoBoardVocabulary/export",
filename: "情报板敏感词",
data: this.getSearchData(),
});
},
// handleExport() {
// exportFile({
// url: "/business/dcInfoBoardVocabulary/export",
// filename: "",
// data: this.getSearchData(),
// });
// },
handleSearch(data) {
this.searchData = data;
this.getData();

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

@ -1,4 +1,4 @@
<template>
<!-- <template>
<div>
<img class="img" src="@screen/images/digital/gisAndBim.jpg" />
</div>
@ -11,4 +11,57 @@
height: 1030px;
width: 1920px;
}
</style> -->
<template>
<div class='comp_box'>
<iframe class="iframe" :src="alarmUrl" frameborder="0"></iframe>
</div>
</template>
<script>
import { getConfigKey } from "@/api/system/config.js";
export default {
name: 'InDevelopment',
components: {
},
props: {
text: {
type: String,
default: "暂无数据"
},
alarmUrl: {
type: String,
default: "",
}
},
mounted() {
this.alarmUrl = "http://10.0.86.37:81/?HoveringMouse=true&LightMode=false";
// getConfigKey("dc.alarmUrl").then((res) => {
// this.alarmUrl = res.msg
// });
}
}
</script>
<style lang='scss' scoped>
.comp_box {
// padding-top:160px;
width: 100%;
height: 100%;
color: #8A9EAA;
display: flex;
justify-content: center;
align-items: center;
position: relative;
.iframe {
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
}
}
</style>

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

@ -1,7 +1,7 @@
import request from '@/utils/request'
export function addTaskRequest(jobGroup, time, devices, params, others) {
export function submitTaskRequest(id, jobGroup, time, devices, params, others) {
let temp = [{
...others,
devices: devices,
@ -31,11 +31,14 @@ export function addTaskRequest(jobGroup, time, devices, params, others) {
time,
callParameter: JSON.stringify(temp)
}
if(id!=undefined){
data.jobId = id;
}
// console.log(JSON.stringify(data));
return request({
// url: '/business/board/batch/publish',
url: `/business/dcBatchFunctionsJob`,
method: 'post',
method: id ? 'put' : 'post',
// data: data
data
})

4
ruoyi-ui/vue.config.js

@ -44,7 +44,7 @@ module.exports = {
// target: `http://10.0.81.201:8080`,
// target: `http://10.168.73.36:8080`, // 周乐
// target: `http://10.168.77.209:8087`, // 刘朋
target: `http://10.168.66.196:8087`, //刘文阁
// target: `http://10.168.66.196:8087`, //刘文阁
// target: `http://10.168.56.206:8087`, //孟
// target: `http://10.168.78.135:8087`, //孟
// target: `http://10.168.78.135:8087`,
@ -54,7 +54,7 @@ module.exports = {
// target: `http://10.168.78.135:8087`, //王钦
// 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