|
|
@@ -75,13 +75,8 @@
|
|
|
>
|
|
|
<template slot-scope="{row}">
|
|
|
|
|
|
- <ibps-user-selector
|
|
|
- type="user"
|
|
|
- :value="row.ren_yuan_id_"
|
|
|
- readonly-text="text"
|
|
|
- :disabled="true"
|
|
|
- :multiple="false"
|
|
|
- />
|
|
|
+ <div>{{ row.ren_yuan_name_ }}</div>
|
|
|
+
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
@@ -147,7 +142,8 @@ export default {
|
|
|
|
|
|
dialogVisible: true,
|
|
|
tableList: [],
|
|
|
- selectItem: '全部'
|
|
|
+ selectItem: '全部',
|
|
|
+ refresh: false
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
|
@@ -201,8 +197,22 @@ export default {
|
|
|
return this.categoryList.slice(start, end)
|
|
|
}
|
|
|
},
|
|
|
+ watch: {
|
|
|
+ tableList (val) {
|
|
|
+ const { userList = [] } = this.$store.getters || {}
|
|
|
+ val.forEach(item => {
|
|
|
+ const user = userList.find(userItem => userItem.userId === item.ren_yuan_id_)
|
|
|
+ if (user) {
|
|
|
+ item.ren_yuan_name_ = user.userName
|
|
|
+ }
|
|
|
+ })
|
|
|
+ // this.refresh = false
|
|
|
+ // this.refresh = true
|
|
|
+ }
|
|
|
+ },
|
|
|
async mounted () {
|
|
|
console.log(this.params)
|
|
|
+
|
|
|
await this.getAllPeople()
|
|
|
},
|
|
|
methods: {
|
|
|
@@ -277,10 +287,10 @@ export default {
|
|
|
})
|
|
|
await this.getRegisterPeople()
|
|
|
if (this.params.tableName === 't_lhrypxjlb') {
|
|
|
- if (data[0].shi_fou_guo_shen_ === '进行中') {
|
|
|
+ if (data[0].pei_xun_zhuang_ta === '进行中') {
|
|
|
this.addPeople()
|
|
|
}
|
|
|
- if (data[0].shi_fou_guo_shen_ === '已结束' && data[0].bu_qian_ren_yuan_) {
|
|
|
+ if (data[0].pei_xun_zhuang_ta === '已结束' && data[0].bu_qian_ren_yuan_) {
|
|
|
data[0].bu_qian_ren_yuan_.split(',').forEach(person => {
|
|
|
const p = this.tableList.find(item => item.ren_yuan_id_ === person)
|
|
|
if (p) {
|
|
|
@@ -295,7 +305,7 @@ export default {
|
|
|
})
|
|
|
}
|
|
|
} else if (this.params.tableName === 't_fwxyhyqdb' || this.params.tableName === 't_nshyjyb' || this.params.tableName === 't_gshyjyb' || this.params.tableName === 't_jykzjbdjb') {
|
|
|
- if (data[0].shi_fou_guo_shen_ !== '已完成') {
|
|
|
+ if (data[0].pei_xun_zhuang_ta !== '已完成') {
|
|
|
this.addPeople()
|
|
|
}
|
|
|
}
|
|
|
@@ -309,23 +319,16 @@ export default {
|
|
|
data.forEach(person => {
|
|
|
const p = this.tableList.find(item => item.ren_yuan_id_ === person.ren_yuan_id_)
|
|
|
if (!p) {
|
|
|
- // this.tableList.push({
|
|
|
- // ren_yuan_id_: person.ren_yuan_id_,
|
|
|
- // status: '已签到',
|
|
|
- // qian_dao_shi_jian: person.qian_dao_shi_jian
|
|
|
- // })
|
|
|
-
|
|
|
- const obj = {
|
|
|
+ this.tableList.push({
|
|
|
ren_yuan_id_: person.ren_yuan_id_,
|
|
|
status: '已签到',
|
|
|
qian_dao_shi_jian: person.qian_dao_shi_jian
|
|
|
- }
|
|
|
-
|
|
|
- this.$set(this.tableList, this.tableList.length, obj)
|
|
|
+ })
|
|
|
} else {
|
|
|
p.status = '已签到'
|
|
|
p.qian_dao_shi_jian = person.qian_dao_shi_jian
|
|
|
}
|
|
|
+ console.log(this.tableList)
|
|
|
})
|
|
|
},
|
|
|
|