riku
2024-03-21 5f20f4bba739f0f81101a2c1d99f494647125e05
2024.3.21
已修改13个文件
已重命名2个文件
216 ■■■■ 文件已修改
index.html 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/fysp/evaluateApi.js 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/index.js 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/constants/menu.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/router/index.js 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/test.js 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/time-util.js 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/baseinfo/fysp/user/CompUserInfo.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/fysp/config/ProblemType.vue 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/fysp/evaluation/EvalutationRecord.vue 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/fysp/evaluation/EvalutationTask.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/fysp/evaluation/components/precheck/CompPreCheck.vue 34 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/fysp/evaluation/components/precheck/components/CompCheckConfirm.vue 69 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/fysp/evaluation/components/precheck/components/CompCheckExemption.vue 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/fysp/evaluation/components/precheck/components/CompCheckSource.vue 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
index.html
@@ -4,7 +4,7 @@
    <meta charset="UTF-8">
    <link rel="icon" href="/favicon.ico">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Vite App</title>
    <title>生态环境线上监管</title>
  </head>
  <body>
    <div id="app"></div>
src/api/fysp/evaluateApi.js
@@ -26,7 +26,12 @@
    return $fysp
      .post(`evaluation/auto/record/download`, param, { responseType: 'blob' })
      .then((res) => {
        // return res.data;
        // æ–‡æ¡£æœªç”Ÿæˆï¼Œå·²å¯åŠ¨æ–‡æ¡£ç”ŸæˆåŽå°ä»»åŠ¡
        if (res.data.type == 'application/json') {
          return false
        }
        // æ–‡æ¡£å·²å­˜åœ¨ï¼Œç›´æŽ¥ä¸‹è½½
        else {
        const name = Base64.decode(res.headers.get('filename'));
        const url = window.URL.createObjectURL(res.data);
        const link = document.createElement('a');
@@ -36,6 +41,7 @@
        link.click();
        document.body.removeChild(link);
        window.URL.revokeObjectURL(url);
        }
      });
  },
  }
};
src/api/index.js
@@ -1,7 +1,7 @@
import axios from 'axios';
import { ElMessage } from 'element-plus';
const debug = true;
const debug = false;
let ip1 = 'http://47.100.191.150:9005/';
let ip1_file = 'http://47.100.191.150:9005/';
@@ -9,9 +9,9 @@
let ip2_file = 'https://fyami.com.cn/';
if (debug) {
  ip1 = 'http://192.168.1.9:8082/';
  ip1 = 'http://192.168.0.138:8082/';
  // ip1_file = 'http://47.100.191.150:9005/';
  ip2 = 'http://192.168.1.9:8080/';
  // ip2 = 'http://192.168.0.138:8080/';
  // ip2_file = 'https://fyami.com.cn/';
}
src/constants/menu.js
@@ -34,12 +34,12 @@
    name: '自动评估',
    children: [
      {
        path: '/fysp/evaluation/datasource',
        path: '/fysp/evaluation/evalutationTask',
        icon: 'MessageBox',
        name: '评估任务',
      },
      {
        path: '/fysp/evaluation/resultManage',
        path: '/fysp/evaluation/evalutationRecord',
        icon: 'Tickets',
        name: '评估记录',
      },
src/router/index.js
@@ -80,16 +80,16 @@
  },
  {
    //评估数据源
    name: 'fyspDatasource',
    path: '/fysp/evaluation/datasource',
    component: () => import('@/views/fysp/evaluation/DataSource.vue'),
    name: 'fyspEvalutationTask',
    path: '/fysp/evaluation/evalutationTask',
    component: () => import('@/views/fysp/evaluation/EvalutationTask.vue'),
    meta: { keepAlive: true }
  },
  {
    //评估管理
    name: 'fyspResultManage',
    path: '/fysp/evaluation/resultManage',
    component: () => import('@/views/fysp/evaluation/ResultManage.vue'),
    name: 'fyspEvalutationRecord',
    path: '/fysp/evaluation/evalutationRecord',
    component: () => import('@/views/fysp/evaluation/EvalutationRecord.vue'),
    meta: { keepAlive: true }
  },
  {
src/test.js
@@ -17,10 +17,13 @@
// }
let a = 4
let b = new Number(4)
let c = '4'
console.log(a == b);
console.log(a === b);
console.log(a == c);
console.log(b === c);
// let a = 4
// let b = new Number(4)
// let c = '4'
// console.log(a == b);
// console.log(a === b);
// console.log(a == c);
// console.log(b === c);
var val = 'smtg'
console.log('Value is' + ((val === 'smtg') ? 'Something' : 'Nothing'));
src/utils/time-util.js
@@ -13,6 +13,14 @@
    }
  },
  formatYM(date){
    if (date) {
      return this.format(date, 'YYYY-MM')
    } else {
      return '----/--'
    }
  },
  formatYMD(date){
    if (date) {
      return this.format(date, 'YYYY-MM-DD')
src/views/baseinfo/fysp/user/CompUserInfo.vue
@@ -136,7 +136,7 @@
function updateUser() {
  updateLoading.value = true;
  userApi.updateUser().finally(() => {
  userApi.updateUser(formObj.value).finally(() => {
    updateLoading.value = false;
  });
}
src/views/fysp/config/ProblemType.vue
@@ -1,5 +1,21 @@
<template>
  <div>ProblemType</div>
  <FYSearchBar @search="onSearch">
    <template #options>
      <!-- åŒºåŽ¿ -->
      <FYOptionLocation
        :allOption="false"
        :level="3"
        :checkStrictly="false"
        v-model:value="formSearch.locations"
      ></FYOptionLocation>
      <!-- åœºæ™¯ç±»åž‹ -->
      <FYOptionScene
        :allOption="false"
        :type="2"
        v-model:value="formSearch.scenetype"
      ></FYOptionScene>
    </template>
  </FYSearchBar>
</template>
<script>
@@ -7,7 +23,15 @@
  name: 'ProblemType',
  data() {
    return {
      formSearch: {
        locations: {},
        scenetype: {}
      }
    };
  },
  methods: {
    onSearch() {
      this.loading = true;
    }
  }
};
src/views/fysp/evaluation/EvalutationRecord.vue
ÎļþÃû´Ó src/views/fysp/evaluation/ResultManage.vue ÐÞ¸Ä
@@ -124,7 +124,7 @@
      this.$refs.tableRef.onSearch();
    },
    onSearch(page, func) {
      const area = this._getParam()
      const area = this._getParam();
      evaluateApi.fetchAutoEvaluation(area).then((res) => {
        if (typeof func === 'function') {
          func({ data: res.data });
@@ -135,10 +135,13 @@
      });
    },
    download() {
      const area = this._getParam()
      evaluateApi.downloadAutoEvaluation(area).then(res=>{
        this.$parent
      })
      const area = this._getParam();
      evaluateApi.downloadAutoEvaluation(area).then((res) => {
        if (res == false) {
          // æœªä¸‹è½½æ–‡æ¡£ï¼Œè€Œæ˜¯å¼€å¯äº†æ–‡æ¡£ç”ŸæˆåŽå°ä»»åŠ¡
          this.$parent;
        }
      });
    },
    getFilters(data) {
      const townList = [];
src/views/fysp/evaluation/EvalutationTask.vue
ÎļþÃû´Ó src/views/fysp/evaluation/DataSource.vue ÐÞ¸Ä
@@ -13,7 +13,7 @@
import CompEvaTask from './components/CompEvaTask.vue';
import CompPreCheck from './components/precheck/CompPreCheck.vue';
export default {
  name: 'DataSource',
  name: 'EvalutationTask',
  components: { CompPreCheck, CompEvaTask },
  data() {
    return {};
src/views/fysp/evaluation/components/precheck/CompPreCheck.vue
@@ -6,12 +6,23 @@
    <el-step title="自动评估" />
  </el-steps>
  <CompCheckArea v-show="stepIndex == 0" v-model="stepIndex" @change="onAreaChange"></CompCheckArea>
  <CompCheckSource v-show="stepIndex == 1" v-model="stepIndex" ref="refSource"></CompCheckSource>
  <CompCheckExemption v-show="stepIndex == 2" v-model="stepIndex"></CompCheckExemption>
  <CompCheckSource
    v-show="stepIndex == 1"
    v-model="stepIndex"
    ref="refSource"
    @change="onDataSourceChange"
  ></CompCheckSource>
  <CompCheckExemption
    v-show="stepIndex == 2"
    v-model="stepIndex"
    @change="onExemptionChange"
  ></CompCheckExemption>
  <CompCheckConfirm
    v-show="stepIndex == 3"
    v-model="stepIndex"
    :area-info="area"
    :data-source="dataSource"
    :exemption-items="exemptionItems"
    @start="onNewTask"
  ></CompCheckConfirm>
</template>
@@ -35,7 +46,13 @@
    return {
      // æ“ä½œæ­¥éª¤ä¸‹æ ‡
      stepIndex: 0,
      area: {}
      area: {
        _locations: {},
        _scenetype: {}
      },
      dataSource: {},
      // è±å…æ¡ç›®
      exemptionItems: {}
    };
  },
  methods: {
@@ -44,7 +61,8 @@
     */
    onAreaChange(val) {
      const v = val.value;
      this.area = {
      this.area = v;
      const a = {
        provincecode: v._locations.pCode,
        provincename: v._locations.pName,
        citycode: v._locations.cCode,
@@ -58,7 +76,13 @@
        online: true,
        sourceType: v.sourceType
      };
      this.$refs.refSource.startCheck(this.area);
      this.$refs.refSource.startCheck(a);
    },
    onDataSourceChange(val) {
      this.dataSource = val;
    },
    onExemptionChange(val) {
      this.exemptionItems = val;
    },
    /**
     * è‡ªåŠ¨è¯„ä¼°å‰ç½®åˆè§„æ€§æ£€æŸ¥
src/views/fysp/evaluation/components/precheck/components/CompCheckConfirm.vue
@@ -4,9 +4,41 @@
      <div><el-text tag="b" size="large">自动评估确认</el-text></div>
      <el-text size="small" type="info">最终确认自动评估各配置项,并开始自动评估</el-text>
    </template>
    <div>评估范围</div>
    <div>评估数据源完整度</div>
    <div>是否有豁免条目</div>
    <el-form label-width="160px" label-position="left">
      <div class="m-b-16"><el-text tag="b" size="large">评估范围</el-text></div>
      <el-form-item label="区域">
        <el-text size="default">{{ areaInfo._locations.pName }}</el-text>
        <el-text size="default">{{ areaInfo._locations.cName }}</el-text>
        <el-text size="default">{{ areaInfo._locations.dName }}</el-text>
        <el-text size="default">{{ areaInfo.starttime }}</el-text>
      </el-form-item>
      <el-form-item label="时间">
        <el-text size="default">{{ $fm.formatYM(areaInfo.time) }}</el-text>
      </el-form-item>
      <el-form-item label="场景">
        <el-text size="default">{{ areaInfo._scenetype.label }}</el-text>
      </el-form-item>
      <el-divider />
      <div class="m-b-16"><el-text tag="b" size="large">评估数据源完整度</el-text></div>
      <el-form-item :label="v.name" v-for="v in dataSource" :key="v.name">
        <template v-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-form-item>
      <el-divider />
      <div class="m-b-16"><el-text tag="b" size="large">豁免条目</el-text></div>
      <div class="m-b-16"><el-text size="default">无豁免条目</el-text></div>
    </el-form>
    <template #footer>
      <el-row justify="space-around">
        <el-button type="primary" size="default" @click="lastStep">上一步</el-button>
@@ -27,7 +59,19 @@
    // æ­¥éª¤ä¸‹æ ‡
    modelValue: Number,
    // åŒºåŸŸä¿¡æ¯
    areaInfo: Object
    areaInfo: {
      type: Object,
      default: () => {
        return {
          _locations: {},
          _scenetype: {}
        };
      }
    },
    // æ•°æ®æºå®Œæ•´åº¦æƒ…况
    dataSource: Array,
    // æ¡ç›®è±å…æƒ…况
    exemptionItems: Array
  },
  emits: ['update:modelValue', 'start'],
  data() {
@@ -36,7 +80,22 @@
  methods: {
    // å¼€å¯è‡ªåŠ¨è¯„ä¼°ä»»åŠ¡
    startEvaluate() {
      evaluateApi.autoEvaluate(this.areaInfo).then((res) => {
      const v = this.areaInfo
      const a = {
        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
      };
      evaluateApi.autoEvaluate(a).then((res) => {
        this.$emit('start', res.data);
      });
    },
src/views/fysp/evaluation/components/precheck/components/CompCheckExemption.vue
@@ -23,15 +23,17 @@
    // æ­¥éª¤ä¸‹æ ‡
    modelValue: Number
  },
  emits: ['update:modelValue'],
  emits: ['update:modelValue', 'change'],
  data() {
    return {
      // è±å…æ¡ç›®
      exemptionItems: []
    };
  },
  methods: {
    // è·³è½¬ä¸‹ä¸€æ­¥
    nextStep() {
      this.$emit('change', this.exemptionItems);
      this.$emit('update:modelValue', this.modelValue + 1);
    },
    // è·³è½¬ä¸‹ä¸€æ­¥
src/views/fysp/evaluation/components/precheck/components/CompCheckSource.vue
@@ -108,7 +108,7 @@
    // æ­¥éª¤ä¸‹æ ‡
    modelValue: Number
  },
  emits: ['update:modelValue'],
  emits: ['update:modelValue', 'change'],
  data() {
    return {
      areaInfo: {},
@@ -223,6 +223,7 @@
  methods: {
    // è·³è½¬ä¸‹ä¸€æ­¥
    nextStep() {
      this.$emit('change', this.checkResults);
      this.$emit('update:modelValue', this.modelValue + 1);
    },
    // è·³è½¬ä¸Šä¸€æ­¥