bug修复
This commit is contained in:
@@ -42,11 +42,18 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="input_box">
|
<view class="input_box">
|
||||||
<uni-forms-item label="" name="content" label-width="0">
|
<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="in">
|
||||||
<view class="uni-textarea">
|
<view class="uni-textarea">
|
||||||
<textarea placeholder-style="font-size:26rpx" v-model="form.content" maxlength="600" auto-height
|
<!-- <textarea placeholder-style="font-size:26rpx" v-model="form.content" maxlength="600" auto-height
|
||||||
placeholder="请输入内容" />
|
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>
|
||||||
</view>
|
</view>
|
||||||
</uni-forms-item>
|
</uni-forms-item>
|
||||||
@@ -94,6 +101,7 @@ import $http from '@/config/requestConfig.js';
|
|||||||
{ value: '0', text: "班内作业",name:"班内作业"},
|
{ value: '0', text: "班内作业",name:"班内作业"},
|
||||||
{ value: '1', text: "班内医案" ,name:"班内医案"},
|
{ value: '1', text: "班内医案" ,name:"班内医案"},
|
||||||
],
|
],
|
||||||
|
readOnly: false,
|
||||||
telError: false,
|
telError: false,
|
||||||
relationError: false,
|
relationError: false,
|
||||||
relationErrorPattern:false,
|
relationErrorPattern:false,
|
||||||
@@ -178,6 +186,30 @@ import $http from '@/config/requestConfig.js';
|
|||||||
},
|
},
|
||||||
//方法
|
//方法
|
||||||
methods: {
|
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){
|
chageType(e){
|
||||||
// console.log('e',e);
|
// console.log('e',e);
|
||||||
if(e == 0){
|
if(e == 0){
|
||||||
@@ -203,6 +235,7 @@ import $http from '@/config/requestConfig.js';
|
|||||||
// that.isHave = true
|
// that.isHave = true
|
||||||
console.log(res)
|
console.log(res)
|
||||||
this.form = res.classTask
|
this.form = res.classTask
|
||||||
|
this.onEditorReady()
|
||||||
this.fileList1 = []
|
this.fileList1 = []
|
||||||
if(this.form.img != ''){
|
if(this.form.img != ''){
|
||||||
var List = this.form.img.split(',')
|
var List = this.form.img.split(',')
|
||||||
@@ -267,8 +300,40 @@ import $http from '@/config/requestConfig.js';
|
|||||||
deletePic(event) {
|
deletePic(event) {
|
||||||
this.fileList1.splice(event.index, 1)
|
this.fileList1.splice(event.index, 1)
|
||||||
},
|
},
|
||||||
onSubmit() {
|
getHtml() {
|
||||||
this.$refs.form.validate().then(res => {
|
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) {
|
if (this.fileList1.length > 0) {
|
||||||
let _list = this.fileList1
|
let _list = this.fileList1
|
||||||
_list = _list.map(item => item.url)
|
_list = _list.map(item => item.url)
|
||||||
|
|||||||
@@ -67,7 +67,7 @@
|
|||||||
<text class="greenScore">A证</text>,
|
<text class="greenScore">A证</text>,
|
||||||
<text class="small_btn border_radius_10 zhengshu">查看证书</text>
|
<text class="small_btn border_radius_10 zhengshu">查看证书</text>
|
||||||
</view> -->
|
</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;"
|
<view class="" style="margin-top: 20rpx; text-align: center;"
|
||||||
v-if="performanceScore.userScore <= 70 && newCLass && newCLass.id">
|
v-if="performanceScore.userScore <= 70 && newCLass && newCLass.id">
|
||||||
<text class="small_btn chongxiu border_radius_10"
|
<text class="small_btn chongxiu border_radius_10"
|
||||||
@@ -1514,7 +1514,7 @@
|
|||||||
if (this.thisClass.state == '3' || this.thisClass.state == '2') {
|
if (this.thisClass.state == '3' || this.thisClass.state == '2') {
|
||||||
// 考试周 结班状态下的
|
// 考试周 结班状态下的
|
||||||
this.students = await this.getStudentScoreList()
|
this.students = await this.getStudentScoreList()
|
||||||
console.log('students', this.students);
|
console.log('students考试周 结班状态下的', this.students);
|
||||||
} else {
|
} else {
|
||||||
this.students = res.result.students
|
this.students = res.result.students
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -116,13 +116,12 @@
|
|||||||
<text>设置班委</text>
|
<text>设置班委</text>
|
||||||
</view>
|
</view>
|
||||||
<!-- && thisClass.showOverBtn -->
|
<!-- && 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'))">
|
v-if="classModel.isExam == 1 && thisClass.state == '3' && (roleCode.includes('1') || roleCode.includes('2'))">
|
||||||
<text>结班</text>
|
<text>结班</text>
|
||||||
</view>
|
</view> -->
|
||||||
|
|
||||||
<view class="item overClass" @click="changeClassStatu('2')"
|
<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>
|
<text>结班</text>
|
||||||
</view>
|
</view>
|
||||||
@@ -1090,25 +1089,26 @@
|
|||||||
}
|
}
|
||||||
this.classModel = res.result.classModel
|
this.classModel = res.result.classModel
|
||||||
// this.thisClass.showOverBtn = false
|
// this.thisClass.showOverBtn = false
|
||||||
if (this.thisClass.state == '1') {
|
// if (this.thisClass.state == '1') {
|
||||||
const nowTime = Date.now()
|
const nowTime = Date.now()
|
||||||
console.log('starting timer...毫秒', nowTime)
|
console.log('starting timer...毫秒', nowTime)
|
||||||
var datecc = new Date(this.thisClass.startTime);
|
var datecc = new Date(this.thisClass.startTime);
|
||||||
console.log('datecc...', datecc)
|
console.log('datecc...', datecc)
|
||||||
var time3 = datecc.getTime(); // 开班时间的时间戳 毫秒
|
var time3 = datecc.getTime(); // 开班时间的时间戳 毫秒
|
||||||
console.log('time3...毫秒', time3, this.classModel.days)
|
console.log('time3...毫秒', time3, this.classModel.days)
|
||||||
var off70 = undefined // 时长过70%显示结班按钮天数
|
// var off70 = undefined // 时长过70%显示结班按钮天数
|
||||||
off70 = Math.ceil(parseInt(this.classModel.days) * 0.7)
|
// off70 = Math.ceil(parseInt(this.classModel.days) * 0.7)
|
||||||
var off70miniSecond = off70 * 1000 * 60 * 60 * 24
|
var off70miniSecond = this.classModel.days * 1000 * 60 * 60 * 24
|
||||||
console.log('时间比较', (off70miniSecond + time3), nowTime)
|
console.log('时间比较', (off70miniSecond + time3), nowTime)
|
||||||
if ((off70miniSecond + time3) <= nowTime) {
|
if ((off70miniSecond + time3) <= nowTime) {
|
||||||
console.log('显示结班按钮');
|
console.log('显示结班按钮');
|
||||||
this.thisClass.showOverBtn = true
|
this.thisClass.showOverBtn = true
|
||||||
} else {
|
} else {
|
||||||
console.log('不显示');
|
console.log('不显示');
|
||||||
|
this.thisClass.showOverBtn = false
|
||||||
}
|
}
|
||||||
console.log('off70...天数', off70, off70miniSecond)
|
// console.log('off70...天数', off70, off70miniSecond)
|
||||||
}
|
// }
|
||||||
|
|
||||||
|
|
||||||
this.thisClass.homeWorkNumber = 4
|
this.thisClass.homeWorkNumber = 4
|
||||||
@@ -1365,6 +1365,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.daikaibtn {
|
.daikaibtn {
|
||||||
|
margin-top: 20rpx; margin-left: 20rpx;
|
||||||
.item {
|
.item {
|
||||||
padding: 10rpx 6rpx;
|
padding: 10rpx 6rpx;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user