lrf402788946 4 years ago
parent
commit
1e4a0bc9ea
2 changed files with 54 additions and 0 deletions
  1. 1 0
      src/components/adminCommon/frame.vue
  2. 53 0
      src/store/policy.js

+ 1 - 0
src/components/adminCommon/frame.vue

@@ -31,6 +31,7 @@
             <el-menu-item index="/adminCenter/organization">企业管理</el-menu-item>
             <el-menu-item index="/adminCenter/mechanism">机构管理</el-menu-item>
             <el-menu-item index="/adminCenter/online">线上管理</el-menu-item>
+            <el-menu-item index="/adminCenter/policy">高企政策服务管理</el-menu-item>
           </el-menu>
         </el-aside>
         <el-main class="main">

+ 53 - 0
src/store/policy.js

@@ -0,0 +1,53 @@
+import Vue from 'vue';
+import Vuex from 'vuex';
+import _ from 'lodash';
+Vue.use(Vuex);
+const api = {
+  interface: `/api/m/main/policy`,
+};
+const state = () => ({});
+const mutations = {};
+
+const actions = {
+  async query({ commit }, { skip = 0, limit, ...info } = {}) {
+    const res = await this.$axios.$get(`${api.interface}`, {
+      skip,
+      limit,
+      ...info,
+    });
+    return res;
+  },
+  async create({ commit }, payload) {
+    const res = await this.$axios.$post(`${api.interface}`, payload);
+    return res;
+  },
+  async fetch({ commit }, payload) {
+    const res = await this.$axios.$get(`${api.interface}/${payload}`);
+    return res;
+  },
+  async update({ commit }, { id, ...data }) {
+    const res = await this.$axios.$post(`${api.interface}/update/${id}`, data);
+    return res;
+  },
+
+  async delete({ commit }, payload) {
+    const res = await this.$axios.$delete(`${api.interface}/${payload}`);
+    return res;
+  },
+  // 获取行政区划
+  async xzqh({ commit }, payload) {
+    const res = await this.$axios.$get(`${api.interface}/xzqh`, payload);
+    return res;
+  },
+  // 用code换该项
+  async getItemByCode({ commit }, payload) {
+    const res = await this.$axios.$post(`${api.interface}/name`, payload);
+    return res;
+  },
+};
+export default {
+  namespaced: true,
+  state,
+  mutations,
+  actions,
+};