Commit b6e02555 authored by 黄奎's avatar 黄奎

页面修改

parent 32cd7717
......@@ -306,24 +306,6 @@
}
this.getList()
},
getStatus(props, obj) {
// 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;
}
},
}
......
......@@ -40,10 +40,9 @@
<q-table :pagination="msg" :loading="loading" no-data-label="暂无相关数据" flat class="sticky-column-table"
separator="none" title="排班计划" :data="dataList" :columns="columns" row-key="name">
<template v-slot:top="props">
<div class="col-2 q-table__title">排班计划</div>
<div class="col-2 q-table__title">值班记录</div>
<q-space />
<div class="page-option">
<q-btn color="accent" size="sm" icon="add" label="新增排班计划" @click="EditSchedu(null)" />
</div>
</template>
<template v-slot:body="props">
......@@ -93,21 +92,17 @@
:input="true" @input="changePage" />
</template>
</q-table>
<schedul-form v-if="isShowSchedu" :save-obj="scheduOption" @close="closeScheduForm" @success="refreshPage">
</schedul-form>
</div>
</div>
</template>
<script>
import {
GetDutyPlanPage,
RemoveDutyPlan
} from '../../api/scheduling/schedu'
import {
getSchoolDropdown
} from '../../api/school/index'; //获取校区列表
import schedulForm from '../../components/schedul/schedul-form'
import {
queryEmployee
} from '../../api/users/user'; //获取员工
......@@ -116,7 +111,7 @@
title: "排班计划"
},
components: {
schedulForm
},
data() {
return {
......@@ -176,9 +171,8 @@
StartDate: "", //开始日期
EndDate: "", //结束日期
EmployeeIds: [], //员工列表
IsFinish: 1, //已完成值班
},
isShowSchedu: false,
scheduOption: null,
pageCount: 0,
schoolOptions: [], //校区列表
EmployeeList: [], //员工列表
......@@ -244,81 +238,11 @@
}
})
},
//删除排班计划
RemovePlan(Id) {
this.$q.dialog({
title: "确定删除排班计划",
message: '',
cancel: {
label: "取消",
flat: true
},
ok: {
label: "确认",
flat: true,
focus: true
}
}).onOk(() => {
let msg = {
Id: Id
}
RemoveDutyPlan(msg).then(res => {
if (res.Code == 1) {
this.$q.notify({
icon: 'iconfont icon-chenggong',
color: 'accent',
timeout: 2000,
message: '操作成功',
position: 'top'
})
this.getList();
}
})
});
},
//分页改变
changePage(val) {
this.msg.pageIndex = val;
this.getList();
},
//新增修改值班计划
EditSchedu(obj) {
if (obj) {
this.scheduOption = obj;
} else {
this.scheduOption = null;
}
this.isShowSchedu = true;
},
//关闭新增修改弹窗
closeScheduForm() {
this.isShowSchedu = false;
},
//刷新页面
refreshPage() {
if (!this.scheduOption) {
this.msg.pageIndex = 1;
}
this.getList()
},
getStatus(props, obj) {
// 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