Merge branch 'dev-yjl' into 'shenzhen-dev'
金林湾大屏修改 See merge request !139
This commit is contained in:
commit
164242aed3
@ -14,7 +14,7 @@
|
||||
<div class="countItem">
|
||||
<img src="@//assets/images/dataBoard/training.png" />
|
||||
<div class="info">
|
||||
<div class="num2 num">{{ statisticsCount.educationPersonNum }}</div>
|
||||
<div class="num2 num">{{ totalPerson}}</div>
|
||||
<div class="label">{{ "在场总人数" }}</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -42,7 +42,7 @@
|
||||
<div class="countItem">
|
||||
<img src="@//assets/images/dataBoard/training2.png" />
|
||||
<div class="info">
|
||||
<div class="num4 num">{{ statisticsCount.workercount.totalPerson }}</div>
|
||||
<div class="num4 num">{{ totalEducationPerson }}</div>
|
||||
<div class="label">{{ "培训总人数" }}</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -53,6 +53,7 @@
|
||||
|
||||
<script>
|
||||
import Card from "../components/Card.vue";
|
||||
import { getPersonTypeAndEduStatisticsApi } from '@/assets/js/api/laborPerson'
|
||||
|
||||
export default {
|
||||
components: { Card },
|
||||
@ -63,10 +64,34 @@ export default {
|
||||
},
|
||||
statisticsCount: {
|
||||
type: Object
|
||||
}
|
||||
},
|
||||
totalEducationPerson:0,//培训总人数
|
||||
totalPerson:0,//在场总人数
|
||||
},
|
||||
data() {
|
||||
return {}
|
||||
},
|
||||
created(){
|
||||
this.$nextTick(()=>{
|
||||
this.selectPersonTypeAndEduStatistics()
|
||||
|
||||
})
|
||||
},
|
||||
methods:{
|
||||
//查询人员类型和教育统计
|
||||
async selectPersonTypeAndEduStatistics() {
|
||||
await getPersonTypeAndEduStatisticsApi({
|
||||
projectSn: this.$store.state.projectSn
|
||||
}).then((res) => {
|
||||
if(res.result){
|
||||
this.totalEducationPerson = res.result.totalEducationPerson//总人数
|
||||
this.totalPerson =
|
||||
res.result.personType.presencePerson.totalPerson //在场 总人数
|
||||
}
|
||||
console.log('查询人员类型和教育统计,', res)
|
||||
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@ -25,11 +25,7 @@
|
||||
{{ date }}
|
||||
</div>
|
||||
<div class="days">
|
||||
<div
|
||||
class="day"
|
||||
v-for="day in getDays(date)"
|
||||
:key="day.num"
|
||||
>
|
||||
<div class="day" v-for="day in getDays(date)" :key="day.num">
|
||||
{{ day.num }}
|
||||
</div>
|
||||
</div>
|
||||
@ -38,70 +34,33 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="tbody">
|
||||
<div
|
||||
class="row-groups"
|
||||
:class="{ open: openedIndex === i }"
|
||||
v-for="(p, i) in projects"
|
||||
:key="p.pName"
|
||||
>
|
||||
<div class="row-groups" :class="{ open: openedIndex === i }" v-for="(p, i) in projects" :key="p.pName">
|
||||
<div class="row">
|
||||
<div class="td" @click="handleOpen(i)">{{ p.pName }}</div>
|
||||
<div class="td">{{ p.startTime }}</div>
|
||||
<div class="td">{{ p.endTime }}</div>
|
||||
<div
|
||||
class="td"
|
||||
v-for="date in dateList"
|
||||
:key="date + 'grid-date'"
|
||||
>
|
||||
<div class="td" v-for="date in dateList" :key="date + 'grid-date'">
|
||||
<div class="grids">
|
||||
<div
|
||||
class="grid"
|
||||
v-for="day in getDays(date)"
|
||||
:key="'grid' + day.num"
|
||||
:ref="p.pName + '-' + day.date"
|
||||
></div>
|
||||
<div class="grid" v-for="day in getDays(date)" :key="'grid' + day.num"
|
||||
:ref="p.pName + '-' + day.date"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="progress"
|
||||
:style="gantt"
|
||||
v-for="(gantt, index) in p.gantts"
|
||||
:key="index"
|
||||
@mouseenter="handleHover"
|
||||
@mouseleave="handleLeave"
|
||||
></div>
|
||||
<div class="progress" :style="gantt" v-for="(gantt, index) in p.gantts" :key="index"
|
||||
@mouseenter="handleHover" @mouseleave="handleLeave"></div>
|
||||
</div>
|
||||
<div class="children">
|
||||
<div
|
||||
class="row"
|
||||
v-for="child in p.children"
|
||||
:key="'child-' + child.pName"
|
||||
>
|
||||
<div class="row" v-for="child in p.children" :key="'child-' + child.pName">
|
||||
<div class="td">{{ child.pName }}</div>
|
||||
<div class="td">{{ child.startTime }}</div>
|
||||
<div class="td">{{ child.endTime }}</div>
|
||||
<div
|
||||
class="td"
|
||||
v-for="date in dateList"
|
||||
:key="date + 'grid-date'"
|
||||
>
|
||||
<div class="td" v-for="date in dateList" :key="date + 'grid-date'">
|
||||
<div class="grids">
|
||||
<div
|
||||
class="grid"
|
||||
v-for="day in getDays(date)"
|
||||
:key="'grid' + day.num"
|
||||
:ref="child.pName + '-' + day.date"
|
||||
></div>
|
||||
<div class="grid" v-for="day in getDays(date)" :key="'grid' + day.num"
|
||||
:ref="child.pName + '-' + day.date"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="progress"
|
||||
:style="gantt"
|
||||
v-for="(gantt, index) in child.gantts"
|
||||
:key="index"
|
||||
@mouseenter="handleHover"
|
||||
@mouseleave="handleLeave"
|
||||
></div>
|
||||
<div class="progress" :style="gantt" v-for="(gantt, index) in child.gantts" :key="index"
|
||||
@mouseenter="handleHover" @mouseleave="handleLeave"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -394,26 +353,31 @@ export default {
|
||||
justify-content: space-between;
|
||||
width: 100%;
|
||||
height: 60px;
|
||||
|
||||
.left-content {
|
||||
display: flex;
|
||||
width: 40%;
|
||||
height: 100%;
|
||||
|
||||
.item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
width: calc(100% / 4);
|
||||
|
||||
.color-block {
|
||||
margin-right: 10px;
|
||||
width: 15px;
|
||||
height: 15px;
|
||||
border-radius: 2px;
|
||||
}
|
||||
|
||||
.label {
|
||||
color: #fff;
|
||||
font-size: 13px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.right-content {
|
||||
font-size: 13px;
|
||||
line-height: 60px;
|
||||
@ -422,15 +386,18 @@ export default {
|
||||
|
||||
.gantt-chart {
|
||||
height: calc(100% - 60px);
|
||||
|
||||
.table {
|
||||
position: relative;
|
||||
height: 100%;
|
||||
overflow-x: auto;
|
||||
|
||||
&::-webkit-scrollbar {
|
||||
width: 10px;
|
||||
height: 8px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
&::-webkit-scrollbar-thumb {
|
||||
border-radius: 10px;
|
||||
background-color: skyblue;
|
||||
@ -438,46 +405,61 @@ export default {
|
||||
|
||||
.thead {
|
||||
border-bottom: 1px solid #234d5f;
|
||||
|
||||
.row {
|
||||
display: flex;
|
||||
|
||||
.td {
|
||||
flex-shrink: 0;
|
||||
box-sizing: border-box;
|
||||
height: 42px;
|
||||
line-height: 42px;
|
||||
background-color: #163549;
|
||||
|
||||
.date {
|
||||
line-height: 21px;
|
||||
border-left: 1px solid #234d5f;
|
||||
|
||||
.month {
|
||||
border-bottom: 1px solid #234d5f;
|
||||
}
|
||||
|
||||
.days {
|
||||
display: flex;
|
||||
|
||||
.day {
|
||||
flex: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&:nth-child(1) {
|
||||
padding-left: 40px;
|
||||
width: 200px;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
&:not(:nth-child(1)) {
|
||||
width: 100px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
&:nth-child(n + 4) {
|
||||
width: 400px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.tbody {
|
||||
border-left: 1px solid #234d5f;
|
||||
|
||||
.row-groups {
|
||||
position: relative;
|
||||
height: 42px;
|
||||
|
||||
&::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
@ -491,20 +473,25 @@ export default {
|
||||
border-left: 4px solid #5be1f4;
|
||||
z-index: 99;
|
||||
}
|
||||
|
||||
&.open {
|
||||
height: unset;
|
||||
|
||||
&::before {
|
||||
border-left-color: transparent;
|
||||
border-top-color: #5be1f4;
|
||||
}
|
||||
}
|
||||
> .row .td:first-child {
|
||||
|
||||
>.row .td:first-child {
|
||||
user-select: none;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.row {
|
||||
position: relative;
|
||||
display: flex;
|
||||
|
||||
.td {
|
||||
flex-shrink: 0;
|
||||
box-sizing: border-box;
|
||||
@ -513,31 +500,38 @@ export default {
|
||||
background-color: #0a1b2f;
|
||||
border-right: 1px solid #234d5f;
|
||||
border-bottom: 1px solid #234d5f;
|
||||
|
||||
.grids {
|
||||
height: 100%;
|
||||
display: flex;
|
||||
|
||||
.grid {
|
||||
position: relative;
|
||||
flex: 1;
|
||||
height: 100%;
|
||||
|
||||
&:not(:last-child) {
|
||||
border-right: 1px solid #234d5f;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&:nth-child(1) {
|
||||
padding-left: 40px;
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
&:not(:nth-child(1)) {
|
||||
width: 100px;
|
||||
font-size: 14px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
&:nth-child(n + 4) {
|
||||
width: 400px;
|
||||
}
|
||||
}
|
||||
|
||||
.progress {
|
||||
flex-shrink: 0;
|
||||
position: absolute;
|
||||
@ -547,6 +541,7 @@ export default {
|
||||
background: #557dee;
|
||||
}
|
||||
}
|
||||
|
||||
.children {
|
||||
.td {
|
||||
height: 38px;
|
||||
@ -556,6 +551,7 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.tooltips {
|
||||
position: absolute;
|
||||
box-sizing: border-box;
|
||||
@ -566,6 +562,7 @@ export default {
|
||||
color: #fff;
|
||||
border-radius: 8px;
|
||||
background-color: #50a6b3;
|
||||
|
||||
.status {
|
||||
display: inline-block;
|
||||
margin-bottom: 6px;
|
||||
|
||||
@ -35,7 +35,7 @@ export default {
|
||||
startAngle: 90,
|
||||
radius: ['58%', '54%'],
|
||||
color: ['#0B1B35', '#244D8F'],
|
||||
data: [30, 40, 30, 40],
|
||||
data: [],
|
||||
hoverAnimation:false,
|
||||
},
|
||||
{
|
||||
@ -54,9 +54,10 @@ export default {
|
||||
//获取数据
|
||||
getData() {
|
||||
let data = {
|
||||
projectSn: this.projectSn
|
||||
projectSn: this.$store.state.projectSn
|
||||
}
|
||||
selectQualityStatisticsApi(data).then(res => {
|
||||
console.log('问题占比数据',res);
|
||||
const data = res.result || {}
|
||||
this.total = data.total
|
||||
this.series[1].data = [
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user