Browse Source

修改日历事件,添加菜单,计划管理-班级管理

lrf402788946 5 years ago
parent
commit
d88831832a
3 changed files with 12 additions and 1 deletions
  1. 2 1
      components/calendar.vue
  2. 5 0
      config/menu-config.js
  3. 5 0
      store/sch-plan.js

+ 2 - 1
components/calendar.vue

@@ -86,7 +86,8 @@ export default {
       arg.endStr = moment(arg.endStr)
         .subtract(1, 'days')
         .format('YYYY-MM-DD');
-      let is_possbile = this.$checkDate({ ...arg, vacation: this.vacation });
+      // let is_possbile = this.$checkDate({ ...arg, vacation: this.vacation });
+      let is_possbile = this.$checkDate(arg.startStr, arg.endStr, this.vacation);
       if (is_possbile == true) this.$emit('draft', arg);
       else this.$message.error('您选择的时间段与假期重合,请您重新选择');
     },

+ 5 - 0
config/menu-config.js

@@ -83,6 +83,11 @@ export const center = [
         name: '年度计划',
         module: 'center',
       },
+      {
+        path: '/newPlan/classes/index',
+        name: '班级管理',
+        module: 'center',
+      },
       {
         path: '/newPlan/template',
         name: '计划模板',

+ 5 - 0
store/sch-plan.js

@@ -5,6 +5,7 @@ import axios from 'axios';
 Vue.use(Vuex);
 const api = {
   interface: `/api/train/schtime`,
+  schArrange: `/api/train/schtime/updateschtimes`,
 };
 const state = () => ({});
 const mutations = {};
@@ -30,6 +31,10 @@ const actions = {
     const res = await this.$axios.$delete(`${api.interface}/${payload}`);
     return res;
   },
+  async schArrange({ commit }, payload) {
+    const res = await this.$axios.$post(`${api.schArrange}`, payload);
+    return res;
+  },
   async mergeRequest({ commit, dispatch }, { method, data }) {
     let toRequest = () => {
       let res = [];