暂存
This commit is contained in:
@@ -2,26 +2,26 @@
|
||||
<view style="min-height: calc(100vh - 120rpx); background-color: #ebf2f5;">
|
||||
<z-nav-bar :title="pageName"></z-nav-bar>
|
||||
<view class="pad20">
|
||||
|
||||
|
||||
<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>
|
||||
</view>
|
||||
</view>
|
||||
<view class="leve2">
|
||||
{{item.content}}
|
||||
</view>
|
||||
{{item.content}}
|
||||
</view>
|
||||
<view class="leve3">
|
||||
<view class="score" v-if="item.scoreSuccess == 1">
|
||||
分数:{{item.score}}
|
||||
</view>
|
||||
<view class="score noscore" v-else>未评分</view>
|
||||
<view class="date">
|
||||
{{item.createTime}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="score" v-if="item.scoreSuccess == 1">
|
||||
分数:{{item.score}}
|
||||
</view>
|
||||
<view class="score noscore" v-else>未评分</view>
|
||||
<view class="date">
|
||||
{{item.createTime}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -30,13 +30,14 @@
|
||||
<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="" z-index="998" overlay-style="z-index:998">
|
||||
<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>
|
||||
<view class="" style="border-bottom: 1px solid #eee; padding-bottom: 20rpx; margin-bottom: 20rpx;">
|
||||
<view class="anserContent" v-html="curReplay.content">
|
||||
|
||||
|
||||
</view>
|
||||
<view class="图片">
|
||||
<view class="imgBox flex_box" v-if="fileList1.length > 0">
|
||||
@@ -52,7 +53,7 @@
|
||||
<view class="" v-if="curReplay.createUser" style="color: #999;padding: 10rpx 0;">
|
||||
学员信息:{{curReplay.createUser.nickname != null && curReplay.createUser.nickname != '' ? curReplay.createUser.nickname : '匿名用户'}}
|
||||
/ {{curReplay.createUser.tel}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="score" v-show="curReplay.scoreSuccess == 1">
|
||||
分数:{{curReplay.score}}
|
||||
</view>
|
||||
@@ -60,13 +61,15 @@
|
||||
未生成成绩
|
||||
</view>
|
||||
<!-- -->
|
||||
<template v-if="roleCode.includes('4') && curReplay.scoreSuccess != 1 || roleCode.includes('5') && curReplay.scoreSuccess != 1 ">
|
||||
<template
|
||||
v-if="roleCode.includes('4') && curReplay.scoreSuccess != 1 || roleCode.includes('5') && curReplay.scoreSuccess != 1 && (classState == '1' || classState == '3')">
|
||||
<view class="" style=" padding: 10rpx 10rpx; margin-top: 20rpx;">
|
||||
<view class="scoreBox flex_box">
|
||||
<text>分数</text>
|
||||
<text v-for="(item, index) in scoreList" @click="setScore(item)" :class="[item == form.score ?'active' : '' ]">
|
||||
{{item}} 分
|
||||
</text>
|
||||
<text v-for="(item, index) in scoreList" @click="setScore(item)"
|
||||
:class="[item == form.score ?'active' : '' ]">
|
||||
{{item}} 分
|
||||
</text>
|
||||
</view>
|
||||
<!-- <uni-forms :modelValue="form" :rules="rules" ref="form">
|
||||
<uni-forms-item label="分数" name="score" >
|
||||
@@ -84,8 +87,8 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import $http from '@/config/requestConfig.js';
|
||||
// const taskLIst1 = require('@/data/taskList.json')
|
||||
import $http from '@/config/requestConfig.js';
|
||||
// const taskLIst1 = require('@/data/taskList.json')
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
@@ -96,9 +99,9 @@
|
||||
loadFlag: false,
|
||||
pageName: '',
|
||||
taskList: [],
|
||||
fileList1:[],
|
||||
scoreList:[
|
||||
0,0.5,1,1.5,2,2.5
|
||||
fileList1: [],
|
||||
scoreList: [
|
||||
0, 0.5, 1, 1.5, 2, 2.5
|
||||
],
|
||||
rules: {
|
||||
score: {
|
||||
@@ -106,27 +109,29 @@
|
||||
required: true,
|
||||
errorMessage: '请输入分数',
|
||||
}
|
||||
|
||||
|
||||
]
|
||||
},
|
||||
|
||||
|
||||
},
|
||||
roleCode:'',
|
||||
showEditBlank:false,
|
||||
curReplay:{},
|
||||
form: {
|
||||
score: undefined, //分数
|
||||
id: undefined,
|
||||
},
|
||||
// ispreviewImage :false,
|
||||
roleCode: '',
|
||||
showEditBlank: false,
|
||||
curReplay: {},
|
||||
form: {
|
||||
score: undefined, //分数
|
||||
id: undefined,
|
||||
},
|
||||
classState : undefined
|
||||
// ispreviewImage :false,
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
console.log('e',e);
|
||||
console.log('e', e);
|
||||
this.classId = e.classId
|
||||
this.pageType = e.type
|
||||
this.roleCode = e.roleCode
|
||||
this.roleCode = e.roleCode
|
||||
this.pageName = '心得列表'
|
||||
this.classState = e.classState
|
||||
this.getList()
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
@@ -150,52 +155,52 @@
|
||||
// onBackPress() {
|
||||
// },
|
||||
methods: {
|
||||
setScore(val){
|
||||
setScore(val) {
|
||||
// if(this.form.score == val) return
|
||||
this.form.score = val
|
||||
},
|
||||
onSubmit() {
|
||||
// this.$refs.form.validate().then(res => {
|
||||
if(!this.form.score && this.form.score != 0){
|
||||
if (!this.form.score && this.form.score != 0) {
|
||||
uni.showToast({
|
||||
title: '请选择分值',
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
var _url = "common/class/editTaskScore"
|
||||
var data = {
|
||||
"score": this.form.score,
|
||||
"taskId": this.form.id
|
||||
|
||||
}
|
||||
console.log('data后台提交数据', data);
|
||||
$http.request({
|
||||
url: _url,
|
||||
method: "POST",
|
||||
data,
|
||||
header: { //默认 无 说明:请求头
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
})
|
||||
.then(res => {
|
||||
uni.showToast({
|
||||
title:'请选择分值',
|
||||
icon:'none'
|
||||
title: '操作成功!',
|
||||
icon: 'success'
|
||||
})
|
||||
return
|
||||
}
|
||||
var _url = "common/class/editTaskScore"
|
||||
var data = {
|
||||
"score": this.form.score,
|
||||
"taskId": this.form.id
|
||||
|
||||
}
|
||||
console.log('data后台提交数据', data);
|
||||
$http.request({
|
||||
url: _url,
|
||||
method: "POST",
|
||||
data,
|
||||
header: { //默认 无 说明:请求头
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
setTimeout(() => {
|
||||
this.pPage = 0
|
||||
this.taskList = []
|
||||
this.getList()
|
||||
this.closePup()
|
||||
}, 1000)
|
||||
|
||||
}).catch(e => {
|
||||
uni.showToast({
|
||||
title: '操作失败',
|
||||
icon: 'error'
|
||||
})
|
||||
.then(res => {
|
||||
uni.showToast({
|
||||
title: '操作成功!',
|
||||
icon: 'success'
|
||||
})
|
||||
setTimeout(()=>{
|
||||
this.pPage = 0
|
||||
this.taskList = []
|
||||
this.getList()
|
||||
this.closePup()
|
||||
},1000)
|
||||
|
||||
}).catch(e => {
|
||||
uni.showToast({
|
||||
title: '操作失败',
|
||||
icon: 'error'
|
||||
})
|
||||
});
|
||||
});
|
||||
// }).catch(err => {
|
||||
// console.log('表单错误信息:', err);
|
||||
// uni.showToast({
|
||||
@@ -222,31 +227,35 @@
|
||||
this.showEditBlank = false
|
||||
this.form = {
|
||||
score: undefined,
|
||||
id: undefined,
|
||||
id: undefined,
|
||||
}
|
||||
this.curReplay = {}
|
||||
this.fileList1 = []
|
||||
console.log('this.fileList1',this.fileList1);
|
||||
console.log('this.fileList1', this.fileList1);
|
||||
// setTimeout(()=>{
|
||||
// this.pPage = 0
|
||||
// this.taskList = []
|
||||
// this.getList()
|
||||
// },1000)
|
||||
},
|
||||
clickTask(item){
|
||||
},
|
||||
clickTask(item) {
|
||||
// console.log('item',item);
|
||||
this.curReplay = item
|
||||
this.form = {...item}
|
||||
if(this.form.scoreSuccess == 0){
|
||||
this.form.score = undefined
|
||||
}
|
||||
if(item.img != ''){
|
||||
var _list = item.img.split(',')
|
||||
_list.forEach( item => {
|
||||
this.fileList1.push({url:item})
|
||||
this.curReplay = item
|
||||
this.form = {
|
||||
...item
|
||||
}
|
||||
if (this.form.scoreSuccess == 0) {
|
||||
this.form.score = undefined
|
||||
}
|
||||
if (item.img != '') {
|
||||
var _list = item.img.split(',')
|
||||
_list.forEach(item => {
|
||||
this.fileList1.push({
|
||||
url: item
|
||||
})
|
||||
}
|
||||
this.showEditBlank = true
|
||||
})
|
||||
}
|
||||
this.showEditBlank = true
|
||||
},
|
||||
getList() {
|
||||
this.status = 1;
|
||||
@@ -325,8 +334,8 @@
|
||||
/* #endif */
|
||||
flex: 1
|
||||
}
|
||||
|
||||
.anserBox {
|
||||
|
||||
.anserBox {
|
||||
border: 4rpx dotted #2bb447;
|
||||
margin-top: 30rpx;
|
||||
padding: 20rpx;
|
||||
@@ -334,20 +343,28 @@
|
||||
border-radius: 20rpx;
|
||||
overflow: hidden;
|
||||
padding-top: 0;
|
||||
|
||||
.imgBox {
|
||||
flex-wrap: wrap;
|
||||
|
||||
|
||||
.item {
|
||||
width: 20%;
|
||||
margin-right: 10rpx;
|
||||
border: 1px solid #eee;
|
||||
padding: 0 !important;
|
||||
|
||||
image {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
.anserContent{line-height: 50rpx; padding: 20rpx 0; display: block;}
|
||||
|
||||
.anserContent {
|
||||
line-height: 50rpx;
|
||||
padding: 20rpx 0;
|
||||
display: block;
|
||||
}
|
||||
|
||||
h3 {
|
||||
line-height: 80rpx;
|
||||
width: 50%;
|
||||
@@ -358,15 +375,33 @@
|
||||
border-radius: 0 0 20rpx 20rpx;
|
||||
}
|
||||
}
|
||||
.scoreBox{
|
||||
text{display: inline-block; font-size: 26rpx; width: 100%; border: 1px solid #ddd; text-align: center; line-height:60rpx; border-right: none;}
|
||||
text:last-child{border-right: 1px solid #ddd;}
|
||||
text.active{background-color: #55aaff; color: #fff; border-color: #55aaff;}
|
||||
|
||||
.scoreBox {
|
||||
text {
|
||||
display: inline-block;
|
||||
font-size: 26rpx;
|
||||
width: 100%;
|
||||
border: 1px solid #ddd;
|
||||
text-align: center;
|
||||
line-height: 60rpx;
|
||||
border-right: none;
|
||||
}
|
||||
|
||||
text:last-child {
|
||||
border-right: 1px solid #ddd;
|
||||
}
|
||||
|
||||
text.active {
|
||||
background-color: #55aaff;
|
||||
color: #fff;
|
||||
border-color: #55aaff;
|
||||
}
|
||||
}
|
||||
|
||||
.btn_box {
|
||||
margin-top: 70rpx;
|
||||
padding-bottom: 20rpx;
|
||||
|
||||
|
||||
button {
|
||||
font-size: 32rpx;
|
||||
@include theme('btn_bg') color: #fff;
|
||||
@@ -375,10 +410,27 @@
|
||||
border-radius: 50rpx;
|
||||
}
|
||||
}
|
||||
::v-deep .uni-forms-item{margin-bottom: 0 !important;}
|
||||
.date {font-size: 26rpx; color: #999;}
|
||||
.score{color: #55aaff; font-size: 30rpx !important; font-weight: bold;;}
|
||||
.noscore{color: #ffaa7f;}
|
||||
|
||||
::v-deep .uni-forms-item {
|
||||
margin-bottom: 0 !important;
|
||||
}
|
||||
|
||||
.date {
|
||||
font-size: 26rpx;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.score {
|
||||
color: #55aaff;
|
||||
font-size: 30rpx !important;
|
||||
font-weight: bold;
|
||||
;
|
||||
}
|
||||
|
||||
.noscore {
|
||||
color: #ffaa7f;
|
||||
}
|
||||
|
||||
.submitRecode {
|
||||
// padding: 20rpx;
|
||||
|
||||
@@ -399,29 +451,47 @@
|
||||
box-shadow: none !important;
|
||||
// border-bottom: 1px solid #eee;
|
||||
border-radius: 20rpx;
|
||||
padding: 20rpx ;
|
||||
padding: 20rpx;
|
||||
margin-bottom: 20rpx;
|
||||
|
||||
.leve1 {
|
||||
align-items: center;
|
||||
|
||||
|
||||
border-bottom: 1px dashed #eee;
|
||||
padding-bottom: 20rpx;
|
||||
margin-bottom: 20rpx;
|
||||
// .userName{}
|
||||
}
|
||||
|
||||
.leve2 { justify-content: space-between;
|
||||
color: #666; font-size: 28rpx; line-height: 50rpx;
|
||||
@include bov(3);
|
||||
.item{text-align: center; padding-top: 0; padding-bottom: 0; margin-bottom: 0;}
|
||||
.leve2 {
|
||||
justify-content: space-between;
|
||||
color: #666;
|
||||
font-size: 28rpx;
|
||||
line-height: 50rpx;
|
||||
@include bov(3);
|
||||
|
||||
.item {
|
||||
text-align: center;
|
||||
padding-top: 0;
|
||||
padding-bottom: 0;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.leve3 { overflow: hidden;
|
||||
.leve3 {
|
||||
overflow: hidden;
|
||||
color: #999;
|
||||
text-align: center;
|
||||
padding-top: 10rpx;
|
||||
.score{float: left;}
|
||||
.date{float: right;}
|
||||
|
||||
.score {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.date {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.tips {
|
||||
width: 100%;
|
||||
justify-content: space-between;
|
||||
@@ -429,7 +499,7 @@
|
||||
color: #999;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
.btn {
|
||||
border: 1px solid $themeColor;
|
||||
|
||||
Reference in New Issue
Block a user