guhongwei il y a 2 ans
Parent
commit
8403e81dcf
3 fichiers modifiés avec 104 ajouts et 0 suppressions
  1. 20 0
      src/layout/site.js
  2. 42 0
      src/store/app/scenedata.js
  3. 42 0
      src/store/app/scenetype.js

+ 20 - 0
src/layout/site.js

@@ -146,6 +146,26 @@ export const menus = [
         name: '应用管理',
         path: '/app/appapk',
       },
+      {
+        _id: 'me3us_2_5',
+        icon: 'el-icon-user',
+        name: '视频场景',
+        type: '2',
+        children: [
+          {
+            _id: 'me3us_2_5_1',
+            icon: 'el-icon-user',
+            name: '视频场景分类',
+            path: '/app/scene/type',
+          },
+          {
+            _id: 'me3us_2_5_2',
+            icon: 'el-icon-user',
+            name: '视频场景信息',
+            path: '/app/scene/data',
+          },
+        ],
+      },
     ],
   },
   {

+ 42 - 0
src/store/app/scenedata.js

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

+ 42 - 0
src/store/app/scenetype.js

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