瀏覽代碼

创建分支提交最新代码

TheLittlePrince 6 年之前
父節點
當前提交
1bf9d2cacf

+ 4 - 4
src/ImgConfig/index.js

@@ -4,11 +4,11 @@ if (process.env.NODE_ENV === 'development') {
     IMG_BASE_URL = 'https://xtimg.sharingschool.com/' //测试环境图片地址
     APPOR_BASE_URL = 'https://xtkmt.sharingschool.com/kmt/index.html' //测试环境作业批改地址
 } else {
-    IMG_BASE_URL = 'https://img.sharingschool.com'; //正式环境图片地址;
-    // IMG_BASE_URL = 'https://xtimg.sharingschool.com' //实习,测试环境图片地址;
+    // IMG_BASE_URL = 'https://img.sharingschool.com'; //正式环境图片地址;
+    IMG_BASE_URL = 'https://xtimg.sharingschool.com' //实习,测试环境图片地址;
 
-    // APPOR_BASE_URL = 'https://xtkmt.sharingschool.com/kmt/index.html' //测试环境作业批改地址
-    APPOR_BASE_URL = 'https://kmt.sharingschool.com/aijia/kmt/index.html'; //正式环境作业批改地址地址;
+    APPOR_BASE_URL = 'https://xtkmt.sharingschool.com/kmt/index.html' //测试环境作业批改地址
+    // APPOR_BASE_URL = 'https://kmt.sharingschool.com/aijia/kmt/index.html'; //正式环境作业批改地址地址;
     // APPOR_BASE_URL = 'http://sxkmt.sharingschool.com/kmt/index.html' //实习环境作业批改地址
 }
 export {

+ 108 - 82
src/components/TeamWorkLists.vue

@@ -57,7 +57,9 @@
                 <thead>
                   <tr>
                     <!--汉字表头-->
-                    <th class="headTip" v-for="(item,index) in daynamearr" :key="index"><span :class="{'grayRed': item == '周六' || item == '周日'}">{{item}}</span></th>
+                    <th class="headTip" v-for="(item,index) in daynamearr" :key="index">
+                      <span :class="{'grayRed': item == '周六' || item == '周日'}">{{item}}</span>
+                    </th>
                   </tr>
                 </thead>
                 <tbody>
@@ -164,7 +166,7 @@
               <div class="tr-secon tr-sw80" style="color:#7297FF">55</div>
               <div class="Buttonhole" @click="detailTeacherTeam()">移除</div>
             </div>
-            </div>
+          </div>
           <div class="btsnius">
             <div class="yesBtn">确定</div>
             <div class="closeBtn">取消</div>
@@ -173,7 +175,7 @@
       </div>
     </div>
     <!-- 移除弹框 -->
-      <div class="showModel" @click="allShowModel(1)" v-if="hiddenModel"></div>
+    <div class="showModel" @click="allShowModel(1)" v-if="hiddenModel"></div>
     <div class="model" style="width:30%; top:30%;" v-if="hiddenModel">
       <div class="model-text">
         <div class="model-text-items">
@@ -185,7 +187,7 @@
               class="model-text-items-close"
             />
           </div>
-          <div>是否确定将{{}}老师移除?</div>
+          <div>是否确定将{{name}}老师移除?</div>
         </div>
         <div class="model-btn">
           <div class="model-btn-items main-gay" @click="ApplyOperate()">是</div>
@@ -193,7 +195,7 @@
         </div>
       </div>
     </div>
-     <!-- 添加老师弹框 -->
+    <!-- 添加老师弹框 -->
     <div class="showModel" @click="allShowModel(4)" v-if="AddTeacherModel"></div>
     <div class="model" style="width:30%; top:10%;" v-if="AddTeacherModel">
       <div class="model-text">
@@ -234,11 +236,19 @@
               <div class="tr-secon tr-sw80">13%</div>
               <div class="tr-secon tr-sw80" style="color:#7297FF">55</div>
               <div class="Selectradius" @click="AddeacherTeam()">
-                  <img v-if="this.isSelected ==false" class='Littleicon' src="../assets/img/normal.png" />
-                     <img  v-if="this.isSelected ==true" class='Littleicon' src="../assets/img/correct -hint.png" />
+                <img
+                  v-if="this.isSelected ==false"
+                  class="Littleicon"
+                  src="../assets/img/normal.png"
+                />
+                <img
+                  v-if="this.isSelected ==true"
+                  class="Littleicon"
+                  src="../assets/img/correct -hint.png"
+                />
               </div>
             </div>
-             </div>
+          </div>
           <div class="btsnius">
             <div class="yesBtn">确定</div>
             <div class="closeBtn">取消</div>
@@ -257,7 +267,7 @@ export default {
   props: {},
   data() {
     return {
-      daynamearr: ["周一", "周二", "周三", "周四", "周五", "周六","周日"],
+      daynamearr: ["周一", "周二", "周三", "周四", "周五", "周六", "周日"],
       //本月的本期构成
       dayarr: [],
       year: new Date().getFullYear(),
@@ -269,11 +279,11 @@ export default {
       selecttitlepag: "选年级",
       selecttitleage: "选科目",
       inputValue: "",
-      isSelected:false,
+      isSelected: false,
       isPigai: false,
       isApporTeacher: false, //移除添加老师
-      hiddenModel:false, //移除弹框
-      AddTeacherModel:false, //添加老师弹框
+      hiddenModel: false, //移除弹框
+      AddTeacherModel: false, //添加老师弹框
       filters: {
         OptionsValue: "",
         gradesValue: "",
@@ -322,7 +332,7 @@ export default {
   },
   watch: {},
   computed: {
-    ...mapGetters(["UnallotHomeworkInfo"])
+    ...mapGetters(["UnallotHomeworkInfo","DeleteArrangeByTeacher"])
   },
   methods: {
     //关闭弹框
@@ -337,7 +347,7 @@ export default {
         _this.isApporTeacher = false;
       } else if (str == 4) {
         _this.AddTeacherModel = false;
-          _this.isApporTeacher = true;
+        _this.isApporTeacher = true;
       } else if (str == 5) {
         _this.NoAllotManagerModel = false;
       }
@@ -346,37 +356,40 @@ export default {
       if (!item.prevmonth && !item.nextmonth) {
         this.NewDay = item.day;
         this.isPigai = true;
-      } if  (item.prevmonth){
+      }
+      if (item.prevmonth) {
         Message.error("当前月份已关闭,禁止操作!");
-      } if  (item.nextmonth){
+      }
+      if (item.nextmonth) {
         Message.error("当前月份未开启,禁止操作!");
       }
     },
-    showAddTeacherModel(){
+    showAddTeacherModel() {
       this.isApporTeacher = false;
       this.AddTeacherModel = true;
+      this.AddTeacherInfoList()
     },
     isShow() {
       this.isApporTeacher = true;
     },
-    detailTeacherTeam(){
-      this.isApporTeacher = false
-     this.hiddenModel = true;
+    detailTeacherTeam() {
+      this.isApporTeacher = false;
+      this.hiddenModel = true;
     },
-    AddeacherTeam(){
+    AddeacherTeam() {
       this.isSelected = true;
     },
     selectTip(item) {
       this.filters.OptionsValue = item.str;
       this.selecttitlepag = item.label;
       this.gardeListDown = false;
-        this.GetFindCalendarListInfo()
+      this.GetFindCalendarListInfo();
     },
     selectTipage(item) {
       this.filters.gradesValue = item.str;
       this.selecttitleage = item.label;
       this.gardeListDownage = false;
-        this.GetFindCalendarListInfo()
+      this.GetFindCalendarListInfo();
     },
     selectStyle1() {
       this.gardeListDownage = true;
@@ -393,11 +406,24 @@ export default {
     choiceclass() {
       this.gardeListDown = true;
     },
+    // 移除老师
+    async ApplyOperate() {
+      this.$store.dispatch("GetDeleteArrangeByTeacher", {
+        id: "",
+        teacherId:""
+      });
+    },
+    AddTeacherInfoList(){
+      this.$store.dispatch("GetDeleteArrangeByTeacher", {
+        id: "",
+        teacherId:""
+      });
+    },
     // 获取校区管理员监控数据
     async GetFindCalendarListInfo() {
-           this.$store.dispatch("GetFindCalendarList", {
+      this.$store.dispatch("GetFindCalendarList", {
         type: this.filters.OptionsValue,
-        subject:  this.filters.gradesValue
+        subject: this.filters.gradesValue
       });
     },
     theweek: function() {
@@ -412,48 +438,48 @@ export default {
       return _arr;
     },
     Datainit() {
-        //需要知道这个月的第一天是星期几
-    var themonth1stday = new Date(this.year, this.month - 1, 1).getDay();
-    console.log(themonth1stday);
-    //              alert(themonth1stday)
-    //本月有多少天,这个月的最后一天就是下个月的最后一天减去一毫秒
-    var y = this.month == 12 ? this.year + 1 : this.year;
-    var m = this.month == 12 ? 1 : this.month;
-    var themonthdaysamount = new Date(new Date(y, m, 1) - 1).getDate();
-    console.log(themonthdaysamount);
-    //上个月有多少天
-    var prevmonthlastday = new Date(
-      new Date(this.year, this.month - 1, 1) - 1
-    ).getDate();
-    console.log(prevmonthlastday);
-    //              alert(prevmonthlastday)
-    while (themonth1stday-- > 1) {
-      this.dayarr.unshift({
-        day: prevmonthlastday--,
-        prevmonth: true
-      });
-    }
-    //本月的日期
-    var count = 0;
-    while (themonthdaysamount--) {
-      this.dayarr.push({
-        day: ++count
-      });
-    }
-    var c = 42 - this.dayarr.length;
-    var count2 = 1;
-    while (c-- > 0) {
-      this.dayarr.push({
-        day: count2++,
-        nextmonth: true
-      });
-    }
+      //需要知道这个月的第一天是星期几
+      var themonth1stday = new Date(this.year, this.month - 1, 1).getDay();
+      console.log(themonth1stday);
+      //              alert(themonth1stday)
+      //本月有多少天,这个月的最后一天就是下个月的最后一天减去一毫秒
+      var y = this.month == 12 ? this.year + 1 : this.year;
+      var m = this.month == 12 ? 1 : this.month;
+      var themonthdaysamount = new Date(new Date(y, m, 1) - 1).getDate();
+      console.log(themonthdaysamount);
+      //上个月有多少天
+      var prevmonthlastday = new Date(
+        new Date(this.year, this.month - 1, 1) - 1
+      ).getDate();
+      console.log(prevmonthlastday);
+      //              alert(prevmonthlastday)
+      while (themonth1stday-- > 1) {
+        this.dayarr.unshift({
+          day: prevmonthlastday--,
+          prevmonth: true
+        });
+      }
+      //本月的日期
+      var count = 0;
+      while (themonthdaysamount--) {
+        this.dayarr.push({
+          day: ++count
+        });
+      }
+      var c = 42 - this.dayarr.length;
+      var count2 = 1;
+      while (c-- > 0) {
+        this.dayarr.push({
+          day: count2++,
+          nextmonth: true
+        });
+      }
     }
   },
 
   mounted() {
-    this.Datainit()
-    this.GetFindCalendarListInfo()
+    this.Datainit();
+    this.GetFindCalendarListInfo();
   }
 };
 </script>
@@ -621,8 +647,8 @@ table.bgtable tbody tr td.gray {
   min-width: 450px !important;
   padding: 20px;
 }
-.grayRed{
-  color:red;
+.grayRed {
+  color: red;
 }
 .model-text {
   background: rgba(255, 255, 255, 1);
@@ -786,32 +812,32 @@ table.bgtable tbody tr td.gray {
   -webkit-box-shadow: inset 0 0 1px rgba(0, 0, 0, 0.3);
   background-color: #bcbaba; /*滚动条的背景颜色*/
 }
-.btsnius{
+.btsnius {
   width: 100%;
   height: 60px;
 }
-.yesBtn{
-  margin-right:30px;
+.yesBtn {
+  margin-right: 30px;
   height: 40px;
   width: 100px;
-  background-color: #52CC60;
+  background-color: #52cc60;
   border-radius: 10px;
-  color:#fff;
-  line-height:40px;
-  text-align:center;
+  color: #fff;
+  line-height: 40px;
+  text-align: center;
   display: inline-block;
   cursor: pointer;
 }
-.closeBtn{
+.closeBtn {
   height: 40px;
   width: 100px;
   background-color: #fff;
   border-radius: 10px;
-  color:#52CC60;
-  line-height:40px;
-  text-align:center;
+  color: #52cc60;
+  line-height: 40px;
+  text-align: center;
   display: inline-block;
-  border: 1px solid #52CC60;
+  border: 1px solid #52cc60;
   cursor: pointer;
 }
 .model-grdeen {
@@ -850,10 +876,10 @@ table.bgtable tbody tr td.gray {
   background: rgba(246, 247, 251, 1);
   color: #7e7e7e;
 }
-.Littleicon{
-    height: 20px;
-  width:20px;
-  position:relative;
-  top:0;
+.Littleicon {
+  height: 20px;
+  width: 20px;
+  position: relative;
+  top: 0;
 }
 </style>

+ 9 - 1
src/components/TeamworkScheduling.vue

@@ -135,6 +135,7 @@ export default {
       accessToken: localStorage.getItem("accessToken"),
       NoAllotManagerModel: false, //token
       Activeindex:false,
+      TEACHERTYPE:"",
       filters1: {
         pageNo: 1,
         pageSize: 10
@@ -145,7 +146,7 @@ export default {
   created() {},
   watch: {},
   computed: {
-    ...mapGetters(["errorWarningList", "errorDetailList"])
+    ...mapGetters(["errorWarningList", "errorDetailList","FindTeamTeacherList"])
   },
   methods: {
     ...mapActions(["setUser"]),
@@ -178,6 +179,12 @@ export default {
         accessToken: this.accessToken
       });
     },
+     // 组内排班老师列表
+    async GetFindTeamTeacherListInfo() {
+      this.$store.dispatch("GetFindTeamTeacherList", {
+      type:this.TEACHERTYPE
+      });
+    },
     handleSizeChange1(val) {
       this.filters1.pageSize = val;
       this.GeterrorWarningLists();
@@ -216,6 +223,7 @@ export default {
     }
   },
   mounted() {
+    this.GetFindTeamTeacherListInfo()
     this.GeterrorWarningLists();
       //需要知道这个月的第一天是星期几
     var themonth1stday = new Date(this.year, this.month - 1, 1).getDay();

+ 2 - 2
src/config/index.js

@@ -2,8 +2,8 @@ let BASE_URL = ''
 if (process.env.NODE_ENV === 'development') {
     BASE_URL = 'https://xt.sharingschool.com/sz'
 } else {
-    // BASE_URL = 'https://xt.sharingschool.com/sz' //测试环境服务器地址
-    BASE_URL = 'https://t.sharingschool.com/sz'; //正式环境地址
+    BASE_URL = 'https://xt.sharingschool.com/sz' //测试环境服务器地址
+    // BASE_URL = 'https://t.sharingschool.com/sz'; //正式环境地址
     // BASE_URL = 'https://sx.sharingschool.com/sz'  //实习环境地址
 }
 const TIME_OUT = 10000

+ 3 - 0
src/store/getters.js

@@ -42,5 +42,8 @@ const getters = {
   GetKnowledgeTeacherSalaryList:state => state.user.GetKnowledgeTeacherSalaryList,
   FindCalendarList:state => state.user.FindCalendarList,
   FindHaveTeacherList:state => state.user.FindHaveTeacherList,
+  FindNoHaveTeacherList:state => state.user.FindNoHaveTeacherList,
+  FindTeamTeacherList:state => state.user.FindTeamTeacherList,
+  DeleteArrangeByTeacher:state => state.user.DeleteArrangeByTeacher,
 }
 export default getters

+ 43 - 4
src/store/modules/scheduling .js

@@ -1,4 +1,7 @@
-import {FindCalendarList,FindHaveTeacherList,FindNoHaveTeacherList
+import {FindCalendarList,FindHaveTeacherList,FindNoHaveTeacherList,
+  DeleteArrangeByTeacher,
+  AddArrangeByTeacher,
+  FindTeamTeacherList
 } from '@/api/scheduling'
     import { APPOR_BASE_URL } from '@/ImgConfig'
   import axios from '@/axios'
@@ -8,7 +11,9 @@ import {FindCalendarList,FindHaveTeacherList,FindNoHaveTeacherList
     state: {
       FindCalendarList:[],
       FindHaveTeacherList:[],
-      FindNoHaveTeacherList:[]
+      FindNoHaveTeacherList:[],
+      FindTeamTeacherList:[],
+      DeleteArrangeByTeacher:''
     },
   
     mutations: {
@@ -21,6 +26,12 @@ import {FindCalendarList,FindHaveTeacherList,FindNoHaveTeacherList
       SET_NOHAVETEACHER_LIST: (state, FindNoHaveTeacherList) => {
         state.FindNoHaveTeacherList = FindNoHaveTeacherList
       },
+      SET_TEABTEACHER_LIST: (state, FindTeamTeacherList) => {
+        state.FindTeamTeacherList = FindTeamTeacherList
+      },
+      SET_DELETETEABTEACHER_INFO: (state, DeleteArrangeByTeacher) => {
+        state.DeleteArrangeByTeacher = DeleteArrangeByTeacher
+      },
     },
   
     actions: {
@@ -52,8 +63,8 @@ import {FindCalendarList,FindHaveTeacherList,FindNoHaveTeacherList
           })
         })
       },
-         // 已选时段老师列表(校区管理员)
-         GetFindNoHaveTeacherList({ commit, state }, data) {
+         // 未选时段老师列表(添加老师)(校区管理员)
+      GetFindNoHaveTeacherList({ commit, state }, data) {
           return new Promise((resolve, reject) => {
             axios.post(FindNoHaveTeacherList, data).then(response => {
               const data = response || {}
@@ -66,6 +77,34 @@ import {FindCalendarList,FindHaveTeacherList,FindNoHaveTeacherList
             })
           })
         },
+             // 组内排班老师列表(校区管理员)
+      GetFindTeamTeacherList({ commit, state }, data) {
+        return new Promise((resolve, reject) => {
+          axios.post(FindTeamTeacherList, data).then(response => {
+            const data = response || {}
+            if (data.code === "999"){
+              // debugger
+              commit('SET_TEABTEACHER_LIST', data);
+            }
+          }).catch(error => {
+            reject(error)
+          })
+        })
+      },
+      // 时段移除老师
+      GetDeleteArrangeByTeacher({ commit, state }, data) {
+        return new Promise((resolve, reject) => {
+          axios.post(DeleteArrangeByTeacher, data).then(response => {
+            const data = response || {}
+            if (data.code === "999"){
+              // debugger
+              commit('SET_DELETETEABTEACHER_INFO', new Date());
+            }
+          }).catch(error => {
+            reject(error)
+          })
+        })
+      },
     }
   }