董国庆
2026-05-21 ae6e9ba03c8fa82e1d6e62896688e83d9d606764
fix(screen): 优化报告弹窗交互并更新开发环境API配置

- 重构projectList和planOfAudit页面的报告弹窗触发逻辑,改为手动控制显示状态
- 修复点击事件冒泡问题,添加@click.stop阻止事件传播
- 合并报告可用性检查与弹窗切换逻辑
- 切换开发环境API基础地址至远程服务器
3个文件已修改
45 ■■■■■ 已修改文件
screen/.env.development 4 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
screen/src/view/planOfAudit/index.vue 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
screen/src/view/projectList/index.vue 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
screen/.env.development
@@ -1,8 +1,8 @@
# 开发环境配置
# 主API地址
# VUE_APP_BASE_URL=http://47.108.113.190:9908
VUE_APP_BASE_URL=http://192.168.110.111:9908
VUE_APP_BASE_URL=http://47.108.113.190:9908
# VUE_APP_BASE_URL=http://192.168.110.111:9908
# 图片回显地址
VUE_APP_IMAGE_BASE_URL=http://47.108.113.190:8182
screen/src/view/planOfAudit/index.vue
@@ -182,7 +182,8 @@
              >检查资料</el-button
            >
            <el-popover
              trigger="click"
              trigger="manual"
              :value="reportPopoverVisibleId === row.id"
              popper-class="custom-popper"
              :disabled="!hasAnyReport(row)"
            >
@@ -191,7 +192,7 @@
                  type="text"
                  :class="hasAnyReport(row) ? 'btnColor' : 'btnDisabled'"
                  :disabled="!hasAnyReport(row)"
                  @click="checkReportAvailability(row)"
                  @click.stop="toggleReportPopover(row)"
                >
                  查看报告
                </el-button>
@@ -200,7 +201,7 @@
                class="h100 flex flex-column a-center j-between c-fff fs--16 SHSBold"
              >
                <div
                  @click="openReport('safe', row)"
                  @click.stop="openReport('safe', row)"
                  class="py--12 w100 txt-center br--10 bgcolor6 report-btn"
                  :class="{
                    'report-disabled': row.containSystemRes !== 1,
@@ -211,7 +212,7 @@
                  <span v-if="row.containSystemRes !== 1" class="no-report-tag">(暂无)</span>
                </div>
                <div
                  @click="openReport('device', row)"
                  @click.stop="openReport('device', row)"
                  class="py--12 w100 txt-center br--10 bgcolor7 report-btn"
                  :class="{
                    'report-disabled': row.containDeviceRes !== 1,
@@ -486,6 +487,7 @@
      pdfUrl: '', // PDF预览URL
      loading: false,
      showPreview: false, // 是否显示预览
      reportPopoverVisibleId: null,
      // 图片基础路径
      VUE_APP_IMAGE_BASE_URL: process.env.VUE_APP_IMAGE_BASE_URL,
@@ -699,15 +701,20 @@
      return row.containSystemRes === 1 || row.containDeviceRes === 1
    },
    // 检查报告可用性(当按钮被禁用时点击)
    checkReportAvailability (row) {
    toggleReportPopover (row) {
      if (!this.hasAnyReport(row)) {
        this.$message.warning('该计划暂无可查看的报告')
        return
      }
      this.reportPopoverVisibleId =
        this.reportPopoverVisibleId === row.id ? null : row.id
    },
    // 打开报告
    async openReport (type, row) {
      this.reportPopoverVisibleId = null
      // 根据类型检查是否有对应报告
      const hasReport = type === 'safe'
        ? row.containSystemRes === 1
@@ -884,6 +891,7 @@
      this.checkMaterialList = []
      this.currentPlanId = null
      this.currentRow = null
      this.reportPopoverVisibleId = null
    },
    // 关闭检查资料详情弹窗
@@ -897,6 +905,7 @@
    closeReportDialog () {
      this.reportVisible = false
      this.showPreview = false
      this.reportPopoverVisibleId = null
      // 清空PDF链接(不需要释放URL,因为是服务器链接)
      this.reportBlobUrl = ''
screen/src/view/projectList/index.vue
@@ -346,7 +346,8 @@
        <el-table-column label="操作" width="150">
          <template #default="{ row }">
            <el-popover
              trigger="click"
              trigger="manual"
              :value="reportPopoverVisibleId === row.id"
              popper-class="custom-popper"
              :disabled="!hasAnyReport(row)"
            >
@@ -355,7 +356,7 @@
                  type="text"
                  :class="hasAnyReport(row) ? 'btnColor' : 'btnDisabled'"
                  :disabled="!hasAnyReport(row)"
                  @click="checkReportAvailability(row)"
                  @click.stop="toggleReportPopover(row)"
                >
                  查看报告
                </el-button>
@@ -364,7 +365,7 @@
                class="h100 flex flex-column a-center j-between c-fff fs--16 SHSBold"
              >
                <div
                  @click="openReport('safe', row)"
                  @click.stop="openReport('safe', row)"
                  class="py--12 w100 txt-center br--10 bgcolor6 report-btn"
                  :class="{
                    'report-disabled': row.containSystemRes !== 1,
@@ -377,7 +378,7 @@
                  >
                </div>
                <div
                  @click="openReport('device', row)"
                  @click.stop="openReport('device', row)"
                  class="py--12 w100 txt-center br--10 bgcolor7 report-btn"
                  :class="{
                    'report-disabled': row.containDeviceRes !== 1,
@@ -547,6 +548,7 @@
      pdfUrl: '', // PDF预览URL
      reportLoading: false,
      showPreview: false, // 是否显示预览
      reportPopoverVisibleId: null,
      currentRow: null, // 当前选中的行数据
      // 评价类型
@@ -819,15 +821,20 @@
      return row.containSystemRes === 1 || row.containDeviceRes === 1
    },
    // 检查报告可用性(当按钮被禁用时点击)
    checkReportAvailability (row) {
    toggleReportPopover (row) {
      if (!this.hasAnyReport(row)) {
        this.$message.warning('该计划暂无可查看的报告')
        return
      }
      this.reportPopoverVisibleId =
        this.reportPopoverVisibleId === row.id ? null : row.id
    },
    // 打开报告
    async openReport (type, row) {
      this.reportPopoverVisibleId = null
      // 根据类型检查是否有对应报告
      const hasReport =
        type === 'safe'
@@ -1019,6 +1026,7 @@
    closeReportDialog () {
      this.reportVisible = false
      this.showPreview = false
      this.reportPopoverVisibleId = null
      // 清空PDF链接(不需要释放URL,因为是服务器链接)
      this.reportBlobUrl = ''