bug修复
This commit is contained in:
@@ -42,11 +42,18 @@
|
||||
</view>
|
||||
<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>
|
||||
<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="请输入内容" />
|
||||
<!-- <textarea placeholder-style="font-size:26rpx" v-model="form.content" maxlength="600" auto-height
|
||||
placeholder="请输入内容" /> -->
|
||||
<view class="editor-wrapper">
|
||||
<editor id="editor" class="ql-container" placeholder="请输入内容..."
|
||||
show-img-size show-img-toolbar show-img-resize
|
||||
@statuschange="onStatusChange" :read-only="readOnly"
|
||||
@ready="onEditorReady">
|
||||
</editor>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</uni-forms-item>
|
||||
@@ -94,6 +101,7 @@ import $http from '@/config/requestConfig.js';
|
||||
{ value: '0', text: "班内作业",name:"班内作业"},
|
||||
{ value: '1', text: "班内医案" ,name:"班内医案"},
|
||||
],
|
||||
readOnly: false,
|
||||
telError: false,
|
||||
relationError: false,
|
||||
relationErrorPattern:false,
|
||||
@@ -178,6 +186,30 @@ import $http from '@/config/requestConfig.js';
|
||||
},
|
||||
//方法
|
||||
methods: {
|
||||
readOnlyChange() {
|
||||
this.readOnly = !this.readOnly
|
||||
},
|
||||
onEditorReady() {
|
||||
// #ifdef APP-PLUS || MP-WEIXIN || H5
|
||||
uni.createSelectorQuery().select('#editor').context((res) => {
|
||||
this.editorCtx = res.context
|
||||
if (this.form.content == '') return
|
||||
res.context.setContents({
|
||||
html: this.form.content
|
||||
})
|
||||
}).exec()
|
||||
// #endif
|
||||
},
|
||||
undo() {
|
||||
this.editorCtx.undo()
|
||||
},
|
||||
redo() {
|
||||
this.editorCtx.redo()
|
||||
},
|
||||
onStatusChange(e) {
|
||||
const formats = e.detail
|
||||
this.formats = formats
|
||||
},
|
||||
chageType(e){
|
||||
// console.log('e',e);
|
||||
if(e == 0){
|
||||
@@ -203,6 +235,7 @@ import $http from '@/config/requestConfig.js';
|
||||
// that.isHave = true
|
||||
console.log(res)
|
||||
this.form = res.classTask
|
||||
this.onEditorReady()
|
||||
this.fileList1 = []
|
||||
if(this.form.img != ''){
|
||||
var List = this.form.img.split(',')
|
||||
@@ -267,8 +300,40 @@ import $http from '@/config/requestConfig.js';
|
||||
deletePic(event) {
|
||||
this.fileList1.splice(event.index, 1)
|
||||
},
|
||||
onSubmit() {
|
||||
this.$refs.form.validate().then(res => {
|
||||
getHtml() {
|
||||
return new Promise((resolve, reject) => {
|
||||
this.editorCtx.getContents({
|
||||
success: (res) => {
|
||||
resolve(res);
|
||||
},
|
||||
fail: (error) => {
|
||||
reject(err);
|
||||
},
|
||||
});
|
||||
});
|
||||
},
|
||||
async onSubmit() {
|
||||
let data = await this.getHtml();
|
||||
var _data = data.html.replace(/<.*?>/g, "")
|
||||
if (!_data || _data == '') {
|
||||
uni.showToast({
|
||||
title: '请输入主要内容',
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
this.form.content = data.html
|
||||
this.$refs.form.validate().then(async res => {
|
||||
let data = await this.getHtml();
|
||||
var _data = data.html.replace(/<.*?>/g, "")
|
||||
if (!_data || _data == '') {
|
||||
uni.showToast({
|
||||
title: '请输入主要内容',
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
this.form.content = data.html
|
||||
if (this.fileList1.length > 0) {
|
||||
let _list = this.fileList1
|
||||
_list = _list.map(item => item.url)
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
<text class="greenScore">A证</text>,
|
||||
<text class="small_btn border_radius_10 zhengshu">查看证书</text>
|
||||
</view> -->
|
||||
<view style="margin-top: 20rpx; text-align: center;">很遗憾,您的成绩未达标</view>
|
||||
<!-- <view style="margin-top: 20rpx; text-align: center;">很遗憾,您的成绩未达标</view> -->
|
||||
<view class="" style="margin-top: 20rpx; text-align: center;"
|
||||
v-if="performanceScore.userScore <= 70 && newCLass && newCLass.id">
|
||||
<text class="small_btn chongxiu border_radius_10"
|
||||
@@ -1514,7 +1514,7 @@
|
||||
if (this.thisClass.state == '3' || this.thisClass.state == '2') {
|
||||
// 考试周 结班状态下的
|
||||
this.students = await this.getStudentScoreList()
|
||||
console.log('students', this.students);
|
||||
console.log('students考试周 结班状态下的', this.students);
|
||||
} else {
|
||||
this.students = res.result.students
|
||||
}
|
||||
|
||||
@@ -116,13 +116,12 @@
|
||||
<text>设置班委</text>
|
||||
</view>
|
||||
<!-- && thisClass.showOverBtn -->
|
||||
<view class="item overClass" @click="changeClassStatu('2')"
|
||||
<!-- <view class="item overClass" @click="changeClassStatu('2')"
|
||||
v-if="classModel.isExam == 1 && thisClass.state == '3' && (roleCode.includes('1') || roleCode.includes('2'))">
|
||||
<text>结班</text>
|
||||
</view>
|
||||
|
||||
</view> -->
|
||||
<view class="item overClass" @click="changeClassStatu('2')"
|
||||
v-if="classModel.isExam == 0 && thisClass.state == '1' && thisClass.showOverBtn && (roleCode.includes('1') || roleCode.includes('2'))">
|
||||
v-if="thisClass.showOverBtn && (roleCode.includes('1') || roleCode.includes('2'))">
|
||||
<!-- (无考试) -->
|
||||
<text>结班</text>
|
||||
</view>
|
||||
@@ -1090,25 +1089,26 @@
|
||||
}
|
||||
this.classModel = res.result.classModel
|
||||
// this.thisClass.showOverBtn = false
|
||||
if (this.thisClass.state == '1') {
|
||||
// if (this.thisClass.state == '1') {
|
||||
const nowTime = Date.now()
|
||||
console.log('starting timer...毫秒', nowTime)
|
||||
var datecc = new Date(this.thisClass.startTime);
|
||||
console.log('datecc...', datecc)
|
||||
var time3 = datecc.getTime(); // 开班时间的时间戳 毫秒
|
||||
console.log('time3...毫秒', time3, this.classModel.days)
|
||||
var off70 = undefined // 时长过70%显示结班按钮天数
|
||||
off70 = Math.ceil(parseInt(this.classModel.days) * 0.7)
|
||||
var off70miniSecond = off70 * 1000 * 60 * 60 * 24
|
||||
// var off70 = undefined // 时长过70%显示结班按钮天数
|
||||
// off70 = Math.ceil(parseInt(this.classModel.days) * 0.7)
|
||||
var off70miniSecond = this.classModel.days * 1000 * 60 * 60 * 24
|
||||
console.log('时间比较', (off70miniSecond + time3), nowTime)
|
||||
if ((off70miniSecond + time3) <= nowTime) {
|
||||
console.log('显示结班按钮');
|
||||
this.thisClass.showOverBtn = true
|
||||
} else {
|
||||
console.log('不显示');
|
||||
this.thisClass.showOverBtn = false
|
||||
}
|
||||
console.log('off70...天数', off70, off70miniSecond)
|
||||
}
|
||||
// console.log('off70...天数', off70, off70miniSecond)
|
||||
// }
|
||||
|
||||
|
||||
this.thisClass.homeWorkNumber = 4
|
||||
@@ -1365,6 +1365,7 @@
|
||||
}
|
||||
|
||||
.daikaibtn {
|
||||
margin-top: 20rpx; margin-left: 20rpx;
|
||||
.item {
|
||||
padding: 10rpx 6rpx;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user