hejianhao
2026-01-29 8d7bd8e49d375238e8a0b22f044dad7e56a16bed
fix: 修复图片显示路径和检查内容显示问题

- 将 header 组件中的 VUE_APP_BASE_URL 替换为 VUE_APP_IMAGE_BASE_URL
- 在 personnelOnDuty 组件中,为检查内容列添加固定显示文本“人员在岗”
- 统一图片路径拼接逻辑,使用 VUE_APP_IMAGE_BASE_URL 作为基础路径
- 移除冗余的 VUE_APP_BASE_URL 数据项
2个文件已修改
18 ■■■■■ 已修改文件
screen/src/view/header/index.vue 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
screen/src/view/personnelOnDuty/index.vue 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
screen/src/view/header/index.vue
@@ -5,7 +5,7 @@
      class="flex a-center c-fff absolute adress1 cursor-pointer"
    >
      <img
        :src="clientLogo ? VUE_APP_BASE_URL + '/project/download/' + clientLogo : require('../../assets/img/logo.png')"
        :src="clientLogo ? VUE_APP_IMAGE_BASE_URL + '/project/download/' + clientLogo : require('../../assets/img/logo.png')"
        class="w--30 h--30 shrink0 mr--10"
      />
      <div class="color2 lh--30 fs--30 SHSBold">
@@ -64,7 +64,6 @@
      clientName: localStorage.getItem("clientName"),
      clientLogo: localStorage.getItem("clientLogo"),
      VUE_APP_IMAGE_BASE_URL: process.env.VUE_APP_IMAGE_BASE_URL,
      VUE_APP_BASE_URL: process.env.VUE_APP_BASE_URL,
      showLogoutDialog: false,
    };
  },
screen/src/view/personnelOnDuty/index.vue
@@ -142,7 +142,11 @@
        v-loading="loading"
      >
        <el-table-column label="计划名称" prop="planName" min-width="120" />
        <el-table-column label="检查内容" prop="checkContent" min-width="150" show-overflow-tooltip />
        <el-table-column label="检查内容" prop="checkContent" min-width="150" show-overflow-tooltip >
          <template>
            <div>人员在岗</div>
          </template>
        </el-table-column>
        <el-table-column label="岗位" prop="postName" min-width="100" />
        <el-table-column label="问题备注" prop="remark" min-width="150" show-overflow-tooltip />
        <el-table-column label="图片" min-width="80">
@@ -270,14 +274,14 @@
            <div class="SHSR fs--16 lh--16 mb--17 color1">图片:</div>
            <div class="flex a-center oa gap--14">
              <img
                v-for="(item, index) in detailData.img ? detailData.img.split(',').filter(i => i) : []"
                v-for="(item, index) in detailData.img ? detailData.img.split(',').map(i => VUE_APP_IMAGE_BASE_URL + i) : []"
                :key="index"
                :src="item"
                class="w--150 h--120 cursor-pointer"
                style="object-fit: cover; border-radius: 4px;"
                style="border-radius: 4px;"
                @click="previewImage(detailData)"
              />
              <div v-if="!detailData.img || !detailData.img.split(',').filter(i => i).length" class="c-fff SHSR">暂无图片</div>
              <div v-if="!detailData.img || !detailData.img.split(',').map(i => i).length" class="c-fff SHSR">暂无图片</div>
            </div>
          </div>
        </div>
@@ -327,6 +331,7 @@
      detailLoading: false,
      // 图片预览数据
      previewImages: [],
      VUE_APP_IMAGE_BASE_URL: process.env.VUE_APP_IMAGE_BASE_URL + '/project/download/'
    };
  },
  computed: {
@@ -489,7 +494,7 @@
    previewImage(row) {
      if (row.img) {
        // 如果img是字符串,可能是逗号分隔的多张图片
        this.previewImages = row.img.split(",").filter((item) => item);
        this.previewImages = row.img.split(",").map((item) => this.VUE_APP_IMAGE_BASE_URL + item);
        this.previewVisible = true;
      } else {
        this.$message.warning("暂无图片");