|
|
@ -4,47 +4,24 @@ |
|
|
|
<ElForm :model="formData" inline :rules="rules" ref="ruleForm"> |
|
|
|
<div class="first"> |
|
|
|
<el-form-item prop="eventCategory"> |
|
|
|
<el-radio-group |
|
|
|
v-model="formData.eventCategory" |
|
|
|
@input="changeRadio" |
|
|
|
> |
|
|
|
<el-radio-group v-model="formData.eventCategory" @input="changeRadio"> |
|
|
|
<el-radio-button :label="1">交通事件</el-radio-button> |
|
|
|
<el-radio-button :label="2">感知事件</el-radio-button> |
|
|
|
</el-radio-group> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item required label="预案名称:" prop="planName"> |
|
|
|
<el-input |
|
|
|
v-model="formData.planName" |
|
|
|
placeholder="请输入预案名称" |
|
|
|
></el-input> |
|
|
|
<el-input v-model="formData.planName" placeholder="请输入预案名称"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item required label="事件类型:" prop="eventType"> |
|
|
|
<el-select |
|
|
|
v-model="formData.eventType" |
|
|
|
placeholder="请选择事件类型" |
|
|
|
@change="changeEventType" |
|
|
|
> |
|
|
|
<el-option |
|
|
|
v-for="item in eventOptions" |
|
|
|
:key="item.value" |
|
|
|
:label="item.label" |
|
|
|
:value="item.value" |
|
|
|
> |
|
|
|
<el-select v-model="formData.eventType" placeholder="请选择事件类型" @change="changeEventType"> |
|
|
|
<el-option v-for="item in eventOptions" :key="item.value" :label="item.label" :value="item.value"> |
|
|
|
</el-option> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
<el-form-item label="触发类型:" prop="triggerMechanism"> |
|
|
|
<el-select |
|
|
|
v-model="formData.triggerMechanism" |
|
|
|
placeholder="请选择触发类型" |
|
|
|
> |
|
|
|
<el-option |
|
|
|
v-for="item in mechanismOptions" |
|
|
|
:key="item.value" |
|
|
|
:label="item.label" |
|
|
|
:value="item.value" |
|
|
|
> |
|
|
|
<el-select v-model="formData.triggerMechanism" placeholder="请选择触发类型"> |
|
|
|
<el-option v-for="item in mechanismOptions" :key="item.value" :label="item.label" :value="item.value"> |
|
|
|
</el-option> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
@ -56,11 +33,7 @@ |
|
|
|
<div class="text"><i style="color: red">*</i>执行操作:</div> |
|
|
|
</el-col> |
|
|
|
<el-col :span="22"> |
|
|
|
<FormTable |
|
|
|
ref="secondFormTable" |
|
|
|
:tableData="secondFormData" |
|
|
|
:type="1" |
|
|
|
></FormTable> |
|
|
|
<FormTable ref="secondFormTable" :tableData="secondFormData" :type="1"></FormTable> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
</div> |
|
|
@ -70,11 +43,7 @@ |
|
|
|
<div class="text"><i style="color: red">*</i>恢复操作:</div> |
|
|
|
</el-col> |
|
|
|
<el-col :span="22"> |
|
|
|
<FormTable |
|
|
|
ref="thirdFormTable" |
|
|
|
:tableData="thirdFormData" |
|
|
|
:type="2" |
|
|
|
></FormTable> |
|
|
|
<FormTable ref="thirdFormTable" :tableData="thirdFormData" :type="2"></FormTable> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
</div> |
|
|
@ -82,17 +51,9 @@ |
|
|
|
</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 |
|
|
|
> |
|
|
|
<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> |
|
|
@ -111,7 +72,7 @@ import { |
|
|
|
gzmsMap, |
|
|
|
eventSubClassMap, |
|
|
|
trafficKV, |
|
|
|
perceptionKV, |
|
|
|
WarningTypeList as perceptionKV, |
|
|
|
} from "@screen/utils/enum.js"; |
|
|
|
|
|
|
|
const typeMap = { |
|
|
@ -141,7 +102,7 @@ export default { |
|
|
|
visible: Boolean, |
|
|
|
detail: { |
|
|
|
type: Object, |
|
|
|
default: () => {}, |
|
|
|
default: () => { }, |
|
|
|
}, |
|
|
|
}, |
|
|
|
data() { |
|
|
@ -201,7 +162,7 @@ export default { |
|
|
|
}, |
|
|
|
}; |
|
|
|
}, |
|
|
|
mounted() {}, |
|
|
|
mounted() { }, |
|
|
|
computed: { |
|
|
|
modelVisible: { |
|
|
|
get() { |
|
|
@ -212,7 +173,7 @@ export default { |
|
|
|
this.eventOptions = typeMap[this.detail.eventCategory]; |
|
|
|
this.mechanismOptions = |
|
|
|
eventSubClassMap[this.detail.eventCategory || 1][ |
|
|
|
this.detail.eventType |
|
|
|
this.detail.eventType |
|
|
|
]; |
|
|
|
this.initData(this.detail.id); |
|
|
|
} else { |
|
|
@ -327,7 +288,7 @@ export default { |
|
|
|
this.eventOptions = typeMap[value]; |
|
|
|
this.changeEventType(1); |
|
|
|
}, |
|
|
|
handleChange() {}, |
|
|
|
handleChange() { }, |
|
|
|
formatData(it, value = 1, id = "") { |
|
|
|
let data = { ...it, actionType: value, emergencyPlansId: id }; |
|
|
|
if ( |
|
|
|