Browse Source

事件预案

wangqin
zhoule 9 months ago
parent
commit
c5d4cf57bb
  1. 1323
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/plan/addAndEditDialog/index.vue
  2. 207
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/plan/formTable/index.vue
  3. 276
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/plan/qbbDialog/index.vue

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

File diff suppressed because it is too large

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

@ -13,30 +13,20 @@
<ElTableColumn prop="searchRule" width="260">
<template slot-scope="scope">
<el-select v-if="scope.row.deviceType == 1" v-model="scope.row.searchRule" placeholder="检索规则条件">
<el-option v-for="item in zyOptions" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>
<div v-if="scope.row.deviceType == 2" class="plhx">
<el-select v-model="scope.row.searchRule" placeholder="">
<div class="plhx">
<el-select v-model="scope.row.searchRule" placeholder="检索规则条件">
<el-option v-for="item in zyOptions" :key="item.value" :label="item.label"
:value="item.value">
</el-option>
</el-select>
<el-input-number v-model="scope.row.number" :min="0" :max="9999"
style="width: 130px;"></el-input-number>
</div>
<div v-if="scope.row.deviceType == 3 || scope.row.deviceType == 4" class="plhx">
<el-select v-model="scope.row.searchRule" placeholder="">
<el-option v-for="item in zyOptions" :key="item.value" :label="item.label"
:value="item.value">
</el-option>
</el-select>
<el-input-number v-model="scope.row.number" :min="0" :max="9999"
style="width: 130px;"></el-input-number>
<p style="width: 56px;">公里</p>
<el-input-number v-if="scope.row.searchRule == 2" v-model="scope.row.number" :min="0"
:max="9999" style="width: 130px;"></el-input-number>
<p v-if="scope.row.searchRule == 2"></p>
<el-input-number v-if="scope.row.searchRule == 3" v-model="scope.row.number" :min="0"
:max="9999" style="width: 130px;"></el-input-number>
<p v-if="scope.row.searchRule == 3" style="width: 56px;">公里</p>
</div>
</template>
@ -44,42 +34,44 @@
<ElTableColumn prop="deviceList" width="370">
<template slot-scope="scope">
<div v-if="scope.row.deviceType == 1" class="mjs">
<el-select v-model="scope.row.deviceList" placeholder="" multiple collapse-tags>
<el-option v-for="item in options" :key="item.value" :label="item.label"
:value="item.value">
<div class="mjs">
<el-select v-if="scope.row.searchRule == 1" v-model="scope.row.deviceList" placeholder="请选择设备"
multiple collapse-tags>
<el-option v-for="item in sbOptions" :key="item.id" :label="item.deviceName"
:value="item.id">
</el-option>
</el-select>
<el-input placeholder="请选择" v-model="scope.row.qbb" readonly>
<el-input @click.native="clickQbb(scope.$index)" v-if="scope.row.deviceType == 1"
placeholder="请选择" v-model="scope.row.qbb" readonly>
<i slot="suffix" class="el-input__icon el-icon-search"></i>
</el-input>
</div>
<div v-if="scope.row.deviceType == 2" class="mjs">
<el-select v-model="scope.row.gzms" placeholder="">
<el-option label="工作模式" :value="1"></el-option>
</el-select>
<el-select v-model="scope.row.czsc" placeholder="">
<el-option label="操作时长" :value="1"></el-option>
<el-select v-if="scope.row.deviceType == 2" v-model="scope.row.gzms" placeholder="工作模式">
<el-option v-for="item in gzmsOptions" :key="item.value" :label="item.label"
:value="item.value"></el-option>
</el-select>
</div>
<el-input-number v-if="scope.row.deviceType == 2" placeholder="操作时长(分钟)"
v-model="scope.row.operationDuration" :min="0" :max="999"></el-input-number>
<div v-if="scope.row.deviceType == 3" class="mjs">
<el-select v-model="scope.row.kzms" placeholder="">
<el-option label="控制模式" :value="1"></el-option>
</el-select>
<el-select v-model="scope.row.sj" placeholder="">
<el-option label="选择时间" :value="1"></el-option>
</el-select>
<el-select v-model="scope.row.gzzt" placeholder="">
<el-option label="工作状态" :value="1"></el-option>
</el-select>
</div>
<div v-if="scope.row.deviceType == 3" class="mjs">
<el-select v-model="scope.row.controlModel" placeholder="请选择控制模式">
<el-option label="手动模式" :value="1"></el-option>
<el-option label="自动模式" :value="2"></el-option>
<el-option label="万年历" :value="3"></el-option>
</el-select>
<el-time-picker v-if="scope.row.controlModel == 2" v-model="scope.row.time" is-range
style="" range-separator="-" placeholder="选择时间" value-format="HH:mm" format="HH:mm">
</el-time-picker>
<el-select v-model="scope.row.state" placeholder="工作状态">
<el-option v-for="item in gzztOptions" :key="item.value" :label="item.label"
:value="item.value"></el-option>
</el-select>
</div>
<div v-if="scope.row.deviceType == 4" class="mjs">
<el-input v-model="scope.row.fbnr" placeholder="请输入发布内容"></el-input>
</div>
<el-input v-if="scope.row.deviceType == 4" v-model="scope.row.content"
placeholder="请输入发布内容"></el-input>
</div>
</template>
</ElTableColumn>
@ -93,6 +85,9 @@
</template>
</ElTableColumn>
</Table>
<!-- 情报板弹窗 -->
<QbbDialog :visible="isShowDialog" @close="onCloseDialog" @dialogSubmit="dialogSubmit" />
</div>
</template>
@ -100,6 +95,7 @@
import Table from '@screen/components/Table.vue';
import Button from '@screen/components/Buttons/Button.vue';
import request from "@/utils/request";
import QbbDialog from "../qbbDialog/index.vue";
import { Message } from 'element-ui'
@ -108,6 +104,7 @@ export default {
components: {
Button,
Table,
QbbDialog
},
model: {
prop: 'visible',
@ -121,7 +118,7 @@ export default {
default: () => [{
deviceType: 1,
searchRule: 1,
qbb: '安全行驶'
qbb: ''
}]
}
},
@ -134,10 +131,11 @@ export default {
// qbb: ''
// }
// ],
isShowDialog: false,
deviceOptions: [
{
value: 1,
label: '门架式可变信息标志'
label: '可变信息标志'
},
{
value: 2,
@ -166,64 +164,106 @@ export default {
label: '最近公里数'
},
],
options: [
gzztOptions: [
{
value: 1,
label: '交通事故'
value: "01",
label: "常亮"
},
{
value: 2,
label: '车辆故障'
value: "02",
label: "流水"
},
{
value: 3,
label: '交通管制'
value: "03",
label: "闪烁"
},
{
value: 4,
label: '交通拥堵'
value: "04",
label: "关闭",
}
],
gzmsOptions: [
{
value: "SETMD0",
label: "激光关闭"
},
{
value: "SETMD1",
label: "常亮模式"
},
{
value: 5,
label: '非法上路'
value: "SETMD2",
label: "间隔100ms闪烁模式"
},
{
value: 6,
label: '路障清除'
value: "SETMD3",
label: "间隔200ms闪烁模式",
},
{
value: 7,
label: '施工建设'
value: "SETMD4",
label: "间隔500ms闪烁模式",
},
{
value: 8,
label: '服务区异常'
value: "SETMD5",
label: "2次闪烁模式"
},
{
value: 9,
label: '设施设备隐患'
value: "SETMD6",
label: "SOS模式"
},
{
value: 10,
label: '异常天气'
value: "SETMD7",
label: "自定义模式1",
},
{
value: 11,
label: '其他事件'
value: "SETMD8",
label: "自定义模式2",
},
{
value: "SETMD9",
label: "自定义模式3",
}
],
sbOptions: [],
deviceType: 1,
index: 1
}
},
created() {
this.initData();
},
methods: {
initData() {
request({
url: `business/device/query?deviceType=2`,
method: "get",
}).then((result) => {
if (result.code != 200) return Message.error(result?.msg);
this.sbOptions = result.data;
}).catch(() => {
Message.error("查询可变信息标识失败");
})
},
changeDeviceType(value) {
this.deviceType = value;
// if(value == 1){
// this.searchRule = 1
// }else if(value == 2){
// this.searchRule = 1
// }else if(value == 3){
// this.searchRule = 1
// }else if(value == 4){
// this.searchRule = 1
// }
},
onAdd(id) {
this.tableData.push({
deviceType: 1,
// searchRule: 1,
// qbb: ''
searchRule: 1,
qbb: ''
})
},
onDel(index) {
@ -232,6 +272,17 @@ export default {
}
this.tableData.splice(index, 1)
},
clickQbb(index) {
this.index = index;
this.isShowDialog = true;
},
onCloseDialog() {
this.isShowDialog = false;
},
dialogSubmit(data) {
this.tableData[this.index].qbb = data.content;
this.tableData[this.index].otherConfig = JSON.stringify({ dcInfoBoardTemplate: data });
}
}
}
</script>
@ -264,6 +315,16 @@ export default {
display: flex;
}
::v-deep {
.el-tag.el-tag--info {
max-width: 100px;
}
.el-range-editor--medium .el-range__icon,
.el-range-editor--medium .el-range__close-icon {
display: none;
}
}
}

