Browse Source

企业用户管理更新

guhongwei 5 years ago
parent
commit
6b6974fd3c
4 changed files with 12 additions and 21 deletions
  1. 1 1
      src/layout/personnel/mainMenu.vue
  2. 7 7
      src/store/market.js
  3. 4 12
      src/views/enterprise/enterprisejb.vue
  4. 0 1
      vue.config.js

+ 1 - 1
src/layout/personnel/mainMenu.vue

@@ -7,7 +7,7 @@
     <el-col>
       <el-menu default-active="1" class="el-menu-vertical-demo" @open="handleOpen" @close="handleClose" text-color="#215299" active-text-color="#215299">
         <el-menu-item index="1" v-for="(item, index) in liebiaoList" :key="index"
-          ><span slot="title" @click="clickUrl(item.id)">{{ item.name }}</span></el-menu-item
+          ><span slot="title" @click="clickUrl(item.name)">{{ item.name }}</span></el-menu-item
         >
       </el-menu>
     </el-col>

+ 7 - 7
src/store/market.js

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

+ 4 - 12
src/views/enterprise/enterprisejb.vue

@@ -24,14 +24,12 @@ export default {
   }),
   created() {
     this.searchSite();
-
-    this.searchName();
     this.searchInfo();
   },
   computed: {},
   methods: {
     ...mapSite(['showInfo']),
-    ...mapRecruit({ columnList: 'query', columnInfo: 'fetch' }),
+    ...mapRecruit(['query', 'fetch']),
 
     // 查询站点信息
     async searchSite() {
@@ -43,16 +41,10 @@ export default {
         this.$message.error(res.errmsg ? res.errmsg : 'error');
       }
     },
-    // 查询科技政务栏目
-    async searchColumn({ ...info } = {}) {},
-
-    async searchName() {},
-
     async searchInfo() {
-      let detailId = 13144;
-
-      const res = await this.columnInfo(detailId);
-      this.$set(this, `recruitData`, res.data);
+      let detailId = '123456789';
+      const res = await this.fetch(detailId);
+      console.log(res.data);
     },
   },
 };

+ 0 - 1
vue.config.js

@@ -57,7 +57,6 @@ module.exports = {
         ws: true,
         // pathRewrite: { '^/api/affairs': '/api' },
       },
-
       '/api/market': {
         target: 'http://free.liaoningdoupo.com',
         changeOrigin: true,