Browse Source

【安宁pc端 标签管理】-【用户标签 - 添加身份标签】魏凯 2020-12-01

feature/addTag
weikai 5 years ago
parent
commit
c0bf6dfac0
  1. 3
      src/views/modules/user/hasAuthenticationpartymembers.vue
  2. 10
      src/views/modules/user/party-user-tag.vue
  3. 12
      src/views/modules/user/pass-authentication.vue
  4. 23
      src/views/modules/user/user-tag1.vue

3
src/views/modules/user/hasAuthenticationpartymembers.vue

@ -134,7 +134,7 @@
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" <el-button type="text"
size="small" size="small"
@click="partyReview(scope.row.id)">身份标签管理</el-button> @click="partyReview(scope.row.userId)">身份标签管理</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -402,6 +402,7 @@ export default {
} }
}, },
partyReview (userId) { partyReview (userId) {
debugger
this.partyReviewVisible = true this.partyReviewVisible = true
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.partyReview.dataForm.id = userId this.$refs.partyReview.dataForm.id = userId

10
src/views/modules/user/party-user-tag.vue

@ -32,7 +32,7 @@
<span>{{dataForm.allDeptNames}}</span> <span>{{dataForm.allDeptNames}}</span>
</el-form-item> </el-form-item>
<el-form-item label="身份标签" > <el-form-item label="身份标签" >
<el-select v-model="dataForm.tagIdsNew" multiple collapse-tags placeholder="请选择身份标签"> <el-select v-model="dataForm.partyTagIds" multiple collapse-tags placeholder="请选择身份标签">
<el-option v-for="item in tagOptions" <el-option v-for="item in tagOptions"
:key="item.id" :key="item.id"
:label="item.tagName" :label="item.tagName"
@ -74,7 +74,7 @@ export default {
realName: '', realName: '',
mobile: '', mobile: '',
identityNo: '', identityNo: '',
tagIdsNew:[], partyTagIds:[],
}, },
authenticateHistoryVisible: false, authenticateHistoryVisible: false,
@ -131,7 +131,7 @@ export default {
}, },
// //
getInfo () { getInfo () {
this.$http.get(`/app-user/partymembers/${this.dataForm.id}`).then(({ data: res }) => { this.$http.get(`/app-user/user/${this.dataForm.id}`).then(({ data: res }) => {
if (res.code !== 0) { if (res.code !== 0) {
return this.$message.error(res.msg) return this.$message.error(res.msg)
} }
@ -142,8 +142,6 @@ export default {
this.dataForm.partyFlag = '1' // this.dataForm.partyFlag = '1' //
this.dataForm.tagIds = [] this.dataForm.tagIds = []
this.dataForm.partyFlag = '' this.dataForm.partyFlag = ''
this.dataForm.tagIds = ''
this.dataForm.partyTagIds = []
}).catch(() => { }) }).catch(() => { })
this.$http.get(`/app-user/usergrid/listUserGrid/${this.dataForm.id}`).then(({ data: res }) => { this.$http.get(`/app-user/usergrid/listUserGrid/${this.dataForm.id}`).then(({ data: res }) => {
if (res.code !== 0) { if (res.code !== 0) {
@ -161,7 +159,7 @@ export default {
this.isAble = true this.isAble = true
let postData = { let postData = {
userId: this.dataForm.id, userId: this.dataForm.id,
tagIds: this.dataForm.tagIdsNew tagIds: this.dataForm.partyTagIds
} }
this.$http[!this.dataForm.id ? 'post' : 'post']('/app-user/usertagrelation/addTag/', postData).then(({ data: res }) => { this.$http[!this.dataForm.id ? 'post' : 'post']('/app-user/usertagrelation/addTag/', postData).then(({ data: res }) => {
this.isAble = false this.isAble = false

12
src/views/modules/user/pass-authentication.vue

@ -160,8 +160,8 @@
ref="userGrid" ref="userGrid"
@refreshDataList="getDataList"></user-grid> @refreshDataList="getDataList"></user-grid>
<user-tag v-if="userDetailVisible1" <user-tag v-if="tagVisble"
ref="userDetail" ref="userTag"
@refreshDataList="getDataList"></user-tag> @refreshDataList="getDataList"></user-tag>
</div> </div>
</el-card> </el-card>
@ -216,7 +216,7 @@ export default {
deptIdList: [], deptIdList: [],
options: [], options: [],
userDetailVisible: false, userDetailVisible: false,
userDetailVisible1: false, tagVisble: false,
userGridVisible: false, userGridVisible: false,
streetOptions: [], streetOptions: [],
communityOptions: [], communityOptions: [],
@ -396,10 +396,10 @@ export default {
this.dataForm.mobile = e.target.value this.dataForm.mobile = e.target.value
}, },
partyReview(userId){ partyReview(userId){
this.userDetailVisible1 = true this.tagVisble = true
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.userDetail.dataForm.id = userId this.$refs.userTag.dataForm.id = userId
this.$refs.userDetail.init() this.$refs.userTag.init()
}) })
} }
}, },

23
src/views/modules/user/user-tag1.vue

@ -39,22 +39,8 @@
prop="remark"> prop="remark">
<span>{{dataForm.remark}}</span> <span>{{dataForm.remark}}</span>
</el-form-item> </el-form-item>
<el-form-item label="扫码支部">
<el-table :data="userGridList"
style="width: 100%">
<el-table-column prop="id"
label="主键" v-if="false">
</el-table-column>
<el-table-column prop="allDeptNames"
label="街道-社区-支部">
</el-table-column>
<el-table-column prop="dept"
label="部门名称" v-if="false">
</el-table-column>
</el-table>
</el-form-item>
<el-form-item label="身份标签" > <el-form-item label="身份标签" >
<el-select v-model="dataForm.tagIds" multiple collapse-tags placeholder="请选择身份标签"> <el-select v-model="dataForm.partyTagIds" multiple collapse-tags placeholder="请选择身份标签">
<el-option v-for="item in tagOptions" <el-option v-for="item in tagOptions"
:key="item.id" :key="item.id"
:label="item.tagName" :label="item.tagName"
@ -64,6 +50,7 @@
</el-form-item> </el-form-item>
</el-form> </el-form>
<template slot="footer"> <template slot="footer">
<el-button @click="visible = false">{{ $t('cancel') }}</el-button>
<el-button @click="dataFormSubmitHandle()" <el-button @click="dataFormSubmitHandle()"
type="primary">{{ $t('confirm') }}</el-button> type="primary">{{ $t('confirm') }}</el-button>
</template> </template>
@ -82,8 +69,8 @@ export default {
partyFlag: '', partyFlag: '',
cadreFlag: '', cadreFlag: '',
state: '', state: '',
tagIds: [], remark: '',
remark: '' partyTagIds:[],
}, },
partyFlagOptions: [{ id: '0', name: '不是' }, { id: '1', name: '是' }], partyFlagOptions: [{ id: '0', name: '不是' }, { id: '1', name: '是' }],
cadreOptions: [{ cadreFlag: '1', cadreTitle: '是' }, { cadreFlag: '0', cadreTitle: '否' }], cadreOptions: [{ cadreFlag: '1', cadreTitle: '是' }, { cadreFlag: '0', cadreTitle: '否' }],
@ -156,7 +143,7 @@ export default {
this.isAble = true this.isAble = true
let postData = { let postData = {
userId: this.dataForm.id, userId: this.dataForm.id,
tagIds: this.dataForm.tagIdsNew tagIds: this.dataForm.partyTagIds
} }
this.$http[!this.dataForm.id ? 'post' : 'post']('/app-user/usertagrelation/addTag/', postData).then(({ data: res }) => { this.$http[!this.dataForm.id ? 'post' : 'post']('/app-user/usertagrelation/addTag/', postData).then(({ data: res }) => {
this.isAble = false this.isAble = false

Loading…
Cancel
Save