This commit is contained in:
@fawn-nine
2024-08-12 16:07:24 +08:00
parent 7c7c96f630
commit 28067d851d
13 changed files with 478 additions and 324 deletions

View File

@@ -12,8 +12,8 @@
"src" : "图片路径"
}
],
"versionName" : "1.0.14",
"versionCode" : 1014,
"versionName" : "1.0.15",
"versionCode" : 1015,
"app-plus" : {
"nvueCompiler" : "weex",
"compatible" : {

View File

@@ -487,14 +487,14 @@
// this.pageTitle = e.title
console.log(e, "传入分类id");
this.getUserInfo();
this.courseId = e.id;
this.getLinkClassList()
this.courseId = e.id;
// await this.getData(e.id);
this.getSayList();
this.getOS()
},
onPageScroll(e) {
this.scrollTop = e.scrollTop;
if (this.scrollTop > 500) {
@@ -515,7 +515,8 @@
// #ifdef APP-PLUS
plus.screen.unlockOrientation();
plus.screen.lockOrientation("portrait-primary");
// #endif
// #endif
this.getLinkClassList()
},
onUnload() {
this.selectGoodsData = {};

View File

@@ -52,6 +52,14 @@
</view>
<!-- <input type="password" maxlength="8" v-model="confirmPassword" placeholder="请确认密码" /> -->
</view>
<view class="input_box">
<text class="input_tit">群二维码:</text>
<view class="in" style="border: none;" @click="checkPermision">
<u-upload :fileList="fileList2" @afterRead="addPic2" @delete="deletePic2" :maxCount="1" width="100"
height="100" :previewFullImage="true">
</u-upload>
</view>
</view>
<view class="input_box">
<uni-forms-item label="" name="number" label-width="0">
<text class="input_tit"><i>*</i>目标人数:</text>
@@ -90,6 +98,7 @@
data() {
return {
fileList1: [],
fileList2:[],
playData: {},
modeType:undefined, // 模型type
//手机号账号
@@ -100,6 +109,7 @@
content: '', // 描述
icon: '', //封面
number: '', // 联系电话
qrcode:'' // 群二维码
},
telError: false,
range:[
@@ -150,6 +160,10 @@
//页面显示
onShow() {
},
beforeDestroy() {
this.fileList1 = []
this.fileList2 = []
},
onPullDownRefresh(){
uni.stopPullDownRefresh()
@@ -191,6 +205,9 @@
if(this.form.icon != ''){
this.fileList1.push({url:this.form.icon})
}
if(this.form.qrcode != ''){
this.fileList2.push({url:this.form.qrcode})
}
this.form.modelId = res.result.classModel.id
}
console.log('this.form',res.result);
@@ -251,21 +268,7 @@
},
addPic(e) {
console.log("添加图片");
let that = this;
// for (var i = 0; i < e.file.length; i++) {
// console.log(i,e.file[i].url)
// uni.uploadFile({
// url: this.$baseUrl + "oss/fileoss", //仅为示例,非真实的接口地址
// filePath: tempFilePaths[0],
// name: 'file',
// formData: {
// 'user': 'test'
// },
// success: (uploadFileRes) => {
// console.log(uploadFileRes.data);
// }
// });
// return
let that = this;
uni.uploadFile({
url: this.$baseUrl + "oss/fileoss",
filePath: e.file.url,
@@ -289,6 +292,32 @@
deletePic(event) {
this.fileList1.splice(event.index, 1)
},
addPic2(e) {
console.log("添加图片");
let that = this;
uni.uploadFile({
url: this.$baseUrl + "oss/fileoss",
filePath: e.file.url,
//files:e.file,
name: "file",
formData: {},
success: (res) => {
// console.log("that.uploadPicLIst", res);
that.fileList2.push({
url: JSON.parse(res.data).url,
});
// console.log(that.fileList1, "that.uploadPicLIst");
},
fail: (error) => {
console.log("上传失败", error);
},
});
// }
},
deletePic2(event) {
this.fileList2.splice(event.index, 1)
},
onSubmit() {
this.$refs.form.validate().then(res => {
if (this.fileList1.length > 0) {
@@ -297,6 +326,12 @@
// console.log('this.fileList1',_list);
this.form.icon = _list.join(',')
}
if (this.fileList2.length > 0) {
let _list = this.fileList2
_list = _list.map(item => item.url)
// console.log('this.fileList1',_list);
this.form.qrcode = _list.join(',')
}
if(this.form.number <= 0){
uni.showToast({
title: '目标人数必须大于0个人',
@@ -317,7 +352,8 @@
"icon": this.form.icon,
"state": this.form.id ? this.form.state : undefined,
"content": this.form.content,
"number": Number(this.form.number)
"number": Number(this.form.number),
"qrcode": this.form.qrcode
},
header: { //默认 无 说明:请求头
'Content-Type': 'application/json'
@@ -329,6 +365,7 @@
icon:'success'});
setTimeout(()=> {
this.fileList1 = []
this.fileList2 = []
uni.navigateTo({
url:'/pages/miniClass/miniClassMan'
})
@@ -336,7 +373,7 @@
// uni.navigateBack({
// delta: 1
// });
},300)
},1000)
}).catch(e => {
// console.log('表单错误信息:', err);
uni.showToast({

View File

@@ -14,7 +14,7 @@
class="addType"
v-model="form.type"
:localdata="range"
@change="chageType"
placement="top"
></uni-data-select>
@@ -171,6 +171,14 @@
},
//方法
methods: {
chageType(e){
// console.log('e',e);
if(e == 0){
this.pageType = '作业'
}else if(e == 1){
this.pageType = '医案'
}
},
// 获取医案任务详情
getTaskInfo(){
$http.request({

View File

@@ -13,7 +13,10 @@
<view class="className">
<h3>{{thisClass.title}}</h3>
<text class="tuichu" v-if="isHave && thisClass.state == 0" @click="outClass()">退出班级</text>
</view>
</view>
<view class="gotoExams" v-if="thisClass.state == '2'">
<text>去考试</text>
</view>
<view class="otherItems flex_box">
<view><text class="ciyao">创建日期</text><text
class="mainTxt">{{thisClass.createTime.substring(0,10)}}</text>
@@ -48,7 +51,10 @@
</view>
<view class="jianjie" v-html="item.content"></view>
</view>
</view>
</view>
<view class="" v-if="classModel.days > 0" style="text-align: center; color: #999; font-size: 28rpx;">
教学时长{{classModel.days}}
</view>
</view>
<view class="" v-show="courses.length == 0">
<u-divider text="暂无课程"></u-divider>
@@ -56,8 +62,12 @@
<!-- <view class="" v-if="thisClass.content != ''">
<text class="adminName">教学目标/班级简介</text>
</view> -->
<uni-section class="mb-10 nobg" title="教学目标/班内简介" type="line"></uni-section>
<uni-section class="mb-10 nobg" title="教学目标/班内简介" type="line"></uni-section>
<rich-text class="banjiJianjie" :nodes="formatRichText(thisClass.content)"></rich-text>
<view class="qrcode" v-if="thisClass.qrcode != ''">
<uni-section class="mb-10 nobg" title="群二维码" type="line"></uni-section>
<image :src="thisClass.qrcode" mode="widthFix"></image>
</view>
</view>
<!-- 班内问答 -->
<view class="" v-if=" tabId == '1'">
@@ -732,7 +742,7 @@
_txt = '即将踢出该学员,是否继续?'
} else {
_useId = this.userInfo.id
_txt = '您即将退出当前班级,是否继续?'
_txt = '您即将退出当前班级,退出班级后,在本班级提交的作业、医案、心得都将被删除,是否继续?'
}
uni.showModal({
@@ -1021,15 +1031,24 @@
border-radius: 40rpx;
}
}
.qrcode{width:100%;
image{
width: 200rpx;height: 200rpx;
}
}
.mainContent {
color: #333;
color: #333;
padding: 0 20rpx;
padding-bottom:120rpx;
background-image: linear-gradient(30deg, #d4eaf0 0%, #d4eaf0 50%, #fdf0ed 100%);
min-height: 100vh;
}
.gotoExams{ margin: 20rpx 0; margin-top: -10rpx;
text{ display: block; text-align: center; width: 100%; border-radius: 10rpx; box-sizing: border-box; padding: 20rpx; color:#fff ;
background-image: linear-gradient(-90deg, #576afc 0%, #97a1ff 100%);
}
}
.classMateBox {
.newBox{justify-content: space-between; flex-wrap: wrap;}
.zmVip {

View File

@@ -22,39 +22,33 @@
<view class="pingfenBox" >
<!-- 功能按钮 -->
<view class="optionsBtn">
<view class="optionsBtn" v-if="roleCode.includes('66') || roleCode.includes('1') || roleCode.includes('2')">
<view class="flex_box">
<view class="item setBanewei" v-if="thisClass.state != '2'" v-show="roleCode.includes('66') || roleCode.includes('1') || roleCode.includes('2')"
<view class="item setBanewei" v-if="thisClass.state != '2'"
@click="goSetAdmin('/pages/miniClass/memberSet')">
<text>设置班委</text>
</view>
<!-- 主任班长副班长修改班级 没开班的时候可以 -->
<view class="item editClass" v-show="isDirector && thisClass.state == '0' ||
roleCode.includes('2') && thisClass.state == '0' ||
roleCode.includes('1') && thisClass.state == '0'
" @click="onPageJump('/pages/miniClass/addClass',thisClass.id, classModel.type)">
<view class="item editClass" v-show="thisClass.state == '0' "
@click="onPageJump('/pages/miniClass/addClass',thisClass.id, classModel.type)">
<text>修改班级</text>
</view>
<!-- 主任班长副班长可以开班或者结班 -->
<view class="item openClass" @click="changeClassStatu('1')" v-if="thisClass.state == '0' && isMonitor ||
thisClass.state == '0' && roleCode.includes('1') ||
thisClass.state == '0' && roleCode.includes('2')">
<view class="item openClass" @click="changeClassStatu('1')" v-if="thisClass.state == '0'">
<text>开班</text>
</view>
<view class="item overClass" @click="changeClassStatu('2')" v-if="thisClass.state == '1' && isMonitor ||
thisClass.state == '1' && roleCode.includes('1') ||
thisClass.state == '1' && roleCode.includes('2')">
<view class="item overClass" @click="changeClassStatu('2')" v-if="thisClass.state == '1' ">
<text>结班</text>
</view>
<view class="item delClass" v-if="isDirector" @click="delClass()">
<view class="item delClass" v-if="thisClass.state == '0'" @click="delClass()">
<text>删除班级</text>
</view>
</view>
</view>
</view>
<!-- 作业批改 -->
<view class="flex_box">
<view class="item" @click="goAddHomeWork">
<view class="item" @click="goAddHomeWork" v-if="thisClass.state == '1' && roleCode.includes('2') || thisClass.state == '1' && roleCode.includes('1')">
<view class="img">
<image src="../../static/icon/fabu.png" mode="widthFix"></image>
</view>
@@ -77,7 +71,13 @@
<image src="../../static/icon/pigai3.png" mode="widthFix"></image>
</view>
<text>心得</text>
</view>
</view>
<view class="item" @click="goXindeList('/pages/miniClass/xindeList')">
<view class="img">
<image src="../../static/icon/sikaoti.png" mode="widthFix"></image>
</view>
<text>思考题</text>
</view>
</view>
</view>
<view class="otherItems flex_box">
@@ -118,51 +118,19 @@
</view>
</view>
<view class="" v-if="classModel.days > 0" style="text-align: center; color: #999; font-size: 28rpx;">
教学时长{{classModel.days}}
</view>
</view>
<view class="" v-show="courses.length == 0">
<u-divider text="暂无课程"></u-divider>
</view>
<uni-section class="mb-10 nobg" title="教学目标/班级简介" type="line"></uni-section>
<rich-text class="banjiJianjie" :nodes="formatRichText(thisClass.content)"></rich-text>
<!-- 班内问答 -->
<!-- <view class="" v-if=" tabId == '1'">
班内问答
</view> -->
<!-- 班内提交 -->
<view class="" v-if=" tabId == '3' && false">
<view class="flex_box tijiaoTitle">
<text :class="tijiaoTitleId == item.id ? 'active' :''" @click="titleClick(item,index)"
v-for="(item, index) in tijiaoTitleList" :key="index">{{item.name}}</text>
</view>
<!-- 班内任务 --><!-- 医案 --> <!-- 心得 -->
<view class="">
<view v-if="taskList.length > 0">
<view class="submitRecode">
<view class="newBox">
<view class="item " v-for="(item, index) in taskList" @click="clickTask(item)">
<view class="leve1 flex_box">
<text>{{item.title}}</text><text v-if="isDirector || isMonitor"
class="taskEdit" @click="taskEdit(item)">修改</text>
</view>
<view class="leve2">
{{item.content}}
</view>
</view>
</view>
</view>
<view class="showMore" v-show="true">
<!-- <view class="showMore" v-show="taskHaveMore"> -->
<text @click="showmoreTask">查看全部 >></text>
</view>
</view>
<view class="" v-else>
<u-divider text="暂无数据"></u-divider>
</view>
<!-- <uni-section class="mb-10 nobg" title="提交的任务" type="line"></uni-section> -->
</view>
</view>
<view class="qrcode" v-if="thisClass.qrcode != ''">
<uni-section class="mb-10 nobg" title="群二维码" type="line"></uni-section>
<image :src="thisClass.qrcode" mode="widthFix"></image>
</view>
</view>
</view>
@@ -961,6 +929,12 @@
}
}
.qrcode{width:100%;
image{
width: 200rpx;height: 200rpx;
}
}
.manBtnBox {
justify-content: center;

View File

@@ -4,17 +4,8 @@
<public-module></public-module>
<z-nav-bar title="班级列表">
</z-nav-bar>
<view style="padding: 20rpx; background-color: #fff; border-bottom: 1px solid #eee;">当前课程{{courseTitle}}</view>
<!-- <view class="tabsBox" :class="[fixed ? 'fixed' : '' ]">
<u-tabs v-if="tabList.length > 0" :class="['tabList']" @click="fatherClick" :current="curTagId"
:activeStyle="activeStyle" :scrollable="scrollable" :list="tabList"
itemStyle="padding-left: 15px; background-color:#fff; padding-right: 15px; height: 50px;"></u-tabs>
</view> -->
<view class="containerBg">
<!-- <view class="subCate flex" v-if="subList.length> 0">
<text :class="['item',subTabId == item.id ? 'active' : '']" v-for="(item, index) in subList"
@click="curseClick(item)" :key="index">{{item.title}}</text>
</view> -->
<view style="padding: 20rpx; background-color: #fff; border-bottom: 1px solid #eee;">当前课程{{courseTitle}}</view>
<view class="containerBg">
<view class="learnBox box">
<view class="newBox">
<view class="item flexbox" v-for="(item, index) in courseList" :key="index" >
@@ -46,9 +37,7 @@
</view>
</view>
</view>
<!-- <u-divider v-show="status == 2" text="已加载全部"></u-divider>
<u-divider v-show="status == 3" text="暂无数据"></u-divider>
<u-divider v-show="status == 1" text="加载中..."></u-divider> -->
</view>
<view>
<!-- <u-back-top scroll-top="100"></u-back-top> -->
@@ -160,6 +149,7 @@
onShow() {
// 隐藏原生的tabbar
// uni.hideTabBar();
this.getData()
},
components: {
musicPlay

View File

@@ -7,110 +7,200 @@
<public-module></public-module>
<uni-forms :modelValue="form" :rules="rules" ref="form" v-if="roleCode.length > 0">
<view class="input_box " style="">
<uni-forms-item label="" name="monitor" label-width="0"
v-show="roleCode.includes('66')">
<uni-forms-item label="" name="monitor" label-width="0" v-show="roleCode.includes('66')">
<view class="">
<text class="input_tit"><i>*</i>班长</text>
</view>
</view>
<view class="addBtnBox">
<view class="item" v-if="memeberRefsh">
<view class="box" @click="showMemberAdd('monitor')">
<span v-show="!form.monitor"><uni-icons class="addIcon" color="#999" type="plusempty"
size="20"></uni-icons></span>
<text style="width: 100%; display: inline-block;"
v-if="form.monitor">
<!-- {{item && item.nickname != '' && item.nickname != null ? item.nickname : '匿名用户'}} -->
{{form.monitor.tel}}</text>
<text class="delBtn" v-if="form.monitor" @click.stop="delMemeber('monitor')">删除</text>
<text class="addText" v-else >添加人员</text>
<view class="box" @click="showMemberAdd('monitor')">
<view v-show="!form.monitor" class="haveNoPerson flex_box">
<uni-icons class="addIcon" color="#999" type="plusempty" size="20"></uni-icons>
<text class="addText">添加人员</text>
</view>
<view class="havePerson" v-if="form.monitor">
<view class="flex_box ">
<view class="classmateImg">
<image v-if="form.monitor.avatar != null && form.monitor.avatar != ''" :src="form.monitor.avatar"
mode="aspectFit"></image>
<image v-else src="/static/icon/morenAvavter.png" mode="aspectFit"></image>
</view>
<view class="textBox">
<view class="">
<text style="width: 100%; display: inline-block;">
{{form.monitor && form.monitor.nickname != '' && form.monitor.nickname != null ? form.monitor.nickname : '匿名用户'}}
</text>
<text style="width: 100%; display: inline-block;"> - {{form.monitor.tel}}</text>
</view>
</view>
</view>
<view class="" @click.stop="delMemeber('monitor')">
<text class="delBtn"
>删除</text>
</view>
</view>
</view>
</view>
</view>
</view>
</uni-forms-item>
<uni-forms-item label="" name="dmonitor" label-width="0" v-show="roleCode.includes('1') || roleCode.includes('66')">
<uni-forms-item label="" name="dmonitor" label-width="0"
v-show="roleCode.includes('1') || roleCode.includes('66')">
<view class="">
<text class="input_tit">
<!-- <i>*</i> -->
副班长</text>
</view>
</view>
<view class="addBtnBox">
<view class="item" v-if="memeberRefsh">
<view class="box" @click="showMemberAdd('dmonitor')">
<span v-show="!form.dmonitor"><uni-icons class="addIcon" color="#999" type="plusempty"
size="20"></uni-icons></span>
<text style="width: 100%; display: inline-block;"
v-if="form.dmonitor">
<!-- {{item && item.nickname != '' && item.nickname != null ? item.nickname : '匿名用户'}} -->
{{form.dmonitor.tel}}</text>
<text class="delBtn" v-if="form.dmonitor" @click.stop="delMemeber('dmonitor')">删除</text>
<text class="addText" v-else >添加人员</text>
<view class="box" @click="showMemberAdd('dmonitor')">
<view v-show="!form.dmonitor" class="haveNoPerson flex_box">
<uni-icons class="addIcon" color="#999" type="plusempty" size="20"></uni-icons>
<text class="addText">添加人员</text>
</view>
<view class="havePerson" v-if="form.dmonitor">
<view class="flex_box ">
<view class="classmateImg">
<image v-if="form.dmonitor.avatar != null && form.dmonitor.avatar != ''" :src="form.dmonitor.avatar"
mode="aspectFit"></image>
<image v-else src="/static/icon/morenAvavter.png" mode="aspectFit"></image>
</view>
<view class="textBox">
<view class="">
<text style="width: 100%; display: inline-block;">
{{form.dmonitor && form.dmonitor.nickname != '' && form.dmonitor.nickname != null ? form.dmonitor.nickname : '匿名用户'}}
</text>
<text style="width: 100%; display: inline-block;"> - {{form.dmonitor.tel}}</text>
</view>
</view>
</view>
<view class="" @click.stop="delMemeber('dmonitor')">
<text class="delBtn"
>删除</text>
</view>
</view>
</view>
</view>
</view>
</view>
</uni-forms-item>
<uni-forms-item label="" name="learner" label-width="0" >
<uni-forms-item label="" name="learner" label-width="0">
<view class="">
<text class="input_tit">
<!-- <i>*</i> -->
学习委员</text>
</view>
</view>
<view class="addBtnBox">
<view class="item" v-if="memeberRefsh">
<view class="box" @click="showMemberAdd('learner')">
<span v-show="!form.learner"><uni-icons class="addIcon" color="#999" type="plusempty"
size="20"></uni-icons></span>
<text style="width: 100%; display: inline-block;"
v-if="form.learner">
<!-- {{item && item.nickname != '' && item.nickname != null ? item.nickname : '匿名用户'}} -->
{{form.learner.tel}}</text>
<text class="delBtn" v-if="form.learner" @click.stop="delMemeber('learner')">删除</text>
<text class="addText" v-else >添加人员</text>
<view class="box" @click="showMemberAdd('learner')">
<view v-show="!form.learner" class="haveNoPerson flex_box">
<uni-icons class="addIcon" color="#999" type="plusempty" size="20"></uni-icons>
<text class="addText">添加人员</text>
</view>
<view class="havePerson" v-if="form.learner">
<view class="flex_box ">
<view class="classmateImg">
<image v-if="form.learner.avatar != null && form.learner.avatar != ''" :src="form.learner.avatar"
mode="aspectFit"></image>
<image v-else src="/static/icon/morenAvavter.png" mode="aspectFit"></image>
</view>
<view class="textBox">
<view class="">
<text style="width: 100%; display: inline-block;">
{{form.learner && form.learner.nickname != '' && form.learner.nickname != null ? form.learner.nickname : '匿名用户'}}
</text>
<text style="width: 100%; display: inline-block;"> - {{form.learner.tel}}</text>
</view>
</view>
</view>
<view class="" @click.stop="delMemeber('learner')">
<text class="delBtn"
>删除</text>
</view>
</view>
</view>
</view>
</view>
</view>
</uni-forms-item>
<uni-forms-item label="" name="scorer" label-width="0" >
<uni-forms-item label="" name="scorer" label-width="0">
<view class="">
<text class="input_tit">
<!-- <i>*</i> -->
评分员</text>
</view>
评分员</text>
</view>
<view class="addBtnBox">
<!-- {{setDefaultAddItem}} -->
<view class="item" v-if="memeberRefsh">
<view class="box" v-for="(item, index) in form.scorer" @click="showMemberAdd('scorer',index)">
<span v-show="!item || item == null || item == 'null'"><uni-icons class="addIcon" color="#999" type="plusempty"
size="20"></uni-icons></span>
<text style="width: 100%; display: inline-block;"
v-if="item">
<!-- {{item && item.nickname != '' && item.nickname != null ? item.nickname : '匿名用户'}} -->
{{item.tel}}</text>
<text class="delBtn" v-if="item" @click.stop="delMemeber('scorer',index)">删除</text>
<text class="addText" v-else >添加人员</text>
<view class="box" v-for="(item, index) in form.scorer"
@click="showMemberAdd('scorer',index)">
<view v-show="!item || item == null || item == 'null'" class="haveNoPerson flex_box">
<uni-icons class="addIcon" color="#999" type="plusempty" size="20"></uni-icons>
<text class="addText">添加人员</text>
</view>
<view class="havePerson" v-if="item">
<view class="flex_box ">
<view class="classmateImg">
<image v-if="item.avatar != null && item.avatar != ''" :src="item.avatar"
mode="aspectFit"></image>
<image v-else src="/static/icon/morenAvavter.png" mode="aspectFit"></image>
</view>
<view class="textBox">
<view class="">
<text style="width: 100%; display: inline-block;">
{{item && item.nickname != '' && item.nickname != null ? item.nickname : '匿名用户'}}
</text>
<text style="width: 100%; display: inline-block;"> - {{item.tel}}</text>
</view>
</view>
</view>
<view class="" @click.stop="delMemeber('scorer',index)">
<text class="delBtn"
>删除</text>
</view>
</view>
</view>
</view>
</view>
</view>
</uni-forms-item>
<uni-forms-item label="" name="counter" label-width="0" >
<uni-forms-item label="" name="counter" label-width="0">
<view class="">
<text class="input_tit">
<!-- <i>*</i> -->
记分员</text>
</view>
记分员</text>
</view>
<view class="addBtnBox">
<view class="item" v-if="memeberRefsh">
<view class="box" v-for="(item, index) in form.counter" @click="showMemberAdd('counter',index)">
<span v-show="!item"><uni-icons class="addIcon" color="#999" type="plusempty"
size="20"></uni-icons></span>
<text style="width: 100%; display: inline-block;"
v-if="item">
<!-- {{item && item.nickname != '' && item.nickname != null ? item.nickname : '匿名用户'}} -->
{{item.tel}}</text>
<text class="delBtn" v-if="item" @click.stop="delMemeber('counter',index)">删除</text>
<text class="addText" v-else >添加人员</text>
<view class="box" v-for="(item, index) in form.counter"
@click="showMemberAdd('counter',index)">
<view v-show="!item" class="haveNoPerson flex_box">
<uni-icons class="addIcon" color="#999" type="plusempty" size="20"></uni-icons>
<text class="addText">添加人员</text>
</view>
<view class="havePerson" v-if="item">
<view class="flex_box ">
<view class="classmateImg">
<image v-if="item.avatar != null && item.avatar != ''" :src="item.avatar"
mode="aspectFit"></image>
<image v-else src="/static/icon/morenAvavter.png" mode="aspectFit"></image>
</view>
<view class="textBox">
<view class="">
<text style="width: 100%; display: inline-block;">
{{item && item.nickname != '' && item.nickname != null ? item.nickname : '匿名用户'}}
</text>
<text style="width: 100%; display: inline-block;"> - {{item.tel}}</text>
</view>
</view>
</view>
<view class="" @click.stop="delMemeber('counter',index)">
<text class="delBtn"
>删除</text>
</view>
</view>
<!-- <text class="delBtn" v-if="item" @click.stop="delMemeber('counter',index)">删除</text>
<text class="addText" v-else>添加人员</text> -->
</view>
</view>
</view>
</view>
</uni-forms-item>
</view>
</uni-forms>
@@ -148,7 +238,7 @@
export default {
data() {
return {
memeberRefsh:true,
memeberRefsh: true,
fileList1: [],
searchValue: '',
searchList: [],
@@ -166,8 +256,8 @@
"monitor": undefined, //班长
"dmonitor": undefined, //2班长
"learner": undefined, //学习委员
"scorer": [undefined,undefined], //评分员
"counter": [undefined,undefined] //记分员
"scorer": [undefined, undefined], //评分员
"counter": [undefined, undefined] //记分员
},
telError: false,
// relationError: false,
@@ -180,8 +270,8 @@
}
]
}
// ,
}
// ,
// dmonitor: {
// rules: [{
// required: true,
@@ -195,7 +285,7 @@
modelLIst: [
// { value: 0, text: "请选择" },
],
roleCode:''
roleCode: ''
};
},
//第一次加载
@@ -205,7 +295,7 @@
this.roleCode = e.roleCode
if (e.id) {
this.form.classId = e.id
this.getClassInfo()
this.getClassInfo()
} else {
this.form.id = undefined
}
@@ -215,7 +305,7 @@
},
computed: {
...mapState(['userInfo'])
...mapState(['userInfo'])
},
//方法
methods: {
@@ -259,7 +349,7 @@
if (res.code == 0) {
if (res.result.admins.length > 0) {
var scorerIndex = 0
var counterIndex = 0
var counterIndex = 0
res.result.admins.forEach(item => {
if (item.role == '1') {
this.form.monitor = item.user
@@ -270,18 +360,18 @@
if (item.role == '3') {
this.form.learner = item.user
}
if (item.role == '4') {
if (item.role == '4') {
this.form.scorer[scorerIndex] = item.user
scorerIndex += 1
}
if (item.role == '5') {
if (item.role == '5') {
this.form.counter[counterIndex] = item.user
counterIndex += 1
}
})
}
console.log('this.form.scorer',this.form.scorer.length);
console.log('this.form.scorer', this.form.scorer.length);
}
console.log('this.form', this.form);
uni.hideLoading()
@@ -352,12 +442,12 @@
this.getSearch()
}
},
delMemeber(dataName,index){
console.log(dataName,index);
delMemeber(dataName, index) {
console.log(dataName, index);
this.memeberRefsh = false
switch (dataName) {
case 'counter':
this.form.counter[index] = undefined
this.form.counter[index] = undefined
break;
case 'scorer':
this.form.scorer[index] = undefined
@@ -373,7 +463,7 @@
break;
}
this.memeberRefsh = true
},
setMember(item) {
console.log('选中了值', item);
@@ -419,8 +509,8 @@
// icon: 'none'
// })
},
relationInput(e) {
// this.relationError = false
// this.relationErrorPattern = false
@@ -437,18 +527,18 @@
},
addPic(e) {
console.log("添加图片");
let that = this;
let that = this;
uni.uploadFile({
url: this.$baseUrl + "oss/fileoss",
filePath: e.file.url,
//files:e.file,
name: "file",
formData: {},
success: (res) => {
success: (res) => {
that.fileList1.push({
url: JSON.parse(res.data).url,
});
},
fail: (error) => {
console.log("上传失败", error);
@@ -460,8 +550,8 @@
this.fileList1.splice(event.index, 1)
},
onSubmit() {
console.log('form',this.form);
if(!this.form.monitor){
console.log('form', this.form);
if (!this.form.monitor) {
uni.showToast({
title: '请添加班长人选',
icon: 'none'
@@ -476,92 +566,94 @@
// return
// }
// this.$refs.form.validate().then(res => {
var newScorer = [...this.form.scorer]
var newCounter = [...this.form.counter]
if(!this.form.scorer[0] && !this.form.scorer[1]){
newScorer = [0,0]
}else{
console.log('newScorer',newScorer);
this.form.scorer.forEach((item, index) => {
console.log('item',item);
if(!item || item == null){
console.log('进来了');
newScorer[index] = {
id:0
}
var newScorer = [...this.form.scorer]
var newCounter = [...this.form.counter]
if (!this.form.scorer[0] && !this.form.scorer[1]) {
newScorer = [0, 0]
} else {
console.log('newScorer', newScorer);
this.form.scorer.forEach((item, index) => {
console.log('item', item);
if (!item || item == null) {
console.log('进来了');
newScorer[index] = {
id: 0
}
})
// console.log('删除后的newScorer',newScorer);
if(newScorer[0].id == newScorer[1].id){
uni.showToast({
title:'两名评分员不能是同一人',
icon:'none'
})
return
}
newScorer = newScorer.map(item => {
return item.id
})
// console.log('删除后的newScorer',newScorer);
}
if(!this.form.counter[0] && !this.form.counter[1]){
newCounter = [0,0]
}else{
this.form.counter.forEach((item, index) => {
if(!item || item == null){
newCounter[index] = {id:0}
// newCounter.splice(index, 1)
}
})
if(newCounter[0].id == newCounter[1].id){
uni.showToast({
title:'两名记分员不能是同一人',
icon:'none'
})
return
}
newCounter = newCounter.map(item => {
return item.id
})
// console.log('删除后的newScorer',newScorer);
if (newScorer[0].id == newScorer[1].id) {
uni.showToast({
title: '两名评分员不能是同一人',
icon: 'none'
})
// console.log('删除后的newCounter',newCounter);
return
}
var _url = 'common/class/setUserRole'
// this.form.classId ? _url = 'common/class/editClass' : _url = "common/class/addClass"
$http.request({
url: _url,
method: "POST", // POST、GET、PUT、DELETE具体说明查看官方文档
data: {
"classId": this.form.classId,
"monitor": this.form.monitor.id+'', //班长
"dmonitor": this.form.dmonitor ? this.form.dmonitor.id+'' : '0', //2班长
"learner": this.form.learner ? this.form.learner.id+'' : '0', //学习委员
"scorer": newScorer.join(','), //评分员
"counter": newCounter.join(',') //记分员
},
header: { //默认 无 说明:请求头
'Content-Type': 'application/json'
},
newScorer = newScorer.map(item => {
return item.id
})
// console.log('删除后的newScorer',newScorer);
}
if (!this.form.counter[0] && !this.form.counter[1]) {
newCounter = [0, 0]
} else {
this.form.counter.forEach((item, index) => {
if (!item || item == null) {
newCounter[index] = {
id: 0
}
// newCounter.splice(index, 1)
}
})
if (newCounter[0].id == newCounter[1].id) {
uni.showToast({
title: '两名记分员不能是同一人',
icon: 'none'
})
.then(res => {
uni.showToast({
title: "操作成功",
icon: 'success'
});
setTimeout(() => {
uni.navigateBack({
delta: 1
});
}, 1000)
}).catch(e => {
// console.log('表单错误信息:', err);
uni.showToast({
title: '操作失败',
icon: 'error'
})
return
}
newCounter = newCounter.map(item => {
return item.id
})
// console.log('删除后的newCounter',newCounter);
}
var _url = 'common/class/setUserRole'
// this.form.classId ? _url = 'common/class/editClass' : _url = "common/class/addClass"
$http.request({
url: _url,
method: "POST", // POST、GET、PUT、DELETE具体说明查看官方文档
data: {
"classId": this.form.classId,
"monitor": this.form.monitor.id + '', //班长
"dmonitor": this.form.dmonitor ? this.form.dmonitor.id + '' : '0', //2班长
"learner": this.form.learner ? this.form.learner.id + '' : '0', //学习委员
"scorer": newScorer.join(','), //评分员
"counter": newCounter.join(',') //记分员
},
header: { //默认 无 说明:请求头
'Content-Type': 'application/json'
},
})
.then(res => {
uni.showToast({
title: "操作成功",
icon: 'success'
});
setTimeout(() => {
uni.navigateBack({
delta: 1
});
}, 1000)
}).catch(e => {
// console.log('表单错误信息:', err);
uni.showToast({
title: '操作失败',
icon: 'error'
})
});
// }).catch(err => {
// console.log('表单错误信息:', err);
// uni.showToast({
@@ -648,26 +740,44 @@
margin-bottom: 20rpx;
}
}
.addBtnBox {
.item {
.box {
color: #999;
margin: 20rpx;
// margin: 20rpx;
align-items: center;
font-size: 28rpx;
background-color: #eee;
padding: 4rpx 8rpx;
border-radius: 6rpx;
justify-content: start;
width: 100%;
padding: 10rpx 8rpx;
.haveNoPerson {
height: 120rpx; border-radius: 10rpx; align-items: center; justify-content: center;
background-color: #eee;
}
.havePerson {
width: 100%;
padding: 20rpx;
border-radius: 10rpx;
border: 1px solid #eee;
}
.delBtn {
display: block; padding: 20rpx 0; box-sizing: border-box;
width: 100%; text-align: center; background-color: #f1f1f1;
color: #e60000 !important;
display: inline-block;
border-radius: 6rpx; margin-left: 20rpx;
font-size: 26rpx;
margin-top: 20rpx;
// display: inline-block;
border-radius: 6rpx;
}
text {
@@ -749,6 +859,17 @@
}
}
.classmateImg {
width: 60rpx !important;
height: 60rpx !important;
margin-right: 16rpx;
image {
width: 60rpx !important;
height: 60rpx;
}
}
.btn_box {
margin-top: 70rpx;
padding-bottom: 20rpx;

View File

@@ -307,7 +307,7 @@
}
.redBorder{ border: 1px solid #ff8f8f !important;}
.greenBorder{border: 1px solid #55aa00 !important;}
.studentsNumber{color: #666; font-size: 28rpx; }
.studentsNumber{color: #666; font-size: 28rpx; margin: 20rpx 0; display: block;}
.studentsList{ background-color: rgba(255, 255, 255, .8); padding: 10rpx; border-radius: 10rpx; flex-wrap: wrap; justify-content: space-around;
.item{width: 32% !important; font-size: 26rpx; padding: 6rpx !important;}
}

View File

@@ -73,7 +73,7 @@
<u-divider v-show="status == 1" text="加载中..."></u-divider>
</view>
</view>
<u-popup key="1" :show="showEditBlank" :round="10" @close="closePup" ref="">
<u-popup key="1" :show="showEditBlank" :round="10" @close="closePup" ref="" z-index="998" overlay-style="z-index:998">
<view class="" style="padding: 40rpx; max-height: 80vh; overflow-y:scroll">
<view class="anserBox">
<h3>提交的内容</h3>
@@ -106,7 +106,7 @@
<view class="" style="background-color: beige; padding: 10rpx 10rpx; margin-top: 20rpx;">
<uni-forms :modelValue="form" :rules="rules" ref="form">
<uni-forms-item label="分数" name="score" >
<uni-easyinput type="number" v-model="form.score" placeholder="请输入分数:0-100分" />
<uni-easyinput type="number" v-model="form.score" placeholder="请输入分数:0-2.5分" />
</uni-forms-item>
</uni-forms>
</view>
@@ -142,7 +142,7 @@
score: undefined, //分数
id: undefined,
},
ispreviewImage :false,
// ispreviewImage :false,
curReplay: {},
rules: {
score: {
@@ -194,11 +194,11 @@
},
onShow() {
this.form.taskId = this.thisTask.id
console.log('this.ispreviewImage',this.ispreviewImage);
if(this.ispreviewImage){
this.showEditBlank = true
this.ispreviewImage = false
}
// console.log('this.ispreviewImage',this.ispreviewImage);
// if(this.ispreviewImage){
// this.showEditBlank = true
// this.ispreviewImage = false
// }
this.FileList11 = []
this.getTaskInfo()
},
@@ -253,11 +253,7 @@
}
this.curReplay = {}
this.fileList1 = []
setTimeout(()=>{
this.pPage = 0
this.zuoyeList = []
this.getReplayList()
},1000)
},
deletePic(event) {
this.fileList1.splice(event.index, 1)
@@ -281,8 +277,8 @@
},
previewImage(url) {
console.log(url);
this.ispreviewImage = true
this.showEditBlank = false
// this.ispreviewImage = true
// this.showEditBlank = false
uni.previewImage({
urls: [url],
longPressActions: {
@@ -381,9 +377,9 @@
},
onSubmit() {
this.$refs.form.validate().then(res => {
if(this.form.score > 100){
if(this.form.score > 2.5){
uni.showToast({
title:'分数不能大于100',
title:'分数不能大于2.5',
icon:'none'
})
return
@@ -416,7 +412,13 @@
icon: 'success'
})
this.FileList = []
this.closePup()
setTimeout(()=>{
this.closePup()
this.pPage = 0
this.zuoyeList = []
this.getReplayList()
},1000)
}).catch(e => {
uni.showToast({
title: '操作失败',

View File

@@ -16,7 +16,7 @@
<uni-icons type="checkmarkempty" size="18" color="#55aa7f"></uni-icons>
</view>
<view class="">
已交 {{item.otherInfo.setGiveHomeWorkNumber}}
已交 <b>{{item.otherInfo.setGiveHomeWorkNumber}}</b>
</view>
</view>
<view class="item">
@@ -24,7 +24,7 @@
<uni-icons type="closeempty" size="18" color="#ff878d"></uni-icons>
</view>
<view class="">
未交 {{item.otherInfo.setNoGiveHomeWorkNumber}}
未交 <b>{{item.otherInfo.setNoGiveHomeWorkNumber}}</b>
</view>
</view>
<view class="item">
@@ -32,7 +32,7 @@
<uni-icons type="auth" size="18" color="#55aa7f"></uni-icons>
</view>
<view class="">
已评分 {{item.otherInfo.setGiveScoreNumber}}
已评分 <b>{{item.otherInfo.setGiveScoreNumber}}</b>
</view>
</view>
<view class="item">
@@ -40,7 +40,7 @@
<uni-icons type="spinner-cycle" size="18" color="#ff878d"></uni-icons>
</view>
<view class="">
未评分 {{item.otherInfo.setNoGiveScoreNumber}}
未评分 <b>{{item.otherInfo.setNoGiveScoreNumber}}</b>
</view>
</view>
</view>
@@ -227,7 +227,7 @@
.leve2 { justify-content: space-between;
color: #666; font-size: 24rpx;
b{font-size: 34rpx; padding: 0 4rpx; font-weight: normal;}
.item{text-align: center; padding-top: 0; padding-bottom: 0; margin-bottom: 0;}
}

View File

@@ -30,7 +30,7 @@
<u-divider v-show="status == 3" text="暂无数据"></u-divider>
<u-divider v-show="status == 1" text="加载中..."></u-divider>
</view>
<u-popup key="1" :show="showEditBlank" :round="10" @close="closePup" ref="">
<u-popup key="1" :show="showEditBlank" :round="10" @close="closePup" ref="" z-index="998" overlay-style="z-index:998">
<view class="" style="padding: 40rpx; max-height: 80vh; overflow-y:scroll">
<view class="anserBox">
<h3>心得详情</h3>
@@ -59,12 +59,12 @@
<view class="score noscore" v-show="curReplay.scoreSuccess == 0">
未评分
</view>
<!-- v-if="roleCode.includes('4') || roleCode.includes('5')" -->
<template>
<!-- -->
<template v-if="roleCode.includes('4') || roleCode.includes('5')">
<view class="" style="background-color: beige; padding: 10rpx 10rpx; margin-top: 20rpx;">
<uni-forms :modelValue="form" :rules="rules" ref="form">
<uni-forms-item label="分数" name="score" >
<uni-easyinput type="number" v-model="form.score" placeholder="请输入分数:0-100分" />
<uni-easyinput type="number" v-model="form.score" placeholder="请输入分数:0-2.5分" />
</uni-forms-item>
</uni-forms>
</view>
@@ -109,7 +109,7 @@
score: undefined, //分数
id: undefined,
},
ispreviewImage :false,
// ispreviewImage :false,
}
},
onLoad(e) {
@@ -133,19 +133,19 @@
},
onShow() {
// this.getList()
if(this.ispreviewImage){
this.showEditBlank = true
this.ispreviewImage = false
}
// if(this.ispreviewImage){
// this.showEditBlank = true
// this.ispreviewImage = false
// }
},
onBackPress() {
},
methods: {
onSubmit() {
this.$refs.form.validate().then(res => {
if(this.form.score > 100){
if(this.form.score > 2.5){
uni.showToast({
title:'分数不能大于100',
title:'分数不能大于2.5',
icon:'none'
})
return
@@ -177,8 +177,13 @@
title: '操作成功!',
icon: 'success'
})
this.FileList = []
this.closePup()
setTimeout(()=>{
this.pPage = 0
this.taskList = []
this.getList()
this.closePup()
},1000)
}).catch(e => {
uni.showToast({
title: '操作失败',
@@ -195,8 +200,8 @@
},
previewImage(url) {
console.log(url);
this.ispreviewImage = true
this.showEditBlank = false
// this.ispreviewImage = true
// this.showEditBlank = false
uni.previewImage({
urls: [url],
longPressActions: {
@@ -215,14 +220,15 @@
}
this.curReplay = {}
this.fileList1 = []
setTimeout(()=>{
this.pPage = 0
this.taskList = []
this.getList()
},1000)
console.log('this.fileList1',this.fileList1);
// setTimeout(()=>{
// this.pPage = 0
// this.taskList = []
// this.getList()
// },1000)
},
clickTask(item){
console.log('item',item);
// console.log('item',item);
this.curReplay = item
this.form = {...item}
if(this.form.scoreSuccess == 0){
@@ -233,13 +239,8 @@
_list.forEach( item => {
this.fileList1.push({url:item})
})
}
// this.fileList1 = [...item.fileList]
this.showEditBlank = true
// console.log('options',options);
// uni.navigateTo({
// url:`/pages/miniClass/taskDetailForMan?id=${item.id}&roleCode=${this.roleCode}&type=${this.pageType}`
// })
}
this.showEditBlank = true
},
getList() {
this.status = 1;
@@ -267,6 +268,7 @@
},
})
.then(res => {
console.log();
if (res.code == 0) {
if (res.page.records.length > 0) {
console.log('数据获取成功', res.page.records);

BIN
static/icon/sikaoti.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB