hcong
2024-11-12 2527a643d7ac70c7a4742b297972d46c8b1495a4
问题审核bug修改
已修改8个文件
564 ■■■■■ 文件已修改
src/components.d.ts 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/fysp/check/ProCheck.vue 53 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/fysp/check/components/ArbitraryPhoto.vue 98 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/fysp/check/components/ComChangeEdit.vue 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/fysp/check/components/CompDeviceShowTest.vue 238 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/fysp/check/components/CompLedgerPic.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/fysp/check/components/CompProRecent.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/fysp/check/components/CompProblemAddOrUpd.vue 122 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components.d.ts
@@ -12,32 +12,23 @@
    BasePanelLayout: typeof import('./components/core/BasePanelLayout.vue')['default']
    CompQuickSet: typeof import('./components/search-option/CompQuickSet.vue')['default']
    Content: typeof import('./components/core/Content.vue')['default']
    ElAffix: typeof import('element-plus/es')['ElAffix']
    ElAside: typeof import('element-plus/es')['ElAside']
    ElAvatar: typeof import('element-plus/es')['ElAvatar']
    ElBadge: typeof import('element-plus/es')['ElBadge']
    ElBreadcrumb: typeof import('element-plus/es')['ElBreadcrumb']
    ElBreadcrumbItem: typeof import('element-plus/es')['ElBreadcrumbItem']
    ElButton: typeof import('element-plus/es')['ElButton']
    ElButtonGroup: typeof import('element-plus/es')['ElButtonGroup']
    ElCalendar: typeof import('element-plus/es')['ElCalendar']
    ElCard: typeof import('element-plus/es')['ElCard']
    ElCascader: typeof import('element-plus/es')['ElCascader']
    ElCheckbox: typeof import('element-plus/es')['ElCheckbox']
    ElCol: typeof import('element-plus/es')['ElCol']
    ElCollapse: typeof import('element-plus/es')['ElCollapse']
    ElCollapseItem: typeof import('element-plus/es')['ElCollapseItem']
    ElConfigProvider: typeof import('element-plus/es')['ElConfigProvider']
    ElContainer: typeof import('element-plus/es')['ElContainer']
    ElDatePicker: typeof import('element-plus/es')['ElDatePicker']
    ElDescriptions: typeof import('element-plus/es')['ElDescriptions']
    ElDescriptionsItem: typeof import('element-plus/es')['ElDescriptionsItem']
    ElDialog: typeof import('element-plus/es')['ElDialog']
    ElDivider: typeof import('element-plus/es')['ElDivider']
    ElDrawer: typeof import('element-plus/es')['ElDrawer']
    ElDropdown: typeof import('element-plus/es')['ElDropdown']
    ElDropdownItem: typeof import('element-plus/es')['ElDropdownItem']
    ElDropdownMenu: typeof import('element-plus/es')['ElDropdownMenu']
    ElEmpty: typeof import('element-plus/es')['ElEmpty']
    ElForm: typeof import('element-plus/es')['ElForm']
    ElFormItem: typeof import('element-plus/es')['ElFormItem']
@@ -45,37 +36,25 @@
    ElIcon: typeof import('element-plus/es')['ElIcon']
    ElImage: typeof import('element-plus/es')['ElImage']
    ElInput: typeof import('element-plus/es')['ElInput']
    ElInputNumber: typeof import('element-plus/es')['ElInputNumber']
    ElLink: typeof import('element-plus/es')['ElLink']
    ElMain: typeof import('element-plus/es')['ElMain']
    ElMenu: typeof import('element-plus/es')['ElMenu']
    ElMenuItem: typeof import('element-plus/es')['ElMenuItem']
    ElMenuItemGroup: typeof import('element-plus/es')['ElMenuItemGroup']
    ElOption: typeof import('element-plus/es')['ElOption']
    ElPageHeader: typeof import('element-plus/es')['ElPageHeader']
    ElPagination: typeof import('element-plus/es')['ElPagination']
    ElPopconfirm: typeof import('element-plus/es')['ElPopconfirm']
    ElPopover: typeof import('element-plus/es')['ElPopover']
    ElRadio: typeof import('element-plus/es')['ElRadio']
    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']
    ElSegmented: typeof import('element-plus/es')['ElSegmented']
    ElSelect: typeof import('element-plus/es')['ElSelect']
    ElSpace: typeof import('element-plus/es')['ElSpace']
    ElStep: typeof import('element-plus/es')['ElStep']
    ElSteps: typeof import('element-plus/es')['ElSteps']
    ElSubMenu: typeof import('element-plus/es')['ElSubMenu']
    ElSwitch: typeof import('element-plus/es')['ElSwitch']
    ElTable: typeof import('element-plus/es')['ElTable']
    ElTableColumn: typeof import('element-plus/es')['ElTableColumn']
    ElTabPane: typeof import('element-plus/es')['ElTabPane']
    ElTabs: typeof import('element-plus/es')['ElTabs']
    ElTag: typeof import('element-plus/es')['ElTag']
    ElText: typeof import('element-plus/es')['ElText']
    ElTooltip: typeof import('element-plus/es')['ElTooltip']
    ElTransfer: typeof import('element-plus/es')['ElTransfer']
    ElTree: typeof import('element-plus/es')['ElTree']
    ElUpload: typeof import('element-plus/es')['ElUpload']
    Footer: typeof import('./components/core/Footer.vue')['default']
src/views/fysp/check/ProCheck.vue
@@ -8,7 +8,11 @@
      </SearchBar>
    </template>
    <template #aside>
      <SideList :items="subtasks" :loading="sideLoading" @item-click="chooseSubtask"></SideList>
      <SideList
        :items="subtasks"
        :loading="sideLoading"
        @item-click="chooseSubtask"
      ></SideList>
    </template>
    <template #main>
      <ToolBar
@@ -17,7 +21,11 @@
        :buttons="buttons"
        :loading="mainLoading"
      ></ToolBar>
      <el-scrollbar v-if="curProList.length > 0" class="el-scrollbar" v-loading="mainLoading">
      <el-scrollbar
        v-if="curProList.length > 0"
        class="el-scrollbar"
        v-loading="mainLoading"
      >
        <CompProblemCard
          v-if="compProblemCardVisible"
          :key="i"
@@ -47,21 +55,14 @@
      @submited="newProSubmit"
    />
  </el-dialog>
  <el-dialog
    v-model="anyPhotoDialog"
    :before-close="beforeAnyPhotoDialogclose"
    width="80%"
    title="任意图片"
  >
    <ArbitraryPhoto
      v-if="anyPhotoDialog"
    v-model:dialog-visible="anyPhotoDialog"
    title="场景图片"
      :readonly="true"
      :subtask="curSubtask.data"
      ref="arbitraryPhotoRef"
      @selectByAnyPhonoEvent="handleCloseCheckAnyPhono"
    >
    </ArbitraryPhoto>
  </el-dialog>
  ></ArbitraryPhoto>
  <el-drawer
    direction="ltr"
    v-model="deviceShowDialog"
@@ -69,7 +70,8 @@
    title="设施设备"
    size="45%"
  >
    <CompDeviceShowTest v-if="deviceShowDialog" ref="deviceShowRef"> </CompDeviceShowTest>
    <CompDeviceShowTest v-if="deviceShowDialog" ref="deviceShowRef">
    </CompDeviceShowTest>
  </el-drawer>
