Commit 6005b58d authored by zhengke's avatar zhengke

修改

parent dcc471b9
...@@ -51,7 +51,9 @@ ...@@ -51,7 +51,9 @@
<q-td v-if="col.name == 'PlanId'" style="padding-right:0px"> <q-td v-if="col.name == 'PlanId'" style="padding-right:0px">
<div v-for="item in col.value"> <div v-for="item in col.value">
<div class="border-bottom" style="padding-left: 16px;padding-right: 16px"> <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>
</div> </div>
</q-td> </q-td>
...@@ -157,15 +159,15 @@ ...@@ -157,15 +159,15 @@
getList() { getList() {
GetDutyPlanPage(this.msg).then(res => { GetDutyPlanPage(this.msg).then(res => {
if (res.Code == 1) { if (res.Code == 1) {
console.log(res, '列表数据');
this.dataList = res.Data.PageData; this.dataList = res.Data.PageData;
this.pageCount = res.Data.PageCount;
} }
}) })
}, },
//分页改变 //分页改变
changePage(val) { changePage(val) {
this.msg.pageIndex = val; this.msg.pageIndex = val;
this.getClassRoomPage(); this.getList();
}, },
//新增修改值班计划 //新增修改值班计划
EditSchedu(obj) { EditSchedu(obj) {
...@@ -182,16 +184,28 @@ ...@@ -182,16 +184,28 @@
}, },
//刷新页面 //刷新页面
refreshPage() { refreshPage() {
// if (!this.classRoomOption) { if (!this.scheduOption) {
// this.msg.pageIndex = 1; this.msg.pageIndex = 1;
// this.msg.RoomName = ""; }
// this.msg.School_Id = 0; this.getList()
// }
// this.getClassRoomPage()
}, },
getStatus(props,obj){ getStatus(props,obj){
console.log(props,'props'); let beginDateStr = props+' '+obj.StartTime;
console.log(obj,'objjjj'); 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