liujq 2 years ago
parent
commit
d6159a0091

File diff suppressed because it is too large
+ 0 - 0
dist/index.html


+ 0 - 0
dist/static/css/chunk-4d39caf6.34b463d5.css → dist/static/css/chunk-0e84a580.34b463d5.css


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/app.2a3f594c.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/app.947e095c.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/chunk-07fc91a6.ef9d8a3a.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/chunk-0e84a580.ac5d948c.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/chunk-37b583ca.2b11e3e4.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/chunk-4d39caf6.7f527874.js


+ 6 - 0
src/api/user.js

@@ -19,4 +19,10 @@ export default {
   admuserdel: params => { // 用户删除
     return getRequestNoSort('/adm/user/del', params, 'loading')
   },
+  admuserauthlist: params => { // 认证列表
+    return getRequestNoSort('/adm/user/auth/list', params, 'loading')
+  },
+  admuserauthedit: params => { // 认证审核
+    return getRequestNoSort('/adm/user/auth/edit', params, 'loading')
+  },
 }

+ 109 - 0
src/views/user/auth.vue

@@ -0,0 +1,109 @@
+<template>
+  <div class="app-container">
+    <search-form
+      :list-loading="listLoading"
+      @change="searchHandle"
+    />
+    <table-list
+      :list-loading="listLoading"
+      :data="tableData2"
+      :columns="listConfig"
+      :current-page="currentPage"
+      :page-size="pageSize"
+      :total-records="totalRecords"
+      @currentChange="pageHandle"
+      @sizeChange="sizeChange"
+      :isAdd="true"
+      @add="openPopup"
+    />
+    <popup-edit
+      :isShow="isDtlShow"
+      :curObj="curObj"
+      @close="closePopup"
+    />
+  </div>
+</template>
+<script>
+import { arrToObj } from '@/utils'
+import SearchForm from './components/searchForm/Index'
+import PopupEdit from './components/popup/AuthEdit'
+import baseTable from '_m/baseTable.js'
+export default {
+  name: 'index',
+  components: {
+    SearchForm,
+    PopupEdit,
+  },
+  provide() {
+    return {
+      parentData: this
+    }
+  },
+  mixins: [baseTable],
+  data() {
+    return {
+      apiStr: 'user.admuserauthlist',
+      searchForm: null,
+      isDtlShow: false,
+      curObj: {},
+    }
+  },
+  computed: {
+    tableData2() {
+      const arr = [...this.tableData]
+      arr.map(item => {
+        if (item.auth_state === '1') item.authstateIs1 = true
+      })
+      return arr
+    }
+  },
+  created() {},
+  mounted() {
+    this.listConfig = {
+      rows: [
+        { label: '昵称', prop: 'nickname' },
+        { label: '手机号', prop: 'phone' },
+        { label: '身份认证', prop: 'auth_state', type: 'tag', tags: arrToObj(this.$dictData.auth_state), tagTypeObj: {'1': 'success', '2': 'warning', '3': 'danger', '4': 'info'}  }, 
+        { label: '绑定微信', prop: 'bind_wechat', type: 'tag', tags: arrToObj(this.$dictData.sys_yesno), tagTypeObj: {'1': 'success', '2': 'danger'} },
+        { label: '身份证号', prop: 'id_number', fullShow: true, minWidth: 90 },
+        { label: 'ID正面', prop: 'id_card_front', type: 'img' },
+        { label: 'ID反面', prop: 'id_card_revers', type: 'img' },
+        { label: '银行卡号', prop: 'bank_number' },
+        { label: '银行卡正面', prop: 'bank_card', type: 'img' },
+        { label: '更新时间', prop: 'update_at' },
+        { label: '操作', width: 70, type: 'handle2', operations:
+          [
+            { label: '审核', func: this.openPopup, btnType: 'primary', hide: 'authstateIs1' },
+          ]
+        }
+      ]
+    }
+  },
+  methods: {
+    openPopup(row) {
+      if (row && row.id) {
+        this.curObj = row
+      } else {
+        this.curObj = {}
+      }
+      this.isDtlShow = true
+    },
+    closePopup(obj) {
+      if (obj) {
+        const params = obj
+        let apiStr = 'admuserauthedit'
+        if (obj.id) apiStr = 'admuserauthedit'
+        this.$api.user[apiStr]({
+          ...params
+        }).then(data => {
+          this.$msgs(obj.id ? '修改成功' : '修改成功')
+          this.fetchData()
+          this.isDtlShow = false
+        })
+      } else {
+        this.isDtlShow = false
+      }
+    }
+  }
+}
+</script>

