Commit 05fcbc7e authored by 黄奎's avatar 黄奎

页面修改

parent f48fcff0
...@@ -6,7 +6,6 @@ ...@@ -6,7 +6,6 @@
<q-select @input="resetSearch" clearable multiple standout="bg-primary text-white" option-value="SId" <q-select @input="resetSearch" clearable multiple standout="bg-primary text-white" option-value="SId"
option-label="SName" v-model="msg.School_Ids" :options="schoolOptions" emit-value map-options label="校区" option-label="SName" v-model="msg.School_Ids" :options="schoolOptions" emit-value map-options label="校区"
@clear="resetSearch" /> @clear="resetSearch" />
</div> </div>
<div class="col-3"> <div class="col-3">
<div class="col-3 Sysuser_Date"> <div class="col-3 Sysuser_Date">
...@@ -22,6 +21,19 @@ ...@@ -22,6 +21,19 @@
</q-field> </q-field>
</div> </div>
</div> </div>
<div class="col-3">
<q-select v-model="msg.EmployeeIds" :options="EmployeeList" filled multiple clearable use-input label="值班人员"
option-label="EmployeeName" option-value="Id" ref="EmployeeName" class="col-6 q-pr-lg q-pb-lg" emit-value
map-options @input="resetSearch" @filter="filterFn">
<template v-slot:no-option>
<q-item>
<q-item-section class="text-grey">
未找到相关数据
</q-item-section>
</q-item>
</template>
</q-select>
</div>
</div> </div>
</div> </div>
<div class="page-content"> <div class="page-content">
...@@ -70,10 +82,11 @@ ...@@ -70,10 +82,11 @@
<span v-if="props.row.DutyStatus==2" style="color:red">{{props.row.DutyStatusStr}}</span> <span v-if="props.row.DutyStatus==2" style="color:red">{{props.row.DutyStatusStr}}</span>
</q-td> </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 v-if="props.row.DutyStatus==0" flat size="xs" icon="edit" style="font-weight:400;" color="edit"  class="q-mr-xs" label="修改" <q-btn v-if="props.row.DutyStatus==0||props.row.DutyStatus==1"  flat size="xs"  icon="edit"
 @click="EditSchedu(props.row)"   />  style="font-weight:400;" color="edit"  class="q-mr-xs" label="修改"  @click="EditSchedu(props.row)"
<q-btn v-if="props.row.DutyStatus==0" flat size="xs"  icon="delete"  style="font-weight:400;" color="negative"  class="q-mr-xs"   />
label="删除"  @click="RemovePlan(props.row.Id)" /> <q-btn v-if="props.row.DutyStatus==0"  flat size="xs"  icon="delete"  style="font-weight:400;"
color="negative"  class="q-mr-xs" label="删除"  @click="RemovePlan(props.row.Id)" />
<q-btn flat size="xs" icon="iconfont icon-View" style="font-weight:400;" class="q-mr-xs"  label="查看" <q-btn flat size="xs" icon="iconfont icon-View" style="font-weight:400;" class="q-mr-xs"  label="查看"
 @click=""   />  @click=""   />
</q-td> </q-td>
...@@ -98,8 +111,11 @@ ...@@ -98,8 +111,11 @@
import { import {
getSchoolDropdown getSchoolDropdown
} from '../../api/school/index'; //获取校区列表 } from '../../api/school/index'; //获取校区列表
import schedulForm from '../../components/schedul/schedul-form'
import schedulForm from '../../components/schedul/schedul-form'
import {
queryEmployee
} from '../../api/users/user'; //获取员工
export default { export default {
meta: { meta: {
title: "排班计划" title: "排班计划"
...@@ -164,20 +180,53 @@ ...@@ -164,20 +180,53 @@
School_Ids: [], School_Ids: [],
StartDate: "", //开始日期 StartDate: "", //开始日期
EndDate: "", //结束日期 EndDate: "", //结束日期
EmployeeIds: [], //员工列表
}, },
isShowSchedu: false, isShowSchedu: false,
scheduOption: null, scheduOption: null,
pageCount: 0, pageCount: 0,
schoolOptions: [], //校区列表 schoolOptions: [], //校区列表
EmployeeList: [], //员工列表
AllemployeeList: [], //所有员工列表
} }
}, },
created() { created() {
let nowDay = new Date();
var year = nowDay.getFullYear(); //年
var month = nowDay.getMonth() + 1; //月
var day = nowDay.getDate(); //日
var currentDay = year + '-' + month + '-' + day;
this.msg.StartDate = currentDay;
this.querySchoolList(); this.querySchoolList();
this.getEmployee();
}, },
mounted() { mounted() {
this.getList(); this.getList();
}, },
methods: { methods: {
//筛选员工
filterFn(val, update) {
update(() => {
if (val === '') {
this.EmployeeList = JSON.parse(JSON.stringify(this.AllemployeeList))
} else {
const needle = val.toLowerCase();
this.EmployeeList = this.AllemployeeList.filter(v => v.EmployeeName.toLowerCase().indexOf(needle) > -1);
}
})
},
//获取业务员
getEmployee() {
var qMsg = {
Dept_Id: 0
}
queryEmployee(qMsg).then(res => {
if (res.Code == 1) {
this.EmployeeList = res.Data;
this.AllemployeeList = res.Data;
}
}).catch(() => {})
},
//重新查询 //重新查询
resetSearch() { resetSearch() {
this.msg.pageIndex = 1; this.msg.pageIndex = 1;
......
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