Browse Source

PC端志愿者列表新增所属部门查询条件和所属部门列

feature/lc_issueAdjustment
liuchuang 4 years ago
parent
commit
7e75e6e21e
  1. 34
      src/views/modules/user/volunteerinfo.vue

34
src/views/modules/user/volunteerinfo.vue

@ -26,6 +26,16 @@
placeholder="昵称"
clearable></el-input>
</el-form-item>
<el-form-item label="所属部门">
<el-select v-model="dataForm.volunteerDeptId" placeholder="请选择" clearable>
<el-option
v-for="item in volunteerDepts"
:key="item.id"
:label="item.deptName"
:value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button @click="getDataList()">{{ $t('query') }}</el-button>
<el-button @click="exportList()">{{ $t('export') }}</el-button>
@ -88,6 +98,10 @@
:formatter="kindnessTimeState"
header-align="center"
align="center"></el-table-column>
<el-table-column prop="deptName"
label="所属部门"
header-align="center"
align="center"></el-table-column>
<el-table-column prop="points"
label="积分"
header-align="center"
@ -194,7 +208,8 @@ export default {
communityId: null,
gridId: null,
leaderFlag: '0',
volunteerOrder: ''
volunteerOrder: '',
volunteerDeptId: ''
},
auditStatusType: 0,
deptIdList: [],
@ -202,10 +217,12 @@ export default {
volunteerinfoDetailVisible: false,
volunteerinfoPointsAdjustVisible: false,
volunteerPointsLogVisible: false,
volunteerinfoCheckVisible: false
volunteerinfoCheckVisible: false,
volunteerDepts: []
}
},
created () {
this.getVolunteerDepts()
this.$http
.get(`/sys/user/deptOptions/getByLoginUser`)
.then(({ data: res }) => {
@ -241,6 +258,19 @@ export default {
}
},
methods: {
//
getVolunteerDepts () {
this.$http.get(`/app-user/volunteerdept/volunteerdepts`).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.volunteerDepts = {
...this.volunteerDepts,
...res.data
}
console.log(JSON.stringify(this.volunteerDepts))
}).catch(() => {})
},
//
userDetailHandle (userId) {
this.volunteerinfoDetailVisible = true

Loading…
Cancel
Save