wuhongyuq 5 years ago
parent
commit
14f2798ca0

+ 105 - 0
src/layout/enterprise/enterprise.vue

@@ -0,0 +1,105 @@
+<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="name" label="产品名称" align="center"> </el-table-column>
+
+              <el-table-column prop="totaltype" label="产品类型 " align="center">
+                <template v-slot="scoped">
+                  {{
+                    `${scoped.row.totaltype}` === `0` ? '技术' : `${scoped.row.totaltype}` === `1` ? '产品' : `${scoped.row.totaltype}` === `2` ? '服务' : ''
+                  }}
+                </template>
+              </el-table-column>
+              <el-table-column prop="state" label="状态" align="center">
+                <template v-slot="scoped">
+                  {{ `${scoped.row.status}` === `0` ? '未审核' : `${scoped.row.status}` === `1` ? '已经审核' : '交易完成' }}
+                </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="handleEdit(scoped.row)"><i class="el-icon-share"></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>

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

@@ -20,6 +20,15 @@
           <el-menu-item index="/personnel/informate">基本信息管理</el-menu-item>
         </el-menu-item-group>
       </el-submenu>
+      <el-submenu index="2">
+        <template v-slot:title>
+          <i class="el-icon-s-grid"></i>
+          <span>科技超市企业管理</span>
+        </template>
+        <el-menu-item-group>
+          <el-menu-item index="/enterprise/index">科技超市企业状态审核管理</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>

+ 5 - 0
src/router/index.js

@@ -126,6 +126,11 @@ export default new Router({
       path: '/personnel/informateDetail',
       component: () => import('../views/personnel/informateDetail.vue'),
     },
+    //科技超市企业状态审核管理
+    {
+      path: '/enterprise/index',
+      component: () => import('../views/enterprise/index.vue'),
+    },
     // 站点信息
     {
       path: '/site/index',

+ 3 - 0
src/store/index.js

@@ -19,6 +19,8 @@ import talentResume from './talentResume';
 import dictionary from './dictionary';
 import protype from './protype';
 
+import marketproject from './marketproject';
+
 import users from './user';
 import codeCategory from './code-category';
 import codeItem from './code-item';
@@ -48,6 +50,7 @@ export default new Vuex.Store({
     users,
     codeCategory,
     codeItem,
+    marketproject,
   },
   state: { ...ustate },
   mutations: { ...umutations },

+ 38 - 0
src/store/marketproject.js

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

+ 66 - 0
src/views/enterprise/index.vue

@@ -0,0 +1,66 @@
+<template>
+  <div id="recruit">
+    <el-row>
+      <el-col :span="24" class="top">
+        <topInfo :topTitle="topTitle"></topInfo>
+      </el-col>
+      <el-col :span="24" class="main">
+        <enterprise :recruitInfo="recruitInfo" :total="total" @delete="deleteData" @edit="edit"></enterprise>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import topInfo from '@/layout/public/top.vue';
+import enterprise from '@/layout/enterprise/enterprise.vue';
+import { createNamespacedHelpers, mapGetters } from 'vuex';
+const { mapActions: product } = createNamespacedHelpers('marketproject');
+export default {
+  name: 'recruit',
+  props: {},
+  components: {
+    topInfo,
+    enterprise,
+  },
+  data: () => ({
+    topTitle: '审核信息',
+    recruitInfo: [],
+    total: 1,
+  }),
+  created() {
+    this.search();
+  },
+  computed: {},
+  methods: {
+    ...product(['query', 'delete', 'fetch', 'update']),
+    async search({ skip = 0, limit = 10, ...info } = {}) {
+      const res = await this.query({ skip, limit, ...info });
+      this.$set(this, `recruitInfo`, res.data);
+      this.$set(this, `total`, res.total);
+    },
+    async deleteData(item) {
+      const res = await this.delete(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>

+ 2 - 2
vue.config.js

@@ -30,7 +30,7 @@ module.exports = {
         target: 'http://smart.cc-lotus.info',
       },
       '/api/setting': {
-        target: 'http://free.liaoningdoupo.com',
+        target: 'http://10.16.10.72:9000',
         changeOrigin: true,
         ws: true,
       },
@@ -62,7 +62,7 @@ module.exports = {
         // pathRewrite: { '^/api/affairs': '/api' },
       },
       '/api/market': {
-        target: 'http://free.liaoningdoupo.com',
+        target: 'http://10.16.10.72:9004',
         changeOrigin: true,
         ws: true,
         // pathRewrite: { '^/api/affairs': '/api' },