This commit is contained in:
@fawn-nine
2024-08-26 17:35:18 +08:00
parent 57d5beaa72
commit 4792202081
21 changed files with 726 additions and 693 deletions

View File

@@ -23,69 +23,8 @@
<view class="date" style="color: #999; text-align: right; font-size: 26rpx;">
提交时间{{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>
</view>
</view>
<z-navigation></z-navigation>
</view>
</template>
@@ -126,27 +65,17 @@
},
},
listDisplay: '1', // 提交记录展示类型 0 全部 1 自己的
listDisplay: '1', // 提交记录展示类型 0 全部 1 自己的
}
},
onLoad(e) {
uni.hideTabBar();
this.thisTask = JSON.parse(e.options)
this.TaskId = e.id
// 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.classState = e.classState
this.getTask()
this.getUserInfo()
this.getZuoyeList()
},
@@ -168,6 +97,42 @@
...mapState(["userInfo"]),
},
methods: {
getTask(){
$http.request({
url: "common/class/getClassTaskInfo",
method: "POST",
data: {
"taskId": this.TaskId
},
header: { //默认 无 说明:请求头
'Content-Type': 'application/json'
},
})
.then(res => {
if (res.code == 0) {
this.thisTask = res.result.classTask
this.FileList11 = []
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('thisTask', this.thisTask);
}
}).catch(e => {
console.log(e, '数据报错')
// this.status = 3
uni.showToast({
title: e.msg,
icon: 'error'
})
});
},
closePup(){
this.showEditBlank = false
this.form = {
@@ -497,7 +462,7 @@
}
.nobg{background: transparent;}
.taskTitle {
font-size: 30rpx;
font-size: 36rpx;
margin: 20rpx 0;
}
.newBox {