wuhongyuq 5 年之前
父節點
當前提交
79b239e080

+ 60 - 0
src/layout/duijiehui/duijiedetail.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>

+ 6 - 3
src/layout/enterprise/enterprise.vue

@@ -43,6 +43,7 @@
                 :current-page="currentPage"
                 layout="total, prev, pager, next, jumper"
                 :total="total"
+                :page-size="pageSize"
               >
               </el-pagination>
             </el-col>
@@ -62,7 +63,8 @@ export default {
   },
   components: {},
   data: () => ({
-    currentPage: 1,
+    currentPage: 0,
+    pageSize: 10,
   }),
   created() {},
   computed: {},
@@ -79,8 +81,9 @@ export default {
     handleSizeChange(val) {
       console.log(`每页 ${val} 条`);
     },
-    handleCurrentChange(val) {
-      console.log(`当前页: ${val}`);
+    handleCurrentChange(currentPage) {
+      console.log(currentPage);
+      this.$emit('handleCurrentChange', { skip: (currentPage - 1) * this.pageSize, limit: this.pageSize, currentPage });
     },
   },
 };

+ 6 - 3
src/layout/enterprise/transaction.vue

@@ -62,6 +62,7 @@
                 :current-page="currentPage"
                 layout="total, prev, pager, next, jumper"
                 :total="total"
+                :page-size="pageSize"
               >
               </el-pagination>
             </el-col>
@@ -81,7 +82,8 @@ export default {
   },
   components: {},
   data: () => ({
-    currentPage: 1,
+    currentPage: 0,
+    pageSize: 10,
   }),
   created() {},
   computed: {},
@@ -98,8 +100,9 @@ export default {
     handleSizeChange(val) {
       console.log(`每页 ${val} 条`);
     },
-    handleCurrentChange(val) {
-      console.log(`当前页: ${val}`);
+    handleCurrentChange(currentPage) {
+      console.log(currentPage);
+      this.$emit('handleCurrentChange', { skip: (currentPage - 1) * this.pageSize, limit: this.pageSize, currentPage });
     },
   },
 };

+ 12 - 0
src/layout/layout-part/menus.vue

@@ -30,6 +30,18 @@
           <el-menu-item index="/enterprise/transaction">科技超市交易状态审核管理</el-menu-item>
         </el-menu-item-group>
       </el-submenu>
+
+      <el-submenu index="3">
+        <template v-slot:title>
+          <i class="el-icon-s-grid"></i>
+          <span>对接会</span>
+        </template>
+        <el-menu-item-group>
+          <el-menu-item index="/duijiehui/index">对接会的召开</el-menu-item>
+          <el-menu-item index="/duijiehui/duijieshenhe">对接会的审核</el-menu-item>
+        </el-menu-item-group>
+      </el-submenu>
+
       <el-menu-item index="/site/index"> <i class="el-icon-s-grid"></i>站点信息管理</el-menu-item>
       <el-menu-item index="/user/index"> <i class="el-icon-s-grid"></i>用户管理</el-menu-item>
       <el-menu-item index="/links/index"> <i class="el-icon-attract"></i>友情链接管理</el-menu-item>

+ 18 - 207
src/router/index.js

@@ -4,213 +4,6 @@ import checkLogin from './before';
 
 Vue.use(VueRouter);
 
