首页在厂人员列表
This commit is contained in:
parent
b028869736
commit
41d1df3bc6
|
@ -65,7 +65,7 @@ const DEFAULT_CONFIG = {
|
|||
//小组件分布,com取值:views/home/components 文件名
|
||||
copmsList: [
|
||||
['ticket'],
|
||||
['eventlist'],
|
||||
// ['eventlist'],
|
||||
['about'],
|
||||
|
||||
]
|
||||
|
|
|
@ -20,16 +20,16 @@
|
|||
>{{ item.name }}</el-tag>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="7">
|
||||
<el-col :span="5">
|
||||
<el-form-item label="事件标记:"><span>{{ mark_options2[form.mark] }}</span></el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="7">
|
||||
<el-col :span="9">
|
||||
<el-form-item label="发生时间:"><span>{{ form.create_time }}</span></el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="10">
|
||||
<el-form-item label="发生区域:"><span v-if="form.area_">{{ form.area_.name }}</span></el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="7">
|
||||
<el-col :span="5">
|
||||
<el-form-item label="事件类型:">
|
||||
<span v-if="form.obj_cate=='opl'">作业</span>
|
||||
<span v-else-if="form.obj_cate=='people'">人员</span>
|
||||
|
@ -37,9 +37,10 @@
|
|||
<span v-else>其他</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="7">
|
||||
<el-col :span="9">
|
||||
<el-form-item v-if="form.obj_cate=='people'" label="触发人:">
|
||||
<span v-if="form.employee_">{{ form.employee_.name }}</span>
|
||||
<el-tag v-if="form.employee_">{{ form.employee_.belong_dept_name }}</el-tag>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="form.obj_cate=='opl'" label="触发作业:"><span>{{ form.operation_name }}</span></el-form-item>
|
||||
<el-form-item v-if="form.obj_cate=='area'" label="触发区域:"><span v-if="form.area_">{{ form.area_.name }}</span></el-form-item>
|
||||
|
|
|
@ -1,39 +1,29 @@
|
|||
<template>
|
||||
<el-row :gutter="6">
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-card shadow="hover" header="在厂人员" class="item-background" >
|
||||
<el-table :data="tableData" ref="table" row-key="id" fit hideDo height="332">
|
||||
<el-table-column label="姓名">
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.employee_">{{scope.row.employee_.name }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="部门">
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.employee_">{{ scope.row.employee_.belong_dept_name }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="当前位置">
|
||||
<template #default="scope">
|
||||
<div v-if="scope.row.employee_">
|
||||
<span v-if="scope.row.employee_.location">
|
||||
<span v-if="scope.row.employee_.location.area_fix_name">{{scope.row.employee_.location.area_fix_name }}</span>
|
||||
<span v-else>厂区内</span>
|
||||
</span>
|
||||
|
||||
<el-card shadow="hover">
|
||||
<template #header>
|
||||
<div class="card-header">
|
||||
<span>今日事件</span>
|
||||
<el-button @click="moreEvent" type="primary" text>更多</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="MAC">
|
||||
<scTable ref="table" :apiObj="apiObj" :params="params" row-key="id" fit stripe hideDo :height="tableHeight">
|
||||
<el-table-column label="事件种类">
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.employee_">{{ scope.row.code }}</span>
|
||||
<el-span v-for="item in scope.row.cates_" :key="item.id" :label="item.name" :value="item.id">{{
|
||||
item.name }}/</el-span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-pagination background
|
||||
:page-size="1000"
|
||||
:small="true"
|
||||
:total="total"></el-pagination>
|
||||
<el-table-column label="发生区域" prop="area_.name"></el-table-column>
|
||||
<el-table-column label="当事人" prop="employee_.name">
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.employee && scope.row.obj_cate == 'people'">{{ scope.row.employee_.name }}</span>
|
||||
<span v-else>未知人员</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="发生时间" prop="create_time"></el-table-column>
|
||||
</scTable>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
|
@ -43,7 +33,7 @@
|
|||
<span>今日事件统计</span>
|
||||
</div>
|
||||
</template>
|
||||
<scEcharts height="360px" :option="option3"></scEcharts>
|
||||
<scEcharts id="totalEchart" height="360px" :option="option3"></scEcharts>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
@ -60,26 +50,23 @@
|
|||
},
|
||||
data() {
|
||||
return {
|
||||
total:0,
|
||||
apiObj:null,
|
||||
dutyAgg: [],
|
||||
tableData:[],
|
||||
postOptions: [],
|
||||
option3: null,
|
||||
operationnumber: null,
|
||||
rpjnumber: null,
|
||||
visitnumber: null,
|
||||
apiObj1 : this.$API.third.blt.all
|
||||
divHeight:null,
|
||||
tableHeight:null,
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.apiObj = this.$API.ecm.event.list;
|
||||
var craeteTime = this.$TOOL.dateFormat(
|
||||
new Date().toLocaleDateString(),
|
||||
"yyyy-MM-dd"
|
||||
);
|
||||
|
||||
this.postOptions = [];
|
||||
this.$API.ecm.event.cateAgg
|
||||
.req({ completed: false, start_create: craeteTime })
|
||||
this.$API.ecm.event.cateAgg.req({ completed: false, start_create: craeteTime })
|
||||
.then((res) => {
|
||||
res.details.forEach((itemI, indexI) => {
|
||||
this.postOptions.push({ value: itemI.count, name: itemI.cate__name });
|
||||
|
@ -91,7 +78,6 @@
|
|||
trigger: "item",
|
||||
},
|
||||
legend: {
|
||||
// orient: 'vertical',
|
||||
left: 'center'
|
||||
},
|
||||
series: [
|
||||
|
@ -109,19 +95,23 @@
|
|||
},
|
||||
],
|
||||
};
|
||||
this.$API.third.blt.all
|
||||
.req()
|
||||
.then((res) => {
|
||||
res.forEach((item) => {
|
||||
this.total = res.length;
|
||||
this.tableData.push(item.my_info);
|
||||
});
|
||||
});
|
||||
// this.params.start_create = craeteTime;
|
||||
// this.apiObj1 = this.$API.third.blt.all;
|
||||
},
|
||||
mounted(){
|
||||
let height1 = document.getElementsByClassName('widgets-content')[0].clientHeight;
|
||||
console.log(height1)
|
||||
let bottomHeight = height1-138-120;
|
||||
this.tableHeight = bottomHeight/2-10;
|
||||
this.divHeight = bottomHeight/2+'px';
|
||||
|
||||
document.getElementById('totalEchart').style.height = this.divHeight
|
||||
},
|
||||
methods: {
|
||||
|
||||
moreEvent() {
|
||||
this.$router.push({
|
||||
name: "event",
|
||||
query: {},
|
||||
});
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -1,13 +1,8 @@
|
|||
<template>
|
||||
<el-row :gutter="6">
|
||||
<el-col :md="8" :sm="24">
|
||||
<el-card shadow="hover" style="">
|
||||
<template #header>
|
||||
<div class="card-header">
|
||||
<span>工单待办</span>
|
||||
</div>
|
||||
</template>
|
||||
<div class="card-body" v-if="dutyAgg.length>0">
|
||||
<el-card shadow="hover" header="工单待办" style="">
|
||||
<div class="card-body" v-if="dutyAgg.length>0" :style="{height:divHeight}">
|
||||
<div v-for="item in dutyAgg" :key="item.workflow" style="margin-bottom: 10px;height: fit-content;">
|
||||
<el-badge :value="item.count" class="item workItemImg">
|
||||
<el-button icon="el-icon-promotion" type="primary" size="small" @click="toTicket"></el-button>
|
||||
|
@ -15,111 +10,161 @@
|
|||
<div class="workItemText">{{ item.workflow__name }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body" v-else>
|
||||
<div class="card-body" v-else :style="{height:divHeight}">
|
||||
<div style="width:100%;line-height: 200px;color: #606266;text-align: center;">暂无待办工单</div>
|
||||
</div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :md="16" :sm="24">
|
||||
<el-card shadow="hover">
|
||||
<el-card shadow="hover" class="item-background" >
|
||||
<template #header>
|
||||
<div class="card-header">
|
||||
<span>今日事件</span>
|
||||
<el-button @click="moreEvent" type="primary" text>更多</el-button>
|
||||
<span>在厂人员</span>
|
||||
<el-radio-group v-model="countIndex" @change="countINdexChange">
|
||||
<el-radio :label="0" size="large">全部</el-radio>
|
||||
<el-radio :label="1" size="large">正式员工</el-radio>
|
||||
<el-radio :label="2" size="large">相关方</el-radio>
|
||||
<el-radio :label="3" size="large">司机</el-radio>
|
||||
<el-radio :label="4" size="large">访客</el-radio>
|
||||
</el-radio-group>
|
||||
<!-- <el-button @click="moreEvent" type="primary" text>更多</el-button> -->
|
||||
</div>
|
||||
</template>
|
||||
<div style="height:340px">
|
||||
<scTable ref="table" :apiObj="apiObj" :params="params" row-key="id" fit stripe hideDo>
|
||||
<!-- <el-table-column label="#" type="index" width="50"></el-table-column> -->
|
||||
<el-table-column label="事件种类">
|
||||
<el-table :data="tableData" ref="table" row-key="id" fit hideDo :height="tableHeight">
|
||||
<el-table-column label="姓名">
|
||||
<template #default="scope">
|
||||
<el-span v-for="item in scope.row.cates_" :key="item.id" :label="item.name" :value="item.id">{{
|
||||
item.name }}/</el-span>
|
||||
<span v-if="scope.row.employee_">{{scope.row.employee_.name }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="发生区域" prop="area_.name"></el-table-column>
|
||||
<el-table-column label="当事人" prop="employee_.name">
|
||||
<el-table-column label="人员类型" prop="employee_.type">
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.employee && scope.row.obj_cate == 'people'">{{ scope.row.employee_.name }}</span>
|
||||
<span v-else>未知人员</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<!-- <el-table-column label="人员类型" prop="employee_.type">
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.employee && scope.row.obj_cate == 'people'">
|
||||
<span v-if="
|
||||
scope.row.employee_.type != '' &&
|
||||
scope.row.employee_.type == 'employee'
|
||||
">正式员工</span>
|
||||
<span v-if="
|
||||
scope.row.employee_.type != '' &&
|
||||
scope.row.employee_.type == 'remployee'
|
||||
">相关方</span>
|
||||
<span v-if="
|
||||
scope.row.employee_.type != '' &&
|
||||
scope.row.employee_.type == 'visitor'
|
||||
">访客</span>
|
||||
<span v-if="scope.row.employee_ ">
|
||||
<el-tag type="primary" v-if="scope.row.employee_.type!=''&&scope.row.employee_.type =='employee'">正式员工</el-tag>
|
||||
<el-tag type="success" v-if="scope.row.employee_.type!=''&&scope.row.employee_.type=='remployee'">相关方</el-tag>
|
||||
<el-tag type="warning" v-if="scope.row.employee_.type!=''&&scope.row.employee_.type=='visitor'">访客</el-tag>
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
<el-table-column label="发生时间" prop="create_time"></el-table-column>
|
||||
|
||||
<!-- <el-table-column
|
||||
label="处理人"
|
||||
prop="handle_user_name"
|
||||
></el-table-column> -->
|
||||
</scTable>
|
||||
</el-table-column>
|
||||
<el-table-column label="部门">
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.employee_">{{ scope.row.employee_.belong_dept_name }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="当前位置">
|
||||
<template #default="scope">
|
||||
<div v-if="scope.row.employee_">
|
||||
<span v-if="scope.row.employee_.location">
|
||||
<span v-if="scope.row.employee_.location.area_fix_name">{{scope.row.employee_.location.area_fix_name }}</span>
|
||||
<span v-else>厂区内</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="MAC">
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.employee_">{{ scope.row.code }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-pagination background
|
||||
:page-size="1000"
|
||||
:small="true"
|
||||
:total="total"></el-pagination>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<!-- <el-col :md="8" :sm="24">
|
||||
<el-card shadow="hover">
|
||||
<template #header>
|
||||
<div class="card-header">
|
||||
<span>今日事件统计</span>
|
||||
</div>
|
||||
</template>
|
||||
<scEcharts height="340px" :option="option3"></scEcharts>
|
||||
</el-card>
|
||||
</el-col> -->
|
||||
</el-row>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import scEcharts from "@/components/scEcharts";
|
||||
|
||||
export default {
|
||||
title: "今日事件",
|
||||
icon: "el-icon-present",
|
||||
description: "今日事件",
|
||||
components: {
|
||||
scEcharts,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
total:0,
|
||||
dutyAgg:[],
|
||||
params: {
|
||||
page: 1,
|
||||
page_size: 20,
|
||||
start_create: "",
|
||||
},
|
||||
tableData:[],
|
||||
allData:[],
|
||||
countIndex:0,
|
||||
listTimer:null,
|
||||
apiObj: null,
|
||||
postOptions: [],
|
||||
option3: null,
|
||||
divHeight:null,
|
||||
tableHeight:null,
|
||||
operationnumber: null,
|
||||
rpjnumber: null,
|
||||
visitnumber: null,
|
||||
};
|
||||
},
|
||||
created() {
|
||||
|
||||
this.apiObj = this.$API.ecm.event.list;
|
||||
this.getdutyAgg();
|
||||
let that = this;
|
||||
that.apiObj = that.$API.ecm.event.list;
|
||||
that.getdutyAgg();
|
||||
that.getList();
|
||||
},
|
||||
mounted(){
|
||||
let that = this;
|
||||
let height1 = document.getElementsByClassName('widgets-content')[0].clientHeight;
|
||||
console.log(height1)
|
||||
let bottomHeight = height1-138-120;
|
||||
that.tableHeight = bottomHeight/2-28;
|
||||
that.divHeight = bottomHeight/2+'px';
|
||||
that.listTimer = setInterval(function(){
|
||||
that.getList();
|
||||
},60000)
|
||||
},
|
||||
|
||||
methods: {
|
||||
getList(){
|
||||
let that = this;
|
||||
that.$API.third.blt.all.req().then((res) => {
|
||||
that.allData = [];
|
||||
res.forEach(item=>{
|
||||
that.allData.push(item.my_info);
|
||||
})
|
||||
that.total = that.allData.length;
|
||||
that.getOnline();
|
||||
});
|
||||
},
|
||||
//类型切换
|
||||
countINdexChange(index) {
|
||||
this.countIndex = index;
|
||||
this.getOnline();
|
||||
},
|
||||
getOnline(){
|
||||
let that = this;
|
||||
that.tableData = [];
|
||||
if(that.countIndex==0){
|
||||
that.tableData = that.allData;
|
||||
that.total = that.tableData.length;
|
||||
}else if(that.countIndex==1){
|
||||
that.allData.forEach(item=>{
|
||||
if(item.employee_.type=='employee'){
|
||||
that.tableData.push(item);
|
||||
}
|
||||
})
|
||||
that.total = that.tableData.length;
|
||||
}else if(that.countIndex==2){
|
||||
that.allData.forEach(item=>{
|
||||
if(item.employee_.type=='remployee'){
|
||||
that.tableData.push(item);
|
||||
}
|
||||
})
|
||||
that.total = that.tableData.length;
|
||||
}else if(that.countIndex==3){
|
||||
that.allData.forEach(item=>{
|
||||
if(item.employee_.type=='driver'){
|
||||
that.tableData.push(item);
|
||||
}
|
||||
})
|
||||
that.total = that.tableData.length;
|
||||
}else if(that.countIndex==4){
|
||||
that.allData.forEach(item=>{
|
||||
if(item.employee_.type=='visitor'){
|
||||
that.tableData.push(item);
|
||||
}
|
||||
})
|
||||
that.total = that.tableData.length;
|
||||
}
|
||||
},
|
||||
moreEvent() {
|
||||
this.$router.push({
|
||||
name: "event",
|
||||
|
@ -138,6 +183,10 @@ export default {
|
|||
this.dutyAgg = res.details;
|
||||
},
|
||||
},
|
||||
unmounted(){
|
||||
clearInterval(this.listTimer);
|
||||
this.listTimer = null;
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
|
|
|
@ -49,7 +49,7 @@
|
|||
<div class="screen-cockpits">
|
||||
<div class="cockpit-count">
|
||||
<div class="count-list">
|
||||
<div class="count-list-item">
|
||||
<div :class="[countIndex==2 ? 'zaichang' : '','count-list-item']" @click="userTypeChange(1)">
|
||||
<div class="item-img item-img1"></div>
|
||||
<div class="item-info">
|
||||
<div title="正式员工" class="normal">正式员工</div>
|
||||
|
@ -58,7 +58,7 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="count-list-item">
|
||||
<div :class="[countIndex==2 ? 'zaichang' : '','count-list-item']" @click="userTypeChange(2)">
|
||||
<div class="item-img item-img3"></div>
|
||||
<div class="item-info">
|
||||
<div title="相关方" class="normal">相关方</div>
|
||||
|
@ -67,7 +67,7 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="count-list-item">
|
||||
<div :class="[countIndex==2 ? 'zaichang' : '','count-list-item']" @click="userTypeChange(3)">
|
||||
<div class="item-img item-img4"></div>
|
||||
<div class="item-info">
|
||||
<div title="司机" class="normal">货车司机</div>
|
||||
|
@ -76,7 +76,7 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="count-list-item">
|
||||
<div :class="[countIndex==2 ? 'zaichang' : '','count-list-item']" @click="userTypeChange(4)">
|
||||
<div class="item-img item-img2"></div>
|
||||
<div class="item-info">
|
||||
<div title="访客" class="normal">访客</div>
|
||||
|
@ -91,13 +91,88 @@
|
|||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="6">
|
||||
<el-col :md="8" :sm="24">
|
||||
<el-card shadow="hover" header="工单待办" style="">
|
||||
<div class="card-body" v-if="dutyAgg.length>0" :style="{height:divHeight}">
|
||||
<div v-for="item in dutyAgg" :key="item.workflow" style="margin-bottom: 10px;height: fit-content;">
|
||||
<el-badge :value="item.count" class="item workItemImg">
|
||||
<el-button icon="el-icon-promotion" type="primary" size="small" @click="toDutyTicket"></el-button>
|
||||
</el-badge>
|
||||
<div class="workItemText">{{ item.workflow__name }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body" v-else :style="{height:divHeight}">
|
||||
<div style="width:100%;line-height: 200px;color: #606266;text-align: center;">暂无待办工单</div>
|
||||
</div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :md="16" :sm="24">
|
||||
<el-card shadow="hover" class="item-background" >
|
||||
<template #header>
|
||||
<div class="card-header">
|
||||
<span>在厂人员</span>
|
||||
<el-radio-group v-model="currentIndex" @change="currentINdexChange">
|
||||
<el-radio :label="0" size="large">全部</el-radio>
|
||||
<el-radio :label="1" size="large">正式员工</el-radio>
|
||||
<el-radio :label="2" size="large">相关方</el-radio>
|
||||
<el-radio :label="3" size="large">司机</el-radio>
|
||||
<el-radio :label="4" size="large">访客</el-radio>
|
||||
</el-radio-group>
|
||||
<!-- <el-button @click="moreEvent" type="primary" text>更多</el-button> -->
|
||||
</div>
|
||||
</template>
|
||||
<el-table :data="tableData" ref="table" row-key="id" fit hideDo :height="tableHeight">
|
||||
<el-table-column label="姓名">
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.employee_">{{scope.row.employee_.name }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="人员类型" prop="employee_.type">
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.employee_ ">
|
||||
<el-tag type="primary" v-if="scope.row.employee_.type!=''&&scope.row.employee_.type =='employee'">正式员工</el-tag>
|
||||
<el-tag type="success" v-if="scope.row.employee_.type!=''&&scope.row.employee_.type=='remployee'">相关方</el-tag>
|
||||
<el-tag type="warning" v-if="scope.row.employee_.type!=''&&scope.row.employee_.type=='visitor'">访客</el-tag>
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="部门">
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.employee_">{{ scope.row.employee_.belong_dept_name }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="当前位置">
|
||||
<template #default="scope">
|
||||
<div v-if="scope.row.employee_">
|
||||
<span v-if="scope.row.employee_.location">
|
||||
<span v-if="scope.row.employee_.location.area_fix_name">{{scope.row.employee_.location.area_fix_name }}</span>
|
||||
<span v-else>厂区内</span>
|
||||
</span>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="MAC">
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.employee_">{{ scope.row.code }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-pagination background
|
||||
:page-size="1000"
|
||||
:small="true"
|
||||
:total="total"></el-pagination>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
dutyAgg: [],
|
||||
// dutyAgg: [],
|
||||
aggTimer:null,
|
||||
//数据统计
|
||||
ep_count_type: "2",
|
||||
countIndex: "2",
|
||||
|
@ -112,14 +187,41 @@ export default {
|
|||
rpjnumber: 0,
|
||||
visitnumber: 0,
|
||||
visitnumber2: 0,
|
||||
total:0,
|
||||
dutyAgg:[],
|
||||
tableData:[],
|
||||
allData:[],
|
||||
currentIndex:0,
|
||||
apiObj: null,
|
||||
divHeight:null,
|
||||
tableHeight:null,
|
||||
// rpjnumber: null,
|
||||
// visitnumber: null,
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getdutyAgg();
|
||||
this.getManCount(); //人员统计$$
|
||||
this.getOperation();
|
||||
this.getRpj();
|
||||
this.getVisit2();
|
||||
let that = this;
|
||||
that.apiObj = that.$API.ecm.event.list;
|
||||
// that.getdutyAgg();
|
||||
that.getList();
|
||||
that.getdutyAgg();
|
||||
that.getManCount(); //人员统计$$
|
||||
that.getOperation();
|
||||
that.getRpj();
|
||||
that.getVisit2();
|
||||
|
||||
},
|
||||
mounted(){
|
||||
let that = this;
|
||||
let height1 = document.getElementsByClassName('widgets-content')[0].clientHeight;
|
||||
console.log(height1)
|
||||
let bottomHeight = height1-138-120;
|
||||
that.tableHeight = bottomHeight/2-28;
|
||||
that.divHeight = bottomHeight/2+'px';
|
||||
that.aggTimer = setInterval(function(){
|
||||
that.getList();
|
||||
that.getManCount();
|
||||
},60000)
|
||||
},
|
||||
methods: {
|
||||
toTicket() {
|
||||
|
@ -141,10 +243,10 @@ export default {
|
|||
});
|
||||
},
|
||||
//工单待办
|
||||
async getdutyAgg() {
|
||||
let res = await this.$API.wf.ticket.dutyAgg.req({ page: 0 });
|
||||
this.dutyAgg = res.details;
|
||||
},
|
||||
// async getdutyAgg() {
|
||||
// let res = await this.$API.wf.ticket.dutyAgg.req({ page: 0 });
|
||||
// this.dutyAgg = res.details;
|
||||
// },
|
||||
//人员统计
|
||||
getManCount() {
|
||||
let that = this;
|
||||
|
@ -206,6 +308,91 @@ export default {
|
|||
});
|
||||
});
|
||||
},
|
||||
getList(){
|
||||
let that = this;
|
||||
that.$API.third.blt.all.req().then((res) => {
|
||||
that.allData = [];
|
||||
res.forEach(item=>{
|
||||
that.allData.push(item.my_info);
|
||||
})
|
||||
that.total = that.allData.length;
|
||||
that.getOnline();
|
||||
});
|
||||
},
|
||||
//类型切换
|
||||
currentINdexChange(index) {
|
||||
this.currentIndex = index;
|
||||
this.getOnline();
|
||||
},
|
||||
userTypeChange(type){
|
||||
// debugger;
|
||||
let that = this;
|
||||
if(that.countIndex==2){
|
||||
that.currentIndex = type;
|
||||
that.getOnline();
|
||||
}
|
||||
|
||||
},
|
||||
getOnline(){
|
||||
let that = this;
|
||||
that.tableData = [];
|
||||
if(that.currentIndex==0){
|
||||
that.tableData = that.allData;
|
||||
that.total = that.tableData.length;
|
||||
}else if(that.currentIndex==1){
|
||||
that.allData.forEach(item=>{
|
||||
if(item.employee_.type=='employee'){
|
||||
that.tableData.push(item);
|
||||
}
|
||||
})
|
||||
that.total = that.tableData.length;
|
||||
}else if(that.currentIndex==2){
|
||||
that.allData.forEach(item=>{
|
||||
if(item.employee_.type=='remployee'){
|
||||
that.tableData.push(item);
|
||||
}
|
||||
})
|
||||
that.total = that.tableData.length;
|
||||
}else if(that.currentIndex==3){
|
||||
that.allData.forEach(item=>{
|
||||
if(item.employee_.type=='driver'){
|
||||
that.tableData.push(item);
|
||||
}
|
||||
})
|
||||
that.total = that.tableData.length;
|
||||
}else if(that.currentIndex==4){
|
||||
that.allData.forEach(item=>{
|
||||
if(item.employee_.type=='visitor'){
|
||||
that.tableData.push(item);
|
||||
}
|
||||
})
|
||||
that.total = that.tableData.length;
|
||||
}
|
||||
},
|
||||
moreEvent() {
|
||||
this.$router.push({
|
||||
name: "event",
|
||||
query: {},
|
||||
});
|
||||
},
|
||||
toDutyTicket() {
|
||||
this.$router.push({
|
||||
name: "duty",
|
||||
query: {},
|
||||
});
|
||||
},
|
||||
//工单待办
|
||||
async getdutyAgg() {
|
||||
let res = await this.$API.wf.ticket.dutyAgg.req({ page: 0 });
|
||||
this.dutyAgg = res.details;
|
||||
},
|
||||
},
|
||||
unmounted(){
|
||||
clearInterval(this.aggTimer);
|
||||
this.aggTimer = null;
|
||||
// console.log(this.aggTimer)
|
||||
// console.log('00000')
|
||||
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
@ -297,6 +484,7 @@ export default {
|
|||
height: 50%;
|
||||
display: flex;
|
||||
|
||||
|
||||
.item-img {
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
|
@ -353,6 +541,9 @@ export default {
|
|||
}
|
||||
}
|
||||
}
|
||||
.count-list-item.zaichang{
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
|
||||
.simple-title {
|
||||
|
|
Loading…
Reference in New Issue