Youhua
This commit is contained in:
parent
aa260e486f
commit
45de6d1bd9
192
src/components/ChooseInitiate/index.vue
Normal file
192
src/components/ChooseInitiate/index.vue
Normal file
@ -0,0 +1,192 @@
|
||||
<!-- -->
|
||||
<template>
|
||||
<popup-right
|
||||
v-if="showChooseList"
|
||||
@cancel="hundlePopupHide"
|
||||
@submit="handleSubmitPopup"
|
||||
:title="popupRightTitle"
|
||||
:subumitText='subumitText'
|
||||
class="popup"
|
||||
>
|
||||
<div slot="content">
|
||||
<div class="popup-search">
|
||||
<el-input
|
||||
v-model="rqAssessmentParameter.searchName"
|
||||
@change="handlePopupSearchChange"
|
||||
prefix-icon="el-icon-search"
|
||||
clearable
|
||||
placeholder="搜索考评组"
|
||||
size="mini"
|
||||
></el-input>
|
||||
</div>
|
||||
<div class="popup-table">
|
||||
<el-table
|
||||
v-if="popupData.tableList.length"
|
||||
ref="popupMultipleTable"
|
||||
:data="popupData.tableList"
|
||||
@selection-change="handleSelectionChange"
|
||||
tooltip-effect="dark"
|
||||
:row-key="handleGetRowKeys"
|
||||
>
|
||||
<el-table-column
|
||||
type="selection"
|
||||
width="40"
|
||||
:reserve-selection="true"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="全选"
|
||||
width="250"
|
||||
><template slot-scope="scope">{{scope.row.name}}</template></el-table-column>
|
||||
<el-table-column
|
||||
width="80"
|
||||
align="right"
|
||||
><template slot-scope="scope">{{scope.row.counts}}人</template></el-table-column>
|
||||
</el-table>
|
||||
<div
|
||||
v-else
|
||||
class="popup-empty comonPromptFont"
|
||||
>
|
||||
<img
|
||||
src=""
|
||||
style="height: 150px; width: 150px;"
|
||||
/>
|
||||
<div>暂无考评组</div>
|
||||
<div>考评组用于自定义配置“被考核人”的考核指标和考核流程</div>
|
||||
<el-button
|
||||
@click="handlePopupCreat"
|
||||
type="text"
|
||||
>新建考评组</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<el-pagination
|
||||
:hide-on-single-page="true"
|
||||
:current-page.sync="rqAssessmentParameter.currPage"
|
||||
:page-size="rqAssessmentParameter.pageSize"
|
||||
:total="rqAssessmentParameter.totalCount"
|
||||
:page-count="rqAssessmentParameter.totalPage"
|
||||
@current-change="handleCurrentChange"
|
||||
layout="total, prev, pager, next, jumper"
|
||||
></el-pagination>
|
||||
</div>
|
||||
<div
|
||||
slot="footer-left"
|
||||
class="popup-footer-left"
|
||||
>已选择:{{popupData.selectedList.length}}个</div>
|
||||
</popup-right>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import PopupRight from '@/components/PopupRight'
|
||||
import { getWorkList } from '@/api/workbench'
|
||||
export default {
|
||||
props: {
|
||||
subumitText: {
|
||||
type: String,
|
||||
default: '确 定'
|
||||
},
|
||||
popupRightTitle: {
|
||||
type: String,
|
||||
default: '选择考评组(月度)考核'
|
||||
},
|
||||
showChooseList: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
options: {
|
||||
type: Object,
|
||||
default: () => {
|
||||
return {}
|
||||
}
|
||||
}
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
// showChooseList: true,
|
||||
popupData: {
|
||||
tableList: [],
|
||||
selectedList: []
|
||||
},
|
||||
rqAssessmentParameter: {
|
||||
currPage: 1,
|
||||
pageSize: 100,
|
||||
searchName: '',
|
||||
totalCount: 1,
|
||||
totalPage: 1
|
||||
}
|
||||
}
|
||||
},
|
||||
components: {
|
||||
PopupRight
|
||||
},
|
||||
computed: {},
|
||||
beforeMount () {},
|
||||
mounted () {
|
||||
this.handleGainAssessmentGroupList()
|
||||
console.log('showChooseList: ', this.showChooseList)
|
||||
},
|
||||
methods: {
|
||||
handlePopupCreat () {
|
||||
this.$emit('update:showChooseList', false)
|
||||
// 新建考评组
|
||||
this.$router.push({ name: 'workbench-edit-group' })
|
||||
},
|
||||
hundlePopupHide () {
|
||||
this.popupData.selectedList = []
|
||||
if (this.$refs.popupMultipleTable) {
|
||||
this.$refs.popupMultipleTable.clearSelection()
|
||||
}
|
||||
this.$emit('update:showChooseList', false)
|
||||
},
|
||||
handlePopupSearchChange (val) {
|
||||
// 去搜搜
|
||||
this.handleGainAssessmentGroupList()
|
||||
},
|
||||
handleSelectionChange (val) {
|
||||
// 选择发生变化
|
||||
this.popupData.selectedList = val
|
||||
},
|
||||
handleGetRowKeys (row) {
|
||||
return row.id
|
||||
},
|
||||
handleSubmitPopup () {
|
||||
const list = this.popupData.selectedList
|
||||
const id = list.map((item, index) => {
|
||||
return item.id
|
||||
}).join(',')
|
||||
if (this.$listeners.cb) {
|
||||
this.$emit('cb', {value: id, list})
|
||||
} else {
|
||||
this.$emit('update:list', id)
|
||||
this.$emit('update:showChooseList', false)
|
||||
}
|
||||
},
|
||||
// 获取数据
|
||||
handleGainAssessmentGroupList (currPage) {
|
||||
currPage = currPage > 0 ? currPage : this.rqAssessmentParameter.currPage
|
||||
let para = {
|
||||
pageSize: this.rqAssessmentParameter.pageSize,
|
||||
currPage: currPage,
|
||||
name: this.rqAssessmentParameter.searchName
|
||||
}
|
||||
getWorkList(Object.assign({}, para, this.options)).then(res => {
|
||||
this.rqAssessmentParameter.totalPage = res.data.totalPage
|
||||
this.rqAssessmentParameter.totalCount = res.data.totalCount
|
||||
this.currPage = res.data.currPage
|
||||
this.popupData.tableList = res.data.list
|
||||
})
|
||||
},
|
||||
handleCurrentChange (val) {
|
||||
this.handleGainAssessmentGroupList(val)
|
||||
}
|
||||
},
|
||||
watch: {}
|
||||
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<style lang='less' scoped>
|
||||
.popup-search{
|
||||
margin: 10px 0;
|
||||
}
|
||||
</style>
|
||||
@ -12,7 +12,7 @@
|
||||
</div>
|
||||
<div>
|
||||
<el-button size="small" @click="$emit('cancel')">取 消</el-button>
|
||||
<el-button size="small" type="primary" @click="$emit('submit')">确 定</el-button>
|
||||
<el-button size="small" type="primary" @click="$emit('submit')">{{subumitText}}</el-button>
|
||||
<slot name="footer"></slot>
|
||||
</div>
|
||||
</div>
|
||||
@ -27,6 +27,10 @@
|
||||
|
||||
export default {
|
||||
props: {
|
||||
subumitText: {
|
||||
type: String,
|
||||
default: '确 定'
|
||||
},
|
||||
title: {
|
||||
type: String,
|
||||
default: ''
|
||||
|
||||
@ -20,7 +20,7 @@
|
||||
<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">
|
||||
<el-button size="small" type="primary">开始评分</el-button>
|
||||
<el-button size="small" @click="showChooseList= true" type="primary">开始评分</el-button>
|
||||
<!-- handleGetList handleChoose -->
|
||||
<el-button size="small" @click="handleGetList" plain>更多</el-button>
|
||||
</div>
|
||||
@ -98,6 +98,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<ChooseInitiate @cb='handleCallBackChoose' subumitText='开始评分' popupRightTitle='请选择开始评分的考评组' :options='options' :showChooseList.sync='showChooseList'/>
|
||||
<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>
|
||||
@ -108,14 +109,18 @@ import SmallNav from '@/components/kpi-layout/SmallNav'
|
||||
import getPersonnel from '@/components/getPersonnel'
|
||||
import PopupRight from '@/components/PopupRight'
|
||||
import EvaluationTeamFilter from '@/components/EvaluationTeamFilter'
|
||||
import ChooseInitiate from '@/components/ChooseInitiate'
|
||||
|
||||
import { apiManagerDetail, apiChartList } from '@/api/assessment'
|
||||
import {getWorkList} from '@/api/workbench'
|
||||
import { getStartsData } from '@/api/report'
|
||||
let id = 0
|
||||
export default {
|
||||
data () {
|
||||
return {
|
||||
options: {
|
||||
startId: this.$route.query.id || ''
|
||||
},
|
||||
showChooseList: false,
|
||||
dialogVisible: false,
|
||||
form: {
|
||||
isShowPersonnel: false,
|
||||
@ -158,7 +163,8 @@ export default {
|
||||
SmallNav,
|
||||
getPersonnel,
|
||||
PopupRight,
|
||||
EvaluationTeamFilter
|
||||
EvaluationTeamFilter,
|
||||
ChooseInitiate
|
||||
},
|
||||
computed: {
|
||||
formTitle () {
|
||||
@ -171,6 +177,9 @@ export default {
|
||||
await this.handleStartsReq()
|
||||
},
|
||||
methods: {
|
||||
handleCallBackChoose (item) {
|
||||
console.log('item: ', item)
|
||||
},
|
||||
submitClick (item) {
|
||||
this.params.evaluationIds = item.value
|
||||
this.params.title = item.title
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user