riku
2024-01-10 54b5fa2047324b81b6d2ee7f830693267f946c0a
1. 编写数据源检查模块
已修改6个文件
已添加2个文件
146 ■■■■ 文件已修改
src/api/fysp/problemApi.js 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/fysp/userMapApi.js 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/fytz/complaintApi.js 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/index.js 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components.d.ts 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/fysp/evaluation/components/CompQuickSet.vue 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/fysp/evaluation/components/precheck/components/CompCheckArea.vue 25 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/fysp/evaluation/components/precheck/components/CompCheckSource.vue 68 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/fysp/problemApi.js
@@ -5,11 +5,16 @@
export default {
  /**
   * èŽ·å–å­ä»»åŠ¡ç»Ÿè®¡ä¿¡æ¯
   * é—®é¢˜å®¡æ ¸
   * @param {Number} action 0:问题通过;1:问题不通过;2:整改通过;3整改不通过
   */
  checkProblem({ pId, action, remark = '', userId = id, userName = name }) {
    const params = `?pId=${pId}&action=${action}&remark=${remark}&userId=${userId}&userName=${userName}`;
    return $fysp.post(`problemlist/check${params}`).then((res) => res.data);
  },
  fetchProblemType({ cityCode, districtCode, sceneTypeId }) {
    const params = `?taskTypeId=1&cityCode=${cityCode}&districtCode=${districtCode}&sceneTypeId=${sceneTypeId}`;
    return $fysp.get(`problemtype/search${params}`).then((res) => res.data);
  }
};
src/api/fysp/userMapApi.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,10 @@
import { $fysp } from '../index';
export default {
  /**
   * èŽ·å–åŒºåŸŸç”¨æˆ·çš„ç›‘æµ‹è®¾å¤‡å’Œé£žç¾½ç›‘ç®¡ç³»ç»Ÿã€é£žç¾½çŽ¯å¢ƒç³»ç»Ÿçš„åŒ¹é…è®°å½•
   */
  fetchDeviceMap(param) {
    return $fysp.post(`usermap/device`, param).then((res) => res.data);
  }
};
src/api/fytz/complaintApi.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,20 @@
import { $fytz } from '../index';
/**
 * ä¿¡è®¿æŠ•诉及行政处罚相关API接口
 */
export default {
  /**
   * èŽ·å–ä¿¡è®¿æŠ•è¯‰ä¿¡æ¯
   */
  fetchComplaints(param) {
    return $fytz.post(`complaint/find`, param).then((res) => res.data);
  },
  /**
   * èŽ·å–è¡Œæ”¿å¤„ç½šä¿¡æ¯
   */
  fetchPunishment(param) {
    return $fytz.post(`punishment/find`, param).then((res) => res.data);
  }
};
src/api/index.js
@@ -15,8 +15,6 @@
  // ip2_file = 'https://fyami.com.cn/';
}
// const ip2 = 'http://192.168.0.123:8080/';
//飞羽监管
const $fysp = axios.create({
  baseURL: ip1,
src/components.d.ts
@@ -46,6 +46,8 @@
    ElPageHeader: typeof import('element-plus/es')['ElPageHeader']
    ElPagination: typeof import('element-plus/es')['ElPagination']
    ElPopover: typeof import('element-plus/es')['ElPopover']
    ElRadioButton: typeof import('element-plus/es')['ElRadioButton']
    ElRadioGroup: typeof import('element-plus/es')['ElRadioGroup']
    ElRow: typeof import('element-plus/es')['ElRow']
    ElScrollbar: typeof import('element-plus/es')['ElScrollbar']
    ElSelect: typeof import('element-plus/es')['ElSelect']
src/views/fysp/evaluation/components/CompQuickSet.vue
@@ -33,7 +33,7 @@
              dName: '静安区',
            },
            scenetype: { label: '工地', value: '1' },
            sourcetype: false,
            sourceType: 2,
          },
          {
            name: '徐汇餐饮',
@@ -46,7 +46,7 @@
              dName: '徐汇区'
            },
            scenetype: { label: '餐饮', value: '5' },
            sourcetype: false,
            sourceType: 2,
          },
          {
            name: '金山工地',
@@ -59,7 +59,7 @@
              dName: '金山区'
            },
            scenetype: { label: '工地', value: '1' },
            sourcetype: false,
            sourceType: 2,
          },
          {
            name: '金山码头',
@@ -72,7 +72,7 @@
              dName: '金山区'
            },
            scenetype: { label: '码头', value: '2' },
            sourcetype: false,
            sourceType: 2,
          },
          {
            name: '金山搅拌站',
@@ -85,7 +85,7 @@
              dName: '金山区'
            },
            scenetype: { label: '搅拌站', value: '3' },
            sourcetype: false,
            sourceType: 2,
          },
          {
            name: '徐汇汽修',
@@ -98,7 +98,7 @@
              dName: '徐汇区'
            },
            scenetype: { label: '汽修', value: '7' },
            sourcetype: true,
            sourceType: 1,
          }
        ]
      }
