Procházet zdrojové kódy

整合store至frame项目

lrf402788946 před 5 roky
rodič
revize
756516a53a
2 změnil soubory, kde provedl 2 přidání a 40 odebrání
  1. 0 38
      src/store/dir-plan.js
  2. 2 2
      src/store/index.js

+ 0 - 38
src/store/dir-plan.js

@@ -1,38 +0,0 @@
-import Vue from 'vue';
-import Vuex from 'vuex';
-import _ from 'lodash';
-Vue.use(Vuex);
-const api = {
-  interface: `/api/train/teaplan`,
-};
-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;
-  },
-};
-export default {
-  namespaced: true,
-  state,
-  mutations,
-  actions,
-};

+ 2 - 2
src/store/index.js

@@ -1,7 +1,7 @@
 import Vue from 'vue';
 import Vuex from 'vuex';
-import trainplan from '@center/src/store/trainplan';
-import dirPlan from './dir-plan';
+import trainplan from '@frame/store/trainplan';
+import dirPlan from '@frame/store/dir-plan';
 
 Vue.use(Vuex);