riku
2025-03-25 642d31285d7aff59415a5eb37f87a79f41d308a8
src/views/fysp/evaluation/components/precheck/components/CompCheckArea.vue
@@ -8,35 +8,17 @@
      <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 ? 1 : 2"
            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" />
            <span class="m-l-16">{{ formObj.sourcetype ? '守法服务记录' : '现场巡查记录' }}</span>
          <el-form-item label="主数据源" prop="sourceType">
            <el-radio-group
              v-model="formObj.sourceType"
              size="small"
              @change="sceneOptionSourceInit = true"
            >
              <el-radio-button :value="1">守法服务记录</el-radio-button>
              <el-radio-button :value="2">现场巡查记录</el-radio-button>
            </el-radio-group>
            <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 />
@@ -56,6 +38,29 @@
              /></el-icon>
            </el-tooltip>
          </el-form-item>
          <!-- 区县 -->
          <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>
        </template>
      </FYForm>
    </FormCol>
@@ -70,13 +75,11 @@
</template>
<script>
import CompQuickSet from '../../CompQuickSet.vue';
/**
 * 评估范围合规性检查
 */
export default {
  components: { CompQuickSet },
  props: {
    // 步骤下标
    modelValue: Number
@@ -92,6 +95,13 @@
            message: '时间不能为空',
            trigger: 'change'
          }
        ],
        sourceType: [
          {
            required: true,
            message: '主数据源必须选择',
            trigger: 'change'
          }
        ]
      },
      // 当场景选项切换数据源时,是否清空当前选项值
@@ -103,7 +113,7 @@
      this.sceneOptionSourceInit = false;
      this.$refs.formRef.formObj._locations = param.locations;
      this.$refs.formRef.formObj._scenetype = param.scenetype;
      this.$refs.formRef.formObj.sourcetype = param.sourcetype;
      this.$refs.formRef.formObj.sourceType = param.sourceType;
    },
    submit() {
      this.$refs.formRef.onSubmit(false);