wxy 4 år sedan
förälder
incheckning
0e47456dea

+ 0 - 105
src/layout/matter/detailinfo.vue

@@ -1,105 +0,0 @@
-<template>
-  <div id="detailinfo">
-    <el-row>
-      <el-col :span="24" class="info">
-        <el-col :span="24" class="top">
-          <p class="textOver">{{ detailInfo.product_name }}</p>
-        </el-col>
-        <el-col :span="24" class="message">
-          <p>
-            <span>营销人名称:</span>
-            <span>{{ detailInfo.market_username || '暂无' }}</span>
-          </p>
-          <p>
-            <span>购买人名称:</span>
-            <span>{{ detailInfo.username || '暂无' }}</span>
-          </p>
-          <p>
-            <span>状态:</span>
-            <span>{{ detailInfo.status === '0' ? '洽谈' : detailInfo.status === '1' ? '意向' : detailInfo.status === '2' ? '交易' : '暂无' }}</span>
-          </p>
-          <div class="introduction">
-            <p>说明:</p>
-            <p>{{ detailInfo.description || '暂无' }}</p>
-          </div>
-        </el-col>
-      </el-col>
-    </el-row>
-  </div>
-</template>
-
-<script>
-import { mapState, createNamespacedHelpers } from 'vuex';
-export default {
-  name: 'detailinfo',
-  props: {
-    detailInfo: null,
-  },
-  components: {},
-  data: function() {
-    return {};
-  },
-  created() {},
-  methods: {},
-  computed: {
-    ...mapState(['user']),
-    pageTitle() {
-      return `${this.$route.meta.title}`;
-    },
-  },
-  metaInfo() {
-    return { title: this.$route.meta.title };
-  },
-};
-</script>
-
-<style lang="less" scoped>
-.info {
-  .top {
-    background: #fff;
-    min-height: 40px;
-    padding: 0 15px;
-    margin: 0 0 10px 0;
-    .carousel {
-      height: 200px !important;
-      padding: 10px 0;
-    }
-    .el-image {
-      width: 100%;
-      height: 200px;
-    }
-
-    p {
-      font-size: 18px;
-      // color: #7996b1;
-      padding: 10px 0 10px 0;
-    }
-  }
-  .message {
-    background: #fff;
-    padding: 0 15px;
-    min-height: 50px;
-    p {
-      min-height: 50px;
-      line-height: 50px;
-      border-bottom: 1px solid #ccc;
-    }
-    span:first-child {
-      display: inline-block;
-      width: 98px;
-      color: #ccc;
-    }
-    span:last-child {
-      color: #000;
-    }
-    div {
-      p {
-        border-bottom: none;
-      }
-    }
-  }
-}
-/deep/.el-carousel__container {
-  height: 200px !important;
-}
-</style>

+ 27 - 26
src/router/index.js

@@ -64,12 +64,12 @@ const routes = [
     meta: { title: '个人中心', isleftarrow: false },
     component: () => import('../views/user/index.vue'),
   },
