lrf402788946 před 5 roky
rodič
revize
787fdb35bc
5 změnil soubory, kde provedl 47 přidání a 1 odebrání
  1. 1 0
      config/menu-config.js
  2. 39 0
      store/question-completion.js
  3. 1 1
      store/question.js
  4. 1 0
      store/student.js
  5. 5 0
      store/tea-plan.js

+ 1 - 0
config/menu-config.js

@@ -89,6 +89,7 @@ export const devMenu = [
     children: [
     children: [
       { path: '/questionnaire/index', name: '问卷管理' },
       { path: '/questionnaire/index', name: '问卷管理' },
       { path: '/itembank/index', name: '题库管理' },
       { path: '/itembank/index', name: '题库管理' },
+      { path: '/questionstate/index', name: '问卷进度' },
     ],
     ],
   },
   },
 
 

+ 39 - 0
store/question-completion.js

@@ -0,0 +1,39 @@
+import Vue from 'vue';
+import Vuex from 'vuex';
+import _ from 'lodash';
+Vue.use(Vuex);
+const api = {
+  interface: `/api/train/uploadquestion/completion`,
+};
+const state = () => ({});
+const mutations = {};
+
+const actions = {
+  async query({ commit }, { skip = 0, limit, ...info } = {}) {
+    // type: 0=> typeid=期id; 1 => typeid = 批次id; 2 => typeid = 班级id
+    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,
+};

+ 1 - 1
store/question.js

@@ -18,7 +18,7 @@ const actions = {
     return res;
     return res;
   },
   },
   async fetch({ commit }, payload) {
   async fetch({ commit }, payload) {
-    const res = await this.$axios.$get(`${api.interface}/show/${payload}`);
+    const res = await this.$axios.$get(`${api.interface}/${payload}`);
     return res;
     return res;
   },
   },
   async update({ commit }, { id, ...data }) {
   async update({ commit }, { id, ...data }) {

+ 1 - 0
store/student.js

@@ -11,6 +11,7 @@ const mutations = {};
 
 
 const actions = {
 const actions = {
   async query({ commit }, { skip = 0, limit, ...info } = {}) {
   async query({ commit }, { skip = 0, limit, ...info } = {}) {
+    console.log(info);
     const res = await this.$axios.$get(`${api.interface}`, { skip, limit, ...info });
     const res = await this.$axios.$get(`${api.interface}`, { skip, limit, ...info });
     return res;
     return res;
   },
   },

+ 5 - 0
store/tea-plan.js

@@ -4,6 +4,7 @@ import _ from 'lodash';
 Vue.use(Vuex);
 Vue.use(Vuex);
 const api = {
 const api = {
   interface: `/api/train/apply`,
   interface: `/api/train/apply`,
+  apply: `/api/train/apply/queryteacher`,
 };
 };
 const state = () => ({});
 const state = () => ({});
 const mutations = {};
 const mutations = {};
@@ -29,6 +30,10 @@ const actions = {
     const res = await this.$axios.$delete(`${api.interface}/${payload}`);
     const res = await this.$axios.$delete(`${api.interface}/${payload}`);
     return res;
     return res;
   },
   },
+  async applyQuery({ commit }, { skip = 0, limit, ...info } = {}) {
+    const res = await this.$axios.$get(`${api.apply}`, { skip, limit, ...info });
+    return res;
+  },
 };
 };
 export default {
 export default {
   namespaced: true,
   namespaced: true,