guhongwei 4 年之前
父節點
當前提交
2021f64162
共有 5 個文件被更改,包括 12281 次插入87 次删除
  1. 12216 0
      package-lock.json
  2. 1 0
      package.json
  3. 6 1
      src/layout/duijiehui/duijiedetail.vue
  4. 12 9
      src/views/duijiehui/detail.vue
  5. 46 77
      src/views/duijiehui/index.vue

文件差異過大導致無法顯示
+ 12216 - 0
package-lock.json


+ 1 - 0
package.json

@@ -11,6 +11,7 @@
     "axios": "^0.19.2",
     "core-js": "^3.6.4",
     "element-ui": "^2.13.2",
+    "jsonwebtoken": "^8.5.1",
     "lodash": "^4.17.15",
     "naf-core": "^0.1.2",
     "qrcode": "^1.4.4",

+ 6 - 1
src/layout/duijiehui/duijiedetail.vue

@@ -52,8 +52,13 @@
             <el-form-item label="对接会视频">
               <upload :limit="1" :data="form.file_path" type="file_path" listType="" :url="'/files/imgpath/upload'" @upload="uploadSuccess"></upload>
             </el-form-item>
+            <el-form-item label="状态">
+              <el-radio v-model="form.status" label="1">开始</el-radio>
+              <el-radio v-model="form.status" label="2">结束</el-radio>
+            </el-form-item>
             <el-form-item>
-              <el-button type="primary" @click="onSubmit()">提交</el-button>
+              <el-button type="primary" @click="onSubmit()">信息保存</el-button>
+              <el-button type="primary" @click="onSubmit()" v-if="form.status === '1' || form.status === '2'">对接开启&结束提交</el-button>
             </el-form-item>
           </el-form>
         </el-col>

+ 12 - 9
src/views/duijiehui/detail.vue

@@ -18,6 +18,7 @@ import { createNamespacedHelpers, mapState } from 'vuex';
 const { mapActions: live } = createNamespacedHelpers('live');
 const { mapActions: place } = createNamespacedHelpers('place');
 const { mapActions: authUser } = createNamespacedHelpers('authUser');
+const jwt = require('jsonwebtoken');
 
 export default {
   name: 'columnDetail',
@@ -75,21 +76,23 @@ export default {
       if (this.id) {
         let res = await this.liveupdate(data);
         this.$checkRes(res, '修改成功', '修改失败');
+        this.$router.push({ path: '/duijiehui/index' });
       } else {
         data.user_id = this.user.uid;
-        data.is_allowed = '1';
-        // this.$alert(`${data.user_id}`, '成功', {
-        //   dangerouslyUseHTMLString: true,
-        //   type: 'success',
-        //   center: true,
-        // });
         let res = await this.livecreate(data);
         if (this.$checkRes(res)) {
-          // this.$checkRes(res, '添加成功', '添加失败');
-          console.log(res);
+          let passwd = jwt.decode(res.data.password);
+          this.$alert(`房间号:${res.data.room_id}` + `手机号:${res.data.phone};` + `密码:${passwd};`, '成功', {
+            dangerouslyUseHTMLString: true,
+            confirmButtonText: '确定',
+            type: 'success',
+            center: true,
+            callback: action => {
+              this.$router.push({ path: '/duijiehui/index' });
+            },
+          });
         }
       }
-      // this.$router.push({ path: '/duijiehui/index' });
     },
   },
 };

+ 46 - 77
src/views/duijiehui/index.vue

@@ -9,19 +9,7 @@
           <el-button size="mini" type="primary" @click="$router.push({ path: './detail' })" icon="el-icon-plus">添加对接会</el-button>
         </el-col>
         <el-col :span="24" class="main">
-          <!-- <mainData :tableData="tableData" :total="total" @delete="deleteData"></mainData> -->
-          <data-table
-            :fields="fields"
-            @delete="toDelete"
-            :data="list"
-            :opera="opera"
-            @edit="toEdit"
-            :total="total"
-            @query="search"
-            @share="share"
-            @tickets="tickets"
-            @order="order"
-          ></data-table>
+          <data-table :fields="fields" :data="list" :total="total" @query="search" :opera="opera" @edit="toEdit" @share="share"></data-table>
         </el-col>
       </el-col>
     </el-row>
