Commit 446d1e01 authored by 罗超's avatar 罗超

Merge branch 'master' of http://gitlab.oytour.com/luochao/confucius into master

parents 3efbb8dc 352bc8e3
...@@ -75,6 +75,28 @@ export function queryDutyWork(data) { ...@@ -75,6 +75,28 @@ export function queryDutyWork(data) {
}) })
} }
//获取我的值班看板【第二版】
export function OnDuty_V2(data) {
return request({
url: '/DutyPlan/OnDuty_V2',
method: 'post',
data
})
}
//获取我的值班内容【第二版】
export function queryDutyWork_V2(data) {
return request({
url: '/DutyPlan/GetDutyWork_V2',
method: 'post',
data
})
}
//获取访客列表 //获取访客列表
export function queryVisitorPage(data) { export function queryVisitorPage(data) {
return request({ return request({
......
<style> <style>
.addDutyUpload .ItemImgDiv{ .addDutyUpload .ItemImgDiv {
width:118px; width: 118px;
height:118px; height: 118px;
position: relative; position: relative;
margin:0 10px 10px 0; margin: 0 10px 10px 0;
display:inline-block; display: inline-block;
} }
.addDutyUpload .avatar-uploader .el-upload { .addDutyUpload .avatar-uploader .el-upload {
border-radius: 6px; border-radius: 6px;
cursor: pointer; cursor: pointer;
width:100%; width: 100%;
height:100%; height: 100%;
color:#8c939d; color: #8c939d;
position: relative; position: relative;
overflow: hidden; overflow: hidden;
} }
.addDutyMain{
display:inline-block; .addDutyMain {
width:118px; display: inline-block;
height:118px; width: 118px;
font-size:70px; height: 118px;
font-size: 70px;
border: 1px dashed #d9d9d9; border: 1px dashed #d9d9d9;
line-height:120px; line-height: 120px;
} }
</style> </style>
<template> <template>
<q-dialog v-model="persistent" content-class="bg-grey-1" transition-show="scale" transition-hide="scale"> <q-dialog v-model="persistent" content-class="bg-grey-1" transition-show="scale" transition-hide="scale">
...@@ -31,17 +34,7 @@ ...@@ -31,17 +34,7 @@
<div class="text-h6">{{(saveObj&&saveObj.Id>0)?"修改值班事项":"新增值班事项"}}</div> <div class="text-h6">{{(saveObj&&saveObj.Id>0)?"修改值班事项":"新增值班事项"}}</div>
</q-card-section> </q-card-section>
<q-card-section class="q-pt-none scroll" style="max-height: 70vh"> <q-card-section class="q-pt-none scroll" style="max-height: 70vh">
<div class="row wrap">
<div class="col-6">
<q-input filled stack-label max-length="20" :dense="false" v-model="msg.ItemName" ref="ItemName"
class="col-6 q-pr-lg q-pb-lg" label="事项名称" :rules="[val => !!val || '请填写事项名称']" />
</div>
<div class="col-6">
<q-select stack-label color="primary" filled clearable label="选择事项类型" option-value="Id" option-label="Name"
:options="itemTypeOptions" v-model="msg.ItemType" ref="ItemType" emit-value map-options
:rules="[val => !!val || '请选择事项类型']" />
</div>
</div>
<div class="row wrap"> <div class="row wrap">
<div class="col-6"> <div class="col-6">
<q-select stack-label v-model="FrequencyArr" multiple :options="frequencyOptions" color="primary" filled <q-select stack-label v-model="FrequencyArr" multiple :options="frequencyOptions" color="primary" filled
...@@ -54,31 +47,47 @@ ...@@ -54,31 +47,47 @@
@input="getDutyFrequencyBySchoolIds" emit-value map-options :rules="[val => !!val || '请选择校区']" /> @input="getDutyFrequencyBySchoolIds" emit-value map-options :rules="[val => !!val || '请选择校区']" />
</div> </div>
</div> </div>
<div class="row wrap">
<div class="col-6">
<q-select stack-label v-model="msg.DutyCategory" :options="dutyCategoryList" color="primary" filled
label="分类" option-label="Name" option-value="Id" ref="DutyCategory" emit-value map-options
:rules="[val => !!val || '请选择分类']" class="col-6 q-pr-lg q-pb-lg" />
</div>
<div class="col-6">
<q-select stack-label v-model="msg.DutyType" :options="msg.DutyCategory==1?dutyTypeList:dutyTypeList2" color="primary" filled label="类型"
option-label="Name" option-value="Id" ref="DutyType" emit-value
map-options :rules="[val => !!val || '请选择类型']" />
</div>
</div>
<div class="row wrap" v-if="msg.DutyType==2">
<div class="col-6 q-pr-lg">
<q-select stack-label color="primary" filled clearable label="选择事项类型" option-value="Id" option-label="Name"
:options="itemTypeOptions" v-model="msg.ItemType" ref="ItemType" emit-value map-options
:rules="[val => !!val || '请选择事项类型']" />
</div>
</div>
<div class="row wrap">
<div class="col-12">
<q-input filled type="textarea" :rows="2" stack-label :dense="false" v-model="msg.ItemName" ref="ItemName"
class="col-12 q-pb-lg" label="事项名称" :rules="[val => !!val || '请填写事项名称']" />
</div>
</div>
<div class="row wrap addDutyUpload"> <div class="row wrap addDutyUpload">
<div class="col-12"> <div class="col-12">
<div style="display:flex;flex-wrap: wrap;"> <div style="display:flex;flex-wrap: wrap;">
<div v-if="msg.ItemImgList&&msg.ItemImgList.length>0" v-for="(item,index) in msg.ItemImgList"> <div v-if="msg.ItemImgList&&msg.ItemImgList.length>0" v-for="(item,index) in msg.ItemImgList">
<div class="ItemImgDiv"> <div class="ItemImgDiv">
<q-img :src="item" spinner-color="white" style="height: 100%;height:100%" /> <q-img :src="item" spinner-color="white" style="height: 100%;height:100%" />
<q-btn size="7px" @click="deleteItemImg(index)" style="position:absolute;right:-5px;top:-5px;" round color="red" icon="iconfont icon-guanbi1" /> <q-btn size="7px" @click="deleteItemImg(index)" style="position:absolute;right:-5px;top:-5px;" round
color="red" icon="iconfont icon-guanbi1" />
</div> </div>
</div> </div>
<el-upload <el-upload class="avatar-uploader addDutyMain" action="" :before-upload="uploadFile"
class="avatar-uploader addDutyMain" :show-file-list="false">
action=""
:before-upload="uploadFile"
:show-file-list="false"
>
<i class="el-icon-plus avatar-uploader-icon"></i> <i class="el-icon-plus avatar-uploader-icon"></i>
</el-upload> </el-upload>
</div> </div>
</div> </div>
<!-- <div class="col-6" style="margin-top:10px;">
<q-uploader :style="{ backgroundImage: 'url(' + BasicImg + ')' }"
style="width:auto;height:200px;background-repeat:no-repeat;background-size:cover;" flat hide-upload-btn
max-files="10" label="示例图片" multiple accept=".jpg, image/*" :factory="uploadFile" auto-upload>
</q-uploader>
</div> -->
</div> </div>
</q-card-section> </q-card-section>
<q-card-actions align="right" class="bg-white"> <q-card-actions align="right" class="bg-white">
...@@ -124,8 +133,36 @@ ...@@ -124,8 +133,36 @@
ItemType: 0, ItemType: 0,
Shifts: "", Shifts: "",
ItemImgList: [], ItemImgList: [],
DutyCategory: '', //值班事项分类(1-工作清单,2-突发事项,3-交接说明)
DutyType: '', //值班类型(1-规则事项,2-值班事项)
}, },
BasicImg: "", BasicImg: "",
dutyCategoryList: [{
Id: 1,
Name: "工作清单"
},
{
Id: 2,
Name: "突发事件"
},
{
Id: 3,
Name: "交接说明"
},
],
dutyTypeList: [{
Id: 1,
Name: "规则事项"
},
{
Id: 2,
Name: "值班事项"
},
],
dutyTypeList2:[{
Id: 1,
Name: "规则事项"
}],
persistent: true, persistent: true,
schoolOptions: [], schoolOptions: [],
frequencyOptions: [], frequencyOptions: [],
...@@ -165,6 +202,9 @@ ...@@ -165,6 +202,9 @@
this.msg.ItemType = tempData.ItemType; this.msg.ItemType = tempData.ItemType;
this.msg.Shifts = tempData.Shifts; this.msg.Shifts = tempData.Shifts;
this.msg.ItemImgList = tempData.ItemImgList; this.msg.ItemImgList = tempData.ItemImgList;
this.msg.DutyCategory = tempData.DutyCategory;
this.msg.DutyType = tempData.DutyType;
if (tempData.ShiftList && tempData.ShiftList.length > 0) { if (tempData.ShiftList && tempData.ShiftList.length > 0) {
this.FrequencyArr = tempData.ShiftList.map(i => i * 1); this.FrequencyArr = tempData.ShiftList.map(i => i * 1);
} }
...@@ -194,18 +234,28 @@ ...@@ -194,18 +234,28 @@
this.msg.ItemType = ""; this.msg.ItemType = "";
this.msg.Shifts = ""; this.msg.Shifts = "";
this.msg.ItemImgList = []; this.msg.ItemImgList = [];
this.msg.DutyCategory = "";
this.msg.DutyType = "";
this.BgImg = ""; this.BgImg = "";
}, },
//保存信息 //保存信息
saveRule() { saveRule() {
this.$refs.ItemName.validate(); this.$refs.ItemName.validate();
this.$refs.ItemType.validate();
this.$refs.Shifts.validate(); this.$refs.Shifts.validate();
this.$refs.ItemSchools.validate(); this.$refs.ItemSchools.validate();
this.$refs.DutyCategory.validate();
this.$refs.DutyType.validate();
if(this.msg.DutyType==2){
this.$refs.ItemType.validate();
if(this.$refs.ItemType.hasError){
return
}
}
if (!this.$refs.ItemName.hasError && if (!this.$refs.ItemName.hasError &&
!this.$refs.ItemType.hasError &&
!this.$refs.Shifts.hasError && !this.$refs.Shifts.hasError &&
!this.$refs.ItemSchools.hasError) { !this.$refs.ItemSchools.hasError &&
!this.$refs.DutyCategory.hasError &&
!this.$refs.DutyType.hasError) {
this.msg.ItemSchools = this.schoolArr.toString(); this.msg.ItemSchools = this.schoolArr.toString();
this.msg.Shifts = this.FrequencyArr.toString(); this.msg.Shifts = this.FrequencyArr.toString();
saveDutyItem(this.msg).then(res => { saveDutyItem(this.msg).then(res => {
...@@ -258,8 +308,8 @@ ...@@ -258,8 +308,8 @@
}) })
}, },
//删除图片 //删除图片
deleteItemImg(index){ deleteItemImg(index) {
this.msg.ItemImgList.splice(index,1); this.msg.ItemImgList.splice(index, 1);
} }
}, },
} }
......
...@@ -3,12 +3,17 @@ ...@@ -3,12 +3,17 @@
<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 @input="resetSearch" clearable standout="bg-primary text-white" class="col-6 q-pr-lg q-pr-lg" <q-select @input="resetSearch" clearable stack-label v-model="qMsg.DutyCategory" :options="dutyCategoryList"
v-model="qMsg.ItemName" label="事项名称" maxlength="20" @clear="resetSearch" /> color="primary" filled label="分类" option-label="Name" option-value="Id" ref="DutyCategory" emit-value
map-options @clear="resetSearch" />
</div> </div>
<div class="col-3"> <div class="col-3">
<q-select @input="resetSearch" clearable multiple standout="bg-primary text-white" option-value="SId" <q-input @input="resetSearch" clearable standout="bg-primary text-white" v-model="qMsg.ItemName" label="事项名称"
option-label="SName" v-model="qMsg.ItemSchools" :options="schoolOptions" emit-value map-options label="校区" maxlength="20" @clear="resetSearch" />
</div>
<div class="col-3">
<q-select @input="resetSearch" filled clearable multiple option-value="SId" option-label="SName"
v-model="qMsg.ItemSchools" :options="schoolOptions" emit-value map-options label="校区"
@clear="resetSearch" /> @clear="resetSearch" />
</div> </div>
</div> </div>
...@@ -32,8 +37,16 @@ ...@@ -32,8 +37,16 @@
<q-td key="ItemName" :props="props"> <q-td key="ItemName" :props="props">
<div style="width:500px;word-break:break-word;white-space:normal;">{{props.row.ItemName}}</div> <div style="width:500px;word-break:break-word;white-space:normal;">{{props.row.ItemName}}</div>
</q-td> </q-td>
<q-td key="DutyCategoryStr" :props="props">
<div>{{props.row.DutyCategoryStr}}</div>
</q-td>
<q-td key="DutyTypeStr" :props="props">
<div>{{props.row.DutyTypeStr}}</div>
</q-td>
<q-td key="ItemType" :props="props"> <q-td key="ItemType" :props="props">
{{props.row.ItemType==1?'选择':'手动填写'}} <template v-if="props.row.DutyType==2">
{{props.row.ItemType==1?'选择':'手动填写'}}
</template>
</q-td> </q-td>
<q-td key="ShiftsName" :props="props"> <q-td key="ShiftsName" :props="props">
{{props.row.ShiftsName}} {{props.row.ShiftsName}}
...@@ -81,8 +94,20 @@ ...@@ -81,8 +94,20 @@
align: 'left' align: 'left'
}, },
{ {
name: 'ItemType', name: 'DutyCategoryStr',
label: '分类',
field: 'DutyCategoryStr',
align: 'left',
},
{
name: 'DutyTypeStr',
label: '类型', label: '类型',
field: 'DutyTypeStr',
align: 'left',
},
{
name: 'ItemType',
label: '填写方式',
field: 'ItemType', field: 'ItemType',
align: 'left', align: 'left',
}, },
...@@ -111,10 +136,24 @@ ...@@ -111,10 +136,24 @@
rowsPerPage: 10, rowsPerPage: 10,
ItemName: "", //事项名称 ItemName: "", //事项名称
ItemSchools: [], //所属校区 ItemSchools: [], //所属校区
DutyCategory: ''
}, },
pageCount: 0, pageCount: 0,
isShowAdd: false, //是否显示添加事项弹窗 isShowAdd: false, //是否显示添加事项弹窗
itemObj: {}, //事项对象 itemObj: {}, //事项对象
dutyCategoryList: [{
Id: 1,
Name: "工作清单"
},
{
Id: 2,
Name: "突发事件"
},
{
Id: 3,
Name: "交接说明"
},
]
} }
}, },
created() { created() {
......
...@@ -55,7 +55,7 @@ ...@@ -55,7 +55,7 @@
</template> </template>
</q-field> </q-field>
</div> </div>
<q-select filled stack-label option-value="Name" option-label="Name" v-model="addMsg.ClassContent" <q-select filled stack-label option-value="Name" option-label="Name" @input="getTeacherChoose(addMsg.ClassContent)" v-model="addMsg.ClassContent"
ref="ClassContent" :options="ContentList" :rules="[val => !!val || '请选择主讲内容']" label="主讲内容" :dense="false" ref="ClassContent" :options="ContentList" :rules="[val => !!val || '请选择主讲内容']" label="主讲内容" :dense="false"
class="col-6 q-pb-lg" emit-value map-options /> class="col-6 q-pb-lg" emit-value map-options />
<q-select filled stack-label option-value="TId" option-label="TeacherName" v-model="addMsg.TeacherId" <q-select filled stack-label option-value="TId" option-label="TeacherName" v-model="addMsg.TeacherId"
...@@ -114,6 +114,7 @@ ...@@ -114,6 +114,7 @@
ClassContent: "", //主讲内容 ClassContent: "", //主讲内容
}, },
TeacherList: [], //教师 TeacherList: [], //教师
AllTeacherList: [],
ClassRoomList: [], //教室 ClassRoomList: [], //教室
saveAppointLoading: false, saveAppointLoading: false,
isShowTeacher: false, //显示选择框 isShowTeacher: false, //显示选择框
...@@ -152,11 +153,13 @@ ...@@ -152,11 +153,13 @@
getTeacherDropDownList({}).then(res => { getTeacherDropDownList({}).then(res => {
if (res.Code == 1) { if (res.Code == 1) {
this.TeacherList = res.Data; this.TeacherList = res.Data;
this.AllTeacherList = res.Data;
var obj = { var obj = {
TeacherName: '请选择', TeacherName: '请选择',
TId: 0 TId: 0
} }
this.TeacherList.unshift(obj); this.TeacherList.unshift(obj);
this.AllTeacherList.unshift(obj);
} }
}); });
}, },
...@@ -232,6 +235,24 @@ ...@@ -232,6 +235,24 @@
this.addMsg.EndTime = obj.EndTime; this.addMsg.EndTime = obj.EndTime;
this.addMsg.ClassContent = obj.ClassContent; this.addMsg.ClassContent = obj.ClassContent;
} }
},
//选择主讲内容赋值选择教师
getTeacherChoose(content){
var TList = [];
this.addMsg.TeacherId='';
this.TeacherList = this.AllTeacherList;
this.TeacherList.forEach(x=>{
this.ContentList.forEach(y=>{
if(y.Name==content){
if(x.TId>0){
if(x.ChooseSpecialty.indexOf(y.Id)>-1){
TList.push(x);
}
}
}
})
})
this.TeacherList = TList;
} }
} }
} }
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
<q-select filled stack-label option-value="PostId" option-label="PostName" v-model="objOption.Post_Id" <q-select filled stack-label option-value="PostId" option-label="PostName" v-model="objOption.Post_Id"
ref="Post_Id" :options="PostList" label="岗位" :dense="false" class="col-6 q-pr-lg" emit-value map-options /> ref="Post_Id" :options="PostList" label="岗位" :dense="false" class="col-6 q-pr-lg" emit-value map-options />
<q-input filled stack-label maxlength="5" :dense="false" v-model="objOption.BaseStuNum" ref="BaseStuNum" <q-input filled stack-label maxlength="5" :dense="false" v-model="objOption.BaseStuNum" ref="BaseStuNum"
class="col-6 q-pb-lg q-pr-lg" label="带班基础人数" @keyup.native="checkInteger(objOption,'BaseStuNum')" /> class="col-6 q-pb-lg" label="带班基础人数" @keyup.native="checkInteger(objOption,'BaseStuNum')" />
<q-input filled stack-label maxlength="5" :dense="false" v-model="objOption.BaseHourFee" ref="BaseHourFee" <q-input filled stack-label maxlength="5" :dense="false" v-model="objOption.BaseHourFee" ref="BaseHourFee"
class="col-6 q-pr-lg" label="基础课时费" @keyup.native="checkPrice(objOption,'BaseHourFee')" /> class="col-6 q-pr-lg" label="基础课时费" @keyup.native="checkPrice(objOption,'BaseHourFee')" />
<q-select filled stack-label option-value="Id" option-label="Name" v-model="chooseSpecialty" ref="School_Id" <q-select filled stack-label option-value="Id" option-label="Name" v-model="chooseSpecialty" ref="School_Id"
...@@ -341,11 +341,11 @@ ...@@ -341,11 +341,11 @@
!this.$refs.TeacherTel.hasError !this.$refs.TeacherTel.hasError
) { ) {
let err_msg = "" let err_msg = ""
if (this.objOption.TeacherIcon == '') { // if (this.objOption.TeacherIcon == '') {
err_msg = "请上传教师形象照" // err_msg = "请上传教师形象照"
} else if (this.objOption.TeacherHead == '') { // } else if (this.objOption.TeacherHead == '') {
err_msg = "请上传用户头像" // err_msg = "请上传用户头像"
} // }
if (err_msg == "") { if (err_msg == "") {
this.objOption.TeachTag = JSON.stringify(this.tags) this.objOption.TeachTag = JSON.stringify(this.tags)
saveTeacher(this.objOption).then(res => { saveTeacher(this.objOption).then(res => {
......
...@@ -236,7 +236,6 @@ ...@@ -236,7 +236,6 @@
} }
.scheList_Bottom { .scheList_Bottom {
margin: 15px 20px 0 20px;
font-size: 14px; font-size: 14px;
color: #000000; color: #000000;
height: 46px; height: 46px;
......
...@@ -205,7 +205,6 @@ ...@@ -205,7 +205,6 @@
} }
.scheList_Bottom { .scheList_Bottom {
margin: 15px 20px 0 20px;
font-size: 14px; font-size: 14px;
color: #000000; color: #000000;
height: 46px; height: 46px;
...@@ -279,6 +278,7 @@ ...@@ -279,6 +278,7 @@
<script> <script>
import { import {
OnDuty, OnDuty,
OnDuty_V2,
saveDutyCheck, //值班打卡 saveDutyCheck, //值班打卡
} from '../../api/scheduling/schedu' } from '../../api/scheduling/schedu'
...@@ -335,7 +335,7 @@ ...@@ -335,7 +335,7 @@
methods: { methods: {
//请求数据 //请求数据
getList() { getList() {
OnDuty(this.msg).then(res => { OnDuty_V2(this.msg).then(res => {
if (res.Code == 1) { if (res.Code == 1) {
this.dataList = res.Data; this.dataList = res.Data;
this.msg.PlanDate = res.Data.PlanDate; this.msg.PlanDate = res.Data.PlanDate;
......
...@@ -212,7 +212,6 @@ ...@@ -212,7 +212,6 @@
} }
.scheList_Bottom { .scheList_Bottom {
margin: 15px 20px 0 20px;
font-size: 14px; font-size: 14px;
color: #000000; color: #000000;
height: 46px; height: 46px;
...@@ -254,6 +253,7 @@ ...@@ -254,6 +253,7 @@
<script> <script>
import { import {
OnDuty, OnDuty,
OnDuty_V2,
saveDutyCheck, //值班打卡 saveDutyCheck, //值班打卡
} from '../../api/scheduling/schedu' } from '../../api/scheduling/schedu'
......
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