This commit is contained in:
2309368887@qq.com 2022-07-13 17:27:32 +08:00
parent b2d50e536a
commit 90e1ffdbf3
7 changed files with 764 additions and 114 deletions

BIN
public/img/zuoye.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

@ -82,6 +82,15 @@ export default {
data); data);
} }
}, },
cate:{
name: "创建",
req: async function(data){
return await http.post(
`${config.API_URL}/ecm/event/cate_agg/`,
data);
}
}
} }
, ,

View File

@ -57,12 +57,12 @@ const DEFAULT_CONFIG = {
//控制台首页默认布局 //控制台首页默认布局
DEFAULT_GRID: { DEFAULT_GRID: {
//默认分栏数量和宽度 例如 [24] [18,6] [8,8,8] [6,12,6] //默认分栏数量和宽度 例如 [24] [18,6] [8,8,8] [6,12,6]
layout: [12, 6, 6], layout: [24, 24, 6],
//小组件分布com取值:views/home/components 文件名 //小组件分布com取值:views/home/components 文件名
copmsList: [ copmsList: [
['welcome'], ['ticket'],
['about', 'ver'], ['eventlist'],
['time', 'progress']
] ]
} }
} }

View File

@ -0,0 +1,261 @@
<template>
<el-row>
<el-col :md="4" :sm="24" style="padding-left: 7.5px;padding-right: 7.5px">
<el-card shadow="hover" style="height:438px;" header="工单待办">
<div class="welcome" v-for="item in dutyAgg" :key="item.workflow">
<div style="width:33%;float:left">
<div style="margin: 0px 20px 12px 40px;">
<el-badge :value="item.count" class="item">
<el-button
icon="el-icon-document-copy"
type="primary"
size="small"
></el-button>
</el-badge>
</div>
<div style="margin: 0px 20px 12px 40px">
<span>{{item.workflow__name}}</span>
</div>
</div>
</div>
</el-card>
</el-col>
<el-col :md="10" :sm="24" style="padding-left: 7.5px;padding-right: 7.5px;
">
<el-card shadow="hover" header="今日事件">
<el-button style="float: right; padding: 3px;margin-top: -44px;" type="text" @click="moreEvent">更多</el-button>
<div class="welcome">
<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="事件种类">
<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
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="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>
</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>
</div>
</el-card>
</el-col>
<el-col :md="10" :sm="24" style="
padding-left: 7.5px;">
<el-card header="今日事件统计">
<scEcharts
height="360px"
: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 {
dutyAgg:[],
params: {
page: 1,
page_size: 20,
start_create: ""
},
apiObj: null,
postOptions: [],
option3:null,
operationnumber: null,
rpjnumber:null,
visitnumber:null
};
},
created() {
var craeteTime=this.$TOOL.dateFormat(
new Date().toLocaleDateString(),
"yyyy-MM-dd"
);
this.postOptions = [];
this.$API.ecm.event.cate.req({ completed: false,start_create:craeteTime }).then((res) => {
res.details.forEach((itemI, indexI) => {
this.postOptions.push({ value: itemI.count, name: itemI.cate__name });
});
});
this.option3 = {
title: {},
tooltip: {
trigger: "item",
},
series: [
{
name: "事件分类",
type: "pie",
radius: ["40%", "70%"],
center: ["50%", "60%"],
label: false,
data: this.postOptions,
},
],
};
this.params.start_create = craeteTime;
this.apiObj = this.$API.ecm.event.list;
this.getdutyAgg();
},
methods: {
moreEvent(){
this.$router.push({
name: "event",
query: {
},
});
},
//
async getdutyAgg() {
let res = await this.$API.wf.ticket.dutyAgg.req({ page: 0 });
this.dutyAgg = res.details;
},
},
};
</script>
<style scoped>
.welcome .logo {
text-align: center;
}
.welcome .logo img {
vertical-align: bottom;
width: 100px;
height: 100px;
margin-bottom: 20px;
}
.welcome .logo h2 {
font-size: 30px;
font-weight: normal;
display: flex;
align-items: center;
justify-content: center;
}
.tips {
margin-top: 20px;
padding: 0 40px;
}
.tips-item {
display: flex;
align-items: center;
justify-content: center;
padding: 7.5px 0;
}
.tips-item-icon {
width: 40px;
height: 40px;
display: flex;
align-items: center;
justify-content: center;
border-radius: 50%;
font-size: 18px;
margin-right: 20px;
color: var(--el-color-primary);
background: rgba(180, 180, 180, 0.1);
}
.tips-item-message {
flex: 1;
font-size: 14px;
}
.actions {
text-align: center;
margin: 40px 0 20px 0;
}
</style>

