wuhongyuq 5 سال پیش
والد
کامیت
17dc0f7be7

+ 16 - 16
package-lock.json

@@ -2433,7 +2433,7 @@
     },
     "buffer-equal-constant-time": {
       "version": "1.0.1",
-      "resolved": "https://registry.npm.taobao.org/buffer-equal-constant-time/download/buffer-equal-constant-time-1.0.1.tgz",
+      "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz",
       "integrity": "sha1-+OcRMvf/5uAaXJaXpMbz5I1cyBk="
     },
     "buffer-from": {
@@ -4047,8 +4047,8 @@
     },
     "ecdsa-sig-formatter": {
       "version": "1.0.11",
-      "resolved": "https://registry.npm.taobao.org/ecdsa-sig-formatter/download/ecdsa-sig-formatter-1.0.11.tgz",
-      "integrity": "sha1-rg8PothQRe8UqBfao86azQSJ5b8=",
+      "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz",
+      "integrity": "sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==",
       "requires": {
         "safe-buffer": "^5.0.1"
       }
@@ -6771,8 +6771,8 @@
     },
     "jsonwebtoken": {
       "version": "8.5.1",
-      "resolved": "https://registry.npm.taobao.org/jsonwebtoken/download/jsonwebtoken-8.5.1.tgz",
-      "integrity": "sha1-AOceC431TCEhofJhN98igGc7zA0=",
+      "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-8.5.1.tgz",
+      "integrity": "sha512-XjwVfRS6jTMsqYs0EsuJ4LGxXV14zQybNd4L2r0UvbVnSF9Af8x7p5MzbJ90Ioz/9TI41/hTCvznF/loiSzn8w==",
       "requires": {
         "jws": "^3.2.2",
         "lodash.includes": "^4.3.0",
@@ -6800,8 +6800,8 @@
     },
     "jwa": {
       "version": "1.4.1",
-      "resolved": "https://registry.npm.taobao.org/jwa/download/jwa-1.4.1.tgz?cache=0&sync_timestamp=1576560341481&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fjwa%2Fdownload%2Fjwa-1.4.1.tgz",
-      "integrity": "sha1-dDwymFy56YZVUw1TZBtmyGRbA5o=",
+      "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.4.1.tgz",
+      "integrity": "sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA==",
       "requires": {
         "buffer-equal-constant-time": "1.0.1",
         "ecdsa-sig-formatter": "1.0.11",
@@ -6810,8 +6810,8 @@
     },
     "jws": {
       "version": "3.2.2",
-      "resolved": "https://registry.npm.taobao.org/jws/download/jws-3.2.2.tgz",
-      "integrity": "sha1-ABCZ82OUaMlBQADpmZX6UvtHgwQ=",
+      "resolved": "https://registry.npmjs.org/jws/-/jws-3.2.2.tgz",
+      "integrity": "sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA==",
       "requires": {
         "jwa": "^1.4.1",
         "safe-buffer": "^5.0.1"
@@ -7038,32 +7038,32 @@
     },
     "lodash.includes": {
       "version": "4.3.0",
-      "resolved": "https://registry.npm.taobao.org/lodash.includes/download/lodash.includes-4.3.0.tgz",
+      "resolved": "https://registry.npmjs.org/lodash.includes/-/lodash.includes-4.3.0.tgz",
       "integrity": "sha1-YLuYqHy5I8aMoeUTJUgzFISfVT8="
     },
     "lodash.isboolean": {
       "version": "3.0.3",
-      "resolved": "https://registry.npm.taobao.org/lodash.isboolean/download/lodash.isboolean-3.0.3.tgz",
+      "resolved": "https://registry.npmjs.org/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz",
       "integrity": "sha1-bC4XHbKiV82WgC/UOwGyDV9YcPY="
     },
     "lodash.isinteger": {
       "version": "4.0.4",
-      "resolved": "https://registry.npm.taobao.org/lodash.isinteger/download/lodash.isinteger-4.0.4.tgz",
+      "resolved": "https://registry.npmjs.org/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz",
       "integrity": "sha1-YZwK89A/iwTDH1iChAt3sRzWg0M="
     },
     "lodash.isnumber": {
       "version": "3.0.3",
-      "resolved": "https://registry.npm.taobao.org/lodash.isnumber/download/lodash.isnumber-3.0.3.tgz",
+      "resolved": "https://registry.npmjs.org/lodash.isnumber/-/lodash.isnumber-3.0.3.tgz",
       "integrity": "sha1-POdoEMWSjQM1IwGsKHMX8RwLH/w="
     },
     "lodash.isplainobject": {
       "version": "4.0.6",
-      "resolved": "https://registry.npm.taobao.org/lodash.isplainobject/download/lodash.isplainobject-4.0.6.tgz",
+      "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz",
       "integrity": "sha1-fFJqUtibRcRcxpC4gWO+BJf1UMs="
     },
     "lodash.isstring": {
       "version": "4.0.1",
-      "resolved": "https://registry.npm.taobao.org/lodash.isstring/download/lodash.isstring-4.0.1.tgz",
+      "resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz",
       "integrity": "sha1-1SfftUVuynzJu5XV2ur4i6VKVFE="
     },
     "lodash.kebabcase": {
@@ -7086,7 +7086,7 @@
     },
     "lodash.once": {
       "version": "4.1.1",
-      "resolved": "https://registry.npm.taobao.org/lodash.once/download/lodash.once-4.1.1.tgz",
+      "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz",
       "integrity": "sha1-DdOXEhPHxW34gJd9UEyI+0cal6w="
     },
     "lodash.transform": {

+ 73 - 0
src/layout/enterprise/detail.vue

@@ -0,0 +1,73 @@
+<template>
+  <div id="columnDetail">
+    <el-row>
+      <el-col :span="24">
+        <el-col :span="24" class="top">
+          <el-col :span="12" class="topTitle"> </el-col>
+          <el-col :span="12" class="topBtn"> </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.market_username" :disabled="true"></el-input>
+            </el-form-item>
+            <el-form-item label="购买人名称">
+              <el-input v-model="form.username" :disabled="true"></el-input>
+            </el-form-item>
+            <el-form-item label="商品名称">
+              <el-input v-model="form.product_name" :disabled="true"></el-input>
+            </el-form-item>
+            <el-form-item label="状态">
+              <el-radio-group v-model="form.result">
+                <el-radio :label="1" name="1">审核通过</el-radio>
+                <el-radio :label="2" name="2">审核拒绝</el-radio>
+              </el-radio-group>
+            </el-form-item>
+
+            <el-form-item label="审核说明">
+              <el-input v-model="form.description"></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: '/personnel/column' });
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.top {
+  padding: 15px 0;
+}
+.top .topTitle {
+  text-align: left;
+}
+.top .topBtn {
+  text-align: right;
+  padding: 0 5px;
+}
+</style>

+ 127 - 0
src/layout/enterprise/transaction.vue

@@ -0,0 +1,127 @@
+<template>
+  <div id="column">
+    <el-row>
+      <el-col :span="24" class="info">
+        <el-col :span="24" class="top">
+          <el-col :span="12" class="topTitle">
+            <span>审核信息列表</span>
+          </el-col>
+        </el-col>
+        <el-col :span="24" class="list">
+          <template>
+            <el-table :data="recruitInfo" style="width: 100%">
+              <el-table-column prop="username" label="购买人名称" align="center"> </el-table-column>
+              <el-table-column prop="market_username" label="营销人名称" align="center"> </el-table-column>
+              <el-table-column prop="product_name" label="商品名称 " align="center"> </el-table-column>
+              <el-table-column prop="state" label="状态" align="center">
+                <template v-slot="scoped">
+                  {{
+                    `${scoped.row.status}` === `0`
+                      ? '未交易'
+                      : `${scoped.row.status}` === `1`
+                      ? '交易中'
+                      : `${scoped.row.status}` === `2`
+                      ? '交易成功'
+                      : `${scoped.row.status}` === `3`
+                      ? '交易失败'
+                      : ''
+                  }}
+                </template>
+              </el-table-column>
+              <el-table-column label="操作" align="center">
+                <template slot-scope="scoped">
+                  <el-tooltip content="审核" placement="bottom" effect="light">
+                    <el-button
+                      type="text"
+                      size="small"
+                      @click="
+                        $router.push({
+                          path: '/enterprise/detail',
+                          query: {
+                            id: scoped.row.id,
+                            name: scoped.row.product_name,
+                            oneid: scoped.row.username,
+                            twoid: scoped.row.market_username,
+                          },
+                        })
+                      "
+                      ><i class="el-icon-edit"></i
+                    ></el-button>
+                  </el-tooltip>
+
+                  <el-tooltip content="删除" placement="bottom" effect="light">
+                    <el-button type="text" size="small" @click="handleDelete(scoped.row)"><i class="el-icon-delete"></i></el-button>
+                  </el-tooltip>
+                </template>
+              </el-table-column>
+            </el-table>
+            <el-col :span="24" class="page">
+              <el-pagination
+                @size-change="handleSizeChange"
+                @current-change="handleCurrentChange"
+                :current-page="currentPage"
+                layout="total, prev, pager, next, jumper"
+                :total="total"
+              >
+              </el-pagination>
+            </el-col>
+          </template>
+        </el-col>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+export default {
+  name: 'column',
+  props: {
+    recruitInfo: null,
+    total: null,
+  },
+  components: {},
+  data: () => ({
+    currentPage: 1,
+  }),
+  created() {},
+  computed: {},
+  methods: {
+    addData() {
+      this.$router.push({ path: '/personnel/recruitDetail' });
+    },
+    handleDelete(item) {
+      this.$emit('delete', item);
+    },
+    handleEdit(row) {
+      this.$emit('edit', { data: row });
+    },
+    handleSizeChange(val) {
+      console.log(`每页 ${val} 条`);
+    },
+    handleCurrentChange(val) {
+      console.log(`当前页: ${val}`);
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.top {
+  padding: 15px 0;
+  border-bottom: 1px solid #cccc;
+}
+.top .topTitle {
+  padding: 0 10px;
+}
+.top .topAdd {
+  padding: 0 10px 0 0;
+  text-align: right;
+}
+.page {
+  padding: 20px 0;
+  text-align: center;
+}
+</style>
+transaction_id: { type: String, required: true, maxLength: 500 }, // 交易主表ID product_id: { type: String, required: true, maxLength: 500 }, // 产品ID userid:
+{ type: String, required: true, maxLength: 500 }, // 审核人ID result: { type: String, required: true, maxLength: 200 }, // 结果,1:通过审核 2:审核拒绝
+description: { type: String, required: false }, // 审核说明

+ 2 - 3
src/layout/layout-part/menus.vue

@@ -26,8 +26,8 @@
           <span>科技超市管理</span>
         </template>
         <el-menu-item-group>
-          <el-menu-item index="/enterprises/index">科技超市商品审核管理</el-menu-item>
-          <el-menu-item index="/transaction/index">科技超市交易状态审核管理</el-menu-item>
+          <el-menu-item index="/enterprise/index">科技超市商品审核管理</el-menu-item>
+          <el-menu-item index="/enterprise/transaction">科技超市交易状态审核管理</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>
@@ -35,7 +35,6 @@
       <el-menu-item index="/links/index"> <i class="el-icon-attract"></i>友情链接管理</el-menu-item>
       <!-- <el-menu-item index="/supermaket/chanpinType"> <i class="el-icon-s-grid"></i>产品类型字典表</el-menu-item> -->
       <el-menu-item index="/dictionary"> <i class="el-icon-attract"></i>平台字典管理</el-menu-item>
-      <el-menu-item index="/present"> <i class="el-icon-attract"></i>礼物管理</el-menu-item>
     </el-menu>
   </div>
 </template>

+ 19 - 0
src/router/before.js

@@ -0,0 +1,19 @@
+import store from '@/store/index';
+
+const checkLogin = router => {
+  router.beforeEach((to, form, next) => {
+    store.commit('setUser');
+    // if (to.name === 'login') {
+    //   next();
+    //   return;
+    // }
+    // let user = store.state.user;
+    // if (user) {
+    //   next();
+    // }
+    // //下面是没登录的情况,需要跳转页面到用户未登录页
+    // else next({ name: 'login' });
+    next();
+  });
+};
+export default checkLogin;

+ 405 - 179
src/router/index.js

@@ -1,183 +1,409 @@
 import Vue from 'vue';
-import Router from 'vue-router';
-Vue.use(Router);
+import VueRouter from 'vue-router';
+import checkLogin from './before';
 
-export default new Router({
+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: '/',
+    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.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: '/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'),
-    },
-  ],
+  base: process.env.BASE_URL,
+  routes,
 });
+checkLogin(router);
+
+export default router;

+ 4 - 0
src/store/index.js

@@ -21,6 +21,8 @@ import protype from './protype';
 
 import marketproject from './marketproject';
 import present from './present';
+import tranaudit from './tranaudit';
+import transaction from './transaction';
 
 import users from './user';
 import codeCategory from './code-category';
@@ -53,6 +55,8 @@ export default new Vuex.Store({
     codeItem,
     marketproject,
     present,
+    tranaudit,
+    transaction,
   },
   state: { ...ustate },
   mutations: { ...umutations },

+ 38 - 0
src/store/tranaudit.js

@@ -0,0 +1,38 @@
+import Vue from 'vue';
+import Vuex from 'vuex';
+import _ from 'lodash';
+Vue.use(Vuex);
+const api = {
+  informate: `/api/market/tranaudit`,
+};
+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 }, product_id) {
+    const res = await this.$axios.$get(`${api.informate}`, product_id);
+    return res;
+  },
+  async update({ commit }, { id, ...data }) {
+    const res = await this.$axios.$post(`${api.informate}/update/${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,
+};

+ 38 - 0
src/store/transaction.js

@@ -0,0 +1,38 @@
+import Vue from 'vue';
+import Vuex from 'vuex';
+import _ from 'lodash';
+Vue.use(Vuex);
+const api = {
+  informate: `/api/market/transaction`,
+};
+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}/update/${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,
+};

+ 112 - 0
src/views/enterprise/detail.vue

@@ -0,0 +1,112 @@
+<template>
+  <div id="columnDetail">
+    <el-row>
+      <el-col :span="24" class="top">
+        <topInfo :topTitle="topTitle"></topInfo>
+      </el-col>
+      <el-col :span="24" class="main">
+        <detail :form="form" @submitDate="onSubmit"></detail>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import topInfo from '@/layout/public/top.vue';
+import detail from '@/layout/enterprise/detail.vue';
+import { createNamespacedHelpers, mapState } from 'vuex';
+
+const { mapActions: tranaudit } = createNamespacedHelpers('tranaudit');
+const { mapActions: transaction } = createNamespacedHelpers('transaction');
+
+export default {
+  name: 'columnDetail',
+  props: {},
+  components: {
+    detail,
+    topInfo,
+  },
+  data: () => ({
+    topTitle: '审核',
+    form: {},
+    xinxi: {},
+  }),
+  created() {
+    this.search();
+  },
+  computed: {
+    ...mapState(['user']),
+
+    id() {
+      return this.$route.query.id;
+    },
+    oneid() {
+      return this.$route.query.oneid;
+    },
+    twoid() {
+      return this.$route.query.twoid;
+    },
+    name() {
+      return this.$route.query.name;
+    },
+    keyWord() {
+      let meta = this.$route.meta;
+      let main = meta.title || '';
+      return main;
+    },
+  },
+  methods: {
+    ...tranaudit(['fetch', 'create', 'update', 'query']),
+    ...transaction({ transactionsfetch: 'fetch', transactionslist: 'query', transactionupdate: 'update' }),
+    async search() {
+      console.log(this.id);
+      console.log(this.oneid);
+      console.log(this.twoid);
+      console.log(this.name);
+      let transaction_id = this.id;
+      const res = await this.fetch(transaction_id);
+      const ress = await this.transactionsfetch(transaction_id);
+      console.log(ress.data);
+      this.$set(this, `xinxi`, ress.data);
+      for (const acc of res.data) {
+        console.log(acc);
+        acc.username = this.oneid;
+        acc.market_username = this.twoid;
+        acc.product_name = this.name;
+        this.$set(this, `form`, acc);
+      }
+
+      // console.log(res);
+    },
+    async onSubmit() {
+      console.log(this.form);
+
+      this.form.userid = this.user.id;
+      let res = await this.update(this.form);
+      this.$checkRes(res, '审核成功', '审核失败');
+
+      console.log(this.xinxi);
+
+      if (this.form.result == '1') {
+        console.log();
+        this.xinxi.status = '1';
+        let res = await this.transactionupdate(this.xinxi);
+        console.log(this.xinxi);
+      } else if (this.form.result == '2') {
+        this.xinxi.status = '3';
+        let res = await this.transactionupdate(this.xinxi);
+      }
+      this.$router.push({ path: '/enterprise/transaction' });
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.main {
+  padding: 20px;
+  margin: 10px 20px;
+  border: 1px solid #ccc;
+  width: 96%;
+}
+</style>

+ 74 - 0
src/views/enterprise/transaction.vue

@@ -0,0 +1,74 @@
+<template>
+  <div id="recruit">
+    <el-row>
+      <el-col :span="24" class="top">
+        <topInfo :topTitle="topTitle"></topInfo>
+      </el-col>
+      <el-col :span="24" class="main">
+        <transaction :recruitInfo="recruitInfo" :total="total" @delete="deleteData" @edit="edit"></transaction>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import topInfo from '@/layout/public/top.vue';
+import transaction from '@/layout/enterprise/transaction.vue';
+import { createNamespacedHelpers, mapGetters } from 'vuex';
+const { mapActions: product } = createNamespacedHelpers('marketproject');
+const { mapActions: tranaudit } = createNamespacedHelpers('tranaudit');
+const { mapActions: transactions } = createNamespacedHelpers('transaction');
+
+export default {
+  name: 'recruit',
+  props: {},
+  components: {
+    topInfo,
+    transaction,
+  },
+  data: () => ({
+    topTitle: '审核信息',
+    recruitInfo: [],
+    total: 1,
+  }),
+  created() {
+    this.search();
+  },
+  computed: {},
+  methods: {
+    ...product(['query', 'delete', 'fetch', 'update']),
+    ...tranaudit({ tranauditList: 'query', tranauditListupdate: 'update' }),
+    ...transactions({ transactionsfetch: 'fetch', transactionslist: 'query', transactiondetele: 'detele' }),
+
+    async search({ skip = 0, limit = 10, ...info } = {}) {
+      const res = await this.transactionslist({ skip, limit, ...info });
+      console.log(res);
+      console.log(res.data);
+      this.$set(this, `recruitInfo`, res.data);
+      this.$set(this, `total`, res.total);
+    },
+    async deleteData(item) {
+      const res = await this.transactiondetele(item.id);
+      this.$checkRes(res, '删除成功', '删除失败');
+      this.search();
+    },
+
+    async edit({ data }) {
+      console.log('a');
+      data.status = '1';
+      let res = await this.update(data);
+      this.$checkRes(res, '审核成功', '审核失败');
+      console.log(data);
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.main {
+  padding: 20px;
+  margin: 10px 20px;
+  border: 1px solid #ccc;
+  width: 96%;
+}
+</style>

+ 1 - 1
vue.config.js

@@ -62,7 +62,7 @@ module.exports = {
         // pathRewrite: { '^/api/affairs': '/api' },
       },
       '/api/market': {
-        target: 'http://127.0.0.1:9004',
+        target: 'http://10.16.10.72:9004',
         changeOrigin: true,
         ws: true,
         // pathRewrite: { '^/api/affairs': '/api' },