From cad9b21562e9f3367843a9896011209514c38b38 Mon Sep 17 00:00:00 2001 From: haha Date: Fri, 14 Mar 2025 00:06:46 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=89=E5=85=A8=E9=9A=90=E6=82=A3=E5=A4=A7?= =?UTF-8?q?=E5=B1=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yanzhu-bigscreen/src/api/index.js | 35 +- yanzhu-bigscreen/src/api/safety.js | 42 ++ .../src/assets/icons/svg/notesearch.svg | 8 + yanzhu-bigscreen/src/components/header.vue | 17 +- .../src/components/module/module-one-3-1.vue | 42 ++ .../project-overview-chart.vue | 0 yanzhu-bigscreen/src/router/index.js | 23 +- yanzhu-bigscreen/src/utils/request.js | 259 +++++---- yanzhu-bigscreen/src/views/greenCarbon.vue | 99 ++-- yanzhu-bigscreen/src/views/init.js | 167 +++--- yanzhu-bigscreen/src/views/projectDetail.vue | 19 +- yanzhu-bigscreen/src/views/safetyCheck.vue | 505 ++++++++++++++++++ .../mapper/SmzSspProblemmodifyMapper.java | 7 + .../trouble/SmzSspProblemmodifyMapper.xml | 21 +- .../SmzSspProblemmodifyController.java | 2 +- .../service/ISmzSspProblemmodifyService.java | 6 + .../impl/SmzSspAuditinfoServiceImpl.java | 2 +- .../impl/SmzSspProblemmodifyServiceImpl.java | 9 + 18 files changed, 984 insertions(+), 279 deletions(-) create mode 100644 yanzhu-bigscreen/src/api/safety.js create mode 100644 yanzhu-bigscreen/src/assets/icons/svg/notesearch.svg create mode 100644 yanzhu-bigscreen/src/components/module/module-one-3-1.vue rename yanzhu-bigscreen/src/{components-old => components}/project-overview-chart.vue (100%) create mode 100644 yanzhu-bigscreen/src/views/safetyCheck.vue diff --git a/yanzhu-bigscreen/src/api/index.js b/yanzhu-bigscreen/src/api/index.js index 2e81d2d3..6c42d644 100644 --- a/yanzhu-bigscreen/src/api/index.js +++ b/yanzhu-bigscreen/src/api/index.js @@ -1,18 +1,19 @@ - -import {axios,download} from '@/utils/request' -import project from './project' -import weather from './weather' -import detail from './detail' -import dict from './dict' -import greenCarbon from './greenCarbon' -import videoMonitor from './videoMonitor' +import { axios, download } from "@/utils/request"; +import project from "./project"; +import weather from "./weather"; +import detail from "./detail"; +import dict from "./dict"; +import greenCarbon from "./greenCarbon"; +import videoMonitor from "./videoMonitor"; +import safety from "./safety"; export default { - http:axios, - downFile:download, - project, - weather, - detail, - dict, - greenCarbon, - videoMonitor -} \ No newline at end of file + http: axios, + downFile: download, + project, + weather, + detail, + dict, + greenCarbon, + videoMonitor, + safety, +}; diff --git a/yanzhu-bigscreen/src/api/safety.js b/yanzhu-bigscreen/src/api/safety.js new file mode 100644 index 00000000..603ddabe --- /dev/null +++ b/yanzhu-bigscreen/src/api/safety.js @@ -0,0 +1,42 @@ +import request from "@/utils/request"; + +const groupByProblemType = (data) => { + return request({ + url: `/manage/problemmodify/groupByProblemType`, + method: "post", + data, + }); +}; + +const groupByDangerType = (data) => { + return request({ + url: `/manage/problemmodify/groupByDangerType`, + method: "post", + data, + }); +}; + +const listCountForBG = (data) => { + return request({ + url: `/manage/problemmodify/listCountForBG`, + method: "get", + params: data, + }); +}; + +const listForBG = (data) => { + data.pageSize = 5; + data.pageNum = 1; + return request({ + url: `/manage/problemmodify/listForBG`, + method: "get", + params: data, + }); +}; + +export default { + groupByProblemType, + groupByDangerType, + listCountForBG, + listForBG, +}; diff --git a/yanzhu-bigscreen/src/assets/icons/svg/notesearch.svg b/yanzhu-bigscreen/src/assets/icons/svg/notesearch.svg new file mode 100644 index 00000000..9042c1e1 --- /dev/null +++ b/yanzhu-bigscreen/src/assets/icons/svg/notesearch.svg @@ -0,0 +1,8 @@ + + + + + \ No newline at end of file diff --git a/yanzhu-bigscreen/src/components/header.vue b/yanzhu-bigscreen/src/components/header.vue index bb6c20db..edba6942 100644 --- a/yanzhu-bigscreen/src/components/header.vue +++ b/yanzhu-bigscreen/src/components/header.vue @@ -92,7 +92,7 @@ - 数字建安施工管理平台 + {{ selProject?.setting?.orgName || '数字建安施工管理平台' }}
@@ -203,6 +203,9 @@ export default { case 309: this.$router.push("/videoMonitor"); break; + case 301: + this.$router.push("/safetyCheck"); + break; case 4: this.$router.push("/prjQuality"); break; @@ -309,6 +312,7 @@ export default { padding: 5px 40px; position: relative; top: -8px; + .prj-logo { width: 40px; height: 40px; @@ -362,12 +366,13 @@ export default { .header-center { font-size: 52px !important; margin-top: 10px; + .prj-logo { - width: 50px; - height: 50px; - vertical-align: middle; - border-radius: 25px; - } + width: 50px; + height: 50px; + vertical-align: middle; + border-radius: 25px; + } } .header-title-user-info { diff --git a/yanzhu-bigscreen/src/components/module/module-one-3-1.vue b/yanzhu-bigscreen/src/components/module/module-one-3-1.vue new file mode 100644 index 00000000..a411c9bb --- /dev/null +++ b/yanzhu-bigscreen/src/components/module/module-one-3-1.vue @@ -0,0 +1,42 @@ + + + + \ No newline at end of file diff --git a/yanzhu-bigscreen/src/components-old/project-overview-chart.vue b/yanzhu-bigscreen/src/components/project-overview-chart.vue similarity index 100% rename from yanzhu-bigscreen/src/components-old/project-overview-chart.vue rename to yanzhu-bigscreen/src/components/project-overview-chart.vue diff --git a/yanzhu-bigscreen/src/router/index.js b/yanzhu-bigscreen/src/router/index.js index efe540f3..58e1450d 100644 --- a/yanzhu-bigscreen/src/router/index.js +++ b/yanzhu-bigscreen/src/router/index.js @@ -10,7 +10,7 @@ const routes = [ meta: { nav: 1 }, component: () => import(/* webpackChunkName: "index" */ "../views/index.vue"), - }, + }, { path: "/detail", name: "detail", @@ -38,23 +38,30 @@ const routes = [ meta: { nav: 23 }, component: () => import(/* webpackChunkName: "progress" */ "../views/projectProgress.vue"), - }, + }, { path: "/greenCarbon", name: "greenCarbon", meta: { nav: 23 }, component: () => import(/* webpackChunkName: "progress" */ "../views/greenCarbon.vue"), - }, + }, { path: "/videoMonitor", name: "videoMonitor", - meta: { nav: 23 }, + meta: { nav: 309 }, component: () => - import(/* webpackChunkName: "videoMonitor" */ "../views/videoMonitor.vue"), - }, - - + import( + /* webpackChunkName: "videoMonitor" */ "../views/videoMonitor.vue" + ), + }, + { + path: "/safetyCheck", + name: "safetyCheck", + meta: { nav: 301 }, + component: () => + import(/* webpackChunkName: "safetyCheck" */ "../views/safetyCheck.vue"), + }, ]; const router = new VueRouter({ mode: "hash", diff --git a/yanzhu-bigscreen/src/utils/request.js b/yanzhu-bigscreen/src/utils/request.js index 812e5c20..ba7eefa3 100644 --- a/yanzhu-bigscreen/src/utils/request.js +++ b/yanzhu-bigscreen/src/utils/request.js @@ -1,160 +1,199 @@ -import axios from 'axios' -import { Notification, MessageBox, Message, Loading } from 'element-ui' -import { getToken } from '@/utils/auth' -import errorCode from '@/utils/errorCode' +import axios from "axios"; +import { Notification, MessageBox, Message, Loading } from "element-ui"; +import { getToken } from "@/utils/auth"; +import errorCode from "@/utils/errorCode"; import { tansParams, blobValidate } from "@/utils/ruoyi"; -import cache from '@/plugins/cache' -import { saveAs } from 'file-saver' -import Cookies from 'js-cookie' +import cache from "@/plugins/cache"; +import { saveAs } from "file-saver"; +import Cookies from "js-cookie"; let downloadLoadingInstance; // 是否显示重新登录 export let isRelogin = { show: false }; -axios.defaults.headers['Content-Type'] = 'application/json;charset=utf-8' +axios.defaults.headers["Content-Type"] = "application/json;charset=utf-8"; // 创建axios实例 const service = axios.create({ // axios中请求配置有baseURL选项,表示请求URL公共部分 baseURL: process.env.VUE_APP_BASE_API, // 超时 - timeout: 200000 -}) + timeout: 200000, +}); // request拦截器 -service.interceptors.request.use(config => { - // 是否需要设置 token - const isToken = (config.headers || {}).isToken === false - // 是否需要防止数据重复提交 - const isRepeatSubmit = (config.headers || {}).repeatSubmit === false - if (getToken() && !isToken) { - config.headers['Authorization'] = 'Bearer ' + getToken() // 让每个请求携带自定义token 请根据实际情况自行修改 - } - config.headers["proType"]=localStorage.getItem("proType")||"0"; - // get请求映射params参数 - if (config.method === 'get' && config.params) { - let url = config.url + '?' + tansParams(config.params); - url = url.slice(0, -1); - config.params = {}; - config.url = url; - } - if (!isRepeatSubmit && (config.method === 'post' || config.method === 'put')) { - const requestObj = { - url: config.url, - data: typeof config.data === 'object' ? JSON.stringify(config.data) : config.data, - time: new Date().getTime() +service.interceptors.request.use( + (config) => { + // 是否需要设置 token + const isToken = (config.headers || {}).isToken === false; + // 是否需要防止数据重复提交 + const isRepeatSubmit = (config.headers || {}).repeatSubmit === false; + if (getToken() && !isToken) { + config.headers["Authorization"] = "Bearer " + getToken(); // 让每个请求携带自定义token 请根据实际情况自行修改 } - const sessionObj = cache.session.getJSON('sessionObj') - if (sessionObj === undefined || sessionObj === null || sessionObj === '') { - cache.session.setJSON('sessionObj', requestObj) - } else { - const s_url = sessionObj.url; // 请求地址 - const s_data = sessionObj.data; // 请求数据 - const s_time = sessionObj.time; // 请求时间 - const interval = 1000; // 间隔时间(ms),小于此时间视为重复提交 - if (s_data === requestObj.data && requestObj.time - s_time < interval && s_url === requestObj.url) { - const message = '数据正在处理,请勿重复提交'; - console.warn("--->",s_data,requestObj.data,s_url) - return Promise.reject(new Error(message)) + config.headers["proType"] = localStorage.getItem("proType") || "0"; + // get请求映射params参数 + if (config.method === "get" && config.params) { + let url = config.url + "?" + tansParams(config.params); + url = url.slice(0, -1); + config.params = {}; + config.url = url; + } + if ( + !isRepeatSubmit && + (config.method === "post" || config.method === "put") + ) { + const requestObj = { + url: config.url, + data: + typeof config.data === "object" + ? JSON.stringify(config.data) + : config.data, + time: new Date().getTime(), + }; + const sessionObj = cache.session.getJSON("sessionObj"); + if ( + sessionObj === undefined || + sessionObj === null || + sessionObj === "" + ) { + cache.session.setJSON("sessionObj", requestObj); } else { - cache.session.setJSON('sessionObj', requestObj) + const s_url = sessionObj.url; // 请求地址 + const s_data = sessionObj.data; // 请求数据 + const s_time = sessionObj.time; // 请求时间 + const interval = 1000; // 间隔时间(ms),小于此时间视为重复提交 + if ( + s_data === requestObj.data && + requestObj.time - s_time < interval && + s_url === requestObj.url + ) { + const message = "数据正在处理,请勿重复提交"; + console.warn("--->", s_data, requestObj.data, s_url); + return Promise.reject(new Error(message)); + } else { + cache.session.setJSON("sessionObj", requestObj); + } } } + return config; + }, + (error) => { + console.log(error); + Promise.reject(error); } - return config -}, error => { - console.log(error) - Promise.reject(error) -}) +); // 响应拦截器 -service.interceptors.response.use(res => { +service.interceptors.response.use( + (res) => { // 未设置状态码则默认成功状态 const code = res.data.code || 200; // 获取错误信息 - const msg = errorCode[code] || res.data.msg || errorCode['default'] + const msg = errorCode[code] || res.data.msg || errorCode["default"]; // 二进制数据则直接返回 - if (res.request.responseType === 'blob' || res.request.responseType === 'arraybuffer') { - return res.data + if ( + res.request.responseType === "blob" || + res.request.responseType === "arraybuffer" + ) { + return res.data; } if (code === 401) { if (!isRelogin.show) { isRelogin.show = true; - MessageBox.confirm('登录状态已过期,您可以继续留在该页面,或者重新登录', '系统提示', { confirmButtonText: '重新登录', cancelButtonText: '取消', type: 'warning' }).then(() => { - isRelogin.show = false; - if(location.href.indexOf("localhost")>=0){ - //location.href = `/#/login?redirect=${encodeURIComponent("/xdbs/")}`; - location.href=`http://localhost/#/login?redirect=${encodeURI('http://localhost:3000/xdbs/')}` - }else{ - location.href = window.XDAPP+`#/login?redirect=${encodeURIComponent(window.XDBSAPP)}`; + MessageBox.confirm( + "登录状态已过期,您可以继续留在该页面,或者重新登录", + "系统提示", + { + confirmButtonText: "重新登录", + cancelButtonText: "取消", + type: "warning", } - }).catch(() => { - isRelogin.show = false; - }); - } - return Promise.reject('error') + ) + .then(() => { + isRelogin.show = false; + if (location.href.indexOf("localhost") >= 0) { + //location.href = `/#/login?redirect=${encodeURIComponent("/xdbs/")}`; + location.href = `http://localhost/#/login?redirect=${encodeURI( + "http://localhost:3000/xdbs/" + )}`; + } else { + location.href = + window.XDAPP + + `#/login?redirect=${encodeURIComponent(window.XDBSAPP)}`; + } + }) + .catch(() => { + isRelogin.show = false; + }); + } + return Promise.reject("error"); } else if (code === 500) { - if(msg.indexOf('重复提交')==-1){ - Message({ message: msg, type: 'error' }) + if (msg.indexOf("重复提交") == -1) { + Message({ message: msg, type: "error" }); } - return Promise.reject(new Error(msg)) + return Promise.reject(new Error(msg)); } else if (code === 601) { - if(msg.indexOf('重复提交')==-1){ - Message({ message: msg, type: 'warning' }) + if (msg.indexOf("重复提交") == -1) { + Message({ message: msg, type: "warning" }); } - return Promise.reject('error') + return Promise.reject("error"); } else if (code !== 200) { - if(msg.indexOf('重复提交')==-1){ - Notification.error({ title: msg }) + if (msg.indexOf("重复提交") == -1) { + Notification.error({ title: msg }); } - return Promise.reject('error') + return Promise.reject("error"); } else { - return res.data + return res.data; } }, - error => { - console.log('err' + error) + (error) => { + console.log("err" + error); let { message } = error; if (message == "Network Error") { message = "后端接口连接异常"; - } else if (message.includes("Request failed with status code")) { + } else if (message.includes("Request failed with status code")) { message = "系统接口" + message.substr(message.length - 3) + "异常"; } - if(message.indexOf('重复提交')==-1){ - Message({ message: message, type: 'error', duration: 5 * 1000 }) + if (message.indexOf("重复提交") == -1) { + Message({ message: message, type: "error", duration: 5 * 1000 }); } - return Promise.reject(error) + return Promise.reject(error); } -) +); // 通用下载方法 -export function download(url, params, filename, config={}) { - downloadLoadingInstance = Loading.service({ text: "正在下载数据,请稍候", spinner: "el-icon-loading", background: "rgba(0, 0, 0, 0.7)", }) +export function download(url, params, filename, config = {}) { + downloadLoadingInstance = Loading.service({ + text: "正在下载数据,请稍候", + spinner: "el-icon-loading", + background: "rgba(0, 0, 0, 0.7)", + }); return axios({ - url:url, - method:"get", - params:params||{}, - responseType: 'blob', - ...config - }).then(async ({data}) => { - - const isBlob = blobValidate(data); - if (isBlob) { - const blob = new Blob([data]) - saveAs(blob, filename) - } else { - const resText = await data.text(); - const rspObj = JSON.parse(resText); - const errMsg = errorCode[rspObj.code] || rspObj.msg || errorCode['default'] - Message.error(errMsg); - } - downloadLoadingInstance.close(); - }).catch((r) => { - console.error(r) - Message.error('下载文件出现错误,请联系管理员!') - downloadLoadingInstance.close(); + url: url, + method: "get", + params: params || {}, + responseType: "blob", + ...config, }) + .then(async ({ data }) => { + const isBlob = blobValidate(data); + if (isBlob) { + const blob = new Blob([data]); + saveAs(blob, filename); + } else { + const resText = await data.text(); + const rspObj = JSON.parse(resText); + const errMsg = + errorCode[rspObj.code] || rspObj.msg || errorCode["default"]; + Message.error(errMsg); + } + downloadLoadingInstance.close(); + }) + .catch((r) => { + console.error(r); + Message.error("下载文件出现错误,请联系管理员!"); + downloadLoadingInstance.close(); + }); } - - -export { axios,service} -export default service +export { axios, service }; +export default service; diff --git a/yanzhu-bigscreen/src/views/greenCarbon.vue b/yanzhu-bigscreen/src/views/greenCarbon.vue index 0b81f845..b1b4fabb 100644 --- a/yanzhu-bigscreen/src/views/greenCarbon.vue +++ b/yanzhu-bigscreen/src/views/greenCarbon.vue @@ -51,9 +51,9 @@
-
+
-
{{ (leftPowerData[1]/1000.0).toFixed(1) }}
+
{{ (leftPowerData[1] / 1000.0).toFixed(1) }}
(T CO₂)
@@ -63,9 +63,9 @@
-
+
-
{{ (leftPowerData[2]/1000.0).toFixed(1) }}
+
{{ (leftPowerData[2] / 1000.0).toFixed(1) }}
(T CO₂)
@@ -87,7 +87,7 @@ 碳排放预估总量(T CO₂)
- +
@@ -98,7 +98,7 @@ 碳排放监测累计总量(T CO₂)
- +
@@ -109,7 +109,7 @@ 当月碳排放监测量(T CO₂)
- +
@@ -167,8 +167,8 @@ export default { curMonthData: [], yearMonthData: {}, leftOilData: [0, 0, 0, 0], - leftPowerData:[0,0,0,40,60], - totalData:[0,0,0], + leftPowerData: [0, 0, 0, 40, 60], + totalData: [0, 0, 0], } }, mounted() { @@ -232,19 +232,19 @@ export default { (Math.round(tmps[0].sumEstimateValue / 10000) + 1) * 10, ] : [0, 0, 0, 0]; tmps = this.allData.filter(it => it.factorType == 3); - this.leftPowerData=tmps.length>0?[ + this.leftPowerData = tmps.length > 0 ? [ tmps[0].practicalValue, tmps[0].sumPracticalValue, tmps[0].sumEmissionReduction, - tmps[0].sumEstimateValue==0?0:tmps[0].sumPracticalValue*100/tmps[0].sumEstimateValue, - tmps[0].sumEstimateValue==0?0:tmps[0].sumEmissionReduction*100/tmps[0].sumEstimateValue, + tmps[0].sumEstimateValue == 0 ? 0 : tmps[0].sumPracticalValue * 100 / tmps[0].sumEstimateValue, + tmps[0].sumEstimateValue == 0 ? 0 : tmps[0].sumEmissionReduction * 100 / tmps[0].sumEstimateValue, - ]:[0,0,0,0,0]; + ] : [0, 0, 0, 0, 0]; tmps = this.allData.filter(it => it.factorType == 0); - this.totalData[0]=tmps.length>0?tmps[0].sumEstimateValue:0; - this.totalData[1]=tmps.length>0?tmps[0].sumPracticalValue:0; - tmps=this.curMonthData.filter(it=>it.factorType==0); - this.totalData[2]=tmps.length>0?tmps[0].emissionReduction:0 + this.totalData[0] = tmps.length > 0 ? tmps[0].sumEstimateValue : 0; + this.totalData[1] = tmps.length > 0 ? tmps[0].sumPracticalValue : 0; + tmps = this.curMonthData.filter(it => it.factorType == 0); + this.totalData[2] = tmps.length > 0 ? tmps[0].emissionReduction : 0 this.chartKey++; }); }, @@ -467,19 +467,19 @@ export default { return option; }, renderChart4() { - let sum=(objs)=>{ - let res=0; - objs.forEach(it=>{ - res+=(it||0); + let sum = (objs) => { + let res = 0; + objs.forEach(it => { + res += (it || 0); }); return res; } let is1K = this.$dpi() == "1K"; let is2K = this.$dpi() == "2K"; - let datas=[0,0,0]; - datas[0]=this.yearMonthData.buildData?sum(this.yearMonthData.buildData.emissionReduction.datas):0; - datas[1]=this.yearMonthData.oilData?sum(this.yearMonthData.oilData.emissionReduction.datas):0; - datas[2]=this.yearMonthData.powerData?sum(this.yearMonthData.powerData.emissionReduction.datas):0; + let datas = [0, 0, 0]; + datas[0] = this.yearMonthData.buildData ? sum(this.yearMonthData.buildData.emissionReduction.datas) : 0; + datas[1] = this.yearMonthData.oilData ? sum(this.yearMonthData.oilData.emissionReduction.datas) : 0; + datas[2] = this.yearMonthData.powerData ? sum(this.yearMonthData.powerData.emissionReduction.datas) : 0; let option = { legend: { @@ -555,7 +555,7 @@ export default { }, tooltip: { trigger: "axis", - valueFormatter: (v) => { return v?v:'- ' + 'T CO₂' }, + valueFormatter: (v) => { return v ? v : '- ' + 'T CO₂' }, textStyle: { fontSize: is1K ? 12 : is2K ? 14 : 24 }, @@ -576,7 +576,7 @@ export default { { type: "category", boundaryGap: false, - data: this.yearMonthData?.totalData?.emissionReduction?.titles||[], + data: this.yearMonthData?.totalData?.emissionReduction?.titles || [], axisLabel: { fontSize: is1K ? 12 : is2K ? 14 : 24, color: "#a2c8f9" @@ -603,7 +603,7 @@ export default { }, }, ], - series: [ + series: [ { name: '碳预估', type: "line", @@ -619,7 +619,7 @@ export default { itemStyle: { normal: { areaStyle: { type: "default", color: "#7ddff2", opacity: 0.1 } }, }, - data: this.yearMonthData?.totalData?.estimate?.datas||[], + data: this.yearMonthData?.totalData?.estimate?.datas || [], }, { name: '碳排放', @@ -636,7 +636,7 @@ export default { itemStyle: { normal: { areaStyle: { type: "default", color: "#006594", opacity: 0.1 } }, }, - data: this.yearMonthData?.totalData?.practical?.datas||[], + data: this.yearMonthData?.totalData?.practical?.datas || [], }, { name: '碳减排', @@ -653,7 +653,7 @@ export default { itemStyle: { normal: { areaStyle: { type: "default", color: "#7db800", opacity: 0.1 } }, }, - data: this.yearMonthData?.totalData?.emissionReduction?.datas||[], + data: this.yearMonthData?.totalData?.emissionReduction?.datas || [], }, ], }; @@ -672,7 +672,7 @@ export default { }, tooltip: { trigger: "axis", - valueFormatter: (v) => { return v?v:' - ' + 'T CO₂' }, + valueFormatter: (v) => { return v ? v : ' - ' + 'T CO₂' }, textStyle: { fontSize: is1K ? 12 : is2K ? 14 : 24 }, @@ -693,7 +693,7 @@ export default { { type: "category", boundaryGap: false, - data: this.yearMonthData?.buildData?.emissionReduction?.titles||[], + data: this.yearMonthData?.buildData?.emissionReduction?.titles || [], axisLabel: { fontSize: is1K ? 12 : is2K ? 14 : 24, color: "#a2c8f9" @@ -720,7 +720,7 @@ export default { }, }, ], - series: [ + series: [ { name: '碳预估', type: "bar", @@ -736,7 +736,7 @@ export default { itemStyle: { normal: { areaStyle: { type: "default", color: "#7ddff2", opacity: 0.1 } }, }, - data:this.yearMonthData?.buildData?.estimate?.datas||[], + data: this.yearMonthData?.buildData?.estimate?.datas || [], }, { name: '碳排放', @@ -753,7 +753,7 @@ export default { itemStyle: { normal: { areaStyle: { type: "default", color: "#006594", opacity: 0.1 } }, }, - data: this.yearMonthData?.buildData?.practical?.datas||[], + data: this.yearMonthData?.buildData?.practical?.datas || [], }, { name: '碳减排', @@ -770,10 +770,11 @@ export default { itemStyle: { normal: { areaStyle: { type: "default", color: "#7db800", opacity: 0.1 } }, }, - data: this.yearMonthData?.buildData?.emissionReduction?.datas||[], + data: this.yearMonthData?.buildData?.emissionReduction?.datas || [], }, ], }; + console.log(option) return option; }, renderChart7() { @@ -789,7 +790,7 @@ export default { }, tooltip: { trigger: "axis", - valueFormatter: (v) => { return v?v:' - ' + 'T CO₂' }, + valueFormatter: (v) => { return v ? v : ' - ' + 'T CO₂' }, textStyle: { fontSize: is1K ? 12 : is2K ? 14 : 24 }, @@ -810,7 +811,7 @@ export default { { type: "category", boundaryGap: false, - data: this.yearMonthData?.oilData?.emissionReduction?.titles||[], + data: this.yearMonthData?.oilData?.emissionReduction?.titles || [], axisLabel: { fontSize: is1K ? 12 : is2K ? 14 : 24, color: "#a2c8f9" @@ -837,7 +838,7 @@ export default { }, }, ], - series: [ + series: [ { name: '碳预估', type: "line", @@ -853,7 +854,7 @@ export default { itemStyle: { normal: { areaStyle: { type: "default", color: "#7ddff2", opacity: 0.1 } }, }, - data: this.yearMonthData?.oilData?.estimate?.datas||[], + data: this.yearMonthData?.oilData?.estimate?.datas || [], }, { name: '碳排放', @@ -870,7 +871,7 @@ export default { itemStyle: { normal: { areaStyle: { type: "default", color: "#006594", opacity: 0.1 } }, }, - data: this.yearMonthData?.oilData?.practical?.datas||[], + data: this.yearMonthData?.oilData?.practical?.datas || [], }, { name: '碳减排', @@ -887,7 +888,7 @@ export default { itemStyle: { normal: { areaStyle: { type: "default", color: "#7db800", opacity: 0.1 } }, }, - data: this.yearMonthData?.oilData?.emissionReduction?.datas||[], + data: this.yearMonthData?.oilData?.emissionReduction?.datas || [], }, ], }; @@ -906,7 +907,7 @@ export default { }, tooltip: { trigger: "axis", - valueFormatter: (v) => { return v?v:' - ' + 'T CO₂' }, + valueFormatter: (v) => { return v ? v : ' - ' + 'T CO₂' }, textStyle: { fontSize: is1K ? 12 : is2K ? 14 : 24 }, @@ -927,7 +928,7 @@ export default { { type: "category", boundaryGap: false, - data: this.yearMonthData?.powerData?.emissionReduction?.titles||[], + data: this.yearMonthData?.powerData?.emissionReduction?.titles || [], axisLabel: { fontSize: is1K ? 12 : is2K ? 14 : 24, color: "#a2c8f9" @@ -954,7 +955,7 @@ export default { }, }, ], - series: [ + series: [ { name: '碳预估', type: "bar", @@ -970,7 +971,7 @@ export default { itemStyle: { normal: { areaStyle: { type: "default", color: "#7ddff2", opacity: 0.1 } }, }, - data:this.yearMonthData?.powerData?.estimate?.datas||[], + data: this.yearMonthData?.powerData?.estimate?.datas || [], }, { name: '碳排放', @@ -987,7 +988,7 @@ export default { itemStyle: { normal: { areaStyle: { type: "default", color: "#006594", opacity: 0.1 } }, }, - data: this.yearMonthData?.powerData?.practical?.datas||[], + data: this.yearMonthData?.powerData?.practical?.datas || [], }, { name: '碳减排', @@ -1004,7 +1005,7 @@ export default { itemStyle: { normal: { areaStyle: { type: "default", color: "#7db800", opacity: 0.1 } }, }, - data: this.yearMonthData?.powerData?.emissionReduction?.datas||[], + data: this.yearMonthData?.powerData?.emissionReduction?.datas || [], }, ], }; diff --git a/yanzhu-bigscreen/src/views/init.js b/yanzhu-bigscreen/src/views/init.js index 54ce7f96..b56dd5b4 100644 --- a/yanzhu-bigscreen/src/views/init.js +++ b/yanzhu-bigscreen/src/views/init.js @@ -1,88 +1,99 @@ -import Vue from 'vue' -import Api from '../api/index' -import dayjs from 'dayjs' -import './style/index.less' -import dayfilter from '@/utils/dayfilter' -import {tryToJson} from '../utils/tools' -import { Loading } from 'element-ui'; +import Vue from "vue"; +import Api from "../api/index"; +import dayjs from "dayjs"; +import "./style/index.less"; +import dayfilter from "@/utils/dayfilter"; +import { tryToJson } from "../utils/tools"; +import { Loading } from "element-ui"; -import moduleOne11 from '../components/module/module-one-1-1.vue' -import moduleOne12 from '../components/module/module-one-1-2.vue' -import moduleOne13 from '../components/module/module-one-1-3.vue' -import moduleOne21 from '../components/module/module-one-2-1.vue' -import moduleOne22 from '../components/module/module-one-2-2.vue' -import moduleOne23 from '../components/module/module-one-2-3.vue' -import peopleNumber from '@/components/people-number.vue' -import dictTag from '@/components/DictTag/index.vue' -import MyDialog from '@/components/MyDialog.vue' -import MyChart from '@/components/MyChart.vue' +import moduleOne11 from "../components/module/module-one-1-1.vue"; +import moduleOne12 from "../components/module/module-one-1-2.vue"; +import moduleOne13 from "../components/module/module-one-1-3.vue"; +import moduleOne21 from "../components/module/module-one-2-1.vue"; +import moduleOne22 from "../components/module/module-one-2-2.vue"; +import moduleOne23 from "../components/module/module-one-2-3.vue"; +import moduleOne31 from "../components/module/module-one-3-1.vue"; +import peopleNumber from "@/components/people-number.vue"; +import dictTag from "@/components/DictTag/index.vue"; +import MyDialog from "@/components/MyDialog.vue"; +import MyChart from "@/components/MyChart.vue"; +import projectOverviewChart from "@/components/project-overview-chart.vue"; //import projectOverviewChart from '../components/project-overview-chart.vue' //import peopleNumber from '../components/people-number.vue' -import header from '../components/header.vue' +import header from "../components/header.vue"; Loading.install(Vue); //H265Player.install(Vue); dayfilter(Vue); -const vue=new Vue(); -Vue.component("screen-header",header) -Vue.component("module-one-1-1",moduleOne11) -Vue.component("module-one-1-2",moduleOne12) -Vue.component("module-one-1-3",moduleOne13) -Vue.component("module-one-2-1",moduleOne21) -Vue.component("module-one-2-2",moduleOne22) -Vue.component("module-one-2-3",moduleOne23) -Vue.component("people-number",peopleNumber) -Vue.component("my-chart",MyChart) -Vue.component("dict-tag",dictTag) -Vue.component("MyDialog",MyDialog) -Vue.prototype.$bus=new Vue(); +const vue = new Vue(); +Vue.component("screen-header", header); +Vue.component("module-one-1-1", moduleOne11); +Vue.component("module-one-1-2", moduleOne12); +Vue.component("module-one-1-3", moduleOne13); +Vue.component("module-one-2-1", moduleOne21); +Vue.component("module-one-2-2", moduleOne22); +Vue.component("module-one-2-3", moduleOne23); +Vue.component("module-one-3-1", moduleOne31); +Vue.component("people-number", peopleNumber); +Vue.component("my-chart", MyChart); +Vue.component("dict-tag", dictTag); +Vue.component("MyDialog", MyDialog); +Vue.component("project-overview-chart", projectOverviewChart); +Vue.prototype.$bus = new Vue(); //Vue.component("people-number",peopleNumber) //Vue.component("project-overview-chart",projectOverviewChart) -Vue.prototype.$api=Api; -Vue.prototype.$bus=vue; -Vue.prototype.$apiPath=process.env.VUE_APP_BASE_API -Vue.prototype.$dt=dayjs; -Vue.prototype.$tryToJson=tryToJson -Vue.prototype.$toggleFullScreen=(el)=>{ - if(document.fullscreenElement==el){ - let screen = document.cancelFullScreen || document.webkitCancelFullScreen || document.mozCancelFullScreen || document.exitFullScreen - if (typeof screen != "undefined" && screen) { - screen.call(document); - return; - } - - }else{ - let screen = el.requestFullScreen || el.webkitRequestFullScreen || el.mozRequestFullScreen || el.msRequestFullScreen - if (typeof screen != "undefined" && screen) { - screen.call(el); - return; - } +Vue.prototype.$api = Api; +Vue.prototype.$bus = vue; +Vue.prototype.$apiPath = process.env.VUE_APP_BASE_API; +Vue.prototype.$dt = dayjs; +Vue.prototype.$tryToJson = tryToJson; +Vue.prototype.$toggleFullScreen = (el) => { + if (document.fullscreenElement == el) { + let screen = + document.cancelFullScreen || + document.webkitCancelFullScreen || + document.mozCancelFullScreen || + document.exitFullScreen; + if (typeof screen != "undefined" && screen) { + screen.call(document); + return; } -} -Vue.prototype.$dpi=()=>{ - let w=document.querySelector(".main-app").clientWidth; - return w>2561?"4K":w<1920?"1K":"2K"; -} -Vue.filter('toDate',d=>{ - return dayjs(d).format("YYYY-MM-DD") -}); -Vue.filter('toDateTime',d=>{ - return dayjs(d).format("YYYY-MM-DD HH:mm:ss") -}); -Vue.filter('toTime',d=>{ - return dayjs(d).format("HH:mm:ss") -}); -window.__isfull__=false; -window.fullscreenInterval=setInterval(()=>{ - if(document.fullscreenElement){ - if(!window.__isfull__){ - vue.$emit("fullscreen",true); - window.__isfull__=true; - } - }else{ - if(window.__isfull__){ - vue.$emit("fullscreen",false); - window.__isfull__=false; - } + } else { + let screen = + el.requestFullScreen || + el.webkitRequestFullScreen || + el.mozRequestFullScreen || + el.msRequestFullScreen; + if (typeof screen != "undefined" && screen) { + screen.call(el); + return; } -},500); -window.xdcaches={}; + } +}; +Vue.prototype.$dpi = () => { + let w = document.querySelector(".main-app").clientWidth; + return w > 2561 ? "4K" : w < 1920 ? "1K" : "2K"; +}; +Vue.filter("toDate", (d) => { + return dayjs(d).format("YYYY-MM-DD"); +}); +Vue.filter("toDateTime", (d) => { + return dayjs(d).format("YYYY-MM-DD HH:mm:ss"); +}); +Vue.filter("toTime", (d) => { + return dayjs(d).format("HH:mm:ss"); +}); +window.__isfull__ = false; +window.fullscreenInterval = setInterval(() => { + if (document.fullscreenElement) { + if (!window.__isfull__) { + vue.$emit("fullscreen", true); + window.__isfull__ = true; + } + } else { + if (window.__isfull__) { + vue.$emit("fullscreen", false); + window.__isfull__ = false; + } + } +}, 500); +window.xdcaches = {}; diff --git a/yanzhu-bigscreen/src/views/projectDetail.vue b/yanzhu-bigscreen/src/views/projectDetail.vue index bc41a961..161a998d 100644 --- a/yanzhu-bigscreen/src/views/projectDetail.vue +++ b/yanzhu-bigscreen/src/views/projectDetail.vue @@ -275,7 +275,7 @@

{{ selProject.scheduledStartTime | toDate - }} + }}
@@ -291,7 +291,7 @@

{{ selProject.plannedCompletionTime | toDate - }} + }}
@@ -306,7 +306,7 @@

{{ selProject.actualOperatingTime | toDate - }} + }}
@@ -320,7 +320,8 @@ 合同工期

- {{ selProject.projectTimeLimit || '' }} 天 + {{ selProject.projectTimeLimit || '' }} + 天
@@ -490,7 +491,7 @@
当前风向
{{ weatherInfo.windDirection }}{{ weatherInfo.windScale - }} + }}
@@ -854,7 +855,7 @@ export default { } .led-number { - font-size: 40px; + font-size: 36px; } } } @@ -1150,7 +1151,7 @@ export default { .led-number { - font-size: 50px; + font-size: 48px; } } } @@ -1442,7 +1443,7 @@ export default { font-size: 30px; .led-number { - font-size: 70px; + font-size: 60px; } } } @@ -1454,6 +1455,7 @@ export default { .prj-img-list { height: calc(100% - 190px); + .prj-img-nav { .prj-img-nav-item { line-height: 60px; @@ -1462,6 +1464,7 @@ export default { font-size: 30px; } } + .el-carousel { height: 100%; diff --git a/yanzhu-bigscreen/src/views/safetyCheck.vue b/yanzhu-bigscreen/src/views/safetyCheck.vue new file mode 100644 index 00000000..187685f0 --- /dev/null +++ b/yanzhu-bigscreen/src/views/safetyCheck.vue @@ -0,0 +1,505 @@ + + + + + \ No newline at end of file diff --git a/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/manage/mapper/SmzSspProblemmodifyMapper.java b/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/manage/mapper/SmzSspProblemmodifyMapper.java index 8c92bd4d..fb4d6bc5 100644 --- a/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/manage/mapper/SmzSspProblemmodifyMapper.java +++ b/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/manage/mapper/SmzSspProblemmodifyMapper.java @@ -102,4 +102,11 @@ public interface SmzSspProblemmodifyMapper * @return */ public List groupByDangerType(SmzSspProblemmodify where); + + /** + * 分组统计 用户 全部数据、待整改、待复检、整改完成、整改超时的数量 用于大屏 + * @param where + * @return + */ + public List getListCountBG(SmzSspProblemmodify where); } diff --git a/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/trouble/SmzSspProblemmodifyMapper.xml b/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/trouble/SmzSspProblemmodifyMapper.xml index d7422e9f..998ecb40 100644 --- a/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/trouble/SmzSspProblemmodifyMapper.xml +++ b/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/trouble/SmzSspProblemmodifyMapper.xml @@ -300,7 +300,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - and a,problemType = #{problemType} + and a.problemType = #{problemType} and a.danger_type = #{dangerType} and date(a.createTime) >= date(#{createTime}) and date(a.updateTime) <= date(#{updateTime}) @@ -331,6 +331,25 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" +