Commit df53cdfa authored by zhengke's avatar zhengke

修改

parent 443527f2
...@@ -96,10 +96,15 @@ ...@@ -96,10 +96,15 @@
<div v-if="msg.MoveType=='1'" class="row items-center"> <div v-if="msg.MoveType=='1'" class="row items-center">
<div class="col"> <div class="col">
<q-table no-data-label="暂无相关数据" flat style="max-height: 300px;" :pagination="pages" <q-table no-data-label="暂无相关数据" flat style="max-height: 300px;" :pagination="pages"
class="sticky-column-table sticky-header-column-table no-bottom-table" separator="none" :data="currentClass" class="sticky-column-table sticky-header-column-table no-bottom-table" separator="none"
:columns="msg.ChangeType==1?columns:columns2" row-key="ClassPlanId" selection="multiple" :data="currentClass" :columns="msg.ChangeType==1?columns:columns2" row-key="ClassPlanId"
:selected.sync="selected"> selection="multiple" :selected.sync="selected">
<template v-slot:body-cell-ClassDate="props">
<q-td :props="props">
<div>{{props.row.ClassDate}}</div>
<div>{{props.row.WeekDayStr}}</div>
</q-td>
</template>
<template v-slot:body-cell-TimeList="props"> <template v-slot:body-cell-TimeList="props">
<q-td auto-width :props="props"> <q-td auto-width :props="props">
<div v-for="(item,index) in props.row.TimeList" class="lessForm_Class"> <div v-for="(item,index) in props.row.TimeList" class="lessForm_Class">
...@@ -165,7 +170,8 @@ ...@@ -165,7 +170,8 @@
<template v-slot:append> <template v-slot:append>
<q-icon name="event" class="cursor-pointer"> <q-icon name="event" class="cursor-pointer">
<q-popup-proxy ref="qDateProxy1" transition-show="scale" transition-hide="scale"> <q-popup-proxy ref="qDateProxy1" transition-show="scale" transition-hide="scale">
<q-date v-model="msg.AllChangePlanItem.OpenTimeStr" :options="optionsFn" @input="() => $refs.qDateProxy1.hide()" /> <q-date v-model="msg.AllChangePlanItem.OpenTimeStr" :options="optionsFn"
@input="() => $refs.qDateProxy1.hide()" />
</q-popup-proxy> </q-popup-proxy>
</q-icon> </q-icon>
</template> </template>
...@@ -322,11 +328,13 @@ ...@@ -322,11 +328,13 @@
</q-item> </q-item>
</template> </template>
</q-select> </q-select>
<q-input v-if="msg.MoveType=='2'" filled v-model="msg.TakeEffectTime" class="col-6" mask="date" label="生效时间"> <q-input v-if="msg.MoveType=='2'" filled v-model="msg.TakeEffectTime" class="col-6" mask="date"
label="生效时间">
<template v-slot:append> <template v-slot:append>
<q-icon name="event" class="cursor-pointer"> <q-icon name="event" class="cursor-pointer">
<q-popup-proxy ref="qDateProxy1" transition-show="scale" transition-hide="scale"> <q-popup-proxy ref="qDateProxy1" transition-show="scale" transition-hide="scale">
<q-date v-model="msg.TakeEffectTime" :options="optionsFn" @input="() => $refs.qDateProxy1.hide()" /> <q-date v-model="msg.TakeEffectTime" :options="optionsFn"
@input="() => $refs.qDateProxy1.hide()" />
</q-popup-proxy> </q-popup-proxy>
</q-icon> </q-icon>
</template> </template>
...@@ -339,11 +347,13 @@ ...@@ -339,11 +347,13 @@
<q-select filled option-value="TId" option-label="TeacherName" v-model="msg.TeacherId" <q-select filled option-value="TId" option-label="TeacherName" v-model="msg.TeacherId"
:options="TeacherList" emit-value map-options label="老师" class="col-6 q-pr-lg"> :options="TeacherList" emit-value map-options label="老师" class="col-6 q-pr-lg">
</q-select> </q-select>
<q-input filled v-if="msg.MoveType=='2'" v-model="msg.TakeEffectTime" class="col-6" mask="date" label="生效时间"> <q-input filled v-if="msg.MoveType=='2'" v-model="msg.TakeEffectTime" class="col-6" mask="date"
label="生效时间">
<template v-slot:append> <template v-slot:append>
<q-icon name="event" class="cursor-pointer"> <q-icon name="event" class="cursor-pointer">
<q-popup-proxy ref="qDateProxy1" transition-show="scale" transition-hide="scale"> <q-popup-proxy ref="qDateProxy1" transition-show="scale" transition-hide="scale">
<q-date v-model="msg.TakeEffectTime" :options="optionsFn" @input="() => $refs.qDateProxy1.hide()" /> <q-date v-model="msg.TakeEffectTime" :options="optionsFn"
@input="() => $refs.qDateProxy1.hide()" />
</q-popup-proxy> </q-popup-proxy>
</q-icon> </q-icon>
</template> </template>
...@@ -361,8 +371,8 @@ ...@@ -361,8 +371,8 @@
</template> </template>
</q-input> </q-input>
</div> </div>
<q-input filled type="textarea" :rows="3" style="margin-top:20px;" stack-label maxlength="2000" v-model="msg.Remarks" :dense="false" <q-input filled type="textarea" :rows="3" style="margin-top:20px;" stack-label maxlength="2000"
class="col-12 q-pb-lg" label="备注" /> v-model="msg.Remarks" :dense="false" class="col-12 q-pb-lg" label="备注" />
</q-scroll-area> </q-scroll-area>
</q-card-section> </q-card-section>
...@@ -438,8 +448,8 @@ ...@@ -438,8 +448,8 @@
ClassRoomId: 0, ClassRoomId: 0,
DefaultTimeList: [] DefaultTimeList: []
}, },
TakeEffectTime:'', //生效日期 TakeEffectTime: '', //生效日期
Remarks:'' //备注 Remarks: '' //备注
}, },
selected: [], selected: [],
classList: [], classList: [],
...@@ -641,13 +651,13 @@ ...@@ -641,13 +651,13 @@
this.$emit('close') this.$emit('close')
this.persistent = false this.persistent = false
}, },
optionsFn (date) { optionsFn(date) {
 var myDate = new Date(); var myDate = new Date();
let month = myDate.getMonth() + 1; let month = myDate.getMonth() + 1;
if(month<10){ if (month < 10) {
month = '0'+month month = '0' + month
} }
var toDay = myDate.getFullYear()+'/'+ month +'/' + myDate.getDate() var toDay = myDate.getFullYear() + '/' + month + '/' + myDate.getDate()
return date >= toDay return date >= toDay
}, },
//保存修改 //保存修改
...@@ -657,19 +667,26 @@ ...@@ -657,19 +667,26 @@
if (this.selected.length > 0) { if (this.selected.length > 0) {
this.msg.OldChangePlanItemList = []; this.msg.OldChangePlanItemList = [];
this.msg.NewChangePlanItemList = []; this.msg.NewChangePlanItemList = [];
this.selected.forEach(x => { let MySelect = JSON.parse(JSON.stringify(this.selected));
if(MySelect&&MySelect.length>0){
MySelect.forEach(x => {
this.msg.OldChangePlanItemList.push(x); this.msg.OldChangePlanItemList.push(x);
this.msg.NewChangePlanItemList.push(x.NewPlan) this.msg.NewChangePlanItemList.push(x.NewPlan)
}) })
this.msg.OldChangePlanItemList.forEach(x=>{ }
if(this.msg.OldChangePlanItemList&&this.msg.OldChangePlanItemList.length>0){
this.msg.OldChangePlanItemList.forEach(x => {
delete x.NewPlan delete x.NewPlan
x.PlanTimeList=x.TimeList x.PlanTimeList = x.TimeList
delete x.TimeList delete x.TimeList
}) })
this.msg.NewChangePlanItemList.forEach(x=>{ }
x.PlanTimeList=x.TimeList if(this.msg.NewChangePlanItemList&&this.msg.NewChangePlanItemList.length>0){
this.msg.NewChangePlanItemList.forEach(x => {
x.PlanTimeList = x.TimeList
delete x.TimeList delete x.TimeList
}) })
}
this.msg.AllChangePlanItem = {}; this.msg.AllChangePlanItem = {};
} else { } else {
this.$q.notify({ this.$q.notify({
...@@ -700,16 +717,19 @@ ...@@ -700,16 +717,19 @@
} }
this.msg.OldChangePlanItemList = []; this.msg.OldChangePlanItemList = [];
this.msg.NewChangePlanItemList = []; this.msg.NewChangePlanItemList = [];
this.selected.forEach(x => { let Array1 = JSON.parse(JSON.stringify(this.selected));
Array1.forEach(x => {
delete x.NewPlan delete x.NewPlan
x.PlanTimeList=x.TimeList x.PlanTimeList = x.TimeList
delete x.TimeList delete x.TimeList
this.msg.OldChangePlanItemList.push(x); this.msg.OldChangePlanItemList.push(x);
}) })
let Array = JSON.parse(JSON.stringify(this.selected)); let Array2 = JSON.parse(JSON.stringify(this.selected));
Array.forEach(x=>{ Array2.forEach(x => {
x.TeacherId = this.msg.TeacherId x.NewPlan.PlanTimeList = x.NewPlan.TimeList
this.msg.NewChangePlanItemList.push(x); delete x.NewPlan.TimeList
x.NewPlan.TeacherId = this.msg.TeacherId
this.msg.NewChangePlanItemList.push(x.NewPlan);
}) })
this.msg.AllChangePlanItem = {}; this.msg.AllChangePlanItem = {};
} else { } else {
...@@ -740,16 +760,19 @@ ...@@ -740,16 +760,19 @@
} }
this.msg.OldChangePlanItemList = []; this.msg.OldChangePlanItemList = [];
this.msg.NewChangePlanItemList = []; this.msg.NewChangePlanItemList = [];
this.selected.forEach(x => { let Array1 = JSON.parse(JSON.stringify(this.selected));
Array1.forEach(x => {
delete x.NewPlan delete x.NewPlan
x.PlanTimeList=x.TimeList x.PlanTimeList = x.TimeList
delete x.TimeList delete x.TimeList
this.msg.OldChangePlanItemList.push(x); this.msg.OldChangePlanItemList.push(x);
}) })
let Array = JSON.parse(JSON.stringify(this.selected)); let Array2 = JSON.parse(JSON.stringify(this.selected));
Array.forEach(x=>{ Array2.forEach(x => {
x.ClassRoomId = this.msg.ClassRoomId x.NewPlan.PlanTimeList = x.NewPlan.TimeList
this.msg.NewChangePlanItemList.push(x); delete x.NewPlan.TimeList
x.NewPlan.ClassRoomId = this.msg.ClassRoomId
this.msg.NewChangePlanItemList.push(x.NewPlan);
}) })
this.msg.AllChangePlanItem = {}; this.msg.AllChangePlanItem = {};
} else { } else {
...@@ -772,9 +795,10 @@ ...@@ -772,9 +795,10 @@
if (this.selected.length > 0) { if (this.selected.length > 0) {
this.msg.OldChangePlanItemList = []; this.msg.OldChangePlanItemList = [];
this.msg.NewChangePlanItemList = []; this.msg.NewChangePlanItemList = [];
this.selected.forEach(x => { let Array1 = JSON.parse(JSON.stringify(this.selected));
Array1.forEach(x => {
delete x.NewPlan delete x.NewPlan
x.PlanTimeList=x.TimeList x.PlanTimeList = x.TimeList
delete x.TimeList delete x.TimeList
this.msg.OldChangePlanItemList.push(x); this.msg.OldChangePlanItemList.push(x);
}) })
...@@ -794,6 +818,14 @@ ...@@ -794,6 +818,14 @@
this.msg.NewChangePlanItemList = []; this.msg.NewChangePlanItemList = [];
this.msg.AllChangePlanItem = {} this.msg.AllChangePlanItem = {}
} }
this.$q.dialog({
title: '提示信息',
message: '调课行为将影响您的备课记录,请慎重!',
cancel: true,
persistent: true,
ok: "确定",
cancel: "取消",
}).onOk(() => {
SetChangeClassPlan(this.msg).then(res => { SetChangeClassPlan(this.msg).then(res => {
if (res.Code == 1) { if (res.Code == 1) {
this.closeSaveForm(); this.closeSaveForm();
...@@ -807,6 +839,9 @@ ...@@ -807,6 +839,9 @@
}); });
} }
}) })
}).onCancel(() => {
});
}, },
proteinRangeValidation(val) { proteinRangeValidation(val) {
let newList = [] let newList = []
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment