Commit bdbc2c15 authored by 耿迪迪's avatar 耿迪迪
parents a5ccfa13 30f91260
......@@ -100,4 +100,14 @@ public class TStaningBookController extends BaseController
{
return toAjax(tStaningBookService.deleteTStaningBookByIds(bookIds));
}
/**
* 统计,按年、月、日统计发现数量和已处置数量
* 日,为当日;月为当前30日内;年为当前365日内
* @return
*/
@GetMapping(value = "/statics")
public AjaxResult statics(String type){
return AjaxResult.success(tStaningBookService.statics(type));
}
}
package com.zehong.system.mapper;
import java.util.List;
import java.util.Map;
import com.zehong.system.domain.TStaningBook;
/**
......@@ -58,4 +60,6 @@ public interface TStaningBookMapper
* @return 结果
*/
public int deleteTStaningBookByIds(Long[] bookIds);
public Map statics(String type);
}
package com.zehong.system.service;
import java.util.List;
import java.util.Map;
import com.zehong.system.domain.TStaningBook;
/**
......@@ -58,4 +60,11 @@ public interface ITStaningBookService
* @return 结果
*/
public int deleteTStaningBookById(Long bookId);
/**
* 统计数量
* @param type
* @return
*/
public Map statics(String type);
}
......@@ -86,8 +86,7 @@ public class TNfcSettingServiceImpl implements ITNfcSettingService
return a;
}
TNfcSetting ts = tNfcSettingMapper.getInfoByNfcNum(tNfcSetting.getNfcNum());
int nfcNum = tNfcSettingMapper.getNfcNum(tNfcSetting.getNfcNum());
if (nfcNum!=0){
if(ts.getNfcId()!=tNfcSetting.getNfcId()){
ts.setNfcNum("");
tNfcSettingMapper.updateTNfcSetting(ts);
}
......
package com.zehong.system.service.impl;
import java.util.List;
import java.util.Map;
import com.zehong.common.core.domain.entity.SysDept;
import com.zehong.common.utils.DateUtils;
......@@ -110,4 +111,9 @@ public class TStaningBookServiceImpl implements ITStaningBookService
{
return tStaningBookMapper.deleteTStaningBookById(bookId);
}
@Override
public Map statics(String type) {
return tStaningBookMapper.statics(type);
}
}
......@@ -180,4 +180,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{bookId}
</foreach>
</delete>
<select id="statics" parameterType="String" resultType="Map">
select count(1) faxian,sum(case state when '2' then 1 else 0 end )as zhenggai from t_staning_book where is_del=0
<if test="type=='day'">
and DATE_SUB(now(), INTERVAL 1 DAY) &lt; date(find_time)
</if>
<if test="type=='month'">
and DATE_SUB(now(), INTERVAL 30 DAY) &lt; date(find_time)
</if>
<if test="type=='year'">
and DATE_SUB(now(), INTERVAL 365 DAY) &lt; date(find_time)
</if>
</select>
</mapper>
\ No newline at end of file
......@@ -2,7 +2,7 @@
* @Author: 纪泽龙 jizelong@qq.com
* @Date: 2022-10-07 09:05:29
* @LastEditors: 纪泽龙 jizelong@qq.com
* @LastEditTime: 2022-10-07 10:16:10
* @LastEditTime: 2022-10-22 11:25:50
* @FilePath: /danger-manage-web/src/api/indexChars/chars.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
......@@ -17,3 +17,11 @@ export function getRypbData(query) {
params: query,
});
}
// 巡检统计年月日
export function getxjtjYMD(query) {
return request({
url: "/system/book/statics",
method: "get",
params: query,
});
}
......@@ -2,7 +2,7 @@
* @Author: 纪泽龙 jizelong@qq.com
* @Date: 2022-06-21 09:24:11
* @LastEditors: 纪泽龙 jizelong@qq.com
* @LastEditTime: 2022-06-24 17:38:50
* @LastEditTime: 2022-10-22 14:08:16
* @FilePath: /danger-manage-web/src/components/bigWindow/Danger.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
......@@ -11,80 +11,100 @@
<div class="close" @click="close">
<img src="@/assets/images/closeBtn.png" alt="" />
</div>
<div class="up pb10" :class="{noBroder:deviceData.colorNum>2}">
<div class="tit fz16 pb10">风险辨识</div>
<div class="up pb10" :class="{ noBroder: deviceData.data.colorNum > 2 }">
<div class="tit fz16 pb10">{{ deviceData.name }}</div>
<div class="one flex fz16">
<div class="flex-item">
<span class="left">风险类别:</span
><span v-unValue class="right">{{ deviceData.fxlb }}</span>
><span v-unValue class="right">{{ deviceData.data.fxlb }}</span>
</div>
<div class="flex-item">
<span class="left">辨识计划:</span
><span v-unValue class="right">{{ deviceData.bsjh }}</span>
><span v-unValue class="right">{{ deviceData.data.bsjh }}</span>
</div>
<div class="flex-item">
<span class="left">危险源:</span
><span v-unValue class="right">{{ deviceData.wxy }}</span>
><span v-unValue class="right">{{ deviceData.data.wxy }}</span>
</div>
<!-- <div class="flex-item">
<span class="left">风险点:</span
><span v-unValue class="right">{{ deviceData.fxd }}</span>
><span v-unValue class="right">{{ deviceData.data.fxd }}</span>
</div> -->
</div>
<div class="item">
<span class="left">危险因素:</span
><span v-unValue class="right">{{ deviceData.wxys }}</span>
><span v-unValue class="right">{{ deviceData.data.wxys }}</span>
</div>
<div class="item">
<span class="left">危害后果:</span
><span v-unValue class="right">{{ deviceData.fxlb }}</span>
><span v-unValue class="right">{{ deviceData.data.whhg }}</span>
</div>
<div class="one flex fz16">
<div class="flex-item">
<span class="left">事故类型:</span
><span v-unValue class="right">{{ deviceData.sglx }}</span>
><span v-unValue class="right">{{ deviceData.data.sglx }}</span>
</div>
<div class="flex-item">
<span class="left">事故发生频率:</span
><span v-unValue class="right">{{ deviceData.sgfspl }}</span>
><span v-unValue class="right">{{ deviceData.data.sgfspl }}</span>
</div>
<div class="flex-item">
<span class="left">管控层级:</span
><span v-unValue class="right">{{ deviceData.gkcj }}</span>
><span v-unValue class="right">{{ deviceData.data.gkcj }}</span>
</div>
<div class="flex-item">
<span class="left">管控部门:</span
><span v-unValue class="right">{{ deviceData.gkbm }}</span>
><span v-unValue class="right">{{ deviceData.data.gkbm }}</span>
</div>
<div class="flex-item">
<span class="left">管控责任岗位:</span
><span v-unValue class="right">{{ deviceData.gkzrgw }}</span>
><span v-unValue class="right">{{ deviceData.data.gkzrgw }}</span>
</div>
<div class="flex-item">
<span class="left">管控责任人:</span
><span v-unValue class="right">{{ deviceData.gkzrr }}</span>
><span v-unValue class="right">{{ deviceData.data.gkzrr }}</span>
</div>
</div>
</div>
<!-- deviceData.colorNum<3的风险区域没有下面这些东西 -->
<div class="bottom pb10" v-if="deviceData.colorNum<3">
<!-- deviceData.data.colorNum<3的风险区域没有下面这些东西 -->
<div class="bottom pb10" v-if="deviceData.colorNum < 3">
<div class="tit fz16 pb10">采取的风险管控措施</div>
<div class="item">
<span class="left">管理:</span
><span v-unValue class="right">{{ deviceData.gl }}</span>
><span v-unValue class="right">{{ deviceData.data.gl }}</span>
</div>
<div class="item">
<span class="left">工程技术:</span
><span v-unValue class="right">{{ deviceData.gcjs }}</span>
><span v-unValue class="right">{{ deviceData.data.gcjs }}</span>
</div>
<div class="item">
<div class="item flex">
<span class="left">警示标识:</span>
<span v-unValue class="img"><img :src="deviceData.src" alt="" /></span>
<template v-if="deviceData.data.src && deviceData.data.src.length > 0">
<span v-unValue class="img">
<!-- <img
v-for="src in deviceData.data.src"
:key="src"
:src="src"
alt=""
/> -->
<el-image
v-for="src in deviceData.data.src"
:key="src"
style="width: 70px; height: 90px;margin-left:5px"
:src="src"
:preview-src-list="[src]"
:z-index="9999999"
></el-image>
</span>
</template>
<template v-else>
<span class="right">-</span>
</template>
</div>
</div>
</div>
......@@ -97,7 +117,7 @@ export default {
return {};
},
mounted() {
console.log(this.deviceData);
console.log(this.deviceData.data);
},
methods: {
close() {
......@@ -119,11 +139,9 @@ export default {
.up {
border-bottom: 1px solid #cccccc;
margin-bottom: 15px;
&.noBroder{
border-bottom: 0px solid #cccccc;
margin-bottom: 10px;
&.noBroder {
border-bottom: 0px solid #cccccc;
margin-bottom: 10px;
}
}
.tit {
......@@ -173,14 +191,20 @@ export default {
margin-left: 5px;
}
.img {
width: 300px;
height: 120px;
flex: 1;
width: 100%;
height: 90px;
display: inline-block;
vertical-align: top;
margin-left: 5px;
#img,
img {
width: 100%;
height: 100%;
// width: 100%;
width: 70px;
height: 90px;
margin-left: 5px;
cursor: pointer;
}
}
}
......
/*
* @Author: your name
* @Date: 2021-12-07 14:19:18
* @LastEditTime: 2022-10-12 10:09:44
* @LastEditTime: 2022-10-22 10:31:44
* @LastEditors: 纪泽龙 jizelong@qq.com
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: /cesium-vue/src/utils/seieumClass.js
......@@ -1122,9 +1122,9 @@ export default class CreateCesium {
this.dangerArr.forEach((item) => {
item.show = bool;
});
this.deviceTilesArr[10].forEach((item) => {
item.show = bool;
});
// this.deviceTilesArr[10].forEach((item) => {
// item.show = bool;
// });
}
// 危险源与风险分布区切换
dangeDeviceChange(type, bottomDeviceArr) {
......
......@@ -2,7 +2,7 @@
* @Author: 纪泽龙 jizelong@qq.com
* @Date: 2022-06-16 15:03:40
* @LastEditors: 纪泽龙 jizelong@qq.com
* @LastEditTime: 2022-10-12 09:20:17
* @LastEditTime: 2022-10-22 10:39:48
* @FilePath: /danger-manage-web/src/views/bigwindow/index.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
......@@ -224,13 +224,13 @@ export default {
// this.data1.forEach((item) => {
// this.Cesium.addDevice(item, "pic", Video);
// });
this.data2.forEach((item, index) => {
if (index == 0) {
this.Cesium.addDevice(item, "pic", weixiandian);
} else {
this.Cesium.addDevice(item, "pic", ydqt);
}
});
// this.data2.forEach((item, index) => {
// if (index == 0) {
// this.Cesium.addDevice(item, "pic", weixiandian);
// } else {
// this.Cesium.addDevice(item, "pic", ydqt);
// }
// });
},
methods: {
dangerChange() {
......
......@@ -190,7 +190,7 @@
<script>
export default {
name: "App",
name: "",
data() {
return {
tableData: [
......@@ -218,7 +218,7 @@
<style lang="scss" scoped>
.entrance{
width: 85%;
height: calc(100vh - 50px);;
height: calc(100vh - 50px);
padding: 30px;
display: flex;
justify-content: space-between;
......
......@@ -2,7 +2,7 @@
* @Author: 纪泽龙 jizelong@qq.com
* @Date: 2022-09-03 10:51:24
* @LastEditors: 纪泽龙 jizelong@qq.com
* @LastEditTime: 2022-10-12 09:22:21
* @LastEditTime: 2022-10-20 10:25:41
* @FilePath: /danger-manage-web/src/views/index.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
......@@ -379,13 +379,13 @@ export default {
// },
init() {
this.data2.forEach((item, index) => {
if (index == 0) {
this.Cesium.addDevice(item, "pic", weixiandian);
} else {
this.Cesium.addDevice(item, "pic", ydqt);
}
});
// this.data2.forEach((item, index) => {
// if (index == 0) {
// this.Cesium.addDevice(item, "pic", weixiandian);
// } else {
// this.Cesium.addDevice(item, "pic", ydqt);
// }
// });
// 如果有缓存
// const J = localStorage.getItem("J");
// if (J) {
......@@ -413,7 +413,7 @@ export default {
};
})
.forEach((item) => {
this.Cesium.addDanger(item, Danger2);
this.Cesium.addDanger(item, Danger);
});
// this.data11.forEach((item) => {
// item.config = { scale: 1, textHeight: -32 };
......
......@@ -2,7 +2,7 @@
* @Author: 纪泽龙 jizelong@qq.com
* @Date: 2022-09-06 13:42:45
* @LastEditors: 纪泽龙 jizelong@qq.com
* @LastEditTime: 2022-09-14 11:44:50
* @LastEditTime: 2022-10-22 11:36:35
* @FilePath: /danger-manage-web/src/views/indexComponents/leftComponents/deviceYx.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
......@@ -51,6 +51,7 @@ import Title from "@/views/indexComponents/allComponents/Title";
import Chars from "@/components/allCharsCom/Chars";
import rimg1 from "@/assets/indexImages/rimg1.png";
import rimg2 from "@/assets/indexImages/rimg2.png";
import { getxjtjYMD } from "@/api/indexChars/chars";
export default {
name: "",
......@@ -62,8 +63,8 @@ export default {
return {
yearActive: "年",
numData: [
{ icon: rimg1, name: "发现隐患数量", num: 56 },
{ icon: rimg2, name: "整改隐患数量", num: 50 },
// { icon: rimg1, name: "发现隐患数量", num: 2 },
// { icon: rimg2, name: "整改隐患数量", num: 1 },
],
options: {
xAxis: {
......@@ -128,25 +129,45 @@ export default {
},
};
},
created() {
this.getxjtjYMD({ type: "year" });
},
methods: {
getxjtjYMD(query) {
getxjtjYMD(query).then((res) => {
if (res.code == 200) {
const { faxian, zhenggai } = res.data;
this.numData = [
{ icon: rimg1, name: "发现隐患数量", num: faxian },
{ icon: rimg2, name: "整改隐患数量", num: zhenggai },
];
}
});
},
timeChange(e) {
if (this.yearActive == e) return;
this.yearActive = e;
if (this.yearActive == "日") {
this.numData = [
{ icon: rimg1, name: "发现隐患数量", num: 3 },
{ icon: rimg2, name: "整改隐患数量", num: 2 },
];
this.getxjtjYMD({ type: "day" });
// this.numData = [
// { icon: rimg1, name: "发现隐患数量", num: 3 },
// { icon: rimg2, name: "整改隐患数量", num: 2 },
// ];
} else if (this.yearActive == "月") {
this.numData = [
{ icon: rimg1, name: "发现隐患数量", num: 6 },
{ icon: rimg2, name: "整改隐患数量", num: 10 },
];
this.getxjtjYMD({ type: "month" });
// this.numData = [
// { icon: rimg1, name: "发现隐患数量", num: 6 },
// { icon: rimg2, name: "整改隐患数量", num: 10 },
// ];
} else {
this.numData = [
{ icon: rimg1, name: "发现隐患数量", num: 56 },
{ icon: rimg2, name: "整改隐患数量", num: 50 },
];
this.getxjtjYMD({ type: "year" });
// this.numData = [
// { icon: rimg1, name: "发现隐患数量", num: 56 },
// { icon: rimg2, name: "整改隐患数量", num: 50 },
// ];
}
},
},
......
This diff is collapsed.
......@@ -36,6 +36,7 @@ module.exports = {
[process.env.VUE_APP_BASE_API]: {
target: process.env.VUE_APP_TARGET,
// target: `http://192.168.2.16:8908/dangerManage`,
// target: `http://192.168.2.17:8908/dangerManage`,
changeOrigin: true,
pathRewrite: {
['^' + process.env.VUE_APP_BASE_API]: ''
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment