|
|
@ -4,9 +4,7 @@ |
|
|
|
<h4>预案内容</h4> |
|
|
|
<dev class="listBox disPid"> |
|
|
|
<div class="tplItem"> |
|
|
|
<!-- 模板内容 --> |
|
|
|
<!-- <BoardTplPreview class="boardPreview" boardWH="1400*200" :tpl="{}"></BoardTplPreview> --> |
|
|
|
<!-- 操作按钮 --> |
|
|
|
<BoardTplPreview class="boardPreview" boardWH="1400*200" :tpl="automaticData"></BoardTplPreview> |
|
|
|
<div class="infoBtnBox infoBtnBoxSm"> |
|
|
|
<p class="btn"> |
|
|
|
<!-- <el-radio v-model="radio1" :label="1" @input="changeRadio(1)" /> --> |
|
|
@ -17,9 +15,7 @@ |
|
|
|
<h4>自动生成</h4> |
|
|
|
<dev class="listBox disPid"> |
|
|
|
<div class="tplItem"> |
|
|
|
<!-- 模板内容 --> |
|
|
|
<!-- <BoardTplPreview class="boardPreview" boardWH="1400*200" :tpl="{}"></BoardTplPreview> --> |
|
|
|
<!-- 操作按钮 --> |
|
|
|
<BoardTplPreview class="boardPreview" boardWH="1400*200" :tpl="automaticData"></BoardTplPreview> |
|
|
|
<div class="infoBtnBox infoBtnBoxSm"> |
|
|
|
<p class="btn"> |
|
|
|
<!-- <el-radio v-model="radio1" :label="2" @input="changeRadio(2)" /> --> |
|
|
@ -28,7 +24,7 @@ |
|
|
|
</div> |
|
|
|
</dev> |
|
|
|
<h4>情报板模版</h4> |
|
|
|
<!-- <vuescroll :ops="scrollOptions" class="listBox"> |
|
|
|
<vuescroll :ops="scrollOptions" class="listBox"> |
|
|
|
<div v-for="(item) in templateAvailable" :key="item.dictValue"> |
|
|
|
<h5>{{ item.dictLabel }}</h5> |
|
|
|
<div v-for="(itm, indx) in item.list" :key="indx" class="tplItem"> |
|
|
@ -40,9 +36,20 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</vuescroll> --> |
|
|
|
</vuescroll> |
|
|
|
</div> |
|
|
|
<template #footer> |
|
|
|
<div v-if="type == 2" class="EventAddPlanDialog"> |
|
|
|
<div v-for="(item, index) in Object.keys(originalData)" :key="index"> |
|
|
|
<h4>{{ item }}</h4> |
|
|
|
<dev class="listBox disPid"> |
|
|
|
<div v-for="(it, idx) in originalData[item]" :key="idx" class="tplItem"> |
|
|
|
<BoardTplPreview class="boardPreview" boardWH="1400*200" :tpl="it"></BoardTplPreview> |
|
|
|
</div> |
|
|
|
</dev> |
|
|
|
</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
<template #footer v-if="type == 1"> |
|
|
|
<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> |
|
|
@ -57,7 +64,6 @@ 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"; |
|
|
|
import DeviceControlDialog from '../../../../../Home/components/Dialogs/DrivingGuidance/components/DeviceControlDialog.vue'; |
|
|
|
|
|
|
|
export default { |
|
|
|
name: 'qbbDialog', |
|
|
@ -66,13 +72,12 @@ export default { |
|
|
|
Button, |
|
|
|
vuescroll, |
|
|
|
BoardTplPreview, |
|
|
|
DeviceControlDialog |
|
|
|
}, |
|
|
|
model: { |
|
|
|
prop: 'visible', |
|
|
|
event: 'close' |
|
|
|
}, |
|
|
|
// inject: ['getTemplateAutomatic'], |
|
|
|
inject: ['getAutomatic', 'getOriginal'], |
|
|
|
props: { |
|
|
|
visible: Boolean, |
|
|
|
type: { |
|
|
@ -93,23 +98,27 @@ export default { |
|
|
|
tplCategory: [], |
|
|
|
templateAll: [], |
|
|
|
radio1: '', |
|
|
|
itmData: {} |
|
|
|
itmData: {}, |
|
|
|
automaticData: {}, |
|
|
|
originalData: {}, |
|
|
|
} |
|
|
|
}, |
|
|
|
mounted() { |
|
|
|
if (this.type == 1) { |
|
|
|
this.initData(); |
|
|
|
} else if (this.type == 2) { |
|
|
|
this.getBoardOriginal(); |
|
|
|
} |
|
|
|
}, |
|
|
|
computed: { |
|
|
|
modelVisible: { |
|
|
|
async get() { |
|
|
|
if (this.visible) { |
|
|
|
if (this.info && this.info.id) { |
|
|
|
this.radio1 = Number(this.info.id); |
|
|
|
} |
|
|
|
// console.log('123', this.getTemplateAutomatic()); |
|
|
|
} |
|
|
|
get() { |
|
|
|
// if (this.visible2) { |
|
|
|
// if (this.info && this.info.id) { |
|
|
|
// this.radio1 = Number(this.info.id); |
|
|
|
// } |
|
|
|
// console.log('123', this.getTemplateAutomatic()); |
|
|
|
// } |
|
|
|
return this.visible; |
|
|
|
}, |
|
|
|
set(val) { |
|
|
@ -128,6 +137,7 @@ export default { |
|
|
|
]).then((res) => { |
|
|
|
this.____setAvailableTemplate(); |
|
|
|
}); |
|
|
|
this.getTemplateAutomatic(); |
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
@ -164,6 +174,16 @@ export default { |
|
|
|
} |
|
|
|
}); |
|
|
|
}, |
|
|
|
async getTemplateAutomatic() { |
|
|
|
let data = await this.getAutomatic(); |
|
|
|
console.log('dataaaa', data); |
|
|
|
this.automaticData = data; |
|
|
|
}, |
|
|
|
async getBoardOriginal() { |
|
|
|
let data = await this.getOriginal(); |
|
|
|
console.log('datbbbbb', data); |
|
|
|
this.originalData = data; |
|
|
|
}, |
|
|
|
changeRadio(data) { |
|
|
|
this.itmData = data; |
|
|
|
}, |
|
|
|