董国庆
2026-01-29 68da31c8df1668bbec7f23ff8f3686fe69de7d55
修改bug
12个文件已修改
209 ■■■■■ 已修改文件
screen/.env.development 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
screen/.env.production 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
screen/src/utils/request.js 1 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
screen/src/view/equipmentList/index.vue 50 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
screen/src/view/hiddenDanger/index.vue 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
screen/src/view/home/index.vue 43 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
screen/src/view/majorRisk/index.vue 73 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
screen/src/view/planOfAudit/service.js 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
screen/src/view/projectHome/index.vue 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
screen/src/view/projectList/index.vue 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
screen/src/view/projectList/service.js 4 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
screen/src/view/projectProgress/index.vue 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
screen/.env.development
@@ -1,7 +1,7 @@
# 开发环境配置
# 主API地址
VUE_APP_BASE_URL=http://221.182.45.100:8180
VUE_APP_BASE_URL=http://192.168.110.64:9908
# 图片回显地址
VUE_APP_IMAGE_BASE_URL=http://221.182.45.100:8180
screen/.env.production
@@ -6,3 +6,6 @@
# 图片回显地址
VUE_APP_IMAGE_BASE_URL=http://221.182.45.100:8180
# 后台请求地址
VUE_ADMIN_BASE_URL=http://221.182.45.100:8002
screen/src/utils/request.js
@@ -6,6 +6,7 @@
  withCredentials: false,
  timeout: 30000,
})
console.log('process.env.VUE_APP_BASE_URL',process.env.VUE_APP_BASE_URL)
// 请求拦截
service.interceptors.request.use(
screen/src/view/equipmentList/index.vue
@@ -26,11 +26,18 @@
        </div>
        <div class="flex a-center j-between pl--18 pr--15 h--40 relative w--300 bgcolor1 searchBox">
          <el-select filterable v-model="type" placeholder="请选择设备类型" class="flex1" @change="handleSearch" clearable>
          <el-select filterable v-model="type" placeholder="请选择设备类型" class="flex1" @change="handleSearch">
            <el-option v-for="item in deviceTypeList" :key="item.code" :label="item.name" :value="item.code">
            </el-option>
          </el-select>
          <div class="flex a-center gap--5">
            <i
              @click.stop="clearDeviceType"
              class="el-icon-circle-close c-fff cursor-pointer"
              v-show="type"
            />
          <img src="../../assets/img/down-circle@2x.png" class="w--15 h--16 shrink0" />
          </div>
        </div>
        <div class="flex a-center j-between px--20 w--300 h--40 relative bgcolor1 picker">
          <el-date-picker v-model="dateTime" ref="datetime1" type="datetime" placeholder="" @change="handleSearch" clearable>
@@ -71,7 +78,7 @@
          </div>
        </div>
        <div class="flex a-center j-between w--300 pl--20 h--40 relative bgcolor1 searchBox">
          <el-input v-model="content" placeholder="请输入搜索内容" class="flex1" @keyup.enter="handleSearch"></el-input>
          <el-input v-model="content" placeholder="请输入搜索内容" class="flex1" clearable @keyup.enter.native="handleSearch"></el-input>
          <div class="btn SHSR" @click="handleSearch">搜索</div>
        </div>
      </div>
@@ -307,6 +314,14 @@
      this.projectName = this.$route.query.projectName;
    }
    // 接收从 home 页面传递过来的时间参数并回填
    if (this.$route.query.startTime) {
      this.dateTime = moment(this.$route.query.startTime).format("YYYY-MM-DD HH:mm:ss");
    }
    if (this.$route.query.endTime) {
      this.dateTime2 = moment(this.$route.query.endTime).format("YYYY-MM-DD HH:mm:ss");
    }
    this.getTypeList()
    this.getList()
  },
