This commit is contained in:
@fawn-nine
2024-08-06 17:17:31 +08:00
parent 4426b044bd
commit 3ae89fd86b
8 changed files with 2607 additions and 239 deletions

View File

@@ -574,7 +574,14 @@
"path" : "pages/miniClass/classInfo",
"style" :
{
"navigationBarTitleText" : "班级详情页66"
"navigationBarTitleText" : "班级详情页用户端"
}
},
{
"path" : "pages/miniClass/classInfoMan",
"style" :
{
"navigationBarTitleText" : "班级详情页管理端"
}
},
{
@@ -625,6 +632,20 @@
{
"navigationBarTitleText" : "评分"
}
},
{
"path" : "pages/miniClass/taskDetail",
"style" :
{
"navigationBarTitleText" : "用户端任务详细"
}
},
{
"path" : "pages/miniClass/xindeDetail",
"style" :
{
"navigationBarTitleText" : "心得详细"
}
}
],
"globalStyle": {

View File

@@ -2,10 +2,26 @@
<view class="page">
<z-nav-bar :title="`${pageType}班级`"></z-nav-bar>
<!-- 公共组件-每个页面必须引入 -->
<public-module></public-module>
<uni-forms :modelValue="form" :rules="rules" ref="form">
<view class="input_box " style="">
<view class="input_box " style="" v-if="!form.id">
<uni-forms-item label="" name="modelId" label-width="0">
<view class="">
<text class="input_tit"><i>*</i>班级类型</text>
</view>
<view class="in" style="flex: 1; border: none;">
<!-- {{modelLIst}} -->
<uni-data-select placeholder="请选择班级类型"
class="addType"
v-model="form.type"
:localdata="range"
@change="selectChange"
placement="top"
></uni-data-select>
</view>
</uni-forms-item>
</view>
<view class="input_box " style="" v-if="!form.id">
<uni-forms-item label="" name="modelId" label-width="0">
<view class="">
<text class="input_tit"><i>*</i>班级模型</text>
@@ -43,9 +59,6 @@
<input type="number" @input="relationInput" placeholder-style="font-size:26rpx"
v-model="form.number" placeholder="请输入学员目标人数" />
</view>
<!-- <text v-show="relationError" style="font-size: 24rpx; color: red; margin-top: 10rpx;">请填写订单编号</text> -->
<!-- <text v-show="relationErrorPattern"
style="font-size: 24rpx; color: red; margin-top: 10rpx;">订单编号格式错误</text> -->
</uni-forms-item>
</view>
<view class="input_box">
@@ -89,8 +102,11 @@
number: '', // 联系电话
},
telError: false,
// relationError: false,
// relationErrorPattern: false,
range:[
{ value: '0', text: "普通小班",name:"普通小班"},
{ value: '1', text: "联合班" ,name:"普通小班"},
{ value: '2', text: "精英班" ,name:"普通小班"},
],
rules: {
title: {
rules: [{
@@ -119,12 +135,10 @@
onLoad(e) {
console.log('收到的值', e);
// this.pageType = e.type
this.form.type = e.type
this.modeType = e.type
this.getUserModel()
// this.form.type = e.type
// this.modeType = e.type
if(e.id){
this.pageType = '编辑'
this.form.id = e.id
this.getClassInfo()
@@ -136,19 +150,24 @@
//页面显示
onShow() {
},
onPullDownRefresh(){
uni.stopPullDownRefresh()
},
computed: {
...mapState(['userInfo']),
// getPageTitle(){
// if(this.form.id){
// return "修改班级"
// }else{
// return "添加班级"
// }
// }
},
//方法
methods: {
selectChange(e){
console.log("e:", e);
if(e != this.modeType){
this.modeType = e
console.log('formType',this.form.type)
this.getUserModel()
}
},
// 获取班级详情
getClassInfo(){
// console.log('获取课程详情');
@@ -169,9 +188,12 @@
this.refresh = false
if (res.code == 0) {
this.form = res.result.class
if(this.form.icon != ''){
this.fileList1.push({url:this.form.icon})
}
this.form.modelId = res.result.classModel.id
}
console.log('this.form',this.form);
console.log('this.form',res.result);
uni.hideLoading()
}).catch(e => {
uni.hideLoading()
@@ -307,10 +329,13 @@
icon:'success'});
setTimeout(()=> {
this.fileList1 = []
uni.navigateTo({
url:'/pages/miniClass/miniClassMan'
})
// this.$nextTick(() => {
uni.navigateBack({
delta: 1
});
// uni.navigateBack({
// delta: 1
// });
},300)
}).catch(e => {
// console.log('表单错误信息:', err);

View File

@@ -29,7 +29,7 @@
<text class="input_tit"><i>*</i>说明:<span style="font-weight: normal; color: #999; font-size: 26rpx;">(600字以内)</span></text>
<view class="in">
<view class="uni-textarea">
<textarea placeholder-style="font-size:26rpx" v-model="form.content" maxlength="600"
<textarea placeholder-style="font-size:26rpx" v-model="form.content" maxlength="600" auto-height
placeholder="请输入内容" />
</view>
</view>
@@ -38,10 +38,10 @@
<view class="input_box" v-if="form.type == 2">
<radio-group @change="radioChange" class="flex_box">
<view class="" style="margin-right:20rpx ;">
<radio value="0" />他人不可见</label>
<radio value="0" :checked="0 == form.display" />他人不可见</label>
</view>
<view class="">
<radio value="1" checked="true" />他人可见</label>
<radio value="1" :checked="1 == form.display" />他人可见</label>
</view>
</radio-group>
<span style="color: #999; font-size: 28rpx;">不勾选时班级管理员以外的人看不见提交的数据</span>
@@ -104,8 +104,9 @@
this.pageType = e.type
this.form.classId = e.id
this.form.type = e.type
if(e.renwuId){
this.form.renwuId = e.renwuId
if(e.options){
// this.form.renwuId = e.renwuId
this.form = JSON.parse(e.options)
this.pageName = '编辑'
}else{
this.pageName = '添加'
@@ -115,8 +116,10 @@
this.pageType = '作业'
}else if(e.type == 1){
this.pageType = '医案'
}else if( e.type == 2){
this.pageType = '心得'
}
console.log('收到的值', e);
},
//页面显示
onShow() {
@@ -191,17 +194,10 @@
// console.log('this.fileList1',_list);
this.form.img = _list.join(',')
}
// this.$http.post("common/class/addClassTask",{
// "classId": this.form.classId,
// "type": this.form.type, //类型 0班内任务1医案2心得
// "show": _show, //0不展示1展示
// "title": this.form.title,
// "content": this.form.content,
// "img": this.form.img
// })
var _url = ""
this.form.id ? _url = "common/class/editClassTask" : _url = "common/class/addClassTask"
$http.request({
url: "common/class/addClassTask",
url: _url,
method: "POST",
data: {
"classId": this.form.classId,

View File

@@ -2,45 +2,11 @@
<view>
<public-module></public-module>
<z-nav-bar title="班级详情"></z-nav-bar>
<!-- <view class="" style="background-color: #f4f7ff; min-height: calc(100vh - 200rpx);"> -->
<view class="mainContent" v-if="thisClass.id">
<view class="className">
<h3>{{thisClass.title}}</h3>
<text class="kaiban" v-if="thisClass.state == '0' && isMonitor || thisClass.state == '0' && isDirector"
@click="changeClassStatu('1')">开班</text>
<text class="jieban" v-if="thisClass.state == '1' && isMonitor || thisClass.state == '1' && isDirector"
@click="changeClassStatu('2')">结班</text>
<text class="tuichu" v-if="!isMonitor && !isDirector && isHave" @click="outClass()">退出班级</text>
</view>
<!-- 作业批改 -->
<view class="pingfenBox" v-if="isDirector || isMonitor">
<view class="flex_box">
<view class="item" @click="goPingfen('/pages/miniClass/giveScore',thisClass.id, '0')">
<view class="img">
<image src="../../static/icon/pigai2.png" mode="widthFix"></image>
</view>
<text>作业评分</text>
</view>
<view class="item">
<view class="img">
<image src="../../static/icon/pigai1.png" mode="widthFix"></image>
</view>
<text>医案评分</text>
</view>
<view class="item">
<view class="img">
<image src="../../static/icon/pigai3.png" mode="widthFix"></image>
</view>
<text>心得评分</text>
</view>
<view class="item">
<view class="img">
<image src="../../static/icon/biaoxianfen.png" mode="widthFix"></image>
</view>
<text>表现评分</text>
</view>
</view>
</view>
<view class="otherItems flex_box">
<view><text class="ciyao">创建日期</text><text
class="mainTxt">{{thisClass.createTime.substring(0,10)}}</text>
@@ -60,7 +26,6 @@
<rich-text class="banjiJianjie" :nodes="formatRichText(thisClass.content)"></rich-text>
<!-- <view class="banjiJianjie" v-html="thisClass.content"></view> -->
<view class="mainBox">
<view class="">
<u-tabs v-if="tabList.length > 0" :class="['tabList']" @click="tabClick" :current="curTagIndex"
@@ -94,10 +59,7 @@
<!-- 班内同学 -->
<view class="classMateBox" v-show="students.length> 0 && tabId == '2'">
<view class="newBox">
<view :class="['item','flexbox',
item.vip == '1' ? 'superVip' : '',
item.vip == '2' ? 'wumenVip' : '',
item.vip == '3' ? 'zmVip' : '']" v-for="(item, index) in students" :key="index">
<view :class="['item','flexbox']" v-for="(item, index) in students" :key="index">
<!-- <view class="imgcontainer" :style="{backgroundImage:surl(item.image)}"> -->
<view class="classmateImg">
<image v-if="item.avatar != null && item.avatar != ''" :src="item.avatar"
@@ -107,18 +69,7 @@
<view class="textItems flex_box">
<text class="txt555" v-if="item.nickname != null && item.nickname != ''">
{{item.nickname}}
<template v-if="isDirector || isMonitor">
<text>{{item.tel}}</text> <text @click="outClass(item.id)"
class="outBtn">踢出班级</text>
</template>
</text>
<text class="txt555" v-else>
匿名用户
</text>
<text class="userType" v-if="item.vip == '1'">超级VIP用户</text>
<text class="userType" v-if="item.vip == '2' ">医学VIP用户</text>
<text class="userType" v-if="item.vip == '3' ">国学VIP用户</text>
</view>
</view>
@@ -135,37 +86,59 @@
</view>
<!-- 班内任务 --><!-- 医案 --> <!-- 心得 -->
<view class="">
<view class="" v-if="tijiaoTitleId == 2" >
<view class="noanser">
<view class="">
<text>快来添加一条记录吧~</text>
</view>
<view class="btn">
<text @click="onPageJump('/pages/miniClass/addHomeWork',thisClass.id,2)">写心得</text>
</view>
</view>
</view>
<view class="" v-if="tijiaoTitleId == 2" style="margin: 20rpx 0;">
<radio-group @change="radioChange1" class="flex_box">
<view class="" style="margin-right:20rpx ;">
<radio value="0" checked="true" />全部同学的</label>
</view>
<view class="">
<radio value="1" />只看我自己的</label>
</view>
</radio-group>
</view>
<!-- <uni-section class="mb-10 nobg" title="任务列表" type="line"></uni-section> -->
<view v-if="taskList.length > 0">
<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 class="classmateImg">
<image v-if="item.avatar != null && item.avatar != ''" :src="item.avatar" mode="aspectFit"></image>
<image src="/static/icon/morenAvavter.png" mode="aspectFit"></image>
</view> -->
<!-- <view class="userName flex_box">
<text>匿名用户</text>
</view> -->
<text>{{item.title}}</text>
</view>
<view class="leve2">
{{item.content}}
</view>
<view class="leve3" @click.stop="editMyXinde(item)" v-show="tijiaoTitleId == 2 && myExperience == 1">
修改
</view>
<view class="leve3" v-show="item.reply && tijiaoTitleId != 2">
<text>已提交答案</text>
</view>
<view class="leve3 no" v-show="!item.reply && tijiaoTitleId != 2">
<text>未提交答案</text>
</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> -->
<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 class="" v-else>
<u-divider text="暂无数据"></u-divider>
</view> -->
</view>
@@ -175,68 +148,8 @@
<view class="bottomBox" v-if="!isHave && !isDirector && !isMonitor && students.length < thisClass.number">
<button type="primary" @click="addClass">一键加入班级</button>
</view>
<view class="bottomBox manBtnBox flex_box" v-if="isDirector || isMonitor">
<text class="set" @click="onPageJump('/pages/miniClass/memberSet',thisClass.id)">管理人员设置</text>
<template v-show="isDirector && thisClass.state == '0'">
<text class="edit"
@click="onPageJump('/pages/miniClass/addClass',thisClass.id, classModel.type)">修改班级</text>
<text class="del" @click="delClass()">删除班级</text>
</template>
</view>
<!-- 管理弹出 -->
<u-popup key="1" :show="showMan" :round="10" @close="closeManager">
<view class="guanli">
<h3>班内管理人员</h3>
<view class="item">
<text class="adminName">班长</text>
<view class="personbox" v-if="admins.monitor.id">
<text>{{admins.monitor.user.nickname != null && admins.monitor.user.nickname != '' ? admins.monitor.user.nickname : '匿名用户'}}</text>
<text v-if="admins.monitor.id">({{admins.monitor.user.tel}})</text>
</view>
<text v-else>暂未设置</text>
</view>
<view class="item">
<text class="adminName">副班长</text>
<view class="personbox" v-if="admins.dmonitor.id">
<text>{{admins.dmonitor.user.nickname != null && admins.dmonitor.user.nickname != '' ? admins.dmonitor.user.nickname : '匿名用户'}}</text>
<text>({{admins.dmonitor.user.tel}})</text>
</view>
<text v-else>暂未设置</text>
</view>
<view class="item"><text class="adminName">学习委员</text>
<view class="personbox" v-if="admins.learner.id">
<text>{{admins.learner.user.nickname != null && admins.learner.user.nickname != '' ? admins.learner.user.nickname : '匿名用户'}}</text>
<text>({{admins.learner.user.tel}})</text>
</view>
<text v-else>暂未设置</text>
</view>
<view class="item arryItem"><text class="adminName">记分员</text>
<template v-if="admins.counter.length > 0">
<view class="arryItemSub" v-for="(item,index) in admins.counter" :key="index">
<text>{{item.user.nickname != null && item.user.nickname != '' ? item.user.nickname : '匿名用户'}}</text>
<text>({{item.user.tel}}) </text>
</view>
</template>
<text v-else>暂未设置</text>
</view>
<view class="item arryItem"><text class="adminName">评分员</text>
<template v-if="admins.scorer.length > 0">
<view class="arryItemSub" v-for="(item,index) in admins.scorer" :key="index">
<text>{{item.user.nickname != null && item.user.nickname != '' ? item.user.nickname : '匿名用户'}}</text>
<text>({{item.user.tel}}) </text>
</view>
</template>
<text v-else>暂未设置</text>
</view>
</view>
</u-popup>
<view class="fabBox" v-if="isDirector || isMonitor">
<uni-fab ref="fab" :pattern="pattern" :content="fabContent" :horizontal="horizontal" :vertical="vertical"
:direction="direction" @trigger="fabTrigger" @fabClick="fabClick" />
</view>
<z-navigation v-if="!isDirector && !isMonitor"></z-navigation>
<z-navigation ></z-navigation>
</view>
</template>
@@ -251,6 +164,8 @@
horizontal: 'right',
vertical: 'bottom',
direction: 'vertical',
status:88,
loadFlag:false,
pattern: {
color: '#7A7E83',
backgroundColor: '#fff',
@@ -277,6 +192,7 @@
tabId: '0',
curTagIndex: 0,
scrollable: false,
pPage:0,
tabList: [{
name: '班内课程',
id: '0'
@@ -319,7 +235,7 @@
isHave: false,
showMan: false,
tijiaoTitleList: [{
name: '班内任务',
name: '班内作业',
id: '0'
},
{
@@ -334,6 +250,7 @@
tijiaoTitleId: '0',
taskList:[], // 任务列表
taskHaveMore:false, // 是否还有更多
myExperience:'0',
}
},
onLoad(e) {
@@ -341,6 +258,11 @@
this.classId = e.id
this.getUserInfo()
},
onReachBottom() {
if (this.status != 2 && this.status != 3) {
this.getList()
}
},
onPullDownRefresh() {
this.getClassInfo()
uni.stopPullDownRefresh()
@@ -354,19 +276,48 @@
},
onShow() {
this.getClassInfo()
this.pPage = 0
this.taskList = []
this.getList()
},
computed: {
...mapState(["userInfo"]),
},
methods: {
editMyXinde(item){
var options = JSON.stringify(item)
uni.navigateTo({
url:`/pages/miniClass/addHomeWork?options=${options}&type=2`
})
},
radioChange1(e){
this.myExperience = e.detail.value
console.log('点了',this.myExperience);
this.pPage = 0
this.taskList = []
this.getList()
},
goPingfen(url,classId,type){
uni.navigateTo({
url:`${url}?classId=${classId}&type=${type}`
})
},
// 点击作业或者医案,进入详细介绍
clickTask(){
clickTask(item){
var options = JSON.stringify(item)
if(this.tijiaoTitleId == 2){
// 进入的是心得
uni.navigateTo({
url:`/pages/miniClass/xindeDetail?options=${options}`
})
return
}
console.log('this.tijiaoTitleId',this.tijiaoTitleId);
// console.log('options',options);
uni.navigateTo({
url:`/pages/miniClass/taskDetail?options=${options}`
})
},
delClass() {
var that = this
@@ -405,17 +356,26 @@
}
})
},
titleClick(item, textIndex) {
this.tijiaoTitleId = textIndex
console.log('e班内提交子按钮');
getList(){
this.status = 1;
if (this.loadFlag) {
console.log("有未完成的进程");
return;
}
uni.showLoading({
title:'加载中'
})
this.loadFlag = true;
this.pPage++;
$http.request({
url: "common/class/getClassTaskList",
url: "common/class/getClassTaskListStudent",
method: "POST",
data: {
"limit": 20,
"limit": 100,
"page": 1,
"classId": this.thisClass.id,
"type": textIndex+'', //类型 0班内任务1医案2心得
"type": this.tijiaoTitleId+'', //类型 0班内任务1医案2心得
"myExperience": this.myExperience, //0全部心得1我的心得
"title": ""
},
header: { //默认 无 说明:请求头
@@ -424,21 +384,46 @@
})
.then(res => {
if (res.code == 0) {
if(res.page.records.length > 0){
console.log('数据获取成功',res.page.records);
this.taskList = res.page.records
if(res.page.pages > 1){
this.taskHaveMore = true
}
if (res.page.pages > this.pPage) {
this.status = 0;
} else {
this.status = 2;
}
}else{
this.status = 3; // 暂无数据
}
this.loadFlag = false;
console.log('res', res);
uni.hideLoading()
}
}).catch(e => {
console.log(e, '数据报错')
// this.status = 3
uni.hideLoading()
this.loadFlag = false;
uni.showToast({
title: e.msg,
icon: 'error'
})
});
},
titleClick(item, textIndex) {
console.log('进来了吗');
if(this.tijiaoTitleId == textIndex){
return
}
this.tijiaoTitleId = textIndex
console.log('e班内提交子按钮');
this.pPage = 0
this.taskList = []
this.myExperience = 0
this.getList()
},
getUserInfo() {
// 获取个人信息
if (this.userInfo.id != undefined) {
@@ -464,7 +449,8 @@
console.log('e', e);
this.tabId = e.id
if(e.id == 3){
this.titleClick(undefined,0)
console.log('心得');
this.getList()
}
},
@@ -772,6 +758,11 @@
color: #fff;
font-weight: normal;
}
.noanser{ padding: 20rpx;
background-color: rgba(255, 255, 255, .6);
text-align: center; border-bottom: 1px solid #eee;
.btn{display: inline-block; border-radius: 20rpx ; padding: 10rpx 20rpx; background-color: $themeColor; color: #fff;}
}
.taskEdit{color: $themeColor; display: inline-block; padding-left: 20rpx;}
.pingfenBox {
border: 2px dotted #bed4ee;
@@ -867,6 +858,8 @@
color: #999;
@include bov()
}
.leve3{color: $themeColor; text-align: center; padding-top: 10rpx;}
.leve3.no{color: #ff9277; text-align: center;}
}
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -10,7 +10,7 @@
<view class="classNewBtn" v-if="isDirector">
<view class="box88 flex_box">
<view class="" style="width: 60%; text-align: center;">
<button type="primary" @click="pupShow = true">新开一个班级</button>
<button type="primary" @click="goAddClasss">新开一个班级</button>
</view>
</view>
</view>
@@ -36,7 +36,7 @@
<image src="@/static/my_04.png" mode="aspectFit"></image>
</view>
<view class="buyItems">
<view class="txt555" @click="onPageJump('/pages/miniClass/classInfo',item.id)">
<view class="txt555" @click="onPageJump('/pages/miniClass/classInfoMan',item.id)">
{{item.title}}
</view>
<view class="jianjie">
@@ -46,7 +46,7 @@
</view> -->
<view class="btn_box" >
<!-- <text @click="enterClass" v-show="item.state == '0'">一键加入</text> -->
<text class="seeInfo" @click="onPageJump('/pages/miniClass/classInfo',item.id)">进入班级</text>
<text class="seeInfo" @click="onPageJump('/pages/miniClass/classInfoMan',item.id)">进入班级</text>
</view>
</view>
</view>
@@ -62,23 +62,7 @@
:iconStyle="iconStyle"></u-back-top>
</view>
<z-navigation></z-navigation>
<u-popup v-if="pupShow" key="1" :show="pupShow" :round="10" @close="closePup">
<view style="padding: 40rpx;" class="flex_box box6">
<view class="" style="width: 100%; text-align: center;">
<text>请选择您要创建的班级类型</text>
<uni-data-select
class="addType"
v-model="addType"
:localdata="range"
@change="selectChange"
placement="top"
></uni-data-select>
<view class="btnBox flex_box" style="text-align: center; width: 100%;">
<button size="" style="width: 40%;" type="primary" @click="goCreateClass">确定</button>
</view>
</view>
</view>
</u-popup>
<!-- <music-play :playData="playData"></music-play> -->
</view>
</view>
@@ -96,11 +80,7 @@
return {
playData: {},
addType:undefined, // 小班类型
range:[
{ value: '0', text: "普通小班",name:"普通小班"},
{ value: '1', text: "联合班" ,name:"普通小班"},
{ value: '2', text: "精英班" ,name:"普通小班"},
],
tagId: null,
pid:null,
fixed: false,
@@ -144,13 +124,12 @@
// 隐藏原生的tabbar
uni.hideTabBar();
// this.tagId = e.id
this.curTagId = this.range[0].value
this.subTabId = this.subList[0].id
this.pageTitle = e.title
this.pid = e.pid
console.log(e, '传入分类id')
this.getUserInfo()
this.getData()
// this.getCateList(this.tagId)
},
onPageScroll(e) {
@@ -182,7 +161,8 @@
},
//页面显示
onShow() {
this.addType = undefined
// this.addType = undefined
this.getData()
// 隐藏原生的tabbar
// uni.hideTabBar();
},
@@ -191,6 +171,11 @@
},
//方法
methods: {
goAddClasss(){
uni.navigateTo({
url:'/pages/miniClass/addClass'
})
},
getUserInfo() {
// 获取个人信息
if (this.userInfo.id != undefined) {
@@ -219,24 +204,7 @@
surl(imageurl) {
return `url(${imageurl})`
},
goCreateClass(){
console.log('this.addType',this.addType);
if(this.addType != undefined){
this.pupShow = false
setTimeout(()=> {
uni.navigateTo({
url:`/pages/miniClass/addClass?type=${this.addType}`
})
},300)
}else{
uni.showToast({
title:'请选择班级的类型',
icon:'none'
})
return
}
},
fatherClick(e) {
console.log('点击', e)
this.page = 1

View File

@@ -0,0 +1,632 @@
<template>
<view>
<public-module></public-module>
<z-nav-bar title="医案详情"></z-nav-bar>
<!-- <view class="" style="background-color: #f4f7ff; min-height: calc(100vh - 200rpx);"> -->
<view class="mainContent" v-if="thisTask.id">
<view class="" style="height:40rpx;">
</view>
<view class="taskBox">
<h3>题目内容</h3>
<view class="taskTitle">
{{thisTask.title}}
</view>
<view class="imgBox flex_box" v-if="FileList11.length > 0">
<view class="item" v-for="(item, index) in FileList11" :key="index">
<image @click="previewImage(item.url)" :src="item.url" mode="widthFix"></image>
</view>
</view>
<view class="taskContent" v-html="thisTask.content">
</view>
</view>
<!-- 还没提交提示 -->
<view class="noanser" v-show="!thisTask.reply">
<view class="">
<text>还没有提交你的答案呢现在开始作答吧</text>
</view>
<view class="btn">
<text @click="editOrAdd(undefined)">写答案</text>
</view>
</view>
<!-- 提交记录 -->
<view v-show="thisTask.reply">
<uni-section class="mb-10 nobg" title="提交记录" type="line"></uni-section>
<view class="">
<radio-group @change="radioChange1" class="flex_box">
<view class="" style="margin-right:20rpx ;">
<radio value="0" />全部同学的提交</label>
</view>
<view class="">
<radio value="1" checked="true" />只看我自己提交的</label>
</view>
</radio-group>
</view>
<view class="zuoyeListBox" v-if="zuoyeList.length > 0">
<view class="newBox" >
<view class="item " v-for="(item, index) in zuoyeList" >
<view class="leve1 flex_box" style="justify-content: space-between;">
<view class="flex_box" style="justify-items: center;">
<view class="classmateImg">
<image v-if="item.createUser.avatar != null && item.createUser.avatar != ''" :src="item.createUser.avatar" mode="aspectFit"></image>
<image v-else src="/static/icon/morenAvavter.png" mode="aspectFit"></image>
</view>
<view class="userName flex_box">
<text v-if="item.createUser.nickname != '' && item.createUser.nickname != null">匿名用户</text>
<text v-else>匿名用户</text>
</view>
</view>
<view class="editBtn" v-if="listDisplay == '1'">
<text @click="editOrAdd(item)">修改</text>
</view>
</view>
<view class="leve2">
<view class="imgBox flex_box" v-if="item.fileList.length > 0">
<view class="item" v-for="(item, index) in item.fileList" :key="index">
<image @click="previewImage(item.url)" :src="item.url" mode="widthFix"></image>
</view>
</view>
<view class="">
{{item.content}}
</view>
<view class="date">
{{item.createTime}}
</view>
</view>
</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-popup key="1" :show="showEditBlank" :round="10" @close="closePup" ref="">
<view class="" style="padding: 40rpx; max-height: 80vh; overflow-y:scroll">
<view class="anserBox" >
<h3>我的答案</h3>
<uni-forms :modelValue="form" :rules="rules" ref="form">
<view class="input_box">
<uni-forms-item label="" name="content" label-width="0">
<text class="input_tit"><i>*</i>内容:<span
style="font-weight: normal; color: #999; font-size: 26rpx;">(600字以内)</span></text>
<view class="in">
<view class="uni-textarea">
<textarea placeholder-style="font-size:26rpx" v-model="form.content" maxlength="600"
auto-height placeholder="请输入内容" />
</view>
</view>
</uni-forms-item>
</view>
<view class="input_box">
<text class="input_tit">上传图片:</text>
<view class="in" style="border: none;" @click="checkPermision">
<u-upload :fileList="fileList1" @afterRead="addPic" @delete="deletePic" multiple
:maxCount="4" width="40" height="40" :previewFullImage="true">
</u-upload>
<!-- <text style="font-size: 24rpx; color: #999;">可上传4张问题截图</text> -->
</view>
<!-- <input type="password" maxlength="8" v-model="confirmPassword" placeholder="请确认密码" /> -->
</view>
<view class="input_box">
<radio-group @change="radioChange" class="flex_box">
<view class="" style="margin-right:20rpx ;">
<radio value="0" :checked="0 == form.display" />他人不可见</label>
</view>
<view class="">
<radio value="1" :checked="1 == form.display" />他人可见</label>
</view>
</radio-group>
<span
style="color: #999; font-size: 28rpx; margin-top: 20rpx; display: block;">不勾选时班级管理员以外的人看不见提交的内容</span>
</view>
</uni-forms>
<view class="btn_box"><button @click="onSubmit"> </button></view>
</view>
</view>
</u-popup>
<z-navigation></z-navigation>
</view>
</template>
<script>
import $http from '@/config/requestConfig.js';
import {
mapState
} from "vuex";
export default {
data() {
return {
showEditBlank:false,
zuoyeList:[],
loadFlag:false,
thisTask: {},
status: 88,
TaskId: undefined,
userMes: undefined,
FileList11: [],
fileList1: [],
pPage: 0,
form: {
taskId: undefined,
id: undefined,
display: "1", //0不展示1展示
content: "",
img: ""
},
rules: {
content: {
rules: [{
required: true,
errorMessage: '请输入回答内容',
}
]
},
},
listDisplay: '1', // 提交记录展示类型 0 全部 1 自己的
}
},
onLoad(e) {
uni.hideTabBar();
this.thisTask = JSON.parse(e.options)
console.log('e', this.thisTask)
if (this.thisTask.img != '') {
var imgs = this.thisTask.img.split(',')
imgs = imgs.forEach((item, index) => {
this.FileList11.push({
url: item
})
})
} else {
this.FileList11 = []
}
console.log('this.FileList', this.FileList)
// this.TaskId = e.id
this.getUserInfo()
this.getZuoyeList()
},
onReachBottom() {
if (this.status != 2 && this.status != 3) {
this.getZuoyeList()
}
},
onPullDownRefresh() {
// this.getTaskInfo()
uni.stopPullDownRefresh()
},
onShow() {
this.form.taskId = this.thisTask.id
// this.getTaskInfo()
},
computed: {
...mapState(["userInfo"]),
},
methods: {
closePup(){
this.showEditBlank = false
this.form = {
taskId: undefined,
id: undefined,
display: "1", //0不展示1展示
content: "",
img: ""
}
this.fileList1 = []
},
deletePic(event) {
this.fileList1.splice(event.index, 1)
},
editOrAdd(item){
console.log('item', item);
if(item){
this.form = item
this.fileList1 = [...item.fileList]
console.log('fileList4545',item.fileList);
}
else{
console.log('form', this.form);
}
this.showEditBlank = true
},
radioChange1(e){
this.listDisplay = e.detail.value
console.log('点了',e);
this.pPage = 0
this.zuoyeList = []
this.getZuoyeList()
},
previewImage(url) {
console.log(url);
uni.previewImage({
urls: [url],
longPressActions: {
itemList: ["很抱歉,暂不支持保存图片到本地"],
success: function(res) {
// console.log(res,'+++++')
},
},
});
},
getZuoyeList() {
this.status = 1;
if (this.loadFlag) {
console.log("有未完成的进程");
return;
}
uni.showLoading({
title:'加载中'
})
this.loadFlag = true;
this.pPage++;
$http.request({
url: 'common/class/getReplyListByTaskId',
method: "POST",
data: {
"limit": 10,
"page": 1,
"taskId": this.thisTask.id,
"myReply": this.listDisplay //0全部作业1我的作业
},
header: { //默认 无 说明:请求头
'Content-Type': 'application/json'
},
})
.then(res => {
if(res.page.records.length > 0){
var list = res.page.records
list.forEach(item => {
item.fileList = []
if(item.img != ''){
var _urs = item.img.split(',')
_urs.forEach(item1 => {
item.fileList.push({url:item1})
})
}
})
this.zuoyeList = this.zuoyeList.concat(list)
console.log('chulihoude ',this.zuoyeList);
if (res.page.pages > this.pPage) {
this.status = 0;
} else {
this.status = 2;
}
}else{
this.status = 3; // 暂无数据
}
this.loadFlag = false;
console.log('res', res);
uni.hideLoading()
}).catch(e => {
uni.hideLoading()
this.loadFlag = false;
// console.log('表单错误信息:', err);
uni.showToast({
title: '获取作业列表失败',
icon:'none'
})
})
},
getUserInfo() {
// 获取个人信息
if (this.userInfo.id != undefined) {
this.$http.post("common/user/getUserInfo").then((res) => {
this.userMes = res.result
}).catch(e => {
uni.showToast({
title: '获取用户信息失败',
icon: 'none'
})
});
}
},
// 跳转
onPageJump(url, id, modeType) {
uni.navigateTo({
url: `${url}?id=${id}&type=${modeType}`
});
},
onSubmit() {
this.$refs.form.validate().then(res => {
if (this.fileList1.length > 0) {
let _list = this.fileList1
_list = _list.map(item => item.url)
// console.log('this.fileList1',_list);
this.form.img = _list.join(',')
}
var _url = ""
this.form.id ? _url =
'common/class/editClassTaskReply' : _url = 'common/class/addClassTaskReply'
var data = {
"taskId": this.form.id ? undefined : this.form.taskId,
"id": this.form.id,
"display": this.form.display, //0不展示1展示
"content": this.form.content,
"img": this.form.img
}
console.log('data',data);
$http.request({
url: _url,
method: "POST",
data,
header: { //默认 无 说明:请求头
'Content-Type': 'application/json'
},
})
.then(res => {
uni.showToast({
title: '操作成功!',
icon: 'success'
})
this.FileList = []
this.closePup()
this.thisTask.reply = true
setTimeout(()=>{
this.pPage = 0
this.zuoyeList = []
this.getZuoyeList()
},200)
}).catch(e => {
uni.showToast({
title: '操作失败',
icon: 'error'
})
});
}).catch(err => {
console.log('表单错误信息:', err);
uni.showToast({
title: '页面有未填写的内容哦',
icon: 'none'
})
})
},
addPic(e) {
let that = this;
console.log("添加图片", that.fileList1);
for (var i = 0; i < e.file.length; i++) {
console.log(i,e.file[i].url)
uni.uploadFile({
url: this.$baseUrl + "oss/fileoss",
filePath: e.file[i].url,
//files:e.file,
name: "file",
formData: {},
success: (res) => {
// console.log("添加图片", this.fileList1);
that.fileList1.push({
url: JSON.parse(res.data).url,
});
console.log(that.fileList1, "that.uploadPicLIst");
},
fail: (error) => {
console.log("上传失败", error);
},
});
}
},
async checkPermision() {
var result = await permission.premissionCheck("CAMERA_EXTERNAL_STORAGE")
if (result != 1) {
return false
}
},
radioChange(e) {
this.form.display = e.detail.value
console.log('点了', this.form.display, e);
},
getTaskInfo() {
uni.showLoading({
title: '正在加载'
})
$http.request({
url: "common/class/getTaskInfo",
method: "POST", // POST、GET、PUT、DELETE具体说明查看官方文档
data: {
"TaskId": this.TaskId // 班类型 0小班 1联合班 2精英班
},
header: { //默认 无 说明:请求头
'Content-Type': 'application/json'
},
})
.then(res => {
this.refresh = false
if (res.code == 0) {
}
uni.hideLoading()
}).catch(e => {
uni.hideLoading()
console.log(e, '数据报错')
// this.status = 3
uni.showToast({
title: `获取数据失败`,
icon: 'error'
})
});
}
}
}
</script>
<style lang="scss" scoped>
@import "@/style/mixin.scss";
.flexbox {
display: flex;
}
i {
color: red;
padding-right: 20rpx;
}
.noanser{ padding: 20rpx;
text-align: center; border-bottom: 1px solid #eee;
.btn{display: inline-block; border-radius: 20rpx ; padding: 10rpx 20rpx; background-color: $themeColor; color: #fff;}
}
.in {
border: 1rpx solid #eeeeee;
border-radius: 8rpx;
padding: 8rpx;
margin-top: 10rpx;
}
.zuoyeListBox{margin-top: 40rpx;}
.btn_box {
margin-top: 70rpx;
padding-bottom: 20rpx;
button {
font-size: 32rpx;
@include theme('btn_bg') color: #fff;
height: 80rpx;
line-height: 80rpx;
border-radius: 50rpx;
}
}
.fabBox {}
.taskBox {
border: 4rpx dotted #bad7f0;
padding: 20rpx;
padding-top: 0;
background-color: #fff;
border-radius: 20rpx;
overflow: hidden;
h3 {
line-height: 80rpx;
width: 50%;
margin: 0 auto;
text-align: center;
color: #fff;
border-radius: 0 0 20rpx 20rpx;
background-color: $themeColor;
}
}
.anserBox {
border: 4rpx dotted #2bb447;
margin-top: 30rpx;
padding: 20rpx;
background-color: #fff;
border-radius: 20rpx;
overflow: hidden;
padding-top: 0;
h3 {
line-height: 80rpx;
width: 50%;
margin: 0 auto;
text-align: center;
color: #fff;
background-color: #2bb447;
border-radius: 0 0 20rpx 20rpx;
}
}
.nobg{background: transparent;}
.taskTitle {
font-size: 30rpx;
margin: 20rpx 0;
}
.newBox {
.classmateImg {
width: 60rpx !important;
height: 60rpx !important;
margin-right: 20rpx;
image {
width: 60rpx !important;
height: 60rpx;
}
}
.editBtn{padding-left: 40rpx; color: $themeColor; text-align: right;}
.item {
background-color: #fff;
border-radius: 20rpx;
box-shadow: none !important;
padding: 20rpx;
margin-bottom: 30rpx;
// border-bottom: 1px solid #eee;
// border-radius: 0 !important;
.leve1 {
align-items: center;
border-bottom: 1px dashed #eee;
padding-bottom: 20rpx;
margin-bottom: 20rpx;
// .userName{}
}
.leve2{
.date{color: #999; text-align: right; font-size: 26rpx;}
}
}
}
.taskContent {
font-size: 30rpx;
margin-top: 20rpx;
}
.imgBox {
flex-wrap: wrap;
.item {
width: 20%;
margin-right: 10rpx; border: 1px solid #eee;
image {
width: 100%;
}
}
}
.manBtnBox {
justify-content: center;
text {
width: 30%;
font-size: 28rpx;
padding: 20rpx 0;
border-radius: 10rpx;
display: block;
margin: 0 20rpx;
color: #fff;
}
.edit {
background-color: $themeColor;
}
.del {
background-color: #ffa4a6;
}
.set {
background-color: #ffca7e;
}
}
.mainContent {
display: block;
color: #333;
padding: 0 20rpx;
padding-bottom: 120rpx;
background-image: linear-gradient(30deg, #d4eaf0 0%, #d4eaf0 50%, #fdf0ed 100%);
min-height: 100vh;
}
</style>

View File

@@ -0,0 +1,589 @@
<template>
<view>
<public-module></public-module>
<z-nav-bar title="心得详情"></z-nav-bar>
<!-- <view class="" style="background-color: #f4f7ff; min-height: calc(100vh - 200rpx);"> -->
<view class="mainContent" v-if="thisTask.id">
<view class="" style="height:40rpx;">
</view>
<view class="taskBox">
<!-- <h3>题目内容</h3> -->
<view class="taskTitle">
{{thisTask.title}}
</view>
<view class="imgBox flex_box" v-if="FileList11.length > 0">
<view class="item" v-for="(item, index) in FileList11" :key="index">
<image @click="previewImage(item.url)" :src="item.url" mode="widthFix"></image>
</view>
</view>
<view class="taskContent" v-html="thisTask.content">
</view>
<view class="date" style="color: #999; text-align: right;">
提交时间{{thisTask.createTime}}
</view>
</view>
<!-- 提交记录 -->
<view v-show="thisTask.reply">
<uni-section class="mb-10 nobg" title="提交记录" type="line"></uni-section>
<view class="">
<radio-group @change="radioChange1" class="flex_box">
<view class="" style="margin-right:20rpx ;">
<radio value="0" />全部同学的提交</label>
</view>
<view class="">
<radio value="1" checked="true" />只看我自己提交的</label>
</view>
</radio-group>
</view>
</view>
</view>
<u-popup key="1" :show="showEditBlank" :round="10" @close="closePup" ref="">
<view class="" style="padding: 40rpx; max-height: 80vh; overflow-y:scroll">
<view class="anserBox" >
<h3>我的答案</h3>
<uni-forms :modelValue="form" :rules="rules" ref="form">
<view class="input_box">
<uni-forms-item label="" name="content" label-width="0">
<text class="input_tit"><i>*</i>内容:<span
style="font-weight: normal; color: #999; font-size: 26rpx;">(600字以内)</span></text>
<view class="in">
<view class="uni-textarea">
<textarea placeholder-style="font-size:26rpx" v-model="form.content" maxlength="600"
auto-height placeholder="请输入内容" />
</view>
</view>
</uni-forms-item>
</view>
<view class="input_box">
<text class="input_tit">上传图片:</text>
<view class="in" style="border: none;" @click="checkPermision">
<u-upload :fileList="fileList1" @afterRead="addPic" @delete="deletePic" multiple
:maxCount="4" width="40" height="40" :previewFullImage="true">
</u-upload>
<!-- <text style="font-size: 24rpx; color: #999;">可上传4张问题截图</text> -->
</view>
<!-- <input type="password" maxlength="8" v-model="confirmPassword" placeholder="请确认密码" /> -->
</view>
<view class="input_box">
<radio-group @change="radioChange" class="flex_box">
<view class="" style="margin-right:20rpx ;">
<radio value="0" :checked="0 == form.display" />他人不可见</label>
</view>
<view class="">
<radio value="1" :checked="1 == form.display" />他人可见</label>
</view>
</radio-group>
<span
style="color: #999; font-size: 28rpx; margin-top: 20rpx; display: block;">不勾选时班级管理员以外的人看不见提交的内容</span>
</view>
</uni-forms>
<view class="btn_box"><button @click="onSubmit"> </button></view>
</view>
</view>
</u-popup>
<z-navigation></z-navigation>
</view>
</template>
<script>
import $http from '@/config/requestConfig.js';
import {
mapState
} from "vuex";
export default {
data() {
return {
showEditBlank:false,
zuoyeList:[],
loadFlag:false,
thisTask: {},
status: 88,
TaskId: undefined,
userMes: undefined,
FileList11: [],
fileList1: [],
pPage: 0,
form: {
taskId: undefined,
id: undefined,
display: "1", //0不展示1展示
content: "",
img: ""
},
rules: {
content: {
rules: [{
required: true,
errorMessage: '请输入回答内容',
}
]
},
},
listDisplay: '1', // 提交记录展示类型 0 全部 1 自己的
}
},
onLoad(e) {
uni.hideTabBar();
this.thisTask = JSON.parse(e.options)
console.log('e', this.thisTask)
if (this.thisTask.img != '') {
var imgs = this.thisTask.img.split(',')
imgs = imgs.forEach((item, index) => {
this.FileList11.push({
url: item
})
})
} else {
this.FileList11 = []
}
console.log('this.FileList', this.FileList)
// this.TaskId = e.id
this.getUserInfo()
this.getZuoyeList()
},
onReachBottom() {
if (this.status != 2 && this.status != 3) {
this.getZuoyeList()
}
},
onPullDownRefresh() {
// this.getTaskInfo()
uni.stopPullDownRefresh()
},
onShow() {
this.form.taskId = this.thisTask.id
// this.getTaskInfo()
},
computed: {
...mapState(["userInfo"]),
},
methods: {
closePup(){
this.showEditBlank = false
this.form = {
taskId: undefined,
id: undefined,
display: "1", //0不展示1展示
content: "",
img: ""
}
this.fileList1 = []
},
deletePic(event) {
this.fileList1.splice(event.index, 1)
},
editOrAdd(item){
console.log('item', item);
if(item){
this.form = item
this.fileList1 = [...item.fileList]
console.log('fileList4545',item.fileList);
}
else{
console.log('form', this.form);
}
this.showEditBlank = true
},
radioChange1(e){
this.listDisplay = e.detail.value
console.log('点了',e);
this.pPage = 0
this.zuoyeList = []
this.getZuoyeList()
},
previewImage(url) {
console.log(url);
uni.previewImage({
urls: [url],
longPressActions: {
itemList: ["很抱歉,暂不支持保存图片到本地"],
success: function(res) {
// console.log(res,'+++++')
},
},
});
},
getZuoyeList() {
this.status = 1;
if (this.loadFlag) {
console.log("有未完成的进程");
return;
}
uni.showLoading({
title:'加载中'
})
this.loadFlag = true;
this.pPage++;
$http.request({
url: 'common/class/getReplyListByTaskId',
method: "POST",
data: {
"limit": 10,
"page": 1,
"taskId": this.thisTask.id,
"myReply": this.listDisplay //0全部作业1我的作业
},
header: { //默认 无 说明:请求头
'Content-Type': 'application/json'
},
})
.then(res => {
if(res.page.records.length > 0){
var list = res.page.records
list.forEach(item => {
item.fileList = []
if(item.img != ''){
var _urs = item.img.split(',')
_urs.forEach(item1 => {
item.fileList.push({url:item1})
})
}
})
this.zuoyeList = this.zuoyeList.concat(list)
console.log('chulihoude ',this.zuoyeList);
if (res.page.pages > this.pPage) {
this.status = 0;
} else {
this.status = 2;
}
}else{
this.status = 3; // 暂无数据
}
this.loadFlag = false;
console.log('res', res);
uni.hideLoading()
}).catch(e => {
uni.hideLoading()
this.loadFlag = false;
// console.log('表单错误信息:', err);
uni.showToast({
title: '获取作业列表失败',
icon:'none'
})
})
},
getUserInfo() {
// 获取个人信息
if (this.userInfo.id != undefined) {
this.$http.post("common/user/getUserInfo").then((res) => {
this.userMes = res.result
}).catch(e => {
uni.showToast({
title: '获取用户信息失败',
icon: 'none'
})
});
}
},
// 跳转
onPageJump(url, id, modeType) {
uni.navigateTo({
url: `${url}?id=${id}&type=${modeType}`
});
},
onSubmit() {
this.$refs.form.validate().then(res => {
if (this.fileList1.length > 0) {
let _list = this.fileList1
_list = _list.map(item => item.url)
// console.log('this.fileList1',_list);
this.form.img = _list.join(',')
}
var _url = ""
this.form.id ? _url =
'common/class/editClassTaskReply' : _url = 'common/class/addClassTaskReply'
var data = {
"taskId": this.form.id ? undefined : this.form.taskId,
"id": this.form.id,
"display": this.form.display, //0不展示1展示
"content": this.form.content,
"img": this.form.img
}
console.log('data',data);
$http.request({
url: _url,
method: "POST",
data,
header: { //默认 无 说明:请求头
'Content-Type': 'application/json'
},
})
.then(res => {
uni.showToast({
title: '操作成功!',
icon: 'success'
})
this.FileList = []
this.closePup()
this.thisTask.reply = true
setTimeout(()=>{
this.pPage = 0
this.zuoyeList = []
this.getZuoyeList()
},200)
}).catch(e => {
uni.showToast({
title: '操作失败',
icon: 'error'
})
});
}).catch(err => {
console.log('表单错误信息:', err);
uni.showToast({
title: '页面有未填写的内容哦',
icon: 'none'
})
})
},
addPic(e) {
let that = this;
console.log("添加图片", that.fileList1);
for (var i = 0; i < e.file.length; i++) {
console.log(i,e.file[i].url)
uni.uploadFile({
url: this.$baseUrl + "oss/fileoss",
filePath: e.file[i].url,
//files:e.file,
name: "file",
formData: {},
success: (res) => {
// console.log("添加图片", this.fileList1);
that.fileList1.push({
url: JSON.parse(res.data).url,
});
console.log(that.fileList1, "that.uploadPicLIst");
},
fail: (error) => {
console.log("上传失败", error);
},
});
}
},
async checkPermision() {
var result = await permission.premissionCheck("CAMERA_EXTERNAL_STORAGE")
if (result != 1) {
return false
}
},
radioChange(e) {
this.form.display = e.detail.value
console.log('点了', this.form.display, e);
},
getTaskInfo() {
uni.showLoading({
title: '正在加载'
})
$http.request({
url: "common/class/getTaskInfo",
method: "POST", // POST、GET、PUT、DELETE具体说明查看官方文档
data: {
"TaskId": this.TaskId // 班类型 0小班 1联合班 2精英班
},
header: { //默认 无 说明:请求头
'Content-Type': 'application/json'
},
})
.then(res => {
this.refresh = false
if (res.code == 0) {
}
uni.hideLoading()
}).catch(e => {
uni.hideLoading()
console.log(e, '数据报错')
// this.status = 3
uni.showToast({
title: `获取数据失败`,
icon: 'error'
})
});
}
}
}
</script>
<style lang="scss" scoped>
@import "@/style/mixin.scss";
.flexbox {
display: flex;
}
i {
color: red;
padding-right: 20rpx;
}
.noanser{ padding: 20rpx;
text-align: center; border-bottom: 1px solid #eee;
.btn{display: inline-block; border-radius: 20rpx ; padding: 10rpx 20rpx; background-color: $themeColor; color: #fff;}
}
.in {
border: 1rpx solid #eeeeee;
border-radius: 8rpx;
padding: 8rpx;
margin-top: 10rpx;
}
.zuoyeListBox{margin-top: 40rpx;}
.btn_box {
margin-top: 70rpx;
padding-bottom: 20rpx;
button {
font-size: 32rpx;
@include theme('btn_bg') color: #fff;
height: 80rpx;
line-height: 80rpx;
border-radius: 50rpx;
}
}
.fabBox {}
.taskBox {
// border: 4rpx dotted #bad7f0;
padding: 20rpx;
padding-top: 0;
background-color: #fff;
border-radius: 20rpx;
overflow: hidden;
h3 {
line-height: 80rpx;
width: 50%;
margin: 0 auto;
text-align: center;
color: #fff;
border-radius: 0 0 20rpx 20rpx;
background-color: $themeColor;
}
}
.anserBox {
border: 4rpx dotted #2bb447;
margin-top: 30rpx;
padding: 20rpx;
background-color: #fff;
border-radius: 20rpx;
overflow: hidden;
padding-top: 0;
h3 {
line-height: 80rpx;
width: 50%;
margin: 0 auto;
text-align: center;
color: #fff;
background-color: #2bb447;
border-radius: 0 0 20rpx 20rpx;
}
}
.nobg{background: transparent;}
.taskTitle {
font-size: 30rpx;
margin: 20rpx 0;
}
.newBox {
.classmateImg {
width: 60rpx !important;
height: 60rpx !important;
margin-right: 20rpx;
image {
width: 60rpx !important;
height: 60rpx;
}
}
.editBtn{padding-left: 40rpx; color: $themeColor; text-align: right;}
.item {
background-color: #fff;
border-radius: 20rpx;
box-shadow: none !important;
padding: 20rpx;
margin-bottom: 30rpx;
// border-bottom: 1px solid #eee;
// border-radius: 0 !important;
.leve1 {
align-items: center;
border-bottom: 1px dashed #eee;
padding-bottom: 20rpx;
margin-bottom: 20rpx;
// .userName{}
}
.leve2{
.date{color: #999; text-align: right; font-size: 26rpx;}
}
}
}
.taskContent {
font-size: 30rpx;
margin-top: 20rpx;
}
.imgBox {
flex-wrap: wrap;
.item {
width: 20%;
margin-right: 10rpx; border: 1px solid #eee;
image {
width: 100%;
}
}
}
.manBtnBox {
justify-content: center;
text {
width: 30%;
font-size: 28rpx;
padding: 20rpx 0;
border-radius: 10rpx;
display: block;
margin: 0 20rpx;
color: #fff;
}
.edit {
background-color: $themeColor;
}
.del {
background-color: #ffa4a6;
}
.set {
background-color: #ffca7e;
}
}
.mainContent {
display: block;
color: #333;
padding: 0 20rpx;
padding-bottom: 120rpx;
// background-image: linear-gradient(30deg, #d4eaf0 0%, #d4eaf0 50%, #fdf0ed 100%);
min-height: 100vh;
}
</style>