src/views/fysp/evaluation/components/precheck/components/CompCheckArea.vue
@@ -21,7 +21,7 @@
            :allOption="false"
            :initValue="false"
            :sourceInit="sceneOptionSourceInit"
            :type="formObj.sourcetype ? 1 : 2"
            :type="formObj.sourceType"
            v-model:value="formObj._scenetype"
          ></FYOptionScene>
          <!-- æ—¶é—´ -->
@@ -31,9 +31,17 @@
            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-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 /> -->
@@ -92,6 +100,13 @@
            message: '时间不能为空',
            trigger: 'change'
          }
        ],
        sourceType: [
          {
            required: true,
            message: '主数据源必须选择',
            trigger: 'change'
          }
        ]
      },
      // å½“场景选项切换数据源时,是否清空当前选项值
@@ -103,7 +118,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);
src/views/fysp/evaluation/components/precheck/components/CompCheckSource.vue
@@ -62,6 +62,9 @@
<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';
/**
 * ç”Ÿæˆä¸€é¡¹æ•°æ®æºæ£€æŸ¥è®°å½•
@@ -98,21 +101,17 @@
  emits: ['update:modelValue'],
  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;
@@ -120,12 +119,39 @@
          },
          true
        ),
        baseCheckItem('现场监管巡查总任务', '', () => {}),
        // åŒºåŸŸèŒƒå›´å†…的监管任务是否存在
        baseCheckItem('现场监管巡查总任务', '', () => {
          return taskApi.fetchTopTasks(this.areaInfo).then((res) => {
            return res.data.length > 0;
          });
        }),
        // åŒºåŸŸèŒƒå›´å†…的监测数据是否存在、数据时间跨度是否完整、数据的初步分析是否完成
        baseCheckItem('现场监测数据', '', () => {}),
        baseCheckItem('监管点位与监测点匹配', '', () => {}),
        baseCheckItem('现场监管问题类型', '', () => {}),
        baseCheckItem('信访投诉', '', () => {}),
        baseCheckItem('行政处罚', '', () => {})
        // åŒºåŸŸèŒƒå›´å†…的每个监管点位与监测仪器的匹配记录是否存在,缺失情况等
        baseCheckItem('监管点位与监测点匹配', '', () => {
          userMapApi.fetchDeviceMap(this.areaInfo).then((res) => {
            return res.data.length > 0;
          });
        }),
        // åŒºåŸŸèŒƒå›´å†…的监管问题配置表是否存在
        baseCheckItem('现场监管问题类型', '', () => {
          const param = {
            cityCode: this.areaInfo.citycode,
            districtCode: this.areaInfo.districtcode,
            sceneTypeId: this.areaInfo.scensetypeid
          }
          problemApi.fetchProblemType(param).then((res) => {
            return res.length > 0;
          });
        }),
        // åŒºåŸŸèŒƒå›´å†…的信访投诉记录是否存在,可随时补充
        baseCheckItem('信访投诉', '', () => {
          complaintApi.fetchComplaints();
        }),
        // åŒºåŸŸèŒƒå›´å†…的行政处罚记录是否存在,可随时补充
        baseCheckItem('行政处罚', '', () => {
          complaintApi.fetchPunishment();
        })
      ]
    };
  },
@@ -162,8 +188,22 @@
      }
    },
    // å¼€å§‹æ£€æŸ¥ä»»åŠ¡
    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: v.time,
        scensetypeid: v._scenetype.value,
        online: true,
        sourceType: v.sourceType,
      };
      this.checkResults.forEach((e) => {
        e.fetch();
      });