Commit 6005b58d authored by zhengke's avatar zhengke

修改

parent dcc471b9
......@@ -51,7 +51,9 @@
<q-td v-if="col.name == 'PlanId'" style="padding-right:0px">
<div v-for="item in col.value">
<div class="border-bottom" style="padding-left: 16px;padding-right: 16px">
{{getStatus(props,item)}}
<span v-if="getStatus(props.row.PlanDate,item)==1" style="color:blue">未开始</span>
<span v-if="getStatus(props.row.PlanDate,item)==2" style="color:green">进行中</span>
<span v-if="getStatus(props.row.PlanDate,item)==3" style="color:red">已结束</span>
</div>
</div>
</q-td>
......@@ -157,15 +159,15 @@
getList() {
GetDutyPlanPage(this.msg).then(res => {
if (res.Code == 1) {
console.log(res, '列表数据');
this.dataList = res.Data.PageData;
this.pageCount = res.Data.PageCount;
}
})
},
//分页改变
changePage(val) {
this.msg.pageIndex = val;
this.getClassRoomPage();
this.getList();
},
//新增修改值班计划
EditSchedu(obj) {
......@@ -182,16 +184,28 @@
},
//刷新页面
refreshPage() {
// if (!this.classRoomOption) {
// this.msg.pageIndex = 1;
// this.msg.RoomName = "";
// this.msg.School_Id = 0;
// }
// this.getClassRoomPage()
if (!this.scheduOption) {
this.msg.pageIndex = 1;
}
this.getList()
},
getStatus(props,obj){
console.log(props,'props');
console.log(obj,'objjjj');
let beginDateStr = props+' '+obj.StartTime;
let endDateStr = props+' '+obj.EndTime;
let str=0;
let curDate = new Date();
let beginDate = new Date(beginDateStr);
let endDate = new Date(endDateStr);
if(curDate<beginDate){
str=1 //未开始
}
if(curDate>=beginDate&&curDate<=endDate){
str=2 //进行中
}
if(curDate>endDate){
str=3 //已结束
}
return str;
}
},
}
......
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