Commit 28d8d12a authored by 黄奎's avatar 黄奎

页面修改

parent 64f1d33f
...@@ -85,7 +85,6 @@ ...@@ -85,7 +85,6 @@
EndTime: "", EndTime: "",
}, },
persistent: true, persistent: true,
} }
}, },
computed: {}, computed: {},
......
...@@ -137,10 +137,17 @@ ...@@ -137,10 +137,17 @@
!this.$refs.MachineCode.hasError) { !this.$refs.MachineCode.hasError) {
this.msg.Shifts = this.ShiftsNameArr.map(item => item.Id).toString(); this.msg.Shifts = this.ShiftsNameArr.map(item => item.Id).toString();
saveDutyConfig(this.msg).then(res => { saveDutyConfig(this.msg).then(res => {
console.log(res)
if (res.Code == 1) { if (res.Code == 1) {
this.$emit('success'); this.$emit('success');
this.closeRuleForm(); this.closeRuleForm();
} else {
this.$q.notify({
icon: 'iconfont icon-chenggong',
color: 'accent',
timeout: 2000,
message: res.Message,
position: 'top'
})
} }
}) })
} }
......
<template> <template>
<div class="page-body"> <div class="page-body">
<div class="page-search row items-center"> <div class="page-search row items-center">
<!-- <div class="col row wrap q-mr-lg q-col-gutter-md"> <div class="col row wrap q-mr-lg q-col-gutter-md">
<div class="col-3"> <div class="col-3">
<q-input @change="resetSearch" clearable standout="bg-primary text-white" v-model="msg.RoomName" label="教室名称" <q-select @input="resetSearch" clearable multiple standout="bg-primary text-white" option-value="SId"
@clear="resetSearch" maxlength="30" /> option-label="SName" v-model="msg.School_Ids" :options="schoolOptions" emit-value map-options label="校区"
@clear="resetSearch" />
</div>
<div class="col-3">
<div class="col-3 Sysuser_Date">
<q-field filled>
 <template v-slot:control>
<el-date-picker v-model="msg.StartDate" type="date" placeholder="开始日期" size="small" style="width:47%;"
@change="resetSearch" clear-icon="iconfont icon-guanbi">
</el-date-picker>
<el-date-picker v-model="msg.EndDate" type="date" placeholder="结束日期" size="small" style="width:47%;"
@change="resetSearch" clear-icon="iconfont icon-guanbi">
</el-date-picker>
</template>
</q-field>
</div>
</div> </div>
</div> --> </div>
</div> </div>
<div class="page-content"> <div class="page-content">
<q-table :pagination="msg" :loading="loading" no-data-label="暂无相关数据" flat class="sticky-column-table" <q-table :pagination="msg" :loading="loading" no-data-label="暂无相关数据" flat class="sticky-column-table"
...@@ -33,36 +49,33 @@ ...@@ -33,36 +49,33 @@
{{item.ShiftName}} {{item.ShiftName}}
</div> </div>
</div> </div>
</q-td> </q-td>
<q-td v-if="col.name == 'StartTime'" style="padding-right:0px"> <q-td v-if="col.name == 'StartTime'" 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">
{{item.StartTime}} - {{item.EndTime}} {{item.StartTime}} - {{item.EndTime}}
</div> </div>
</div> </div>
</q-td> </q-td>
<q-td v-if="col.name == 'DutyManName'" style="padding-right:0px"> <q-td v-if="col.name == 'DutyManName'" 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">
{{item.DutyManName}} {{item.DutyManName}}
</div> </div>
</div> </div>
</q-td> </q-td>
<q-td v-if="col.name == 'PlanId'" style="padding-right:0px"> <q-td v-if="col.name == 'DutyStatus'" style="padding-right:0px">
<div v-for="item in col.value"> <span v-if="props.row.DutyStatus==0" style="color:blue">{{props.row.DutyStatusStr}}</span>
<div class="border-bottom" style="padding-left: 16px;padding-right: 16px"> <span v-if="props.row.DutyStatus==1" style="color:green">{{props.row.DutyStatusStr}}</span>
<span v-if="getStatus(props.row.PlanDate,item)==1" style="color:blue">未开始</span> <span v-if="props.row.DutyStatus==2" style="color:red">{{props.row.DutyStatusStr}}</span>
<span v-if="getStatus(props.row.PlanDate,item)==2" style="color:green">进行中</span> </q-td>
<span v-if="getStatus(props.row.PlanDate,item)==3" style="color:red">已结束</span>
</div>
</div>
</q-td>
<q-td v-else-if="col.name == 'Id'" style="width:200px;"> <q-td v-else-if="col.name == 'Id'" style="width:200px;">
<q-btn flat size="xs" icon="edit" style="font-weight:400;" color="edit" class="q-mr-xs" label="修改" <q-btn v-if="props.row.DutyStatus==0" flat size="xs" icon="edit" style="font-weight:400;" color="edit"  class="q-mr-xs" label="修改"
 @click="EditSchedu(props.row)"   />  @click="EditSchedu(props.row)"   />
