Commit a57b2bbf authored by 黄自鹏's avatar 黄自鹏

Merge branch 'master' of gitlab.gavelinfo.com:lisu/sgaqgl-vue

parents 62b5648d 0799699b
......@@ -1410,13 +1410,13 @@ export const constantRoutes = [
component: Layout,
redirect: 'index',
children: [
{
path: 'index',
component: () => import('@/views/index'),
name: 'Index',
redirect: '/user/profile',
meta: { title: '首页', icon: 'dashboard', affix: true }
}
{
path: 'index',
component: () => import('@/views/threeViolations/homePage/index'),
name: 'Index',
// redirect: '/user/profile',
meta: { title: '首页', icon: 'dashboard', affix: true }
}
]
},
{
......
<template>
<DefaultDialog :app='app'>
<DefaultDialog :app='app' @close='close'>
<div class="min_full" slot='form' style="height: 550px;border: 0px;">
......@@ -91,6 +91,9 @@ import {
}
},
methods: {
close(){
this.app.$refs['TablePager'].pageQuery()
},
xzry(){
if (this.app.selectOne || this.app.clickOne) {
this.DialogTitle='选择保养项目'
......
<template>
<DefaultDialog :app='app'>
<DefaultDialog :app='app' @close='close' >
<div class="min_full" slot='form' style="height: 550px;border: 0px;">
......@@ -99,6 +99,9 @@
}
},
methods: {
close(){
console.log('close')
},
xzry(){
if (this.app.selectOne || this.app.clickOne) {
this.DialogTitle='选择保养项目'
......
<template>
<DefaultDialog :app='app'>
<DefaultDialog @close='close' :app='app'>
<el-form slot="form" ref="form" :model="form" label-width="120px" :rules="rules">
<el-row :gutter="20">
......@@ -99,6 +99,9 @@ props:['app'],
init() {
},
close(){
console.log('close')
},
save(){
let params={
details:[{id:'',records:[]}],
......
<template>
<div class="min_full homePage " style="margin: 0;border: 0; ">
<!-- 数据展示-->
<div class="lbt" v-if="showList.length>0" >
<el-carousel height='calc(100vh - 84px)' >
<el-carousel-item v-for="(item,index) in showList" :key="item.id+index">
<!-- 轮播图all-->
<div class="lbtAll">
<!-- 说明-->
<div class="sm">
<el-tooltip :content="`${item.gsName}/${item.bzName}:${item.wzr}:${item.wzxw}`" placement="top">
<span class='infor' >
{{`${item.gsName}/${item.bzName}的${item.wzr}做出违章行为:${item.wzxw}`}}
</span>
</el-tooltip>
<!-- 外层排版-->
<div class="min_full " style="margin: 0;border: 0;background-color: #fff;">
<!-- 上层布局-->
<div class="top" style="border: 5px solid #eee;">
<div class="homePage " style="margin: 0;border: 0;border-right: 5px solid #eee;">
<!-- 数据展示-->
<div class="lbt" v-if="showList.length>0" >
<el-carousel height='290px' >
<el-carousel-item v-for="(item,index) in showList" :key="item.id+index">
<!-- 轮播图all-->
<div class="lbtAll">
<!-- 说明-->
<div class="sm">
<el-tooltip :content="`${item.gsName}${item.bzName||''}:${item.wzr}:${item.wzxw}`" placement="top">
<span class='infor' >
{{`${item.gsName}${item.bzName||''}的${item.wzr}做出违章行为:${item.wzxw}`}}
</span>
</el-tooltip>
</div>
<el-image
style="width: 100%; height: 100%"
:src=" `${baseurl}/api/file/${item.filePath}`"
fit="fit"></el-image>
</div>
<el-image
style="width: 100%; height: 100%"
:src=" `${baseurl}/api/file/${item.filePath}`"
fit="fit"></el-image>
</el-carousel-item>
</el-carousel>
</div>
<div style="height: 300px;display: flex;align-items: center;justify-content: center;position: relative;" class="lbt" v-else >
<span style="position: absolute;bottom: 50px;line-height: 40px;font-size: 18px;font-weight: 800;color:#787878" >本月暂无违规记录。</span>
<img style="height:150px;width: 200px;" :src="aqpng" alt="" srcset="">
</div>
</el-carousel-item>
</el-carousel>
<!-- 轮播图-->
</div>
<div class="top_right" >
<div class="top_right_fxpc">
<div class="zttitle">
风险排查率
</div>
<div class="ztcxxx">
<div class="search-item" style="padding-left: 20px;">
<el-radio v-model="queryParams1.rwlx" label="D">日任务</el-radio>
<el-radio v-model="queryParams1.rwlx" label="W">周任务</el-radio>
<el-radio v-model="queryParams1.rwlx" label="M">月任务</el-radio>
</div>
</div>
<!-- 图表-->
<div id="fxpcChart" class="chart" >
</div>
</div>
<div class="top_right_yhhz">
<div class="zttitle">
隐患处理完成率
</div>
<div class="ztcxxx" style="padding-left: 0px;" >
<div class="search-item" >
<RelSelect style="width: 200px;margin-right: 10px;" hasValue src='jcsj/common/bm/queryGs' filterable :match="{value:'id',label:'bmmc'}" v-model='queryParams1.gsid' ></RelSelect>
<!-- <el-radio v-model="queryParams2.hzfs" label="GS">按公司</el-radio>
<el-radio v-model="queryParams2.hzfs" label="BM">按班组</el-radio>
<el-radio v-model="queryParams2.hzfs" label="RY">按人员</el-radio> -->
</div>
</div>
<div id="yhclChart" class="chart" >
</div>
</div>
</div>
<!-- 隐患率-->
<!-- 风险率-->
</div>
<div style="height: calc(100vh - 84px);display: flex;align-items: center;justify-content: center" class="lbt" v-else >
<span style="position: absolute;bottom: 50px;line-height: 40px;font-size: 18px;font-weight: 800;color:#787878" >本月暂无违规记录。</span>
<img style="height: 350px;width: 350px;" :src="aqpng" alt="" srcset="">
<div class="bottom">
<div class="zttitle">
待处理隐患
</div>
<div class="" style="height: calc(100% - 30px);width: 100%;">
<TablePager isAutoRoll showPagination queryAll :delButton='false' @getData='getData' :ref="'TablePager'" :app='app' :query='query' @selectItem='selectItem'
@getRow='getRow'>
</TablePager>
</div>
</div>
<!-- 轮播图-->
</div>
</template>
<script>
const baseurl=process.env.VUE_APP_BASE_API
import {
tableMixin
} from 'common'
import vueSeamlessScroll from 'vue-seamless-scroll'
import * as echarts from 'echarts';
import aqpng from '@/assets/images/aq.png'
console.log(aqpng,'png')
import {
doQuery as doQueryfx
} from "@/api/riskPrecontrol/riskAnalysis.js";
import {
queryYhsbtj as doQueryyh
} from "@/api/dangerManagement/yhslhz.js";
import {
doQuery as doQueryDcl
} from "@/api/dangerManagement/enterSafetyRecords.js"
import {
queryBglxFile
} from '@/api/threeViolations/enterTV.js';
export default{
components: {
vueSeamlessScroll
},
mixins: [tableMixin],
computed:{
defaultOption () {
return {
step: 0.2, // 数值越大速度滚动越快
limitMoveNum: 2, // 开始无缝滚动的数据量 this.dataList.length
hoverStop: true, // 是否开启鼠标悬停stop
direction: 1, // 0向下 1向上 2向左 3向右
openWatch: true, // 开启数据实时监控刷新dom
singleHeight: 0, // 单步运动停止的高度(默认值0是无缝不停止的滚动) direction => 0/1
singleWidth: 0, // 单步运动停止的宽度(默认值0是无缝不停止的滚动) direction => 2/3
waitTime: 1000 // 单步运动停止的时间(默认值1000ms)
}
},
gsid(){
return this.queryParams1.gsid
},
radio1(){
let val=this.queryParams1.rwlx
return val
},
// radio2(){
// let val=this.queryParams2.hzfs
// return val
// }
},
watch:{
gsid(val){
/* 监听公司id*/
if(val){
this.queryParams2.gsid= this.queryParams1.gsid
this.doQueryfx()
this.doQueryyh()
}
},
radio1(val){
this.doQueryfx()
},
// radio2(){
// this.doQueryyh()
// }
},
activated() {
console.log('activated')
this.$refs['TablePager'].pageQuery()
},
mounted(){
// $(this.$el).dblclick(()=>{
// window.fullScreen(this.$el)
// })
// this.$refs['TablePager'].pageQuery()
this.fxpcChart=echarts.init(document.getElementById('fxpcChart'))
this.yhclChart=echarts.init(document.getElementById('yhclChart'))
this.$nextTick(()=>{
// this.setChart(this.yhclChart,{
// name:'隐患整改完成率',
// title:'隐患整改'
// })
})
queryBglxFile({}).then(res=>{
this.showList=res.data.records||[]
// this.showList=[]
......@@ -50,33 +187,235 @@
},
data(){
return{
tableTitle: [
{label: "状态", prop: "ztName", fieldType: "ftString",width:60},
{label: "公司", prop: "gsid", fieldType: "ftString",width:192,transform:{
url:'jcsj/common/bm/queryGs',label:'bmmc',value:'id'
}},
{label: "班组", prop: "bmid", fieldType: "ftString",width:192,transform:{
url:'jcsj/common/bm/queryBz',label:'bmmc',value:'id'
}},
//
// {label: "状态", prop: "zt", fieldType: "ftString",transform:{
// url:'aqgl/yhgl/yhjl/init/zt',label:'name',value:'id'
// }},
// {label: "整改说明", prop: "clff", fieldType: "ftString",width:300},
// {label: "整改完成时间", prop: "clsj", fieldType: "ftDateTime"},
{label: "发现日期", prop: "fxrq", fieldType: "ftDateTime"},
/* */
{label: "整改日期", prop: "clsj", fieldType: "ftDateTime"},
{label: "复查日期", prop: "fcsj", fieldType: "ftDateTime"},
/* */
{label: "风险点", prop: "fxdName", fieldType: "ftString",width:300},
{label: "隐患地点", prop: "yhdd", fieldType: "ftString",width:300},
{label: "隐患类型", prop: "flid", fieldType: "ftString",width:192,transform:{
url:'aqgl/yhgl/yhfl/query',label:'name',value:'id'
}},
{label: "隐患等级", prop: "dj", fieldType: "ftString",width:192,transform:{
url:'aqgl/fxyk/fxpc/init/wxdj',label:'name',value:'id'
}},
{label: "内容", prop: "nr", fieldType: "ftString",width:300},
// {label: "责任部门", prop: "bmName", fieldType: "ftString",width:192},
// {label: "制定整改方案", prop: "zdzgfa", fieldType: "ftString",width:6},
{label: "责任人", prop: "zrrName", fieldType: "ftString",width:192},
{label: "整改方案", prop: "zgfa", fieldType: "ftString",width:300},
{label: "管控措施", prop: "gkcs", fieldType: "ftString",width:300},
{label: "要求整改完成时间", prop: "yqzgsj", fieldType: "ftDateTime"},
// {label: "隐患分类", prop: "flid", fieldType: "ftString",width:192},
{label: "处理人", prop: "clrName", fieldType: "ftString",width:192},
// {label: "处理时间", prop: "clsj", fieldType: "ftDateTime"},
// {label: "处理方法", prop: "clff", fieldType: "ftString",width:300},
{label: "复查人", prop: "fcrName", fieldType: "ftString",width:192},
{label: "上报人", prop: "sbrName", fieldType: "ftString",width:192},
/* 检查人 */
// {label: "复查时间", prop: "fcsj", fieldType: "ftDateTime"},
// {label: "复查结果", prop: "fcjg", fieldType: "ftString",width:300},
// {label: "处置人", prop: "czr", fieldType: "ftString",width:192},
// {label: "处置时间", prop: "czsj", fieldType: "ftDateTime"},
// {label: "处置意见", prop: "czyj", fieldType: "ftString",width:300},
// {label: "状态", prop: "zt", fieldType: "ftString",width:6},
// {label: "附件数", prop: "attachcount", fieldType: "int"},
{label: "备注", prop: "bz", fieldType: "ftString",width:300},
// {label: "工作流状态", prop: "wfpname", fieldType: "ftString",width:300},
{label: "维护人", prop: "whr", fieldType: "ftString"},
{label: "维护时间", prop: "whsj", fieldType: "ftDateTime"},
// {label: "创建人", prop: "cjr", fieldType: "ftString"},
// {label: "创建时间", prop: "cjsj", fieldType: "ftDateTime"},
],
queryParams1:{
grouptype:'GS',
rwlx:'D',
gsid:'',
// ksrq:new Date(new Date().setHours(0, 0, 0, 0)).getTime(),
// jsrq:new Date(new Date().setHours(23,59,59,999)).getTime()
ksrq:new Date().getTime(),
jsrq:new Date().getTime()
},
queryParams2:{
hzfs:'GS',
gsid:'',
ksrq:null,
jsrq:new Date().getTime()
// jsrq:new Date(new Date().setHours(23,59,59,999)).getTime()
},
queryParams:{
zt:'Z'
},
aqpng:aqpng,
baseurl:baseurl,
showList:[]
showList:[],
/* dom*/
fxpcChart:null,
yhclChart:null,
}
},
methods:{
query:doQueryDcl,
doQueryfx(){
doQueryfx(this.queryParams1).then(res=>{
if(res.success){
let value
if(res.data.records[0]){
value=res.data.records[0].wcPercent||0
}else{
value=0
}
this.setChart(this.fxpcChart,{
name:'风险排查率',
title:'风险排查',
value:value
})
}
})
},
doQueryyh(){
doQueryyh(this.queryParams2).then(res=>{
if(res.success){
let value
if(res.data.records[0]){
let data1=res.data.records[0]?res.data.records[0].wclCount:0;
let data2=res.data.records[0]?res.data.records[0].yclCount:0;
value=Number(parseFloat(data2/(data1+data2)).toFixed(4))*100;
// value=res.data.records[0].wcPercent||0
}else{
value=0
}
this.setChart(this.yhclChart,{
name:'隐患整改完成率',
title:'隐患整改',
value:value
})
}
})
},
/* 渲染仪表盘*/
setChart(chartDom,setting){
/* 基础配置*/
let option = {
tooltip: {
formatter: '{a} <br/>{b} : {c}%'
},
series: [
{
radius:'90%',
name:setting.title,
type: 'gauge',
center: ["50%", "50%"], // 仪表盘位置(圆心坐标)
progress: {
show: true
},
title:{
show:false
},
detail: {
valueAnimation: true,
formatter: '{value}'
},
data: [
{
value: setting.value,
name: setting.name
}
]
}
]
}
/* 渲染dom*/
chartDom.setOption(option)
}
}
}
</script>
<style lang="scss" scope>
.homePage{
.listf{
float: right;
}
.zttitle{
line-height: 30px;
font-size: 16px;
font-weight: 700;
color: #777;
width: 100%;
padding-left: 30px;
// text-align: center;
}
.ztcxxx{
height: 60px;
width: 100%;
}
.chart{
width: 100%;
height: calc(300px - 60px - 30px);
}
.top{
height:300px;
width:100%;
display: flex;
.top_right{
flex: 1;
// background-color: #eee;
display: flex;
/* fxpc*/
.top_right_fxpc{
flex:1
}
.top_right_yhhz{
flex:1
}
}
}
.bottom{
flex: 1;
border-bottom: 5px solid #eee;
border-left: 5px solid #eee;
border-right: 5px solid #eee;
}
.homePage{
width: 60%;
height: 100%;
}
.nodata{
background-image: url('/src/assets/image/aq.svg');
}
.lbt{
position: relative;
// height: 60%;
height: 100%;
width: 100%;
.lbtAll{
height: 100%;
width: 100%;
.sm{
padding-top: 16px;
padding-top: 16px;
padding-bottom: 26px;
display: flex;
justify-content: center;
......
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