JLBA202505130001_关于吉林银行新建AI智能培训系统的需求_fix:还原
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view class="main-div" @click.stop>
|
||||
<view class="main-div" @click.stop="clickHandler">
|
||||
<view class="main-input-div">
|
||||
<!-- 多行文本 -->
|
||||
<view class="input-div">
|
||||
@@ -9,7 +9,7 @@
|
||||
ref="textareaRef"
|
||||
v-model="value"
|
||||
border="none"
|
||||
placeholder="发条评论,和大家一起讨论"
|
||||
:placeholder="placeholder"
|
||||
:customStyle="customStyle"
|
||||
autoHeight
|
||||
:adjustPosition="false"
|
||||
@@ -21,18 +21,33 @@
|
||||
></uv-textarea>
|
||||
</view>
|
||||
|
||||
<view class="num" v-if="isShow">
|
||||
<view class="picture-cont" v-if="isShow && !isReply">
|
||||
<!-- 下方的图片展示框 -->
|
||||
<view class="imgs-div" v-if="!isImg">
|
||||
<image-preview class="upload-img" v-for="item in fileList" :src="item" mode=""></image-preview>
|
||||
</view>
|
||||
<view class="picture" v-if="isImg">
|
||||
<picture-upload :limit="3" v-model="fileList"></picture-upload>
|
||||
<picture-upload :limit="4" v-model="fileList"></picture-upload>
|
||||
<!-- </view> -->
|
||||
</view>
|
||||
<view class="tips font_pf" v-if="isImg">最多可添加3张图片</view>
|
||||
<view class="picture-tips" v-if="isImg">最多可添加4张图片</view>
|
||||
<view class="num-box">
|
||||
<view class="font_pf fz-28 c-666">综合评分</view>
|
||||
<view class="tab" v-if="isShow">
|
||||
<view
|
||||
class="tab-btn"
|
||||
:class="{ 'is-active': bbsTag == 'SUG' }"
|
||||
@click="bbsTag = 'SUG'"
|
||||
>
|
||||
建议
|
||||
</view>
|
||||
<view
|
||||
class="tab-btn"
|
||||
:class="{ 'is-active': bbsTag == 'ASK' }"
|
||||
@click="bbsTag = 'ASK'"
|
||||
>
|
||||
提问
|
||||
</view>
|
||||
</view>
|
||||
<view class="slider-box">
|
||||
<slider
|
||||
:min="0"
|
||||
@@ -42,32 +57,17 @@
|
||||
:step="0.1"
|
||||
:show-value="true"
|
||||
:blockSize="14"
|
||||
class="custom-slider"
|
||||
></slider>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="tab" v-if="isShow">
|
||||
<view
|
||||
class="tab-btn"
|
||||
:class="{ 'is-active': bbsTag == 'SUG' }"
|
||||
@click="bbsTag = 'SUG'"
|
||||
>
|
||||
建议
|
||||
</view>
|
||||
<view
|
||||
class="tab-btn"
|
||||
:class="{ 'is-active': bbsTag == 'ASK' }"
|
||||
@click="bbsTag = 'ASK'"
|
||||
>
|
||||
提问
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 工具框 -->
|
||||
<view class="setting-div" v-if="isShow"></view>
|
||||
<!-- <view class="setting-div" v-if="isShow"></view> -->
|
||||
</view>
|
||||
<view class="tool-div" v-if="isShow">
|
||||
<view class="tool-icon tool-icon-img" @click="upload()">
|
||||
<view class="tool-icon tool-icon-img" @click="upload()" v-if="!isReply">
|
||||
<image class="img" :src="commentInput3" mode="aspectFit"></image>
|
||||
</view>
|
||||
<view class="tool-icon tool-icon-emoji" @click="showKeyborad">
|
||||
@@ -82,7 +82,7 @@
|
||||
<view :class="['tool-icon tool-icon-img checked_tool',currentIndex === 0 ? 'is-active-tool':'']" @click="currentIndex = 0">
|
||||
<image class="img" :src="commentInput1" mode="aspectFit"></image>
|
||||
</view>
|
||||
<view :class="['tool-icon tool-icon-img checked_tool',currentIndex === 1 ? 'is-active-tool':'']" @click="currentIndex = 1">
|
||||
<view v-if="!isReply" :class="['tool-icon tool-icon-img checked_tool',currentIndex === 1 ? 'is-active-tool':'']" @click="currentIndex = 1">
|
||||
<image class="img" :src="commentInput4" mode="aspectFit"></image>
|
||||
</view>
|
||||
<view class="fl1"></view>
|
||||
@@ -96,7 +96,7 @@
|
||||
</view>
|
||||
</scroll-view>
|
||||
</swiper-item>
|
||||
<swiper-item key="2" class="swiper-item">
|
||||
<swiper-item key="2" class="swiper-item" v-if="!isReply">
|
||||
<scroll-view :scroll-y="true" class="img-list">
|
||||
<view class="img-item" v-for="memItem in memList" @click="setMemValue(memItem)">
|
||||
<image-preview class="img_100" :src="memItem.ossAddr" :isCache="true" mode="aspectFill"></image-preview>
|
||||
@@ -113,7 +113,7 @@
|
||||
import commentInput2 from '@/static/images/courseDetail/comment-input-2.png'
|
||||
import commentInput3 from '@/static/images/courseDetail/comment-input-3.png'
|
||||
import commentInput4 from '@/static/images/courseDetail/comment-input-4.png'
|
||||
import { reactive, ref, watch, nextTick } from 'vue';
|
||||
import { reactive, ref, watch, nextTick, computed } from 'vue';
|
||||
import { emojiList } from '@/emoji';
|
||||
import { publishCrsEvaluation, queryTraMemeInfoList } from '@/api/courseDetail.js'
|
||||
import common from '@/common/common.js';
|
||||
@@ -128,7 +128,14 @@
|
||||
}
|
||||
})
|
||||
|
||||
const emit = defineEmits(['submitOver', 'sendReply'])
|
||||
|
||||
const isReply = ref(false)
|
||||
const clickHandler = () => {
|
||||
if(!isShow.value){
|
||||
isReply.value = false
|
||||
}
|
||||
}
|
||||
const customStyle = {
|
||||
backgroundColor: 'rgb(227, 230, 237)',
|
||||
padding: '18rpx'
|
||||
@@ -158,8 +165,17 @@
|
||||
popHeight.value = 'calc(270px + 120rpx)'
|
||||
isShow.value = true
|
||||
console.log('focusevent');
|
||||
getMemList()
|
||||
if(!isReply.value){
|
||||
getMemList()
|
||||
}
|
||||
}
|
||||
const placeholder = computed(()=>{
|
||||
if(isReply.value){
|
||||
return answerData.value.placeholder||'请输入回复信息'
|
||||
}else{
|
||||
return '发条评论,和大家一起讨论'
|
||||
}
|
||||
})
|
||||
const resStart = ref(-1)
|
||||
const blur = (event) => {
|
||||
console.log('失去焦点不一定关闭',event);
|
||||
@@ -168,10 +184,26 @@
|
||||
isShow.value = true
|
||||
isFocus.value = false
|
||||
}
|
||||
const hideAll = () => {
|
||||
const hideAll = (flag=false) => {
|
||||
popHeight.value = '0px'
|
||||
console.log('hideAll');
|
||||
isShow.value = false
|
||||
isFocus.value = false
|
||||
if(flag){
|
||||
value.value = ''
|
||||
fileList.value = []
|
||||
}
|
||||
}
|
||||
const answerData = ref({})
|
||||
const resetVal = (data={} , $isReply = true) => {
|
||||
value.value = ''
|
||||
fileList.value = []
|
||||
isReply.value = $isReply
|
||||
answerData.value = data || {}
|
||||
if($isReply){
|
||||
focus()
|
||||
// showKeyborad()
|
||||
}
|
||||
}
|
||||
const insertValue = (emojiItem) => {
|
||||
let _val = value.value
|
||||
@@ -182,7 +214,7 @@
|
||||
const bbsTag = ref('SUG')
|
||||
// 方法
|
||||
|
||||
const uploadNow = (limit = 3) => {
|
||||
const uploadNow = (limit = 4) => {
|
||||
if(!isImg.value){
|
||||
upload(limit)
|
||||
}else{
|
||||
@@ -193,7 +225,7 @@
|
||||
});
|
||||
}
|
||||
}
|
||||
const upload = (limit = 3) => {
|
||||
const upload = (limit = 4) => {
|
||||
uni.chooseImage({
|
||||
count: limit,
|
||||
sizeType: ['original', 'compressed'],
|
||||
@@ -246,6 +278,10 @@
|
||||
}
|
||||
|
||||
const submit = () => {
|
||||
if(isReply.value){
|
||||
reply_send()
|
||||
return
|
||||
}
|
||||
if (value.value === '') {
|
||||
if (bbsTag.value === 'SUG') {
|
||||
return common.msg('请输入你的建议');
|
||||
@@ -275,6 +311,9 @@
|
||||
setTimeout(() => {
|
||||
uni.$emit('refresh_comment_data');
|
||||
hideAll()
|
||||
value.value = ''
|
||||
fileList.value = []
|
||||
emit('submitOver')
|
||||
if (from.value === 'study') {
|
||||
} else {
|
||||
}
|
||||
@@ -284,6 +323,9 @@
|
||||
console.log(err)
|
||||
})
|
||||
};
|
||||
const reply_send = async () => {
|
||||
emit('sendReply', {...answerData.value, bbsContent: value.value})
|
||||
};
|
||||
const bbsGrade = ref(10)
|
||||
const sliderChange = (event) => {
|
||||
bbsGrade.value = event.detail.value;
|
||||
@@ -293,7 +335,7 @@
|
||||
isImg.value = true
|
||||
}
|
||||
})
|
||||
defineExpose({hideAll})
|
||||
defineExpose({hideAll, resetVal})
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
@@ -469,30 +511,53 @@
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.num-box {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
// height: 100%;
|
||||
justify-content: space-between;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.tab-btn {
|
||||
width: 78rpx;
|
||||
height: 36rpx;
|
||||
font-size: 22rpx;
|
||||
color: #999999;
|
||||
text-align: center;
|
||||
border-radius: 8rpx;
|
||||
border: 2rpx solid #999999;
|
||||
margin-right: 30rpx;
|
||||
&.is-active {
|
||||
color: #0066ff;
|
||||
border: 2rpx solid #0066ff;
|
||||
}
|
||||
}
|
||||
.img-show{
|
||||
width: 120rpx;
|
||||
height: 120rpx;
|
||||
}
|
||||
.picture-cont{
|
||||
padding: 0 16rpx;
|
||||
}
|
||||
.picture-tips{
|
||||
color: #999;
|
||||
font-size: 22rpx;
|
||||
padding: 10rpx 0;
|
||||
}
|
||||
.num-box{
|
||||
overflow: hidden;
|
||||
height: 60rpx;
|
||||
// padding-bottom: 30rpx;
|
||||
.tab{
|
||||
float: left;
|
||||
width: 200rpx;
|
||||
overflow: hidden;
|
||||
height: 40rpx;
|
||||
.tab-btn{
|
||||
float: left;
|
||||
width: 78rpx;
|
||||
height: 36rpx;
|
||||
font-size: 22rpx;
|
||||
color: #999999;
|
||||
text-align: center;
|
||||
border-radius: 8rpx;
|
||||
border: 2rpx solid #999999;
|
||||
&:not(:last-child){
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
&.is-active {
|
||||
color: #0066ff;
|
||||
border: 2rpx solid #0066ff;
|
||||
}
|
||||
}
|
||||
}
|
||||
.slider-box{
|
||||
width: calc(100% - 200rpx);
|
||||
float: left;
|
||||
box-sizing: border-box;
|
||||
// padding-left: 40rpx;
|
||||
.custom-slider{
|
||||
margin: 0 !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user