Jelajahi Sumber

基本信息

wuhongyu 5 tahun lalu
induk
melakukan
4f5c0bc55f

+ 10 - 5
src/components/enterprise/enterprisejb.vue

@@ -25,7 +25,7 @@
             </el-col>
           </el-col>
           <el-col :span="19" class="right">
-            基本信息
+            <jibencontext v-on="$listeners" :liebiaoList="liebiaoList" :userinfo="userinfo"></jibencontext>
           </el-col>
         </div>
       </el-col>
@@ -45,11 +45,14 @@ import menuInfo from '@/layout/index/menuInfo.vue';
 import foot from '@/layout/index/foot.vue';
 import examine from '@/layout/personCenter/question.vue';
 import mainMenu from '@/layout/enterprise/mainMenu.vue';
+import jibencontext from '@/layout/enterprise/jibencontext.vue';
+
 export default {
   name: 'adviserList',
   props: {
     info: null, //站点信息
     liebiaoList: null, //分类导航
+    userinfo: null, //基本信息
   },
   components: {
     top, //头部
@@ -58,6 +61,7 @@ export default {
     foot, //底部
     examine, //网上调查
     mainMenu, //分类导航
+    jibencontext, //基本信息
   },
   data: () => ({}),
   created() {},
@@ -85,12 +89,12 @@ export default {
   overflow: hidden;
 }
 .main {
-  height: 740px;
-  overflow: hidden;
+  min-height: 740px;
+
   margin: 10px 0;
 }
 .left {
-  height: 740px;
+  min-height: 740px;
   margin: 0 10px 0 0;
 }
 .leftDiao {
@@ -105,8 +109,9 @@ export default {
   margin: 0 0 10px 0;
 }
 .right {
+  float: left;
   width: 940px;
-  height: 740px;
+  min-height: 900px;
   background: #fff;
   overflow: hidden;
 }

+ 121 - 0
src/layout/enterprise/jibencontext.vue

@@ -0,0 +1,121 @@
+<template>
+  <div id="rightcont">
+    <el-col class="zhengce">
+      <el-col :span="24" class="topTitle">
+        基本信息
+      </el-col>
+      <el-col :span="24" class="info">
+        <el-col :span="24">
+          <p>用户名:{{ userinfo.name }}</p>
+        </el-col>
+        <el-col :span="24">
+          <p>身份证号:{{ userinfo.cardnumber }}</p>
+        </el-col>
+        <el-col :span="24">
+          <p>手机号:{{ userinfo.phone }}</p>
+        </el-col>
+        <el-col :span="24">
+          <p>邮箱:{{ userinfo.email }}</p>
+        </el-col>
+        <el-col :span="24">
+          <p>身份证号:{{ userinfo.cardnumber }}</p>
+        </el-col>
+        <el-col :span="24">
+          <p>地址:{{ userinfo.addr }}</p>
+        </el-col>
+        <el-col :span="24">
+          <p><span>头像图片:</span> <el-image style="width:100px;height:100px" :src="userinfo.img_path"></el-image></p>
+        </el-col>
+        <el-col :span="24">
+          <p>
+            类别:{{
+              userinfo.role === '1' ? '管理员' : userinfo.role === '2' ? '个人' : userinfo.role === '3' ? '企业' : userinfo.role === '4' ? '子管理员' : ''
+            }}
+          </p>
+        </el-col>
+        <el-col :span="24">
+          <p>地址:{{ userinfo.addr }}</p>
+        </el-col>
+        <el-col :span="24">
+          <p><span>身份证正面:</span> <el-image style="width:100px;height:100px" :src="userinfo.cardfile_a"></el-image></p>
+        </el-col>
+        <el-col :span="24">
+          <p><span>身份证背面: </span><el-image style="width:100px;height:100px" :src="userinfo.cardfile_b"></el-image></p>
+        </el-col>
+        <el-col :span="24" v-if="this.user.role == '3'">
+          <p><span>组织机构图片:</span> <el-image style="width:100px;height:100px" :src="userinfo.img_qy"></el-image></p>
+        </el-col>
+        <el-col :span="24">
+          <p>专业领域:{{ userinfo.major }}</p>
+        </el-col>
+        <el-col :span="24" v-if="this.user.role == '3'">
+          <p>机构类型:{{ userinfo.institution_type }}</p>
+
+          <p>机构名称:{{ userinfo.institution_name }}</p>
+          <p>机构代码:{{ userinfo.institution_code }}</p>
+          <p>机构性质:{{ userinfo.institution_nature }}</p>
+        </el-col>
+        <el-col :span="24">
+          <p>所属行业:{{ userinfo.profession }}</p>
+        </el-col>
+        <el-col :span="24">
+          <p>办公电话:{{ userinfo.office_phone }}</p>
+        </el-col>
+        <el-col :span="24">
+          <p>简介:{{ userinfo.resume }}</p>
+        </el-col>
+      </el-col>
+    </el-col>
+  </div>
+</template>
+
+<script>
+import { mapState, createNamespacedHelpers } from 'vuex';
+
+export default {
+  name: 'rightcont',
+  props: {
+    userinfo: null,
+  },
+  components: {},
+  data: () => ({}),
+  created() {},
+  computed: {
+    ...mapState(['user']),
+  },
+  methods: {},
+};
+</script>
+
+<style lang="less" scoped>
+p {
+  padding: 0;
+  margin: 0;
+}
+.zhengce {
+  padding: 20px;
+}
+.zhengce .topTitle {
+  font-size: 22px;
+  color: #22529a;
+  margin: 0 0 20px 0;
+}
+.zhengce .info {
+  float: left;
+  width: 100%;
+}
+.zhengce .info p {
+  float: left;
+  width: 100%;
+  padding: 10px 0;
+}
+.zhengce .info p span {
+  float: left;
+  margin: 0 10px 0 0;
+}
+.zhengce .info p image {
+  float: left;
+  width: 100px;
+  height: 100px;
+}
+</style>

+ 16 - 3
src/views/enterprise/enterprisejb.vue

@@ -1,13 +1,14 @@
 <template>
   <div id="adviserList">
-    <enterprisejb-detail :info="info" :liebiaoList="liebiaoList" @onsave="onsaveClick"></enterprisejb-detail>
+    <enterprisejb-detail :info="info" :liebiaoList="liebiaoList" @onsave="onsaveClick" :userinfo="userinfo"></enterprisejb-detail>
   </div>
 </template>
 
 <script>
 import enterprisejbDetail from '@/components/enterprise/enterprisejb.vue';
-import { createNamespacedHelpers, mapGetters } from 'vuex';
+import { createNamespacedHelpers, mapGetters, mapState } from 'vuex';
 const { mapActions: mapSite } = createNamespacedHelpers('site');
+const { mapActions: market } = createNamespacedHelpers('market');
 export default {
   name: 'adviserList',
   props: {},
@@ -17,13 +18,18 @@ export default {
   data: () => ({
     info: {},
     liebiaoList: [{ name: '基本信息' }, { name: '消息管理' }, { name: '我的发布' }, { name: '我的订购' }, { name: '注销账号' }],
+    userinfo: {},
   }),
   created() {
     this.searchSite();
+    this.searchInfo();
+  },
+  computed: {
+    ...mapState(['user']),
   },
-  computed: {},
   methods: {
     ...mapSite(['showInfo']),
+    ...market(['fetch']),
     // 查询站点信息
     async searchSite() {
       let res = await this.showInfo();
@@ -34,6 +40,13 @@ export default {
         this.$message.error(res.errmsg ? res.errmsg : 'error');
       }
     },
+    // 查询基本信息
+    async searchInfo() {
+      let res = await this.fetch(this.user.userid);
+      if (res.errcode === 0) {
+        this.$set(this, `userinfo`, res.data);
+      }
+    },
     async onsaveClick({ id }) {
       console.log(id);
       if (id === '基本信息') {