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) {
})
}
//获取我的值班看板【第二版】
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) {
return request({
......
<style>
.addDutyUpload .ItemImgDiv{
width:118px;
height:118px;
.addDutyUpload .ItemImgDiv {
width: 118px;
height: 118px;
position: relative;
margin:0 10px 10px 0;
display:inline-block;
margin: 0 10px 10px 0;
display: inline-block;
}
.addDutyUpload .avatar-uploader .el-upload {
border-radius: 6px;
cursor: pointer;
width:100%;
height:100%;
color:#8c939d;
width: 100%;
height: 100%;
color: #8c939d;
position: relative;
overflow: hidden;
}
.addDutyMain{
display:inline-block;
width:118px;
height:118px;
font-size:70px;
.addDutyMain {
display: inline-block;
width: 118px;
height: 118px;
font-size: 70px;
border: 1px dashed #d9d9d9;
line-height:120px;
line-height: 120px;
}
</style>
<template>
<q-dialog v-model="persistent" content-class="bg-grey-1" transition-show="scale" transition-hide="scale">
......@@ -31,17 +34,7 @@
<div class="text-h6">{{(saveObj&&saveObj.Id>0)?"修改值班事项":"新增值班事项"}}</div>
</q-card-section>
<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="col-6">
<q-select stack-label v-model="FrequencyArr" multiple :options="frequencyOptions" color="primary" filled
......@@ -54,31 +47,47 @@
@input="getDutyFrequencyBySchoolIds" emit-value map-options :rules="[val => !!val || '请选择校区']" />
</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="col-12">
<div style="display:flex;flex-wrap: wrap;">
<div v-if="msg.ItemImgList&&msg.ItemImgList.length>0" v-for="(item,index) in msg.ItemImgList">
<div class="ItemImgDiv">
<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>
<el-upload
class="avatar-uploader addDutyMain"
action=""
:before-upload="uploadFile"
:show-file-list="false"
>
<el-upload class="avatar-uploader addDutyMain" action="" :before-upload="uploadFile"
:show-file-list="false">
<i class="el-icon-plus avatar-uploader-icon"></i>
</el-upload>
</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>
</q-card-section>
<q-card-actions align="right" class="bg-white">
......@@ -124,8 +133,36 @@
ItemType: 0,
Shifts: "",
ItemImgList: [],
DutyCategory: '', //值班事项分类(1-工作清单,2-突发事项,3-交接说明)
DutyType: '', //值班类型(1-规则事项,2-值班事项)
},
BasicImg: "",
dutyCategoryList: [{
Id: 1,
Name: "工作清单"
},
{
Id: 2,
Name: "突发事件"
},
{
Id: 3,
Name: "交接说明"
},
],
dutyTypeList: [{
Id: 1,
Name: "规则事项"
},
{
Id: 2,
Name: "值班事项"
},
],
dutyTypeList2:[{
Id: 1,
Name: "规则事项"
}],
persistent: true,
schoolOptions: [],
frequencyOptions: [],
......@@ -165,6 +202,9 @@
this.msg.ItemType = tempData.ItemType;
this.msg.Shifts = tempData.Shifts;
this.msg.ItemImgList = tempData.ItemImgList;
this.msg.DutyCategory = tempData.DutyCategory;
this.msg.DutyType = tempData.DutyType;
if (tempData.ShiftList && tempData.ShiftList.length > 0) {
this.FrequencyArr = tempData.ShiftList.map(i => i * 1);
}
......@@ -194,18 +234,28 @@
this.msg.ItemType = "";
this.msg.Shifts = "";
this.msg.ItemImgList = [];
this.msg.DutyCategory = "";
this.msg.DutyType = "";
this.BgImg = "";
},
//保存信息
saveRule() {
this.$refs.ItemName.validate();
this.$refs.ItemType.validate();
this.$refs.Shifts.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 &&
!this.$refs.ItemType.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.Shifts = this.FrequencyArr.toString();
saveDutyItem(this.msg).then(res => {
......@@ -258,8 +308,8 @@
})
},
//删除图片
deleteItemImg(index){
this.msg.ItemImgList.splice(index,1);
deleteItemImg(index) {
this.msg.ItemImgList.splice(index, 1);
}
},
}
......
......@@ -3,12 +3,17 @@
<div class="page-search row items-center">
<div class="col row wrap q-mr-lg q-col-gutter-md">
<div class="col-3">
<q-input @input="resetSearch" clearable standout="bg-primary text-white" class="col-6 q-pr-lg q-pr-lg"
v-model="qMsg.ItemName" label="事项名称" maxlength="20" @clear="resetSearch" />
<q-select @input="resetSearch" clearable stack-label v-model="qMsg.DutyCategory" :options="dutyCategoryList"
color="primary" filled label="分类" option-label="Name" option-value="Id" ref="DutyCategory" emit-value
map-options @clear="resetSearch" />
</div>
<div class="col-3">
<q-select @input="resetSearch" clearable multiple standout="bg-primary text-white" option-value="SId"
option-label="SName" v-model="qMsg.ItemSchools" :options="schoolOptions" emit-value map-options label="校区"
<q-input @input="resetSearch" clearable standout="bg-primary text-white" v-model="qMsg.ItemName" 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" />
</div>
</div>
......@@ -32,8 +37,16 @@
<q-td key="ItemName" :props="props">
<div style="width:500px;word-break:break-word;white-space:normal;">{{props.row.ItemName}}</div>
</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">
{{props.row.ItemType==1?'选择':'手动填写'}}
<template v-if="props.row.DutyType==2">
{{props.row.ItemType==1?'选择':'手动填写'}}
</template>
</q-td>
<q-td key="ShiftsName" :props="props">
{{props.row.ShiftsName}}
......@@ -81,8 +94,20 @@
align: 'left'
},
{
name: 'ItemType',
name: 'DutyCategoryStr',
label: '分类',
field: 'DutyCategoryStr',
align: 'left',
},
{
name: 'DutyTypeStr',
label: '类型',
field: 'DutyTypeStr',
align: 'left',
},
{
name: 'ItemType',
label: '填写方式',
field: 'ItemType',
align: 'left',
},
......@@ -111,10 +136,24 @@
rowsPerPage: 10,
ItemName: "", //事项名称
ItemSchools: [], //所属校区
DutyCategory: ''
},
pageCount: 0,
isShowAdd: false, //是否显示添加事项弹窗
itemObj: {}, //事项对象
dutyCategoryList: [{
Id: 1,
Name: "工作清单"
},
{
Id: 2,
Name: "突发事件"
},
{
Id: 3,
Name: "交接说明"
},
]
}
},
created() {
......
......@@ -55,7 +55,7 @@
</template>
</q-field>
</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"
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"
......@@ -114,6 +114,7 @@
ClassContent: "", //主讲内容
},
TeacherList: [], //教师
AllTeacherList: [],
ClassRoomList: [], //教室
saveAppointLoading: false,
isShowTeacher: false, //显示选择框
......@@ -152,11 +153,13 @@
getTeacherDropDownList({}).then(res => {
if (res.Code == 1) {
this.TeacherList = res.Data;
this.AllTeacherList = res.Data;
var obj = {
TeacherName: '请选择',
TId: 0
}
this.TeacherList.unshift(obj);
this.AllTeacherList.unshift(obj);
}
});
},
......@@ -232,6 +235,24 @@
this.addMsg.EndTime = obj.EndTime;
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 @@
<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 />
<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"
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"
......@@ -341,11 +341,11 @@
!this.$refs.TeacherTel.hasError
) {
let err_msg = ""
if (this.objOption.TeacherIcon == '') {
err_msg = "请上传教师形象照"
} else if (this.objOption.TeacherHead == '') {
err_msg = "请上传用户头像"
}
// if (this.objOption.TeacherIcon == '') {
// err_msg = "请上传教师形象照"
// } else if (this.objOption.TeacherHead == '') {
// err_msg = "请上传用户头像"
// }
if (err_msg == "") {
this.objOption.TeachTag = JSON.stringify(this.tags)
saveTeacher(this.objOption).then(res => {
......
......@@ -236,7 +236,6 @@
}
.scheList_Bottom {
margin: 15px 20px 0 20px;
font-size: 14px;
color: #000000;
height: 46px;
......
......@@ -205,7 +205,6 @@
}
.scheList_Bottom {
margin: 15px 20px 0 20px;
font-size: 14px;
color: #000000;
height: 46px;
......@@ -279,6 +278,7 @@
<script>
import {
OnDuty,
OnDuty_V2,
saveDutyCheck, //值班打卡
} from '../../api/scheduling/schedu'
......@@ -335,7 +335,7 @@
methods: {
//请求数据
getList() {
OnDuty(this.msg).then(res => {
OnDuty_V2(this.msg).then(res => {
if (res.Code == 1) {
this.dataList = res.Data;
this.msg.PlanDate = res.Data.PlanDate;
......
......@@ -212,7 +212,6 @@
}
.scheList_Bottom {
margin: 15px 20px 0 20px;
font-size: 14px;
color: #000000;
height: 46px;
......@@ -254,6 +253,7 @@
<script>
import {
OnDuty,
OnDuty_V2,
saveDutyCheck, //值班打卡
} 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