Browse Source

Merge branch 'master' of http://git.cc-lotus.info/live/patent-cms

lrf402788946 3 years ago
parent
commit
c324bc3cc0

+ 10 - 0
src/router/index.js

@@ -99,6 +99,16 @@ const web = [
         meta: { title: '首页' },
         component: () => import('../views/jg/homeIndex/index.vue'),
       },
+      {
+        path: '/jg/users/index',
+        meta: { title: '平台用户管理' },
+        component: () => import('../views/jg/user/index.vue'),
+      },
+      {
+        path: '/jg/users/detail',
+        meta: { title: '平台用户详情' },
+        component: () => import('../views/jg/user/detail.vue'),
+      },
       {
         path: '/jg/disclosure/index',
         meta: { title: '申请管理' },

+ 2 - 2
src/views/adminCenter/user/detail.vue

@@ -40,7 +40,7 @@ export default {
     orgDetail,
     expDetail,
   },
-  data: function() {
+  data: function () {
     return {
       form: {},
     };
@@ -106,7 +106,7 @@ export default {
     },
     // 返回列表
     back() {
-      this.$router.push({ path: '/user' });
+      this.$router.push({ path: '/adminCenter/users/index' });
     },
   },
   computed: {

+ 1 - 1
src/views/adminCenter/user/parts/expeUser.vue

@@ -91,7 +91,7 @@ export default {
     },
     // 修改
     toEdit({ data }) {
-      this.$router.push({ path: '/user/detail', query: { id: data.user_id, type: '6' } });
+      this.$router.push({ path: '/adminCenter/users/detail', query: { id: data.user_id, type: '6' } });
     },
     // 删除
     async toDelete({ data }) {

+ 5 - 5
src/views/adminCenter/user/parts/mechUser.vue

@@ -74,10 +74,10 @@ export default {
     return {
       active: 'first',
       opera: [
-        {
-          label: '更换管理员',
-          method: 'change',
-        },
+        // {
+        //   label: '更换管理员',
+        //   method: 'change',
+        // },
         {
           label: '审核&查看',
           method: 'edit',
@@ -146,7 +146,7 @@ export default {
     },
     // 修改
     toEdit({ data }) {
-      this.$router.push({ path: '/user/detail', query: { id: data.id, type: '5' } });
+      this.$router.push({ path: '/adminCenter/users/detail', query: { id: data.id, type: '5' } });
     },
     // 删除
     async toDelete({ data }) {

+ 2 - 2
src/views/adminCenter/user/parts/orgDetail.vue

@@ -3,7 +3,7 @@
     <el-row>
       <el-col :span="24">
         <data-form :data="form" :fields="formFields" :rules="{}" @save="toSave" labelWidth="130px">
-          <template #radios="{item}">
+          <template #radios="{ item }">
             <template v-if="item.model === 'status'">
               <el-radio label="0">待审核</el-radio>
               <el-radio label="1">审核通过</el-radio>
@@ -25,7 +25,7 @@ export default {
   components: {
     dataForm,
   },
-  data: function() {
+  data: function () {
     return {
       formFields: [
         { label: '姓名', model: 'name', options: { readonly: true } },

+ 2 - 2
src/views/adminCenter/user/parts/perDetail.vue

@@ -3,7 +3,7 @@
     <el-row>
       <el-col :span="24">
         <data-form :data="form" :fields="formFields" :rules="{}" @save="toSave">
-          <template #radios="{item}">
+          <template #radios="{ item }">
             <template v-if="item.model === 'status'">
               <el-radio label="0">待审核</el-radio>
               <el-radio label="1">审核通过</el-radio>
@@ -27,7 +27,7 @@ export default {
   components: {
     dataForm,
   },
-  data: function() {
+  data: function () {
     return {
       formFields: [
         { label: '姓名', model: 'name', options: { readonly: true } },

+ 7 - 6
src/views/adminCenter/user/parts/perUser.vue

@@ -71,10 +71,10 @@ export default {
     return {
       active: 'first',
       opera: [
-        {
-          label: '更换管理员',
-          method: 'change',
-        },
+        // {
+        //   label: '更换管理员',
+        //   method: 'change',
+        // },
         {
           label: '审核&查看',
           method: 'edit',
@@ -127,7 +127,8 @@ export default {
     // 查询列表
     async search({ skip = 0, limit = 10, ...info } = {}) {
       let user = this.user;
-      if (user.role != '0') info.code = user.code;
+      console.log(user);
+      if (user.role != '0') info.code = 'JLKJQYJD';
       let one = await this.query({ skip, limit, status: '0', ...info });
       let two = await this.query({ skip, limit, status: '1', ...info });
       let thr = await this.query({ skip, limit, status: '2', ...info });
@@ -142,7 +143,7 @@ export default {
     },
     // 修改
     toEdit({ data }) {
-      this.$router.push({ path: '/user/detail', query: { id: data.id, type: '4' } });
+      this.$router.push({ path: '/adminCenter/users/detail', query: { id: data.id, type: '4' } });
     },
     // 删除
     async toDelete({ data }) {

+ 132 - 0
src/views/jg/user/detail.vue

@@ -0,0 +1,132 @@
+<template>
+  <div id="detail">
+    <el-row>
+      <el-col :span="24" class="main">
+        <el-col :span="24" class="back">
+          <el-button type="primary" size="mini" @click="back">返回</el-button>
+        </el-col>
+        <el-col :span="24" class="info">
+          <span v-if="type == '4'">
+            <perDetail :form="form" @toSave="perSave"></perDetail>
+          </span>
+          <span v-else-if="type == '5'">
+            <orgDetail :form="form" @toSave="orgSave"></orgDetail>
+          </span>
+          <span v-else-if="type == '6'">
+            <expDetail :form="form" @toSave="expSave"></expDetail>
+          </span>
+        </el-col>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import perDetail from './parts/perDetail.vue';
+import orgDetail from './parts/orgDetail.vue';
+import expDetail from './parts/expDetail.vue';
+import { mapState, createNamespacedHelpers } from 'vuex';
+const { mapActions: personal } = createNamespacedHelpers('personal');
+const { mapActions: organization } = createNamespacedHelpers('organization');
+const { mapActions: expert } = createNamespacedHelpers('expert');
+export default {
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+  name: 'detail',
+  props: {},
+  components: {
+    perDetail,
+    orgDetail,
+    expDetail,
+  },
+  data: function () {
+    return {
+      form: {},
+    };
+  },
+  async created() {
+    await this.search();
+  },
+  methods: {
+    ...personal({ personalFetch: 'fetch', personalUpdate: 'update' }),
+    ...organization({ organizationFetch: 'fetch', organizationUpdate: 'update' }),
+    ...expert({ expertFetch: 'fetch', expertUpdate: 'update' }),
+    async search() {
+      let type = this.type;
+      if (type == '4') {
+        let res = await this.personalFetch(this.id);
+        if (this.$checkRes(res)) {
+          this.$set(this, `form`, res.data);
+        }
+      } else if (type == '5') {
+        let res = await this.organizationFetch(this.id);
+        if (this.$checkRes(res)) {
+          this.$set(this, `form`, res.data);
+        }
+      } else if (type == '6') {
+        let res = await this.expertFetch(this.id);
+        if (this.$checkRes(res)) {
+          this.$set(this, `form`, res.data);
+        }
+      }
+    },
+    // 提交审核-个人用户
+    async perSave(data) {
+      let res = await this.personalUpdate(data);
+      if (this.$checkRes(res)) {
+        this.$message({
+          message: '信息审核成功',
+          type: 'success',
+        });
+        this.back();
+      }
+    },
+    // 提交审核-机构用户
+    async orgSave(data) {
+      let res = await this.organizationUpdate(data);
+      if (this.$checkRes(res)) {
+        this.$message({
+          message: '信息审核成功',
+          type: 'success',
+        });
+        this.back();
+      }
+    },
+    // 提交审核-专家用户
+    async expSave(data) {
+      let res = await this.expertUpdate(data);
+      if (this.$checkRes(res)) {
+        this.$message({
+          message: '信息审核成功',
+          type: 'success',
+        });
+        this.back();
+      }
+    },
+    // 返回列表
+    back() {
+      this.$router.push({ path: '/jg/users/index' });
+    },
+  },
+  computed: {
+    ...mapState(['user']),
+    id() {
+      return this.$route.query.id;
+    },
+    type() {
+      return this.$route.query.type;
+    },
+  },
+  watch: {},
+};
+</script>
+
+<style lang="less" scoped>
+.main {
+  .back {
+    text-align: right;
+    margin: 0 0 15px 0s;
+  }
+}
+</style>

+ 65 - 0
src/views/jg/user/index.vue

@@ -0,0 +1,65 @@
+<template>
+  <div id="index">
+    <el-row>
+      <el-col :span="24" class="main">
+        <el-col :span="24" class="type">
+          <el-radio-group v-model="userType">
+            <el-radio label="1" border>个人用户</el-radio>
+            <el-radio label="2" border>机构用户</el-radio>
+            <el-radio label="3" border>专家用户</el-radio>
+          </el-radio-group>
+        </el-col>
+        <el-col :span="24" class="list">
+          <span v-if="userType == '1'">
+            <perUser></perUser>
+          </span>
+          <span v-else-if="userType == '2'">
+            <mechUser></mechUser>
+          </span>
+          <span v-else-if="userType == '3'">
+            <expeUser></expeUser>
+          </span>
+        </el-col>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import perUser from './parts/perUser.vue';
+import mechUser from './parts/mechUser.vue';
+import expeUser from './parts/expeUser.vue';
+import { mapState, createNamespacedHelpers } from 'vuex';
+export default {
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+  name: 'index',
+  props: {},
+  components: {
+    perUser,
+    mechUser,
+    expeUser,
+  },
+  data: function () {
+    return {
+      // 用户类别
+      userType: '1',
+    };
+  },
+  created() {},
+  methods: {},
+  computed: {
+    ...mapState(['user']),
+  },
+  watch: {},
+};
+</script>
+
+<style lang="less" scoped>
+.main {
+  .type {
+    margin: 0 0 20px 0;
+  }
+}
+</style>

+ 79 - 0
src/views/jg/user/parts/expDetail.vue

@@ -0,0 +1,79 @@
+<template>
+  <div id="expDetail">
+    <el-row>
+      <el-col :span="24">
+        <data-form :data="form" :fields="formFields" :rules="{}" @save="toSave">
+          <template #radios="{ item }">
+            <template v-if="item.model === 'status'">
+              <el-radio label="0">待审核</el-radio>
+              <el-radio label="1">审核通过</el-radio>
+              <el-radio label="2">审核拒绝</el-radio>
+            </template>
+          </template>
+          <template #custom="{ item, form }">
+            <template v-if="item.model === 'img_path'">
+              <el-image :src="form.img_path" class="img_path">
+                <div slot="error" class="image-slot">
+                  <i class="el-icon-picture-outline"></i></div
+              ></el-image>
+            </template>
+          </template>
+        </data-form>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import dataForm from '@common/src/components/frame/form.vue';
+import { mapState, createNamespacedHelpers } from 'vuex';
+export default {
+  name: 'expDetail',
+  props: { form: { type: Object } },
+  components: {
+    dataForm,
+  },
+  data: function () {
+    return {
+      formFields: [
+        { label: '姓名', model: 'name' },
+        { label: '手机号', model: 'phone' },
+        { label: '机构代码', model: 'code' },
+        { label: '头像', model: 'img_path', custom: true },
+        { label: '最高学历', model: 'education' },
+        { label: '毕业院校', model: 'school' },
+        { label: '出生日期', model: 'birthDate', type: 'date' },
+        { label: 'QQ/微信', model: 'qqwx' },
+        { label: '电子邮箱', model: 'email' },
+        { label: '工作单位', model: 'company' },
+        { label: '职务职称', model: 'zwzc' },
+        { label: '擅长领域', model: 'expertise' },
+        { label: '工作经历', model: 'workexperience', type: 'textarea' },
+        { label: '科研综述', model: 'scientific', type: 'textarea' },
+        { label: '承担项目', model: 'undertakingproject', type: 'textarea' },
+        { label: '科技奖励', model: 'scienceaward', type: 'textarea' },
+        { label: '社会任职', model: 'social', type: 'textarea' },
+        { label: '状态', model: 'status', type: 'radio' },
+      ],
+    };
+  },
+  created() {},
+  methods: {
+    toSave({ data }) {
+      this.$emit('toSave', data);
+    },
+  },
+  computed: {
+    ...mapState(['user']),
+  },
+  watch: {},
+};
+</script>
+
+<style lang="less" scoped>
+.img_path {
+  width: 150px;
+  height: 150px;
+  border: 1px solid#ccc;
+}
+</style>

+ 115 - 0
src/views/jg/user/parts/expeUser.vue

@@ -0,0 +1,115 @@
+<template>
+  <div id="expeUser">
+    <el-row>
+      <el-col :span="24">
+        <el-tabs v-model="active" type="card">
+          <el-tab-pane label="待审核" name="first">
+            <data-table :fields="fields" :opera="opera" :data="oneList" :total="oneTotal" @query="search" @edit="toEdit" @delete="toDelete"></data-table>
+          </el-tab-pane>
+          <el-tab-pane label="审核通过" name="second">
+            <data-table :fields="fields" :opera="opera" :data="twoList" :total="twoTotal" @query="search" @edit="toEdit" @delete="toDelete"></data-table>
+          </el-tab-pane>
+          <el-tab-pane label="审核失败" name="third">
+            <data-table :fields="fields" :opera="opera" :data="thrList" :total="thrTotal" @query="search" @edit="toEdit" @delete="toDelete"></data-table>
+          </el-tab-pane>
+        </el-tabs>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import dataTable from '@common/src/components/frame/filter-page-table.vue';
+import { mapState, createNamespacedHelpers } from 'vuex';
+const { mapActions: expert } = createNamespacedHelpers('expert');
+export default {
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+  name: 'expeUser',
+  props: {},
+  components: {
+    dataTable,
+  },
+  data: function () {
+    return {
+      active: 'first',
+      opera: [
+        {
+          label: '审核&查看',
+          method: 'edit',
+        },
+        {
+          label: '删除',
+          method: 'delete',
+        },
+      ],
+      fields: [
+        { label: '机构代码或邀请码', prop: 'code' },
+        { label: '用户名', prop: 'name' },
+        { label: '用户ID', prop: 'phone' },
+        { label: '电子邮箱', prop: 'email' },
+        {
+          label: '状态',
+          prop: 'status',
+          format: (item) => {
+            return item === '0' ? '审核中' : item === '1' ? '审核通过' : '审核拒绝';
+          },
+        },
+      ],
+      // 待审核
+      oneList: [],
+      oneTotal: 0,
+      // 审核通过
+      twoList: [],
+      twoTotal: 0,
+      // 审核失败
+      thrList: [],
+      thrTotal: 0,
+    };
+  },
+  async created() {
+    await this.search();
+  },
+  methods: {
+    ...expert(['query', 'delete']),
+    // 查询列表
+    async search({ skip = 0, limit = 10, ...info } = {}) {
+      let user = this.user;
+      if (user.role != '0') info.code = user.code;
+      let one = await this.query({ skip, limit, status: '0', ...info });
+      let two = await this.query({ skip, limit, status: '1', ...info });
+      let thr = await this.query({ skip, limit, status: '2', ...info });
+      if (this.$checkRes(one) || this.$checkRes(two) || this.$checkRes(thr)) {
+        this.$set(this, `oneList`, one.data);
+        this.$set(this, `oneTotal`, one.total);
+        this.$set(this, `twoList`, two.data);
+        this.$set(this, `twoTotal`, two.total);
+        this.$set(this, `thrList`, thr.data);
+        this.$set(this, `thrTotal`, thr.total);
+      }
+    },
+    // 修改
+    toEdit({ data }) {
+      this.$router.push({ path: '/jg/users/detail', query: { id: data.user_id, type: '6' } });
+    },
+    // 删除
+    async toDelete({ data }) {
+      let res = await this.delete(data.id);
+      if (this.$checkRes(res)) {
+        this.$message({
+          message: '信息修改成功',
+          type: 'success',
+        });
+        this.search();
+      }
+    },
+  },
+  computed: {
+    ...mapState(['user']),
+  },
+  watch: {},
+};
+</script>
+
+<style lang="less" scoped></style>

+ 198 - 0
src/views/jg/user/parts/mechUser.vue

@@ -0,0 +1,198 @@
+<template>
+  <div id="mechUser">
+    <el-row>
+      <el-col :span="24">
+        <el-tabs v-model="active" type="card">
+          <el-tab-pane label="待审核" name="first">
+            <data-table
+              :fields="fields"
+              :opera="opera"
+              :data="oneList"
+              :total="oneTotal"
+              @query="search"
+              @change="toChange"
+              @edit="toEdit"
+              @delete="toDelete"
+            ></data-table>
+          </el-tab-pane>
+          <el-tab-pane label="审核通过" name="second">
+            <data-table
+              :fields="fields"
+              :opera="opera"
+              :data="twoList"
+              :total="twoTotal"
+              @query="search"
+              @change="toChange"
+              @edit="toEdit"
+              @delete="toDelete"
+            ></data-table>
+          </el-tab-pane>
+          <el-tab-pane label="审核失败" name="third">
+            <data-table
+              :fields="fields"
+              :opera="opera"
+              :data="thrList"
+              :total="thrTotal"
+              @query="search"
+              @change="toChange"
+              @edit="toEdit"
+              @delete="toDelete"
+            ></data-table>
+          </el-tab-pane>
+        </el-tabs>
+      </el-col>
+    </el-row>
+    <el-dialog title="更换管理员" width="40%" :visible.sync="dialog" @closed="handleClose" :destroy-on-close="true">
+      <data-form :data="form" :fields="formfields" :rules="{}" @save="toSave">
+        <template #options="{ item }">
+          <template v-if="item.model === 'code'">
+            <el-option v-for="(i, index) in codeList" :key="index" :label="i.user_name" :value="i.code"></el-option>
+          </template>
+        </template>
+      </data-form>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import dataTable from '@common/src/components/frame/filter-page-table.vue';
+import dataForm from '@common/src/components/frame/form.vue';
+import { mapState, createNamespacedHelpers } from 'vuex';
+const { mapActions: organization } = createNamespacedHelpers('organization');
+const { mapActions: inviteCode } = createNamespacedHelpers('inviteCode');
+export default {
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+  name: 'mechUser',
+  props: {},
+  components: {
+    dataTable,
+    dataForm,
+  },
+  data: function () {
+    return {
+      active: 'first',
+      opera: [
+        // {
+        //   label: '更换管理员',
+        //   method: 'change',
+        // },
+        {
+          label: '审核&查看',
+          method: 'edit',
+        },
+        {
+          label: '删除',
+          method: 'delete',
+        },
+      ],
+      fields: [
+        { label: '机构代码或邀请码', prop: 'code' },
+        { label: '用户名', prop: 'name' },
+        { label: '用户ID', prop: 'phone' },
+        { label: '社会统一信用代码', prop: 'institution_code' },
+        { label: '电子邮箱', prop: 'email' },
+        { label: '所属辖区', prop: 'juris' },
+        {
+          label: '状态',
+          prop: 'status',
+          format: (item) => {
+            return item === '0' ? '审核中' : item === '1' ? '审核通过' : '审核拒绝';
+          },
+        },
+      ],
+      // 待审核
+      oneList: [],
+      oneTotal: 0,
+      // 审核通过
+      twoList: [],
+      twoTotal: 0,
+      // 审核失败
+      thrList: [],
+      thrTotal: 0,
+      // 更换管理员
+      dialog: false,
+      codeList: [],
+      formfields: [
+        { label: '姓名', model: 'name', options: { readonly: true } },
+        { label: '所属机构', model: 'code', type: 'select' },
+      ],
+      form: {},
+    };
+  },
+  async created() {
+    await this.searchOther();
+    await this.search();
+  },
+  methods: {
+    ...inviteCode({ codeQuery: 'query' }),
+    ...organization(['query', 'delete', 'update']),
+    // 查询列表
+    async search({ skip = 0, limit = 10, ...info } = {}) {
+      let user = this.user;
+      if (user.role != '0') info.code = user.code;
+      let one = await this.query({ skip, limit, status: '0', ...info });
+      let two = await this.query({ skip, limit, status: '1', ...info });
+      let thr = await this.query({ skip, limit, status: '2', ...info });
+      if (this.$checkRes(one) || this.$checkRes(two) || this.$checkRes(thr)) {
+        this.$set(this, `oneList`, one.data);
+        this.$set(this, `oneTotal`, one.total);
+        this.$set(this, `twoList`, two.data);
+        this.$set(this, `twoTotal`, two.total);
+        this.$set(this, `thrList`, thr.data);
+        this.$set(this, `thrTotal`, thr.total);
+      }
+    },
+    // 修改
+    toEdit({ data }) {
+      this.$router.push({ path: '/jg/users/detail', query: { id: data.id, type: '5' } });
+    },
+    // 删除
+    async toDelete({ data }) {
+      let res = await this.delete(data.id);
+      if (this.$checkRes(res)) {
+        this.$message({
+          message: '信息修改成功',
+          type: 'success',
+        });
+        this.search();
+      }
+    },
+    // 更换管理员
+    toChange({ data }) {
+      this.$set(this, `form`, data);
+      this.dialog = true;
+    },
+    async toSave({ data }) {
+      let res = await this.update(data);
+      if (this.$checkRes(res)) {
+        this.$message({
+          message: '更换管理员成功',
+          type: 'success',
+        });
+        this.handleClose();
+      }
+    },
+    // 取消更换
+    handleClose() {
+      this.form = {};
+      this.dialog = false;
+      this.search();
+    },
+    // 查询机构代码
+    async searchOther() {
+      let res = await this.codeQuery();
+      if (this.$checkRes(res)) {
+        this.$set(this, `codeList`, res.data);
+      }
+    },
+  },
+  computed: {
+    ...mapState(['user']),
+  },
+  watch: {},
+};
+</script>
+
+<style lang="less" scoped></style>

+ 69 - 0
src/views/jg/user/parts/orgDetail.vue

@@ -0,0 +1,69 @@
+<template>
+  <div id="orgDetail">
+    <el-row>
+      <el-col :span="24">
+        <data-form :data="form" :fields="formFields" :rules="{}" @save="toSave" labelWidth="130px">
+          <template #radios="{ item }">
+            <template v-if="item.model === 'status'">
+              <el-radio label="0">待审核</el-radio>
+              <el-radio label="1">审核通过</el-radio>
+              <el-radio label="2">审核拒绝</el-radio>
+            </template>
+          </template>
+        </data-form>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import dataForm from '@common/src/components/frame/form.vue';
+import { mapState, createNamespacedHelpers } from 'vuex';
+export default {
+  name: 'orgDetail',
+  props: { form: { type: Object } },
+  components: {
+    dataForm,
+  },
+  data: function () {
+    return {
+      formFields: [
+        { label: '姓名', model: 'name', options: { readonly: true } },
+        { label: '手机号', model: 'phone', options: { readonly: true } },
+        { label: '机构代码', model: 'code', options: { readonly: true } },
+        { label: '电子邮箱', model: 'email', options: { readonly: true } },
+        { label: '联系地址', model: 'addr', options: { readonly: true } },
+        { label: '办公电话', model: 'office_phone', options: { readonly: true } },
+        { label: '所属行业', model: 'profession', options: { readonly: true } },
+        { label: '所属辖区', model: 'juris', options: { readonly: true } },
+        { label: '机构代码', model: 'institution_code', options: { readonly: true } },
+        { label: '统一社会信用代码', model: 'code', options: { readonly: true } },
+        { label: '注册类型', model: 'companytype', options: { readonly: true } },
+        { label: '注册时间', model: 'companydate', options: { readonly: true } },
+        { label: '注册资金', model: 'companycapital', options: { readonly: true } },
+        { label: '企业法人', model: 'companyperson', options: { readonly: true } },
+        { label: '上年度企业总收入', model: 'sndqyzsr', options: { readonly: true } },
+        { label: '上年度研发费用', model: 'sndyffy', options: { readonly: true } },
+        { label: '企业总人数', model: 'companytotal', options: { readonly: true } },
+        { label: '专&兼职研发人数', model: 'zjzyfrs', options: { readonly: true } },
+        { label: '企业简介', model: 'companybrief', type: 'textarea', options: { readonly: true } },
+        { label: '主要产品', model: 'mainproduct', type: 'textarea', options: { readonly: true } },
+        { label: '企业资质&荣誉', model: 'qualifications', type: 'textarea', options: { readonly: true } },
+        { label: '状态', model: 'status', type: 'radio' },
+      ],
+    };
+  },
+  created() {},
+  methods: {
+    toSave({ data }) {
+      this.$emit('toSave', data);
+    },
+  },
+  computed: {
+    ...mapState(['user']),
+  },
+  watch: {},
+};
+</script>
+
+<style lang="less" scoped></style>

+ 58 - 0
src/views/jg/user/parts/perDetail.vue

@@ -0,0 +1,58 @@
+<template>
+  <div id="perDetail">
+    <el-row>
+      <el-col :span="24">
+        <data-form :data="form" :fields="formFields" :rules="{}" @save="toSave">
+          <template #radios="{ item }">
+            <template v-if="item.model === 'status'">
+              <el-radio label="0">待审核</el-radio>
+              <el-radio label="1">审核通过</el-radio>
+              <el-radio label="2">审核拒绝</el-radio>
+            </template>
+          </template>
+        </data-form>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import dataForm from '@common/src/components/frame/form.vue';
+import { mapState, createNamespacedHelpers } from 'vuex';
+export default {
+  name: 'perDetail',
+  props: {
+    form: { type: Object },
+  },
+  components: {
+    dataForm,
+  },
+  data: function () {
+    return {
+      formFields: [
+        { label: '姓名', model: 'name', options: { readonly: true } },
+        { label: '手机号', model: 'phone', options: { readonly: true } },
+        { label: '机构代码', model: 'code', options: { readonly: true } },
+        { label: '电子邮箱', model: 'email', options: { readonly: true } },
+        { label: '地址', model: 'addr', options: { readonly: true } },
+        { label: '办公电话', model: 'office_phone', options: { readonly: true } },
+        { label: '所属行业', model: 'profession', options: { readonly: true } },
+        { label: '所属辖区', model: 'juris', options: { readonly: true } },
+        { label: '状态', model: 'status', type: 'radio' },
+      ],
+    };
+  },
+  created() {},
+  methods: {
+    toSave({ data }) {
+      this.$emit('toSave', data);
+    },
+  },
+  computed: {
+    ...mapState(['user']),
+  },
+  watch: {},
+};
+</script>
+
+<style lang="less" scoped></style>

+ 194 - 0
src/views/jg/user/parts/perUser.vue

@@ -0,0 +1,194 @@
+<template>
+  <div id="perUser">
+    <el-row>
+      <el-col :span="24">
+        <el-tabs v-model="active" type="card">
+          <el-tab-pane label="待审核" name="first">
+            <data-table
+              :fields="fields"
+              :opera="opera"
+              :data="oneList"
+              :total="oneTotal"
+              @query="search"
+              @change="toChange"
+              @edit="toEdit"
+              @delete="toDelete"
+            ></data-table>
+          </el-tab-pane>
+          <el-tab-pane label="审核通过" name="second">
+            <data-table
+              :fields="fields"
+              :opera="opera"
+              :data="twoList"
+              :total="twoTotal"
+              @query="search"
+              @change="toChange"
+              @edit="toEdit"
+              @delete="toDelete"
+            ></data-table>
+          </el-tab-pane>
+          <el-tab-pane label="审核失败" name="third">
+            <data-table
+              :fields="fields"
+              :opera="opera"
+              :data="thrList"
+              :total="thrTotal"
+              @query="search"
+              @change="toChange"
+              @edit="toEdit"
+              @delete="toDelete"
+            ></data-table>
+          </el-tab-pane>
+        </el-tabs>
+      </el-col>
+    </el-row>
+    <el-dialog title="更换管理员" width="40%" :visible.sync="dialog" @closed="handleClose" :destroy-on-close="true">
+      <data-form :data="form" :fields="formfields" :rules="{}" @save="toSave">
+        <template #options="{ item }">
+          <template v-if="item.model === 'code'">
+            <el-option v-for="(i, index) in codeList" :key="index" :label="i.user_name" :value="i.code"></el-option>
+          </template>
+        </template>
+      </data-form>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import dataTable from '@common/src/components/frame/filter-page-table.vue';
+import dataForm from '@common/src/components/frame/form.vue';
+import { mapState, createNamespacedHelpers } from 'vuex';
+const { mapActions: personal } = createNamespacedHelpers('personal');
+const { mapActions: inviteCode } = createNamespacedHelpers('inviteCode');
+export default {
+  name: 'perUser',
+  props: {},
+  components: {
+    dataTable,
+    dataForm,
+  },
+  data: function () {
+    return {
+      active: 'first',
+      opera: [
+        // {
+        //   label: '更换管理员',
+        //   method: 'change',
+        // },
+        {
+          label: '审核&查看',
+          method: 'edit',
+        },
+        {
+          label: '删除',
+          method: 'delete',
+        },
+      ],
+      fields: [
+        { label: '机构代码或邀请码', prop: 'code' },
+        { label: '用户名', prop: 'name' },
+        { label: '用户ID', prop: 'phone' },
+        { label: '电子邮箱', prop: 'email' },
+        { label: '所属辖区', prop: 'juris' },
+        {
+          label: '状态',
+          prop: 'status',
+          format: (item) => {
+            return item === '0' ? '审核中' : item === '1' ? '审核通过' : '审核拒绝';
+          },
+        },
+      ],
+      // 待审核
+      oneList: [],
+      oneTotal: 0,
+      // 审核通过
+      twoList: [],
+      twoTotal: 0,
+      // 审核失败
+      thrList: [],
+      thrTotal: 0,
+      // 更换管理员
+      dialog: false,
+      codeList: [],
+      formfields: [
+        { label: '姓名', model: 'name', options: { readonly: true } },
+        { label: '所属机构', model: 'code', type: 'select' },
+      ],
+      form: {},
+    };
+  },
+  async created() {
+    await this.searchOther();
+    await this.search();
+  },
+  methods: {
+    ...inviteCode({ codeQuery: 'query' }),
+    ...personal(['query', 'delete', 'update']),
+    // 查询列表
+    async search({ skip = 0, limit = 10, ...info } = {}) {
+      let user = this.user;
+      if (user.role != '0') info.code = user.code;
+      let one = await this.query({ skip, limit, status: '0', ...info });
+      let two = await this.query({ skip, limit, status: '1', ...info });
+      let thr = await this.query({ skip, limit, status: '2', ...info });
+      if (this.$checkRes(one) || this.$checkRes(two) || this.$checkRes(thr)) {
+        this.$set(this, `oneList`, one.data);
+        this.$set(this, `oneTotal`, one.total);
+        this.$set(this, `twoList`, two.data);
+        this.$set(this, `twoTotal`, two.total);
+        this.$set(this, `thrList`, thr.data);
+        this.$set(this, `thrTotal`, thr.total);
+      }
+    },
+    // 修改
+    toEdit({ data }) {
+      this.$router.push({ path: '/jg/users/detail', query: { id: data.id, type: '4' } });
+    },
+    // 删除
+    async toDelete({ data }) {
+      let res = await this.delete(data.id);
+      if (this.$checkRes(res)) {
+        this.$message({
+          message: '信息修改成功',
+          type: 'success',
+        });
+        this.search();
+      }
+    },
+    // 更换管理员
+    toChange({ data }) {
+      this.$set(this, `form`, data);
+      this.dialog = true;
+    },
+    async toSave({ data }) {
+      let res = await this.update(data);
+      if (this.$checkRes(res)) {
+        this.$message({
+          message: '更换管理员成功',
+          type: 'success',
+        });
+        this.handleClose();
+      }
+    },
+    // 取消更换
+    handleClose() {
+      this.form = {};
+      this.dialog = false;
+      this.search();
+    },
+    // 查询机构代码
+    async searchOther() {
+      let res = await this.codeQuery();
+      if (this.$checkRes(res)) {
+        this.$set(this, `codeList`, res.data);
+      }
+    },
+  },
+  computed: {
+    ...mapState(['user']),
+  },
+  watch: {},
+};
+</script>
+
+<style lang="less" scoped></style>