hcong
2024-10-21 13272e92a6c98daad06aa166a6674bf4dac7cc4b
问题审核1021
已修改12个文件
已添加4个文件
879 ■■■■ 文件已修改
src/api/fysp/problemApi.js 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/dialog.css 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/main.css 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components.d.ts 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/fysp/check/ProCheck.vue 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/fysp/check/components/ArbitraryPhoto.vue 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/fysp/check/components/ComChangeEdit.vue 40 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/fysp/check/components/CompDevicePhono.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/fysp/check/components/CompDeviceShowTest.vue 378 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/fysp/check/components/CompLedgerPic.vue 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/fysp/check/components/CompProRecent.vue 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/fysp/check/components/CompProblemAddOrUpd.vue 70 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/fysp/check/components/CompProblemCard.vue 96 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/fysp/check/components/js/dataMonitorDeviceType.js 77 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/fysp/check/components/js/dataProductionDeviceType.js 67 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/fysp/check/components/js/dataTreatmentDeviceType.js 81 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/fysp/problemApi.js
@@ -45,5 +45,13 @@
  // ä¿®æ”¹æ•´æ”¹
  updateChange(data) {
    return $fysp.post(`problemlist/updateChange`, data).then((res) => res) 
  },
  // æ•´æ”¹ä¸Šä¼ 
  changeProblem(data) {
    return $fysp.post(`problemlist/changeProblem`, data).then((res) => res)
  },
  // é—®é¢˜åˆ é™¤
  deleteProblem({ pid }) {
    return $fysp.post(`problemlist/${pid}`).then((res) => res.data)
  }
};
}
src/assets/dialog.css
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,9 @@
::v-deep .el-dialog {
    --el-dialog-margin-top: 8vh;
}
::v-deep .el-dialog__body {
    padding: 0 var(--el-dialog-padding-primary) var(--el-dialog-padding-primary) var(--el-dialog-padding-primary);
}
::v-deep .el-drawer__body {
    padding: 0 var(--el-drawer-padding-primary);
}
src/assets/main.css
@@ -1,5 +1,6 @@
@import './base.css';
@import './button.css';
@import './dialog.css';
#app {
  /* background-color: rgb(212, 41, 41); */
src/components.d.ts
@@ -14,6 +14,7 @@
    Content: typeof import('./components/core/Content.vue')['default']
    ElAside: typeof import('element-plus/es')['ElAside']
    ElAvatar: typeof import('element-plus/es')['ElAvatar']
    ElBacktop: typeof import('element-plus/es')['ElBacktop']
    ElBadge: typeof import('element-plus/es')['ElBadge']
    ElBreadcrumb: typeof import('element-plus/es')['ElBreadcrumb']
    ElBreadcrumbItem: typeof import('element-plus/es')['ElBreadcrumbItem']
src/views/fysp/check/ProCheck.vue
@@ -63,11 +63,11 @@
    </ArbitraryPhoto>
  </el-dialog>
  <el-drawer
    :direction="rtl"
    direction="ltr"
    v-model="deviceShowDialog"
    :before-close="beforeDeviceShowDialogclose"
    title="设施设备"
    size="65%"
    size="45%"
  >
    <CompDeviceShowTest v-if="deviceShowDialog" ref="deviceShowRef"> </CompDeviceShowTest>
  </el-drawer>
