Merge branch 'main' of http://120.76.84.145:10101/gitblit/r/H5/smartBuilding
| | |
| | | this.$router.push({ |
| | | path: "/hiddenDanger", |
| | | query: { |
| | | projectId: this.projectId, |
| | | projectName: this.projectName, |
| | | projectId: this.projectId || row.projectId, |
| | | projectName: this.projectName || row.projectName, |
| | | activeTab: type, |
| | | }, |
| | | }); |
| | |
| | | </div> |
| | | </div> |
| | | <!-- 表格 --> |
| | | <CustomTable |
| | | :key="activeTab" |
| | | :data="tableData" |
| | | height="800" |
| | | style="border: 2px solid #3d7fff" |
| | | v-loading="loading" |
| | | > |
| | | <el-table-column |
| | | v-if="!isProjectMode" |
| | | label="项目名称" |
| | | prop="projectName" |
| | | min-width="150" |
| | | /> |
| | | <el-table-column |
| | | label="检查计划" |
| | | prop="planName" |
| | | min-width="150" |
| | | show-overflow-tooltip |
| | | /> |
| | | <el-table-column |
| | | label="检查内容" |
| | | prop="hierarchyName" |
| | | min-width="150" |
| | | show-overflow-tooltip |
| | | /> |
| | | <el-table-column |
| | | label="问题描述" |
| | | prop="description" |
| | | min-width="200" |
| | | show-overflow-tooltip |
| | | /> |
| | | <el-table-column |
| | | label="问题部位" |
| | | prop="problemPart" |
| | | min-width="150" |
| | | show-overflow-tooltip |
| | | /> |
| | | <el-table-column |
| | | label="问题备注" |
| | | prop="remark" |
| | | min-width="150" |
| | | show-overflow-tooltip |
| | | /> |
| | | <el-table-column label="隐患等级" min-width="120"> |
| | | <CustomTable :key="activeTab" :data="tableData" height="800" style="border: 2px solid #3d7fff" |
| | | v-loading="loading"> |
| | | <el-table-column v-if="!isProjectMode" label="项目名称" prop="projectName" min-width="150" /> |
| | | <el-table-column label="检查计划" prop="planName" min-width="150" show-overflow-tooltip /> |
| | | <el-table-column label="检查内容" prop="hierarchyName" min-width="150" show-overflow-tooltip /> |
| | | <el-table-column label="问题描述" prop="description" min-width="200" show-overflow-tooltip /> |
| | | <el-table-column label="问题部位" prop="problemPart" min-width="150" show-overflow-tooltip /> |
| | | <el-table-column label="问题备注" prop="remark" min-width="150" show-overflow-tooltip /> |
| | | <el-table-column label="隐患等级" min-width="120" prop="level"> |
| | | <template #default="{ row }"> |
| | | <span>{{ getLevelText(row.level) }}</span> |
| | | <span>{{getLevelText(row.level) }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column v-if="activeTab == 1" label="隐患类型" min-width="120"> |
| | |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="检查时间" prop="createTime" min-width="180" /> |
| | | <el-table-column |
| | | v-if="showReformedFilter" |
| | | label="整改状态" |
| | | min-width="120" |
| | | > |
| | | <el-table-column v-if="showReformedFilter" label="整改状态" min-width="120"> |
| | | <template #default="{ row }"> |
| | | <div class="flex a-center j-center"> |
| | | <div class="ripple"> |
| | |
| | | return; |
| | | } |
| | | |
| | | const res = await getProjectList({ |
| | | clientId: clientId, |
| | | projectCategory: ["ongoing", "fixed"][ |
| | | localStorage.getItem("activeTab") - 1 |
| | | ], |
| | | }); |
| | | const res = await getProjectList({ clientId: clientId, projectCategory: ["ongoing", "fixed"][localStorage.getItem('activeTab') - 1] }); |
| | | if (res && res) { |
| | | this.projectList = res.map((item) => ({ |
| | | label: item.name, |
| | |
| | | |
| | | // 获取隐患等级文本 |
| | | getLevelText(level) { |
| | | const key = `P${level + 1}`; |
| | | return errorLevelMap[key] || "-"; |
| | | console.log('获取隐患等级文本:', this.levelOptions) |
| | | console.log('level level',level) |
| | | return this.levelOptions[level].label || '-' |
| | | }, |
| | | |
| | | // 获取整改状态文本 |
| | |
| | | userFiles: item.pictures || item.userFiles || [], // 图片列表 |
| | | fileNum: item.pictures ? item.pictures.length : (item.fileNum || 0), // 图片数量 |
| | | // 隐患等级转换:委托方 1-4 -> 项目端 0-3 |
| | | level: item.level !== undefined && item.level !== null ? item.level - 1 : item.level, |
| | | level: item.level !== undefined && item.level !== null ? item.level : item.level, |
| | | // 整改状态兼容:委托方 boolean -> 项目端 number |
| | | reformed: typeof item.reformed === 'boolean' ? (item.reformed ? 1 : 0) : item.reformed, |
| | | } |
| | |
| | | console.log('res', res) |
| | | this.projectName = res.name |
| | | const permissions = res.permissionProject ? res.permissionProject.split(",") : [] |
| | | this.permissionProject = ['1', '2', '3', '4', '5', '6', '7'] || permissions |
| | | this.permissionProject = permissions |
| | | localStorage.setItem("permissionProject", JSON.stringify(permissions)); |
| | | localStorage.setItem("deviceTemplateId", res.deviceTemplateId);//设备模板id |
| | | localStorage.setItem("safetyId", res.safetyId);//安全报告模板id |