+ 74 - 0
src/views/user/components/popup/AuthEdit.vue

@@ -0,0 +1,74 @@
+<template>
+  <div>
+    <el-dialog
+      v-loading="loading"
+      :show-close="false"
+      :close-on-click-modal="false"
+      :visible.sync="isShow"
+      title="用户审核"
+      :fullscreen="false"
+      width="360px"
+      custom-class="xl-dialog"
+      center
+    >
+      <base-form ref="ruleForm" :data="formData" :is-inline="false" label-width="60px">
+        <div slot="footer">
+          <el-button class="xl-form-btn t2" @click="close">关 闭</el-button>
+          <el-button class="xl-form-btn t1" @click="close('confirm')">确定</el-button>
+        </div>
+      </base-form>
+    </el-dialog>
+  </div>
+</template>
+<script>
+export default {
+  components: {},
+  mixins: [...mixins],
+  props: {
+    isShow: Boolean,
+    curObj: Object
+  },
+  inject: ['parentData'],
+  data() {
+    return {
+      formData: [],
+      loading: true,
+      cObj: {},
+      isShowMap: false
+    }
+  },
+  watch: {
+    isShow: function(val) {
+      if (val) {
+        this.getDef()
+      }
+    },
+  },
+  methods: {
+    getDef() {
+      this.formData = [
+        { label: '处理', key: 'auth_state', type: 'select', class: 'c-2', options: [{val: '1', key: '通过'}, {val: '3', key: '拒绝'}] },
+      ]
+    },
+    close(str) {
+      if (str === 'confirm') {
+        this.$refs['ruleForm'].$refs['baseForm'].validate((valid) => {
+          if (valid) {
+            const oldform = this.$refs.ruleForm.baseForm
+            let newForm = { ...oldform }
+            if (this.curObj.id) {
+              newForm.id = this.curObj.id
+            }
+            this.$emit('close', newForm)
+          }
+        })
+      } else {
+        this.$emit('close')
+        this.setDefaultValue()
+      }
+    },
+  }
+}
+</script>
+<style lang="scss" scoped>
+</style>

+ 5 - 4
src/views/user/components/popup/IndexEdit.vue

