Merge branch 'main' of http://120.76.84.145:10101/gitblit/r/H5/smartBuilding
| | |
| | | withCredentials: false, |
| | | timeout: 30000, |
| | | }) |
| | | console.log('process.env.VUE_APP_BASE_URL',process.env.VUE_APP_BASE_URL) |
| | | |
| | | |
| | | // 请求拦截 |
| | | service.interceptors.request.use( |
| | |
| | | |
| | | // 使用统一方法,根据用户类型调用对应接口 |
| | | getDeviceListByType({ ...params }, this.isClient).then(res => { |
| | | console.log('设备列表', res) |
| | | |
| | | // 处理 properties 字段 |
| | | this.tableList = res.records.map(item => { |
| | | return { |
| | |
| | | }, |
| | | |
| | | handleSizeChange(val) { |
| | | console.log(`每页 ${val} 条`); |
| | | |
| | | this.pageSize = val; |
| | | this.currentPage = 1; // 改变每页条数时重置到第一页 |
| | | this.getList(); |
| | | }, |
| | | |
| | | handleCurrentChange(val) { |
| | | console.log(`当前页: ${val}`); |
| | | |
| | | this.currentPage = val; |
| | | this.getList(); |
| | | }, |
| | |
| | | |
| | | // 使用统一方法,根据用户类型调用对应接口 |
| | | getDeviceDetailCheckListByType(params, this.isClient).then(res => { |
| | | console.log('设备详情检查列表', res); |
| | | |
| | | this.detailCheckList = res.records || []; |
| | | this.detailTotal = res.total || 0; |
| | | }).catch(err => { |
| | |
| | | |
| | | // 详情弹窗分页 - 每页条数改变 |
| | | handleDetailSizeChange(val) { |
| | | console.log(`详情每页 ${val} 条`); |
| | | |
| | | this.detailPageSize = val; |
| | | this.detailCurrentPage = 1; |
| | | this.getDetailCheckList(); |
| | |
| | | |
| | | // 详情弹窗分页 - 当前页改变 |
| | | handleDetailCurrentChange(val) { |
| | | console.log(`详情当前页: ${val}`); |
| | | |
| | | this.detailCurrentPage = val; |
| | | this.getDetailCheckList(); |
| | | }, |
| | |
| | | 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"> |
| | |
| | | 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, |
| | | }; |
| | | }, |
| | |
| | | this.generalHiddenDangerConfig = generalHiddenDanger |
| | | ? Number(generalHiddenDanger) |
| | | : 1; |
| | | |
| | | console.log("隐患配置加载:", { |
| | | bigHiddenDanger: this.bigHiddenDangerConfig, |
| | | generalHiddenDanger: this.generalHiddenDangerConfig, |
| | | }); |
| | | } catch (error) { |
| | | console.error("加载配置失败:", error); |
| | | // 默认都开启 |
| | |
| | | |
| | | // 获取隐患等级文本 |
| | | getLevelText(level) { |
| | | console.log('获取隐患等级文本:', this.levelOptions) |
| | | console.log('level level',level) |
| | | |
| | | |
| | | return this.levelOptions[level].label || '-' |
| | | }, |
| | | |
| | |
| | | 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"> |
| | |
| | | <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> |
| | |
| | | detailLoading: false, |
| | | // 图片预览数据 |
| | | previewImages: [], |
| | | VUE_APP_IMAGE_BASE_URL: process.env.VUE_APP_IMAGE_BASE_URL + '/project/download/' |
| | | }; |
| | | }, |
| | | computed: { |
| | |
| | | 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("暂无图片"); |
| | |
| | | } |
| | | |
| | | // 检查 Word 文档是否生成成功 |
| | | console.log('Word文档生成成功:', wordBlob instanceof Blob, 'size:', wordBlob.size); |
| | | |
| | | |
| | | if (!wordBlob || wordBlob.size === 0) { |
| | | this.$message.error("报告生成失败"); |
| | |
| | | return; |
| | | } |
| | | |
| | | console.log('PDF链接响应:', pdfUrlResponse); |
| | | |
| | | |
| | | // 根据后端返回的数据结构获取PDF链接 |
| | | // 假设后端返回格式为 { data: "http://xxx.pdf" } 或直接返回字符串 |
| | |
| | | withCredentials: false, |
| | | timeout: 60000, // 文件下载可能需要更长时间 |
| | | }) |
| | | console.log('process.env.VUE_ADMIN_BASE_URL',process.env.VUE_ADMIN_BASE_URL) |
| | | |
| | | |
| | | // 请求拦截 - 添加 token |
| | | reportRequest.interceptors.request.use( |
| | |
| | | this.projectId = this.$route.query.projectId || '' |
| | | // 添加错误处理,确保登录信息获取失败不影响其他模块 |
| | | getLoginInfo({ id: this.projectId, type: 2 }).then(res => { |
| | | console.log('res', res) |
| | | |
| | | this.projectName = res.name |
| | | const permissions = res.permissionProject ? res.permissionProject.split(",") : [] |
| | | this.permissionProject = permissions |
| | |
| | | }); |
| | | |
| | | const contentType = response.headers.get('Content-Type') || ''; |
| | | console.log(`URL: ${url}, Content-Type: ${contentType}`); |
| | | |
| | | |
| | | // 判断是否为视频 |
| | | if (contentType.startsWith('video/')) { |
| | |
| | | developmentCompanyInfo: developmentCompanyInfo, |
| | | supervisorCompanyInfo: supervisorCompanyInfo, |
| | | } |
| | | console.log('projectInfo projectInfo', this.projectInfo) |
| | | |
| | | }).catch(err => { |
| | | console.error('获取项目详情失败:', err) |
| | | // 设置默认值 |
| | |
| | | // 隐患数量 - 添加错误处理 |
| | | getDangerCount(this.projectId).then(res => { |
| | | this.dangerCount = res |
| | | console.log('getDangerCount getDangerCount', res) |
| | | |
| | | }).catch(err => { |
| | | console.error('获取隐患数量失败:', err) |
| | | this.dangerCount = { |
| | |
| | | // 向每个 series-surface 传入不同的参数方程 series-surface.parametricEquation,也就是实现每一个扇形。 |
| | | for (let i = 0; i < series.length; i++) { |
| | | endValue = startValue + series[i].pieData.value; |
| | | console.log(series[i]); |
| | | |
| | | series[i].pieData.startRatio = startValue / sumValue; |
| | | series[i].pieData.endRatio = endValue / sumValue; |
| | | series[i].parametricEquation = this.getParametricEquation( |
| | |
| | | |
| | | try { |
| | | const res = await getProjectDangerousTrend(params); |
| | | console.log('项目风险趋势数据:', res); |
| | | |
| | | |
| | | if (res && Array.isArray(res)) { |
| | | // 处理接口返回的数据 |
| | |
| | | // 将A、B、C转换为数值 3、2、1 |
| | | this.riskTrendData.seriesData = res.map(item => { |
| | | const value = this.levelToValue(item.level); |
| | | console.log(`level: ${item.level} -> value: ${value}`); |
| | | |
| | | return value; |
| | | }); |
| | | |
| | | console.log('转换后的数据:', { |
| | | xAxisData: this.riskTrendData.xAxisData, |
| | | seriesData: this.riskTrendData.seriesData |
| | | }); |
| | | |
| | | // 更新图表 |
| | |
| | | } |
| | | |
| | | // 检查 Word 文档是否生成成功 |
| | | console.log('Word文档生成成功:', wordBlob instanceof Blob, 'size:', wordBlob.size); |
| | | |
| | | |
| | | if (!wordBlob || wordBlob.size === 0) { |
| | | this.$message.error("报告生成失败"); |
| | |
| | | return; |
| | | } |
| | | |
| | | console.log('PDF链接响应:', pdfUrlResponse); |
| | | |
| | | |
| | | // 根据后端返回的数据结构获取PDF链接 |
| | | // 假设后端返回格式为 { data: "http://xxx.pdf" } 或直接返回字符串 |
| | |
| | | timeout: 60000, // 文件下载可能需要更长时间 |
| | | }) |
| | | |
| | | console.log('process.env.VUE_ADMIN_BASE_URL', process.env) |
| | | |
| | | |
| | | // 请求拦截 - 添加 token |
| | | reportRequest.interceptors.request.use( |
| | |
| | | }); |
| | | |
| | | const contentType = response.headers.get('Content-Type') || ''; |
| | | console.log(`URL: ${url}, Content-Type: ${contentType}`); |
| | | |
| | | |
| | | // 判断是否为视频 |
| | | if (contentType.startsWith('video/')) { |
| | |
| | | this.loading = true; |
| | | try { |
| | | const res = await getTrendList(params); |
| | | console.log('11111111111',res) |
| | | |
| | | if (res) { |
| | | this.processTableData(res || []); |
| | | } else { |