@@ -328,7 +343,7 @@
          return;
        }
        const res = await getProjectList({ clientId });
        const res = await getProjectList({ clientId: clientId ,projectCategory:["ongoing", "fixed"][localStorage.getItem('activeTab') - 1]});
        if (res && res) {
          this.projectList = res.map((item) => ({
            label: item.name,
@@ -352,6 +367,12 @@
      this.projectId = null;
      this.currentPage = 1;
      this.getList();
    },
    // 清除设备类型
    clearDeviceType() {
      this.type = '';
      this.handleSearch();
    },
    // 获取设备类型
@@ -384,18 +405,26 @@
      });
    },
    getList() {
      // 将 code 转换为下标
      let typeIndex = '';
      if (this.type) {
        const index = this.deviceTypeList.findIndex(item => item.code === this.type);
        typeIndex = index !== -1 ? index : '';
      }
      let params = {
        projectId: this.projectId,
        projectName: this.projectName,
        startTime: this.startTime,
        endTime: this.endTime,
        startTime: this.dateTime,
        endTime: this.dateTime2,
        content: this.content,
        type: this.type,
        type: typeIndex, // 传递下标而不是 code
        pageNum: this.currentPage,
        pageSize: this.pageSize
      }
      if(this.isClient){
        params.clientId = localStorage.getItem('clientId')
        params.category = localStorage.getItem('activeTab')
      }
      // 使用统一方法,根据用户类型调用对应接口
@@ -622,6 +651,15 @@
    border: none;
    color: transparent;
  }
  .el-icon-circle-close {
    font-size: 16px;
    transition: color 0.3s;
    &:hover {
      color: #00ebfc;
    }
  }
}
.searchBox {
screen/src/view/hiddenDanger/index.vue
@@ -547,6 +547,16 @@
      this.projectCategory = this.$route.query.projectCategory;
    }
    // 接收从 home 页面传递过来的时间参数并回填
    if (this.$route.query.startTime) {
      this.startDateTime = new Date(this.$route.query.startTime);
      this.searchForm.startTime = this.$route.query.startTime;
    }
    if (this.$route.query.endTime) {
      this.endDateTime = new Date(this.$route.query.endTime);
      this.searchForm.endTime = this.$route.query.endTime;
    }
    // 判断是否委托方端:通过 projectId 判断
    // 有 projectId = 项目端,无 projectId = 委托方端
    this.isClient = !this.projectId;
