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">
<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;
}
}
}
......
......@@ -30,6 +30,8 @@
height: 30px;
line-height: 30px;
padding: 0;
border-bottom: 1px solid #d1d1d1;
border-radius: 0;
}
.sche_Fenye {
......@@ -80,7 +82,7 @@
}
.secondList_Bottom {
margin: 15px 20px 0 20px;
margin: 10px 20px 0 20px;
font-size: 14px;
color: #000000;
min-height: 100px;
......@@ -243,6 +245,29 @@
-webkit-box-shadow: -webkit-gradient(linear, 0 0, 0 100%, color-stop(.5, rgba(255, 255, 255, .2)), color-stop(.5, transparent), to(transparent));
background-color: #0ae;
}
.OtherListContent{
height:135px;
overflow: auto;
}
.OtherListContent::-webkit-scrollbar {
width: 3px;
height: 3px;
background-color: #F5F5F5;
}
/*!*定义滚动条轨道 内阴影+圆角*!*/
.OtherListContent::-webkit-scrollbar-track {
-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
border-radius: 10px;
background-color: #F5F5F5;
}
/*!*定义滑块 内阴影+圆角*!*/
.OtherListContent::-webkit-scrollbar-thumb {
border-radius: 10px;
-webkit-box-shadow: -webkit-gradient(linear, 0 0, 0 100%, color-stop(.5, rgba(255, 255, 255, .2)), color-stop(.5, transparent), to(transparent));
background-color: #0ae;
}
</style>
<template>
......@@ -269,6 +294,12 @@
</span>
</div>
<div style="min-height:135px;">
<div style="margin:10px 20px 0 20px">
<el-tabs v-model="WorkActive">
<el-tab-pane label="规则" name="1"></el-tab-pane>
<el-tab-pane label="工作清单" name="2"></el-tab-pane>
</el-tabs>
<template v-if="WorkActive==2">
<div class="scheList_Bottom">
<div class="sche_List_in" v-if="WorkObj">
<template v-if="WorkObj.ItemType==1">
......@@ -305,7 +336,7 @@
</div>
<div>
<template v-if="WorkObj.ItemType==2">
<div style="margin:10px 20px;">
<div style="margin:10px 0;">
<template v-if="workAuthObj.isShowEditAndDelete">
<span v-if="!isShowSure&&WorkObj.WorkContent" title="点击进行修改" @click="isShowSure=true">{{WorkObj.WorkContent}}</span>
<el-input v-else v-model="WorkObj.WorkContent" @focus="isShowSure=true" placeholder="完成情况怎么样">
......@@ -317,8 +348,23 @@
</div>
</template>
</div>
</template>
<template v-else>
<div class="OtherListContent">
<div v-for="(item,index) in WorkRuleList">
<div style="margin-bottom:10px;">{{index+1}}.{{item.ItemName}}</div>
<div v-if="item.ItemImgList&&item.ItemImgList.length>0" style="width:100%;display:flex;flex-wrap:wrap">
<div v-for="subItem in item.ItemImgList" style="width:40px;height:40px;margin:0 10px 10px 0;">
<el-image :src="subItem" style="width:100%;height:100%;" :preview-src-list="item.ItemImgList">
</el-image>
</div>
</div>
</div>
</div>
</template>
</div>
</div>
<div class="tufa_btm">
<div class="tufa_btm" v-if="WorkActive==2">
<div>
<div class="tufa_xiugai">
<template v-if="WorkObj.ItemType==1 && workAuthObj.isShowEditAndDelete">
......@@ -378,6 +424,11 @@
</el-popover>
</div>
<div class="secondList_Bottom">
<el-tabs v-model="TufaActive">
<el-tab-pane label="规则" name="1"></el-tab-pane>
<el-tab-pane label="突发事件" name="2"></el-tab-pane>
</el-tabs>
<template v-if="TufaActive==2">
<div class="tufa_List">
<template v-if="EmergenciesObj&&EmergenciesObj.FileList&&EmergenciesObj.FileList.length>0">
<div class="tufa_left">
......@@ -389,8 +440,22 @@
{{EmergenciesObj.OtherContent}}
</div>
</div>
</template>
<template v-else>
<div class="OtherListContent">
<div v-for="(item,index) in EmergenciesRuleList">
<div style="margin-bottom:10px;">{{index+1}}.{{item.ItemName}}</div>
<div v-if="item.ItemImgList&&item.ItemImgList.length>0" style="width:100%;display:flex;flex-wrap:wrap">
<div v-for="subItem in item.ItemImgList" style="width:40px;height:40px;margin:0 10px 10px 0;">
<el-image :src="subItem" style="width:100%;height:100%;" :preview-src-list="item.ItemImgList">
</el-image>
</div>
</div>
</div>
</div>
<div class="tufa_btm">
</template>
</div>
<div class="tufa_btm" v-if="TufaActive==2">
<div>
<div class="tufa_xiugai">
<template
......@@ -470,6 +535,11 @@
</el-popover>
</div>
<div class="secondList_Bottom">
<el-tabs v-model="handActive">
<el-tab-pane label="规则" name="1"></el-tab-pane>
<el-tab-pane label="交接说明" name="2"></el-tab-pane>
</el-tabs>
<template v-if="handActive==2">
<div class="tufa_List">
<div class="tufa_left" v-if="HandoverObj&&HandoverObj.FileList&&HandoverObj.FileList.length>0">
<el-image :src="HandoverObj.FileList[0]" :preview-src-list="HandoverObj.FileList">
......@@ -479,8 +549,22 @@
{{HandoverObj.OtherContent}}
</div>
</div>
</template>
<template v-else>
<div class="OtherListContent">
<div v-for="(item,index) in HandoverRuleList">
<div style="margin-bottom:10px;">{{index+1}}.{{item.ItemName}}</div>
<div v-if="item.ItemImgList&&item.ItemImgList.length>0" style="width:100%;display:flex;flex-wrap:wrap">
<div v-for="subItem in item.ItemImgList" style="width:40px;height:40px;margin:0 10px 10px 0;">
<el-image :src="subItem" style="width:100%;height:100%;" :preview-src-list="item.ItemImgList">
</el-image>
</div>
</div>
<div class="tufa_btm">
</div>
</div>
</template>
</div>
<div class="tufa_btm" v-if="handActive==2">
<div>
<div class="tufa_xiugai">
<template
......@@ -532,7 +616,8 @@
import {
SetDutyContent,
RemoveDutyContent,
queryDutyWork
queryDutyWork,
queryDutyWork_V2
} from '../../api/scheduling/schedu'
import {
UploadSelfFile
......@@ -593,6 +678,12 @@
Shift: 0,
DutyMan: 0
},
WorkActive:'1',
TufaActive:'1',
handActive:'1',
WorkRuleList:[],
EmergenciesRuleList:[],
HandoverRuleList:[]
}
},
watch: {
......@@ -623,8 +714,9 @@
}
},
getWorkList() {
queryDutyWork(this.qMsg).then(res => {
queryDutyWork_V2(this.qMsg).then(res => {
if (res.Code == 1) {
console.log(res,'数据');
this.HandoverList = res.Data.HandoverList;
this.EmergenciesList = res.Data.EmergenciesList;
this.WorkList = res.Data.WorkList;
......@@ -637,9 +729,13 @@
if (this.WorkList && this.WorkList.length > 0) {
this.WorkObj = this.WorkList[this.WorkIndex];
}
this.WorkRuleList = res.Data.WorkRuleList;
this.EmergenciesRuleList = res.Data.EmergenciesRuleList;
this.HandoverRuleList = res.Data.HandoverRuleList;
}
});
},
//初始化权限信息
initAuth() {
if (this.authObj) {
......
......@@ -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