View File

@ -0,0 +1,485 @@
<template>
<el-row>
<el-col :md="12" :sm="24" style="padding-right: 7.5px; padding-left: 7.5px">
<el-card header="进行项目">
<div style="width:33%;float:left">
<div style="margin: 0px 20px 12px 40px;">
<el-badge :value="operationnumber" class="item">
<el-button
icon="el-icon-document-copy"
type="primary"
size="small"
></el-button>
</el-badge>
</div>
<div style="margin: 0px 20px 12px 40px">
<span>作业</span>
</div>
</div>
<div style="width:33%;float:left">
<div style="margin: 0px 20px 12px 40px;">
<el-badge :value="rpjnumber" class="item">
<el-button
icon="el-icon-document-copy"
type="warning"
size="small"
></el-button>
</el-badge>
</div>
<div style="margin: 0px 20px 12px 40px">
<span>相关方项目</span>
</div>
</div>
<div style="width:33%;float:left">
<div style="margin: 0px 20px 12px 40px;">
<el-badge :value="visitnumber" class="item">
<el-button
icon="el-icon-document-copy"
type="success"
size="small"
></el-button>
</el-badge>
</div>
<div style="margin: 0px 20px 12px 40px">
<span>访客项目</span>
</div>
</div>
</el-card>
</el-col>
<el-col :md="12" :sm="24" style="padding-left: 7.5px">
<el-card>
<div class="screen-cockpits">
<div class="cockpit-count">
<div class="divider"></div>
<div class="simple-title">
<span>人员统计</span>
<div class="countTypeWrap">
<span
:class="{ activeCount: countIndex === '1' }"
@click="countINdexChange('1')"
>有卡</span
>
<el-divider direction="vertical"></el-divider>
<span
:class="{ activeCount: countIndex === '2' }"
@click="countINdexChange('2')"
>在厂</span
>
</div>
</div>
<div class="count-list">
<div class="count-list-item">
<div class="item-img item-img2"></div>
<div class="item-info">
<div title="员工" class="normal">内部员工</div>
<div class="bottom">
<span class="large">{{ userCount.count_employee }}</span
>&nbsp;<span class="normal"></span>
</div>
</div>
</div>
<div class="count-list-item">
<div class="item-img item-img1"></div>
<div class="item-info">
<div title="外来人员" class="normal">访客</div>
<div class="bottom">
<span class="large">{{ userCount.count_visitor }}</span
>&nbsp;<span class="normal"></span>
</div>
</div>
</div>
<div class="count-list-item">
<div class="item-img item-img3"></div>
<div class="item-info">
<div title="承包商" class="normal">相关方</div>
<div class="bottom">
<span class="large">{{ userCount.count_remployee }}</span
>&nbsp;<span class="normal"></span>
</div>
</div>
</div>
</div>
</div>
</div>
</el-card>
</el-col>
</el-row>
</template>
<script>
export default {
data() {
return {
dutyAgg: [],
//
userCount: {
total: 0,
count_employee: 0, //
count_remployee: 0, //访
count_visitor: 0, //
},
operationnumber: null,
rpjnumber:null,
visitnumber:null
};
},
created() {
this.getdutyAgg();
this.getManCount(); //$$
this.getOperation();
this.getRpj();
this.getVisit();
},
methods: {
//
async getdutyAgg() {
let res = await this.$API.wf.ticket.dutyAgg.req({ page: 0 });
this.dutyAgg = res.details;
},
//
getManCount() {
let that = this;
if (that.countIndex === "2") {
that.$API.third.blt.countNow.req().then((res) => {
if (res.err_msg) {
} else {
that.userCount = { ...res };
}
});
} else {
that.$API.third.blt.countBind.req().then((res) => {
if (res.err_msg) {
} else {
that.userCount = { ...res };
}
});
}
},
///线
countINdexChange(index) {
this.countIndex = index;
this.getManCount();
},
//
getOperation() {
this.$API.opm.operation.list
.req({ page: 1, page_size: 1, state: 10 })
.then((res) => {
this.operationnumber = res.count;
});
},
//
getRpj() {
this.$API.rpm.rpj.list
.req({ page: 1, page_size: 1, state: 10 })
.then((res) => {
this.rpjnumber = res.count;
});
},
//访
getVisit() {
this.$API.vm.visit.list
.req({ page: 1, page_size: 1, state: 10 })
.then((res) => {
this.visitnumber = res.count;
});
},
},
};
</script>
<style scoped lang="scss">
.welcome .logo {
text-align: center;
}
.welcome .logo img {
vertical-align: bottom;
width: 100px;
height: 100px;
margin-bottom: 20px;
}
.welcome .logo h2 {
font-size: 30px;
font-weight: normal;
display: flex;
align-items: center;
justify-content: center;
}
.tips {
margin-top: 20px;
padding: 0 40px;
}
.tips-item {
display: flex;
align-items: center;
justify-content: center;
padding: 7.5px 0;
}
.tips-item-icon {
width: 40px;
height: 40px;
display: flex;
align-items: center;
justify-content: center;
border-radius: 50%;
font-size: 18px;
margin-right: 20px;
color: var(--el-color-primary);
background: rgba(180, 180, 180, 0.1);
}
.item {
margin-top: 10px;
margin-right: 40px;
}
.tips-item-message {
flex: 1;
font-size: 14px;
}
.item-img {
width: 50px;
height: 50px;
position: relative;
margin-right: 6px;
flex-shrink: 0;
}
.item-img:after {
content: "";
width: 38px;
height: 38px;
position: absolute;
left: 7px;
top: 7px;
background: url(/public/img/rotate_line.png) no-repeat;
background-size: 100% 100%;
-webkit-animation: rotate 4s linear infinite;
animation: rotate 4s linear infinite;
}
.zuoye {
background: url(/public/img/zuoye.png) no-repeat;
background-size: 100% 100%;
}
.actions {
text-align: center;
margin: 40px 0 20px 0;
}
.screen-cockpits {
margin-top: -15px;
.cockpit-count {
.count-list {
display: flex;
flex-wrap: wrap;
margin-bottom: 8px;
.count-list-item {
width: 33.3333%;
height: 50%;
display: flex;
.item-img {
width: 50px;
height: 50px;
position: relative;
margin-right: 6px;
flex-shrink: 0;
}
.item-img:after {
content: "";
width: 38px;
height: 38px;
position: absolute;
left: 7px;
top: 7px;
background: url(/public/img/rotate_line.png) no-repeat;
background-size: 100% 100%;
-webkit-animation: rotate 4s linear infinite;
animation: rotate 4s linear infinite;
}
.item-img1 {
background: url(/public/img/icon_wlry.png) no-repeat;
background-size: 100% 100%;
}
.item-img2 {
background: url(/public/img/icon_nbyg.png) no-repeat;
background-size: 100% 100%;
}
.item-img3 {
background: url(/public/img/icon_cbs.png) no-repeat;
background-size: 100% 100%;
}
.item-info {
.normal {
font-size: 12px;
font-weight: 400;
// color: #fff;
}
.large {
font-size: 30px;
font-weight: 400;
//color: #fff;
}
}
}
}
.simple-title {
line-height: 22px;
font-size: 16px;
font-weight: 700;
//color: #fff;
position: relative;
padding-left: 8px;
height: 44px;
display: flex;
align-items: center;
justify-content: space-between;
.countTypeWrap {
font-size: 14px;
span {
cursor: pointer;
}
.activeCount {
display: inline-block;
height: 32px;
line-height: 32px;
border-radius: 16px;
//color: #fff;
font-size: 14px;
padding: 0 18px;
border: 1px solid #32fde3;
background: #007767;
box-shadow: inset 0 0 8px #5aecf0;
cursor: pointer;
}
}
}
}
.cockpit-alarm {
.alarm-bell {
padding: 0 18px 0 32px;
position: relative;
// color: #fff;
}
.alarm-bell:after {
content: "";
position: absolute;
left: 12px;
top: 8px;
width: 14px;
height: 16px;
background: url(/public/img/bell.png) no-repeat;
background-size: 100% 100%;
}
.alarm-bell.danger {
border: 1px solid #ffc679;
background: #dd8000;
box-shadow: inset 0 0 8px #fda732;
}
.alarm-bell.danger:hover {
box-shadow: 0 0 8px #fda732, inset 0 0 8px #fda732;
}
.alarm-content {
display: flex;
justify-content: space-between;
height: calc(100% - 50px);
.content-left {
width: 160px;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
.alarm-danger {
width: 150px;
height: 150px;
background: url(/public/img/a_danger.png) no-repeat;
background-size: 100% 100%;
}
}
.content-right {
width: calc(100% - 170px);
height: 100%;
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: center;
.alarm-item {
width: 50%;
height: 25%;
font-size: 14px;
font-weight: 700;
padding-left: 8px;
position: relative;
display: flex;
align-items: center;
.item-name {
margin-right: 4px;
flex-shrink: 0;
}
.item-number {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.item-icon {
width: 14px;
height: 14px;
margin-right: 4px;
flex-shrink: 0;
}
}
.alarm-item-danger {
color: #fda732;
.item-icon {
background: url(/public/img/r_danger.png) no-repeat;
background-size: 100% 100%;
}
}
.alarm-item-safe {
// color: #fff;
.item-icon {
background: url(/public/img/r_safe.png) no-repeat;
background-size: 100% 100%;
}
}
}
}
}
.cockpit-info {
.header-tab {
width: 210px;
}
}
}
</style>

View File

@ -1,103 +0,0 @@
<template>
<el-card shadow="hover" header="今日事件">
<div class="welcome">
<el-table :data="eventData.list">
<el-table-column label="类型" prop=""></el-table-column>
<el-table-column label="区域" prop=""></el-table-column>
<el-table-column label="当事人" prop=""></el-table-column>
<el-table-column label="人员类型" prop=""></el-table-column>
</el-table>
<el-pagination
:page-size="params.page_size"
:pager-count="5"
v-model:currentPage="params.page"
layout="prev, pager, next"
:total="eventData.total"
@current-change="handleCurrentChange"/>
</div>
</el-card>
</template>
<script>
export default {
title: "今日事件",
icon: "el-icon-present",
description: "今日事件",
data() {
return {
params: {
page: 1,
page_size: 20,
},
eventData: {
list: [],
total: 0
},
}
},
methods: {
godoc() {
window.open("https://lolicode.gitee.io/scui-doc/")
}
}
}
</script>
<style scoped>
.welcome {
}
.welcome .logo {
text-align: center;
}
.welcome .logo img {
vertical-align: bottom;
width: 100px;
height: 100px;
margin-bottom: 20px;
}
.welcome .logo h2 {
font-size: 30px;
font-weight: normal;
display: flex;
align-items: center;
justify-content: center;
}
.tips {
margin-top: 20px;
padding: 0 40px;
}
.tips-item {
display: flex;
align-items: center;
justify-content: center;
padding: 7.5px 0;
}
.tips-item-icon {
width: 40px;
height: 40px;
display: flex;
align-items: center;
justify-content: center;
border-radius: 50%;
font-size: 18px;
margin-right: 20px;
color: var(--el-color-primary);
background: rgba(180, 180, 180, 0.1);
}
.tips-item-message {
flex: 1;
font-size: 14px;
}
.actions {
text-align: center;
margin: 40px 0 20px 0;
}
</style>

View File

@ -1,15 +1,13 @@
<template> <template>
<div :class="['widgets-home', customizing?'customizing':'']" ref="main"> <div :class="['widgets-home', customizing?'customizing':'']" ref="main">
<div class="widgets-content"> <div class="widgets-content">
<div class="widgets-top"> <!--<div class="widgets-top">
<div class="widgets-top-title">
控制台
</div>
<div class="widgets-top-actions"> <div class="widgets-top-actions">
<el-button v-if="customizing" type="primary" icon="el-icon-check" round @click="save">完成</el-button> <el-button v-if="customizing" type="primary" icon="el-icon-check" round @click="save">完成</el-button>
<el-button v-else type="primary" icon="el-icon-edit" round @click="custom">自定义</el-button> <el-button v-else type="primary" icon="el-icon-edit" round @click="custom">自定义</el-button>
</div> </div>
</div> </div>-->
<div class="widgets" ref="widgets"> <div class="widgets" ref="widgets">
<div class="widgets-wrapper"> <div class="widgets-wrapper">
<div v-if="nowCompsList.length<=0" class="no-widgets"> <div v-if="nowCompsList.length<=0" class="no-widgets">
@ -33,7 +31,7 @@
</div> </div>
</div> </div>
</div> </div>
<div v-if="customizing" class="widgets-aside"> <!-- <div v-if="customizing" class="widgets-aside">
<el-container> <el-container>
<el-header> <el-header>
<div class="widgets-aside-title"><el-icon><el-icon-circle-plus-filled/></el-icon></div> <div class="widgets-aside-title"><el-icon><el-icon-circle-plus-filled/></el-icon></div>
@ -85,7 +83,7 @@
<el-button size="small" @click="backDefaul()">恢复默认</el-button> <el-button size="small" @click="backDefaul()">恢复默认</el-button>
</el-footer> </el-footer>
</el-container> </el-container>
</div> </div>-->
</div> </div>
</template> </template>