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