<template>
|
<el-card shadow="never">
|
<template #header>
|
<div><el-text tag="b" size="large">选择评估范围</el-text></div>
|
<el-text size="small" type="info">包括区县、场景类型以及月份</el-text>
|
</template>
|
<FYForm
|
ref="formRef"
|
:form-info="evaConditon"
|
:rules="evaConditionRules"
|
:showButtons="false"
|
@submit="nextStep"
|
>
|
<template #form-item="{ formObj }">
|
<CompQuickSet @quick-set="setOptions"></CompQuickSet>
|
<!-- 区县 -->
|
<FYOptionLocation
|
:allOption="false"
|
:level="3"
|
:initValue="false"
|
:checkStrictly="false"
|
v-model:value="formObj._locations"
|
></FYOptionLocation>
|
<!-- 场景类型 -->
|
<FYOptionScene
|
:allOption="false"
|
:initValue="false"
|
:type="2"
|
v-model:value="formObj._scenetype"
|
></FYOptionScene>
|
<!-- 时间 -->
|
<FYOptionTime
|
prop="time"
|
:initValue="true"
|
type="month"
|
v-model:value="formObj.time"
|
></FYOptionTime>
|
</template>
|
</FYForm>
|
<template #footer>
|
<el-row justify="space-around">
|
<el-button type="primary" size="default" :loading="loading" @click="submit"
|
>下一步</el-button
|
>
|
</el-row>
|
</template>
|
</el-card>
|
</template>
|
|
<script>
|
import CompQuickSet from '../CompQuickSet.vue';
|
|
/**
|
* 评估范围合规性检查
|
*/
|
export default {
|
components: { CompQuickSet },
|
props: {
|
// 步骤下标
|
modelValue: Number
|
},
|
emits: ['update:modelValue'],
|
data() {
|
return {
|
loading: false,
|
// 评估任务范围
|
evaConditon: {},
|
evaConditionRules: {
|
time: [
|
{
|
required: true,
|
message: '时间不能为空',
|
trigger: 'change'
|
}
|
]
|
}
|
};
|
},
|
methods: {
|
setOptions(param) {
|
this.evaConditon._locations = param.locations;
|
this.evaConditon._scenetype = param.scenetype;
|
},
|
submit() {
|
this.$refs.formRef.onSubmit(false);
|
},
|
// 跳转下一步
|
nextStep() {
|
this.loading = true;
|
return new Promise((reslove, reject) => {
|
setTimeout(() => {
|
this.$emit('update:modelValue', this.modelValue + 1);
|
this.loading = false;
|
reslove();
|
}, 1000);
|
});
|
}
|
}
|
};
|
</script>
|