</template>
@@ -77,14 +79,9 @@
import ArbitraryPhoto from './components/ArbitraryPhoto.vue';
import taskApi from '@/api/fysp/taskApi';
import ProCheckProxy from './ProCheckProxy';
import { ElMessageBox, ElNotification, ElMessage } from 'element-plus';
import CompProblemAddOrUpd from './components/CompProblemAddOrUpd.vue';
import CompDeviceShow from './components/CompDeviceShow.vue';
import CompProblemCard from './components/CompProblemCard.vue';
import CompSubTaskStatistic from './components/CompSubTaskStatistic.vue';
import CompProRecent from './components/CompProRecent.vue';
import CompDeviceShowTest from './components/CompDeviceShowTest.vue';
export default {
  components: {
@@ -92,8 +89,7 @@
    CompSubTaskStatistic,
    CompProblemAddOrUpd,
    ArbitraryPhoto,
    CompDeviceShowTest,
    CompProRecent
    CompDeviceShowTest
  },
  data() {
    return {
@@ -126,7 +122,7 @@
          }
        },
        {
          name: '任意图片',
          name: '场景图片',
          color: 'warning',
          click: () => {
            this.anyPhotoDialog = true;
@@ -139,11 +135,11 @@
            this.openDeviceShowDialog();
          }
        },
        {
          name: '批量审核',
          color: 'primary',
          click: () => {}
        }
        // {
        //   name: '批量审核',
        //   color: 'primary',
        //   click: () => {}
        // }
      ]
    };
  },
