Bladeren bron

Merge branch 'master' of http://git.cc-lotus.info/new_train/frame

guhongwei 4 jaren geleden
bovenliggende
commit
f6a9a1d991
6 gewijzigde bestanden met toevoegingen van 34 en 21 verwijderingen
  1. 17 9
      components/data-table.vue
  2. 4 9
      config/menu-config.js
  3. 1 2
      layout/admin/navBar/default-select.vue
  4. 1 1
      store/classes.js
  5. 5 0
      store/teacher.js
  6. 6 0
      store/trainplan.js

+ 17 - 9
components/data-table.vue

@@ -30,15 +30,22 @@
           <template v-slot="{ row, $index }">
             <template v-for="(item, index) in opera">
               <template v-if="display(item, row)">
-                <el-tooltip :key="index" effect="dark" :content="item.label" placement="bottom">
-                  <el-button
-                    :key="index"
-                    type="text"
-                    :icon="item.icon || ''"
-                    size="mini"
-                    @click="handleOpera(row, item.method, item.confirm, item.methodZh, item.label, $index)"
-                  ></el-button>
-                </el-tooltip>
+                <template v-if="item.icon">
+                  <el-tooltip :key="index" effect="dark" :content="item.label" placement="bottom">
+                    <el-button
+                      :key="index"
+                      type="text"
+                      :icon="item.icon || ''"
+                      size="mini"
+                      @click="handleOpera(row, item.method, item.confirm, item.methodZh, item.label, $index)"
+                    ></el-button>
+                  </el-tooltip>
+                </template>
+                <template v-else>
+                  <el-button :key="index" type="text" size="mini" @click="handleOpera(row, item.method, item.confirm, item.methodZh, item.label, $index)">
+                    {{ item.label }}
+                  </el-button>
+                </template>
               </template>
             </template>
           </template>
@@ -88,6 +95,7 @@ export default {
       }
     },
     handleOpera(data, method, confirm = false, methodZh, label, index) {
+      if (!method) return;
       let self = true;
       if (_.isFunction(methodZh)) {
         methodZh = methodZh(data);

+ 4 - 9
config/menu-config.js

@@ -84,11 +84,6 @@ const teacher = [
         name: '作业管理',
         module: 'teacher',
       },
-      {
-        path: '/class/index',
-        name: '班级信息',
-        module: 'teacher',
-      },
       {
         path: '/class/classStuList',
         name: '学生名单',
@@ -218,13 +213,13 @@ export const menu = [
         module: 'center',
       },
       {
-        path: '/plan/school/name/list',
-        name: '学校上报名单管理',
+        path: '/plan/school',
+        name: '培训计划详表',
         module: 'center',
       },
       {
-        path: '/plan/school',
-        name: '培训计划详表',
+        path: '/plan/school/name/list',
+        name: '学校上报名单管理',
         module: 'center',
       },
       {

+ 1 - 2
layout/admin/navBar/default-select.vue

@@ -85,6 +85,7 @@ export default {
       if (_.get(this.options, 'planid')) {
         this.search({ type: 'plan', planyearid: _.get(this.options, 'planyearid') });
       }
+      if (this.user.type == 1 || this.user.type == 3) this.getClassOption();
       this.loading = false;
     },
     async search({ type, ...info }) {
@@ -94,8 +95,6 @@ export default {
         if (type == 'plan') {
           let planid = _.get(this.options, 'planid');
           this.getTermList(planid);
-        } else if (type == 'planYear') {
-          // this.checkOption();
         }
       }
     },

+ 1 - 1
store/classes.js

@@ -7,7 +7,7 @@ const api = {
   interface: `/api/train/class`,
   divide: `/api/train/class/divide`,
   updateHeadTeacher: `/api/train/class/uptea`,
-  addStudent: id => `/api/train/class/upstuclass/${id} `, //id:班级id, ids:学生ID列表
+  addStudent: id => `/api/train/class/upstuclass/${id}`, //id:班级id, ids:学生ID列表
   teacherQuery: `/api/train/lesson/classbyteaid`,
   pluralUpdate: `/api/train/class/upclasses`,
   classNameList: id => `/api/train/class/classinfo/${id}`,

+ 5 - 0
store/teacher.js

@@ -6,6 +6,7 @@ Vue.use(Vuex);
 const api = {
   interface: `/api/train/teacher`,
   status: `/api/train/teacher/status`,
+  scoreimport: `/api/train/teacher/teaimport`, //filepath
 };
 const state = () => ({});
 const mutations = {};
@@ -37,6 +38,10 @@ const actions = {
     const res = await this.$axios.$post(`${api.status}`, payload);
     return res;
   },
+  async scoreImport({ commit }, payload) {
+    const res = await this.$axios.$post(`${api.scoreimport}`, { filepath: payload });
+    return res;
+  },
   async mergeRequest({ commit, dispatch }, { method, data }) {
     let toRequest = () => {
       let res = [];

+ 6 - 0
store/trainplan.js

@@ -7,6 +7,7 @@ const api = {
   interface: `/api/train/trainplan`,
   notice: `/api/train/class/notice`,
   exportStudent: `/api/train/trainplan/exportExcel`,
+  exportSchoolPlan: `/api/train/trainplan/exportSchool`,
 };
 const state = () => ({});
 const mutations = {};
@@ -50,6 +51,11 @@ const actions = {
     const res = await this.$axios.$post(`${api.exportStudent}`, { trainplanIds: payload });
     return res;
   },
+  //导出学校计划
+  async exportSchoolPlan({ commit }, payload) {
+    const res = await this.$axios.$post(`${api.exportSchoolPlan}`, payload);
+    return res;
+  },
 
   async mergeRequest({ commit, dispatch }, { method, data }) {
     let toRequest = () => {