-  //修改密码
+  // 用户-基本信息
   {
-    path: '/user/parts/changePwd',
-    name: 'changePwd',
-    meta: { title: '修改密码', isleftarrow: true },
-    component: () => import('../views/user/parts/changePwd.vue'),
+    path: '/userCenter/user/index',
+    name: 'user_index',
+    meta: { title: '基本信息', isleftarrow: true },
+    component: () => import('../views/userCenter/user/index.vue'),
   },
   // 用户-我的发布
   {
@@ -78,7 +78,7 @@ const routes = [
     meta: { title: '我的发布', isleftarrow: true },
     component: () => import('../views/userCenter/myProduct/index.vue'),
   },
-  //发布产品
+  //用户-发布产品
   {
     path: '/userCenter/myProduct/detail',
     name: 'myProduct_index',
@@ -92,12 +92,12 @@ const routes = [
     meta: { title: '事项管理', isleftarrow: true },
     component: () => import('../views/userCenter/matter/index.vue'),
   },
-  // 用户-申请
+  // 用户-交易完成
   {
-    path: '/userCenter/matter/apply',
-    name: 'apply',
-    meta: { title: '申请', isleftarrow: true },
-    component: () => import('../views/userCenter/matter/apply.vue'),
+    path: '/userCenter/matter/detail',
+    name: 'matter_detail',
+    meta: { title: '交易完成', isleftarrow: true },
+    component: () => import('../views/userCenter/matter/detail.vue'),
   },
   // 用户-展会管理
   {
@@ -112,70 +112,71 @@ const routes = [
     meta: { title: '申请', isleftarrow: true },
     component: () => import('../views/userCenter/dock/detail.vue'),
   },
-  // 用户-基本信息
-  {
-    path: '/userCenter/user/index',
-    name: 'user_index',
-    meta: { title: '基本信息', isleftarrow: true },
-    component: () => import('../views/userCenter/user/index.vue'),
-  },
-  // 用户-退出登录
-  {
-    path: '/userCenter/out/index',
-    name: 'user_index',
-    meta: { title: '个人中心', isleftarrow: true },
-    component: () => import('../views/userCenter/out/index.vue'),
-  },
   // 管理用户菜单
+  // 管理-用户管理
   {
     path: '/adminCenter/user/index',
     name: 'adminCenter_user_index',
     meta: { title: '用户管理', isleftarrow: true },
     component: () => import('../views/adminCenter/user/index.vue'),
   },
+  //  管理-查看用户
   {
     path: '/adminCenter/user/detail',
     name: 'adminCenter_user_detail',
     meta: { title: '审核/查看用户', isleftarrow: true },
     component: () => import('../views/adminCenter/user/detail.vue'),
   },
+  //  管理-展会管理
   {
     path: '/adminCenter/duijiehui/index',
     name: 'adminCenter_duijiehui_index',
     meta: { title: '展会管理', isleftarrow: true },
     component: () => import('../views/adminCenter/duijiehui/index.vue'),
   },
+  //  管理-展会信息管理
   {
     path: '/adminCenter/duijiehui/add',
     name: 'adminCenter_duijiehui_add',
     meta: { title: '展会信息管理', isleftarrow: true },
     component: () => import('../views/adminCenter/duijiehui/add.vue'),
   },
+  //  管理-审核管理
   {
     path: '/adminCenter/enterpriseProduct/index',
     name: 'adminCenter_enterpriseProduct',
     meta: { title: '审核管理', isleftarrow: true },
     component: () => import('../views/adminCenter/enterpriseProduct/index.vue'),
   },
+  //  管理-产品信息管理
   {
     path: '/adminCenter/enterpriseProduct/detail',
     name: 'adminCenter_enterpriseProduct',
     meta: { title: '产品信息管理', isleftarrow: true },
     component: () => import('../views/adminCenter/enterpriseProduct/detail.vue'),
   },
+  //  管理-交易审核管理
   {
     path: '/adminCenter/transaction/index',
     name: 'adminCenter_transaction',
     meta: { title: '交易审核管理', isleftarrow: true },
     component: () => import('../views/adminCenter/transaction/index.vue'),
   },
+  //  管理-交易信息管理
   {
     path: '/adminCenter/transaction/detail',
     name: 'adminCenter_transaction',
     meta: { title: '交易信息管理', isleftarrow: true },
     component: () => import('../views/adminCenter/transaction/detail.vue'),
   },
-  // 登录
+  //共用-修改密码
+  {
+    path: '/updatePwd/index',
+    name: 'updatePwd',
+    meta: { title: '修改密码', isleftarrow: true },
+    component: () => import('../views/updatePwd/index.vue'),
+  },
+  // 登录-用户+管理
   {
     path: '/login',
     name: 'login',

+ 1 - 0
src/store/user/login.js

@@ -97,6 +97,7 @@ const actions = {
     let key = localStorage.removeItem('token');
     const res = await this.$axios.$post(api.logout, { key: key });
     commit('deleteUser');
+    return res;
   },
   async update({ commit }, payload) {
     let res = await this.$axios.$post(`${api.updatePassword}`, {

+ 3 - 3
src/views/adminCenter/user/parts/detailInfo.vue

@@ -29,7 +29,7 @@
                 </van-radio-group>
               </template>
             </van-field>
-            <div style="margin: 16px;" v-if="form.status == '0'">
+            <div style="margin: 16px;">
               <van-button round block type="info" @click="onSubmit">
                 提交
               </van-button>
@@ -74,7 +74,7 @@
                 </van-radio-group>
               </template>
             </van-field>
-            <div style="margin: 16px;" v-if="form.status == '0'">
+            <div style="margin: 16px;">
               <van-button round block type="info" @click="onSubmit">
                 提交
               </van-button>
@@ -122,7 +122,7 @@
                 </van-radio-group>
               </template>
             </van-field>
-            <div style="margin: 16px;" v-if="form.status == '0'">
+            <div style="margin: 16px;">
               <van-button round block type="info" @click="onSubmit">
                 提交
               </van-button>

+ 4 - 1
src/views/login.vue

@@ -18,7 +18,7 @@
                         <van-radio name="4">个人</van-radio>
                         <van-radio name="5">机构</van-radio>
                         <van-radio name="6">专家</van-radio>
-                        <van-radio name="2">VIP用户</van-radio>
+                        <!-- <van-radio name="2">VIP用户</van-radio> -->
                       </van-radio-group>
                     </template>
                   </van-field>
@@ -142,4 +142,7 @@ export default {
 /deep/.van-radio--horizontal {
   margin: 0 15px 10px 0;
 }
+/deep/.van-field__label {
+  text-align: center;
+}
 </style>

+ 0 - 161
src/views/onlive/roomInfo.vue

@@ -1,161 +0,0 @@
-<template>
-  <div id="roomInfo">
-    <el-row>
-      <el-col :span="24" class="style">
-        <el-col :span="24" class="top">
-          <NavBar v-show="navShow" :title="title" :isleftarrow="isleftarrow"> </NavBar>
-        </el-col>
-        <el-col :span="24" class="main">
-          <van-image :src="roomInfos.filedir" class="image"></van-image>
-          <van-count-down v-if="time > 0 && endtime > 0" class="time" :time="time" format="DD 天 HH 时 mm 分 ss 秒" />
-          <el-col v-else-if="time <= 0 && endtime > 0" class="time">直播已开始</el-col>
-          <el-col v-else-if="endtime <= 0" class="time">直播已结束</el-col>
-          <van-tabs v-model="active" line-width="50px" title-active-color="#ee0a24">
-            <van-tab title="简介">
-              <van-col :span="24" class="title">{{ roomInfos.title }}</van-col>
-              <van-col :span="24" class="starttime"><van-icon name="underway-o" />开始时间: {{ roomInfos.starttime }}</van-col>
-              <van-col :span="24" class="gap"></van-col>
-
-              <van-col :span="24">
-                <van-col :span="24" class="infotop"><span></span><span>活动简介</span> </van-col>
-                <van-col class="content">{{ roomInfos.content }}</van-col>
-              </van-col>
-            </van-tab>
-          </van-tabs>
-        </el-col>
-      </el-col>
-    </el-row>
-  </div>
-</template>
-
-<script>
-import { mapState, mapMutations, createNamespacedHelpers } from 'vuex';
-import NavBar from '@/layout/common/topInfo.vue';
-import footInfo from '@/layout/common/footInfo.vue';
-var moment = require('moment');
-const { mapActions: room } = createNamespacedHelpers('room');
-export default {
-  name: 'roomInfo',
-  props: {},
-  components: {
-    NavBar,
-  },
-  data: function() {
-    return {
-      // 头部标题
-      title: '',
-      // meta为true
-      isleftarrow: '',
-      // 返回
-      navShow: true,
-      roomInfos: {},
-      time: '',
-      active: 1,
-      endtime: '',
-    };
-  },
-  created() {
-    this.seachInfo();
-  },
-  methods: {
-    ...room(['roomfetch']),
-    async seachInfo() {
-      let res = await this.roomfetch({ roomname: this.roomname });
-      if (this.$checkRes(res)) {
-        this.$set(this, `roomInfos`, res.data);
-        const starttime = moment(res.data.starttime).format('x');
-        const endtime = moment(res.data.endtime).format('x');
-        const now = moment(new Date()).format('x');
-        this.$set(this, `time`, starttime - now);
-        this.$set(this, `endtime`, endtime - now);
-      }
-    },
-  },
-  computed: {
-    ...mapState(['user']),
-    roomname() {
-      return this.$route.query.roomname;
-    },
-  },
-  mounted() {
-    this.title = this.$route.meta.title;
-    this.isleftarrow = this.$route.meta.isleftarrow;
-  },
-};
-</script>
-
-<style lang="less" scoped>
-.style {
-  width: 100%;
-  min-height: 667px;
-  position: relative;
-  background-color: #f9fafc;
-}
-.top {
-  height: 46px;
-  overflow: hidden;
-  position: relative;
-  z-index: 999;
-}
-.main {
-  min-height: 570px;
-}
-.image {
-  width: 100%;
-  height: 220px;
-}
-.time {
-  height: 40px;
-  line-height: 40px;
-  font-size: 16px;
-  background-color: rgba(0, 0, 0, 0.6);
-  color: #ffffff;
-  text-align: center;
-  position: absolute;
-  top: 226px;
-  width: 100%;
-}
-.title {
-  font-size: 20px;
-  font-weight: bold;
-  padding: 10px;
-}
-.starttime {
-  padding: 10px;
-}
-/deep/.van-icon::before {
-  font-size: 13px;
-  margin-right: 5px;
-}
-.gap {
-  background-color: #f2f2f2;
-  height: 10px;
-}
-.infotop {
-  margin: 10px 5px;
-}
-.infotop span:first-child {
-  display: inline-block;
-  background-color: #ee0a24;
-  width: 3px;
-  height: 20px;
-  margin: 0 10px;
-}
-.infotop span:last-child {
-  font-size: 16px;
-  font-weight: bold;
-}
-.content {
-  padding: 10px;
-}
-.reserve {
-  background-color: #2c69fe;
-  position: absolute;
-  bottom: 0px;
-  height: 50px;
-  color: #ffffff;
-  text-align: center;
-  line-height: 50px;
-  font-weight: 600;
-}
-</style>

+ 25 - 10
src/views/user/parts/changePwd.vue

@@ -1,18 +1,33 @@
 <template>
-  <div id="changePwd">
+  <div id="index">
     <el-row>
       <el-col :span="24">
         <el-col :span="24" class="top">
           <NavBar v-show="navShow" :title="title" :isleftarrow="isleftarrow"> </NavBar>
         </el-col>
         <el-col :span="24" class="pwd">
-          <van-form :model="form">
-            <van-field v-model="form.oldpasswd" type="password" name="密码" label="旧密码" placeholder="请输入旧密码" />
-            <van-field v-model="form.newpasswd" type="password" name="密码" label="新密码" placeholder="请输入新密码" />
-            <el-col :span="24" class="btn1">
-              <el-button @click="resetForm('form')">取消</el-button>
-              <el-button type="primary" @click="submitForm('form')">提交</el-button>
-            </el-col>
+          <van-form>
+            <van-field
+              v-model="form.oldpasswd"
+              type="password"
+              name="旧密码"
+              label="旧密码"
+              placeholder="旧密码"
+              :rules="[{ required: true, message: '请填写旧密码' }]"
+            />
+            <van-field
+              v-model="form.newpasswd"
+              type="password"
+              name="新密码"
+              label="新密码"
+              placeholder="新密码"
+              :rules="[{ required: true, message: '请填写新密码' }]"
+            />
+            <div style="margin: 16px;">
+              <van-button round block type="info" @click="onSubmit">
+                提交
+              </van-button>
+            </div>
           </van-form>
         </el-col>
       </el-col>
@@ -26,7 +41,7 @@ import NavBar from '@/layout/common/topInfo.vue';
 const { mapActions: password } = createNamespacedHelpers('password');
 const { mapActions: login } = createNamespacedHelpers('login');
 export default {
-  name: 'changePwd',
+  name: 'index',
   props: {},
   components: {
     NavBar,
@@ -49,7 +64,7 @@ export default {
     resetForm(formName) {
       this.form = {};
     },
-    async submitForm() {
+    async onSubmit() {
       let data = this.form;
       data.id = this.user.uid;
       let res = await this.update(data);

+ 18 - 21
src/views/user/parts/clickBtn.vue

@@ -5,30 +5,27 @@
         <span v-if="user.role == '4' || user.role == '5' || user.role == '6'">
           <van-cell is-link title="基本信息" @click="$router.push({ path: '/userCenter/user/index' })" />
           <van-cell is-link title="我的发布" @click="$router.push({ path: '/userCenter/myProduct/index' })" />
-          <!-- <van-cell is-link title="事项管理" @click="$router.push({ path: '/userCenter/matter/index' })" /> -->
+          <van-cell is-link title="事项管理" @click="$router.push({ path: '/userCenter/matter/index' })" />
           <van-cell is-link title="展会管理" @click="$router.push({ path: '/userCenter/dock/index' })" />
-          <!--<van-cell is-link title="退出登录" @click="$router.push({ path: '/userCenter/out/index' })" /> -->
         </span>
-        <span v-else>
-          <span v-if="user.role == '0'">
-            <van-cell is-link title="用户管理" @click="$router.push({ path: '/adminCenter/user/index' })" />
-            <van-cell is-link title="展会管理" @click="$router.push({ path: '/adminCenter/duijiehui/index' })" />
-            <van-cell is-link title="审核管理" @click="$router.push({ path: '/adminCenter/enterpriseProduct/index' })" />
-            <van-cell is-link title="交易审核" @click="$router.push({ path: '/adminCenter/transaction/index' })" />
-          </span>
-          <span v-else-if="user.role == '1'">
-            <van-cell is-link title="用户管理" @click="$router.push({ path: '/adminCenter/user/index' })" />
-            <van-cell is-link title="审核管理" @click="$router.push({ path: '/adminCenter/enterpriseProduct/index' })" />
-          </span>
-          <span v-else-if="user.role == '3'">
-            展会负责人
-          </span>
-          <span v-else-if="user.role == '8'">
-            展会vip用户
-          </span>
+        <span v-else-if="user.role == '0'">
+          <van-cell is-link title="用户管理" @click="$router.push({ path: '/adminCenter/user/index' })" />
+          <van-cell is-link title="展会管理" @click="$router.push({ path: '/adminCenter/duijiehui/index' })" />
+          <van-cell is-link title="审核管理" @click="$router.push({ path: '/adminCenter/enterpriseProduct/index' })" />
+          <van-cell is-link title="交易审核" @click="$router.push({ path: '/adminCenter/transaction/index' })" />
+        </span>
+        <span v-else-if="user.role == '1'">
+          <van-cell is-link title="用户管理" @click="$router.push({ path: '/adminCenter/user/index' })" />
+          <van-cell is-link title="审核管理" @click="$router.push({ path: '/adminCenter/enterpriseProduct/index' })" />
+        </span>
+        <span v-else-if="user.role == '3'">
+          展会负责人
+        </span>
+        <span v-else-if="user.role == '8'">
+          展会vip用户
         </span>
-        <van-cell is-link title="退出登录" @click="loginOut()" />
         <van-cell is-link title="修改密码" @click="change()" />
+        <van-cell is-link title="退出登录" @click="loginOut()" />
         <!-- <span v-else>
           <span v-else-if="user.role == '3'">
             <van-cell is-link title="展会管理" @click="$router.push({ path: '/dockCenter/dockInfo/index' })" />
@@ -94,7 +91,7 @@ export default {
     },
     //修改密码
     change() {
-      this.$router.push({ path: './parts/changePwd' });
+      this.$router.push({ path: '/updatePwd/index' });
     },
   },
   computed: {

+ 0 - 358
src/views/userCenter/matter/apply.vue

@@ -1,358 +0,0 @@
-<template>
-  <div id="apply">
-    <el-row>
-      <el-col :span="24">
-        <span v-if="type == '0'">
-          <van-form>
-            <van-field v-model="form.company" name="企业名称" label="企业名称" placeholder="企业名称" readonly />
-            <van-field v-model="form.phone" name="联系电话" label="联系电话" placeholder="联系电话" readonly />
-            <van-field v-model="form.email" name="电子邮箱" label="电子邮箱" placeholder="电子邮箱" readonly />
-            <van-field v-model="form.contacts" name="联系人" label="联系人" placeholder="联系人" />
-            <van-field v-model="form.qqwx" name="QQ/微信" label="QQ/微信" placeholder="QQ/微信" />
-            <van-field v-model="form.name" name="需求名称" label="需求名称" placeholder="需求名称" />
-            <van-field name="radio" label="紧急程度">
-              <template #input>
-                <van-radio-group v-model="form.degreeurgency" direction="horizontal">
-                  <van-radio name="特急">特急</van-radio>
-                  <van-radio name="一般">一般</van-radio>
-                  <van-radio name="长期">长期</van-radio>
-                </van-radio-group>
-              </template>
-            </van-field>
-            <van-field readonly clickable name="picker" :value="form.field" label="所属领域" placeholder="点击选择" @click="fieldpic = true" />
-            <van-popup v-model="fieldpic" position="bottom">
-              <van-picker show-toolbar :columns="field" @confirm="fieldSubmit" @cancel="fieldpic = false" />
-            </van-popup>
-            <van-field readonly clickable name="picker" :value="form.cooperation" label="合作方式" placeholder="点击选择" @click="cooperationpic = true" />
-            <van-popup v-model="cooperationpic" position="bottom">
-              <van-picker show-toolbar :columns="cooperation" @confirm="cooperationSubmit" @cancel="cooperationpic = false" />
-            </van-popup>
-            <van-field v-model="form.budget" name="投资预算" label="投资预算" placeholder="投资预算" />
-            <van-field v-model="form.requirementdesc" rows="1" autosize label="技术说明" type="textarea" placeholder="技术说明" />
-            <van-field v-model="form.expect" rows="1" autosize label="预期目标" type="textarea" placeholder="预期目标" />
-            <van-field v-model="form.present" rows="1" autosize label="合作要求" type="textarea" placeholder="合作要求" />
-            <van-field name="expertimage" label="产品图片(6)">
-              <template #input
-                ><upload
-                  :limit="6"
-                  :data="form.image"
-                  type="image"
-                  :url="`/files/imgpath/upload`"
-                  @upload="uploadSuccess"
-                  :uploadBtn="true"
-                  @delete="uploadDelete"
-                ></upload>
-              </template>
-            </van-field>
-            <div style="margin: 16px;">
-              <van-button round block type="info" @click="onSubmit">
-                提交
-              </van-button>
-            </div>
-          </van-form>
-        </span>
-        <span v-else-if="type == '1'">
-          <van-form>
-            <van-field v-model="form.company" name="企业名称" label="企业名称" placeholder="企业名称" readonly />
-            <van-field v-model="form.phone" name="联系电话" label="联系电话" placeholder="联系电话" readonly />
-            <van-field v-model="form.email" name="电子邮箱" label="电子邮箱" placeholder="电子邮箱" readonly />
-            <van-field v-model="form.contacts" name="联系人" label="联系人" placeholder="联系人" />
-            <van-field v-model="form.qqwx" name="QQ/微信" label="QQ/微信" placeholder="QQ/微信" />
-            <van-field v-model="form.name" name="成果名称" label="成果名称" placeholder="成果名称" />
-            <van-field readonly clickable name="picker" :value="form.field" label="所属领域" placeholder="点击选择" @click="fieldpic = true" />
-            <van-popup v-model="fieldpic" position="bottom">
-              <van-picker show-toolbar :columns="field" @confirm="fieldSubmit" @cancel="fieldpic = false" />
-            </van-popup>
-            <van-field readonly clickable name="picker" :value="form.cooperation" label="合作方式" placeholder="点击选择" @click="cooperationpic = true" />
-            <van-popup v-model="cooperationpic" position="bottom">
-              <van-picker show-toolbar :columns="cooperation" @confirm="cooperationSubmit" @cancel="cooperationpic = false" />
-            </van-popup>
-            <van-field readonly clickable name="picker" :value="form.achievestatus" label="成果状态" placeholder="点击选择" @click="achievestatuspic = true" />
-            <van-popup v-model="achievestatuspic" position="bottom">
-              <van-picker show-toolbar :columns="achievestatus" @confirm="achievestatusOnsubmit" @cancel="achievestatuspic = false" />
-            </van-popup>
-            <van-field v-model="form.achieveown" name="成果权属" label="成果权属" placeholder="成果权属" />
-            <van-field name="radio" label="成果来源">
-              <template #input>
-                <van-radio-group v-model="form.achievesource" direction="horizontal">
-                  <van-radio name="国家项目">国家项目</van-radio>
-                  <van-radio name="省级项目">省级项目</van-radio>
-                  <van-radio name="市级项目">市级项目</van-radio>
-                  <van-radio name="市级项目">市级项目</van-radio>
-                </van-radio-group>
-              </template>
-            </van-field>
-            <van-field v-model="form.intentionprice" name="意向价格" label="意向价格" placeholder="意向价格" />
-            <van-field name="patent" label="专利信息">
-              <template #input>
-                <el-button type="primary" size="mini" @click="addPatent">添加</el-button>
-                <el-button type="primary" size="mini" @click="viewPatent">查看</el-button>
-              </template>
-            </van-field>
-            <!-- <van-field v-model="form.roadshow" name="项目路演" label="项目路演" placeholder="项目路演" /> -->
-            <van-field v-model="form.achievebrief" rows="1" autosize label="成果简介" type="textarea" placeholder="成果简介" />
-            <van-field v-model="form.features" rows="1" autosize label="技术特点" type="textarea" placeholder="技术特点" />
-            <van-field v-model="form.team" rows="1" autosize label="技术团队" type="textarea" placeholder="技术团队" />
-            <van-field v-model="form.expectations" rows="1" autosize label="商业预期" type="textarea" placeholder="商业预期" />
-            <van-field v-model="form.condition" rows="1" autosize label="合作要求" type="textarea" placeholder="合作要求" />
-            <van-field name="expertimage" label="产品图片(6)">
-              <template #input
-                ><upload
-                  :limit="6"
-                  :data="form.image"
-                  type="image"
-                  :url="`/files/imgpath/upload`"
-                  @upload="uploadSuccess"
-                  :uploadBtn="true"
-                  @delete="uploadDelete"
-                ></upload>
-              </template>
-            </van-field>
-            <div style="margin: 16px;">
-              <van-button round block type="info" @click="onSubmit">
-                提交
-              </van-button>
-            </div>
-          </van-form>
-        </span>
-        <span v-else-if="type == '2'">
-          <van-form>
-            <van-field v-model="form.company" name="企业名称" label="企业名称" placeholder="企业名称" readonly />
-            <van-field v-model="form.phone" name="联系电话" label="联系电话" placeholder="联系电话" readonly />
-            <van-field v-model="form.email" name="电子邮箱" label="电子邮箱" placeholder="电子邮箱" readonly />
-            <van-field v-model="form.contacts" name="联系人" label="联系人" placeholder="联系人" />
-            <van-field v-model="form.qqwx" name="QQ/微信" label="QQ/微信" placeholder="QQ/微信" />
-            <van-field v-model="form.name" name="信息名称" label="信息名称" placeholder="信息名称" />
-            <van-field name="radio" label="信息属性">
-              <template #input>
-                <van-radio-group v-model="form.messattribute" direction="horizontal">
-                  <van-radio name="提供方">提供方</van-radio>
-                  <van-radio name="需求方">需求方</van-radio>
-                </van-radio-group>
-              </template>
-            </van-field>
-            <van-field name="radio" label="需求程度">
-              <template #input>
-                <van-radio-group v-model="form.demand" direction="horizontal">
-                  <van-radio name="特急">特急</van-radio>
-                  <van-radio name="一般">一般</van-radio>
-                  <van-radio name="长期">长期</van-radio>
-                </van-radio-group>
-              </template>
-            </van-field>
-            <van-field v-model="form.informationdesc" rows="1" autosize label="信息描述" type="textarea" placeholder="信息描述" />
-            <van-field v-model="form.coreelements" rows="1" autosize label="核心要素" type="textarea" placeholder="核心要素" />
-            <van-field v-model="form.priceinfo" rows="1" autosize label="价格信息" type="textarea" placeholder="价格信息" />
-            <van-field v-model="form.businessexpect" rows="1" autosize label="商业预期" type="textarea" placeholder="商业预期" />
-            <div style="margin: 16px;">
-              <van-button round block type="info" @click="onSubmit">
-                提交
-              </van-button>
-            </div>
-          </van-form>
-        </span>
-      </el-col>
-    </el-row>
-    <van-dialog v-model="show" title="添加专利信息" :showConfirmButton="false" :closeOnClickOverlay="true">
-      <van-form>
-        <van-field v-model="patentform.patentinfo" name="名称" label="名称" placeholder="名称" />
-        <van-field name="radio" label="专利状态">
-          <template #input>
-            <van-radio-group v-model="patentform.patentstatus" direction="horizontal">
-              <van-radio name="已申请">已申请</van-radio>
-              <van-radio name="已授权">已授权</van-radio>
-            </van-radio-group>
-          </template>
-        </van-field>
-        <div style="margin: 16px;">
-          <van-button round block type="info" @click="patentSubmit">
-            提交
-          </van-button>
-        </div>
-      </van-form>
-    </van-dialog>
-    <van-dialog v-model="patentshow" title="查看专利信息" :showConfirmButton="false" :closeOnClickOverlay="true">
-      <div class="patentList" v-for="(item, index) in patentList" :key="index">
-        <p class="textOver">{{ item.patentinfo }}</p>
-        <p>专利状态:{{ item.patentstatus }}</p>
-        <p>
-          <el-button type="primary" size="mini" @click="delPatent(index, item)">刪除</el-button>
-        </p>
-      </div>
-    </van-dialog>
-  </div>
-</template>
-
-<script>
-import upload from '@/components/upload.vue';
-import { mapState, createNamespacedHelpers } from 'vuex';
-export default {
-  name: 'apply',
-  props: {
-    type: { type: String, default: '0' },
-    form: { type: Object },
-    fieldList: { type: Array },
-    cooperationList: { type: Array },
-    achievestatusList: { type: Array },
-  },
-  components: {
-    upload,
-  },
-  data: function() {
-    return {
-      field: [],
-      fieldpic: false,
-      cooperation: [],
-      cooperationpic: false,
-      achievestatus: [],
-      achievestatuspic: false,
-      // 专利信息
-      show: false,
-      patentform: {},
-      patentshow: false,
-      patentList: [],
-    };
-  },
-  created() {},
-  methods: {
-    // 重组数组
-    seachfield() {
-      let field = this.fieldList.map(item => item.name);
-      this.$set(this, `field`, field);
-    },
-    // 所屬領域
-    fieldSubmit(value) {
-      this.$set(this.form, `field`, value);
-      this.fieldpic = false;
-    },
-    // 重组数组
-    searchcooperation() {
-      let cooperation = this.cooperationList.map(item => item.name);
-      this.$set(this, `cooperation`, cooperation);
-    },
-    // 合作方式
-    cooperationSubmit(value) {
-      this.$set(this.form, `cooperation`, value);
-      this.cooperationpic = false;
-    },
-    // 重组数组
-    searchachievestatus() {
-      let achievestatus = this.achievestatusList.map(item => item.name);
-      this.$set(this, `achievestatus`, achievestatus);
-    },
-    // 成果状态
-    achievestatusOnsubmit(value) {
-      this.$set(this.form, `achievestatus`, value);
-      this.achievestatuspic = false;
-    },
-    // 图片上传
-    uploadSuccess({ type, data }) {
-      let arr = _.get(this.form, type);
-      if (_.isArray(arr)) {
-        let datas = { name: data.name, url: data.uri };
-        this.form[type].push({ name: data.name, url: data.uri });
-      } else {
-        let newArr = [{ name: data.name, url: data.uri }];
-        this.$set(this.form, `${type}`, newArr);
-      }
-    },
-    // 删除图片
-    uploadDelete(index) {
-      this.form.image.splice(index, 1);
-    },
-    // 添加专利信息
-    addPatent() {
-      this.show = true;
-    },
-    // 提交专利信息
-    patentSubmit() {
-      this.patentList.push(this.patentform);
-      this.show = false;
-    },
-    // 查看专利信息
-    viewPatent() {
-      this.patentshow = true;
-    },
-    // 删除专利信息
-    delPatent(index, val) {
-      this.patentList.splice(index, 1);
-      this.$notify({
-        message: '删除成功',
-        type: 'success',
-      });
-      this.patentshow = false;
-    },
-    onSubmit() {
-      this.form.patent = this.patentList;
-      this.$emit('onSubmit', { data: this.form });
-    },
-    // 查询专利信息
-    searchpatent() {
-      let data = this.form;
-      if (data.patent) {
-        console.log(data.patent);
-        this.$set(this, `patentList`, data.patent);
-      }
-    },
-  },
-  watch: {
-    fieldList: {
-      immediate: true,
-      deep: true,
-      handler(val) {
-        this.seachfield();
-      },
-    },
-    cooperationList: {
-      immediate: true,
-      deep: true,
-      handler(val) {
-        this.searchcooperation();
-      },
-    },
-    achievestatusList: {
-      immediate: true,
-      deep: true,
-      handler(val) {
-        this.searchachievestatus();
-      },
-    },
-    form: {
-      immediate: true,
-      deep: true,
-      handler(val) {
-        this.searchpatent();
-      },
-    },
-  },
-  computed: {
-    ...mapState(['user']),
-    pageTitle() {
-      return `${this.$route.meta.title}`;
-    },
-  },
-  metaInfo() {
-    return { title: this.$route.meta.title };
-  },
-};
-</script>
-
-<style lang="less" scoped>
-.patentList {
-  padding: 0 10px;
-  border-bottom: 1px dashed #ccc;
-  p {
-    font-size: 16px;
-    color: #666;
-    padding: 0 0 5px 0;
-  }
-  p:nth-child(1) {
-    font-size: 18px;
-    color: #000;
-    font-weight: bold;
-  }
-  p:nth-child(3) {
-    text-align: center;
-  }
-}
-</style>

+ 75 - 45
src/views/userCenter/matter/index.vue

@@ -6,16 +6,20 @@
           <NavBar v-show="navShow" :title="title" :isleftarrow="isleftarrow"> </NavBar>
         </el-col>
         <el-col :span="24" class="main">
-          <el-col :span="24">
-            <van-tabs v-model="active">
-              <van-tab title="下期直播">
-                <docklist :list="nextList" @detailBtn="detailBtn" :province="province" :place="place"></docklist>
-              </van-tab>
-              <van-tab title="以往直播">
-                <docklist :list="pastList" @detailBtn="detailBtn" :province="province" :place="place"></docklist>
-              </van-tab>
-            </van-tabs>
-          </el-col>
+          <van-tabs v-model="active">
+            <van-tab title="我的全部">
+              <list :list="oneList" status="3" @query="search" @checkBtn="checkBtn"></list>
+            </van-tab>
+            <van-tab title="我的洽谈">
+              <list :list="twoList" status="0" @query="search" @checkBtn="checkBtn"></list>
+            </van-tab>
+            <van-tab title="我的意向">
+              <list :list="threeList" status="1" @query="search" @checkBtn="checkBtn"></list>
+            </van-tab>
+            <van-tab title="我的交易">
+              <list :list="fourList" status="2" @query="search" @checkBtn="checkBtn"></list>
+            </van-tab>
+          </van-tabs>
         </el-col>
       </el-col>
     </el-row>
@@ -23,17 +27,16 @@
 </template>
 
 <script>
-import docklist from './parts/docklist.vue';
+import list from './parts/list.vue';
 import NavBar from '@/layout/common/topInfo.vue';
 import { mapState, createNamespacedHelpers } from 'vuex';
-const { mapActions: dock } = createNamespacedHelpers('dock');
-const { mapActions: place } = createNamespacedHelpers('place');
+const { mapActions: transaction } = createNamespacedHelpers('transaction');
 export default {
   name: 'index',
   props: {},
   components: {
     NavBar,
-    docklist,
+    list,
   },
   data: function() {
     return {
@@ -43,46 +46,73 @@ export default {
       isleftarrow: '',
       // 返回
       navShow: true,
-      active: '1',
-      // 下期直播
-      nextList: [],
-      // 以往直播
-      pastList: [],
-      // 省
-      province: [],
-      // 市
-      place: [],
+      active: 0,
+      oneList: [],
+      twoList: [],
+      threeList: [],
+      fourList: [],
     };
   },
   async created() {
-    await this.searchplace();
-    await this.search();
+    await this.search({ status: '3' });
+    await this.search({ status: '0' });
+    await this.search({ status: '1' });
+    await this.search({ status: '2' });
   },
   methods: {
-    ...place({ palcequery: 'query', transactiondtetle: 'delete' }),
-    ...dock(['query', 'delete', 'update', 'create']),
-    async search() {
-      let res = await this.query({ status: '0' });
-      if (this.$checkRes(res)) this.$set(this, `nextList`, res.data);
-      res = await this.query({ status: '2' });
-      if (this.$checkRes(res)) this.$set(this, `pastList`, res.data);
+    ...transaction({ transactionsfetch: 'fetch', transactionslist: 'query', transactiondetele: 'detele', shenheupdate: 'update' }),
+    async search({ skip = 0, status, ...info } = {}) {
+      let userid = this.user.uid;
+      let market_userid = this.user.uid;
+      if (status == '3') {
+        const res = await this.transactionslist({ skip, userid, ...info });
+        const arr = await this.transactionslist({ skip, market_userid, ...info });
+        var newData = res.data.concat(arr.data);
+        if (this.$checkRes(newData)) {
+          this.$set(this, `oneList`, newData);
+        }
+      } else if (status == '0') {
+        const res = await this.transactionslist({ skip, market_userid, status: 0, ...info });
+        if (this.$checkRes(res)) {
+          this.$set(this, `twoList`, res.data);
+        }
+      } else if (status == '1') {
+        const res = await this.transactionslist({ skip, market_userid, status: 1, ...info });
+        const arr = await this.transactionslist({ skip, market_userid, status: 4, ...info });
+        var newData = res.data.concat(arr.data);
+        if (this.$checkRes(newData)) {
+          this.$set(this, `threeList`, newData);
+        }
+      } else if (status == '2') {
+        const res = await this.transactionslist({ skip, market_userid, status: 2, ...info });
+        const arr = await this.transactionslist({ skip, userid, status: 2, ...info });
+        var newData = res.data.concat(arr.data);
+        if (this.$checkRes(newData)) {
+          this.$set(this, `fourList`, newData);
+        }
+      }
     },
-    // 申请
-    detailBtn(data) {
+    // 交易按钮
+    async checkBtn(data) {
+      // 同意交易%交易完成
       if (data.status == '0') {
-        this.$router.push({ path: '/userCenter/matter/apply', query: { id: data.id } });
-      } else {
-        console.log(data);
+        data.status = '1';
+        let res = await this.shenheupdate(data);
+        this.$notify({
+          message: ' 同意交易成功',
+          type: 'success',
+        });
+        this.searchevery();
+      } else if (data.status == '1') {
+        this.$router.push({ path: '/userCenter/matter/detail', query: { id: data.id } });
       }
     },
-    // 查询省市
-    async searchplace() {
-      let res = await this.palcequery({ level: 1 });
-      let arr = await this.palcequery({ level: 2 });
-      if (res || arr) {
-        this.$set(this, `province`, res.data);
-        this.$set(this, `place`, arr.data);
-      }
+    // 提交刷新
+    searchevery() {
+      this.search({ status: '3' });
+      this.search({ status: '0' });
+      this.search({ status: '1' });
+      this.search({ status: '2' });
     },
   },
   computed: {

+ 0 - 104
src/views/userCenter/matter/parts/docklist.vue

@@ -1,104 +0,0 @@
-<template>
-  <div id="docklist">
-    <el-row>
-      <el-col :span="24" class="docklist">
-        <el-col :span="24" class="list" v-for="(item, index) in list" :key="index">
-          <p>
-            <span class="textOver">[{{ item.room_id }}]</span>
-            <span class="textOver">{{ item.title }}</span>
-          </p>
-          <p>
-            <span class="textOver">负责人:{{ item.adminuser }}</span>
-            <span class="textOver">手机号:{{ item.phone }}</span>
-          </p>
-          <p>
-            <span class="textOver">地址:{{ getprovince(item.province) }}-{{ getplace(item.place) }}</span>
-            <span class="textOver">状态:{{ item.status == '0' ? '准备中' : item.status == '1' ? '开始' : '结束' }}</span>
-          </p>
-          <el-col :span="24" class="btn">
-            <!-- <el-button type="primary" size="mini" @click="detailBtn(item)">{{
-              item.status == '0' || item.status == '1' ? '编辑/状态审核' : '查看成果'
-            }}</el-button> -->
-            <el-button v-if="item.status === '0'" type="primary" size="mini" @click="detailBtn(item)">申请</el-button>
-          </el-col>
-        </el-col>
-      </el-col>
-    </el-row>
-  </div>
-</template>
-
-<script>
-import { mapState, createNamespacedHelpers } from 'vuex';
-export default {
-  name: 'docklist',
-  props: {
-    list: { type: Array },
-    // 省
-    province: { type: Array, default: () => [] },
-    // 市
-    place: { type: Array, default: () => [] },
-  },
-  components: {},
-  data: function() {
-    return {};
-  },
-  created() {},
-  methods: {
-    // 过滤省
-    getprovince(item) {
-      let res = this.province.find(i => i.code == item);
-      if (res) return res.name;
-    },
-    // 过滤市
-    getplace(item) {
-      let res = this.place.find(i => i.code == item);
-      if (res) return res.name;
-    },
-    detailBtn(data) {
-      this.$emit('detailBtn', data);
-    },
-  },
-  computed: {
-    ...mapState(['user']),
-    pageTitle() {
-      return `${this.$route.meta.title}`;
-    },
-  },
-  metaInfo() {
-    return { title: this.$route.meta.title };
-  },
-};
-</script>
-
-<style lang="less" scoped>
-.docklist {
-  padding: 0 10px;
-  .list {
-    border-bottom: 1px dashed #ccc;
-    padding: 10px 0;
-    p {
-      font-size: 16px;
-      color: #666;
-      padding: 0 0 5px 0;
-      span {
-        display: inline-block;
-        width: 50%;
-      }
-    }
-    p:nth-child(1) {
-      font-size: 18px;
-      font-weight: bold;
-      span:nth-child(1) {
-        width: 15%;
-        color: #ff0000;
-      }
-      span:nth-child(2) {
-        width: 85%;
-      }
-    }
-    .btn {
-      text-align: center;
-    }
-  }
-}
-</style>

+ 0 - 103
src/views/userCenter/matter/parts/intentionList.vue

@@ -1,103 +0,0 @@
-<template>
-  <div id="auditList">
-    <el-row>
-      <el-col :span="24" class="info">
-        <el-col :span="24" class="list" v-for="(item, index) in list" :key="index">
-          <p class="textOver">
-            <span @click="$router.push({ path: '/userCenter/matter/detailinfo', query: { id: item.id } })">{{ item.product_name }}</span>
-            <span style="float:right"><van-button type="info" size="small" @click="submit(item)">交易成功</van-button></span>
-          </p>
-          <p>
-            <span class="ptwo"><span>营销人名称:</span>{{ item.market_username || '暂无' }}</span>
-            <span class="ptwo"><span>购买人名称:</span>{{ item.username || '暂无' }}</span>
-          </p>
-          <!-- <p class="newptwo">
-            <span>状态:</span
-            >{{
-              item.status == '0' ? '正在洽谈' : item.status == '1' ? '达成意向' : item.status == '2' ? '我的交易' : item.status == '4' ? '合同审核中' : '未识别'
-            }}
-          </p> -->
-
-          <p class="textOver"><span>说明:</span>{{ item.description || '暂无' }}</p>
-        </el-col>
-      </el-col>
-    </el-row>
-  </div>
-</template>
-
-<script>
-import { mapState, createNamespacedHelpers } from 'vuex';
-const { mapActions: transaction } = createNamespacedHelpers('transaction');
-
-export default {
-  name: 'auditList',
-  props: {},
-  components: {},
-  data: function() {
-    return {
-      list: [],
-    };
-  },
-  created() {
-    this.searchInfo();
-  },
-  methods: {
-    ...transaction({ transactionList: 'query', transactiondtetle: 'delete', shenheupdate: 'update' }),
-    async searchInfo({ skip = 0, limit = 1000, ...info } = {}) {
-      let market_userid = this.user.uid;
-      skip = this.skip;
-      const res = await this.transactionList({ skip, limit, market_userid, status: 1, ...info });
-      const arr = await this.transactionList({ skip, limit, market_userid, status: 4, ...info });
-      var newData = res.data.concat(arr.data);
-      if (this.$checkRes(newData)) {
-        this.$set(this, `list`, newData);
-      }
-    },
-
-    submit(item) {
-      this.$emit('submit', item);
-    },
-  },
-  computed: {
-    ...mapState(['user']),
-    pageTitle() {
-      return `${this.$route.meta.title}`;
-    },
-  },
-  metaInfo() {
-    return { title: this.$route.meta.title };
-  },
-};
-</script>
-
-<style lang="less" scoped>
-.info {
-  border-top: 1px solid #f5f5f5;
-  .list {
-    background: #fff;
-    padding: 0 10px;
-    border-bottom: 1px solid #ccc;
-    p {
-      font-size: 14px;
-      color: #000;
-      padding: 5px 0;
-    }
-    p:first-child {
-      font-size: 16px;
-    }
-    p:nth-child(2) .ptwo {
-      display: inline-block;
-      width: 50%;
-    }
-    p:nth-child(2) .ptwo span:first-child {
-      color: #ccc;
-    }
-    p:last-child span {
-      color: #ccc;
-    }
-  }
-}
-.newptwo {
-  color: #ccc !important;
-}
-</style>

+ 82 - 0
src/views/userCenter/matter/parts/list.vue

@@ -0,0 +1,82 @@
+<template>
+  <div id="list">
+    <el-row>
+      <el-col :span="24" class="metter">
+        <el-col :span="24" class="list" v-for="(item, index) in list" :key="index">
+          <p class="textOver">{{ item.product_name }}</p>
+          <p>
+            <span class="textOver">营销人:{{ item.market_username }}</span>
+            <span class="textOver">购买人:{{ item.username }}</span>
+          </p>
+          <p class="textOver">
+            交易状态:{{
+              item.status == '0' ? '正在洽谈' : item.status == '1' ? '达成意向' : item.status == '2' ? '我的交易' : item.status == '4' ? '合同审核中' : '暂无'
+            }}
+          </p>
+          <p>
+            <el-button type="primary" size="mini" v-if="item.status == '0' || item.status == '1'" @click="checkBtn(item)">{{
+              item.status == '0' ? '同意交易' : item.status == '1' ? '交易完成' : '暂无'
+            }}</el-button>
+          </p>
+        </el-col>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import { mapState, createNamespacedHelpers } from 'vuex';
+export default {
+  name: 'list',
+  props: {
+    list: { type: Array },
+  },
+  components: {},
+  data: function() {
+    return {};
+  },
+  created() {},
+  methods: {
+    checkBtn(data) {
+      this.$emit('checkBtn', data);
+    },
+  },
+  computed: {
+    ...mapState(['user']),
+    pageTitle() {
+      return `${this.$route.meta.title}`;
+    },
+  },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.metter {
+  padding: 0 10px;
+  .list {
+    padding: 10px 0;
+    border-bottom: 1px dashed #ccc;
+    p {
+      font-size: 16px;
+      color: #000;
+      padding: 0 0 10px 0;
+    }
+    p:nth-child(1) {
+      font-size: 18px;
+      font-weight: bold;
+    }
+    p:nth-child(2) {
+      span {
+        display: inline-block;
+        width: 50%;
+      }
+    }
+    p:nth-child(4) {
+      text-align: center;
+    }
+  }
+}
+</style>

+ 0 - 112
src/views/userCenter/matter/parts/negotiation.vue

@@ -1,112 +0,0 @@
-<template>
-  <div id="auditList">
-    <el-row>
-      <el-col :span="24" class="info">
-        <el-col :span="24" class="list" v-for="(item, index) in list" :key="index">
-          <p class="textOver">
-            <span @click="$router.push({ path: '/userCenter/matter/detailinfo', query: { id: item.id } })">{{ item.product_name }}</span>
-            <span style="float:right"><van-button type="info" size="small" @click="submit(item)">同意交易</van-button> </span>
-          </p>
-          <p>
-            <span class="ptwo"><span>营销人名称:</span>{{ item.market_username || '暂无' }}</span>
-            <span class="ptwo"><span>购买人名称:</span>{{ item.username || '暂无' }}</span>
-          </p>
-          <!-- <p class="newptwo">
-            <span>状态:</span
-            >{{
-              item.status == '0' ? '正在洽谈' : item.status == '1' ? '达成意向' : item.status == '2' ? '我的交易' : item.status == '4' ? '合同审核中' : '未识别'
-            }}
-          </p> -->
-          <p class="textOver"><span>说明:</span>{{ item.description || '暂无' }}</p>
-        </el-col>
-      </el-col>
-    </el-row>
-  </div>
-</template>
-
-<script>
-import { mapState, createNamespacedHelpers } from 'vuex';
-const { mapActions: transaction } = createNamespacedHelpers('transaction');
-
-export default {
-  name: 'auditList',
-  props: {},
-  components: {},
-  data: function() {
-    return {
-      list: [],
-    };
-  },
-  created() {
-    this.searchInfo();
-  },
-  methods: {
-    ...transaction({ transactionList: 'query', transactiondtetle: 'delete', shenheupdate: 'update' }),
-    async searchInfo({ skip = 0, limit = 1000, ...info } = {}) {
-      let market_userid = this.user.uid;
-      skip = this.skip;
-      const res = await this.transactionList({ skip, limit, market_userid, status: 0, ...info });
-      if (this.$checkRes(res)) {
-        this.$set(this, `list`, res.data);
-      }
-    },
-    async submit(item) {
-      item.status = '1';
-      let res = await this.shenheupdate(item);
-      if (this.$checkRes(res)) {
-        this.$message({
-          message: '同意交易提交成功',
-          type: 'success',
-        });
-        this.searchInfo();
-      }
-    },
-  },
-  computed: {
-    ...mapState(['user']),
-    pageTitle() {
-      return `${this.$route.meta.title}`;
-    },
-  },
-  metaInfo() {
-    return { title: this.$route.meta.title };
-  },
-};
-</script>
-
-<style lang="less" scoped>
-.info {
-  border-top: 1px solid #f5f5f5;
-  .list {
-    background: #fff;
-    padding: 0 10px;
-    border-bottom: 1px solid #ccc;
-    p {
-      font-size: 14px;
-      color: #000;
-      padding: 5px 0;
-    }
-    p:first-child {
-      font-size: 16px;
-    }
-    p:nth-child(2) .ptwo {
-      display: inline-block;
-      width: 50%;
-    }
-    p:nth-child(2) .ptwo span:first-child {
-      color: #ccc;
-    }
-    p:last-child span {
-      color: #ccc;
-    }
-  }
-}
-.content {
-  padding: 16px 16px 160px;
-  height: 160px;
-  background-color: aqua;
-}
-.newptwo {
-  color: #ccc !important;
-}
-</style>

+ 0 - 102
src/views/userCenter/matter/parts/transaction.vue

@@ -1,102 +0,0 @@
-<template>
-  <div id="auditList">
-    <el-row>
-      <el-col :span="24" class="info">
-        <el-col :span="24" class="list" v-for="(item, index) in list" :key="index">
-          <p class="textOver">
-            <span @click="$router.push({ path: '/userCenter/matter/detailinfo', query: { id: item.id } })">{{ item.product_name }}</span>
-          </p>
-          <p>
-            <span class="ptwo"><span>营销人名称:</span>{{ item.market_username || '暂无' }}</span>
-            <span class="ptwo"><span>购买人名称:</span>{{ item.username || '暂无' }}</span>
-          </p>
-          <!-- <p class="newptwo">
-            <span>状态:</span
-            >{{
-              item.status == '0' ? '正在洽谈' : item.status == '1' ? '达成意向' : item.status == '2' ? '我的交易' : item.status == '4' ? '合同审核中' : '未识别'
-            }}
-          </p> -->
-          <p class="textOver"><span>说明:</span>{{ item.description || '暂无' }}</p>
-        </el-col>
-      </el-col>
-    </el-row>
-  </div>
-</template>
-
-<script>
-import { mapState, createNamespacedHelpers } from 'vuex';
-const { mapActions: transaction } = createNamespacedHelpers('transaction');
-const { mapActions: expertsaudit } = createNamespacedHelpers('expertsaudit');
-export default {
-  name: 'auditList',
-  props: {},
-  components: {},
-  data: function() {
-    return {
-      list: [],
-    };
-  },
-  created() {
-    this.searchInfo();
-  },
-  methods: {
-    ...transaction({ transactionList: 'query', transactiondtetle: 'delete', shenheupdate: 'update' }),
-    async searchInfo({ skip = 0, limit = 1000, ...info } = {}) {
-      let market_userid = this.user.uid;
-      let userid = this.user.uid;
-      skip = this.skip;
-      const res = await this.transactionList({ skip, limit, market_userid, status: 2, ...info });
-      const arr = await this.transactionList({ skip, limit, userid, status: 2, ...info });
-      var newData = res.data.concat(arr.data);
-      if (this.$checkRes(res)) {
-        this.$set(this, `list`, newData);
-      }
-    },
-
-    async submit(data) {
-      console.log(data);
-    },
-  },
-  computed: {
-    ...mapState(['user']),
-    pageTitle() {
-      return `${this.$route.meta.title}`;
-    },
-  },
-  metaInfo() {
-    return { title: this.$route.meta.title };
-  },
-};
-</script>
-
-<style lang="less" scoped>
-.info {
-  border-top: 1px solid #f5f5f5;
-  .list {
-    background: #fff;
-    padding: 0 10px;
-    border-bottom: 1px solid #ccc;
-    p {
-      font-size: 14px;
-      color: #000;
-      padding: 5px 0;
-    }
-    p:first-child {
-      font-size: 16px;
-    }
-    p:nth-child(2) .ptwo {
-      display: inline-block;
-      width: 50%;
-    }
-    p:nth-child(2) .ptwo span:first-child {
-      color: #ccc;
-    }
-    p:last-child span {
-      color: #ccc;
-    }
-  }
-}
-.newptwo {
-  color: #ccc !important;
-}
-</style>

+ 0 - 100
src/views/userCenter/matter/parts/wholeList.vue

@@ -1,100 +0,0 @@
-<template>
-  <div id="auditList">
-    <el-row>
-      <el-col :span="24" class="info">
-        <el-col :span="24" class="list" v-for="(item, index) in list" :key="index">
-          <p class="textOver">
-            <span @click="$router.push({ path: '/userCenter/matter/detailinfo', query: { id: item.id } })">{{ item.product_name }}</span>
-          </p>
-          <p>
-            <span class="ptwo"><span>营销人名称:</span>{{ item.market_username || '暂无' }}</span>
-            <span class="ptwo"><span>购买人名称:</span>{{ item.username || '暂无' }}</span>
-          </p>
-          <p class="newptwo">
-            <span>状态:</span
-            >{{
-              item.status == '0' ? '正在洽谈' : item.status == '1' ? '达成意向' : item.status == '2' ? '我的交易' : item.status == '4' ? '合同审核中' : '未识别'
-            }}
-          </p>
-          <p class="textOver"><span>说明:</span>{{ item.description || '暂无' }}</p>
-        </el-col>
-      </el-col>
-    </el-row>
-  </div>
-</template>
-
-<script>
-import { mapState, createNamespacedHelpers } from 'vuex';
-const { mapActions: transaction } = createNamespacedHelpers('transaction');
-export default {
-  name: 'auditList',
-  props: {},
-  components: {},
-  data: function() {
-    return {
-      list: [],
-    };
-  },
-  created() {
-    this.searchInfo();
-  },
-  methods: {
-    ...transaction({ transactionList: 'query', transactiondtetle: 'delete', shenheupdate: 'update' }),
-    async searchInfo({ skip = 0, limit = 1000, ...info } = {}) {
-      let userid = this.user.uid;
-      let market_userid = this.user.uid;
-      const res = await this.transactionList({ skip, limit, userid, ...info });
-      const arr = await this.transactionList({ skip, limit, market_userid, ...info });
-      var newData = res.data.concat(arr.data);
-      if (this.$checkRes(newData)) {
-        this.$set(this, `list`, newData);
-      }
-    },
-
-    submit() {
-      console.log('submit');
-    },
-  },
-  computed: {
-    ...mapState(['user']),
-    pageTitle() {
-      return `${this.$route.meta.title}`;
-    },
-  },
-  metaInfo() {
-    return { title: this.$route.meta.title };
-  },
-};
-</script>
-
-<style lang="less" scoped>
-.info {
-  border-top: 1px solid #f5f5f5;
-  .list {
-    background: #fff;
-    padding: 0 10px;
-    border-bottom: 1px solid #ccc;
-    p {
-      font-size: 14px;
-      color: #000;
-      padding: 5px 0;
-    }
-    p:first-child {
-      font-size: 16px;
-    }
-    p:nth-child(2) .ptwo {
-      display: inline-block;
-      width: 50%;
-    }
-    p:nth-child(2) .ptwo span:first-child {
-      color: #ccc;
-    }
-    p:last-child span {
-      color: #ccc;
-    }
-  }
-}
-.newptwo {
-  color: #ccc !important;
-}
-</style>

+ 0 - 31
src/views/userCenter/out/index.vue

@@ -1,31 +0,0 @@
-<template>
-  <div id="index">
-    <el-row>
-      <el-col :span="24">
-        <p>index</p>
-      </el-col>
-    </el-row>
-  </div>
-</template>
-
-<script>
-import { mapState, createNamespacedHelpers } from 'vuex';
-export default {
-  metaInfo() {
-    return { title: this.$route.meta.title };
-  },
-  name: 'index',
-  props: {},
-  components: {},
-  data: function() {
-    return {};
-  },
-  created() {},
-  methods: {},
-  computed: {
-    ...mapState(['user']),
-  },
-};
-</script>
-
-<style lang="less" scoped></style>

+ 176 - 0
src/views/userCenter/parts/message.vue

@@ -0,0 +1,176 @@
+<template>
+  <div id="message">
+    <el-row>
+      <el-col :span="24">
+        <span v-if="form.role == '5'">
+          <van-form>
+            <van-field v-model="form.name" name="name" label="用户名" placeholder="请输入用户名" />
+            <van-field v-model="form.phone" name="phone" label="手机号" placeholder="请输入手机号" />
+            <van-field name="radio" label="用户类别">
+              <template #input>
+                <van-radio-group v-model="form.role" direction="horizontal">
+                  <van-radio name="5">机构</van-radio>
+                </van-radio-group>
+              </template>
+            </van-field>
+            <van-field v-model="form.code" name="code" label="所属机构" placeholder="请输入所属机构" readonly />
+            <van-field v-model="form.email" name="email" label="电子邮箱" placeholder="请输入电子邮箱"> </van-field>
+            <van-field v-model="form.addr" name="addr" label="联系地址" placeholder="请输入联系地址"> </van-field>
+            <van-field v-model="form.office_phone" name="office_phone" label="办公电话" placeholder="请输入办公电话"> </van-field>
+            <van-field v-model="form.profession" name="profession" label="所属行业" placeholder="请输入所属行业"> </van-field>
+            <van-field v-model="form.companytype" name="companytype" label="注册类型" placeholder="请输入注册类型"> </van-field>
+            <van-field
+              readonly
+              clickable
+              name="datetimePicker"
+              :value="form.companydate"
+              label="注册时间"
+              placeholder="点击选择时间"
+              @click="showPicker = true"
+            />
+            <van-popup v-model="showPicker" position="bottom">
+              <van-datetime-picker type="date" @confirm="onConfirm" @cancel="showPicker = false" />
+            </van-popup>
+            <van-field v-model="form.institution_code" name="institution_code" label="信用代码" placeholder="请输入信用代码" readonly> </van-field>
+            <van-field v-model="form.companycapital" name="companycapital" label="注册资金" placeholder="请输入注册资金"> </van-field>
+            <van-field v-model="form.companyperson" name="companyperson" label="企业法人" placeholder="请输入企业法人"> </van-field>
+            <van-field v-model="form.sndqyzsr" name="sndqyzsr" label="总收入" placeholder="请输入总收入"> </van-field>
+            <van-field v-model="form.sndyffy" name="sndyffy" label="研发费用" placeholder="请输入研发费用"> </van-field>
+            <van-field v-model="form.companytotal" name="companytotal" label="总人数" placeholder="请输入总人数"> </van-field>
+            <van-field v-model="form.companybrief" maxlength="300" rows="1" show-word-limit label="企业简介" type="textarea" placeholder="请输入企业简介" />
+            <van-field v-model="form.mainproduct" maxlength="300" rows="1" show-word-limit label="主要产品" type="textarea" placeholder="请输入主要产品" />
+            <van-field v-model="form.qualifications" maxlength="300" rows="1" show-word-limit label="资质/荣誉" type="textarea" placeholder="请输入资质/荣誉" />
+            <div style="margin: 16px;text-align:center;">
+              <el-button type="primary" size="medium" round @click="onSubmit">信息保存</el-button>
+            </div>
+          </van-form>
+        </span>
+        <span v-else>
+          <van-form>
+            <van-field v-model="form.name" name="name" label="用户名" placeholder="请输入用户名" />
+            <van-field v-model="form.phone" name="phone" label="手机号" placeholder="请输入手机号" />
+            <van-field name="radio" label="用户类别">
+              <template #input>
+                <van-radio-group v-model="form.role" direction="horizontal">
+                  <van-radio name="4">个人</van-radio>
+                  <van-radio name="6">专家</van-radio>
+                </van-radio-group>
+              </template>
+            </van-field>
+            <van-field v-model="form.code" name="code" label="所属机构" placeholder="请输入机构代码" readonly> </van-field>
+            <span v-if="form.role == '4'">
+              <van-field v-model="form.email" name="email" label="电子邮箱" placeholder="请输入电子邮箱"> </van-field>
+              <van-field v-model="form.addr" name="addr" label="联系地址" placeholder="请输入联系地址"> </van-field>
+              <van-field v-model="form.office_phone" name="office_phone" label="办公电话" placeholder="请输入办公电话"> </van-field>
+              <van-field v-model="form.profession" name="profession" label="所属行业" placeholder="请输入所属行业"> </van-field>
+            </span>
+            <span v-else-if="form.role == '6'">
+              <van-field v-model="form.company" name="company" label="工作单位" placeholder="请输入工作单位"> </van-field>
+              <van-field v-model="form.school" name="school" label="毕业院校" placeholder="请输入毕业院校"> </van-field>
+              <van-field v-model="form.education" name="education" label="最高学历" placeholder="请输入最高学历"> </van-field>
+              <van-field
+                readonly
+                clickable
+                name="datetimePicker"
+                :value="form.birthDate"
+                label="出生日期"
+                placeholder="点击选择时间"
+                @click="birthDatepic = true"
+              />
+              <van-popup v-model="birthDatepic" position="bottom">
+                <van-datetime-picker type="date" @confirm="birthDateOnsubmit" @cancel="birthDatepic = false" />
+              </van-popup>
+              <van-field v-model="form.qqwx" name="qqwx" label="QQ/微信" placeholder="请输入QQ/微信"> </van-field>
+              <van-field v-model="form.email" name="email" label="电子邮箱" placeholder="请输入电子邮箱"> </van-field>
+              <van-field v-model="form.zwzc" name="zwzc" label="职务职称" placeholder="请输入职务职称"> </van-field>
+              <van-field v-model="form.expertise" name="expertise" label="擅长领域" placeholder="请输入擅长领域"> </van-field>
+              <van-field name="expertimage" label="头像上传">
+                <template #input
+                  ><upload :limit="1" :data="form.expertimage" type="expertimage" :url="'/files/imgpath/upload'" @upload="uploadSuccess"></upload>
+                </template>
+              </van-field>
+              <van-field v-model="form.workexperience" maxlength="300" rows="1" show-word-limit label="工作经历" type="textarea" placeholder="请输入工作经历" />
+              <van-field v-model="form.scientific" maxlength="300" rows="1" show-word-limit label="科研综述" type="textarea" placeholder="请输入科研综述" />
+              <van-field
+                v-model="form.undertakingproject"
+                maxlength="300"
+                rows="2"
+                show-word-limit
+                label="承担项目"
+                type="textarea"
+                placeholder="请输入承担项目"
+              />
+              <van-field v-model="form.scienceaward" maxlength="300" rows="2" show-word-limit label="科技奖励" type="textarea" placeholder="请输入科技奖励" />
+              <van-field v-model="form.social" maxlength="300" rows="2" show-word-limit label="社会任职" type="textarea" placeholder="请输入社会任职" />
+            </span>
+            <div style="margin: 16px;text-align:center;">
+              <el-button type="primary" size="medium" round @click="onSubmit">信息保存</el-button>
+              <el-button type="primary" size="medium" round v-if="user.role == '4'" @click="expertBtn">升级用户</el-button>
+            </div>
+          </van-form>
+        </span>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import { mapState, createNamespacedHelpers } from 'vuex';
+var moment = require('moment');
+import upload from '@/components/upload.vue';
+export default {
+  name: 'message',
+  props: {
+    form: { type: Object },
+  },
+  components: {
+    upload,
+  },
+  data: function() {
+    return {
+      // 注册时间
+      showPicker: false,
+      // 出生日期
+      birthDatepic: false,
+    };
+  },
+  created() {},
+  methods: {
+    // 信息保存
+    onSubmit() {
+      this.$emit('onSubmit', { data: this.form });
+    },
+    // 升级用户
+    expertBtn() {
+      this.$emit('expertBtn', { data: this.form });
+    },
+    // 注册时间
+    onConfirm(time) {
+      let date = moment(time).format('YYYY-MM-DD');
+      if (date) this.$set(this.form, `companydate`, date);
+      this.showPicker = false;
+    },
+    // 出生日期
+    birthDateOnsubmit(time) {
+      let date = moment(time).format('YYYY-MM-DD');
+      if (date) this.$set(this.form, `birthDate`, date);
+      this.birthDatepic = false;
+    },
+    // 头像
+    uploadSuccess({ type, data }) {
+      this.$set(this.form, `${type}`, data.uri);
+    },
+  },
+  computed: {
+    ...mapState(['user']),
+    pageTitle() {
+      return `${this.$route.meta.title}`;
+    },
+  },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+};
+</script>
+
+<style lang="less" scoped></style>

+ 0 - 327
src/views/userCenter/parts/person.vue

@@ -1,327 +0,0 @@
-<template>
-  <div id="person">
-    <el-row>
-      <el-col :span="24">
-        <el-col :span="24" class="top">
-          <NavBar v-show="navShow" :title="title" :isleftarrow="isleftarrow"> </NavBar>
-        </el-col>
-        <el-col :span="24" class="info">
-          <van-form ref="form" :model="form" :rules="rules">
-            <el-col :span="24">
-              <van-field v-model="form.name" name="name" label="用户名" placeholder="请输入用户名" class="specail" />
-            </el-col>
-            <el-col :span="24">
-              <van-field v-model="form.phone" name="phone" label="手机号" placeholder="请输入手机号" class="specail" />
-            </el-col>
-            <el-col :span="24" v-if="user.role == '4'">
-              <van-field name="radio" label="用户类别">
-                <template #input>
-                  <van-radio-group v-model="form.role" direction="horizontal">
-                    <van-radio name="4">个人</van-radio>
-                    <van-radio name="6">专家</van-radio>
-                  </van-radio-group>
-                </template>
-              </van-field>
-            </el-col>
-            <el-col :span="24">
-              <van-field v-model="form.code" name="code" label="所属机构" placeholder="请输入机构代码" readonly> </van-field>
-            </el-col>
-            <span v-if="form.role == '4' || form.role == '5'">
-              <el-col :span="24">
-                <van-field v-model="form.email" name="email" label="电子邮箱" placeholder="请输入电子邮箱"> </van-field>
-              </el-col>
-              <el-col :span="24">
-                <van-field v-model="form.addr" name="addr" label="联系地址" placeholder="请输入联系地址"> </van-field>
-              </el-col>
-              <el-col :span="24">
-                <van-field v-model="form.office_phone" name="office_phone" label="办公电话" placeholder="请输入办公电话"> </van-field>
-              </el-col>
-              <el-col :span="24">
-                <van-field v-model="form.profession" name="profession" label="所属行业" placeholder="请输入所属行业"> </van-field>
-              </el-col>
-            </span>
-            <span v-if="form.role == '5'">
-              <el-col :span="24">
-                <van-field v-model="form.companytype" name="companytype" label="注册类型" placeholder="请输入注册类型"> </van-field>
-              </el-col>
-              <el-col :span="24">
-                <van-field
-                  readonly
-                  clickable
-                  name="datetimePicker"
-                  :value="form.companydate"
-                  label="注册时间"
-                  placeholder="点击选择时间"
-                  @click="showPicker = true"
-                />
-                <van-popup v-model="showPicker" position="bottom">
-                  <van-datetime-picker type="date" @confirm="onConfirm" @cancel="showPicker = false" />
-                </van-popup>
-              </el-col>
-              <el-col :span="24">
-                <van-field v-model="form.institution_code" name="institution_code" label="信用代码" placeholder="请输入信用代码" readonly> </van-field>
-              </el-col>
-              <el-col :span="24">
-                <van-field v-model="form.companycapital" name="companycapital" label="注册资金" placeholder="请输入注册资金"> </van-field>
-              </el-col>
-              <el-col :span="24">
-                <van-field v-model="form.companyperson" name="companyperson" label="企业法人" placeholder="请输入企业法人"> </van-field>
-              </el-col>
-              <el-col :span="24">
-                <van-field v-model="form.sndqyzsr" name="sndqyzsr" label="总收入" placeholder="请输入总收入"> </van-field>
-              </el-col>
-              <el-col :span="24">
-                <van-field v-model="form.sndyffy" name="sndyffy" label="研发费用" placeholder="请输入研发费用"> </van-field>
-              </el-col>
-              <el-col :span="24">
-                <van-field v-model="form.companytotal" name="companytotal" label="总人数" placeholder="请输入总人数"> </van-field>
-              </el-col>
-              <el-col :span="24" class="langInfo">
-                <van-field v-model="form.companybrief" maxlength="300" rows="1" show-word-limit label="企业简介" type="textarea" placeholder="请输入企业简介" />
-              </el-col>
-              <el-col :span="24" class="langInfo">
-                <van-field v-model="form.mainproduct" maxlength="300" rows="1" show-word-limit label="主要产品" type="textarea" placeholder="请输入主要产品" />
-              </el-col>
-              <el-col :span="24" class="langInfo">
-                <van-field
-                  v-model="form.qualifications"
-                  maxlength="300"
-                  rows="1"
-                  show-word-limit
-                  label="资质/荣誉"
-                  type="textarea"
-                  placeholder="请输入资质/荣誉"
-                />
-              </el-col>
-            </span>
-            <span v-else-if="form.role == '6'">
-              <el-col :span="24">
-                <van-field v-model="form.company" name="company" label="工作单位" placeholder="请输入工作单位"> </van-field>
-              </el-col>
-              <el-col :span="24">
-                <van-field v-model="form.school" name="school" label="毕业院校" placeholder="请输入毕业院校"> </van-field>
-              </el-col>
-              <el-col :span="24">
-                <van-field v-model="form.education" name="education" label="最高学历" placeholder="请输入最高学历"> </van-field>
-              </el-col>
-              <el-col :span="24">
-                <van-field
-                  readonly
-                  clickable
-                  name="datetimePicker"
-                  :value="form.birthDate"
-                  label="出生日期"
-                  placeholder="点击选择时间"
-                  @click="showPicker = true"
-                />
-                <van-popup v-model="showPicker" position="bottom">
-                  <van-datetime-picker type="date" @confirm="onConfirm1" @cancel="showPicker = false" />
-                </van-popup>
-              </el-col>
-              <el-col :span="24">
-                <van-field v-model="form.qqwx" name="qqwx" label="QQ/微信" placeholder="请输入QQ/微信"> </van-field>
-              </el-col>
-              <el-col :span="24">
-                <van-field v-model="form.email" name="email" label="电子邮箱" placeholder="请输入电子邮箱"> </van-field>
-              </el-col>
-              <el-col :span="24">
-                <van-field v-model="form.zwzc" name="zwzc" label="职务职称" placeholder="请输入职务职称"> </van-field>
-              </el-col>
-              <el-col :span="24">
-                <van-field v-model="form.expertise" name="expertise" label="擅长领域" placeholder="请输入擅长领域"> </van-field>
-              </el-col>
-              <el-col :span="24" class="langInfoImage">
-                <van-field name="expertimage" label="头像上传">
-                  <template #input
-                    ><upload :limit="1" :data="form.expertimage" type="expertimage" :url="'/files/imgpath/upload'" @upload="uploadSuccess"></upload>
-                  </template>
-                </van-field>
-              </el-col>
-              <el-col :span="24" class="langInfo">
-                <!-- <van-field v-model="form.workexperience" name="workexperience" label="工作经历" placeholder="请输入工作经历"> </van-field> -->
-                <van-field
-                  v-model="form.workexperience"
-                  maxlength="300"
-                  rows="1"
-                  show-word-limit
-                  label="工作经历"
-                  type="textarea"
-                  placeholder="请输入工作经历"
-                />
-              </el-col>
-              <el-col :span="24" class="langInfo">
-                <van-field v-model="form.scientific" maxlength="300" rows="1" show-word-limit label="科研综述" type="textarea" placeholder="请输入科研综述" />
-                <!-- <van-field v-model="form.scientific" rows="1" show-word-limit maxlength="300" autosize label="科研综述" type="textarea" placeholder="科研综述" /> -->
-              </el-col>
-              <el-col :span="24" class="langInfo">
-                <van-field
-                  v-model="form.undertakingproject"
-                  maxlength="300"
-                  rows="2"
-                  show-word-limit
-                  label="承担项目"
-                  type="textarea"
-                  placeholder="请输入承担项目"
-                />
-              </el-col>
-              <el-col :span="24" class="langInfo">
-                <van-field v-model="form.scienceaward" maxlength="300" rows="2" show-word-limit label="科技奖励" type="textarea" placeholder="请输入科技奖励" />
-              </el-col>
-              <el-col :span="24" class="langInfo">
-                <van-field v-model="form.social" maxlength="300" rows="2" show-word-limit label="社会任职" type="textarea" placeholder="请输入社会任职" />
-              </el-col>
-            </span>
-            <span v-if="form.status == '3'">
-              <el-col :span="24">
-                <van-field name="status" label="用户审核状态">
-                  <template #input>
-                    <van-radio-group v-model="form.status" direction="horizontal">
-                      <van-radio name="0">待审核</van-radio>
-                      <van-radio name="3">待认证</van-radio>
-                    </van-radio-group>
-                  </template>
-                </van-field>
-              </el-col>
-            </span>
-            <el-col :span="24" class="btn">
-              <el-button type="primary" @click="authSubmit" v-if="form.status == '0' || form.status == '3'">提交认证</el-button>
-              <el-button type="primary" @click="upgradeSubmit" v-if="user.role == '4'">升级用户</el-button>
-              <el-button type="primary" @click="onSubmit">提交修改</el-button>
-            </el-col>
-          </van-form>
-        </el-col>
-      </el-col>
-    </el-row>
-  </div>
-</template>
-
-<script>
-import { mapState, createNamespacedHelpers } from 'vuex';
-import NavBar from '@/layout/common/topInfo.vue';
-const { mapActions: login } = createNamespacedHelpers('login');
-const { mapActions: market } = createNamespacedHelpers('marketuser');
-const { mapActions: expertsuser } = createNamespacedHelpers('exportuser');
-var moment = require('moment');
-import upload from '@/components/upload.vue';
-export default {
-  metaInfo() {
-    return { title: this.$route.meta.title };
-  },
-  name: 'person',
-  names: {},
-  components: {
-    NavBar,
-    upload,
-  },
-  data: function() {
-    return {
-      // 头部标题
-      title: '',
-      // meta为true
-      isleftarrow: '',
-      // 返回
-      navShow: true,
-      //信息表
-      form: {},
-      rules: {
-        name: [{ required: true, message: '请输入用户名称', trigger: 'blur' }],
-        phone: [{ required: true, message: '请输入手机号', trigger: 'blur' }],
-        password: [{ required: true, message: '请输入密码', trigger: 'blur' }],
-        role: [{ required: true, message: '请输入用户类型', trigger: 'blur' }],
-        institution_code: [{ required: true, message: '请输入统一社会信用代码', trigger: 'blur' }],
-      },
-      // value: '',
-      showPicker: false,
-    };
-  },
-  created() {
-    this.searchInfo();
-  },
-  methods: {
-    ...login({ logout: 'logout', transactiondtetle: 'delete' }),
-    ...market(['fetch', 'update']),
-    ...expertsuser({ expertsuserFetch: 'fetch', expertsuserUpdate: 'update', expertsuserUpgrade: 'upgrade' }),
-    async searchInfo() {
-      if (this.user.role == '4' || this.user.role == '5') {
-        let res = await this.fetch(this.user.userid);
-        if (res.errcode === 0) {
-          this.$set(this, `form`, res.data);
-        }
-      } else if (this.user.role == '6') {
-        let res = await this.expertsuserFetch(this.user.userid);
-        if (res.errcode === 0) {
-          console.log(res);
-          this.$set(this, `form`, res.data);
-        }
-      }
-    },
-    async onSubmit() {
-      if (this.form.role == '4' || this.form.role == '5' || this.form.role == '7') {
-        let res;
-        let msg;
-        res = await this.update(this.form);
-      } else if (this.form.role == '6') {
-        let res;
-        let msg;
-        res = await this.expertsuserUpdate(this.form);
-      }
-      this.$notify({
-        message: '修改信息成功',
-        type: 'success',
-      });
-      this.searchInfo();
-    },
-    async authSubmit() {
-      let res;
-      let msg;
-      res = await this.update(this.form);
-      this.$notify({
-        message: '提交认证信息成功,等待管理员认证',
-        type: 'success',
-      });
-      this.searchInfo();
-    },
-    async upgradeSubmit() {
-      this.form.status = '0';
-      this.form.uid = this.user.uid;
-      let res = await this.expertsuserUpgrade(this.form);
-      if (this.$checkRes(res)) {
-        this.$notify({
-          message: '用户升级成功,等待管理员审核',
-          type: 'success',
-        });
-        this.logout();
-        this.$router.push({ path: '/webLogin' });
-      } else {
-        this.$notify({
-          message: res.errmsg,
-          type: 'danger',
-        });
-      }
-    },
-    uploadSuccess({ type, data }) {
-      this.$set(this.form, `${type}`, data.uri);
-    },
-    onConfirm(time) {
-      let date = moment(time).format('YYYY-MM-DD');
-      if (date) this.$set(this.form, `companydate`, date);
-      this.showPicker = false;
-    },
-    onConfirm1(time) {
-      let date = moment(time).format('YYYY-MM-DD');
-      if (date) this.$set(this.form, `birthDate`, date);
-      this.showPicker = false;
-    },
-  },
-  computed: {
-    ...mapState(['user']),
-  },
-};
-</script>
-
-<style lang="less" scoped>
-.btn {
-  text-align: center;
-  margin: 10px 0;
-}
-</style>

+ 57 - 43
src/views/userCenter/user/index.vue

@@ -6,7 +6,7 @@
           <NavBar v-show="navShow" :title="title" :isleftarrow="isleftarrow"> </NavBar>
         </el-col>
         <el-col :span="24" class="main">
-          <person></person>
+          <message :form="form" @onSubmit="onSubmit" @expertBtn="expertBtn"></message>
         </el-col>
       </el-col>
     </el-row>
@@ -15,16 +15,17 @@
 
 <script>
 import NavBar from '@/layout/common/topInfo.vue';
-import person from '../parts/person.vue';
+import message from '../parts/message.vue';
 import { mapState, createNamespacedHelpers } from 'vuex';
-// const { mapActions: market } = createNamespacedHelpers('market');
-// const { mapActions: expertsuser } = createNamespacedHelpers('expertsuser');
+const { mapActions: login } = createNamespacedHelpers('login');
+const { mapActions: market } = createNamespacedHelpers('marketuser');
+const { mapActions: expertsuser } = createNamespacedHelpers('exportuser');
 export default {
   name: 'index',
   props: {},
   components: {
     NavBar,
-    person, //个人信息维护
+    message, //个人信息维护
   },
   data: () => ({
     // 头部标题
@@ -33,47 +34,64 @@ export default {
     isleftarrow: '',
     // 返回
     navShow: true,
-    // 个人信息
     form: {},
   }),
-  created() {
-    // this.searchInfo();
+  async created() {
+    await this.search();
   },
   computed: {
     ...mapState(['user']),
   },
   methods: {
-    // ...market(['fetch', 'update']),
-    // ...expertsuser({ expertsuserFetch: 'fetch', expertsuserUpdate: 'update', expertsuserUpgrade: 'upgrade' }),
-    // async searchInfo() {
-    //   if (this.user.role == '4' || this.user.role == '5' || this.user.role == '7') {
-    //     let res = await this.fetch(this.user.userid);
-    //     if (res.errcode === 0) {
-    //       this.$set(this, `form`, res.data);
-    //     }
-    //   } else if (this.user.role == '6') {
-    //     let res = await this.expertsuserFetch(this.user.userid);
-    //     if (res.errcode === 0) {
-    //       this.$set(this, `form`, res.data);
-    //     }
-    //   }
-    // },
-    // async onSubmit({ data }) {
-    //   if (data.role == '4' || data.role == '5' || data.role == '7') {
-    //     let res;
-    //     let msg;
-    //     res = await this.update(data);
-    //   } else if (data.role == '6') {
-    //     let res;
-    //     let msg;
-    //     res = await this.expertsuserUpdate(data);
-    //   }
-    //   this.$notify({
-    //     message: '个人信息修改成功',
-    //     type: 'success',
-    //   });
-    //   this.$router.push({ path: '/user/index' });
-    // },
+    ...login({ logout: 'logout' }),
+    ...market(['fetch', 'update']),
+    ...expertsuser({ expertsuserFetch: 'fetch', expertsuserUpdate: 'update', expertsuserUpgrade: 'upgrade' }),
+    // 查询详情
+    async search() {
+      if (this.user.role == '4' || this.user.role == '5') {
+        let res = await this.fetch(this.user.userid);
+        if (res.errcode === 0) {
+          this.$set(this, `form`, res.data);
+        }
+      } else if (this.user.role == '6') {
+        let res = await this.expertsuserFetch(this.user.userid);
+        if (res.errcode === 0) {
+          this.$set(this, `form`, res.data);
+        }
+      }
+    },
+    // 修改信息
+    async onSubmit({ data }) {
+      if (data.role == '4' || data.role == '5') {
+        let res = await this.update(data);
+        this.$notify({
+          message: '修改信息成功',
+          type: 'success',
+        });
+        this.search();
+      } else if (data.role == '6') {
+        let res = await this.expertsuserUpdate(data);
+        this.$notify({
+          message: '修改信息成功',
+          type: 'success',
+        });
+        this.search();
+      }
+    },
+    // 升级用户
+    async expertBtn({ data }) {
+      data.status = '0';
+      data.uid = this.user.uid;
+      let res = await this.expertsuserUpgrade(data);
+      if (this.$checkRes(res)) {
+        this.$notify({
+          message: '用戶升級成功,等待管理员审核',
+          type: 'success',
+        });
+        this.logout();
+        this.$router.push({ path: '/login' });
+      }
+    },
   },
   mounted() {
     this.title = this.$route.meta.title;
@@ -98,8 +116,4 @@ export default {
 .main {
   min-height: 570px;
 }
-.foot {
-  position: absolute;
-  bottom: 0;
-}
 </style>