@@ -239,7 +235,7 @@
    // 关闭设备图弹窗
    beforeDeviceShowDialogclose(done) {
      // this.deviceShowDialog = false;
      done()
      done();
    },
    // 关闭任意图片弹窗
    beforeAnyPhotoDialogclose() {
@@ -261,7 +257,7 @@
      const param = {
        topTaskId: formSearch.topTask.tguid, 
        sceneTypeId :formSearch.sceneTypeId
      }
      };
      taskApi.getSubtaskSummary(param).then((res) => {
        const list = [];
        res.forEach((s) => {
@@ -312,7 +308,6 @@
    },
    // 问题卡片组件主动发起刷新父组件数据
    updateSubtask() {
      this.curSubtask.data.proCheckedNum++;
      this.curSubtask.type = this.getSubtaskType(this.curSubtask.data);
      this.refreshCurrSubtask();
src/views/fysp/check/components/ArbitraryPhoto.vue
@@ -1,52 +1,10 @@
<template>
  <div class="main">
    <el-row justify="end" class="btns" v-if="!readonly">
      <el-text size="small" type="info" class="m-r-8"
        >最多选择{{ maxSelect }}张图片</el-text
      >
      <el-button
        size="small"
        type="primary"
        @click="sendSelectedImg(true)"
        :disabled="selectedImgUrlList.length == 0"
        >确定</el-button
      >
      <el-button size="small" type="primary" @click="sendSelectedImg(false)"
        >取消</el-button
      >
    </el-row>
    <div class="center">
      <!-- <el-descriptions>
        <el-descriptions-item label="总数">
          <span>{{ this.imgUrlList.length }}</span>
        </el-descriptions-item>
      </el-descriptions> -->
      <el-tabs v-model="activeId" type="card">
        <el-tab-pane
          v-for="item in typeList"
          :key="item.businesstypeid"
          :label="
            item.businesstype + ' (' + typeImgMap.get(item.businesstypeid).length + ')'
          "
          :name="item.businesstypeid"
        >
        </el-tab-pane>
      </el-tabs>
      <el-empty v-if="isEmpty" description="暂无记录" />
      <el-scrollbar v-else class="imgs">
        <el-image
          v-for="(img, i) in typeImgMap.get(activeId)"
          :key="i"
          :class="[Boolean(img.isSelect) ? 'selected' : 'noActive', 'image']"
          fit="cover"
          :src="img.url"
          lazy
          @click="onSelect(img, i)"
        />
      </el-scrollbar>
    </div>
  </div>
  <FYImageSelectDialog
    :typeList="typesList"
    :typeImgMap="typesMap"
    :readonly="readonly"
    :maxSelect="3"
  ></FYImageSelectDialog>
</template>
<script>
import problemApi from '@/api/fysp/problemApi.js';
@@ -81,6 +39,8 @@
  data() {
    return {
      // 无数据
      typesList: [],
      typesMap: new Map(),
      isEmpty: false,
      isClose: false,
      isAll: false,
@@ -138,15 +98,55 @@
            }
          });
        });
      },
      }
    }
  },
  mounted() {
    // if (this.subtask) {
    //   this.getAllImgList();
    // }
    this.getGroupImgs();
  },
  methods: {
    onImageSelectSubmit(value) {
      this.$emit('selectByAnyPhonoEvent', value);
    },
    // 图片分类
    getGroupImgs() {
      mediafileApi.getRoutineByStGuid(this.subtask.stGuid).then((res) => {
        let typeList = [];
        let typeMap = new Map();
        function hasThisTypeName(typeName) {
          return typeList.map((item) => item.typeName).indexOf(typeName) != -1;
        }
        function addNewType(typeId, typeName, img) {
          typeList.push({
            typeId: typeId,
            typeName: typeName
          });
          typeMap.set(typeId, [img]);
        }
        function addToThisType(typeId, img) {
          typeMap.get(typeId).push(img);
        }
        const data = res.data;
        for (const e of data) {
          let img = {
            url: $fysp.imgUrl + e.extension1 + e.guid + '.jpg'
          };
          const businesstype = e.businesstype;
          const businesstypeid = e.businesstypeid;
          if (hasThisTypeName(businesstype)) {
            addToThisType(businesstypeid, img);
          } else {
            addNewType(businesstypeid, businesstype, img);
          }
        }
        this.typesList = typeList;
        this.typesMap = typeMap;
      });
    },
    // 初始化刚开始选中的标签
    initSelectedTab() {
      if (this.typeList.length > 0) {
src/views/fysp/check/components/ComChangeEdit.vue
@@ -21,7 +21,11 @@
      :disabled="readonly"
      accept="image/*"
    >
      <el-button type="primary" id="uploadBtnId" style="display: none"></el-button>
      <el-button
        type="primary"
        id="uploadBtnId"
        style="display: none"
      ></el-button>
      <el-icon>
        <Plus />
      </el-icon>
@@ -30,21 +34,16 @@
      <el-button type="primary" @click="onSubmit">保存</el-button>
      <el-button @click="this.$emit('submited', false)">取消</el-button>
    </div>
    <el-dialog
      title="任意图片"
      width="80%"
      v-model="anyPhotoDialog"
      :before-close="beforeAnyPhotoDialogclose"
    >
      <ArbitraryPhoto
      :max-select="3"
        v-if="anyPhotoDialog"
      v-model:dialog-visible="anyPhotoDialog"
        @selectByAnyPhonoEvent="handleSelectedAnyPhono"
        :subtask="subtask"
        :defaultFile="fileList"
        ref="arbitraryPhotoRef"
      >
      </ArbitraryPhoto>
    </el-dialog>
    <el-dialog
      title="台账图片"
      width="80%"
@@ -145,14 +144,19 @@
        return;
      }
      let beforeEditImgList = [];
      useCloned(this.oldChangeFileList).cloned.value.forEach((oldChangeFileitem) => {
      useCloned(this.oldChangeFileList).cloned.value.forEach(
        (oldChangeFileitem) => {
        if (oldChangeFileitem.ischanged == 1) {
          oldChangeFileitem.url =
            $fysp.imgUrl + oldChangeFileitem.extension1 + oldChangeFileitem.guid + '.jpg';
              $fysp.imgUrl +
              oldChangeFileitem.extension1 +
              oldChangeFileitem.guid +
              '.jpg';
          oldChangeFileitem.name = '1';
          beforeEditImgList.push(oldChangeFileitem);
        }
      });
        }
      );
      this.fileList = useCloned(beforeEditImgList).cloned.value;
      this.oldFileList = useCloned(beforeEditImgList).cloned.value;
    },
src/views/fysp/check/components/CompDeviceShowTest.vue
@@ -3,14 +3,22 @@
    <!-- 选项 -->
    <!-- 设备类型  -->
    <el-row>
      <!-- <el-col>
        <span>设备类型:</span>
      </el-col> -->
      <el-col>
        <el-tabs class="child_select" placeholder="设备类型" v-model="currSelect.topDeviceTypeId">
          <el-tab-pane v-for="item in deviceTopTypes" :name="item.id">
        <el-tabs
          class="child_select"
          placeholder="设备类型"
          v-model="currSelect.topDeviceTypeId"
        >
          <el-tab-pane
            v-for="item in deviceTopTypes"
            :key="item.id"
            :name="item.id"
          >
            <template #label>
              <el-badge :value="item.count" :type="item.count == 0 ? 'danger' : 'primary'">
              <el-badge
                :value="item.count"
                :type="item.count == 0 ? 'danger' : 'primary'"
              >
                <span class="custom-tabs-label">
                  <span>{{ item.label }}</span>
                </span>
@@ -21,12 +29,16 @@
      </el-col>
    </el-row>
    <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> -->
      <el-collapse-item
        v-for="item in formInfo"
        :key="item.id"
        :name="item.id"
        class="collapse-item-class"
      >
        <template #title>
          <div style="display: flex; width: 100%; justify-content: space-between">
          <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">{{
@@ -75,11 +87,10 @@
                    ></el-option>
                  </el-select>
                </el-descriptions-item>
                <el-descriptions-item label="类型">
                  {{ item._typename || '无' }}
                </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">
@@ -90,6 +101,7 @@
                  class="block-div"
                  @click="onClickPic($event)"
                  v-for="(status, index) in item._statusList"
                  :key="index"
                >
                  <el-image
                    v-if="index == 0"
@@ -105,19 +117,6 @@
              </div>
            </div>
          </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>
        <!-- 详细内容开始 -->
        <el-form :model="item" class="form_class">
@@ -126,41 +125,23 @@
              <el-tab-pane
                v-for="(status, i) in item._statusList"
                :label="status.dlCreateTime.slice(0, 10)"
                :key="i"
              >
                <el-form :model="status" class="form-class">
                  <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> -->
                    {{ status.dlLocation }}
                  </el-form-item>
                  <!-- <el-form-item label="经度">
                    <el-input
                      v-model="status.dlLongitude"
                      :disabled="isDisabled"
                      class="form-item-class"
                    ></el-input>
                  </el-form-item>
                  <el-form-item label="纬度">
                    <el-input
                      v-model="status.dlLatitude"
                      :disabled="isDisabled"
                      class="form-item-class"
                    ></el-input>
                  </el-form-item> -->
                  <el-form-item label="图片">
                    <!-- 图片 -->
                    <el-space>
                      <div v-if="status._paths && status._paths.length > 0">
                        <el-image
                          v-for="path in status._paths"
                          v-for="(path, i) in status._paths"
                          fit="cover"
                          class="pic-style"
                          :src="path"
                          :preview-src-list="Array.of(path)"
                          :key="i"
                        />
                      </div>
                      <el-empty v-else></el-empty>
@@ -171,7 +152,6 @@
            </el-tabs>
          </el-form-item>
        </el-form>
        <el-divider />
        <!-- 详细内容结束 -->
      </el-collapse-item>
    </el-collapse>
@@ -181,11 +161,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';
import { toLabel } from '@/enum/device/device';
export default {
  components: {},
  watch: {
@@ -238,79 +216,6 @@
        { key: 0, value: '购买' },
        { key: 1, value: '租赁' }
      ],
      // i-设备类型
      // 两层map, { key: topType, value: { key: sceneTypeId, value: [label, value, children] } }
      iDeviceTypesMap: new Map(
        [
          {
            topTypeId: 0,
            value: new Map(
              [
                {
                  sceneTypeId: 1,
                  value: [
                    {
                      label: '扬尘监测',
                      value: 1,
                      children: [
                        {
                          label: '扬尘监测',
                          value: 1
                        }
                      ]
                    }
                  ]
                },
                {
                  sceneTypeId: 2,
                  value: [
                    {
                      label: '扬尘监测',
                      value: 1,
                      children: [
                        {
                          label: '扬尘监测',
                          value: 1
                        }
                      ]
                    }
                  ]
                },
                {
                  sceneTypeId: 3,
                  value: [
                    {
                      label: '扬尘监测',
                      value: 1,
                      children: [
                        {
                          label: '扬尘监测',
                          value: 1
                        }
                      ]
                    }
                  ]
                },
                {
                  sceneTypeId: 14,
                  value: [
                    {
                      label: '扬尘监测',
                      value: 1,
                      children: [
                        {
                          label: '扬尘监测',
                          value: 1
                        }
                      ]
                    }
                  ]
                }
              ].map((item) => [item.sceneTypeId, item.value])
            )
          }
        ].map((item) => [item.topTypeId, item.value])
      ),
      scene: {}
    };
  },
