reloaded 5 年之前
父節點
當前提交
62f81cee96
共有 1 個文件被更改,包括 32 次插入32 次删除
  1. 32 32
      store/dictionary.js

+ 32 - 32
store/dictionary.js

@@ -1,33 +1,33 @@
-import Vue from 'vue';
-import Vuex from 'vuex';
-import _ from 'lodash';
-Vue.use(Vuex);
-const api = {
-  dictionary: '/api/code/{type}/items', //type === xzqh:query:level(1/2);parent(无/code)
-};
-const state = () => ({});
-const mutations = {};
+// import Vue from 'vue';
+// import Vuex from 'vuex';
+// import _ from 'lodash';
+// Vue.use(Vuex);
+// const api = {
+//   dictionary: '/api/code/{type}/items', //type === xzqh:query:level(1/2);parent(无/code)
+// };
+// const state = () => ({});
+// const mutations = {};
 
-const actions = {
-  // 字典表
-  async dicOperation({ state }, type) {
-    let result;
-    if (!_.isObject(type)) {
-      result = await this.$axios.$get(api.dictionary, { type: type });
-    } else {
-      let { level, parent, name } = type;
-      if (name) {
-        result = await this.$axios.$get(api.findOne, {}, { name: name });
-      } else {
-        result = await this.$axios.$get(api.dictionary, { type: 'xzqh' }, { level: level, parent: parent });
-      }
-    }
-    return result;
-  },
-};
-export default {
-  namespaced: true,
-  state,
-  mutations,
-  actions,
-};
+// const actions = {
+//   // 字典表
+//   async dicOperation({ state }, type) {
+//     let result;
+//     if (!_.isObject(type)) {
+//       result = await this.$axios.$get(api.dictionary, { type: type });
+//     } else {
+//       let { level, parent, name } = type;
+//       if (name) {
+//         result = await this.$axios.$get(api.findOne, {}, { name: name });
+//       } else {
+//         result = await this.$axios.$get(api.dictionary, { type: 'xzqh' }, { level: level, parent: parent });
+//       }
+//     }
+//     return result;
+//   },
+// };
+// export default {
+//   namespaced: true,
+//   state,
+//   mutations,
+//   actions,
+// };