Commit 2ff36e8b authored by “lixuyan”'s avatar “lixuyan”

指令下发页面重新开发

parent 841daf1d
<template>
<div class="missing-parts">
<div class="sub-title" style="margin:0 10px">
下发班组
</div>
<div class="group-list">
<div v-for="(item, index) in groupDropList" :key="index" class="group-list-box" :class="{'active': group===item.id}" @click="changeGroup(item)">
<div class="left">
<div class="left-text"> {{ item.resName }}</div>
</div>
<div class="right">
<div class="right-text"><span>操作工人数:</span><span>{{ item.userCount }}</span></div>
<div class="right-text"><span>未完成任务:</span><span>{{ item.notFinishCount }}</span></div>
<div class="right-text"><span>未完成工时:</span><span>{{ item.notFinishWork }}(h)</span></div>
<div class="right-text"><span>当月完成任务:</span><span>{{ item.finishCount }}</span></div>
<div class="right-text"><span>当月完成工时:</span><span>{{ item.finishWork }}(h)</span></div>
<el-tooltip placement="top">
<div v-if="item.extProcessSkillUsers" slot="content">
<span v-for="user in item.extProcessSkillUsers" :key="user.id">
{{ user.dxUserInfo.name }}
</span>
</div>
<div v-if="item.extProcessSkillUsers" class="right-text overfllowhind">
<span>班组长:</span>
<span v-for="user in item.extProcessSkillUsers" :key="user.id">
{{ user.dxUserInfo.name }}
</span>
</div>
</el-tooltip>
</div>
</div>
<div class="more-bar">
<span v-if="groupDropList.length < groupTotal" class="more" @click="getMoreData">加载更多</span>
<span v-else-if="groupDropList.length===0">暂无数据</span>
<span v-else>已全部加载!</span>
</div>
</div>
</div>
</template>
<script>
import { post } from '@/utils/http'
export default {
name: 'MissingParts',
props: {
info: {
type: Object,
default: () => ({})
}
},
data() {
return {
groupDropList: [],
groupPage: 1,
groupTotal: 0,
detailInfo: null,
group: '',
groupType: ''
}
},
created() {
},
mounted() {
this.$bus.$on('getTeamList', (data) => {
this.group = ''
this.groupType = ''
this.groupDropList = []
this.groupPage = 1
this.groupTotal = 0
this.getGroupList()
})
this.$bus.$on('getMissData', (data) => {
this.group = ''
this.groupType = ''
this.detailInfo = data
this.groupDropList = []
this.groupPage = 1
this.groupTotal = 0
this.getGroupList()
})
this.$bus.$on('clearMissData', () => {
this.group = ''
this.groupType = ''
})
},
methods: {
handleCurrentChange(val) {
this.$emit('getInfo', val)
},
getGroupList() {
const params = {
'pageFrom': this.groupPage,
'pageSize': 10,
'searchItems': {
'children': [
{
'items': [
{
'fieldName': 'extStandPosition.extcode',
'operator': 'EQ',
'value': this.detailInfo.serialNumber
},
{
'fieldName': 'isValid',
'operator': 'EQ',
'value': 'Y'
},
{
'fieldName': 'skillType',
'operator': 'EQ',
'value': 'FitOut'
}
],
'operator': 'AND'
}
],
'items': [],
'operator': 'AND'
},
'openProps': [
{
'name': 'extProcessSkillUsers',
'searchItems': {
'children': [
{
'items': [
{
'fieldName': 'isSkillLeader',
'operator': 'EQ',
'value': true
}
],
'operator': 'AND'
}
]
}
}
],
'sortItem': [
{
'fieldName': 'modifyTime',
'sortOrder': 'desc'
}
],
'toValidateKeys': ''
}
post('/ExtProcessSkill/getSkillWorkDetail', params).then(res => {
if (res.items && res.items.content) {
this.groupDropList = this.groupDropList.concat(res.items.content)
this.groupTotal = res.items.totalElements
}
})
},
getMoreData() {
const num = Math.ceil(this.groupTotal / 10)
if (this.groupPage <= num) {
this.groupPage++
this.getGroupList()
}
},
changeGroup(val) {
this.$set(this, 'group', val.id || '')
this.$set(this, 'groupType', val.subTypeName || '')
this.$bus.$emit('addGroup', this.group, this.groupType)
// if (this.selectionRow.length > 0) {
// this.selectionRow.forEach(element => {
// element.skill = this.group
// element.skillType = this.groupType
// })
// }
}
}
}
</script>
<style lang="scss" scope>
.missing-parts{
.group-list{
height: calc(100vh - 100px);
overflow-y: scroll;
margin-bottom: 20px;
.more-bar {
margin: 10px auto;
text-align: center;
font-size: 12px;
color: #999;
.more {
margin: auto;
margin-top: 20px;
height: 26px;
line-height: 26px;
padding: 0 20px;
background: #cf9236;
border-radius: 13px;
display: inline-block;
cursor: pointer;
}
}
.group-list-box{
box-sizing: border-box;
background: url("/images/tasks.png") no-repeat;
background-size: 100% 100%;
padding: 10px;
margin: 10px 20px;
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
border-radius: 10px;
font-size: 14px;
border: 3px solid #fff;
.left{
text-align: center;
.left-text{
font-size: 16px;
font-weight: 500;
}
}
.right{
.right-text{
padding-top: 8px;
}
.overfllowhind{
max-width: 100%;
word-break:keep-all;
white-space:nowrap;
overflow:hidden;
text-overflow:ellipsis;
}
}
}
.active{
color: #cf9236;
font-weight: 700;
border: 3px solid #cf9236;
}
}
}
</style>
...@@ -59,6 +59,7 @@ ...@@ -59,6 +59,7 @@
ref="detailCom" ref="detailCom"
:key="layConfig.typeName" :key="layConfig.typeName"
:lay-config="layConfig" :lay-config="layConfig"
table-height="calc(100vh - 200px)"
@row-click="rowClick" @row-click="rowClick"
/> />
</div> </div>
...@@ -67,6 +68,7 @@ ...@@ -67,6 +68,7 @@
ref="detailCom2" ref="detailCom2"
:key="layConfig.typeName" :key="layConfig.typeName"
:lay-config="layConfig1" :lay-config="layConfig1"
table-height="calc(100vh - 200px)"
@row-click="rowClick" @row-click="rowClick"
/> />
</div> </div>
......
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