JLBA202505130001_关于吉林银行新建AI智能培训系统的需求_开发语音采集uts插件

This commit is contained in:
田岩
2026-02-09 14:06:53 +08:00
parent ff0f104e37
commit da77f3fd40
39 changed files with 1225 additions and 662 deletions
@@ -0,0 +1,242 @@
<template>
<view class="main-div">
<view class="main-input-div">
<!-- 多行文本 -->
<view class="input-div">
<uv-textarea
class="textarea"
:class="{'margin-bottom-12':isShow}"
v-model="value"
border="none"
placeholder="发条评论,和大家一起讨论"
:customStyle="customStyle"
autoHeight
:adjustPosition="false"
fixed
@focus="focus"
@blur="blur"
></uv-textarea>
</view>
<!-- 下方的图片展示框 -->
<view class="imgs-div" v-if="isShow">
<image class="upload-img" v-for="imgItem in uploadImgs" :src="imgItem" mode=""></image>
</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">
<image class="img" :src="commentInput3" mode="aspectFit"></image>
</view>
<view class="tool-icon tool-icon-emoji">
<image class="img" :src="commentInput2" mode="aspectFit"></image>
</view>
<view class="fl1"></view>
<view class="tool-send">发送</view>
</view>
<!-- 下方主要表情输入框 -->
<view class="bottom-main-input-div">
<view class="expression-tool-div">
<view class="tool-icon tool-icon-img checked_tool" @click="upload">
<image class="img" :src="commentInput1" mode="aspectFit"></image>
</view>
<view class="tool-icon tool-icon-emoji checked_tool">
<image class="img" :src="commentInput4" mode="aspectFit"></image>
</view>
<view class="fl1"></view>
</view>
<view class="emoji-list">
<view class="emoji-item" v-for="emojiItem in emojiList">
{{emojiItem}}
</view>
</view>
</view>
</view>
</template>
<script setup>
import commentInput1 from '@/static/images/courseDetail/comment-input-1.png'
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 } from 'vue';
import { emojiList } from '@/emoji';
const customStyle = {
backgroundColor: 'rgb(227, 230, 237)',
padding: '18rpx'
};
const uploadImgs = ref([
// '/src/static/images/test/e7dd89a71493fcc6281700a4864e24cb.jpg'
])
const isShow = ref(false);
const popHeight = ref('0px')
const value = ref('');
const click_input = () => {
if(!isShow.value) isShow.value = true
}
const focus = (event) => {
popHeight.value = '278px'
isShow.value = true
console.log('event', event.detail.height);
}
const blur = (event) => {
console.log('失去焦点不一定关闭');
// popHeight.value = '0px'
isShow.value = true
}
const fileList = reactive([]);
// 方法
const upload = (limit = 4) => {
uni.chooseImage({
count: limit,
sizeType: ['original', 'compressed'],
sourceType: ['camera', 'album'],
success: async ({
tempFilePaths
}) => {
const valid = tempFilePaths.every(url => {
const extension = url.slice(lastDotIndex + 1).split('?')[0].toLowerCase()
return ['png', 'jpg'].includes(extension)
})
if (!valid) return common.msg('您选择的图片格式有误。')
const data = {
bizScen: 'S3005'
}
const upload_map = tempFilePaths.map((file) => uploadFile(file, data))
Promise.all(upload_map).then(res => {
fileList.push(...res.splice(0, limit - fileList.length))
}).catch((err) => {
common.msg(err)
})
}
})
}
</script>
<style scoped lang="scss">
.emoji-list{
display: flex;
flex-wrap: wrap;
margin: 0 auto;
background-color: red;
justify-content: center;
.emoji-item{
font-size: 44rpx;
padding: 14rpx;
}
}
// 表情输入框
.expression-tool-div{
padding: 20rpx 10rpx;
display: flex;
align-items: center;
.tool-icon{
display: flex;
align-items: center;
margin-right: 30rpx;
padding: 14rpx 28rpx;
border-radius: 60rpx;
margin: 0rpx 10rpx;
.img {
width: 50rpx;
height: 50rpx;
}
}
.checked_tool{
background-color: rgb(243, 243, 243);
}
}
.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;
}
}
.tool-send {
border-radius: 50rpx;
width: 120rpx;
height: 60rpx;
line-height: 60rpx;
text-align: center;
background-color: rgb(254, 44, 85);
font-size: 30rpx;
color: #fff;
margin-right: 20rpx;
}
}
.main-div {
position: fixed;
bottom: 0;
width: 100%;
background-color: #ffffff;
z-index: 1000;
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;background-color: red;
display: flex;
flex-direction: column;
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;
height: 120rpx;
border-radius: 12rpx;
}
}
.setting-div {
width: 100%;
height: 100rpx;
padding: 0 18rpx;
}
}
.tool-div {
border-bottom: 4rpx solid rgb(206, 206, 206);
}
</style>