This commit is contained in:
熊成强 2020-10-30 17:57:39 +08:00
parent 0251dcc86d
commit 22499458f8
3 changed files with 63 additions and 12 deletions

View File

@ -213,8 +213,8 @@ export default {
this.form.depIds = c.value
this.personnelList = a
this.showData = c
this.form.id = res.id
this.form.name = res.name
this.form.id = this.$route.query.copy ? '' : res.id
this.form.name = this.$route.query.copy ? '' : res.name
} catch (error) {
this.$message.error(error.msg)
}

View File

@ -66,8 +66,6 @@ export default {
},
async handSaveBasisc () {
console.log('this.processInfo: ', this.processInfo)
console.log('this.basisForm: ', this.basisForm)
if (!this.basisForm.name) {
return this.$message.error('请输入考评组名称')
}
@ -82,7 +80,6 @@ export default {
this.basisForm = res
this.templateForm.evaluationGroupId = res.id
for (let i in this.processInfo) {
console.log('processInfo: ', i)
try {
let res1 = await saveDetailProcs(Object.assign({}, this.processInfo[i].chartDetails, {evaluationGroupId: res.id}))
console.log('res: ', res1)

View File

@ -66,7 +66,25 @@
</div>
<popup-right v-if="showRight" @cancel='handleCancel' @submit="handleSubmit" title="选择复制考评组">
<div slot="content" class="chooseManage">
99
<el-table
:data="copyList"
@row-click='handleRowChange'
>
<el-table-column align="center">
<!-- label非常重要 -->
<template v-slot="props">
<div class="chooseManage-item">
<el-radio
:value="selectId"
:label="props.row.id"
>{{props.row.name}}</el-radio>
<div class="left">
{{props.row.counts}}
</div>
</div>
</template>
</el-table-column>
</el-table>
</div>
</popup-right>
</div>
@ -78,13 +96,15 @@ import PopupRight from '@/components/PopupRight'
export default {
data () {
return {
selectId: '',
showRight: false,
params: {
'currPage': 1,
'pageSize': 10
},
form: {},
tableData: []
tableData: [],
copyList: []
}
},
components: {
@ -96,8 +116,17 @@ export default {
this.handleGetData()
},
methods: {
handleRowChange (data) {
this.selectId = data.id
},
handleSubmit () {
if (!this.selectId) {
this.$message.error('请选择考评组!')
return
}
console.log('this.copyList : ', this.copyList)
this.showRight = false
this.$router.push({name: 'workbench-edit-group', query: {id: this.selectId, copy: 1}})
},
handleCancel () {
this.showRight = false
@ -105,9 +134,14 @@ export default {
handlePush (id) {
this.$router.push({name: 'workbench-edit-group', query: {id}})
},
handleToEidtCopy (id) {
async handleToEidtCopy (id) {
let res = await getWorkList({
'currPage': 1,
'pageSize': 99999
})
if (res.code !== 200) return
this.copyList = res.data.list
this.showRight = true
// this.$router.push({name: 'workbench-edit-group', query: {id: id, copy: 1}})
},
handleChange (value) {
this.params = {
@ -121,9 +155,10 @@ export default {
this.params.currPage = value
this.handleGetData()
},
async handleGetData () {
async handleGetData (parmas = Object.assign({}, this.params)) {
try {
let res = await getWorkList(Object.assign({}, this.params))
let res = await getWorkList(parmas)
if (res.code !== 200) return
res = res.data
console.log('res: ', res)
this.tableData = res.list
@ -170,9 +205,28 @@ export default {
}
</script>
<style lang="less">
.assessment{
.el-table__header{
display: none;
}
}
</style>
<style lang='less' scoped>
.assessment{
.chooseManage{
width: 500px;
}
.chooseManage-item{
display: flex;
justify-content: space-between;
align-items: center;
height: 30px;
// .left{
// flex: 1;
// }
}
.footer{
text-align: right;
margin: 20px 0 0 0;