Commit cb41e392 authored by 旭艳's avatar 旭艳

执行派工页面和接口联调

parent 75cc6a28
<template>
<div class="instructions-issued">
<div class="instructions-disptach">
<div class="instructions-issued-top">
<el-form :inline="true" :model="searchFormData" class="instructions-issued-search" label-width="50px">
<el-col :span="12">
<el-form-item label="班组:">
<el-select v-model="searchFormData.group" placeholder="班组" @change="changePostion">
<el-select v-model="searchFormData.group" placeholder="班组" @change="changeGroup">
<el-option
v-for="(item, i) in groupList"
:key="item.value + i"
......@@ -53,20 +53,20 @@
执行派工
</div>
<div class="group-list">
<div v-for="(item, index) in groupUserList" :key="index" class="group-list-box" :class="{'active': group===item.id}" @click="changeGroup(item)">
<div v-for="(item, index) in groupUserList" :key="index" class="group-list-box" :class="{'active': group===item.id}" @click="changeGroupUser(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 class="right-text"><span>专业:</span><span>{{ item.extProcessSkill.resName }}</span></div>
<div class="right-text"><span>上岗有效期:</span><span>{{ item.postValidity }}</span></div>
<!-- <el-tooltip placement="top">
<div slot="content">
<span v-for="user in item.extProcessSkillUsers" :key="user.id">
{{ user.dxUserInfo.name }}
{{ user.dxUserInfo.name }
</span>
</div>
<div class="right-text overfllowhind">
......@@ -75,7 +75,7 @@
{{ user.dxUserInfo.name }}
</span>
</div>
</el-tooltip>
</el-tooltip> -->
</div>
</div>
</div>
......@@ -180,7 +180,7 @@ export default {
layConfigAlready() {
return {
typeName: 'JoExecutePlan',
layKey: 'instructionsIssuedListAlready'
layKey: 'instructionsIssuedDispatchAlready'
}
}
},
......@@ -243,23 +243,17 @@ export default {
})
this.$set(this.searchFormData, 'group', this.groupList[0].value)
this.$set(this.searchFormData, 'groupName', this.groupList[0].label)
this.getInstructionsDispatchList()
this.getGroupUser()
}
})
},
changePostion() {
const postion = this.postionList.find(r => r.value === this.searchFormData.postion)
this.$set(this.searchFormData, 'postionName', postion && postion.label || '')
this.$set(this.searchFormData, 'postionId', postion && postion.id || '')
this.getSortiesList()
this.getGroupList()
},
changeSorties() {
const sorties = this.sortiesData.find(r => r.value === this.searchFormData.sorties)
this.$set(this.searchFormData, 'sortiesName', sorties && sorties.label || '')
this.$set(this.searchFormData, 'workId', sorties && sorties.postionId || '')
this.status = sorties.status
this.getTableData()
changeGroup() {
const group = this.groupList.find(r => r.value === this.searchFormData.group)
this.$set(this.searchFormData, 'groupName', group && group.label || '')
this.$set(this.searchFormData, 'group', group && group.value || '')
this.getInstructionsDispatchList()
this.getGroupUser()
},
tabClick(tab) {
this.activeName = tab.index
......@@ -276,10 +270,10 @@ export default {
this.$refs.detailComAlready.$children[0].getData()
}
} else {
this.getInstructionsIssuedListTo()
this.getInstructionsDispatchList()
}
},
getInstructionsIssuedListTo() {
getInstructionsDispatchList() {
const params = {
'pageFrom': this.pagination.currentPage,
'pageSize': this.pagination.pageSize,
......@@ -288,19 +282,23 @@ export default {
{
'items': [
{
'fieldName': 'extProcessPlan.sorties',
'fieldName': 'extProcessSkillId',
'operator': 'EQ',
'value': this.searchFormData.sortiesName
'value': this.searchFormData.group
},
{
'fieldName': 'extProcessPlan.positionNumber',
'fieldName': 'planState',
'operator': 'EQ',
'value': this.searchFormData.postionName
'value': 'Issued'
},
{
'fieldName': 'planState',
'operator': 'EQ',
'value': 'Yes'
'fieldName': 'extProcessPlan.id',
'operator': 'NOTNULL'
},
{
'fieldName': 'dmirStatus',
'operator': 'NEQ',
'value': 'Y'
}
],
'operator': 'AND'
......@@ -311,12 +309,7 @@ export default {
},
'openProps': [
{
'name': 'extProcessPlan',
'openProps': [
{
'name': 'extSupportings'
}
]
'name': 'extProcessPlan'
}
],
'sortItem': [
......@@ -326,10 +319,9 @@ export default {
}
]
}
post('/JoExecutePlan/getProductionPrepare', params).then(res => {
post('/JoExecutePlan/search', params).then(res => {
if (res.items && res.items.content) {
this.tableData = res.items.content
// this.$set(this, 'group', res.items[0] && res.items[0].id || '')
}
})
},
......@@ -349,7 +341,7 @@ export default {
})
this.selectionRow = val
},
changeGroup(val) {
changeGroupUser(val) {
this.$set(this, 'group', val.id || '')
this.$set(this, 'groupType', val.subTypeName || '')
if (this.selectionRow.length > 0) {
......@@ -404,7 +396,7 @@ export default {
}
</script>
<style lang="scss">
.instructions-issued{
.instructions-disptach{
background: #ffff;
height: 100%;
.group-list{
......@@ -413,10 +405,10 @@ export default {
margin-bottom: 20px;
.group-list-box{
box-sizing: border-box;
background: url("/images/tasks.png") no-repeat;
background: url("/images/dispatching.png") no-repeat;
background-size: 100% 100%;
padding: 10px;
margin: 10px 20px;
margin: 10px 10px;
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;
......@@ -443,9 +435,9 @@ export default {
}
}
.active{
color: #cf9236;
color: rgb(64,87,141);
font-weight: 700;
border: 3px solid #cf9236;
border: 3px solid rgb(64,87,141);
}
}
.instructions-issued-top{
......
......@@ -304,7 +304,7 @@ export default {
getStation() {
this.postionList = []
this.$set(this.searchFormData, 'postion', '')
// const userId = localStorage.getItem('userId') || ''
const userId = localStorage.getItem('userId') || ''
const params = {
'searchItems': {
'children': [
......@@ -313,7 +313,7 @@ export default {
{
'fieldName': 'targetId',
'operator': 'EQ',
'value': 1626782149352
'value': userId
}
],
'operator': 'AND'
......
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