wuhongyuq 5 vuotta sitten
vanhempi
commit
578441da6c

+ 60 - 0
src/layout/duijiehui/shenhedetail.vue

@@ -0,0 +1,60 @@
+<template>
+  <div id="columnDetail">
+    <el-row>
+      <el-col :span="24">
+        <el-col :span="24" class="top">
+          <el-col :span="24" class="topBtn">
+            <el-button type="primary" size="mini" @click="returnBtn()">返回</el-button>
+          </el-col>
+        </el-col>
+        <el-col :span="24" class="messgae">
+          <el-form ref="form" :model="form" label-width="120px">
+            <el-form-item label=" 对接会标题">
+              <el-input v-model="form.title"></el-input>
+            </el-form-item>
+            <el-form-item label="简介">
+              <el-input type="textarea" v-model="form.desc"></el-input>
+            </el-form-item>
+            <el-form-item>
+              <el-button type="primary" @click="onSubmit()">提交</el-button>
+            </el-form-item>
+          </el-form>
+        </el-col>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+export default {
+  name: 'columnDetail',
+  props: {
+    form: null,
+  },
+  components: {},
+  data: () => ({}),
+  created() {},
+  computed: {},
+  methods: {
+    onSubmit() {
+      this.$emit('submitDate', { data: this.form, id: this.form.id });
+    },
+    returnBtn() {
+      this.$router.push({ path: '/duijiehui/index' });
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.top {
+  padding: 15px 0;
+}
+.top .topTitle {
+  text-align: left;
+}
+.top .topBtn {
+  text-align: right;
+  padding: 0 5px;
+}
+</style>

+ 8 - 3
src/router/index.js

@@ -192,21 +192,26 @@ const routes = [
   },
 
   //对接会
-  //列表
+  //对接会列表
   {
     path: '/duijiehui/index',
     component: () => import('../views/duijiehui/index.vue'),
   },
-  //详情
+  //对接会详情
   {
     path: '/duijiehui/detail',
     component: () => import('../views/duijiehui/detail.vue'),
   },
-  //审核
+  //对接会审核
   {
     path: '/duijiehui/duijieshenhe',
     component: () => import('../views/duijiehui/duijieshenhe.vue'),
   },
+  //对接会审核详情
+  {
+    path: '/duijiehui/duijiedetail',
+    component: () => import('../views/duijiehui/duijiedetail.vue'),
+  },
 
 ];
 

+ 38 - 0
src/store/apply.js

@@ -0,0 +1,38 @@
+import Vue from 'vue';
+import Vuex from 'vuex';
+import _ from 'lodash';
+Vue.use(Vuex);
+const api = {
+  informate: `/api/live/dock/apply`,
+};
+const state = () => ({});
+const mutations = {};
+
+const actions = {
+  async query({ commit }, { skip = 0, limit, ...info } = {}) {
+    const res = await this.$axios.$get(`${api.informate}`, { skip, limit, ...info });
+    return res;
+  },
+  async create({ commit }, payload) {
+    const res = await this.$axios.$post(`${api.informate}`, payload);
+    return res;
+  },
+  async fetch({ commit }, payload) {
+    const res = await this.$axios.$get(`${api.informate}/${payload}`);
+    return res;
+  },
+  async update({ commit }, { dock_id, id, ...data }) {
+    const res = await this.$axios.$post(`${api.informate}/${dock_id}/check/${id}`, data);
+    return res;
+  },
+  async delete({ commit }, payload) {
+    const res = await this.$axios.$delete(`${api.informate}/${payload}`);
+    return res;
+  },
+};
+export default {
+  namespaced: true,
+  state,
+  mutations,
+  actions,
+};

+ 2 - 0
src/store/index.js

@@ -25,6 +25,7 @@ import tranaudit from './tranaudit';
 import transaction from './transaction';
 
 import live from './live';
+import apply from './apply';
 
 import users from './user';
 import codeCategory from './code-category';
@@ -60,6 +61,7 @@ export default new Vuex.Store({
     tranaudit,
     transaction,
     live,
+    apply,
   },
   state: { ...ustate },
   mutations: { ...umutations },

+ 19 - 0
src/views/duijiehui/duijiedetail.vue

@@ -0,0 +1,19 @@
+<template>
+  <div id="duijiedetail">
+    <p>duijiedetail</p>
+  </div>
+</template>
+
+<script>
+export default {
+  name: 'duijiedetail',
+  props: {},
+  components: {},
+  data: () => ({}),
+  created() {},
+  computed: {},
+  methods: {},
+};
+</script>
+
+<style lang="scss" scoped></style>

+ 14 - 12
src/views/duijiehui/duijieshenhe.vue

@@ -18,7 +18,7 @@
 import topInfo from '@/layout/public/top.vue';
 import dataTable from '@/components/data-table.vue';
 import { mapActions, mapState, createNamespacedHelpers } from 'vuex';
-const { mapActions: users } = createNamespacedHelpers('users');
+const { mapActions: apply } = createNamespacedHelpers('apply');
 export default {
   name: 'index',
   props: {},
@@ -30,20 +30,14 @@ export default {
     topTitle: '用户管理',
     opera: [
       {
-        label: '',
+        label: '审核',
         icon: 'el-icon-edit',
         method: 'edit',
       },
-      {
-        label: '删除',
-        icon: 'el-icon-delete',
-        method: 'delete',
-        confirm: true,
-      },
     ],
     fields: [
       { label: '用户名称', prop: 'user_name', filter: 'input' },
-      { label: '买家/卖家', prop: 'status', format: i => (i == '0' ? '买家' : i == '1' ? '卖家' : '') },
+      { label: '买家/卖家', prop: 'buyer', format: i => (i == '0' ? '买家' : i == '1' ? '卖家' : '') },
       { label: '联系人', prop: 'contact', filter: 'input' },
       { label: '联系人电话', prop: 'contact_tel' },
       { label: '邮箱', prop: 'email' },
@@ -63,11 +57,19 @@ export default {
     },
   },
   methods: {
-    ...users(['query', 'delete', 'update']),
+    ...apply(['query', 'delete', 'update']),
     async search({ skip = 0, limit = 10, ...info } = {}) {
-      console.log(this.data);
+      console.log(this.data.apply);
+      this.$set(this, `list`, this.data.apply);
+    },
+    async toEdit({ data }) {
+      console.log(data);
+      data.status = '1';
+      data.dock_id = this.data.id;
+      data.id = data._id;
+      console.log(data);
+      let res = await this.update(data);
     },
-    toEdit({ data }) {},
     async toDelete({ data }) {
       const res = await this.delete(data.id);
       if (this.$checkRes(res, '删除成功', res.errmsg || '删除失败')) this.search();