-// export default new Router({
-// mode: 'history',
-// base: process.env.NODE_ENV === 'development' ? '' : process.env.VUE_APP_ROUTER,
-//   routes: [
-//     {
-//       path: '/',
-//       name: 'home',
-//       component: () => import('../views/home/index.vue'),
-//     },
-//     // 科技政务
-//     {
-//       path: '/government/index',
-//       component: () => import('../views/government/index.vue'),
-//     },
-//     // 科技政务-栏目列表
-//     {
-//       path: '/government/columnDetail',
-//       component: () => import('../views/government/columnDetail.vue'),
-//     },
-//     // 科技政务-信息列表
-//     {
-//       path: '/government/messageInfoDetail',
-//       component: () => import('../views/government/messageInfoDetail.vue'),
-//     },
-//     // 科技政策
-//     {
-//       path: '/policy/index',
-//       component: () => import('../views/policy/index.vue'),
-//     },
-//     // 科技政策-栏目列表
-//     {
-//       path: '/policy/columnDetail',
-//       component: () => import('../views/policy/columnDetail.vue'),
-//     },
-//     // 科技政策-信息列表
-//     {
-//       path: '/policy/messageInfoDetail',
-//       component: () => import('../views/policy/messageInfoDetail.vue'),
-//     },
-//     // 科技数据
-//     {
-//       path: '/record/index',
-//       component: () => import('../views/record/index.vue'),
-//     },
-//     // 科技数据-栏目列表
-//     {
-//       path: '/record/columnDetail',
-//       component: () => import('../views/record/columnDetail.vue'),
-//     },
-//     // 科技数据-信息列表
-//     {
-//       path: '/record/messageInfoDetail',
-//       component: () => import('../views/record/messageInfoDetail.vue'),
-//     },
-//     // 科技服务
-//     {
-//       path: '/serve/index',
-//       component: () => import('../views/serve/index.vue'),
-//     },
-//     // 科技服务-栏目列表
-//     {
-//       path: '/serve/columnDetail',
-//       component: () => import('../views/serve/columnDetail.vue'),
-//     },
-//     // 科技服务-信息列表
-//     {
-//       path: '/serve/messageInfoDetail',
-//       component: () => import('../views/serve/messageInfoDetail.vue'),
-//     },
-//     // 科技资源
-//     {
-//       path: '/resource/index',
-//       component: () => import('../views/resource/index.vue'),
-//     },
-//     // 科技人才-栏目管理
-//     {
-//       path: '/personnel/column',
-//       component: () => import('../views/personnel/column.vue'),
-//     },
-//     // 科技人才-添加栏目
-//     {
-//       path: '/personnel/columnDetail',
-//       component: () => import('../views/personnel/columnDetail.vue'),
-//     },
-//     // 科技人才-招聘信息管理
-//     {
-//       path: '/personnel/recruit',
-//       component: () => import('../views/personnel/recruit.vue'),
-//     },
-//     // 科技人才-添加招聘信息
-//     {
-//       path: '/personnel/recruitDetail',
-//       component: () => import('../views/personnel/recruitDetail.vue'),
-//     },
-//     // 科技人才-人才信息管理
-//     {
-//       path: '/personnel/resume',
-//       component: () => import('../views/personnel/resume.vue'),
-//     },
-//     // 科技人才-添加人才
-//     {
-//       path: '/personnel/resumeDetail',
-//       component: () => import('../views/personnel/resumeDetail.vue'),
-//     },
-//     // 科技人才-专家信息管理
-//     {
-//       path: '/personnel/experts',
-//       component: () => import('../views/personnel/experts.vue'),
-//     },
-//     // 科技人才-添加专家
-//     {
-//       path: '/personnel/expertsDetail',
-//       component: () => import('../views/personnel/expertsDetail.vue'),
-//     },
-//     // 科技人才-基本信息管理
-//     {
-//       path: '/personnel/informate',
-//       component: () => import('../views/personnel/informate.vue'),
-//     },
-//     // 科技人才-添加基本信息
-//     {
-//       path: '/personnel/informateDetail',
-//       component: () => import('../views/personnel/informateDetail.vue'),
-//     },
-//     //科技超市企业状态审核管理
-//     {
-//       path: '/enterprise/index',
-//       component: () => import('../views/enterprise/index.vue'),
-//     },
-
-//     //科技超市交易审核管理
-//     {
-//       path: '/enterprise/transaction',
-//       component: () => import('../views/enterprise/transaction.vue'),
-//     },
-
-//     //科技超市交易审核详情
-//     {
-//       path: '/enterprise/detail',
-//       component: () => import('../views/enterprise/detail.vue'),
-//     },
-//     // 站点信息
-//     {
-//       path: '/site/index',
-//       meta: { title: '网站设置' },
-//       component: () => import('../views/site/index.vue'),
-//     },
-//     // 用户管理
-//     {
-//       path: '/user/index',
-//       meta: { title: '用户设置' },
-//       component: () => import('../views/user/index.vue'),
-//     },
-//     {
-//       path: '/user/detail',
-//       meta: { title: '添加用户' },
-//       component: () => import('../views/user/detail.vue'),
-//     },
-//     // 友情链接管理
-//     {
-//       path: '/links/index',
-//       meta: { title: '友情链接' },
-//       component: () => import('../views/links/index.vue'),
-//     },
-//     {
-//       path: '/links/detail',
-//       meta: { title: '友情链接' },
-//       component: () => import('../views/links/detail.vue'),
-//     },
-//     // 产品类型字典表
-//     {
-//       path: '/supermaket/chanpinType',
-//       component: () => import('../views/supermaket/chanpinType.vue'),
-//     },
-//     // 添加产品类型字典表
-//     {
-//       path: '/supermaket/chanpinTypeDetail',
-//       component: () => import('../views/supermaket/chanpinTypeDetail.vue'),
-//     },
-//     {
-//       path: '/dictionary',
-//       meta: { title: '字典管理' },
-//       component: () => import('../views/dictionary/index.vue'),
-//     },
-//     {
-//       path: '/present',
-//       meta: { title: '礼物管理' },
-//       component: () => import('../views/present/index.vue'),
-//     },
-//   ],
-
-// // });
-// const router = new VueRouter({
-//   mode: 'history',
-//   base: process.env.BASE_URL,
-//   routes,
-// });
-// checkLogin(router);
-
-// export default router;
-
-// import Vue from 'vue';
-// import VueRouter from 'vue-router';
-// import checkLogin from './before';
-
-// Vue.use(VueRouter);
-
 const routes = [
   {
     path: '/',
@@ -397,6 +190,24 @@ const routes = [
     meta: { title: '礼物管理' },
     component: () => import('../views/present/index.vue'),
   },
+
+  //对接会
+  //列表
+  {
+    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'),
+  },
+
 ];
 
 const router = new VueRouter({

+ 3 - 0
src/store/index.js

@@ -24,6 +24,8 @@ import present from './present';
 import tranaudit from './tranaudit';
 import transaction from './transaction';
 
+import live from './live';
+
 import users from './user';
 import codeCategory from './code-category';
 import codeItem from './code-item';
@@ -57,6 +59,7 @@ export default new Vuex.Store({
     present,
     tranaudit,
     transaction,
+    live,
   },
   state: { ...ustate },
   mutations: { ...umutations },

+ 38 - 0
src/store/live.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`,
+};
+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 }, { id, ...data }) {
+    const res = await this.$axios.$post(`${api.informate}/${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,
+};

+ 74 - 0
src/views/duijiehui/detail.vue

@@ -0,0 +1,74 @@
+<template>
+  <div id="columnDetail">
+    <el-row>
+      <el-col :span="24" class="top">
+        <topInfo :topTitle="topTitle"></topInfo>
+      </el-col>
+      <el-col :span="24" class="main">
+        <duijiedetail :form="form" @submitDate="onSubmit"></duijiedetail>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import topInfo from '@/layout/public/top.vue';
+import duijiedetail from '@/layout/duijiehui/duijiedetail.vue';
+import { createNamespacedHelpers, mapState } from 'vuex';
+const { mapActions: live } = createNamespacedHelpers('live');
+export default {
+  name: 'columnDetail',
+  props: {},
+  components: {
+    duijiedetail,
+    topInfo,
+  },
+  data: () => ({
+    topTitle: '对接会详情',
+    form: {},
+    xinxi: {},
+  }),
+  created() {
+    this.search();
+  },
+  computed: {
+    id() {
+      return this.$route.query.id;
+    },
+
+    keyWord() {
+      let meta = this.$route.meta;
+      let main = meta.title || '';
+      return main;
+    },
+  },
+  methods: {
+    ...live({ livefetch: 'fetch', livelist: 'query', livecreate: 'create', liveupdate: 'update' }),
+    async search() {
+      if (this.$route.query.id) {
+        const res = await this.livefetch(this.id);
+        this.$set(this, `form`, res.data);
+      }
+    },
+    async onSubmit() {
+      if (this.id) {
+        let res = await this.liveupdate(this.form);
+        this.$checkRes(res, '修改成功', '修改失败');
+      } else {
+        let res = await this.livecreate(this.form);
+        this.$checkRes(res, '添加成功', '添加失败');
+      }
+      this.$router.push({ path: '/duijiehui/index' });
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.main {
+  padding: 20px;
+  margin: 10px 20px;
+  border: 1px solid #ccc;
+  width: 96%;
+}
+</style>

+ 93 - 0
src/views/duijiehui/duijieshenhe.vue

@@ -0,0 +1,93 @@
+<template>
+  <div id="index">
+    <el-row>
+      <el-col :span="24" class="info">
+        <el-col :span="24" class="top">
+          <topInfo :topTitle="topTitle"></topInfo>
+        </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"></data-table>
+        </el-col>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+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');
+export default {
+  name: 'index',
+  props: {},
+  components: {
+    topInfo, //头部标题
+    dataTable,
+  },
+  data: () => ({
+    topTitle: '用户管理',
+    opera: [
+      {
+        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: 'contact', filter: 'input' },
+      { label: '联系人电话', prop: 'contact_tel' },
+      { label: '邮箱', prop: 'email' },
+      { label: '单位名称', prop: 'company' },
+      { label: '申请时间', prop: 'apply_time' },
+      { label: '申请状态', prop: 'status', format: i => (i == '0' ? '待审核' : i == '1' ? '已通过' : '已拒绝') },
+    ],
+    list: [],
+    total: 0,
+  }),
+  created() {
+    this.search();
+  },
+  computed: {
+    data() {
+      return this.$route.query.data;
+    },
+  },
+  methods: {
+    ...users(['query', 'delete', 'update']),
+    async search({ skip = 0, limit = 10, ...info } = {}) {
+      console.log(this.data);
+    },
+    toEdit({ data }) {},
+    async toDelete({ data }) {
+      const res = await this.delete(data.id);
+      if (this.$checkRes(res, '删除成功', res.errmsg || '删除失败')) this.search();
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.top {
+  height: 40px;
+  background-color: #f5f5f5;
+}
+.search {
+  height: 40px;
+  line-height: 40px;
+  padding: 0 15px;
+}
+.main {
+  width: 97%;
+  margin: 0 15px;
+}
+</style>

+ 102 - 0
src/views/duijiehui/index.vue

@@ -0,0 +1,102 @@
+<template>
+  <div id="index">
+    <el-row>
+      <el-col :span="24" class="info">
+        <el-col :span="24" class="top">
+          <topInfo :topTitle="topTitle"></topInfo>
+        </el-col>
+        <el-col :span="24" class="search" style="text-align:right">
+          <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"></data-table>
+        </el-col>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import topInfo from '@/layout/public/top.vue';
+import dataTable from '@/components/data-table.vue';
+import { mapActions, mapState, createNamespacedHelpers } from 'vuex';
+const { mapActions: live } = createNamespacedHelpers('live');
+export default {
+  name: 'index',
+  props: {},
+  components: {
+    topInfo, //头部标题
+    dataTable,
+  },
+  data: () => ({
+    topTitle: '对接会管理',
+    opera: [
+      {
+        label: '编辑',
+        icon: 'el-icon-edit',
+        method: 'edit',
+      },
+      {
+        label: '查看申请情况',
+        icon: 'el-icon-share',
+        method: 'share',
+      },
+
+      {
+        label: '删除',
+        icon: 'el-icon-delete',
+        method: 'delete',
+        confirm: true,
+      },
+    ],
+    fields: [
+      { label: '对接会标题', prop: 'title' },
+      { label: '对接会简介', prop: 'desc' },
+    ],
+    list: [],
+    total: 0,
+  }),
+  created() {
+    this.search();
+  },
+  computed: {},
+  methods: {
+    ...live(['query', 'delete', 'update']),
+    async search({ skip = 0, limit = 10, ...info } = {}) {
+      const res = await this.query({ skip, limit, ...info });
+      if (this.$checkRes(res)) {
+        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 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 } });
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.top {
+  height: 40px;
+  background-color: #f5f5f5;
+}
+.search {
+  height: 40px;
+  line-height: 40px;
+  padding: 0 15px;
+}
+.main {
+  width: 97%;
+  margin: 0 15px;
+}
+</style>

+ 7 - 1
src/views/enterprise/index.vue

@@ -5,7 +5,7 @@
         <topInfo :topTitle="topTitle"></topInfo>
       </el-col>
       <el-col :span="24" class="main">
-        <enterprise :recruitInfo="recruitInfo" :total="total" @delete="deleteData" @edit="edit"></enterprise>
+        <enterprise :recruitInfo="recruitInfo" :total="total" @handleCurrentChange="handleCurrentChange" @delete="deleteData" @edit="edit"></enterprise>
       </el-col>
     </el-row>
   </div>
@@ -27,6 +27,7 @@ export default {
     topTitle: '审核信息',
     recruitInfo: [],
     total: 1,
+    skip: '',
   }),
   created() {
     this.search();
@@ -35,6 +36,7 @@ export default {
   methods: {
     ...product(['query', 'delete', 'fetch', 'update']),
     async search({ skip = 0, limit = 10, ...info } = {}) {
+      skip = this.skip;
       const res = await this.query({ skip, limit, ...info });
       this.$set(this, `recruitInfo`, res.data);
       this.$set(this, `total`, res.total);
@@ -52,6 +54,10 @@ export default {
       this.$checkRes(res, '审核成功', '审核失败');
       console.log(data);
     },
+    async handleCurrentChange({ skip, limit, currentPage }) {
+      this.$set(this, `skip`, skip);
+      this.search();
+    },
   },
 };
 </script>

+ 8 - 1
src/views/enterprise/transaction.vue

@@ -5,7 +5,7 @@
         <topInfo :topTitle="topTitle"></topInfo>
       </el-col>
       <el-col :span="24" class="main">
-        <transaction :recruitInfo="recruitInfo" :total="total" @delete="deleteData" @edit="edit"></transaction>
+        <transaction :recruitInfo="recruitInfo" :total="total" @delete="deleteData" @edit="edit" @handleCurrentChange="handleCurrentChange"></transaction>
       </el-col>
     </el-row>
   </div>
@@ -30,6 +30,7 @@ export default {
     topTitle: '审核信息',
     recruitInfo: [],
     total: 1,
+    skip: '',
   }),
   created() {
     this.search();
@@ -41,6 +42,7 @@ export default {
     ...transactions({ transactionsfetch: 'fetch', transactionslist: 'query', transactiondetele: 'detele' }),
 
     async search({ skip = 0, limit = 10, ...info } = {}) {
+      skip = this.skip;
       const res = await this.transactionslist({ skip, limit, ...info });
       console.log(res);
       console.log(res.data);
@@ -60,6 +62,11 @@ export default {
       this.$checkRes(res, '审核成功', '审核失败');
       console.log(data);
     },
+
+    async handleCurrentChange({ skip, limit, currentPage }) {
+      this.$set(this, `skip`, skip);
+      this.search();
+    },
   },
 };
 </script>

+ 1 - 1
vue.config.js

@@ -68,7 +68,7 @@ module.exports = {
         // pathRewrite: { '^/api/affairs': '/api' },
       },
       '/api/live': {
-        target: 'http://127.0.0.1:9005',
+        target: 'http://10.16.10.72:9009',
         changeOrigin: true,
         ws: true,
         // pathRewrite: { '^/api/affairs': '/api' },