This commit is contained in:
熊成强 2020-10-29 11:56:48 +08:00
parent 77670ad094
commit c69c2f0731
8 changed files with 136 additions and 87 deletions

View File

@ -53,3 +53,12 @@ export function apiResultGetDetail (query) {
params: query params: query
}) })
} }
// 保存绩效详情-
export function apiSaveDetail (query) {
return request({
url: '/lz_management/user/lzresultrecord/saveDetail',
method: 'post',
data: query
})
}

View File

@ -3,7 +3,7 @@
<div class="team-filter commonFont"> <div class="team-filter commonFont">
<el-dialog <el-dialog
title="考评组筛选" title="考评组筛选"
:visible.sync="dialogVisible" :visible="true"
:before-close="handleCancel" :before-close="handleCancel"
width="920" width="920"
> >
@ -16,6 +16,7 @@
prefix-icon="el-icon-search" prefix-icon="el-icon-search"
v-model="searchName" v-model="searchName"
@change="handleSearchChange" @change="handleSearchChange"
clearable
placeholder="搜索考评组" placeholder="搜索考评组"
size="small" size="small"
></el-input> ></el-input>
@ -24,7 +25,6 @@
ref="refChooseTable" ref="refChooseTable"
max-height="394" max-height="394"
@selection-change="handleSelectionChange" @selection-change="handleSelectionChange"
v-if="tableList.length"
> >
<el-table-column <el-table-column
type="selection" type="selection"
@ -113,6 +113,10 @@ export default {
type: Boolean, type: Boolean,
default: false default: false
}, },
value: {
type: String,
deafult: () => ''
},
filtersDic: { filtersDic: {
type: Object, type: Object,
default: () => { default: () => {
@ -124,24 +128,11 @@ export default {
data () { data () {
return { return {
searchName: '', searchName: '',
tableList: [{ tableList: [],
copyId: 0,
counts: 53,
depIds: '154322459',
gmtCreate: '2020-10-26 11:22:01',
gmtModified: '2020-10-27 14:30:47',
id: 57,
isDelete: 0,
managerIds: '380',
name: '1231',
outIds: '322,379,380,387,388,389,391,410,825',
score: 0,
staffIds: ''
}],
seleactedList: [], seleactedList: [],
pageInfo: { pageInfo: {
currPage: 1, currPage: 1,
pageSize: 20, pageSize: 500,
totalCount: 1, totalCount: 1,
totalPage: 1 totalPage: 1
} }
@ -150,36 +141,41 @@ export default {
created () { created () {
}, },
mounted () { mounted () {
this.$nextTick(() => {
this.handleDataList()
})
}, },
watch: { watch: {
dialogVisible (newVal, oldVal) { // dialogVisible (newVal, oldVal) {
if (newVal) { // if (newVal) {
if (this.filtersDic.currPage === undefined || !this.filtersDic.currPage) { // if (this.filtersDic.currPage === undefined || !this.filtersDic.currPage) {
this.filtersDic['currPage'] = this.pageInfo.currPage // this.filtersDic['currPage'] = this.pageInfo.currPage
} // }
if (this.filtersDic.pageSize === undefined || !this.filtersDic.pageSize) { // if (this.filtersDic.pageSize === undefined || !this.filtersDic.pageSize) {
this.filtersDic['pageSize'] = this.pageInfo.pageSize // this.filtersDic['pageSize'] = this.pageInfo.pageSize
} // }
this.handleDataList() // this.handleDataList()
} // }
} // }
}, },
methods: { methods: {
handleDataList () { handleDataList () {
apiGetEvaluationTeamList(this.filtersDic).then(res => { apiGetEvaluationTeamList(Object.assign({}, this.pageInfo, this.filtersDic)).then(res => {
this.pageInfo.currPage = res.data.currPage this.pageInfo.currPage = res.data.currPage
this.pageInfo.totalCount = res.data.totalCount this.pageInfo.totalCount = res.data.totalCount
this.pageInfo.totalPage = res.data.totalPage this.pageInfo.totalPage = res.data.totalPage
this.tableList = res.data.list this.tableList = res.data.list
this.$nextTick(() => {
this.tableList.map(i => {
if (this.value.includes(String(i.id))) {
this.$refs.refChooseTable.toggleRowSelection(i, true)
}
})
})
// this.$ref.refChooseTable.toggleRowSelection()
}) })
// for (let index = 0; index < 100; index++) {
// let dic = { id: index.toString(), name: '12' + index.toString(), count: '12' }
// this.tableList.push(dic)
// }
}, },
// handleGetRowStyle () {
// return { 'height': '44px' }
// },
handleSearchChange () { handleSearchChange () {
// //
this.filtersDic['name'] = this.searchName this.filtersDic['name'] = this.searchName
@ -193,7 +189,16 @@ export default {
this.$emit('close') this.$emit('close')
}, },
handleSubmit () { handleSubmit () {
this.$emit('submitClick', this.seleactedList) const obj = {
value: '',
title: ''
}
this.seleactedList.sort((a, b) => a.id - b.id).map(i => {
obj.value += i.id + ','
})
obj.value = obj.value.substring(obj.value.length - 1, 0)
obj.title = this.seleactedList.length > 0 ? (this.seleactedList[0].name + '等' + this.seleactedList.length + '个考评组') : ''
this.$emit('submitClick', obj)
}, },
handleSelectionChange (val) { handleSelectionChange (val) {
this.seleactedList = val this.seleactedList = val
@ -229,6 +234,7 @@ export default {
&-content { &-content {
width: 100%; width: 100%;
height: 425px; height: 425px;
padding: 20px 0;
border-bottom: 1 solid @borderColor; border-bottom: 1 solid @borderColor;
&-left { &-left {
height: 100%; height: 100%;

View File

@ -53,6 +53,9 @@ export default {
color: #aaaaaa; color: #aaaaaa;
cursor: pointer; cursor: pointer;
} }
&-back:hover{
color: @fontBlue;
}
&-title{ &-title{
padding: 0 10px; padding: 0 10px;
position: relative; position: relative;

View File

@ -9,7 +9,7 @@
departmentName:obj.departmentName departmentName:obj.departmentName
}"/> }"/>
<div> <div>
<el-button size='small' plain>暂存</el-button> <el-button size='small' @click="handleSaveDetail()" plain>暂存</el-button>
<el-button size='small' type="primary" >提交</el-button> <el-button size='small' type="primary" >提交</el-button>
</div> </div>
</div> </div>
@ -107,7 +107,7 @@ import InfoHeader from '@/components/InfoHeader'
import PopupRight from '@/components/PopupRight' import PopupRight from '@/components/PopupRight'
import draggable from 'vuedraggable' import draggable from 'vuedraggable'
import {getDimensions} from '@/api/data' import {getDimensions} from '@/api/data'
import { apiResultGetDetail } from '@/api/assessment' import { apiResultGetDetail, apiSaveDetail } from '@/api/assessment'
export default { export default {
data () { data () {
return { return {
@ -160,6 +160,15 @@ export default {
this.handleGetTbale() this.handleGetTbale()
}, },
methods: { methods: {
async handleSaveDetail (params = this.obj) {
let res = await apiSaveDetail(params)
if (res.code !== 200) {
this.$message.error = res.msg
return
}
this.handleGetTbale()
console.log('res: ', res)
},
// //
async handleGetDimensions () { async handleGetDimensions () {
try { try {
@ -220,7 +229,7 @@ export default {
handleFilter (item) { handleFilter (item) {
return item ? item.filter(i => !i.isDelete) : [] return item ? item.filter(i => !i.isDelete) : []
}, },
async handleGetTbale (id = 226) { async handleGetTbale (id = this.$route.query.id) {
let res = await apiResultGetDetail({id}) let res = await apiResultGetDetail({id})
if (res.code !== 200) return if (res.code !== 200) return
this.obj = res.data this.obj = res.data

View File

@ -0,0 +1,41 @@
<!-- -->
<template>
<div>
<el-button
size="mini"
@click="handleZhiding"
type="primary"
>制定目标</el-button>
</div>
</template>
<script>
export default {
data () {
return {
}
},
computed: {},
beforeMount () {},
mounted () {},
methods: {
//
handleZhiding () {
this.$router.push({
name: 'assessment-goals',
query: {
id: 267 || this.$route.query.id
}
})
}
},
watch: {}
}
</script>
<style lang='' scoped>
</style>

View File

@ -25,11 +25,7 @@
departmentName:obj.departmentName departmentName:obj.departmentName
}" /> }" />
<div class="performance-content-title-right"> <div class="performance-content-title-right">
<el-button <UseButton />
size="mini"
@click="handleZhiding"
type="primary"
>制定目标</el-button>
</div> </div>
</div> </div>
<div class="performance-content-center"> <div class="performance-content-center">
@ -92,7 +88,7 @@
:obj='obj' :obj='obj'
/> />
</div> </div>
<div class="performance-content-jilu"> <div v-if="!formList.resultCommentList" class="performance-content-jilu">
<div class="performance-content-jilu-title commonFont"> <div class="performance-content-jilu-title commonFont">
记录 记录
</div> </div>
@ -136,9 +132,6 @@
> >
{{i}} {{i}}
</div> </div>
<!-- <div v-for="i in rightList" :key="i.id" class="chooseManage-item" >
<el-checkbox :true-label='1' :false-label='0' :disabled='i.isDisable===1' :checked='i.isDisable===1' v-model='i.isSelect'></el-checkbox><span class='commonFont' style="margin:0 0 0 10px;">{{i.staffName}} </span>
</div> -->
</div> </div>
</popup-right> </popup-right>
</div> </div>
@ -148,6 +141,8 @@
import SmallNav from '@/components/kpi-layout/SmallNav' import SmallNav from '@/components/kpi-layout/SmallNav'
import InfoHeader from '@/components/InfoHeader' import InfoHeader from '@/components/InfoHeader'
import PopupRight from '@/components/PopupRight' import PopupRight from '@/components/PopupRight'
import UseButton from './components/UseButton'
import { apiResultRecordDetail, apiResultGetDetail } from '@/api/assessment' import { apiResultRecordDetail, apiResultGetDetail } from '@/api/assessment'
import tables from './components/table' import tables from './components/table'
@ -187,7 +182,8 @@ export default {
SmallNav, SmallNav,
InfoHeader, InfoHeader,
PopupRight, PopupRight,
tables tables,
UseButton
}, },
computed: {}, computed: {},
beforeMount () { }, beforeMount () { },
@ -196,16 +192,7 @@ export default {
this.handleGetTbale() this.handleGetTbale()
}, },
methods: { methods: {
// async handleGetTbale (id = 267) {
handleZhiding () {
this.$router.push({
name: 'assessment-goals',
query: {
id: this.$route.query.id
}
})
},
async handleGetTbale (id = 226) {
let res = await apiResultGetDetail({ id }) let res = await apiResultGetDetail({ id })
this.obj = res.data this.obj = res.data
console.log('res: ', res) console.log('res: ', res)
@ -223,7 +210,7 @@ export default {
}, },
async handleList () { async handleList () {
// resultRecordId = == this.$route.query.id // resultRecordId = == this.$route.query.id
let res = await apiResultRecordDetail({ resultRecordId: 215 }) let res = await apiResultRecordDetail({ resultRecordId: 267 })
if (res.code !== 200) return if (res.code !== 200) return
for (let i in res.data.flowRecordList) { for (let i in res.data.flowRecordList) {
if (res.data.flowRecordList[i].status !== 1) { if (res.data.flowRecordList[i].status !== 1) {

View File

@ -16,7 +16,7 @@
<div class="step-content-top"> <div class="step-content-top">
<div class="step-content-top-left"> <div class="step-content-top-left">
<el-button size="small" @click="handleChoose" plain>{{formTitle}}<i style="margin-left:10px;" class="el-icon-arrow-down"></i></el-button> <el-button size="small" @click="handleChoose" plain>{{formTitle}}<i style="margin-left:10px;" class="el-icon-arrow-down"></i></el-button>
<el-button size="small" @click="handleKaoping" plain>选择考评组<i style="margin-left:10px;" class="el-icon-arrow-down"></i></el-button> <el-button size="small" @click="handleKaoping" plain>{{params.evaluationIds?params.title:'选择考评组'}}<i style="margin-left:10px;" class="el-icon-arrow-down"></i></el-button>
<el-input clearable @change="handleChangeInput" @keyup.enter="handleChangeInput" size="small" style="margin-left:10px;" v-model="params.name" prefix-icon="el-icon-search" placeholder="请输入姓名搜索"></el-input> <el-input clearable @change="handleChangeInput" @keyup.enter="handleChangeInput" size="small" style="margin-left:10px;" v-model="params.name" prefix-icon="el-icon-search" placeholder="请输入姓名搜索"></el-input>
</div> </div>
<div class="step-content-top-right"> <div class="step-content-top-right">
@ -98,13 +98,7 @@
</div> </div>
</div> </div>
</div> </div>
<popup-right v-if="kaopingFrom.showRight" @cancel='handleCancel' @submit="handleSubmit" title="考评组筛选"> <EvaluationTeamFilter v-if="dialogVisible" :value='params.evaluationIds' :filtersDic="{startId: this.params.startId }" :dialogVisible.sync='dialogVisible' @submitClick='submitClick' @close='dialogVisible = false'/>
<div slot="content" class="chooseManage">
<div v-for="i in rightList" :key="i.id" class="chooseManage-item" >
<el-checkbox :true-label='1' :false-label='0' :disabled='i.isDisable===1' :checked='i.isDisable===1' v-model='i.isSelect'></el-checkbox><span class='commonFont' style="margin:0 0 0 10px;">{{i.staffName}} </span>
</div>
</div>
</popup-right>
<getPersonnel v-if="form.isShowPersonnel" :value.sync='params.staffIds' :isShow.sync='form.isShowPersonnel' :showDataList.sync='form.personnelList'/> <getPersonnel v-if="form.isShowPersonnel" :value.sync='params.staffIds' :isShow.sync='form.isShowPersonnel' :showDataList.sync='form.personnelList'/>
</div> </div>
</template> </template>
@ -113,6 +107,8 @@
import SmallNav from '@/components/kpi-layout/SmallNav' import SmallNav from '@/components/kpi-layout/SmallNav'
import getPersonnel from '@/components/getPersonnel' import getPersonnel from '@/components/getPersonnel'
import PopupRight from '@/components/PopupRight' import PopupRight from '@/components/PopupRight'
import EvaluationTeamFilter from '@/components/EvaluationTeamFilter'
import { apiManagerDetail, apiChartList } from '@/api/assessment' import { apiManagerDetail, apiChartList } from '@/api/assessment'
import {getWorkList} from '@/api/workbench' import {getWorkList} from '@/api/workbench'
import { getStartsData } from '@/api/report' import { getStartsData } from '@/api/report'
@ -120,9 +116,7 @@ let id = 0
export default { export default {
data () { data () {
return { return {
kaopingFrom: { dialogVisible: false,
showRight: false
},
form: { form: {
isShowPersonnel: false, isShowPersonnel: false,
personnelList: { personnelList: {
@ -135,8 +129,8 @@ export default {
'evaluationIds': '', 'evaluationIds': '',
'flowProcess': null, 'flowProcess': null,
'pageSize': 5, 'pageSize': 5,
// 'staffIds': '', 'staffIds': '',
// 'staffName': '', 'staffName': '',
'startId': 10 'startId': 10
}, },
key: 0, key: 0,
@ -163,7 +157,8 @@ export default {
components: { components: {
SmallNav, SmallNav,
getPersonnel, getPersonnel,
PopupRight PopupRight,
EvaluationTeamFilter
}, },
computed: { computed: {
formTitle () { formTitle () {
@ -176,18 +171,16 @@ export default {
await this.handleStartsReq() await this.handleStartsReq()
}, },
methods: { methods: {
submitClick (item) {
this.params.evaluationIds = item.value
this.params.title = item.title
this.params.currPage = 1
this.handleGetListContent()
this.dialogVisible = false
},
// //
async handleKaoping () { async handleKaoping () {
let res = await getWorkList(Object.assign({}, {startId: this.params.startId}, { this.dialogVisible = true
'currPage': 1,
'pageSize': 999
}))
if (res.code !== 200) {
this.rightList = []
return
}
this.rightList = res.data.list
this.kaopingFrom.showRight = true
}, },
handleLook (id) { handleLook (id) {
// this.handleKaoping() // this.handleKaoping()
@ -206,6 +199,7 @@ export default {
this.handleGetListContent() this.handleGetListContent()
}, },
async handleGetListContent (params = this.params) { async handleGetListContent (params = this.params) {
console.log('params: ', params)
let res = await apiManagerDetail(params) let res = await apiManagerDetail(params)
if (res.code !== 200) return if (res.code !== 200) return
this.tableData = res.data.list this.tableData = res.data.list

View File

@ -149,7 +149,7 @@ export default {
this.handleGetList() this.handleGetList()
}, },
handleRowClick (row) { handleRowClick (row) {
this.$router.push({ name: 'assessment-stepList', query: { id: row.recordId } }) this.$router.push({ name: 'assessment-performance', query: { id: row.recordId } })
} }
}, },
watch: {} watch: {}