@@ -374,7 +279,9 @@
      data._isDetail = false;
    },
    getList() {
      deviceApi.fetchDevices(this.scene.guid, this.currSelect.topDeviceTypeId).then((result) => {
      deviceApi
        .fetchDevices(this.scene.guid, this.currSelect.topDeviceTypeId)
        .then((result) => {
        this.initList();
        if (result.data == null || result.data.length <= 0) {
          this.isEmpty = true;
@@ -390,9 +297,7 @@
            sceneId: element.sceneGuid,
            deviceTypeId: this.currSelect.topDeviceTypeId
          };
          deviceApi
            .fetchDeviceStatus(data)
            .then((status) => {
            deviceApi.fetchDeviceStatus(data).then((status) => {
              var statusData = status.data;
              var imgPaths = [];
              if (statusData) {
@@ -411,33 +316,17 @@
                  this.formInfo.push(element);
                }
              }
            })
            .catch((err) => {});
            });
        }
      });
    },
    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];
      }
      type = toLabel(element.sceneTypeId, this.currSelect.topDeviceTypeId, [
        element.typeId,
        element.subtypeId
      ]);
      element._typename = type.join('-');
      return element;
    },
    // 保存状态信息
@@ -495,51 +384,6 @@
      // 需要根据场景类型确定接口参数的属性名
      var query = this.modifyObjectKeys(obj);
      return query;
    },
    // 根据接口返回生成 iDeviceTypesMap
    generateIDeviceTypesMap() {},
    // 获取当前topType,当前sceneTypeId下所有父类型
    getAlliDeviceParentTypeArray() {
      var sceneTypeAndIDeviceTypesMap = this.iDeviceTypesMap.get(this.currSelect.topDeviceTypeId);
      if (!sceneTypeAndIDeviceTypesMap) {
        return '';
      }
      var iDeviceTypesArray = sceneTypeAndIDeviceTypesMap.get(this.scene.typeid);
      if (!iDeviceTypesArray) {
        return '';
      }
      return iDeviceTypesArray;
    },
    // 获取设备类型 topDeviceTypeId, sceneTypeId 和 自身的一些参数
    getIDeviceParentTypeObj(device) {
      var iDeviceTypesArray = this.getAlliDeviceParentTypeArray();
      var result;
      iDeviceTypesArray.forEach((e) => {
        if (e.value == device.typeId) {
          result = e;
        }
      });
      return result;
    },
    // 获取设备子类型 topDeviceTypeId, sceneTypeId 和 自身的一些参数
    getIDeviceChildrenTypeObj(device) {
      var parentType = this.getIDeviceParentTypeObj(device);
      if (parentType == null || parentType == '' || !('children' in parentType)) {
        return '';
      }
      var children = parentType.children;
      if (children == null || children.length <= 0) {
        return '';
      }
      let result;
      // iDeviceTypesArray.forEach((e) => {
      //   if (e.value == device.typeId) {
      //     result = e;
      //   }
      // });
      return result;
    },
    onClickPic(e, item) {
      e.stopPropagation();
src/views/fysp/check/components/CompLedgerPic.vue
@@ -120,7 +120,7 @@
</script>
<style scoped>
.imgs {
  height: 650px;
  /* height: 650px; */
  width: 90%;
  min-height: 100px !important;
  /* border-style:solid;
src/views/fysp/check/components/CompProRecent.vue
@@ -1,7 +1,7 @@
<template>
  <div>
    <el-tabs v-model="activeName" type="card">
      <el-tab-pane v-for="item in ranges" :label="item" :name="item"> </el-tab-pane>
      <el-tab-pane v-for="(item, i) in ranges" :key="i" :label="item" :name="item"> </el-tab-pane>
    </el-tabs>
    <div class="proList">
      <el-card class="card-style" shadow="hover">
@@ -175,7 +175,7 @@
          pros.forEach((pro) => {
            if (pro.ptguid == this.deepCopyPro.ptguid) {
              pro._stName = subtask.stName;
              pro._time = this.$fm.formatYM(subtask.stPlanTime)
              pro._time = this.$fm.formatYMD(subtask.stPlanTime)
              this.curProList.push(pro);
            }
          });
src/views/fysp/check/components/CompProblemAddOrUpd.vue
@@ -2,7 +2,12 @@
  <div class="main-container">
    <el-form :model="problem" label-width="auto" style="max-width: 95%">
      <el-form-item label="问题类型" prop="proType">
        <el-select v-model="proType" @change="onProTypeChange" class="row" :disabled="readonly">
        <el-select
          v-model="proType"
          @change="onProTypeChange"
          class="row"
          :disabled="readonly"
        >
          <el-option
            v-for="item in problemTypeOptions"
            :key="item.typeid"
@@ -42,7 +47,11 @@
        </el-select>
      </el-form-item>
      <el-form-item label="问题建议" prop="advise">
        <el-select v-model="deepCopyProblem.advise" class="row" :disabled="readonly">
        <el-select
          v-model="deepCopyProblem.advise"
          class="row"
          :disabled="readonly"
        >
          <el-option
            v-for="item in adviseOptions"
            :key="item.adGuid"
@@ -63,10 +72,18 @@
      <div class="t-card_item">
        问题图片&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <div>
          <el-button @click="chosePicFromAnyPic" v-show="!readonly">从任意图片选取</el-button>
          <el-button @click="chosePicFromDevicePic" v-show="!readonly">从设备图片选取</el-button>
          <el-button @click="chosePicFromLedgerPic" v-show="!readonly">从台账选取</el-button>
          <el-button @click="choseChangePic" v-show="!readonly">从文件夹选取</el-button>
          <el-button @click="chosePicFromAnyPic" v-show="!readonly"
            >从场景图片选取</el-button
          >
          <el-button @click="chosePicFromDevicePic" v-show="!readonly"
            >从设备图片选取</el-button
          >
          <el-button @click="chosePicFromLedgerPic" v-show="!readonly"
            >从台账选取</el-button
          >
          <el-button @click="choseChangePic" v-show="!readonly"
            >从文件夹选取</el-button
          >
        </div>
      </div>
      <el-upload
@@ -82,32 +99,35 @@
        :disabled="readonly"
        accept="image/*"
      >
        <el-button type="primary" id="uploadBtnId" style="display: none"></el-button>
        <el-button
          type="primary"
          id="uploadBtnId"
          style="display: none"
        ></el-button>
        <el-icon v-show="fileList.length != 3">
          <Plus />
        </el-icon>
      </el-upload>
      <el-form-item>
        <el-button type="primary" @click="onSubmit" v-show="!readonly">保存</el-button>
        <el-button @click="this.$emit('submited', false)" v-show="!readonly">取消</el-button>
        <el-button type="primary" @click="onSubmit" v-show="!readonly"
          >保存</el-button
        >
        <el-button @click="this.$emit('submited', false)" v-show="!readonly"
          >取消</el-button
        >
      </el-form-item>
    </el-form>
    <el-dialog
      title="任意图片"
      width="80%"
      v-model="anyPhotoDialog"
      :before-close="beforeAnyPhotoDialogclose"
      class="dialog_style"
    >
      <ArbitraryPhoto
      :max-select="3"
        v-if="anyPhotoDialog"
      v-model:dialog-visible="anyPhotoDialog"
        @selectByAnyPhonoEvent="handleSelectedAnyPhono"
        :subtask="subtask"
        :defaultFile="fileList"
        ref="arbitraryPhotoRef"
      >
      </ArbitraryPhoto>
    </el-dialog>
    <el-dialog
      title="台账图片"
      width="80%"
@@ -216,11 +236,31 @@
      month: -1,
      ledgerPicDialog: false,
      rules: {
        proType: { required: true, message: '问题类型不能为空', trigger: 'change' },
        description: { required: true, message: '问题描述不能为空', trigger: 'change' },
        locationid: { required: true, message: '问题位置不能为空', trigger: 'change' },
        advise: { required: true, message: '问题建议不能为空', trigger: 'change' },
        proRemark: { required: true, message: '补充说明不能为空', trigger: 'change' }
        proType: {
          required: true,
          message: '问题类型不能为空',
          trigger: 'change'
        },
        description: {
          required: true,
          message: '问题描述不能为空',
          trigger: 'change'
        },
        locationid: {
          required: true,
          message: '问题位置不能为空',
          trigger: 'change'
        },
        advise: {
          required: true,
          message: '问题建议不能为空',
          trigger: 'change'
        },
        proRemark: {
          required: true,
          message: '补充说明不能为空',
          trigger: 'change'
        }
      },
      deviceTopTypes: [
        { id: 0, label: '监控设备' },
@@ -261,7 +301,9 @@
    },
    adviseOptions() {
      var problemGuid = this.currProTypeGuid || this.problem.guid;
      var array = this.suggestions.filter((item) => item.adProblemtypeguid == problemGuid);
      var array = this.suggestions.filter(
        (item) => item.adProblemtypeguid == problemGuid
      );
      return array;
    }
  },
@@ -314,7 +356,9 @@
      this.deviceImgObjList = [];
      for (const deviceTopTypeElement of this.deviceTopTypes) {
        const topTypeId = deviceTopTypeElement.id;
        await deviceApi.fetchDevices(this.subtask.sceneId, topTypeId).then((result) => {
        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]);
@@ -385,7 +429,10 @@
            this.deepCopyProblem.description = currDescription;
            this.proRemark = '';
          } else {
            currDescription = currProName.substring(0, currProName.lastIndexOf('('));
            currDescription = currProName.substring(
              0,
              currProName.lastIndexOf('(')
            );
            this.problemTypeList.forEach((item) => {
              if (item.description === currDescription) {
@@ -478,23 +525,24 @@
      this.deepCopyProblem.advise = '';
    },
    findProByProDesName(name) {
      let result
      this.problemTypeList.forEach(item=>{
      let result;
      this.problemTypeList.forEach((item) => {
        if (item.description == name) {
          result = item;
        }
      })
      return result
      });
      return result;
    },
    onProDesChange(value) {
      let currPro = this.findProByProDesName(value)
      let currPro = this.findProByProDesName(value);
      this.deepCopyProblem.advise = '';
      this.currProTypeGuid = currPro.guid;
      // this.deepCopyProblem.description = currPro.description;
      this.changeProblemname();
      this.deepCopyProblem.advise = '';
      var adName = this.adviseOptions.length == 0 ? '' : this.adviseOptions[0].adName;
      var adName =
        this.adviseOptions.length == 0 ? '' : this.adviseOptions[0].adName;
      this.deepCopyProblem.advise = adName;
    },
    onProLocationChange(value) {
@@ -572,7 +620,9 @@
          delete deepCopyPro['description'];
          deepCopyPro.proName = deepCopyPro.problemname;
          delete deepCopyPro['problemname'];
          deepCopyPro.ptGuid = that.findProTypeByGuid(that.currProTypeGuid).guid;
          deepCopyPro.ptGuid = that.findProTypeByGuid(
            that.currProTypeGuid
          ).guid;
          deepCopyPro.locationId = deepCopyPro.locationid;
          delete deepCopyPro['locationid'];
          data.append('problemVo', JSON.stringify(deepCopyPro));
@@ -682,14 +732,6 @@
}
.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;