<q-btn flat size="xs" icon="delete" style="font-weight:400;" color="negative" class="q-mr-xs" label="删除" <q-btn v-if="props.row.DutyStatus==0" flat size="xs"  icon="delete"  style="font-weight:400;" color="negative"  class="q-mr-xs"
 @click="RemovePlan(props.row.Id)" /> label="删除"  @click="RemovePlan(props.row.Id)" />
<q-btn flat size="xs" icon="iconfont icon-View" style="font-weight:400;" class="q-mr-xs" label="查看"  @click=""   /> <q-btn flat size="xs" icon="iconfont icon-View" style="font-weight:400;" class="q-mr-xs"  label="查看"
 @click=""   />
</q-td> </q-td>
</template> </template>
</q-tr> </q-tr>
...@@ -82,6 +95,9 @@ ...@@ -82,6 +95,9 @@
GetDutyPlanPage, GetDutyPlanPage,
RemoveDutyPlan RemoveDutyPlan
} from '../../api/scheduling/schedu' } from '../../api/scheduling/schedu'
import {
getSchoolDropdown
} from '../../api/school/index'; //获取校区列表
import schedulForm from '../../components/schedul/schedul-form' import schedulForm from '../../components/schedul/schedul-form'
export default { export default {
...@@ -127,10 +143,10 @@ ...@@ -127,10 +143,10 @@
field: row => row.PlanDetails field: row => row.PlanDetails
}, },
{ {
name: 'PlanId', name: 'DutyStatus',
label: '状态', label: '状态',
align: 'left', align: 'left',
field: 'PlanId', field: 'DutyStatus',
field: row => row.PlanDetails field: row => row.PlanDetails
}, },
{ {
...@@ -145,17 +161,36 @@ ...@@ -145,17 +161,36 @@
pageIndex: 1, pageIndex: 1,
pageSize: 12, pageSize: 12,
rowsPerPage: 12, rowsPerPage: 12,
School_Ids: [],
StartDate: "", //开始日期
EndDate: "", //结束日期
}, },
isShowSchedu: false, isShowSchedu: false,
scheduOption: null, scheduOption: null,
pageCount: 0, pageCount: 0,
schoolOptions: [], //校区列表
} }
}, },
created() { created() {
this.querySchoolList();
},
mounted() {
this.getList(); this.getList();
}, },
mounted() {},
methods: { methods: {
//重新查询
resetSearch() {
this.msg.pageIndex = 1;
this.getList();
},
//获取校区列表
querySchoolList() {
getSchoolDropdown({}).then(res => {
if (res.Code == 1) {
this.schoolOptions = res.Data;
}
})
},
//获取校区列表 //获取校区列表
getList() { getList() {
GetDutyPlanPage(this.msg).then(res => { GetDutyPlanPage(this.msg).then(res => {
...@@ -166,7 +201,7 @@ ...@@ -166,7 +201,7 @@
}) })
}, },
//删除排班计划 //删除排班计划
RemovePlan(Id){ RemovePlan(Id) {
this.$q.dialog({ this.$q.dialog({
title: "确定删除排班计划", title: "确定删除排班计划",
message: '', message: '',
...@@ -181,7 +216,7 @@ ...@@ -181,7 +216,7 @@
} }
}).onOk(() => { }).onOk(() => {
let msg = { let msg = {
Id:Id Id: Id
} }
RemoveDutyPlan(msg).then(res => { RemoveDutyPlan(msg).then(res => {
if (res.Code == 1) { if (res.Code == 1) {
...@@ -222,23 +257,23 @@ ...@@ -222,23 +257,23 @@
} }
this.getList() this.getList()
}, },
getStatus(props,obj){ getStatus(props, obj) {
let beginDateStr = props+' '+obj.StartTime; // let beginDateStr = props + ' ' + obj.StartTime;
let endDateStr = props+' '+obj.EndTime; // let endDateStr = props + ' ' + obj.EndTime;
let str=0; // let str = 0;
let curDate = new Date(); // let curDate = new Date();
let beginDate = new Date(beginDateStr); // let beginDate = new Date(beginDateStr);
let endDate = new Date(endDateStr); // let endDate = new Date(endDateStr);
if(curDate<beginDate){ // if (curDate < beginDate) {
str=1 //未开始 // str = 1 //未开始
} // }
if(curDate>=beginDate&&curDate<=endDate){ // if (curDate >= beginDate && curDate <= endDate) {
str=2 //进行中 // str = 2 //进行中
} // }
if(curDate>endDate){ // if (curDate > endDate) {
str=3 //已结束 // str = 3 //已结束
} // }
return str; // return str;
} }
}, },
} }
...@@ -250,6 +285,7 @@ ...@@ -250,6 +285,7 @@
padding-bottom: 5px; padding-bottom: 5px;
margin-bottom: 5px; margin-bottom: 5px;
} }
</style> </style>
<style lang="sass"> <style lang="sass">
@import url('~assets/css/table.sass') @import url('~assets/css/table.sass')
......
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