Browse Source

待认证居民功能改造-添加认证历史统计可查看详情

master
尹作梅 6 years ago
parent
commit
6152c0996f
  1. 102
      src/views/modules/user/authenticate-history.vue
  2. 29
      src/views/modules/user/user-add-or-update.vue

102
src/views/modules/user/authenticate-history.vue

@ -0,0 +1,102 @@
<template>
<el-dialog
:visible.sync="visible"
title="认证历史记录"
:append-to-body="true"
:modal-append-to-body="false"
:close-on-click-modal="false"
:close-on-press-escape="false"
>
<el-table :data="dataList" border style="width: 100%;">
<el-table-column
prop="realName"
label="姓名"
header-align="center"
align="center"
></el-table-column>
<el-table-column
prop="mobile"
label="手机号"
header-align="center"
align="center"
></el-table-column>
<el-table-column
prop="address"
label="居住地址"
header-align="center"
align="center"
></el-table-column>
<el-table-column
prop="authenticatedFlag"
label="结果"
header-align="center"
align="center"
:formatter="formatterAuthenticatedFlag"
></el-table-column>
<el-table-column
prop="remark"
label="备注"
header-align="center"
align="center"
></el-table-column>
<el-table-column
prop="createdTime"
label="时间"
header-align="center"
align="center"
></el-table-column>
</el-table>
<template slot="footer">
<el-button @click="visible = false" type="primary">{{
$t("confirm")
}}</el-button>
</template>
</el-dialog>
</template>
<script>
export default {
data () {
return {
visible: false,
dataForm: {
userId: ''
},
dataList: []
}
},
methods: {
init () {
this.visible = true
this.$nextTick(() => {
if (this.dataForm.userId) {
this.getDataList()
}
})
},
//
getDataList () {
this.$http
.get(
`/app-user/userauthenticatehistory/listUserAuthenticateHistory/${this.dataForm.userId}`
)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.dataList = res.data
})
.catch(() => {})
},
//
formatterAuthenticatedFlag (row, column) {
let authenticatedFlag = row.authenticatedFlag
if (authenticatedFlag === 1) {
return '通过'
} else {
return '未通过'
}
}
}
}
</script>

29
src/views/modules/user/user-add-or-update.vue

@ -1,6 +1,7 @@
<template>
<el-dialog :visible.sync="visible"
title="审核"
:modal-append-to-body='false'
:close-on-click-modal="false"
:close-on-press-escape="false">
<el-form :model="dataForm"
@ -17,9 +18,17 @@
<span>{{dataForm.mobile}}</span>
</el-form-item>
<el-form-item label="身份证号"
prop="identityNo">
prop="identityNo"
v-if="false">
<span>{{dataForm.identityNo}}</span>
</el-form-item>
<el-form-item label="认证历史"
prop="realName"
v-if="true">
<span>累计提交认证{{dataForm.totalSubmitNum}}&nbsp;&nbsp;&nbsp;通过{{dataForm.totalPassSubmitNum}},&nbsp;不通过{{dataForm.totalFailNum}}</span>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<el-button v-if="dataForm.totalSubmitNum>0" type="text" size="small" @click="userAuthenticateHistoryListHandle(dataForm.id)">查看详情</el-button>
</el-form-item>
<el-form-item label="居民住址"
prop="address">
<span>{{dataForm.address}}</span>
@ -91,11 +100,14 @@
<el-button type="primary"
@click="dataFormSubmitHandle()">{{ $t('confirm') }}</el-button>
</template>
<authenticate-history v-if="authenticateHistoryVisible" ref="authenticateHistory"></authenticate-history>
</el-dialog>
</template>
<script>
import debounce from 'lodash/debounce'
import AuthenticateHistory from './authenticate-history'
export default {
data () {
return {
@ -108,6 +120,7 @@ export default {
tagIds: [],
remark: ''
},
authenticateHistoryVisible: false,
cadreOptions: [{ cadreFlag: '1', cadreTitle: '是' }, { cadreFlag: '0', cadreTitle: '否' }],
tagOptions: [],
userGridList: []
@ -177,7 +190,8 @@ export default {
id: this.dataForm.id,
state: this.dataForm.state,
partyFlag: this.dataForm.partyFlag,
cadreFlag: this.dataForm.cadreFlag
cadreFlag: this.dataForm.cadreFlag,
remark: this.dataForm.remark
}
this.$http[!this.dataForm.id ? 'post' : 'post']('/app-user/user/audit/', postData).then(({ data: res }) => {
if (res.code !== 0) {
@ -203,7 +217,18 @@ export default {
return this.$message.error(res.msg)
}
}).catch(() => { })
},
//
userAuthenticateHistoryListHandle (userId) {
this.authenticateHistoryVisible = true
this.$nextTick(() => {
this.$refs.authenticateHistory.dataForm.userId = userId
this.$refs.authenticateHistory.init()
})
}
},
components: {
AuthenticateHistory
}
}
</script>

Loading…
Cancel
Save