@@ -46,7 +34,7 @@ export default {
     topTitle: '对接会管理',
     opera: [
       {
-        label: '编辑',
+        label: '编辑&状态审核',
         icon: 'el-icon-edit',
         method: 'edit',
       },
@@ -55,33 +43,31 @@ export default {
         icon: 'el-icon-share',
         method: 'share',
         display: item => {
-          return item.is_allowed == '1' ? true : false;
+          return item.status == '0' ? true : false;
         },
       },
-
-      {
-        label: '对接会审核',
-        icon: 'el-icon-tickets',
-        method: 'tickets',
-        display: item => {
-          return item.role == '1' ? true : false;
-        },
-      },
-      {
-        label: '对接会开始状态审核',
-        icon: 'el-icon-s-order',
-        method: 'order',
-        display: item => {
-          return item.is_allowed == '1' ? true : false;
-        },
-      },
-
-      {
-        label: '删除',
-        icon: 'el-icon-delete',
-        method: 'delete',
-        confirm: true,
-      },
+      // {
+      //   label: '对接会审核',
+      //   icon: 'el-icon-tickets',
+      //   method: 'tickets',
+      //   display: item => {
+      //     return item.role == '3' ? true : false;
+      //   },
+      // },
+      // {
+      //   label: '对接会开始状态审核',
+      //   icon: 'el-icon-s-order',
+      //   method: 'order',
+      //   display: item => {
+      //     return item.status == '0' ? true : false;
+      //   },
+      // },
+      // {
+      //   label: '删除',
+      //   icon: 'el-icon-delete',
+      //   method: 'delete',
+      //   confirm: true,
+      // },
     ],
     fields: [
       { label: '对接会标题', prop: 'title' },
@@ -93,13 +79,13 @@ export default {
       { label: '对接会简介', prop: 'desc' },
       { label: '负责人', prop: 'adminuser' },
       { label: '负责人手机号', prop: 'phone' },
-      {
-        label: '审核状态',
-        prop: 'is_allowed',
-        format: item => {
-          return item === '0' ? '未审核' : item === '1' ? '已允许' : '已拒绝';
-        },
-      },
+      // {
+      //   label: '审核状态',
+      //   prop: 'is_allowed',
+      //   format: item => {
+      //     return item === '0' ? '未审核' : item === '1' ? '已允许' : '已拒绝';
+      //   },
+      // },
       {
         label: '对接会状态',
         prop: 'status',
@@ -123,6 +109,7 @@ export default {
     ...live(['query', 'delete', 'update']),
     ...place({ palcequery: 'query', palcefetch: 'fetch' }),
     ...authUser({ authUserDelete: 'delete' }),
+    // 查询
     async search({ skip = 0, limit = 10, ...info } = {}) {
       if (this.user.role != '1') info.user_id = this.user.uid;
       let res = await this.query({ skip, limit, user_id: this.user.uid });
@@ -143,43 +130,25 @@ export default {
       this.$set(this, `list`, res.data);
       this.$set(this, `total`, res.total);
     },
+    // 修改
     toEdit({ data }) {
       this.$router.push({ path: './detail', query: { id: data.id } });
     },
-    async toDelete({ data }) {
-      const arr = await this.authUserDelete(data.uid);
-      const res = await this.delete(data.id);
-      if (this.$checkRes(res, '删除成功', res.errmsg || '删除失败')) this.search();
-    },
+    // 审核申请情况
     async share({ data }) {
       this.$router.push({ path: './duijieshenhe', query: { data: data } });
     },
-    async tickets({ data }) {
-      this.$router.push({ path: './duijiehuiexamine', query: { id: data.id } });
-    },
-    async order({ data }) {
-      this.$router.push({ path: './duijiehuistatus', query: { id: data.id } });
-    },
-    changeSearch() {
-      this.value++;
-      console.log(this.value);
-    },
-  },
-  // watch: {
-  //   list: {
-  //     handler(val) {
-  //       if (val.length > 0) {
-  //         this.timer = setInterval(this.changeSearch(val), 1000);
-  //       }
-  //     },
-  //     immediate: true,
-  //   },
-  // },
-  mounted() {
-    this.timer = setInterval(this.changeSearch, 2000);
-  },
-  beforeDestroy() {
-    clearInterval(this.timer);
+    // 删除
+    // async toDelete({ data }) {
+    //   const res = await this.delete(data.id);
+    //   if (this.$checkRes(res, '删除成功', res.errmsg || '删除失败')) this.search();
+    // },
+    // async tickets({ data }) {
+    //   this.$router.push({ path: './duijiehuiexamine', query: { id: data.id } });
+    // },
+    // async order({ data }) {
+    //   this.$router.push({ path: './duijiehuistatus', query: { id: data.id } });
+    // },
   },
 };
 </script>