Browse Source

预案发布

wangqin
王钦 6 months ago
parent
commit
a48b4ef7a9
  1. 1
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/CrowdnessIndicatorRankings/index.vue
  2. 122
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/DeviceControl/components/ScopeTable.vue
  3. 1
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/DeviceControl/data.js
  4. 48
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/DeviceControl/index.vue
  5. 8
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/index.vue
  6. 1
      ruoyi-ui/src/views/JiHeExpressway/pages/maintenanceOperations/smart/manage/index.vue

1
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/CrowdnessIndicatorRankings/index.vue

@ -287,7 +287,6 @@ export default {
} }
const self = this; const self = this;
setTimeout(() => { setTimeout(() => {
console.log(self.detailData,'---------------')
// map // map
const { AMap, mapIns } = self.$refs.AMapContainerRef.getMapInstance(); const { AMap, mapIns } = self.$refs.AMapContainerRef.getMapInstance();
const { longitude, dimension, eventName } = self.detailData; const { longitude, dimension, eventName } = self.detailData;

122
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/DeviceControl/components/ScopeTable.vue

@ -4,11 +4,10 @@
<el-col :span="7"> <el-col :span="7">
<!-- 设备类型 --> <!-- 设备类型 -->
<el-select v-model="tableInfo.deviceType" placeholder="" @change="changeDeviceType" transfer="true" <el-select v-model="tableInfo.deviceType" placeholder="" @change="changeDeviceType" transfer="true"
style="width: 123px;"> style="width: 123px;">
<el-option v-for="item in deviceOptions" :key="item.value" :label="item.label" :value="item.value"> <el-option v-for="item in deviceOptions" :key="item.value" :label="item.label" :value="item.value">
</el-option> </el-option>
</el-select> </el-select>
</el-col> </el-col>
<el-col :span="1"> <el-col :span="1">
</el-col> </el-col>
@ -30,8 +29,31 @@
style="width: 75px;"></el-input-number> style="width: 75px;"></el-input-number>
<span v-if="tableInfo.searchRule == 4" style="width: 56px;">公里</span> <span v-if="tableInfo.searchRule == 4" style="width: 56px;">公里</span>
</el-col> </el-col>
<el-col :span="4" v-if="tableInfo.deviceType == '2'">
<div class="firstBtns">
<ButtonGradient class="title-button" @click.native="$emit('onConfirm', index)">
<i class="el-icon-check"></i>
</ButtonGradient>
<el-dropdown>
<span class="el-dropdown-link">
<ButtonGradient class="title-button">
<i class="el-icon-more"></i>
</ButtonGradient>
</span>
<el-dropdown-menu slot="dropdown"
style="background-color: #102833;border: solid 1px #0b5575;">
<el-dropdown-item icon="el-icon-plus" @click.native="$emit('onAdd', index)">
新增
</el-dropdown-item>
<el-dropdown-item icon="el-icon-delete" @click.native="$emit('onDel', index)">
删除
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
<el-col :span="4"> </div>
</el-col>
<el-col :span="4" v-else>
<div class="firstBtns"> <div class="firstBtns">
<ButtonGradient class="title-button" @click.native="$emit('onAdd')"> <ButtonGradient class="title-button" @click.native="$emit('onAdd')">
<i class="el-icon-plus"></i> <i class="el-icon-plus"></i>
@ -62,12 +84,6 @@
<el-option label="智能发布" :value="2"></el-option> <el-option label="智能发布" :value="2"></el-option>
</el-select> </el-select>
</el-col> </el-col>
<el-col v-if="tableInfo.deviceType == 2 && tableInfo.zx_operationType == 1" :span="8">
<el-input @click.native="clickQbb('zx_content')" placeholder="请选择" v-model="tableInfo.zx_content"
readonly>
<i slot="suffix" class="el-input__icon el-icon-search"></i>
</el-input>
</el-col>
<!-- 疲劳唤醒 --> <!-- 疲劳唤醒 -->
<el-col v-if="tableInfo.deviceType == 10" :span="8"> <el-col v-if="tableInfo.deviceType == 10" :span="8">
<el-select v-model="tableInfo.zx_name" placeholder="工作模式"> <el-select v-model="tableInfo.zx_name" placeholder="工作模式">
@ -113,7 +129,28 @@
<el-input v-model="tableInfo.zx_content" placeholder="请输入发布内容"></el-input> <el-input v-model="tableInfo.zx_content" placeholder="请输入发布内容"></el-input>
</el-col> </el-col>
</el-row> </el-row>
<el-row v-if="tableInfo.deviceType == 2 && tableInfo.executeConfig && tableInfo.executeConfig.contentList">
<el-col :span="24">
<div class="keep-ratio" origin="top" v-for="(itm,idx) of tableInfo.executeConfig.contentList">
<div class="contentLabel" >{{ itm.deviceName }}</div>
<div class="contentValue" v-if="itm.isEditor === undefined">
<div class="contentBoard" >{{ itm.content }}</div>
<ButtonGradient class="btn" @click.native="$emit('onContentEdit', {field:'executeConfig',index,idx,type:'edit'})">
<i class="el-icon-edit"></i>
</ButtonGradient>
</div>
<div class="contentValue" v-else>
<input class="contentBoard" placeholder="请输入文字" v-model="itm.content"></input>
<ButtonGradient class="btn" style="margin-left: 5px;" @click.native="$emit('onContentEdit', {field:'executeConfig',index,idx,type:'cancel'})">
<i class="el-icon-refresh-left"></i>
</ButtonGradient>
<ButtonGradient class="btn" style="margin-left: 5px;" @click.native="$emit('onContentEdit', {field:'executeConfig',index,idx,type:'confirm'})">
<i class="el-icon-check"></i>
</ButtonGradient>
</div>
</div>
</el-col>
</el-row>
<el-row v-if="tableInfo.deviceType !== 5"> <el-row v-if="tableInfo.deviceType !== 5">
<el-col :span="3"> <el-col :span="3">
<p>恢复:</p> <p>恢复:</p>
@ -125,12 +162,6 @@
<el-option label="还原上次" :value="2"></el-option> <el-option label="还原上次" :value="2"></el-option>
</el-select> </el-select>
</el-col> </el-col>
<el-col v-if="tableInfo.deviceType == 2 && tableInfo.hf_operationType == 1" :span="8">
<el-input @click.native="clickQbb('hf_content')" placeholder="请选择" v-model="tableInfo.hf_content"
readonly>
<i slot="suffix" class="el-input__icon el-icon-search"></i>
</el-input>
</el-col>
<!-- 疲劳唤醒 --> <!-- 疲劳唤醒 -->
<el-col v-if="tableInfo.deviceType == 10" :span="8"> <el-col v-if="tableInfo.deviceType == 10" :span="8">
<el-select v-model="tableInfo.hf_name" placeholder="工作模式"> <el-select v-model="tableInfo.hf_name" placeholder="工作模式">
@ -166,17 +197,18 @@
</el-select> </el-select>
</el-col> </el-col>
<!-- 语音广播 --> <!-- 语音广播 -->
<!-- <el-col v-if="tableInfo.deviceType == 5" :span="4">
<el-select v-model="tableInfo.hf_operationType" placeholder="请选择">
<el-option label="自定义发布" :value="1"></el-option>
<el-option label="智能发布" :value="2"></el-option>
</el-select>
</el-col> -->
<el-col v-if="tableInfo.deviceType == 5" :span="12"> <el-col v-if="tableInfo.deviceType == 5" :span="12">
<el-input v-model="tableInfo.hf_content" placeholder="请输入发布内容"></el-input> <el-input v-model="tableInfo.hf_content" placeholder="请输入发布内容"></el-input>
</el-col> </el-col>
</el-row> </el-row>
<el-row v-if="tableInfo.deviceType == 2 && tableInfo.recoverConfig && tableInfo.recoverConfig.contentList">
<el-col :span="24">
<div class="keep-ratio" origin="top" v-for="(item,index) of tableInfo.recoverConfig.contentList">
<div class="contentLabel" >{{ item.deviceName }}</div>
<div class="contentValue"><div class="contentBoard" >{{ item.content }}</div><el-button icon="el-icon-edit"></el-button></div>
</div>
</el-col>
</el-row>
<!-- 情报板弹窗 --> <!-- 情报板弹窗 -->
<QbbDialog :visible="isShowDialog" :info="qbbData" @close="onCloseDialog" @dialogSubmit="dialogSubmit" /> <QbbDialog :visible="isShowDialog" :info="qbbData" @close="onCloseDialog" @dialogSubmit="dialogSubmit" />
</div> </div>
@ -309,12 +341,9 @@ export default {
} }
}, },
async mounted() { async mounted() {
// this.loadData(2);
}, },
methods: { methods: {
initData() { initData() { },
},
async loadData(deviceType = 1) { async loadData(deviceType = 1) {
this.sbOptions = []; this.sbOptions = [];
let result = await request({ let result = await request({
@ -347,14 +376,30 @@ export default {
this.isShowDialog = false; this.isShowDialog = false;
}, },
dialogSubmit(data) { dialogSubmit(data) {
console.log('qbbData', data)
this.tableInfo[this.clickQbbName] = data.content; this.tableInfo[this.clickQbbName] = data.content;
// this.tableData[this.index].otherConfig = JSON.stringify(data); // this.tableData[this.index].otherConfig = JSON.stringify(data);
} },
} }
} }
</script> </script>
<style>
.el-dropdown-menu__item {
color: #fff !important;
&:hover {
background-color: #2ca5ad !important;
}
}
.el-dropdown-menu__item.is-active {
color: #409EFF;
background-color: #ecf5ff;
}
.el-dropdown-menu__item.is-disabled {
color: #409EFF;
background-color: #ecf5ff;
}
</style>
<style lang="scss" scoped> <style lang="scss" scoped>
.ScopeTable { .ScopeTable {
display: flex; display: flex;
@ -382,5 +427,24 @@ export default {
} }
.dropmenu {
color: white !important;
}
}
.contentValue{
display: flex;
width:100%;
align-items: center;
margin-bottom: 10px;
}
.contentBoard{
flex:1;
background-color: #000;
color:yellow;
padding: 9px 0px;
text-align: center;
}
.btn{
height:40px;
} }
</style> </style>

1
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/DeviceControl/data.js

@ -4,6 +4,7 @@ export const defaultTableInfo = {
deviceType: 2, deviceType: 2,
searchRule: 1, searchRule: 1,
number: 0, number: 0,
isDefault: true
// zx_operationType: 2, // zx_operationType: 2,
// hf_operationType: 2, // hf_operationType: 2,
}; };

48
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/DeviceControl/index.vue

@ -7,6 +7,8 @@
:index="index" :index="index"
@onAdd="onAdd" @onAdd="onAdd"
@onDel="onDel" @onDel="onDel"
@onConfirm="onConfirm"
@onContentEdit="onContentEdit"
></ScopeTable> ></ScopeTable>
</el-row> </el-row>
</div> </div>
@ -59,7 +61,6 @@ export default {
this.initData(this.detailData); this.initData(this.detailData);
}, },
initData(eventInfo) { initData(eventInfo) {
console.log("eventInfo", eventInfo);
request({ request({
url: `business/plans/list/event/type`, url: `business/plans/list/event/type`,
method: "post", method: "post",
@ -120,6 +121,51 @@ export default {
} }
this.tableData.splice(index, 1); this.tableData.splice(index, 1);
}, },
onConfirm(index){
const param = {
"dcEvent": {
"eventType": this.detailData.eventType,
"direction": this.detailData.direction,
"id": this.detailData.id,
"stakeMark": this.detailData.stakeMark,
"subclass": this.detailData.subclass
},
"dcExecuteAction": {
"id": "",
"emergencyPlansId": "",
"deviceType": this.tableData[index].deviceType,
"searchRule": this.tableData[index].searchRule,
"number": this.tableData[index].number,
"deviceList": this.tableData[index].devList.join(','),
"executeConfig": "{\"operationType\":2}",
"recoverConfig": "{\"operationType\":2}"
}
}
request({
url: `business/plans/list/event/emergencyPlans`,
method: "post",
data: param,
}).then(result=>{
if (result.code != 200) return Message.error(result?.msg);
let data = result.data;
this.tableData[index].executeConfig = JSON.parse(data.executeConfig)
this.tableData[index].recoverConfig = JSON.parse(data.recoverConfig)
this.tableData[index].zx_operationType = this.tableData[index].executeConfig?.operationType;
this.tableData[index].hf_operationType = this.tableData[index].recoverConfig?.operationType;
this.tableData = _.cloneDeep(this.tableData)
})
},
onContentEdit({field,index,idx,type}){
if(type==='edit'){
this.tableData[index][field]['contentList'][idx]['isEditor'] = this.tableData[index][field]['contentList'][idx].content;
} else if(type === 'cancel'){
this.tableData[index][field]['contentList'][idx]['content'] = this.tableData[index][field]['contentList'][idx].isEditor;
delete this.tableData[index][field]['contentList'][idx].isEditor
} else if(type === 'confirm'){
delete this.tableData[index][field]['contentList'][idx].isEditor
}
this.tableData = _.cloneDeep(this.tableData)
},
handleSubmit(value = 1) { handleSubmit(value = 1) {
let dcArr = []; let dcArr = [];
this.tableData.forEach((item) => { this.tableData.forEach((item) => {

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

@ -63,8 +63,14 @@ export default {
let h = window.location.href.split("="); let h = window.location.href.split("=");
if (h.length === 2) { if (h.length === 2) {
this.detailId = window.location.href.split("=")[1]; this.detailId = window.location.href.split("=")[1];
localStorage.setItem('commandDispatch',this.detailId)
} else { } else {
this.detailId = "b825c7bbf4de43cdb8f689e270adf7a1"; let id = localStorage.getItem('commandDispatch')
if(id && id !== ''){
this.detailId = id;
} else {
this.detailId = "b825c7bbf4de43cdb8f689e270adf7a1";
}
} }
this.getDetail(); this.getDetail();
}, },

1
ruoyi-ui/src/views/JiHeExpressway/pages/maintenanceOperations/smart/manage/index.vue

@ -342,7 +342,6 @@ export default {
}, },
/** 修改按钮操作 */ /** 修改按钮操作 */
handleUpdate(row) { handleUpdate(row) {
console.log(row,'-------------------')
this.formData = row; this.formData = row;
this.modelVisible = true; this.modelVisible = true;
}, },

Loading…
Cancel
Save