guhongwei vor 4 Jahren
Ursprung
Commit
8dd456cca8

+ 6 - 0
src/router/index.js

@@ -124,6 +124,12 @@ const routes = [
     meta: { title: '展会信息管理', isleftarrow: true },
     meta: { title: '展会信息管理', isleftarrow: true },
     component: () => import('../views/adminCenter/duijiehui/add.vue'),
     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: '/login',
     path: '/login',

+ 34 - 45
src/views/adminCenter/enterpriseProduct/index.vue

@@ -6,7 +6,17 @@
           <NavBar v-show="navShow" :title="title" :isleftarrow="isleftarrow"> </NavBar>
           <NavBar v-show="navShow" :title="title" :isleftarrow="isleftarrow"> </NavBar>
         </el-col>
         </el-col>
         <el-col :span="24" class="main">
         <el-col :span="24" class="main">
-          <list></list>
+          <van-tabs v-model="active">
+            <van-tab title="待审核">
+              <list></list>
+            </van-tab>
+            <van-tab title="审核成功">
+              <list></list>
+            </van-tab>
+            <van-tab title="审核拒绝">
+              <list></list>
+            </van-tab>
+          </van-tabs>
         </el-col>
         </el-col>
       </el-col>
       </el-col>
     </el-row>
     </el-row>
@@ -14,32 +24,39 @@
 </template>
 </template>
 
 
 <script>
 <script>
-import { mapState, createNamespacedHelpers } from 'vuex';
-import NavBar from '@/layout/common/topInfo.vue';
 import list from './parts/list.vue';
 import list from './parts/list.vue';
+import NavBar from '@/layout/common/topInfo.vue';
+import { mapState, createNamespacedHelpers } from 'vuex';
 export default {
 export default {
   name: 'index',
   name: 'index',
   props: {},
   props: {},
-  components: { NavBar, list },
-  data: () => ({
-    // 头部标题
-    title: '',
-    // meta为true
-    isleftarrow: '',
-    // 返回
-    navShow: true,
-    img_path: require('@/assets/logo.png'),
-    active: 0,
-    show: false,
-    newform: {},
-  }),
+  components: {
+    NavBar,
+    list,
+  },
+  data: function() {
+    return {
+      // 头部标题
+      title: '',
+      // meta为true
+      isleftarrow: '',
+      // 返回
+      navShow: true,
+      active: '1',
+    };
+  },
   created() {},
   created() {},
-  computed: {},
   methods: {},
   methods: {},
+  computed: {
+    ...mapState(['user']),
+  },
   mounted() {
   mounted() {
     this.title = this.$route.meta.title;
     this.title = this.$route.meta.title;
     this.isleftarrow = this.$route.meta.isleftarrow;
     this.isleftarrow = this.$route.meta.isleftarrow;
   },
   },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
 };
 };
 </script>
 </script>
 
 
@@ -53,36 +70,8 @@ export default {
 .top {
 .top {
   height: 46px;
   height: 46px;
   overflow: hidden;
   overflow: hidden;
-  position: relative;
-  z-index: 999;
 }
 }
 .main {
 .main {
   min-height: 570px;
   min-height: 570px;
-  .two {
-    position: fixed;
-    top: 80%;
-
-    left: 10px;
-    z-index: 999;
-  }
-}
-/deep/.van-tab {
-  text-align: center;
-}
-/deep/.van-tabs--line .van-tabs__wrap {
-  height: 70px;
-  margin: 0 0 10px 0;
-}
-/deep/.van-tab--active {
-  color: red;
-}
-.van-icon {
-  font-size: 20px;
-}
-/deep/.van-popup--bottom {
-  bottom: 0;
-  left: 0;
-  width: 100%;
-  height: 300px;
 }
 }
 </style>
 </style>

+ 7 - 96
src/views/adminCenter/enterpriseProduct/parts/list.vue

@@ -1,83 +1,20 @@
 <template>
 <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">
-          <el-col :span="16" class="textOver">
-            {{ item.name }}
-          </el-col>
-          <el-col :span="8" v-if="item.status == '0'">
-            <el-button type="text" size="mini" @click="sussess(item)">审核通过</el-button>
-            <el-button type="text" size="mini" @click="fail(item)">审核拒绝</el-button>
-          </el-col>
-          <el-col :span="24" class="listInfo">
-            <span>类型:</span><span>{{ item.status == '0' ? '技术' : item.status == '1' ? '产品' : '服务' }}</span>
-          </el-col>
-          <el-col :span="24" class="listInfo">
-            <span>联系人:</span><span>{{ item.contact_user }}</span>
-          </el-col>
-          <el-col :span="24" class="listInfo">
-            <span>审核状态:</span><span>{{ item.status == '0' ? '待审核' : item.status == '1' ? '审核成功' : item.status == '2' ? '审核拒绝' : '草稿' }}</span>
-          </el-col>
-        </el-col>
-      </el-col>
-    </el-row>
+  <div id="list">
+    <p>list</p>
   </div>
   </div>
 </template>
 </template>
 
 
 <script>
 <script>
 import { mapState, createNamespacedHelpers } from 'vuex';
 import { mapState, createNamespacedHelpers } from 'vuex';
-const { mapActions: product } = createNamespacedHelpers('marketproduct');
-
 export default {
 export default {
-  name: 'auditList',
+  name: 'list',
   props: {},
   props: {},
   components: {},
   components: {},
   data: function() {
   data: function() {
-    return {
-      list: [{ name: '1' }],
-    };
-  },
-  created() {
-    this.searchInfo();
-  },
-  methods: {
-    ...product(['query', 'update', 'comquery']),
-    async searchInfo() {
-      if (this.user.role == '0') {
-        const arr = await this.query();
-        this.$set(this, `list`, arr.data);
-      } else {
-        let code = this.user.code;
-        let pid = this.user.uid;
-        const arr = await this.comquery({ code, pid });
-        const arr1 = await this.comquery({ status: 1, code, pid });
-        const arr2 = await this.comquery({ status: 2, code, pid });
-        var Data = arr1.data.concat(arr.data);
-        var newData = arr2.data.concat(Data);
-        this.$set(this, `list`, newData);
-      }
-    },
-    async sussess(item) {
-      item.status = '1';
-      let res = await this.update(item);
-      this.$message({
-        message: '信息审核成功',
-        type: 'success',
-      });
-      this.searchInfo();
-    },
-
-    async fail(item) {
-      item.status = '2';
-      let res = await this.update(item);
-      this.$message({
-        message: '信息审核成功',
-        type: 'success',
-      });
-      this.searchInfo();
-    },
+    return {};
   },
   },
+  created() {},
+  methods: {},
   computed: {
   computed: {
     ...mapState(['user']),
     ...mapState(['user']),
     pageTitle() {
     pageTitle() {
@@ -90,30 +27,4 @@ export default {
 };
 };
 </script>
 </script>
 
 
-<style lang="less" scoped>
-.newuser {
-  float: right;
-  padding: 10px 0 10px 10px;
-}
-.info {
-  border-top: 1px solid #f5f5f5;
-  .list {
-    background: #fff;
-    padding: 5px 10px;
-    border-bottom: 1px solid #ccc;
-    .listInfo {
-      font-size: 14px;
-      color: #000;
-      padding: 5px 0 0 0;
-      span:first-child {
-        color: #ccc;
-      }
-    }
-  }
-}
-.content {
-  padding: 16px 16px 160px;
-  height: 160px;
-  background-color: aqua;
-}
-</style>
+<style lang="less" scoped></style>

+ 12 - 2
src/views/user/parts/clickBtn.vue

@@ -13,7 +13,7 @@
           <span v-if="user.role == '0'">
           <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/user/index' })" />
             <van-cell is-link title="展会管理" @click="$router.push({ path: '/adminCenter/duijiehui/index' })" />
             <van-cell is-link title="展会管理" @click="$router.push({ path: '/adminCenter/duijiehui/index' })" />
-            <van-cell is-link title="审核管理" @click="$router.push({ path: '' })" />
+            <van-cell is-link title="审核管理" @click="$router.push({ path: '/adminCenter/enterpriseProduct/index' })" />
             <van-cell is-link title="交易审核" @click="$router.push({ path: '' })" />
             <van-cell is-link title="交易审核" @click="$router.push({ path: '' })" />
           </span>
           </span>
           <span v-else-if="user.role == '1'">
           <span v-else-if="user.role == '1'">
@@ -26,6 +26,7 @@
             展会vip用户
             展会vip用户
           </span>
           </span>
         </span>
         </span>
+        <van-cell is-link title="退出登录" @click="loginOut()" />
         <!-- <span v-else>
         <!-- <span v-else>
           <span v-if="user.role == '0'">
           <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/user/index' })" />
@@ -79,7 +80,7 @@ export default {
     this.searchMenu();
     this.searchMenu();
   },
   },
   methods: {
   methods: {
-    ...login(['toGetMenu']),
+    ...login(['toGetMenu', 'logout']),
     async searchMenu() {
     async searchMenu() {
       const res = await this.toGetMenu({ id: this.user.uid });
       const res = await this.toGetMenu({ id: this.user.uid });
       for (const val of res.data.menus) {
       for (const val of res.data.menus) {
@@ -94,6 +95,15 @@ export default {
         }
         }
       }
       }
     },
     },
+    // 退出登录
+    async loginOut() {
+      this.logout();
+      this.$notify({
+        message: '退出成功',
+        type: 'success',
+      });
+      this.$router.push({ path: '/live/index' });
+    },
   },
   },
   computed: {
   computed: {
     ...mapState(['user']),
     ...mapState(['user']),