@@ -634,7 +644,7 @@
          return;
        }
        const res = await getProjectList({ clientId });
        const res = await getProjectList({ clientId: clientId,projectCategory:["ongoing", "fixed"][localStorage.getItem('activeTab') - 1] });
        if (res && res) {
          this.projectList = res.map((item) => ({
            label: item.name,
@@ -666,7 +676,7 @@
        } else {
          params.clientId = localStorage.getItem('clientId');
          if (this.projectCategory) {
            params.projectCategory = this.projectCategory
            params.category = localStorage.getItem('activeTab')
          }
          // 委托方:只在重大隐患 Tab 且用户选择了类型时传递 type
          if (this.activeTab === 1 && this.searchForm.type) {
screen/src/view/home/index.vue
@@ -934,13 +934,50 @@
      this.$router.push("/workList");
    },
    toPorjectList() {
      this.$router.push(`/projectList?projectCategory=${["ongoing", "fixed"][this.activeTab - 1]}`);
      const query = {
        projectCategory: ["ongoing", "fixed"][this.activeTab - 1]
      };
      // 如果有选择日期范围,则传递开始和结束时间
      if (this.dateRange && this.dateRange.length === 2) {
        query.startTime = moment(this.dateRange[0]).format("YYYY-MM-DD HH:mm:ss");
        query.endTime = moment(this.dateRange[1]).format("YYYY-MM-DD HH:mm:ss");
      }
      this.$router.push({
        path: '/projectList',
        query: query
      });
    },
    toEquipmentList() {
      this.$router.push("/equipmentList");
      const query = {};
      // 如果有选择日期范围,则传递开始和结束时间
      if (this.dateRange && this.dateRange.length === 2) {
        query.startTime = moment(this.dateRange[0]).format("YYYY-MM-DD HH:mm:ss");
        query.endTime = moment(this.dateRange[1]).format("YYYY-MM-DD HH:mm:ss");
      }
      this.$router.push({
        path: '/equipmentList',
        query: query
      });
    },
    toHiddenDanger() {
      this.$router.push(`/hiddenDanger?projectCategory=${["ongoing", "fixed"][this.activeTab - 1]}`);
      const query = {
        projectCategory: ["ongoing", "fixed"][this.activeTab - 1]
      };
      // 如果有选择日期范围,则传递开始和结束时间
      if (this.dateRange && this.dateRange.length === 2) {
        query.startTime = moment(this.dateRange[0]).format("YYYY-MM-DD HH:mm:ss");
        query.endTime = moment(this.dateRange[1]).format("YYYY-MM-DD HH:mm:ss");
      }
      this.$router.push({
        path: '/hiddenDanger',
        query: query
      });
    },
    // 切换活动索引
    changeActiveIndex(index) {
screen/src/view/majorRisk/index.vue
@@ -14,7 +14,6 @@
      <div class="flex a-center gap--16 mt--24 mb--20">
        <!-- 开始时间 -->
        <div
          @click="handleClick(1)"
          class="flex a-center j-between px--20 w--300 h--40 relative bgcolor1 picker"
        >
          <el-date-picker
@@ -22,29 +21,41 @@
            ref="datetime1"
            type="datetime"
            placeholder=""
            clearable
            @change="handleSearch"
          >
          </el-date-picker>
          <div
            class="absolute w100 h100 flex a-center c-fff fs--14 SHS"
            style="width: calc(100% - 20px)"
            @click.stop="handleClick(1)"
            class="absolute h100 flex a-center c-fff fs--14 SHS pointer-events-none"
            style="left: 20px; right: 60px; z-index: 1;"
            v-if="startTimeTxt"
          >
            {{ startTimeTxt }}
          </div>
          <div
            @click.stop="handleClick(1)"
            v-else
            class="absolute w100 h100 flex a-center c-fff fs--14 SHSR"
            class="absolute h100 flex a-center c-fff fs--14 SHSR pointer-events-none"
            style="left: 20px; right: 60px; z-index: 1;"
          >
            请选择开始日期
          </div>
          <img
            src="../../assets/img/home/Shape@2x (6).png"
            class="w--13 h--13 shrink0"
          <div class="flex a-center gap--5" style="position: relative; z-index: 2;">
            <i
              @click.stop="clearStartTime"
              class="el-icon-circle-close c-fff cursor-pointer"
              v-show="startTime"
          />
            <img
              @click="handleClick(1)"
              src="../../assets/img/home/Shape@2x (6).png"
              class="w--13 h--13 shrink0 cursor-pointer"
            />
          </div>
        </div>
        <!-- 结束时间 -->
        <div
          @click="handleClick(2)"
          class="flex a-center j-between px--20 w--300 h--40 relative bgcolor1 picker"
        >
          <el-date-picker
@@ -52,25 +63,38 @@
            ref="datetime2"
            type="datetime"
            placeholder=""
            clearable
            @change="handleSearch"
          >
          </el-date-picker>
          <div
            class="absolute w100 h100 flex a-center c-fff fs--14 SHS"
            style="width: calc(100% - 20px)"
            @click="handleClick(2)"
            class="absolute h100 flex a-center c-fff fs--14 SHS pointer-events-none"
            style="left: 20px; right: 60px; z-index: 1;"
            v-if="endTimeTxt"
          >
            {{ endTimeTxt }}
          </div>
          <div
            @click="handleClick(2)"
            v-else
            class="absolute w100 h100 flex a-center c-fff fs--14 SHSR"
            class="absolute h100 flex a-center c-fff fs--14 SHSR pointer-events-none"
            style="left: 20px; right: 60px; z-index: 1;"
          >
            请选择结束日期
          </div>
          <img
            src="../../assets/img/home/Shape@2x (6).png"
            class="w--13 h--13 shrink0"
          <div class="flex a-center gap--5" style="position: relative; z-index: 2;">
            <i
              @click.stop="clearEndTime"
              class="el-icon-circle-close c-fff cursor-pointer"
              v-show="endTime"
          />
            <img
              @click="handleClick(2)"
              src="../../assets/img/home/Shape@2x (6).png"
              class="w--13 h--13 shrink0 cursor-pointer"
            />
          </div>
        </div>
        <!-- 搜索框 -->
        <div
@@ -387,6 +411,18 @@
      this.$refs[`datetime${type}`].focus();
    },
    // 清除开始时间
    clearStartTime() {
      this.startTime = null;
      this.handleSearch();
    },
    // 清除结束时间
    clearEndTime() {
      this.endTime = null;
      this.handleSearch();
    },
    // 查看详情
    async showDetail(row) {
      try {
@@ -476,6 +512,15 @@
    border: none;
    color: transparent;
  }
  .el-icon-circle-close {
    font-size: 16px;
    transition: color 0.3s;
    &:hover {
      color: #00ebfc;
    }
  }
}
.searchBox {
screen/src/view/planOfAudit/service.js
@@ -3,10 +3,11 @@
// 创建专门用于文件流下载的 axios 实例
const reportRequest = axios.create({
  baseURL: process.env.VUE_ADMIN_BASE_URL,
  baseURL: 'http://221.182.45.100:8002' || process.env.VUE_ADMIN_BASE_URL,
  withCredentials: false,
  timeout: 60000, // 文件下载可能需要更长时间
})
console.log('process.env.VUE_ADMIN_BASE_URL',process.env.VUE_ADMIN_BASE_URL)
// 请求拦截 - 添加 token
reportRequest.interceptors.request.use(
screen/src/view/projectHome/index.vue
@@ -939,7 +939,7 @@
          const marker = new AMap.Marker({
            position: [104.065617, 30.65695], // 使用地图中心点坐标
            icon: new AMap.Icon({
              image: require('../../assets/img/project/mark.png'),
              image:[require('../../assets/img/home/f4.png'),require('../../assets/img/home/s4.png'),require('../../assets/img/home/z4.png')][this.projectInfo.type] ,
              size: new AMap.Size(30, 30),
              imageSize: new AMap.Size(30, 30)
            }),
screen/src/view/projectList/index.vue
@@ -557,6 +557,15 @@
    if (this.$route.query.projectCategory) {
      this.projectCategory = this.$route.query.projectCategory;
    }
    // 接收从 home 页面传递过来的时间参数并回填
    if (this.$route.query.startTime) {
      this.startTime = new Date(this.$route.query.startTime);
    }
    if (this.$route.query.endTime) {
      this.endTime = new Date(this.$route.query.endTime);
    }
    this.initUserInfo();
    this.initData();
  },
@@ -583,6 +592,7 @@
      try {
        const res = await getProjectList({
          clientId: this.clientId,
          projectCategory:["ongoing", "fixed"][localStorage.getItem('activeTab') - 1]
        });
        if (res) {
          this.projectOptions = res.map((item) => ({
@@ -618,7 +628,7 @@
          params.endTime = moment(this.endTime).format("YYYY-MM-DD HH:mm:ss");
        if (this.projectName) params.name = this.projectName;
          if (this.projectCategory) {
            params.projectCategory = this.projectCategory
            params.category = localStorage.getItem('activeTab')
          }
        const res = await projectList(params);
screen/src/view/projectList/service.js
@@ -3,11 +3,13 @@
// 创建专门用于文件流下载的 axios 实例
const reportRequest = axios.create({
  baseURL: process.env.VUE_ADMIN_BASE_URL,
  baseURL: 'http://221.182.45.100:8002'||process.env.VUE_ADMIN_BASE_URL,
  withCredentials: false,
  timeout: 60000, // 文件下载可能需要更长时间
})
console.log('process.env.VUE_ADMIN_BASE_URL', process.env)
// 请求拦截 - 添加 token
reportRequest.interceptors.request.use(
  config => {
screen/src/view/projectProgress/index.vue
@@ -410,7 +410,7 @@
    // 格式化时间
    formatTime(time) {
      return time ? moment(time).format("YYYY-MM-DD HH:mm:ss") : "-";
      return time ? moment(time).format("YYYY-MM-DD") : "-";
    },
    // 获取图片数量