@@ -311,12 +311,10 @@
        });
    },
    // é—®é¢˜å¡ç‰‡ç»„件主动发起刷新父组件数据
    updateSubtask(isOk) {
    updateSubtask() {
      this.curSubtask.data.proCheckedNum++;
      this.curSubtask.type = this.getSubtaskType(this.curSubtask.data);
      if (!isOk) {
        return;
      }
      this.refreshCurrSubtask();
    },
    onProSubmited(isOk) {
@@ -324,7 +322,7 @@
      if (!isOk) {
        return;
      }
      this.updateSubtask(isOk);
      this.updateSubtask();
    },
    newProSubmit(isOk) {
      this.proAddOrUpdDialogVisible = false;
src/views/fysp/check/components/ArbitraryPhoto.vue
@@ -268,7 +268,7 @@
}
.btns {
  height: 10%;
  /* height: 10%; */
}
/* 
.img_types {
@@ -283,7 +283,7 @@
} */
.imgs {
  height: 370px;
  height: 650px;
  width: 90%;
  min-height: 100px !important;
  /* border-style:solid;
@@ -352,7 +352,8 @@
  padding: 5px;
}
.el-dialog__body {
::v-deep .el-dialog__body {
  height: 60vh;
  padding: 10px calc(var(--el-dialog-padding-primary) + 10px) !important;
}
</style>
src/views/fysp/check/components/ComChangeEdit.vue
@@ -3,7 +3,7 @@
    <div class="t-card_item">
      æ•´æ”¹å›¾ç‰‡&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
      <div>
        <el-button @click="chosePicFromAnyPic">从任意图片选取</el-button>
        <!-- <el-button @click="chosePicFromAnyPic">从任意图片选取</el-button> -->
        <!-- <el-button type="primary" @click="chosePicFromLedgerPic">从台账选取</el-button> -->
        <el-button @click="choseChangePic">从文件夹选取</el-button>
      </div>
@@ -88,6 +88,9 @@
    }
  },
  props: {
    changeType: {
      type: Number
    },
    problemId: {
      type: String
    },
@@ -121,7 +124,7 @@
  },
  methods: {
    pictureValidate() {
      if (this.fileList.length < 1) {
      if (this.changeType == 1 && this.fileList.length < 1) {
        ElMessage({
          message: '至少上传一张图片',
          type: 'error'
@@ -132,11 +135,15 @@
          message: '超过三张, å·²åˆ é™¤å¤šå‡ºçš„图片',
          type: 'error'
        });
        this.fileList = this.fileList.slice(0, 3);
        return false;
      }
      return true;
    },
    initParams() {
      if (this.changeType == 0) {
        return;
      }
      let beforeEditImgList = [];
      useCloned(this.oldChangeFileList).cloned.value.forEach((oldChangeFileitem) => {
        if (oldChangeFileitem.ischanged == 1) {
@@ -178,15 +185,28 @@
      const that = this;
      let deleteImgCopy = this.deleteImg;
      fileUtil.getImageFiles(picUrls, function (files) {
        data.append('deleteImg', deleteImgCopy);
        data.append('problemId', that.problemId);
        files.forEach((image) => {
          data.append('images', image);
      if (this.changeType == 1) {
        fileUtil.getImageFiles(picUrls, function (files) {
          data.append('deleteImg', deleteImgCopy);
          data.append('problemId', that.problemId);
          files.forEach((image) => {
            data.append('images', image);
          });
          problemApi.updateChange(data).then((res) => {});
        });
        problemApi.updateChange(data).then((res) => {});
      });
      this.$emit('submited', true);
        that.$emit('submited', true);
      }else {
        fileUtil.getImageFiles(picUrls, function (files) {
          data.append('problemId', that.problemId);
          files.forEach((image) => {
            data.append('images', image);
          });
          problemApi.changeProblem(data).then((res) => {});
          that.$emit('submited', true);
        });
      }
    },
    beforeRemoveFile(file, fileList) {
      if (file.remark == '已上传') {
src/views/fysp/check/components/CompDevicePhono.vue
@@ -174,7 +174,7 @@
}
.btns {
  height: 10%;
  /* height: 10%; */
}
/* 
  .img_types {
@@ -189,7 +189,7 @@
  } */
.imgs {
  height: 370px;
  height: 650px;
  width: 90%;
  min-height: 100px !important;
  /* border-style:solid;
src/views/fysp/check/components/CompDeviceShowTest.vue
@@ -20,110 +20,124 @@
        </el-tabs>
      </el-col>
    </el-row>
    <el-collapse style="height: 100%" v-model="activeNames">
      <el-collapse-item v-for="item in formInfo" :name="item" style="height: 100%">
    <el-collapse v-model="activeNames" style="border: 4px">
      <el-collapse-item v-for="item in formInfo" :name="item.id" class="collapse-item-class">
        <!-- <div  v-if="activeNames.indexOf(item) !== -1" class="centerDiv">
            <el-button link type="primary" size="large">[点击缩放]</el-button>
          </div> -->
        <template #title>
          <!-- æ‘˜è¦å†…容开始 -->
          <div class="abstract_main" v-if="activeNames.indexOf(item) === -1">
            <span class="abstract_main_title">{{ item.name }}</span>
            <div class="abstract_other_item_inner">
              <!-- ä¾›åº”商 -->
              <div class="abstract_other_item">
                <span class="abstract_other_title">{{ `供应商` }}</span>
                <span class="abstract_main_text">{{ item.supplier || '无' }}</span>
              </div>
              <!-- è¿ç»´å•† -->
              <div class="abstract_other_item">
                <span class="abstract_other_title">{{ `运维商` }}</span>
                <span class="abstract_main_text">{{ item.maintainer || '无' }}</span>
              </div>
              <!-- è¿è¡ŒçŠ¶æ€ -->
              <div class="abstract_other_item">
                <span class="abstract_other_title">{{ `运行状态` }}</span>
                <span class="abstract_main_text">{{
                  getRunStatusValueByRunStatusKey(item.runningStatus) || '无'
                }}</span>
              </div>
          <div style="display: flex; width: 100%; justify-content: space-between">
            <div style="">
              <el-descriptions style="" :column="3" size="small" border>
                <el-descriptions-item width="64px" label="站点名称" :span="3">{{
                  item.name || '无'
                }}</el-descriptions-item>
                <el-descriptions-item label="供应商">{{
                  item.supplier || '无'
                }}</el-descriptions-item>
                <el-descriptions-item label="运维商">{{
                  item.maintainer || '无'
                }}</el-descriptions-item>
                <el-descriptions-item label="运维频次">
                  <el-select
                    v-model="item.maintainFrequency"
                    :disabled="isDisabled"
                    style="width: 150px"
                  >
                    <el-option
                      v-for="frequency of maintainFrequencysArray"
                      :key="frequency.key"
                      :label="frequency.value"
                      :value="frequency.key"
                    ></el-option>
                  </el-select>
                </el-descriptions-item>
                <el-descriptions-item label="运维人员">{{
                  item.maintainStaff || '无'
                }}</el-descriptions-item>
                <el-descriptions-item label="运维联系方式">{{
                  item.maintainTel || '无'
                }}</el-descriptions-item>
                <el-descriptions-item label="品牌型号">{{
                  item.brandModel || '无'
                }}</el-descriptions-item>
                <el-descriptions-item label="运行状态">
                  <el-select
                    v-model="item.runningStatus"
                    :disabled="isDisabled"
                    style="width: 150px"
                  >
                    <el-option
                      v-for="status of runStatusArray"
                      :key="status.key"
                      :label="status.value"
                      :value="status.key"
                    ></el-option>
                  </el-select>
                </el-descriptions-item>
              </el-descriptions>
              <!-- <div style="display: block">
              <span class="abstract_main_title">{{ `站点名称 ` }}</span>
              <span class="abstract_main_text">{{ item.name || '无' }}</span>
            </div> -->
            </div>
            <div style="display: flex">
              <!-- <div class="sub-title">{{ item.name }}</div> -->
              <!-- å›¾ç‰‡ -->
              <div class="image-container">
                <el-image
                  v-for="status in item._statusList"
                  fit="cover"
                  class="pic-style"
                  :src="status._picUrl"
                  :preview-src-list="Array.of(status._picUrl)"
                />
                <div
                  class="block-div"
                  @click="onClickPic($event)"
                  v-for="(status, index) in item._statusList"
                >
                  <el-image
                    v-if="index == 0"
                    fit="cover"
                    class="pic-style"
                    :src="status._picUrl"
                    :preview-src-list="Array.of(status._picUrl)"
                  />
                  <span class="abstract_pic_text" v-if="index == 0">{{
                    `最新状态图片 ${status.dlCreateTime.slice(0, 10)}`
                  }}</span>
                </div>
              </div>
            </div>
          </div>
          <div v-else class="centerDiv">
            <el-button link type="primary" size="large">[点击缩放]</el-button>
          </div>
          <!-- <el-descriptions class="margin-top" :title="item.name" :column="3" :size="size" border>
            <el-descriptions-item label="供应商">
              {{ item.supplier || '无' }}
            </el-descriptions-item>
            <el-descriptions-item label="运维商">
              {{ item.maintainer || '无' }}
            </el-descriptions-item>
            <el-descriptions-item label="运行状态">
              {{ getRunStatusValueByRunStatusKey(item.runningStatus) || '无' }}
            </el-descriptions-item>
          </el-descriptions> -->
          <!-- æ‘˜è¦å†…容开始 -->
          <!-- æ‘˜è¦å†…容结束 -->
        </template>
        <!-- è¯¦ç»†å†…容开始 -->
        <div class="sub-title">{{ item.name }}</div>
        <el-form :model="item" class="form_class">
          <!-- <el-form-item label="站点">
            <el-input v-model="item.name" :disabled="isDisabled"></el-input>
          </el-form-item> -->
          <el-form-item label="供应商">
            <el-input v-model="item.supplier" :disabled="isDisabled"></el-input>
          </el-form-item>
          <el-form-item label="运维商">
            <el-input v-model="item.maintainer" :disabled="isDisabled"></el-input>
          </el-form-item>
          <el-form-item label="运维频次">
            <el-select v-model="item.maintainFrequency" :disabled="isDisabled">
              <el-option
                v-for="frequency of maintainFrequencysArray"
                :key="frequency.key"
                :label="frequency.value"
                :value="frequency.key"
              ></el-option>
            </el-select>
          </el-form-item>
          <el-form-item label="运维人员">
            <el-input v-model="item.maintainStaff" :disabled="isDisabled"></el-input>
          </el-form-item>
          <el-form-item label="运维联系方式">
            <el-input v-model="item.maintainTel" :disabled="isDisabled"></el-input>
          </el-form-item>
          <el-form-item label="品牌型号">
            <el-input v-model="item.brandModel" :disabled="isDisabled"></el-input>
          </el-form-item>
          <el-form-item label="运行状态">
            <el-select v-model="item.runningStatus" :disabled="isDisabled">
              <el-option
                v-for="status of runStatusArray"
                :key="status.key"
                :label="status.value"
                :value="status.key"
              ></el-option>
            </el-select>
          </el-form-item>
          <el-form-item label="所有权">
            <el-select v-model="item.ownership" :disabled="isDisabled">
              <el-option
                v-for="ownership of ownershipArray"
                :key="ownership.key"
                :label="ownership.value"
                :value="ownership.key"
              ></el-option>
            </el-select>
          </el-form-item>
          <el-form-item label="状态">
            <el-tabs tab-position="top">
              <el-tab-pane v-for="(status, i) in item._statusList" :label="status.dlCreateTime.slice(0, 10)">
              <el-tab-pane
                v-for="(status, i) in item._statusList"
                :label="status.dlCreateTime.slice(0, 10)"
              >
                <el-form :model="status" class="form-class">
                  <el-form-item label="位置">
                    <el-input
                  <el-form-item label="位置" style="margin-bottom: 10px">
                    <!-- <el-input
                      style="width: 250px;"
                      v-model="status.dlLocation"
                      :disabled="isDisabled"
                      class="form-item-class"
                    ></el-input>
                    ></el-input> -->
                    {{ status.dlLocation }}
                  </el-form-item>
                  <el-form-item label="经度">
                  <!-- <el-form-item label="经度">
                    <el-input
                      v-model="status.dlLongitude"
                      :disabled="isDisabled"
@@ -136,15 +150,21 @@
                      :disabled="isDisabled"
                      class="form-item-class"
                    ></el-input>
                  </el-form-item>
                  <el-form-item>
                  </el-form-item> -->
                  <el-form-item label="图片">
                    <!-- å›¾ç‰‡ -->
                    <el-image
                      fit="cover"
                      class="pic-style"
                      :src="status._picUrl"
                      :preview-src-list="Array.of(status._picUrl)"
                    />
                    <el-space>
                      <div v-if="status._paths && status._paths.length > 0">
                        <el-image
                          v-for="path in status._paths"
                          fit="cover"
                          class="pic-style"
                          :src="path"
                          :preview-src-list="Array.of(path)"
                        />
                      </div>
                      <el-empty v-else></el-empty>
                    </el-space>
                  </el-form-item>
                </el-form>
              </el-tab-pane>
@@ -161,6 +181,9 @@
</template>
<script>
import dataMonitorDeviceTypeJs from './js/dataMonitorDeviceType.js';
import dataProductionDeviceTypeJs from './js/dataProductionDeviceType.js';
import dataTreatmentDeviceTypeJs from './js/dataTreatmentDeviceType.js';
import deviceApi from '@/api/fysp/deviceApi';
import { $fysp } from '@/api/index';
export default {
@@ -336,18 +359,16 @@
      // å°†ä¸€ä¸ªjs对象中所有di,wi,pi开头的属性全部改成去掉这些前缀并且重新变为驼峰式命名
      const newObj = {};
      for (const key in obj) {
        if (obj.hasOwnProperty(key)) {
          let newKey = key;
          if (key.startsWith('di')) {
            newKey = key.substring(2);
          } else if (key.startsWith('wi')) {
            newKey = key.substring(2);
          } else if (key.startsWith('pi')) {
            newKey = key.substring(2);
          }
          newKey = newKey.charAt(0).toLowerCase() + newKey.slice(1);
          newObj[newKey] = obj[key];
        let newKey = key;
        if (key.startsWith('di')) {
          newKey = key.substring(2);
        } else if (key.startsWith('wi')) {
          newKey = key.substring(2);
        } else if (key.startsWith('pi')) {
          newKey = key.substring(2);
        }
        newKey = newKey.charAt(0).toLowerCase() + newKey.slice(1);
        newObj[newKey] = obj[key];
      }
      return newObj;
    },
@@ -383,6 +404,7 @@
                  return;
                }
                element = this.convertKeys(result.data[index]);
                element = this.setDeviceType(element);
                element._picUrls = imgPaths;
                for (let index = 0; index < statusData.length; index++) {
                  const statusItem = statusData[index];
@@ -397,10 +419,36 @@
        }
      });
    },
    setDeviceType(element) {
      var type = [];
      switch (this.currSelect.topDeviceTypeId) {
        case 0:
          type = dataMonitorDeviceTypeJs.toLabel(element.sceneTypeId, Array.of(element.subtypeId));
          break;
        case 1:
          type = dataTreatmentDeviceTypeJs.toLabel(
            element.sceneTypeId,
            Array.of(element.subtypeId)
          );
          break;
        case 2:
          type = dataProductionDeviceTypeJs.toLabel(
            element.sceneTypeId,
            Array.of(element.subtypeId)
          );
          break;
      }
      if (type.length > 0) {
        element._typename = type[0];
      }
      return element;
    },
    // ä¿å­˜çŠ¶æ€ä¿¡æ¯
    saveStatus(device, status) {
      var _picUrl = $fysp.imgUrl + status.dlPicUrl;
      status._picUrl = _picUrl;
      status._paths = _picUrl.split(';');
      device._picUrls.push(_picUrl);
      if ('_statusList' in device) {
        device._statusList.push(status);
      } else {
@@ -416,34 +464,32 @@
    modifyObjectKeys(obj) {
      const newObj = {};
      for (const key in obj) {
        if (obj.hasOwnProperty(key)) {
          // è·³è¿‡ä»¥ 'dl' æˆ– '_' å¼€å¤´çš„属性
          if (key.startsWith('dl') || key.startsWith('_')) {
        // è·³è¿‡ä»¥ 'dl' æˆ– '_' å¼€å¤´çš„属性
        if (key.startsWith('dl') || key.startsWith('_')) {
          newObj[key] = obj[key];
          continue;
        }
        // æ ¹æ® topDeviceTypeId æ·»åŠ å‰ç¼€
        let prefix = '';
        switch (this.currSelect.topDeviceTypeId) {
          case 0:
            prefix = 'di';
            break;
          case 1:
            prefix = 'pi';
            break;
          case 2:
            prefix = 'wi';
            break;
          default:
            // å¦‚æžœ topDeviceTypeId ä¸æ˜¯ 0, 1, æˆ– 2,不添加前缀
            newObj[key] = obj[key];
            continue;
          }
          // æ ¹æ® topDeviceTypeId æ·»åŠ å‰ç¼€
          let prefix = '';
          switch (this.currSelect.topDeviceTypeId) {
            case 0:
              prefix = 'di';
              break;
            case 1:
              prefix = 'pi';
              break;
            case 2:
              prefix = 'wi';
              break;
            default:
              // å¦‚æžœ topDeviceTypeId ä¸æ˜¯ 0, 1, æˆ– 2,不添加前缀
              newObj[key] = obj[key];
              continue;
          }
          // æ·»åŠ å‰ç¼€å¹¶è½¬æ¢ä¸ºé©¼å³°å¼å‘½å
          const newKey = `${prefix}${key.charAt(0).toUpperCase() + key.slice(1)}`;
          newObj[newKey] = obj[key];
        }
        // æ·»åŠ å‰ç¼€å¹¶è½¬æ¢ä¸ºé©¼å³°å¼å‘½å
        const newKey = `${prefix}${key.charAt(0).toUpperCase() + key.slice(1)}`;
        newObj[newKey] = obj[key];
      }
      return newObj;
    },
@@ -457,14 +503,10 @@
    generateIDeviceTypesMap() {},
    // èŽ·å–å½“å‰topType,当前sceneTypeId下所有父类型
    getAlliDeviceParentTypeArray() {
      console.log('topDeviceTypeId', this.currSelect.topDeviceTypeId);
      var sceneTypeAndIDeviceTypesMap = this.iDeviceTypesMap.get(this.currSelect.topDeviceTypeId);
      if (!sceneTypeAndIDeviceTypesMap) {
        return '';
      }
      console.log('sceneTypeId', this.scene.typeid);
      console.log('scene', this.scene);
      var iDeviceTypesArray = sceneTypeAndIDeviceTypesMap.get(this.scene.typeid);
      if (!iDeviceTypesArray) {
@@ -475,7 +517,6 @@
    // èŽ·å–è®¾å¤‡ç±»åž‹ topDeviceTypeId, sceneTypeId å’Œ è‡ªèº«çš„一些参数
    getIDeviceParentTypeObj(device) {
      var iDeviceTypesArray = this.getAlliDeviceParentTypeArray();
      console.log('iDeviceTypesArray', this.getAlliDeviceParentTypeArray());
      var result;
      iDeviceTypesArray.forEach((e) => {
        if (e.value == device.typeId) {
@@ -486,10 +527,7 @@
    },
    // èŽ·å–è®¾å¤‡å­ç±»åž‹ topDeviceTypeId, sceneTypeId å’Œ è‡ªèº«çš„一些参数
    getIDeviceChildrenTypeObj(device) {
      console.log('device', device);
      var parentType = this.getIDeviceParentTypeObj(device);
      console.log('parentType', this.getIDeviceParentTypeObj(device));
      if (parentType == null || parentType == '' || !('children' in parentType)) {
        return '';
@@ -505,6 +543,9 @@
        }
      });
      return result;
    },
    onClickPic(e, item) {
      e.stopPropagation();
    }
  }
};
@@ -512,16 +553,17 @@
<style scoped>
.image-container {
  justify-content: flex-end;
  display: flex;
  flex-direction: row-reverse;
  width: 100%;
  height: 200px;
  overflow: hidden; /* ç¡®ä¿å›¾ç‰‡ä¸ä¼šè¶…出容器 */
  /* width: 300px; */
  /* flex-direction: row-reverse; */
  /* height: 225px; */
  /* overflow: hidden; ç¡®ä¿å›¾ç‰‡ä¸ä¼šè¶…出容器 */
}
.pic-style {
  width: 180px;
  height: 180px;
  margin-right: 5%;
  width: 150px;
  height: 150px;
  border-radius: 4px;
}
.card-style {
  height: 400px;
@@ -541,35 +583,61 @@
  border-radius: 50%;
}
.abstract_main {
  width: 100%;
  width: 98%;
}
.abstract_other_item {
.abstract_main_item {
  display: flex;
  flex-direction: column;
  margin-right: 50px;
  margin-top: 10px;
  width: 20%;
  /* width: 20%; */
}
.abstract_other_item {
  /* display: flex;
  flex-direction: column; */
  /* margin-left: 50px; */
  /* margin-top: 10px;
  width: 100vh; */
}
.abstract_main_item_inner {
  display: flex;
  justify-content: center;
}
.abstract_other_item_inner {
  margin-left: 10px;
  display: flex;
}
.abstract_main_title {
  margin-left: -400px;
  /* margin-left: -400px; */
  color: #303133;
  font-size: 16px;
}
.abstract_main_title {
  color: #606266;
  font-size: 13px;
  margin-top: 10px;
}
.abstract_other_title {
  color: #606266;
  font-size: 13px;
  margin-top: 45px;
}
.abstract_main_text {
  color: #303133;
  font-size: 17px;
  margin-top: 5px;
}
.abstract_pic_text {
  display: block;
  color: var(--el-text-color-secondary);
  font-size: 14px;
  /* margin-top: 20px; */
}
.block-div {
  display: block;
}
.form_class {
  margin-left: 10px;
  /* margin-left: 10px; */
}
.el-collapse {
@@ -590,4 +658,12 @@
  margin-bottom: 30px;
  margin-left: 20px;
}
.collapse-item-class {
  height: 100%;
  border: 5px;
}
::-webkit-scrollbar {
  height: 0;
}
</style>
src/views/fysp/check/components/CompLedgerPic.vue
@@ -38,9 +38,9 @@
  watch: {
    activeName: {
      handler(newObj, oldObj) {
        this.imgList = this.imgListAll.filter(item=>{
          return item.ledgerType == newObj
        })
        this.imgList = this.imgListAll.filter((item) => {
          return item.ledgerType == newObj;
        });
      },
      immediate: true
    }
@@ -120,7 +120,7 @@
</script>
<style scoped>
.imgs {
  height: 370px;
  height: 650px;
  width: 90%;
  min-height: 100px !important;
  /* border-style:solid;
@@ -181,7 +181,7 @@
  padding: 5px;
}
.btns {
  height: 10%;
  /* height: 10%; */
}
.center {
  display: flex;
src/views/fysp/check/components/CompProRecent.vue
@@ -22,7 +22,7 @@
          <el-table-column type="index" width="50" />
          <el-table-column prop="problemname" label="问题"/>
          <el-table-column prop="_time" label="时间" width="250" />
          <el-table-column prop="操作" label="操作" width="180">
          <el-table-column label="操作" width="180">
            <template v-slot="scope">
              <el-button link type="primary" @click="info(scope.row)">详情</el-button>
            </template>
@@ -86,7 +86,6 @@
    CompProblemAddOrUpd
  },
  mounted() {
    console.log('subtask', this.subtask);
    this.deepCopyPro = useCloned(this.problem).cloned.value;
    this.getRecentPros();
@@ -137,10 +136,7 @@
      // è®¡ç®—一年前的日期
      const oneYearAgo = new Date(today);
      oneYearAgo.setFullYear(today.getFullYear() - 1);
      console.log('today', this.$fm.formatYMDH(today));
      console.log('threeMonthsAgo', this.$fm.formatYMDH(threeMonthsAgo));
      console.log('sixMonthsAgo', this.$fm.formatYMDH(sixMonthsAgo));
      console.log('oneYearAgo', this.$fm.formatYMDH(oneYearAgo));
      return {
        startTime:
          this.activeName === '近三个月'
@@ -155,11 +151,11 @@
    /**
     * èŽ·å–è¿‘æœŸæƒ…å†µ
     * */
    getRecentPros() {
    async getRecentPros() {
      this.loading = true;
      this.subtaskCount = 0
      // èŽ·å–å­ä»»åŠ¡åˆ—è¡¨
      taskApi.getSubtaskByScene(this.generateQueryParam()).then((subtasks) => {
      await taskApi.getSubtaskByScene(this.generateQueryParam()).then((subtasks) => {
        this.curProList = [];
        if (subtasks) {
          subtasks.forEach((subtask) => {
@@ -167,15 +163,13 @@
            this.getProBySubtask(subtask);
          });
        }
      });
      // é¢å¤–处理
      console.log('curr', this.curProList);
      this.curProList.sort((o1, o2) => o2.getTime() - o1.getTime());
      this.loading = false;
    },
    // æ ¹æ®å­ä»»åŠ¡èŽ·å–é‡Œé¢çš„é—®é¢˜åˆ—è¡¨
    getProBySubtask(subtask) {
    async getProBySubtask(subtask) {
      taskApi.getProBySubtask(subtask.stGuid).then((pros) => {
        if (pros) {
          pros.forEach((pro) => {
src/views/fysp/check/components/CompProblemAddOrUpd.vue
@@ -83,7 +83,7 @@
        accept="image/*"
      >
        <el-button type="primary" id="uploadBtnId" style="display: none"></el-button>
        <el-icon>
        <el-icon v-show="fileList.length != 3">
          <Plus />
        </el-icon>
      </el-upload>
@@ -109,6 +109,7 @@
      </ArbitraryPhoto>
    </el-dialog>
    <el-dialog
      title="台账图片"
      width="80%"
      v-model="ledgerPicDialog"
      :before-close="beforeLedgerPicDialogclose"
@@ -141,7 +142,7 @@
      </CompDevicePhono>
    </el-dialog>
    <el-dialog v-model="previewDialogVisible">
      <img w-full :src="previewDialogImageUrl" alt="预览" class="preview-pic"/>
      <img w-full :src="previewDialogImageUrl" alt="预览" class="preview-pic" />
    </el-dialog>
  </div>
</template>
@@ -153,7 +154,7 @@
import { $fysp } from '@/api/index.js';
import fileUtil from '@/utils/fileUtils.js';
import { useCloned } from '@vueuse/core';
import { get, useCloned } from '@vueuse/core';
import { ElMessage } from 'element-plus';
import deviceApi from '@/api/fysp/deviceApi';
export default {
@@ -241,11 +242,13 @@
  computed: {
    descriptionOptions() {
      const descriptions = [];
      this.problemTypeList.forEach((item) => {
        if (item.typename == this.proType) {
          descriptions.push(item);
        }
      });
      return descriptions;
    },
    problemTypeOptions() {
@@ -258,9 +261,11 @@
      }, []);
    },
    adviseOptions() {
      var array = this.suggestions.filter((item) => item.adProblemtypeguid == this.currProTypeGuid);
      console.log('adName', array);
      var problemGuid = this.currProTypeGuid || this.problem.guid;
      console.log("problemGuid", problemGuid);
      var array = this.suggestions.filter((item) => item.adProblemtypeguid == problemGuid);
      console.log("array", array);
      return array;
    }
  },
@@ -311,12 +316,11 @@
        return new Date(x.dlCreateTime) - new Date(y.dlCreateTime); //    é™åºï¼Œå‡åºåˆ™åä¹‹
      });
    },
    getDeviceImgList() {
    async getDeviceImgList() {
      this.deviceImgObjList = [];
      this.deviceTopTypes.forEach(e => {
        const topTypeId = e.id;
        deviceApi.fetchDevices(this.subtask.sceneId, topTypeId).then((result) => {
      for (const deviceTopTypeElement of this.deviceTopTypes) {
        const topTypeId = deviceTopTypeElement.id;
        await deviceApi.fetchDevices(this.subtask.sceneId, topTypeId).then((result) => {
          // æ ‡å‡†åŒ–属性名
          for (let i = 0; i < result.data.length; i++) {
            var element = this.convertKeys(result.data[i]);
@@ -356,7 +360,7 @@
              .catch((err) => {});
          }
        });
      });
      }
    },
    initOptions() {
      if (this.problem == undefined || this.problem == null) {
@@ -423,10 +427,6 @@
      // é—®é¢˜å»ºè®®
      problemApi.getSuggestion().then((res) => {
        this.suggestions = res.data;
        // å¡«å……当前问题建议
        this.deepCopyProblem.advise = this.suggestions.filter(
          (item) => item.adProblemtypeguid == this.deepCopyProblem.guid
        )[0].adName;
      });
      // é—®é¢˜ä½ç½®
@@ -444,7 +444,7 @@
        this.oldFileList.filter((item) => item.url != file.url);
      }
    },
    handleLedgerPicPhono() {
    handleLedgerPicPhono(data) {
      this.beforeLedgerPicDialogclose();
      let isExist = false;
      for (const item of data) {
@@ -461,9 +461,6 @@
        }
        isExist = false;
      }
    },
    beforeLedgerPicDialogclose() {
      this.ledgerPicDialog = false;
    },
    findProTypeByGuid(guid) {
      let result;
@@ -493,11 +490,12 @@
      let currPro = this.findProTypeByGuid(value);
      this.deepCopyProblem.advise = '';
      this.currProTypeGuid = value;
      this.deepCopyProblem.description = currPro.description;
      // this.deepCopyProblem.description = currPro.description;
      this.changeProblemname();
      this.deepCopyProblem.advise = '';
      this.deepCopyProblem.advise = this.adviseOptions[0].adName;
      var adName = this.adviseOptions.length == 0 ? '' : this.adviseOptions[0].adName;
      this.deepCopyProblem.advise = adName;
    },
    onProLocationChange(value) {
      this.posList.forEach((item) => {
@@ -624,25 +622,6 @@
        isExist = false;
      }
    },
    handleLedgerPicPhono(data) {
      let isExist = false;
      for (const item of data) {
        for (const already of this.fileList) {
          if (item.url == already.url) {
            isExist = true;
          }
        }
        if (!isExist) {
          this.fileList.push({
            url: item.url,
            name: '1'
          });
        }
        isExist = false;
      }
      this.beforeAnyPhotoDialogclose();
    },
    chosePicFromAnyPic() {
      this.anyPhotoDialog = true;
    },
@@ -706,9 +685,13 @@
.row {
  width: 100%;
}
::v-deep .el-dialog {
  --el-dialog-margin-top: 2vh;
  height: 98vh;
}
::v-deep .el-dialog__body {
  width: 95%;
  height: 100%;
}
::v-deep .el-upload-list--picture-card .el-upload-list__item-thumbnail {
  object-fit: cover !important;
@@ -718,4 +701,7 @@
  width: 100%;
  height: 100%;
}
::v-deep .el-upload--picture-card {
  border: 0 !important;
}
</style>
src/views/fysp/check/components/CompProblemCard.vue
@@ -60,14 +60,7 @@
      <el-col :span="12">
        <el-row justify="start" class="btn-group">
          <el-button type="success" size="small" @click="updatePro" plain>问题更正</el-button>
          <el-button
            type="primary"
            size="small"
            @click="updateChange"
            plain
            :disabled="!proStatus.changeable"
            >整改检验</el-button
          >
          <el-button type="primary" size="small" @click="updateChange" plain>整改检验</el-button>
          <el-button type="info" size="small" @click="currProRecent" plain>问题复现</el-button>
        </el-row>
      </el-col>
@@ -86,14 +79,31 @@
      </el-col>
    </el-row>
  </el-card>
  <el-dialog v-model="proAddOrUpdDialogVisible" :before-close="proAddOrUpdDialogClose" width="80%">
    <CompProblemAddOrUpd
      v-if="proAddOrUpdDialogVisible"
      :problem="deepCopyPro"
      :subtask="deepCopySubtask"
      :topTask="deepCopyTopTask"
      ref="compProblemAddOrUpdRef"
      @submited="onProSubmited"
  <div class="dialog-wrapper">
    <el-dialog
      title="问题更正"
      width="80%"
      v-model="proAddOrUpdDialogVisible"
      :before-close="proAddOrUpdDialogClose"
    >
      <CompProblemAddOrUpd
        v-if="proAddOrUpdDialogVisible"
        :problem="deepCopyPro"
        :subtask="deepCopySubtask"
        :topTask="deepCopyTopTask"
        ref="compProblemAddOrUpdRef"
        @submited="onProSubmited"
      />
    </el-dialog>
  </div>
  <el-dialog width="80%" title="整改提交" v-model="addChangeDialogVisible">
    <ComChangeEdit
      :changeType="0"
      v-if="addChangeDialogVisible"
      :problemId="problem.guid"
      :subtask="subtask"
      :month="month"
      @submited="onAddChangeSubmited"
    />
  </el-dialog>
  <el-dialog
@@ -103,6 +113,7 @@
    :before-close="changeEditDialogClose"
  >
    <ComChangeEdit
      :changeType="1"
      v-if="changeEditDialogVisible"
      :problemId="problem.guid"
      :oldChangeFileList="problem.mediafileList"
@@ -118,11 +129,12 @@
    v-model="proRecentDialogVisible"
    :before-close="proRecentDialogClose"
  >
    <CompProRecent
      v-if="proRecentDialogVisible"
    <CompProRecent
      v-if="proRecentDialogVisible"
      :subtask="subtask"
      :topTask="topTask"
      :problem="problem"/>
      :problem="problem"
    />
  </el-dialog>
</template>
@@ -174,6 +186,7 @@
  emits: ['submit'],
  data() {
    return {
      addChangeDialogVisible: false,
      // è¿‘期情况
      proRecentDialogVisible: false,
      month: -1,
@@ -199,10 +212,7 @@
      ]
    };
  },
  mounted() {
    console.log(this.topTask);
  },
  mounted() {},
  computed: {
    // é—®é¢˜åç§°
    title() {
@@ -243,6 +253,10 @@
    }
  },
  methods: {
    onAddChangeSubmited() {
      this.$emit('updated', true);
      this.addChangeDialogVisible = false;
    },
    // è¿‘期情况弹窗关闭
    proRecentDialogClose() {
      this.proRecentDialogVisible = false;
@@ -255,8 +269,6 @@
      this.proAddOrUpdDialogVisible = false;
    },
    onChangeSubmited(isOk) {
      console.log("zhenggaisubmit");
      this.$emit('updated', isOk);
      this.changeEditDialogVisible = false;
    },
@@ -266,7 +278,23 @@
    changeEditDialogClose() {
      this.changeEditDialogVisible = false;
    },
    deletePro() {},
    deletePro() {
      useMessageBoxTip({
        confirmMsg: '是否删除问题',
        confirmTitle: '确定',
        onConfirm: () => {
          return problemApi
            .deleteProblem({
              pid: this.problem.guid
            })
            .then((res) => {
              if (res.success) {
                this.$emit('submit')
              }
            });
        }
      });
    },
    rejectPro() {
      this.checkPro(false);
    },
@@ -290,9 +318,10 @@
        }
      });
    },
    addChange() {
      this.addChangeDialogVisible = true;
    },
    updatePro() {
      console.log("clone", this.topTask);
      this.deepCopyPro = useCloned(this.problem).cloned.value;
      this.deepCopySubtask = useCloned(this.subtask).cloned.value;
      this.deepCopyTopTask = useCloned(this.topTask).cloned.value;
@@ -300,7 +329,7 @@
        this.proAddOrUpdDialogVisible = true;
      });
    },
    updateChange() {
    getCurrentMouth() {
      // ä½¿ç”¨Date对象解析日期字符串
      var date = new Date(this.subtask.subtask.planstarttime);
      // èŽ·å–æœˆä»½ä¿¡æ¯ï¼Œæœˆä»½æ˜¯ä»Ž0开始的,所以需要加1
@@ -311,7 +340,14 @@
      // èŽ·å–å¹´ä»½
      var year = date.getFullYear();
      this.month = `${year}-${this.month}`;
      this.changeEditDialogVisible = true;
    },
    updateChange() {
      this.getCurrentMouth();
      if (!this.problem.ischanged) {
        this.addChange();
      } else {
        this.changeEditDialogVisible = true;
      }
    },
    currProRecent() {
      this.proRecentDialogVisible = true;
src/views/fysp/check/components/js/dataMonitorDeviceType.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,77 @@
const dustDeviceType = [
  {
    label: '扬尘监测',
    value: '1',
    children: [
      {
        label: '扬尘监测',
        value: '1',
      },
    ],
  },
];
const fumeDeviceType = [
  {
    label: '油烟监测',
    value: '1',
    children: [
      {
        label: '油烟监测',
        value: '1',
      },
    ],
  },
];
const vocDeviceType = [
  {
    label: 'VOC监测',
    value: '1',
    children: [
      {
        label: 'VOC监测',
        value: '1',
      },
    ],
  },
];
// ç›‘测设备类型
function monitorDevices(sceneType) {
  switch (parseInt(sceneType)) {
    // å·¥åœ°,码头,搅拌站,堆场
    case 1:
    case 2:
    case 3:
    case 14:
      return dustDeviceType;
    // é¤é¥®
    case 5:
      return fumeDeviceType;
    // å·¥ä¸šä¼ä¸š,汽修
    case 4:
    case 6:
      return vocDeviceType;
    default:
      return dustDeviceType;
  }
}
function toLabel(sceneType, valueArr) {
  const labelArr = [];
  let options = monitorDevices(sceneType);
  valueArr.forEach(v => {
    if (options) {
      const op = options.find(o => {
        return (o.value + '') == (v + '');
      });
      labelArr.push(op.label);
      options = options[0].children;
    }
  });
  return labelArr;
}
export default { monitorDevices, toLabel };
src/views/fysp/check/components/js/dataProductionDeviceType.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,67 @@
const dustDeviceType = [
  {
    label: '非道',
    value: '1',
    children: [
      { label: '挖掘机', value: '1' },
      { label: '叉车', value: '2' },
      { label: '履带吊', value: '3' },
      { label: '铲车', value: '4' },
      { label: '发动机', value: '5' },
    ],
  },
];
const fumeDeviceType = [
  {
    label: '厨具',
    value: '1',
    children: [{ label: '厨具', value: '1' }],
  },
];
const vocDeviceType = [
  {
    label: 'VOC',
    value: '1',
    children: [{ label: 'VOC', value: '1' }],
  },
];
// ç”Ÿäº§è®¾å¤‡ç±»åž‹
function productionDevices(sceneType) {
  switch (parseInt(sceneType)) {
    // å·¥åœ°,码头,搅拌站,堆场
    case 1:
    case 2:
    case 3:
    case 14:
      return dustDeviceType;
    // é¤é¥®
    case 5:
      return fumeDeviceType;
    // å·¥ä¸šä¼ä¸š,汽修
    case 4:
    case 6:
      return vocDeviceType;
    default:
      return dustDeviceType;
  }
}
function toLabel(sceneType, valueArr) {
  const labelArr = [];
  let options = productionDevices(sceneType);
  valueArr.forEach(v => {
    if (options) {
      const op = options.find(o => {
        return (o.value + '') == (v + '');
      });
      labelArr.push(op.label);
      options = options.children;
    }
  });
  return labelArr;
}
export default { productionDevices, toLabel };
src/views/fysp/check/components/js/dataTreatmentDeviceType.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,81 @@
const dustDeviceType = [
  {
    label: '技防',
    value: '1',
    children: [
      { label: '环保洒水车(大型非电动)', value: '1' },
      { label: '电动雾炮车', value: '2' },
      { label: '电动洒水车(小型)', value: '3' },
      { label: '雾炮车(固定或轮式)', value: '4' },
      { label: '自动冲洗装置(封闭式)', value: '5' },
      { label: '高效洗轮机', value: '6' },
      { label: '高压水枪', value: '7' },
      { label: '普通水管或消防栓', value: '8' },
      { label: '塔吊喷淋', value: '9' },
      { label: '围墙喷淋', value: '10' },
      { label: '扬尘监测与喷淋联动', value: '11' },
      { label: '堆场喷淋', value: '12' },
      { label: '生产区喷淋', value: '13' },
    ],
  },
];
const fumeDeviceType = [
  {
    label: '净化',
    value: '1',
    children: [{ label: '油烟净化', value: '1' }],
  },
];
const vocDeviceType = [
  {
    label: '净化',
    value: '1',
    children: [{ label: '固废净化', value: '1' }],
  },
];
// æ²»ç†è®¾å¤‡ç±»åž‹
function treatmentDevices(sceneType) {
  switch (parseInt(sceneType)) {
    // å·¥åœ°,码头,搅拌站,堆场
    case 1:
    case 2:
    case 3:
    case 14:
      return dustDeviceType;
    // é¤é¥®
    case 5:
      return fumeDeviceType;
    // å·¥ä¸šä¼ä¸š,汽修
    case 4:
    case 6:
      return vocDeviceType;
    default:
      return dustDeviceType;
  }
}
function toLabel(sceneType, valueArr) {
  console.log("valueArr", valueArr)
  const labelArr = [];
  let options = treatmentDevices(sceneType);
  options = options[0].children
  console.log("options", options)
  valueArr.forEach(v => {
    if (options) {
      const op = options.find(o => {
        return (o.value + '') == (v + '');
      });
      console.log("op", op)
      labelArr.push(op.label);
      // options = options.children;
    }
  });
  console.log("labelArr", labelArr)
  return labelArr;
}
export default { treatmentDevices, toLabel };