Merge branch 'dev-yjl' into 'shenzhen-dev'

中建四局(安全管理页面)-大屏数据对接

See merge request !69
This commit is contained in:
yjlHub 2022-12-13 09:09:14 +08:00
commit d4c95e94bb
8 changed files with 231 additions and 91 deletions

View File

@ -40,11 +40,11 @@ if (process.env.NODE_ENV == 'development') {
// axios.defaults.baseURL = 'http://124.71.178.44:100/' // 河南
// tag: 本地
// axios.defaults.baseURL = 'http://192.168.34.174:6023/' // 老大本地
axios.defaults.baseURL = 'http://192.168.34.116:6023/' // 邱平毅本地
//axios.defaults.baseURL = 'http://192.168.34.116:6023/' // 邱平毅本地
// axios.defaults.baseURL = 'http://192.168.34.117:6023/' // 杨杰本地
// axios.defaults.baseURL = 'http://ue6a4s.natappfree.cc' // 邱平毅vpn本地
// axios.defaults.baseURL = 'http://139.9.66.234:6324/' // 河南春笋
// axios.defaults.baseURL ='http://124.71.67.160:8088/' //中建四局线上
axios.defaults.baseURL ='http://124.71.67.160:8088/' //中建四局线上
// axios.defaults.baseURL = 'http://192.168.34.125:6023/' //杨意本地 http/1.1
// axios.defaults.baseURL ='http://47.97.202.104:6023/' //金林湾线上
// axios.defaults.baseURL = 'http://192.168.34.231:6023/'; //杨思瑞本地

View File

@ -45,8 +45,8 @@ export default new Vuex.Store({
PAGESIZRS: [10, 20, 30, 50],
// UPLOADURL:'http://10.0.1.43:6023/upload/image',//测试
// FILEURL:'http://10.0.1.43:6023/image/',//测试
BASEURL: baseUrl ? baseUrl : window.location.protocol + '//' + window.location.host + '/', //
UPLOADURL: window.location.protocol + '//' + window.location.host + '/upload/image', //
// BASEURL: baseUrl ? baseUrl : window.location.protocol + '//' + window.location.host + '/', //
// UPLOADURL: window.location.protocol + '//' + window.location.host + '/upload/image', //
// FILEURL: window.location.protocol + '//' + window.location.host + '/image/', //测试 // tag: 本地测试接口
/* 2022-05-16 */
// tag: 部署河南项目时,需要打开这两行代码
@ -57,15 +57,15 @@ export default new Vuex.Store({
// UPLOADURL: 'http://182.90.224.237:7000/upload/image',
// FILEURL: 'http://182.90.224.237:7000/image/',
// 邱平毅的
// BASEURL:'http://192.168.34.116:6023/',
// UPLOADURL: 'http://192.168.34.116:6023/upload/image',
// FILEURL: 'http://192.168.34.116:6023/image/',
BASEURL:'http://192.168.34.116:6023/',
UPLOADURL: 'http://192.168.34.116:6023/upload/image',
FILEURL: 'http://192.168.34.116:6023/image/',
// UPLOADURL: 'http://124.71.67.160:8088/upload/image',
// FILEURL: 'http://124.71.67.160:8088/image/',
// UPLOADURL:'http://'+"61.190.32.219:9050"+'/upload/image',//正式
// FILEURL:'http://'+"61.190.32.219:9050"+'/image/',//正式
FILEURL:'http://'+"47.97.202.104:6023"+'/image/',//正式
// FILEURL:'http://'+"47.97.202.104:6023"+'/image/',//正式
ACCOUNTTYPE: ['系统管理员', '企业一级管理员', '企业二级管理员', '企业三级管理员', '项目管理员'], //1系统管理员2企业管理员账号3企业区账号4企业市账号5项目账号
userInfo: null, //登录返回的账号信息
// currentUrl:'',//当前路由地址

View File

@ -21,7 +21,7 @@
<div class="td">验收日期</div>
</div>
</div>
<div class="tbody">
<!-- <div class="tbody">
<vue-scroll>
<div class="row" v-for="i in 4" :key="i">
<div class="td">{{i}}</div>
@ -33,6 +33,12 @@
<div class="td">2022-09-01</div>
</div>
</vue-scroll>
</div> -->
<div class="tbody">
<div class="dataImg">
<img src="@/assets/images/noData3.png" alt srcset />
<p>{{$t('message.dataBoard.nodata')}}</p>
</div>
</div>
</div>
<div class="list" v-if="tabIndex==1">
@ -64,7 +70,7 @@
<div class="td">报警状态</div>
</div>
</div>
<div class="tbody">
<!-- <div class="tbody">
<vue-scroll>
<div class="row" v-for="i in 4" :key="i">
<div class="td">中建四项目深基坑</div>
@ -76,6 +82,12 @@
<div class="td">正常</div>
</div>
</vue-scroll>
</div> -->
<div class="tbody">
<div class="dataImg">
<img src="@/assets/images/noData3.png" alt srcset />
<p>{{$t('message.dataBoard.nodata')}}</p>
</div>
</div>
</div>
<div class="list" v-if="tabIndex==3">
@ -183,7 +195,7 @@ export default {
}
.dataImg {
margin-left: 500px;
margin-top: 20px;
margin-top: 50px;
p {
margin-left: 4%;
}

View File

@ -35,7 +35,7 @@
<div class="td">{{i.eduTime}}</div>
</div>
<div class="row" v-if="threeLevel.workerSafeEducationList.length==0">
<div style="font-size:14px;color: #999;text-align: center;width: 100%;">暂无数据</div>
<div style="font-size:14px;color: #999;text-align: center;width: 100%;line-height:300px">暂无数据</div>
</div>
</vue-scroll>
</div>
@ -71,7 +71,7 @@
<div class="td"><img :src="item.shoutImage" /></div>
</div>
<div class="row" v-if="shouting.shoutInfoList.length==0">
<div style="font-size:14px;color: #999;text-align: center;width: 100%;">暂无数据</div>
<div style="font-size:14px;color: #999;text-align: center;width: 100%;line-height:300px">暂无数据</div>
</div>
</vue-scroll>
</div>
@ -119,7 +119,7 @@
<div class="td">{{i.eduTime}}</div>
</div>
<div class="row" v-if="safetyDisclosure.workerSafeEducationList.length==0">
<div style="font-size:14px;color: #999;text-align: center;width: 100%;">暂无数据</div>
<div style="font-size:14px;color: #999;text-align: center;width: 100%;line-height:300px">暂无数据</div>
</div>
</vue-scroll>
</div>

View File

@ -12,11 +12,26 @@
<vue-scroll>
<div class="row" v-for="(item, index) in aiList" :key="index">
<div>
<img :src=item.imageUrl />
<img :src="item.imageUrl" />
</div>
<div class="carNum">{{ alarmTypeList[item.thingType] }}</div>
<div class="carNum">{{ alarmTypeList[item.alarmType] }}</div>
<div class="datetime">{{ item.createTime }}</div>
</div>
<div
class="row"
v-if="aiList.length == 0
"
>
<div style="font-size: 14px;
color: #999;
text-align: center;
width: 100%;
line-height:250px;
"
>
暂无数据
</div>
</div>
</vue-scroll>
</div>
</div>
@ -54,7 +69,8 @@ export default {
getSelectNewPAiListApi() {
selectNewPAiListApi({ projectSn: this.projectSn, count: 20 }).then(res => {
console.log(res, '=============ai分析')
this.aiList = res.result.length>0?res.result:this.aiList;
// this.aiList = res.result.length>0?res.result:this.aiList;
this.aiList = res.result
})
}
},

View File

@ -3,24 +3,42 @@
<div class="charts">
<div class="dllm">
<div class="woria">
<JRingChart :title="{ text: '安全隐患', subTitle: `${safetyPatrolInspection.allTotalNum}件`, fontSize: 18 }"
<JRingChart
:title="{
text: '检查总数',
subTitle: `${safetyPatrolInspection.allTotalNum}`,
fontSize: 18,
}"
:color="['#6EE4F0', '#E7622A']"
:data="[{ value: safetyPatrolInspection.allRectificationNum, name: '已处理' }, { value: safetyPatrolInspection.allNoRectificationNum, name: '未处理' }]"
:radius="['60%', '85%']" :legend="false" />
:data="[
{
value: safetyPatrolInspection.allRectificationNum,
name: '已处理',
},
{
value: safetyPatrolInspection.allNoRectificationNum,
name: '未处理',
},
]"
:radius="['60%', '85%']"
:legend="false"
/>
</div>
<div class="legend">
<div class="row">
<span>已处理</span>
<span>闭合</span>
<span>占比</span>
</div>
<div class="row">
<span>{{ safetyPatrolInspection.allRectificationNum || 0 }}</span>
<span>{{ safetyPatrolInspection.allRectificationRatio || 0 }}%</span>
<span
>{{ safetyPatrolInspection.allRectificationRatio || 0 }}%</span
>
</div>
</div>
<div class="legend">
<div class="row">
<span>处理</span>
<span>闭合</span>
<span>占比</span>
</div>
<div class="row">
@ -31,29 +49,53 @@
</div>
<div class="dllm">
<div class="woria">
<JRingChart :title="{ text: '今日隐患', subTitle: `${safetyPatrolInspection.todayTotalNum}件`, fontSize: 18 }"
<JRingChart
:title="{
text: '今日巡检',
subTitle: `${safetyPatrolInspection.todayTotalNum}`,
fontSize: 18,
}"
:color="['#6EE4F0', '#E7622A']"
:data="[{ value: safetyPatrolInspection.todayRectificationNum, name: '已巡检' }, { value: safetyPatrolInspection.todayNoRectificationRatio, name: '未巡检' }]"
:radius="['60%', '85%']" :legend="false" />
:data="[
{
value: safetyPatrolInspection.todayRectificationNum,
name: '已巡检',
},
{
value: safetyPatrolInspection.todayNoRectificationRatio,
name: '未巡检',
},
]"
:radius="['60%', '85%']"
:legend="false"
/>
</div>
<div class="legend">
<div class="row">
<span>已巡检</span>
<span>闭合</span>
<span>占比</span>
</div>
<div class="row">
<span>{{ safetyPatrolInspection.todayRectificationNum || 0 }}</span>
<span>{{ safetyPatrolInspection.todayRectificationRatio || 0 }}%</span>
<span
>{{ safetyPatrolInspection.todayRectificationRatio || 0 }}%</span
>
</div>
</div>
<div class="legend">
<div class="row">
<span>巡检</span>
<span>闭合</span>
<span>占比</span>
</div>
<div class="row">
<span>{{ safetyPatrolInspection.todayNoRectificationRatio || 0 }}</span>
<span>{{ safetyPatrolInspection.todayNoRectificationRatio || 0 }}%</span>
<span>{{
safetyPatrolInspection.todayNoRectificationRatio || 0
}}</span>
<span
>{{
safetyPatrolInspection.todayNoRectificationRatio || 0
}}%</span
>
</div>
</div>
</div>
@ -62,20 +104,41 @@
<div class="thead">
<div class="row">
<div class="td">事件类型</div>
<div class="td">上报时间</div>
<div class="td">检查时间</div>
<div class="td">处理状态</div>
</div>
</div>
<div class="tbody">
<vue-scroll>
<div class="row" :class="fmtStatusColor(item.status)"
v-for="(item, index) in safetyPatrolInspection.hiddenDangerInspectRecordList" :key="index">
<div class="td">{{ fmtType(item.recordType) }}</div>
<div class="td">{{ item.inspectTime }}</div>
<div class="td" :class="fmtStatusColor(item.status)">{{ fmtStatus(item.status) }}</div>
<div
class="row"
:class="fmtStatusColor(item.status)"
v-for="(item, index) in detailData"
:key="index"
>
<div class="td">{{ item.checkContent }}</div>
<div class="td">{{ item.createTime }}</div>
<div class="td" :class="fmtStatusColor(item.status)">
{{ fmtStatus(item.status) }}
</div>
</div>
<div class="row" v-if="safetyPatrolInspection.hiddenDangerInspectRecordList.length == 0">
<div style="font-size:14px;color: #999;text-align: center;width: 100%;">暂无数据</div>
<div
class="row"
v-if="
safetyPatrolInspection.hiddenDangerInspectRecordList.length == 0
"
>
<div
style="
font-size: 14px;
color: #999;
text-align: center;
width: 100%;
line-height: 200px;
"
>
暂无数据
</div>
</div>
</vue-scroll>
</div>
@ -86,18 +149,19 @@
<script>
import {
getAllTodayDataHdirApi,
getTodayInspectionInfo
} from '@/assets/js/api/zhongjianFourth'
import { mapState } from 'vuex'
getTodayInspectionInfo,
} from "@/assets/js/api/zhongjianFourth";
import { gethiddenDangerInspectRecordApi } from "@/assets/js/api/safeManage.js";
import { mapState } from "vuex";
import Card from '../components/Card.vue'
import JRingChart from '../../common/jChart/pie/JRingChart.vue'
import Card from "../components/Card.vue";
import JRingChart from "../../common/jChart/pie/JRingChart.vue";
export default {
components: { Card, JRingChart },
data() {
return {
safetyPatrolInspection: {
hiddenDangerInspectRecordList:[]
hiddenDangerInspectRecordList: [],
},
//
safetyPeril: {
@ -117,27 +181,42 @@ export default {
},
//
list: [
{ type: 1, datetime: '2022-02-02 13:39:09', status: 1 },
{ type: 2, datetime: '2022-02-02 13:39:09', status: 2 },
{ type: 3, datetime: '2022-02-02 13:39:09', status: 3 },
{ type: 1, datetime: '2022-02-02 13:39:09', status: 1 },
{ type: 1, datetime: "2022-02-02 13:39:09", status: 1 },
{ type: 2, datetime: "2022-02-02 13:39:09", status: 2 },
{ type: 3, datetime: "2022-02-02 13:39:09", status: 3 },
{ type: 1, datetime: "2022-02-02 13:39:09", status: 1 },
],
}
//
detailData: [],
};
},
created() {
// this.getSafetyPerilInfo()
this.getTodayInspectionInfo();
this.getAllTodayDataHdir();
this.loadList();
},
computed: {
...mapState(['projectSn']),
...mapState(["projectSn"]),
},
methods: {
//
loadList() {
gethiddenDangerInspectRecordApi({ projectSn: this.projectSn }).then(
(result) => {
console.log("隐患事件类型数据", result.result);
this.detailData = result.result.records;
// result.result.records.forEach(item=>{
// this.detailData.push(item.checkContent)
// })
}
);
},
getAllTodayDataHdir() {
getAllTodayDataHdirApi({ projectSn: this.projectSn }).then(res => {
console.log(res, 'getAllTodayDataHdir')
this.safetyPatrolInspection = res.result
})
getAllTodayDataHdirApi({ projectSn: this.projectSn }).then((res) => {
console.log(res, "getAllTodayDataHdir");
this.safetyPatrolInspection = res.result;
});
},
// /** */
// getSafetyPerilInfo() {
@ -147,30 +226,46 @@ export default {
// Object.keys(safetyPeril).forEach(key => {
// safetyPeril[key] = res.result[key];
// })
// })
// })
// },
/** 查询今日巡检数据 */
getTodayInspectionInfo() {
getTodayInspectionInfo({ projectSn: this.projectSn }).then(res => {
console.log('查询今日巡检数据: ', res);
getTodayInspectionInfo({ projectSn: this.projectSn }).then((res) => {
console.log("查询今日巡检数据: ", res);
const todayInspection = this.todayInspection;
Object.keys(todayInspection).forEach(key => {
Object.keys(todayInspection).forEach((key) => {
todayInspection[key] = res.result[key];
})
})
});
});
},
fmtType(type) {
return type == 1 ? '隐患问题' : type == 2 ? '排查记录' : ''
return type == 1 ? "隐患问题" : type == 2 ? "排查记录" : "";
// return type === 1 ? '' : type === 2 ? '' : type === 3 ? '穿' : '--'
},
fmtStatus(status) {
return status === 1 ? '无需整改' : status === 2 ? '待整改' : status === 3 ? '待复查' : status === 4 ? '合格' : status === 5 ? '不合格' : ''
return status === 1
? "无需整改"
: status === 2
? "待整改"
: status === 3
? "待复查"
: status === 4
? "合格"
: status === 5
? "不合格"
: "";
},
fmtStatusColor(status) {
return status === 1 ? 'orange' : status === 2 ? 'green' : status === 3 ? 'blue' : ''
}
}
}
return status === 1
? "orange"
: status === 2
? "green"
: status === 3
? "blue"
: "";
},
},
};
</script>
<style lang="less" scoped>
@ -197,13 +292,12 @@ export default {
width: 100px;
&::before {
content: '';
content: "";
position: absolute;
top: 1px;
left: -10px;
width: 6px;
height: 6px;
}
&:nth-child(2)::before {
@ -270,10 +364,9 @@ export default {
display: flex;
&.orange {
//background: linear-gradient(90deg, #356f83, #213c4f);
&::before {
content: '';
content: "";
// width: 4px;
// height: 100%;
// background-color: #67d4d9;
@ -282,17 +375,23 @@ export default {
.td {
text-align: center;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
cursor: pointer;
&:nth-child(1) {
width: 28%;
width: 35%;
}
&:nth-child(2) {
width: calc(72% - 80px);
width: calc(30% - -38px);
}
&:nth-child(3) {
width: 80px;
width: 70px;
}
&.orange {

View File

@ -5,30 +5,30 @@
<div class="topbox">
<div>
<span>总人数</span>
<p class="item">{{ WorkerNum.sumNumber }}</p>
<p class="item">{{ WorkerNum.sumNumber || 0 }}</p>
</div>
<div>
<span>实际出勤人数</span>
<p class="item">{{ WorkerNum.attendanceNumber }}</p>
<p class="item">{{ WorkerNum.attendanceNumber || 0 }}</p>
</div>
<div>
<span>未出勤人数</span>
<p class="item">
{{ WorkerNum.sumNumber - WorkerNum.attendanceNumber }}
{{ WorkerNum.sumNumber - WorkerNum.attendanceNumber || 0 }}
</p>
</div>
<div>
<span>实名制人数</span>
<p class="item">{{ WorkerNum.realNameNumber }}</p>
<p class="item">{{ WorkerNum.realNameNumber || 0 }}</p>
</div>
<div>
<span>入职培训人数</span>
<p class="item">{{ WorkerNum.inductionTrainingNumber }}</p>
<p class="item">{{ WorkerNum.inductionTrainingNumber || 0 }}</p>
</div>
<div class="margin">
<span>管理人员人数</span>
<p class="item">{{ WorkerNum.managerNumber }}</p>
<p class="item">{{ WorkerNum.managerNumber || 0 }}</p>
</div>
</div>
<!-- 出勤横向柱状图结构 -->
@ -40,7 +40,10 @@
<script>
import echarts from "echarts4";
import Card from "../components/Card.vue";
import { getWorkerNumApi } from "@/assets/js/api/zhongjianFourth";
import {
// getWorkerNumApi,
getPersonnelNumApi,
} from "@/assets/js/api/zhongjianFourth";
export default {
components: {
Card,
@ -48,19 +51,29 @@ export default {
data() {
return {
WorkerNum: {}, //
categoryList: [],
};
},
mounted() {
this.getData();
this.AttendanceData();
setTimeout(() => {
this.AttendanceData();
}, 1000);
},
methods: {
//
getData() {
getWorkerNumApi({ projectSn: this.$store.state.projectSn }).then(
getPersonnelNumApi({ projectSn: this.$store.state.projectSn }).then(
(res) => {
this.WorkerNum = res.result;
console.log(this.WorkerNum, "出勤人数");
this.categoryList.push(Number(res.result.managerNumber));
this.categoryList.push(Number(res.result.inductionTrainingNumber));
this.categoryList.push(Number(res.result.realNameNumber));
this.categoryList.push(
Number(res.result.sumNumber - res.result.attendanceNumber)
);
this.categoryList.push(Number(res.result.attendanceNumber));
console.log(this.WorkerNum, "this.WorkerNum");
}
);
},
@ -68,13 +81,13 @@ export default {
let myChart = echarts.init(document.getElementById("main"));
//
var category = [
"中建四局出勤人数",
"中建四局出勤人数",
"中建四局出勤人数",
"中建四局出勤人数",
"中建四局出勤人数",
"管理人员人数",
"入职培训人数",
"实名制人数",
"出勤人数",
"实际出勤人数",
];
var barData = [5, 5, 4, 6, 5];
var barData = this.categoryList;
var option = {
tooltip: {

View File

@ -39,7 +39,7 @@
<script>
import LeftOne from './leftOne'
import LeftTwo from './leftTwo'
import LeftThree from '../command/leftThree'
import LeftThree from './LeftThree'
import LeftFour from './leftFour'
import Center from './center'
import CenterBOne from './centerBOne'