JLBA202505130001_关于吉林银行新建AI智能培训系统的需求_fix: bug

This commit is contained in:
杨航
2026-03-23 17:45:22 +08:00
parent d23ed6ac2e
commit 8b68bfbe46
2 changed files with 152 additions and 120 deletions
+75 -45
View File
@@ -3,22 +3,9 @@
<view class="main-input-div">
<!-- 多行文本 -->
<view class="input-div">
<uv-textarea
class="textarea"
:class="{'margin-bottom-12':isShow}"
ref="textareaRef"
v-model="value"
border="none"
:placeholder="placeholder"
:customStyle="customStyle"
autoHeight
:adjustPosition="false"
fixed
:focus="isFocus"
:cursor="cursorLength"
@focus="focus"
@blur="blur"
></uv-textarea>
<uv-textarea class="textarea" :class="{'margin-bottom-12':isShow}" ref="textareaRef" v-model="value"
border="none" :placeholder="placeholder" :customStyle="customStyle" autoHeight :adjustPosition="false" fixed
:focus="isFocus" :cursor="cursorLength" @focus="focus" @blur="blur"></uv-textarea>
</view>
<view class="picture-cont" v-if="isShow && !isReply">
@@ -33,32 +20,16 @@
<view class="picture-tips" v-if="isImg">最多可添加4张图片</view>
<view class="num-box">
<view class="tab" v-if="isShow">
<view
class="tab-btn"
:class="{ 'is-active': bbsTag == 'SUG' }"
@click="bbsTag = 'SUG'"
>
<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 class="tab-btn" :class="{ 'is-active': bbsTag == 'ASK' }" @click="bbsTag = 'ASK'">
提问
</view>
</view>
<view class="slider-box">
<slider
:min="0"
:max="10"
:value="10"
@change="sliderChange"
:step="0.1"
:show-value="true"
:blockSize="14"
class="custom-slider"
></slider>
<slider :min="0" :max="10" :value="10" @change="sliderChange" :step="0.1" :show-value="true" :blockSize="14"
class="custom-slider"></slider>
</view>
</view>
</view>
@@ -82,16 +53,18 @@
<!-- 下方主要表情输入框 -->
<view class="bottom-main-input-div">
<view class="expression-tool-div">
<view :class="['tool-icon tool-icon-img checked_tool',currentIndex === 0 ? 'is-active-tool':'']" @click="currentIndex = 0">
<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 v-if="!isReply" :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>
</view>
<swiper class="stack-swiper" :current="currentIndex" previous-margin="0"
next-margin="0" :autoplay="false" @change="changeCurrent">
<swiper class="stack-swiper" :current="currentIndex" previous-margin="0" next-margin="0" :autoplay="false"
@change="changeCurrent">
<swiper-item key="1" class="swiper-item">
<scroll-view :scroll-y="true" class="emoji-list">
<view class="emoji-item" v-for="emojiItem in emojiList" @click="insertValue(emojiItem)">
@@ -116,9 +89,21 @@
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, computed, onBeforeUnmount } from 'vue';
import { emojiList } from '@/emoji';
import { publishCrsEvaluation, queryTraMemeInfoList } from '@/api/courseDetail.js'
import {
reactive,
ref,
watch,
nextTick,
computed,
onBeforeUnmount
} from 'vue';
import {
emojiList
} from '@/emoji';
import {
publishCrsEvaluation,
queryTraMemeInfoList
} from '@/api/courseDetail.js'
import common from '@/common/common.js';
import {
uploadFile
@@ -196,6 +181,7 @@
popHeight.value = '0px'
isShow.value = false
isFocus.value = false
isReply.value = false
if (flag) {
value.value = ''
fileList.value = []
@@ -323,7 +309,10 @@
}).catch(err => {})
};
const reply_send = async () => {
emit('sendReply', {...answerData.value, bbsContent: value.value})
emit('sendReply', {
...answerData.value,
bbsContent: value.value
})
};
const bbsGrade = ref(10)
const sliderChange = (event) => {
@@ -349,13 +338,17 @@
watch(() => keyboardHeight.value, (val) => {
popHeight.value = showEmoji.value ? `${maxKeyboardHeight.value}px` : keyboardHeight.value + 'px'
})
defineExpose({hideAll, resetVal})
defineExpose({
hideAll,
resetVal
})
</script>
<style scoped lang="scss">
.stack-swiper {
height: 270px;
}
.img-list {
box-sizing: border-box;
margin: 0 auto;
@@ -363,20 +356,24 @@
overflow-y: auto;
padding: 0 14rpx;
width: 100%;
.img-item {
float: left;
width: 126rpx;
text-align: center;
&:not(:nth-child(5n)) {
margin-right: 20rpx;
}
}
.img_100 {
width: 126rpx;
height: 126rpx;
display: inline-block;
}
}
.emoji-list {
box-sizing: border-box;
margin: 0 auto;
@@ -384,6 +381,7 @@
overflow-y: auto;
padding: 0 14rpx;
width: 100%;
.emoji-item {
font-size: 44rpx;
// padding: 14rpx;
@@ -394,12 +392,14 @@
line-height: 90rpx;
}
}
// 表情输入框
.expression-tool-div {
padding: 20rpx 10rpx;
display: flex;
align-items: center;
height: 120rpx;
.tool-icon {
display: flex;
align-items: center;
@@ -407,52 +407,64 @@
padding: 14rpx 28rpx;
border-radius: 60rpx;
margin: 0rpx 10rpx;
.img {
width: 50rpx;
height: 50rpx;
}
}
.checked_tool {
background-color: rgb(243, 243, 243);
&.is-active-tool {
background-color: #ddd;
}
}
}
.bottom-main-input-div {
width: 100%;
height: v-bind(popHeight);
transition: height 0.3s ease 0s;
}
.none {
display: none;
}
.margin-bottom-12 {
margin-bottom: 12rpx;
}
.tool-div {
padding: 10rpx calc(18rpx + 20rpx);
display: flex;
align-items: center;
.tool-icon {
// padding: 14rpx 34rpx;
// border-radius: 60rpx;
// margin: 0rpx 10rpx;
}
.tool-icon-img {
display: flex;
align-items: center;
margin-right: 30rpx;
.img {
width: 50rpx;
height: 50rpx;
}
}
.tool-icon-emoji {
display: flex;
align-items: center;
.img {
width: 50rpx;
height: 50rpx;
@@ -469,12 +481,14 @@
font-size: 30rpx;
color: #fff;
margin-right: 20rpx;
&.is-disabled {
background-color: #ccc;
// pointer-events: none;
}
}
}
.main-div {
position: fixed;
bottom: 0;
@@ -484,6 +498,7 @@
border-top: 2rpx solid rgb(220, 220, 220);
box-shadow: 0 -2rpx 20rpx rgb(220, 220, 220);
}
.main-input-div {
width: calc(100% - 40rpx);
margin: 20rpx;
@@ -493,13 +508,16 @@
border-radius: 40rpx;
overflow: hidden;
background-color: rgb(227, 230, 237);
.input-div {
width: 100%;
padding: 0;
}
.imgs-div {
display: flex;
padding: 0 18rpx;
.upload-img {
margin: 0rpx 20rpx 20rpx 0;
width: 120rpx;
@@ -507,15 +525,18 @@
border-radius: 12rpx;
}
}
.setting-div {
width: 100%;
height: 100rpx;
padding: 0 18rpx;
}
}
.tool-div {
border-bottom: 4rpx solid rgb(206, 206, 206);
}
.textarea {
padding: 14rpx;
}
@@ -533,23 +554,28 @@
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;
@@ -559,19 +585,23 @@
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;
+2
View File
@@ -115,6 +115,7 @@
isPlaying.value = true
if (talkVoiceObj.value && talkVoiceObj.value.src) {
console.log(1, talkVoiceObj.value.src)
talkVoiceObj.value.seek(0);
setTimeout(() => {
talkVoiceObj.value.play()
}, 100)
@@ -135,6 +136,7 @@
itemVoice.value = url;
talkVoiceObj.value.src = url;
if (unref(dataInfo)?.id !== props.activeVoiceId) return
talkVoiceObj.value.seek(0);
talkVoiceObj.value.play();
} else {
downloadFile(unref(dataInfo).bucketKey)