| | |
| | | <template #header> |
| | | <div><el-text tag="b" size="large">数据源检查</el-text></div> |
| | | <el-text size="small" type="info">检查评估所需数据源是否完整</el-text> |
| | | <el-text size="small" type="info">检查评估所需数据源是否完整</el-text> |
| | | </template> |
| | | <FormCol> |
| | | <el-form-item align="middle" v-for="(v, i) in checkResults" :key="i"> |
| | | <el-col :span="14"> |
| | | <el-row align="middle"> |
| | | <el-text size="default" :class="v.required ? 'required' : 'not-required'">*</el-text> |
| | | <el-text size="default" class="m-l-4">{{ v.name }}</el-text> |
| | | </el-row> |
| | | </el-col> |
| | | <el-col :span="5"> |
| | | <el-row align="middle"> |
| | | <el-space> |
| | | <template v-if="v.loading"> |
| | | <el-icon class="is-loading"><Loading /></el-icon> |
| | | <el-text size="default" type="default">检查中...</el-text> |
| | | </template> |
| | | <template v-else-if="v.pass == true"> |
| | | <el-icon color="var(--el-color-success)"><Check /></el-icon> |
| | | <el-text size="default" type="success">通过</el-text> |
| | | </template> |
| | | <template v-else-if="v.pass == false"> |
| | | <el-icon color="var(--el-color-danger)"><Close /></el-icon> |
| | | <el-text size="default" type="danger">缺失</el-text> |
| | | </template> |
| | | <template v-else> |
| | | <el-icon color="var(--el-color-warning)"><Warning /></el-icon> |
| | | <el-text size="default" type="warning">暂略过</el-text> |
| | | </template> |
| | | </el-space> |
| | | </el-row> |
| | | </el-col> |
| | | <el-col :span="5"> |
| | | <el-button |
| | | v-if="!v.pass" |
| | | type="primary" |
| | | size="small" |
| | | @click="goto(v.path)" |
| | | :disabled="v.path == ''" |
| | | > |
| | | 去完善 |
| | | <el-icon class="m-l-4"><Right /></el-icon> |
| | | </el-button> |
| | | </el-col> |
| | | </el-form-item> |
| | | <template v-for="(v, i) in checkResults" :key="i"> |
| | | <el-row class="h-small" align="middle"> |
| | | <el-col :span="14"> |
| | | <el-row align="middle"> |
| | | <el-text size="default" :class="v.required ? 'required' : 'not-required'">*</el-text> |
| | | <el-text size="default" class="m-l-4">{{ v.name }}</el-text> |
| | | </el-row> |
| | | </el-col> |
| | | <el-col :span="5"> |
| | | <el-row align="middle"> |
| | | <el-space> |
| | | <template v-if="v.loading"> |
| | | <el-icon class="is-loading"><Loading /></el-icon> |
| | | <el-text size="default" type="default">检查中...</el-text> |
| | | </template> |
| | | <template v-else-if="v.pass == true"> |
| | | <el-icon color="var(--el-color-success)"><Check /></el-icon> |
| | | <el-text size="default" type="success">通过</el-text> |
| | | </template> |
| | | <template v-else-if="v.pass == false"> |
| | | <el-icon color="var(--el-color-danger)"><Close /></el-icon> |
| | | <el-text size="default" type="danger">缺失</el-text> |
| | | </template> |
| | | <template v-else> |
| | | <el-icon color="var(--el-color-warning)"><Warning /></el-icon> |
| | | <el-text size="default" type="warning">暂略过</el-text> |
| | | </template> |
| | | </el-space> |
| | | </el-row> |
| | | </el-col> |
| | | <el-col :span="5"> |
| | | <el-button |
| | | v-show="!v.loading" |
| | | :type="v.pass ? '' : 'danger'" |
| | | size="small" |
| | | @click="goto(v.path)" |
| | | :disabled="v.path == ''" |
| | | > |
| | | {{ v.pass ? '去修改' : '去完善' }} |
| | | <el-icon class="m-l-4"><Right /></el-icon> |
| | | </el-button> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row align="middle" class="m-b-16"> |
| | | <el-text size="small" class="not-required">*</el-text> |
| | | <el-text size="small" class="m-l-4 color-i">{{ v.des }}</el-text> |
| | | </el-row> |
| | | </template> |
| | | </FormCol> |
| | | <template #footer> |
| | | <el-row justify="space-around"> |
| | |
| | | <script> |
| | | import evaluateApi from '@/api/fysp/evaluateApi'; |
| | | import taskApi from '@/api/fysp/taskApi'; |
| | | import userMapApi from '@/api/fysp/userMapApi'; |
| | | import problemApi from '@/api/fysp/problemApi'; |
| | | import complaintApi from '@/api/fytz/complaintApi'; |
| | | |
| | | /** |
| | | * 生成一项数据源检查记录 |
| | |
| | | loading: true, |
| | | pass: false, |
| | | path: _path, |
| | | des: '', |
| | | async fetch() { |
| | | this.loading = true; |
| | | setTimeout(async () => { |
| | | this.pass = await _fetch(); |
| | | const res = await _fetch(); |
| | | this.pass = res ? res.pass : undefined; |
| | | this.des = res ? res.des : undefined; |
| | | this.loading = false; |
| | | }, 1000); |
| | | } |
| | |
| | | // 步骤下标 |
| | | modelValue: Number |
| | | }, |
| | | emits: ['update:modelValue'], |
| | | emits: ['update:modelValue', 'change'], |
| | | data() { |
| | | return { |
| | | areaInfo: { |
| | | _locations: '', |
| | | _scenetype: '', |
| | | time: '', |
| | | sourcetype: '' |
| | | }, |
| | | areaInfo: {}, |
| | | // 数据源检查记录 |
| | | checkResults: [ |
| | | // 区域范围内的自动评估规则表是否存在 |
| | | baseCheckItem( |
| | | '自动评估规则表', |
| | | '', |
| | | () => { |
| | | const param = { |
| | | taskTypeId: 99, |
| | | scensetypeid: this.areaInfo._scenetype.value |
| | | ...this.areaInfo |
| | | }; |
| | | return evaluateApi.fetchEvaluationRule(param).then((res) => { |
| | | return res.data.length > 0; |
| | | const pass = res.data.length > 0; |
| | | let des = ''; |
| | | if (pass) { |
| | | res.data.forEach((e) => { |
| | | if (des != '') { |
| | | des += '、'; |
| | | } |
| | | des += `《${e.rulename}》`; |
| | | }); |
| | | } else { |
| | | des = '未找到相关评估规则表'; |
| | | } |
| | | return { pass, des }; |
| | | }); |
| | | }, |
| | | true |
| | | ), |
| | | baseCheckItem('现场监管巡查总任务', '', () => {}), |
| | | // 区域范围内的监管任务是否存在 |
| | | baseCheckItem('现场监管巡查总任务', '', () => { |
| | | return taskApi.fetchTopTasks(this.areaInfo).then((res) => { |
| | | const pass = res.data.length > 0; |
| | | let des = ''; |
| | | if (pass) { |
| | | res.data.forEach((e) => { |
| | | if (des != '') { |
| | | des += '、'; |
| | | } |
| | | des += e.name; |
| | | }); |
| | | } else { |
| | | des = '未找到相关巡查总任务'; |
| | | } |
| | | return { pass, des }; |
| | | }); |
| | | }), |
| | | // 区域范围内的监测数据是否存在、数据时间跨度是否完整、数据的初步分析是否完成 |
| | | baseCheckItem('现场监测数据', '', () => {}), |
| | | baseCheckItem('监管点位与监测点匹配', '', () => {}), |
| | | baseCheckItem('现场监管问题类型', '', () => {}), |
| | | baseCheckItem('信访投诉', '', () => {}), |
| | | baseCheckItem('行政处罚', '', () => {}) |
| | | // 区域范围内的每个监管点位与监测仪器的匹配记录是否存在,缺失情况等 |
| | | baseCheckItem('监管点位与监测点匹配', '', () => { |
| | | return userMapApi.fetchDeviceMap(this.areaInfo).then((res) => { |
| | | const pass = res.data.length > 0; |
| | | let des = ''; |
| | | if (pass) { |
| | | des = `找到匹配记录共${res.data.length}条`; |
| | | } else { |
| | | des = '未找到相关匹配记录'; |
| | | } |
| | | return { pass, des }; |
| | | }); |
| | | }), |
| | | // 区域范围内的监管问题配置表是否存在 |
| | | baseCheckItem('现场监管问题类型', '', () => { |
| | | const param = { |
| | | cityCode: this.areaInfo.citycode, |
| | | districtCode: this.areaInfo.districtcode, |
| | | sceneTypeId: this.areaInfo.scensetypeid |
| | | }; |
| | | return problemApi.fetchProblemType(param).then((res) => { |
| | | const pass = res.length > 0; |
| | | let des = ''; |
| | | if (pass) { |
| | | des = `找到问题类型共${res.length}条`; |
| | | } else { |
| | | des = '未找到相关问题类型'; |
| | | } |
| | | return { pass, des }; |
| | | }); |
| | | }), |
| | | // 区域范围内的信访投诉记录是否存在,可随时补充 |
| | | baseCheckItem('信访投诉', '', () => { |
| | | // complaintApi.fetchComplaints(); |
| | | }), |
| | | // 区域范围内的行政处罚记录是否存在,可随时补充 |
| | | baseCheckItem('行政处罚', '', () => { |
| | | // complaintApi.fetchPunishment(); |
| | | }) |
| | | ] |
| | | }; |
| | | }, |
| | |
| | | methods: { |
| | | // 跳转下一步 |
| | | nextStep() { |
| | | this.$emit('change', this.checkResults); |
| | | this.$emit('update:modelValue', this.modelValue + 1); |
| | | }, |
| | | // 跳转上一步 |
| | |
| | | } |
| | | }, |
| | | // 开始检查任务 |
| | | startCheck(v) { |
| | | this.areaInfo = v; |
| | | startCheck(value) { |
| | | // const v = value.value; |
| | | // this.areaInfo = { |
| | | // provincecode: v._locations.pCode, |
| | | // provincename: v._locations.pName, |
| | | // citycode: v._locations.cCode, |
| | | // cityname: v._locations.cName, |
| | | // districtcode: v._locations.dCode, |
| | | // districtname: v._locations.dName, |
| | | // towncode: v._locations.tCode, |
| | | // townname: v._locations.tName, |
| | | // starttime: this.$fm.formatYMDH(v.time), |
| | | // scensetypeid: v._scenetype.value, |
| | | // online: true, |
| | | // sourceType: v.sourceType |
| | | // }; |
| | | this.areaInfo = value |
| | | |
| | | this.checkResults.forEach((e) => { |
| | | e.fetch(); |
| | | }); |