Commit 272c146c authored by 黄奎's avatar 黄奎
parents 0fcae4ca 46258c99
...@@ -20,6 +20,15 @@ export function GetDutyPlanPage(data) { ...@@ -20,6 +20,15 @@ export function GetDutyPlanPage(data) {
}) })
} }
//删除值班计划
export function RemoveDutyPlan(data) {
return request({
url: '/DutyPlan/RemoveDutyPlan',
method: 'post',
data
})
}
//保存排课计划 //保存排课计划
export function SaveDutyPlan(data) { export function SaveDutyPlan(data) {
return request({ return request({
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
</q-input> </q-input>
<q-select filled stack-label option-value="SId" option-label="SName" v-model="objOption.School_Id" <q-select filled stack-label option-value="SId" option-label="SName" v-model="objOption.School_Id"
ref="School_Id" :options="schoolList" label="所属校区" :dense="false" class="col-6 q-pb-lg" emit-value ref="School_Id" :options="schoolList" label="所属校区" :dense="false" class="col-6 q-pb-lg" emit-value
map-options :rules="[val => !!val || '请选择所属校区']" @input="getDutyFrequencyList()" /> map-options :rules="[val => val!=-1 || '请选择所属校区']" @input="getDutyFrequencyList()" />
</div> </div>
<div class="row wrap" style="margin:20px 0;"> <div class="row wrap" style="margin:20px 0;">
<div class="col-6"> <div class="col-6">
...@@ -83,7 +83,7 @@ ...@@ -83,7 +83,7 @@
objOption: { objOption: {
Id: 0, Id: 0,
Date: '', //值班时间 Date: '', //值班时间
School_Id: '', //校区 School_Id: -1, //校区
PlanDetails: [] //班次列表 PlanDetails: [] //班次列表
}, },
optionTitle: "", optionTitle: "",
...@@ -119,7 +119,7 @@ ...@@ -119,7 +119,7 @@
} else { } else {
this.objOption.Id = 0; this.objOption.Id = 0;
this.objOption.Date = ''; this.objOption.Date = '';
this.objOption.School_Id = ''; this.objOption.School_Id = -1;
this.objOption.PlanDetails = []; this.objOption.PlanDetails = [];
} }
}, },
...@@ -127,6 +127,11 @@ ...@@ -127,6 +127,11 @@
getSchool() { getSchool() {
getSchoolDropdown({}).then(res => { getSchoolDropdown({}).then(res => {
this.schoolList = res.Data; this.schoolList = res.Data;
let obj = {
SId: -1,
SName: '请选择'
}
this.schoolList.unshift(obj);
this.$forceUpdate(); this.$forceUpdate();
}) })
}, },
...@@ -136,27 +141,30 @@ ...@@ -136,27 +141,30 @@
}, },
//保存排班 //保存排班
savePlan() { savePlan() {
SaveDutyPlan(this.objOption).then(res => { this.$refs.School_Id.validate();
if (res.Code == 1) { if (!this.$refs.School_Id.hasError) {
this.$q.notify({ SaveDutyPlan(this.objOption).then(res => {
icon: 'iconfont icon-chenggong', if (res.Code == 1) {
color: 'accent', this.$q.notify({
timeout: 2000, icon: 'iconfont icon-chenggong',
message: '数据保存成功!', color: 'accent',
position: 'top' timeout: 2000,
}) message: '数据保存成功!',
this.$emit("success") position: 'top'
this.closeSaveForm() })
} else { this.$emit("success")
this.$q.notify({ this.closeSaveForm()
icon: 'iconfont icon-chenggong', } else {
color: 'accent', this.$q.notify({
timeout: 2000, icon: 'iconfont icon-chenggong',
message: res.Message, color: 'accent',
position: 'top' timeout: 2000,
}) message: res.Message,
} position: 'top'
}) })
}
})
}
}, },
//点击新增排班计划 //点击新增排班计划
addScheduPlan() { addScheduPlan() {
......
...@@ -16,6 +16,13 @@ ...@@ -16,6 +16,13 @@
<div class="col-2 q-table__title">访客登记</div> <div class="col-2 q-table__title">访客登记</div>
<q-space /> <q-space />
</template> </template>
<template v-slot:body-cell-VisitorStatus="props">
<q-td :props="props">
<img v-if="props.row.VisitorStatus==1" title="正常" src="../../assets/images/normal.png" />
<img v-if="props.row.VisitorStatus==2" title="贵宾" src="../../assets/images/vip.png" />
<img v-if="props.row.VisitorStatus==3" title="黑名单" src="../../assets/images/blackList.png" />
</q-td>
</template>
<template v-slot:body-cell-Id="props"> <template v-slot:body-cell-Id="props">
<q-td :props="props"> <q-td :props="props">
<q-btn flat size="xs" icon="edit" color="accent" style="font-weight:400" label="详情" /> <q-btn flat size="xs" icon="edit" color="accent" style="font-weight:400" label="详情" />
......
...@@ -61,7 +61,7 @@ ...@@ -61,7 +61,7 @@
<q-btn flat size="xs" icon="edit" style="font-weight:400;" color="edit" class="q-mr-xs" label="修改" <q-btn 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 flat size="xs" icon="delete" style="font-weight:400;" color="negative" class="q-mr-xs" label="删除"
 @click="" />  @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>
...@@ -80,6 +80,7 @@ ...@@ -80,6 +80,7 @@
<script> <script>
import { import {
GetDutyPlanPage, GetDutyPlanPage,
RemoveDutyPlan
} from '../../api/scheduling/schedu' } from '../../api/scheduling/schedu'
import schedulForm from '../../components/schedul/schedul-form' import schedulForm from '../../components/schedul/schedul-form'
...@@ -164,6 +165,38 @@ ...@@ -164,6 +165,38 @@
} }
}) })
}, },
//删除排班计划
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) { changePage(val) {
this.msg.pageIndex = val; this.msg.pageIndex = val;
......
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