@@ -48,6 +48,7 @@ export default {
     getDef() {
       const params = { ...this.curObj }
       const disabled = false
+      if (!params.is_backend) params.is_backend = '2'
       let remoteOptionsRoles = []
       if (params.role_arr && params.role_arr.length > 0) {
         params.rolesIds = params.role_arr.map(item => {
@@ -59,14 +60,14 @@ export default {
       }
       if (this.curObj.id) {
         this.formData = [
-          { label: '超级管理员', key: 'is_admin', type: 'select', class: 'c-2', options: this.$dictData.sys_yesno, },
+          // { label: '超级管理员', key: 'is_admin', type: 'select', class: 'c-2', options: this.$dictData.sys_yesno, },
           { label: '手机号', key: 'phone', rules: 1 },
           { label: '昵称', key: 'nickname', rules: 1 },
+          { label: '后台登录', rules: 1, key: 'is_backend', type: 'select', class: 'c-2', options: this.$dictData.sys_yesno, },
           { label: '系统角色', key: 'rolesIds', type: 'selectRemote', multiple: true,
             remoteParams: { skey: 'name', api: `base.admroleslist`, opKey: 'name', opVal: 'id' },
             remoteOptions: remoteOptionsRoles
           },
-          { label: '后台登录', key: 'is_backend', type: 'select', class: 'c-2', options: this.$dictData.sys_yesno, },
           { label: '楼盘角色', key: 'manage_type', type: 'select', class: 'c-2', options: this.$dictData.manage_type, },
           { label: '关联楼盘', key: 'estate_id', type: 'selectRemote',
             remoteParams: { skey: 'estate_name', api: `house.admestatelist`, opKey: 'estate_name', opVal: 'id' },
@@ -75,15 +76,15 @@ export default {
         ]
       } else {
         this.formData = [
-          { label: '超级管理员', key: 'is_admin', type: 'select', class: 'c-2', options: this.$dictData.sys_yesno, },
+          // { label: '超级管理员', key: 'is_admin', type: 'select', class: 'c-2', options: this.$dictData.sys_yesno, },
           { label: '手机号', key: 'phone', rules: 1 },
           { label: '昵称', key: 'nickname', rules: 1 },
           { label: '密码', key: 'password', rules: 1 },
+          { label: '后台登录', rules: 1, key: 'is_backend', type: 'select', class: 'c-2', options: this.$dictData.sys_yesno, },
           { label: '系统角色', key: 'rolesIds', type: 'selectRemote', multiple: true,
             remoteParams: { skey: 'name', api: `base.admroleslist`, opKey: 'name', opVal: 'id' },
             remoteOptions: remoteOptionsRoles
           },
-          { label: '后台登录', key: 'is_backend', type: 'select', class: 'c-2', options: this.$dictData.sys_yesno, },
           { label: '楼盘角色', key: 'manage_type', type: 'select', class: 'c-2', options: this.$dictData.manage_type, },
           { label: '关联楼盘', key: 'estate_id', type: 'selectRemote',
             remoteParams: { skey: 'estate_name', api: `house.admestatelist`, opKey: 'estate_name', opVal: 'id' },

+ 7 - 5
src/views/user/index.vue

@@ -28,7 +28,6 @@ import { arrToObj } from '@/utils'
 import SearchForm from './components/searchForm/Index'
 import PopupEdit from './components/popup/IndexEdit'
 import baseTable from '_m/baseTable.js'
-import xData from './mixin'
 export default {
   name: 'index',
   components: {
@@ -47,13 +46,13 @@ export default {
       searchForm: null,
       isDtlShow: false,
       curObj: {},
-      ...xData
     }
   },
   computed: {
     tableData2() {
       const arr = [...this.tableData]
       arr.map(item => {
+        if (!item.role_name) item.role_name = '普通'
       })
       return arr
     }
@@ -62,16 +61,19 @@ export default {
   mounted() {
     this.listConfig = {
       rows: [
-        { label: '系统', prop: 'is_admin', type: 'tag', tags: arrToObj(this.$dictData.sys_yesno), tagTypeObj: {'1': 'success', '2': 'danger'} },
         { label: '昵称', prop: 'nickname' },
         { label: '手机号', prop: 'phone' },
         { label: '角色', prop: 'role_name' },
+        { label: '身份认证', prop: 'auth_state', type: 'tag', tags: arrToObj(this.$dictData.auth_state), tagTypeObj: {'1': 'success', '2': 'warning', '3': 'danger', '4': 'info'}  }, 
         { label: '后台登录', prop: 'is_backend', type: 'tag', tags: arrToObj(this.$dictData.sys_yesno), tagTypeObj: {'1': 'success', '2': 'danger'} },
-        { label: '类型', prop: 'user_type', type: 'tag', tags: arrToObj(this.$dictData.user_type), tagTypeObj: {'wx': 'success', 'sys': 'primary'} },
+        { label: '绑定微信', prop: 'bind_wechat', type: 'tag', tags: arrToObj(this.$dictData.sys_yesno), tagTypeObj: {'1': 'success', '2': 'danger'} },
+        { label: '类型', prop: 'user_type', type: 'flag', flags: arrToObj(this.$dictData.user_type)},
         { label: '楼盘角色', prop: 'manage_type', type: 'flag', flags: arrToObj(this.$dictData.manage_type) }, 
         { label: '关联楼盘', prop: 'estate_name' }, 
         { label: '更新时间', prop: 'update_at' },
-        { label: '操作', width: 200, type: 'handle2', operations:
+        // { label: '系统', prop: 'is_admin', type: 'tag', tags: arrToObj(this.$dictData.sys_yesno), tagTypeObj: {'1': 'success', '2': 'danger'} },
+        { label: '系统', prop: 'is_admin' },
+        { label: '操作', width: 120, type: 'handle2', operations:
           [
             { label: '编辑', func: this.openPopup, btnType: 'primary' },
             { label: '删除', func: this.delHandle, btnType: 'danger' },

Some files were not shown because too many files changed in this diff