Commit df53cdfa authored by zhengke's avatar zhengke

修改

parent 443527f2
......@@ -96,10 +96,15 @@
<div v-if="msg.MoveType=='1'" class="row items-center">
<div class="col">
<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"
:columns="msg.ChangeType==1?columns:columns2" row-key="ClassPlanId" selection="multiple"
:selected.sync="selected">
class="sticky-column-table sticky-header-column-table no-bottom-table" separator="none"
:data="currentClass" :columns="msg.ChangeType==1?columns:columns2" row-key="ClassPlanId"
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">
<q-td auto-width :props="props">
<div v-for="(item,index) in props.row.TimeList" class="lessForm_Class">
......@@ -165,7 +170,8 @@
<template v-slot:append>
<q-icon name="event" class="cursor-pointer">
<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-icon>
</template>
......@@ -322,11 +328,13 @@
</q-item>
</template>
</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>
<q-icon name="event" class="cursor-pointer">
<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-icon>
</template>
......@@ -339,11 +347,13 @@
<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">
</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>
<q-icon name="event" class="cursor-pointer">
<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-icon>
</template>
......@@ -361,8 +371,8 @@
</template>
</q-input>
</div>
<q-input filled type="textarea" :rows="3" style="margin-top:20px;" stack-label maxlength="2000" v-model="msg.Remarks" :dense="false"
class="col-12 q-pb-lg" label="备注" />
<q-input filled type="textarea" :rows="3" style="margin-top:20px;" stack-label maxlength="2000"
v-model="msg.Remarks" :dense="false" class="col-12 q-pb-lg" label="备注" />
</q-scroll-area>
</q-card-section>
......@@ -438,8 +448,8 @@
ClassRoomId: 0,
DefaultTimeList: []
},
TakeEffectTime:'', //生效日期
Remarks:'' //备注
TakeEffectTime: '', //生效日期
Remarks: '' //备注
},
selected: [],
classList: [],
......@@ -641,13 +651,13 @@
this.$emit('close')
this.persistent = false
},
optionsFn (date) {
 var myDate = new Date();
optionsFn(date) {
var myDate = new Date();
let month = myDate.getMonth() + 1;
if(month<10){
month = '0'+month
if (month < 10) {
month = '0' + month
}
var toDay = myDate.getFullYear()+'/'+ month +'/' + myDate.getDate()
var toDay = myDate.getFullYear() + '/' + month + '/' + myDate.getDate()
return date >= toDay
},
//保存修改
......@@ -657,19 +667,26 @@
if (this.selected.length > 0) {
this.msg.OldChangePlanItemList = [];
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.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
x.PlanTimeList=x.TimeList
x.PlanTimeList = 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
})
}
this.msg.AllChangePlanItem = {};
} else {
this.$q.notify({
......@@ -700,16 +717,19 @@
}
this.msg.OldChangePlanItemList = [];
this.msg.NewChangePlanItemList = [];
this.selected.forEach(x => {
let Array1 = JSON.parse(JSON.stringify(this.selected));
Array1.forEach(x => {
delete x.NewPlan
x.PlanTimeList=x.TimeList
x.PlanTimeList = x.TimeList
delete x.TimeList
this.msg.OldChangePlanItemList.push(x);
})
let Array = JSON.parse(JSON.stringify(this.selected));
Array.forEach(x=>{
x.TeacherId = this.msg.TeacherId
this.msg.NewChangePlanItemList.push(x);
let Array2 = JSON.parse(JSON.stringify(this.selected));
Array2.forEach(x => {
x.NewPlan.PlanTimeList = x.NewPlan.TimeList
delete x.NewPlan.TimeList
x.NewPlan.TeacherId = this.msg.TeacherId
this.msg.NewChangePlanItemList.push(x.NewPlan);
})
this.msg.AllChangePlanItem = {};
} else {
......@@ -740,16 +760,19 @@
}
this.msg.OldChangePlanItemList = [];
this.msg.NewChangePlanItemList = [];
this.selected.forEach(x => {
let Array1 = JSON.parse(JSON.stringify(this.selected));
Array1.forEach(x => {
delete x.NewPlan
x.PlanTimeList=x.TimeList
x.PlanTimeList = x.TimeList
delete x.TimeList
this.msg.OldChangePlanItemList.push(x);
})
let Array = JSON.parse(JSON.stringify(this.selected));
Array.forEach(x=>{
x.ClassRoomId = this.msg.ClassRoomId
this.msg.NewChangePlanItemList.push(x);
let Array2 = JSON.parse(JSON.stringify(this.selected));
Array2.forEach(x => {
x.NewPlan.PlanTimeList = x.NewPlan.TimeList
delete x.NewPlan.TimeList
x.NewPlan.ClassRoomId = this.msg.ClassRoomId
this.msg.NewChangePlanItemList.push(x.NewPlan);
})
this.msg.AllChangePlanItem = {};
} else {
......@@ -772,9 +795,10 @@
if (this.selected.length > 0) {
this.msg.OldChangePlanItemList = [];
this.msg.NewChangePlanItemList = [];
this.selected.forEach(x => {
let Array1 = JSON.parse(JSON.stringify(this.selected));
Array1.forEach(x => {
delete x.NewPlan
x.PlanTimeList=x.TimeList
x.PlanTimeList = x.TimeList
delete x.TimeList
this.msg.OldChangePlanItemList.push(x);
})
......@@ -794,6 +818,14 @@
this.msg.NewChangePlanItemList = [];
this.msg.AllChangePlanItem = {}
}
this.$q.dialog({
title: '提示信息',
message: '调课行为将影响您的备课记录,请慎重!',
cancel: true,
persistent: true,
ok: "确定",
cancel: "取消",
}).onOk(() => {
SetChangeClassPlan(this.msg).then(res => {
if (res.Code == 1) {
this.closeSaveForm();
......@@ -807,6 +839,9 @@
});
}
})
}).onCancel(() => {
});
},
proteinRangeValidation(val) {
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