优化
This commit is contained in:
parent
77670ad094
commit
c69c2f0731
@ -53,3 +53,12 @@ export function apiResultGetDetail (query) {
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 保存绩效详情-
|
||||
export function apiSaveDetail (query) {
|
||||
return request({
|
||||
url: '/lz_management/user/lzresultrecord/saveDetail',
|
||||
method: 'post',
|
||||
data: query
|
||||
})
|
||||
}
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
<div class="team-filter commonFont">
|
||||
<el-dialog
|
||||
title="考评组筛选"
|
||||
:visible.sync="dialogVisible"
|
||||
:visible="true"
|
||||
:before-close="handleCancel"
|
||||
width="920"
|
||||
>
|
||||
@ -16,6 +16,7 @@
|
||||
prefix-icon="el-icon-search"
|
||||
v-model="searchName"
|
||||
@change="handleSearchChange"
|
||||
clearable
|
||||
placeholder="搜索考评组"
|
||||
size="small"
|
||||
></el-input>
|
||||
@ -24,7 +25,6 @@
|
||||
ref="refChooseTable"
|
||||
max-height="394"
|
||||
@selection-change="handleSelectionChange"
|
||||
v-if="tableList.length"
|
||||
>
|
||||
<el-table-column
|
||||
type="selection"
|
||||
@ -113,6 +113,10 @@ export default {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
value: {
|
||||
type: String,
|
||||
deafult: () => ''
|
||||
},
|
||||
filtersDic: {
|
||||
type: Object,
|
||||
default: () => {
|
||||
@ -124,24 +128,11 @@ export default {
|
||||
data () {
|
||||
return {
|
||||
searchName: '',
|
||||
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: ''
|
||||
}],
|
||||
tableList: [],
|
||||
seleactedList: [],
|
||||
pageInfo: {
|
||||
currPage: 1,
|
||||
pageSize: 20,
|
||||
pageSize: 500,
|
||||
totalCount: 1,
|
||||
totalPage: 1
|
||||
}
|
||||
@ -150,36 +141,41 @@ export default {
|
||||
created () {
|
||||
},
|
||||
mounted () {
|
||||
this.$nextTick(() => {
|
||||
this.handleDataList()
|
||||
})
|
||||
},
|
||||
watch: {
|
||||
dialogVisible (newVal, oldVal) {
|
||||
if (newVal) {
|
||||
if (this.filtersDic.currPage === undefined || !this.filtersDic.currPage) {
|
||||
this.filtersDic['currPage'] = this.pageInfo.currPage
|
||||
}
|
||||
if (this.filtersDic.pageSize === undefined || !this.filtersDic.pageSize) {
|
||||
this.filtersDic['pageSize'] = this.pageInfo.pageSize
|
||||
}
|
||||
this.handleDataList()
|
||||
}
|
||||
}
|
||||
// dialogVisible (newVal, oldVal) {
|
||||
// if (newVal) {
|
||||
// if (this.filtersDic.currPage === undefined || !this.filtersDic.currPage) {
|
||||
// this.filtersDic['currPage'] = this.pageInfo.currPage
|
||||
// }
|
||||
// if (this.filtersDic.pageSize === undefined || !this.filtersDic.pageSize) {
|
||||
// this.filtersDic['pageSize'] = this.pageInfo.pageSize
|
||||
// }
|
||||
// this.handleDataList()
|
||||
// }
|
||||
// }
|
||||
},
|
||||
methods: {
|
||||
handleDataList () {
|
||||
apiGetEvaluationTeamList(this.filtersDic).then(res => {
|
||||
apiGetEvaluationTeamList(Object.assign({}, this.pageInfo, this.filtersDic)).then(res => {
|
||||
this.pageInfo.currPage = res.data.currPage
|
||||
this.pageInfo.totalCount = res.data.totalCount
|
||||
this.pageInfo.totalPage = res.data.totalPage
|
||||
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 () {
|
||||
// 搜索
|
||||
this.filtersDic['name'] = this.searchName
|
||||
@ -193,7 +189,16 @@ export default {
|
||||
this.$emit('close')
|
||||
},
|
||||
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) {
|
||||
this.seleactedList = val
|
||||
@ -229,6 +234,7 @@ export default {
|
||||
&-content {
|
||||
width: 100%;
|
||||
height: 425px;
|
||||
padding: 20px 0;
|
||||
border-bottom: 1 solid @borderColor;
|
||||
&-left {
|
||||
height: 100%;
|
||||
|
||||
@ -53,6 +53,9 @@ export default {
|
||||
color: #aaaaaa;
|
||||
cursor: pointer;
|
||||
}
|
||||
&-back:hover{
|
||||
color: @fontBlue;
|
||||
}
|
||||
&-title{
|
||||
padding: 0 10px;
|
||||
position: relative;
|
||||
|
||||
@ -9,8 +9,8 @@
|
||||
departmentName:obj.departmentName
|
||||
}"/>
|
||||
<div>
|
||||
<el-button size='small' plain>暂存</el-button>
|
||||
<el-button size='small' type="primary">提交</el-button>
|
||||
<el-button size='small' @click="handleSaveDetail()" plain>暂存</el-button>
|
||||
<el-button size='small' type="primary" >提交</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="goals-content-tabbar">
|
||||
@ -107,7 +107,7 @@ import InfoHeader from '@/components/InfoHeader'
|
||||
import PopupRight from '@/components/PopupRight'
|
||||
import draggable from 'vuedraggable'
|
||||
import {getDimensions} from '@/api/data'
|
||||
import { apiResultGetDetail } from '@/api/assessment'
|
||||
import { apiResultGetDetail, apiSaveDetail } from '@/api/assessment'
|
||||
export default {
|
||||
data () {
|
||||
return {
|
||||
@ -160,6 +160,15 @@ export default {
|
||||
this.handleGetTbale()
|
||||
},
|
||||
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 () {
|
||||
try {
|
||||
@ -220,7 +229,7 @@ export default {
|
||||
handleFilter (item) {
|
||||
return item ? item.filter(i => !i.isDelete) : []
|
||||
},
|
||||
async handleGetTbale (id = 226) {
|
||||
async handleGetTbale (id = this.$route.query.id) {
|
||||
let res = await apiResultGetDetail({id})
|
||||
if (res.code !== 200) return
|
||||
this.obj = res.data
|
||||
|
||||
@ -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>
|
||||
@ -25,11 +25,7 @@
|
||||
departmentName:obj.departmentName
|
||||
}" />
|
||||
<div class="performance-content-title-right">
|
||||
<el-button
|
||||
size="mini"
|
||||
@click="handleZhiding"
|
||||
type="primary"
|
||||
>制定目标</el-button>
|
||||
<UseButton />
|
||||
</div>
|
||||
</div>
|
||||
<div class="performance-content-center">
|
||||
@ -92,7 +88,7 @@
|
||||
:obj='obj'
|
||||
/>
|
||||
</div>
|
||||
<div class="performance-content-jilu">
|
||||
<div v-if="!formList.resultCommentList" class="performance-content-jilu">
|
||||
<div class="performance-content-jilu-title commonFont">
|
||||
记录
|
||||
</div>
|
||||
@ -136,9 +132,6 @@
|
||||
>
|
||||
{{i}}
|
||||
</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>
|
||||
</popup-right>
|
||||
</div>
|
||||
@ -148,6 +141,8 @@
|
||||
import SmallNav from '@/components/kpi-layout/SmallNav'
|
||||
import InfoHeader from '@/components/InfoHeader'
|
||||
import PopupRight from '@/components/PopupRight'
|
||||
import UseButton from './components/UseButton'
|
||||
|
||||
import { apiResultRecordDetail, apiResultGetDetail } from '@/api/assessment'
|
||||
import tables from './components/table'
|
||||
|
||||
@ -187,7 +182,8 @@ export default {
|
||||
SmallNav,
|
||||
InfoHeader,
|
||||
PopupRight,
|
||||
tables
|
||||
tables,
|
||||
UseButton
|
||||
},
|
||||
computed: {},
|
||||
beforeMount () { },
|
||||
@ -196,16 +192,7 @@ export default {
|
||||
this.handleGetTbale()
|
||||
},
|
||||
methods: {
|
||||
// 制定目标
|
||||
handleZhiding () {
|
||||
this.$router.push({
|
||||
name: 'assessment-goals',
|
||||
query: {
|
||||
id: this.$route.query.id
|
||||
}
|
||||
})
|
||||
},
|
||||
async handleGetTbale (id = 226) {
|
||||
async handleGetTbale (id = 267) {
|
||||
let res = await apiResultGetDetail({ id })
|
||||
this.obj = res.data
|
||||
console.log('res: ', res)
|
||||
@ -223,7 +210,7 @@ export default {
|
||||
},
|
||||
async handleList () {
|
||||
// resultRecordId = == this.$route.query.id
|
||||
let res = await apiResultRecordDetail({ resultRecordId: 215 })
|
||||
let res = await apiResultRecordDetail({ resultRecordId: 267 })
|
||||
if (res.code !== 200) return
|
||||
for (let i in res.data.flowRecordList) {
|
||||
if (res.data.flowRecordList[i].status !== 1) {
|
||||
|
||||
@ -16,7 +16,7 @@
|
||||
<div class="step-content-top">
|
||||
<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="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>
|
||||
</div>
|
||||
<div class="step-content-top-right">
|
||||
@ -98,13 +98,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<popup-right v-if="kaopingFrom.showRight" @cancel='handleCancel' @submit="handleSubmit" title="考评组筛选">
|
||||
<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>
|
||||
<EvaluationTeamFilter v-if="dialogVisible" :value='params.evaluationIds' :filtersDic="{startId: this.params.startId }" :dialogVisible.sync='dialogVisible' @submitClick='submitClick' @close='dialogVisible = false'/>
|
||||
<getPersonnel v-if="form.isShowPersonnel" :value.sync='params.staffIds' :isShow.sync='form.isShowPersonnel' :showDataList.sync='form.personnelList'/>
|
||||
</div>
|
||||
</template>
|
||||
@ -113,6 +107,8 @@
|
||||
import SmallNav from '@/components/kpi-layout/SmallNav'
|
||||
import getPersonnel from '@/components/getPersonnel'
|
||||
import PopupRight from '@/components/PopupRight'
|
||||
import EvaluationTeamFilter from '@/components/EvaluationTeamFilter'
|
||||
|
||||
import { apiManagerDetail, apiChartList } from '@/api/assessment'
|
||||
import {getWorkList} from '@/api/workbench'
|
||||
import { getStartsData } from '@/api/report'
|
||||
@ -120,9 +116,7 @@ let id = 0
|
||||
export default {
|
||||
data () {
|
||||
return {
|
||||
kaopingFrom: {
|
||||
showRight: false
|
||||
},
|
||||
dialogVisible: false,
|
||||
form: {
|
||||
isShowPersonnel: false,
|
||||
personnelList: {
|
||||
@ -135,8 +129,8 @@ export default {
|
||||
'evaluationIds': '',
|
||||
'flowProcess': null,
|
||||
'pageSize': 5,
|
||||
// 'staffIds': '',
|
||||
// 'staffName': '',
|
||||
'staffIds': '',
|
||||
'staffName': '',
|
||||
'startId': 10
|
||||
},
|
||||
key: 0,
|
||||
@ -163,7 +157,8 @@ export default {
|
||||
components: {
|
||||
SmallNav,
|
||||
getPersonnel,
|
||||
PopupRight
|
||||
PopupRight,
|
||||
EvaluationTeamFilter
|
||||
},
|
||||
computed: {
|
||||
formTitle () {
|
||||
@ -176,18 +171,16 @@ export default {
|
||||
await this.handleStartsReq()
|
||||
},
|
||||
methods: {
|
||||
submitClick (item) {
|
||||
this.params.evaluationIds = item.value
|
||||
this.params.title = item.title
|
||||
this.params.currPage = 1
|
||||
this.handleGetListContent()
|
||||
this.dialogVisible = false
|
||||
},
|
||||
// 获取考评组
|
||||
async handleKaoping () {
|
||||
let res = await getWorkList(Object.assign({}, {startId: this.params.startId}, {
|
||||
'currPage': 1,
|
||||
'pageSize': 999
|
||||
}))
|
||||
if (res.code !== 200) {
|
||||
this.rightList = []
|
||||
return
|
||||
}
|
||||
this.rightList = res.data.list
|
||||
this.kaopingFrom.showRight = true
|
||||
this.dialogVisible = true
|
||||
},
|
||||
handleLook (id) {
|
||||
// this.handleKaoping()
|
||||
@ -206,6 +199,7 @@ export default {
|
||||
this.handleGetListContent()
|
||||
},
|
||||
async handleGetListContent (params = this.params) {
|
||||
console.log('params: ', params)
|
||||
let res = await apiManagerDetail(params)
|
||||
if (res.code !== 200) return
|
||||
this.tableData = res.data.list
|
||||
|
||||
@ -149,7 +149,7 @@ export default {
|
||||
this.handleGetList()
|
||||
},
|
||||
handleRowClick (row) {
|
||||
this.$router.push({ name: 'assessment-stepList', query: { id: row.recordId } })
|
||||
this.$router.push({ name: 'assessment-performance', query: { id: row.recordId } })
|
||||
}
|
||||
},
|
||||
watch: {}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user