<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>
|
<FormCol>
|
<FYForm ref="formRef" :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"
|
:sourceInit="sceneOptionSourceInit"
|
:type="formObj.sourceType"
|
v-model:value="formObj._scenetype"
|
></FYOptionScene>
|
<!-- 时间 -->
|
<FYOptionTime
|
prop="time"
|
:initValue="true"
|
type="month"
|
v-model:value="formObj.time"
|
></FYOptionTime>
|
<el-form-item label="主数据源" prop="sourceType">
|
<!-- <el-switch v-model="formObj.sourceType" @change="sceneOptionSourceInit = true" /> -->
|
<el-radio-group
|
v-model="formObj.sourceType"
|
size="small"
|
@change="sceneOptionSourceInit = true"
|
>
|
<el-radio-button label="1">守法服务记录</el-radio-button>
|
<el-radio-button label="2">现场巡查记录</el-radio-button>
|
</el-radio-group>
|
<!-- <span class="m-l-16">{{ formObj.sourceType ? '守法服务记录' : '现场巡查记录' }}</span> -->
|
<el-tooltip placement="bottom-start" effect="light">
|
<template #content>
|
<!-- <el-text tag="b" size="default">说明</el-text><br /> -->
|
<el-text tag="i" size="default" type="warning"
|
>该选项是用于决定评估主体对象的获取方式</el-text
|
><br />
|
<el-text tag="b" size="small">守法服务记录:</el-text><br />
|
<el-text size="small"
|
>表示在评估时,评估对象是从守法服务小程序系统中获取的当前可用的用户;<br />
|
一般情况下,当评估对象没有进行现场巡查,只有守法服务相关记录时,采用此选项;</el-text
|
><br />
|
<el-text tag="b" size="small">现场巡查记录:</el-text><br />
|
<el-text size="small"
|
>表示在评估时,评估对象是从现场巡查监管系统中获取的总任务下的所有监管场景;<br />
|
一般情况下,当评估对象有进行现场巡查,采用此选项; </el-text
|
><br />
|
</template>
|
<el-icon class="m-l-8 cursor-p" :size="16" color="var(--el-color-warning)"
|
><QuestionFilled
|
/></el-icon>
|
</el-tooltip>
|
</el-form-item>
|
</template>
|
</FYForm>
|
</FormCol>
|
<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', 'change'],
|
data() {
|
return {
|
loading: false,
|
evaConditionRules: {
|
time: [
|
{
|
required: true,
|
message: '时间不能为空',
|
trigger: 'change'
|
}
|
],
|
sourceType: [
|
{
|
required: true,
|
message: '主数据源必须选择',
|
trigger: 'change'
|
}
|
]
|
},
|
// 当场景选项切换数据源时,是否清空当前选项值
|
sceneOptionSourceInit: true
|
};
|
},
|
methods: {
|
setOptions(param) {
|
this.sceneOptionSourceInit = false;
|
this.$refs.formRef.formObj._locations = param.locations;
|
this.$refs.formRef.formObj._scenetype = param.scenetype;
|
this.$refs.formRef.formObj.sourceType = param.sourceType;
|
},
|
submit() {
|
this.$refs.formRef.onSubmit(false);
|
},
|
// 跳转下一步
|
nextStep(formObj, success, fail) {
|
// todo: 检查是否已有评估记录,提示用户可直接跳转查看或继续下一步
|
|
this.loading = true;
|
return new Promise((reslove, reject) => {
|
setTimeout(() => {
|
this.$emit('change', formObj);
|
this.$emit('update:modelValue', this.modelValue + 1);
|
this.loading = false;
|
success();
|
reslove();
|
}, 1000);
|
});
|
}
|
}
|
};
|
</script>
|