276
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/plan/qbbDialog/index.vue

@ -0,0 +1,276 @@
<template>
<Dialog v-model="modelVisible" title="选择情报板">
<div class="EventAddPlanDialog">
<vuescroll :ops="scrollOptions" class="listBox">
<div v-for="(item) in templateAvailable" :key="item.dictValue">
<!-- 原来是<el-collapse v-model="activeNames"> -->
<h3>{{ item.dictLabel }}</h3>
<div v-for="(itm, indx) in item.list" :key="indx" class="tplItem">
<!-- 模板内容 -->
<BoardTplPreview class="boardPreview" boardWH="1400*200" :tpl="itm"></BoardTplPreview>
<!-- 操作按钮 -->
<div class="infoBtnBox infoBtnBoxSm">
<p class="btn">
<el-radio v-model="radio1" :label="itm.id" @input="changeRadio(itm)" />
</p>
</div>
</div>
</div>
</vuescroll>
</div>
<template #footer>
<Button style="background: #C9C9C9;padding:0 24px;"
@click.native="modelVisible = false, submitting = false">取消</Button>
<Button style="padding:0 24px;" @click.native="handleSubmit" :loading="submitting">确认</Button>
</template>
</Dialog>
</template>
<script>
import vuescroll from "vuescroll";
import scrollOptions from "@/common/scrollbar.js";
import BoardTplPreview from "@screen/components/infoBoard/BoardTplPreview.vue";
import Dialog from "@screen/components/Dialog/index";
import Button from '@screen/components/Buttons/Button.vue';
import { getTemplateList } from "@/api/board/template";
export default {
name: 'qbbDialog',
components: {
Dialog,
Button,
vuescroll,
BoardTplPreview
},
model: {
prop: 'visible',
event: 'close'
},
props: {
visible: Boolean,
detail: {
type: Object,
default: () => { }
}
},
data() {
return {
submitting: false,
selectedSize: "",
scrollOptions,
templateAvailable: null,
tplCategory: [],
templateAll: [],
radio1: '',
itmData: {}
}
},
mounted() {
this.initData();
},
computed: {
modelVisible: {
get() {
return this.visible;
},
set(val) {
this.$emit('close', val)
}
},
},
methods: {
initData() {
if (this.tplCategory.length && this.templateAll.length) {
this.____setAvailableTemplate();
} else {
Promise.all([
this.____getTemplateCategory(),
this.____getAllTemplate(),
]).then((res) => {
this.____setAvailableTemplate();
});
}
},
//
____getTemplateCategory() {
return this.getDicts("iot_template_category").then((res) => {
this.tplCategory = res.data;
});
},
//
____getAllTemplate() {
return getTemplateList().then((res) => {
this.templateAll = res.data;
});
},
//
____setAvailableTemplate() {
this.templateAvailable = [];
this.tplCategory.forEach((item, index) => {
let arr = this.templateAll["" + index];
if (arr.length > 0) {
let temp = [];
arr.forEach((tpl) => {
if (tpl.screenSize) {
temp.push(tpl);
}
});
if (temp.length > 0) {
this.templateAvailable.push({
...item,
list: temp,
});
}
}
});
},
changeRadio(data) {
this.itmData = data;
},
handleSubmit() {
this.modelVisible = false;
this.$emit('dialogSubmit', this.itmData);
}
}
}
</script>
<style lang="scss" scoped>
.listBox {
padding: 20px;
.tplItem {
margin-right: 14px;
display: flex;
align-items: stretch;
padding-bottom: 10px;
.boardPreview {
border: 1px solid rgba(61, 232, 255, 0.5);
// width: 560px;
// height:80px;
flex: 1;
}
.infoBtnBox {
&.infoBtnBoxSm {
width: 60px;
}
width: 110px;
height: 80px;
display: flex;
margin-left: 10px;
/* // border: solid 1px #05afe3; */
border: 1px solid rgba(61, 232, 255, 0.5);
display: flex;
justify-content: space-around;
align-items: center;
.btn {
background-repeat: no-repeat;
background-size: 100% 100%;
width: 15px;
height: 30px;
&.btnApply {
background-image: url(~@/assets/jihe/images/button/toLeft.svg);
}
&.btnEdit {
background-image: url(~@/assets/jihe/images/button/edit.svg);
}
&.btnDelete {
background-image: url(~@/assets/jihe/images/button/delete.svg);
}
}
i {
font-size: 24px;
color: #666;
padding-left: 4px;
cursor: pointer;
caret-color: rgba(0, 0, 0, 0);
user-select: none;
}
i:hover {
color: #05afe3;
}
.disabledClass {
pointer-events: none;
cursor: auto !important;
color: #ccc;
}
}
}
.controlBox {
margin-top: 10px;
margin-bottom: 10px;
display: flex;
justify-content: center;
}
.el-collapse {
max-height: 100% !important;
overflow: auto;
border-bottom: none;
border-top: none;
padding: 0 0.5vw;
}
}
.fade-enter-active,
.fade-leave-active {
transition: opacity .24s;
}
.fade-enter,
.fade-leave-to {
opacity: 0;
}
.EventAddPlanDialog {
gap: 9px;
width: 650px;
height: 510px;
display: flex;
flex-direction: column;
.first,
.second,
.third {
padding: 5px 10px 8px;
background-color: #296887;
margin-bottom: 15px;
.text {
margin-top: 12px;
}
}
::v-deep {
.el-radio__label {
display: none;
}
}
.form {
flex: 1;
overflow-y: auto;
}
.footer {
display: flex;
justify-content: end;
gap: 15px;
}
}
</style>
Loading…
Cancel
Save