Commit 272c146c authored by 黄奎's avatar 黄奎
parents 0fcae4ca 46258c99
......@@ -20,6 +20,15 @@ export function GetDutyPlanPage(data) {
})
}
//删除值班计划
export function RemoveDutyPlan(data) {
return request({
url: '/DutyPlan/RemoveDutyPlan',
method: 'post',
data
})
}
//保存排课计划
export function SaveDutyPlan(data) {
return request({
......
......@@ -17,7 +17,7 @@
</q-input>
<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
map-options :rules="[val => !!val || '请选择所属校区']" @input="getDutyFrequencyList()" />
map-options :rules="[val => val!=-1 || '请选择所属校区']" @input="getDutyFrequencyList()" />
</div>
<div class="row wrap" style="margin:20px 0;">
<div class="col-6">
......@@ -83,7 +83,7 @@
objOption: {
Id: 0,
Date: '', //值班时间
School_Id: '', //校区
School_Id: -1, //校区
PlanDetails: [] //班次列表
},
optionTitle: "",
......@@ -119,7 +119,7 @@
} else {
this.objOption.Id = 0;
this.objOption.Date = '';
this.objOption.School_Id = '';
this.objOption.School_Id = -1;
this.objOption.PlanDetails = [];
}
},
......@@ -127,6 +127,11 @@
getSchool() {
getSchoolDropdown({}).then(res => {
this.schoolList = res.Data;
let obj = {
SId: -1,
SName: '请选择'
}
this.schoolList.unshift(obj);
this.$forceUpdate();
})
},
......@@ -136,6 +141,8 @@
},
//保存排班
savePlan() {
this.$refs.School_Id.validate();
if (!this.$refs.School_Id.hasError) {
SaveDutyPlan(this.objOption).then(res => {
if (res.Code == 1) {
this.$q.notify({
......@@ -157,6 +164,7 @@
})
}
})
}
},
//点击新增排班计划
addScheduPlan() {
......
......@@ -16,6 +16,13 @@
<div class="col-2 q-table__title">访客登记</div>
<q-space />
</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">
<q-td :props="props">
<q-btn flat size="xs" icon="edit" color="accent" style="font-weight:400" label="详情" />
......
......@@ -61,7 +61,7 @@
<q-btn flat size="xs" icon="edit" style="font-weight:400;" color="edit" class="q-mr-xs" label="修改"
 @click="EditSchedu(props.row)"   />
<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-td>
</template>
......@@ -80,6 +80,7 @@
<script>
import {
GetDutyPlanPage,
RemoveDutyPlan
} from '../../api/scheduling/schedu'
import schedulForm from '../../components/schedul/schedul-form'
......@@ -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) {
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