优化
This commit is contained in:
parent
938b453361
commit
cd11dfe56b
@ -88,3 +88,12 @@ export function apiAssessManagerChange (query) {
|
|||||||
data: query
|
data: query
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 开始评分
|
||||||
|
export function apiAssessManagerToScore (query) {
|
||||||
|
return request({
|
||||||
|
url: '/lz_management/performance/assess/manager/toScore',
|
||||||
|
method: 'post',
|
||||||
|
data: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|||||||
@ -1,7 +1,6 @@
|
|||||||
<!-- -->
|
<!-- -->
|
||||||
<template>
|
<template>
|
||||||
<popup-right
|
<popup-right
|
||||||
v-if="showChooseList"
|
|
||||||
@cancel="hundlePopupHide"
|
@cancel="hundlePopupHide"
|
||||||
@submit="handleSubmitPopup"
|
@submit="handleSubmitPopup"
|
||||||
:title="popupRightTitle"
|
:title="popupRightTitle"
|
||||||
@ -30,13 +29,14 @@
|
|||||||
>
|
>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
type="selection"
|
type="selection"
|
||||||
|
:selectable="checkSelectable"
|
||||||
width="40"
|
width="40"
|
||||||
:reserve-selection="true"
|
:reserve-selection="true"
|
||||||
></el-table-column>
|
></el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="全选"
|
label="全选"
|
||||||
width="250"
|
width="250"
|
||||||
><template slot-scope="scope">{{scope.row.name}}</template></el-table-column>
|
><template slot-scope="scope"><span>{{scope.row.name}}</span><el-tag style="margin:0 0 0 10px;" v-if="scope.row.score ===0">已开始评分</el-tag></template></el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
width="80"
|
width="80"
|
||||||
align="right"
|
align="right"
|
||||||
@ -80,6 +80,10 @@ import PopupRight from '@/components/PopupRight'
|
|||||||
import { getWorkList } from '@/api/workbench'
|
import { getWorkList } from '@/api/workbench'
|
||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
|
nOSec: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
subumitText: {
|
subumitText: {
|
||||||
type: String,
|
type: String,
|
||||||
default: '确 定'
|
default: '确 定'
|
||||||
@ -131,6 +135,9 @@ export default {
|
|||||||
console.log('showChooseList: ', this.showChooseList)
|
console.log('showChooseList: ', this.showChooseList)
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
checkSelectable (row, index) {
|
||||||
|
return !this.nOSec && row.score === 1
|
||||||
|
},
|
||||||
handlePopupCreat () {
|
handlePopupCreat () {
|
||||||
this.$emit('update:showChooseList', false)
|
this.$emit('update:showChooseList', false)
|
||||||
// 新建考评组
|
// 新建考评组
|
||||||
@ -196,7 +203,6 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
console.log('showChooseList', newVal, oldVal)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -126,7 +126,12 @@ export default {
|
|||||||
handleSubmitPopup () {
|
handleSubmitPopup () {
|
||||||
this.$emit('cb', {})
|
this.$emit('cb', {})
|
||||||
},
|
},
|
||||||
handleAdd () { },
|
handleAdd () {
|
||||||
|
this.$router.push({
|
||||||
|
name: 'assessment-addPerson',
|
||||||
|
query: this.$route.query
|
||||||
|
})
|
||||||
|
},
|
||||||
handleDelete () {
|
handleDelete () {
|
||||||
this.$emit('remove')
|
this.$emit('remove')
|
||||||
}
|
}
|
||||||
|
|||||||
@ -88,6 +88,14 @@ export default [
|
|||||||
title: '考核管理',
|
title: '考核管理',
|
||||||
isNav: true
|
isNav: true
|
||||||
}
|
}
|
||||||
|
}, {
|
||||||
|
path: 'addPerson',
|
||||||
|
name: 'assessment-addPerson',
|
||||||
|
component: (resolve) => require(['@/views/kpi/assessment/stepList/addPerson.vue'], resolve),
|
||||||
|
meta: {
|
||||||
|
title: '添加人员',
|
||||||
|
isNav: true
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'performance',
|
path: 'performance',
|
||||||
|
|||||||
99
src/views/kpi/assessment/stepList/addPerson.vue
Normal file
99
src/views/kpi/assessment/stepList/addPerson.vue
Normal file
@ -0,0 +1,99 @@
|
|||||||
|
<!-- -->
|
||||||
|
<template>
|
||||||
|
<div class="addPerson">
|
||||||
|
<small-nav />
|
||||||
|
<div class="addPerson-content">
|
||||||
|
<el-form ref="form" :model="form" label-width="160px">
|
||||||
|
<el-form-item label="考评员工:">
|
||||||
|
<div v-if="list.list.length>0">
|
||||||
|
<el-input
|
||||||
|
@focus="handleChoose"
|
||||||
|
style="width:300px;cursor: pointer;"
|
||||||
|
size="small"
|
||||||
|
:value ="list.title + '等' + list.list.length + '个人'"
|
||||||
|
readonly>
|
||||||
|
<i slot="suffix" class="el-input__icon el-icon-edit"></i>
|
||||||
|
</el-input>
|
||||||
|
<i @click="list.list=[]" style="margin-left:10px;cursor: pointer;" class="el-icon-delete"></i>
|
||||||
|
</div>
|
||||||
|
<el-button size="small" icon="el-icon-plus" plain @click="handleChoose">选人员</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button size="small" type="primary" @click="handleOnSubmit">确定</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</div>
|
||||||
|
<getPersonnel v-if="isSshow" :value.sync='form.staffIds' :isShow.sync='isSshow' :showDataList.sync='list'/>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import getPersonnel from '@/components/getPersonnel'
|
||||||
|
import SmallNav from '@/components/kpi-layout/SmallNav'
|
||||||
|
import { apiAssessManagerChange} from '@/api/assessment'
|
||||||
|
export default {
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
isSshow: false,
|
||||||
|
list: {
|
||||||
|
list: []
|
||||||
|
},
|
||||||
|
form: {}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
components: {
|
||||||
|
SmallNav,
|
||||||
|
getPersonnel
|
||||||
|
},
|
||||||
|
computed: {},
|
||||||
|
beforeMount () {},
|
||||||
|
mounted () {},
|
||||||
|
methods: {
|
||||||
|
handleChoose () {
|
||||||
|
this.isSshow = true
|
||||||
|
},
|
||||||
|
async handleOnSubmit () {
|
||||||
|
const parmas = {
|
||||||
|
startId: this.$route.query.id,
|
||||||
|
staffIds: this.form.staffIds,
|
||||||
|
confirm: 0,
|
||||||
|
changeType: 0
|
||||||
|
}
|
||||||
|
let res = await apiAssessManagerChange(parmas)
|
||||||
|
if (res.code === 503) {
|
||||||
|
this.$confirm(res.msg, '提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
}).then(async () => {
|
||||||
|
parmas.confirm = 1
|
||||||
|
let res1 = await apiAssessManagerChange(parmas)
|
||||||
|
if (res1.code !== 200) return this.$message.error(res1.msg)
|
||||||
|
history.go(-1)
|
||||||
|
}).catch(() => {
|
||||||
|
})
|
||||||
|
} else if (res.code !== 200) {
|
||||||
|
return this.$message.error(res.msg)
|
||||||
|
} else {
|
||||||
|
history.go(-1)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch: {}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang='less' scoped>
|
||||||
|
.addPerson{
|
||||||
|
&-content{
|
||||||
|
margin: 30px 0 10px 0;
|
||||||
|
padding: 28px;
|
||||||
|
min-height: 400px;
|
||||||
|
background: #fff;
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@ -153,6 +153,8 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<ChooseInitiate
|
<ChooseInitiate
|
||||||
|
:nOSec='true'
|
||||||
|
v-if="showChooseList"
|
||||||
@cb='handleCallBackChoose'
|
@cb='handleCallBackChoose'
|
||||||
subumitText='开始评分'
|
subumitText='开始评分'
|
||||||
popupRightTitle='请选择开始评分的考评组'
|
popupRightTitle='请选择开始评分的考评组'
|
||||||
@ -197,7 +199,7 @@ import EvaluationTeamFilter from '@/components/EvaluationTeamFilter'
|
|||||||
import ChooseInitiate from '@/components/ChooseInitiate'
|
import ChooseInitiate from '@/components/ChooseInitiate'
|
||||||
import popupRemovePerson from '@/components/popupPerson'
|
import popupRemovePerson from '@/components/popupPerson'
|
||||||
|
|
||||||
import { apiManagerDetail, apiChartList } from '@/api/assessment'
|
import { apiManagerDetail, apiChartList, apiAssessManagerToScore } from '@/api/assessment'
|
||||||
import { getStartsData } from '@/api/report'
|
import { getStartsData } from '@/api/report'
|
||||||
let id = 0
|
let id = 0
|
||||||
export default {
|
export default {
|
||||||
@ -267,8 +269,14 @@ export default {
|
|||||||
await this.handleStartsReq()
|
await this.handleStartsReq()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handleCallBackChoose (item) {
|
async handleCallBackChoose (item) {
|
||||||
console.log('item: ', item)
|
if (!item.value) return this.$message.info('请选择考评组!')
|
||||||
|
const params = {
|
||||||
|
evaluationIds: item.value,
|
||||||
|
startId: this.$route.query.id
|
||||||
|
}
|
||||||
|
let res = await apiAssessManagerToScore(params)
|
||||||
|
if (res.code !== 200) return this.$message.error(res.msg)
|
||||||
},
|
},
|
||||||
submitClick (item) {
|
submitClick (item) {
|
||||||
this.params.evaluationIds = item.value
|
this.params.evaluationIds = item.value
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user