Merge branch 'develop' of http://25.13.9.101:9000/K17_AITS/tra-app into develop

This commit is contained in:
田岩
2025-11-24 15:37:03 +08:00
19 changed files with 221 additions and 72 deletions
+1 -1
View File
@@ -8,7 +8,7 @@ ENV = 'development'
VITE_APP_BASE_API_Url = 'https://aitstest.jlbank.com.cn:7001'
# VITE_APP_BASE_API_Url = 'https://aitstest.jlbank.com.cn:7002'
VITE_APP_BASE_API_Url = 'https://aitstest.jlbank.com.cn:7002'
# VITE_APP_BASE_API_Url = 'http://192.168.247.200'
+3
View File
@@ -22,6 +22,7 @@ export const queryDimesionInfo = (data) => {
return request({
url: '/traapp/traStudyAnalysis/queryDimesionInfo',
method: 'post',
timeout: 60000,
data
});
};
@@ -31,6 +32,7 @@ export const queryHabitInfo = (data) => {
return request({
url: '/traapp/traStudyAnalysis/queryHabitInfo',
method: 'post',
timeout: 60000,
data
});
};
@@ -40,6 +42,7 @@ export const querySuggestInfo = (data) => {
return request({
url: '/traapp/traStudyAnalysis/querySuggestInfo',
method: 'post',
timeout: 60000,
data
});
};
@@ -58,6 +58,8 @@ export default function usePointsAndBadge() {
badgeRef.value.close();
complete(true, '积分获取成功', res);
});
}else{
complete(false, '积分接口返回数据异常', res);
}
};
+3 -3
View File
@@ -35,7 +35,7 @@
</view>
<view class="analytics-item-value">
<text class="analytics-item-value-v">{{statisticsObj.completeCrsCnt }}</text>
<text class="analytics-item-value-unit"></text>
<text class="analytics-item-value-unit"></text>
</view>
</view>
<view class="analytics-item">
@@ -53,7 +53,7 @@
</view>
<view class="analytics-item-value">
<text class="analytics-item-value-v">{{statisticsObj.completeTaskCnt }}</text>
<text class="analytics-item-value-unit"></text>
<text class="analytics-item-value-unit"></text>
</view>
</view>
<view class="analytics-item">
@@ -62,7 +62,7 @@
</view>
<view class="analytics-item-value">
<text class="analytics-item-value-v">{{statisticsObj.completedExamCnt }}</text>
<text class="analytics-item-value-unit"></text>
<text class="analytics-item-value-unit"></text>
</view>
</view>
<view class="analytics-item">
+5 -5
View File
@@ -103,16 +103,16 @@
chooseTyp: 0,
chooseTypSec: 0,
tagsList:[{
label: '本',
value: 'WEEK',
label: '本',
value: 'YEAR',
},{
label: '本月',
value: 'MONTH',
},{
label: '本',
value: 'YEAR',
label: '本',
value: 'WEEK',
}],
activeTag: 'WEEK',
activeTag: 'YEAR',
rankList: []
}
},
+9 -1
View File
@@ -1260,7 +1260,15 @@ const chooseRateNow = item => {
color: #000;
position: sticky;
top: 0;
.top-desc{
position: absolute;
bottom: -10rpx;
font-size: 18rpx;
color: #999;
left: 50%;
transform: translateX(-50%);
}
// margin-bottom: 23rpx;
.arrow-icon {
position: absolute;
@@ -45,7 +45,7 @@
</view>
</view>
<view class="mb-64" v-if="(modelValue.fileList || []).length>0">
<view class="fz-30 font_pf fw-400 mb-4">附件</view>
<view class="fz-30 font_pf fw-400 mb-4">知识资料</view>
<view class="file-item" v-for="item in modelValue.fileList" @click="previewFile(item)">
{{item.fileName}}
</view>
+9
View File
@@ -14,6 +14,7 @@
<view class="body-title">
<!-- <uv-icon class="arrow-icon" name="arrow-left" @click="common.navigateBack()"/> -->
AI问答
<view class="top-desc">内容由AI生成</view>
<view class="seek-setting">
<image
src="@/static/images/dialog/new-dialog.png"
@@ -932,6 +933,14 @@
color: #000;
position: relative;
.top-desc{
position: absolute;
bottom: -10rpx;
font-size: 18rpx;
color: #999;
left: 50%;
transform: translateX(-50%);
}
// margin-bottom: 23rpx;
.arrow-icon {
position: absolute;
@@ -1,8 +1,19 @@
<template>
<z-paging ref="pagingRef" v-model="data_list" @query="queryList" :auto="false" empty-view-text="暂无数据"
paging-class="pagingClass">
<view class="sparring-item-box" v-for="item in data_list">
<!-- <view class="sparring-item-box" v-for="item in data_list">
<SparringItem :itemInfo="item" :activeTag="[]" @clickItem="toSparringDetail(item)" />
</view> -->
<view class="left-items">
<view class="sparring-item-box" v-for="item in leftsparringList">
<SparringItem :itemInfo="item" :activeTag="[]" @clickItem="toSparringDetail(item)" />
</view>
</view>
<view class="right-items">
<view class="sparring-item-box" v-for="item in rightsparringList">
<SparringItem :itemInfo="item" :activeTag="[]" @clickItem="toSparringDetail(item)" />
</view>
</view>
</z-paging>
</template>
@@ -13,7 +24,9 @@
reactive,
onMounted,
nextTick,
watch
watch,
unref,
computed
} from 'vue';
import {
queryTraListPreviewPaging
@@ -33,6 +46,18 @@
fetchFunction: queryTraListPreviewPaging
});
const props = defineProps(['tabIndex', 'currentIndex']);
const sparringList = computed(() => {
return unref(data_list)
})
const leftsparringList = computed(() => {
return sparringList.value.filter((t, index) => index % 2 === 0)
})
const rightsparringList = computed(() => {
return sparringList.value.filter((t, index) => index % 2 === 1)
})
const toSparringDetail = (item) => {
if (item.traId) {
checkTraPartnerInfoById({
@@ -64,15 +89,34 @@
border-radius: 16rpx;
}
.sparring-item-box {
// .sparring-item-box {
// width: 50%;
// float: left;
// margin-top: 24rpx;
// margin-bottom: -24rpx;
// // background-color: #f1f1f1;
// // margin-bottom: 16rpx;
// &:nth-child(2n-1) {
// // margin-right: 16rpx;
// }
// }
.left-items {
width: 50%;
float: left;
margin-top: 24rpx;
margin-bottom: -24rpx;
// background-color: #f1f1f1;
// margin-bottom: 16rpx;
&:nth-child(2n-1) {
// margin-right: 16rpx;
}
overflow: hidden;
}
.right-items {
width: 50%;
float: left;
overflow: hidden;
}
.sparring-item-box {
// width: 50%;
width: 100%;
float: left;
}
</style>
+4 -1
View File
@@ -185,7 +185,7 @@
onLoad(params => {
inputValue.value = params.searchName
fromType.value = params.from
pageInfo.value.limit = fromType.value === 'course' ? 20 : 3
pageInfo.value.limit = ['course','sparring'].includes(fromType.value) ? 20 : 3
})
onShow(() => {
search()
@@ -326,6 +326,9 @@
case 'course':
pageInfo.value.limit = 20
break
case 'sparring':
pageInfo.value.limit = 20
break
case 'task':
pageInfo.value.limit = 20
break
+4
View File
@@ -164,6 +164,7 @@
setTimeout(() => {
talkVoiceObj.value.src = itemVoice.value;
if (voiceIsPlaying.value) return
if(unref(dataInfo)?.id !== props.activeVoiceId) return
talkVoiceObj.value.play();
}, 100);
} else {
@@ -185,6 +186,7 @@
itemVoice.value = url;
talkVoiceObj.value.src = url;
if (voiceIsPlaying.value) return
if(unref(dataInfo)?.id !== props.activeVoiceId) return
talkVoiceObj.value.play();
} else {
downloadVoiceFile(_url)
@@ -197,6 +199,7 @@
itemVoice.value = res.tempFilePath;
talkVoiceObj.value.src = res.tempFilePath;
if (voiceIsPlaying.value) return
if(unref(dataInfo)?.id !== props.activeVoiceId) return
talkVoiceObj.value.play();
storageStore.setStorage('audio', _url + _params.teachNo, itemVoice.value);
})
@@ -260,6 +263,7 @@
() => props.dataInfo,
(val) => {
if (val.execLogId && isStudy.value) {
if(unref(dataInfo)?.id !== props.activeVoiceId) return
playVoice()
}
}, {
+18 -2
View File
@@ -13,7 +13,7 @@
</view>
</view>
<view class="btns-cont">
<view class="play-btn">
<view class="play-btn" v-show="!isTesting">
<image class="icon" v-show="!(!voiceLoading&&(props.activeVoiceId === dataInfo.id))" @click.stop="playVoice"
src="@/static/images/course/play-blue.png" style="width: 100%;height: 100%;"></image>
<image class="icon" v-show="!voiceLoading&&(props.activeVoiceId === dataInfo.id)" @click.stop="pauseVoice"
@@ -96,6 +96,7 @@
setTimeout(() => {
// talkUserVoiceObj.value.src = itemVoice.value
talkUserVoiceObj.value.play()
isPlaying.value = true
}, 300)
return
} else {
@@ -137,7 +138,7 @@
isTesting.value = true
talkUserVoiceObj.value.volume = 0
talkUserVoiceObj.value.play()
talkUserVoiceObj.value.pause()
// talkUserVoiceObj.value.pause()
}
// #endif
setTimeout(() => {
@@ -171,6 +172,21 @@
deep: true,
immediate: true
})
watch(
() => props.activeVoiceId,
(val) => {
if (val !== props.dataInfo.id) {
if (isPlaying.value) {
isPlaying.value = false
if (!talkUserVoiceObj.value) return
talkUserVoiceObj.value.pause()
}
}
}, {
deep: true,
immediate: true
}
)
</script>
<style scoped lang="scss">
@@ -13,7 +13,7 @@
<ImagePreview class="img-box" :src="itemInfo.ossAddr" :isCache="true" width="225" height="170" mode="widthFix">
</ImagePreview>
<view class="item-title">{{itemInfo.traName}}</view>
<scroll-view class="item-tags" :scroll-x="true" :show-scrollbar="false">
<scroll-view class="item-tags" :scroll-x="true" :show-scrollbar="false" v-if="tagsShowList.length > 0">
<view class="item-tag-view">
<view :class="['item-tag', this.activeTag.includes(item.tagId)?'active-tag':'']" v-for="item in tagsShowList">
{{item.tagName}}
@@ -119,9 +119,14 @@
const IsAndEnv = getPhoneEnvBool('AND');
const isStartNum = ref(0);
const isStopNum = ref(0);
const isGettingPermission = ref(false)
const initRecord = () => {
recordObjCom.value = uni.getRecorderManager();
unref(recordObjCom)?.onStop((res, duration) => {
if(isGettingPermission.value){
isGettingPermission.value = false
return
}
audioPath.value = res.tempFilePath;
if (!isOut.value) {
if (startFlag.value !== 2) {
@@ -239,11 +244,14 @@
if (_recordPerm !== 1) {
common.show('提示信息', '当前页面需要使用的录音权限,是否前往开启?', true, '取消', '确定').then((res) => {
if (res) {
isGettingPermission.value = true
hideOverlayTalking()
//
permission.gotoAppPermissionSetting();
} else {
//
common.navigateBack();
hideOverlayTalking()
}
});
return false
@@ -256,11 +264,14 @@
if (_state === 'denied') {
common.show('提示信息', '当前页面需要使用的录音权限,是否前往开启?', true, '取消', '确定').then((res) => {
if (res) {
isGettingPermission.value = true
hideOverlayTalking()
//
uni.openAppAuthorizeSetting();
} else {
//
common.navigateBack();
hideOverlayTalking()
}
});
return false
+48 -36
View File
@@ -2,24 +2,23 @@
<view class="sparring-center max_page">
<view class="top-bg"></view>
<view class="bot-bg"></view>
<view class="sparring-center-body">
<view class="sparring-center-body" v-if="!reSeting">
<view class="body-title">
<!-- @click="test.testApi" -->
<uv-icon class="arrow-icon" name="arrow-left" @click="common.switchTab('/pages/index/index')" />
AI陪练
</view>
<view class="input-view" @click="toSearchPage">
<uv-input shape="circle" placeholderStyle="color:#999999;font-size:28rpx;" placeholder="请输入陪练名称"
suffixIcon="search" :customStyle="customStyle" :suffixIconStyle="suffixIconStyle" :readonly="true">
<uv-input shape="circle" placeholderStyle="color:#999999;font-size:28rpx;" placeholder="请输入" suffixIcon="search"
:customStyle="customStyle" :suffixIconStyle="suffixIconStyle" :readonly="true">
</uv-input>
</view>
<view class="tabs-view">
<uv-tabs :list="tabList" @click="changeTab" :scrollable="true" active-style="font-weight:bold; color:#000;"
class="font_pf my_tabs" :inactive-style="{ color: '#333333', fontSize: '30rpx', fontWeight: '500' }"
<uv-tabs :list="tabList" @click="changeTab" :current="currentTab" :scrollable="true" class="font_pf my_tabs"
:inactive-style="{ color: '#333333', fontSize: '30rpx', fontWeight: '500' }"
:activeStyle="{ color: '#333333', fontSize: '30rpx', fontWeight: '600' }"></uv-tabs>
<uv-tabs :list="tabSecList" @click="changeTabSec" :scrollable="true"
active-style="font-weight:bold; color:#000;" class="font_pf my_tabs2"
:inactive-style="{ color: '#333333', fontSize: '24rpx', fontWeight: '500' }"
<uv-tabs :list="tabSecList" @click="changeTabSec" :current="currentTabSec" :scrollable="true"
class="font_pf my_tabs2" :inactive-style="{ color: '#333333', fontSize: '24rpx', fontWeight: '500' }"
:activeStyle="{ color: '#0066FF', fontSize: '24rpx', fontWeight: '500' }" :lineColor="`#06f`"></uv-tabs>
<!-- :lineColor="`url(${LineBg}) 2% 2%`" -->
</view>
@@ -66,17 +65,14 @@
</uv-scroll-list>
<view class="sparring-list">
<view class="sparring-list-body">
<scroll-view :class="['right-sparring-list', getActiveItemClass()]" :scroll-y="true"
@scrolltolower="getMoreList()">
<scroll-view :class="['right-sparring-list']" :scroll-y="true" @scrolltolower="getMoreList()">
<!-- <view class="all-item"> -->
<view class="left-items">
<view class="sparring-item-box" v-for="item in leftsparringList">
<SparringItem :itemInfo="item" :activeTag="activeTag" @clickItem="toSparringDetail(item)" />
</view>
</view>
<view class="right-items">
<view class="sparring-item-box" v-for="item in rightsparringList">
<SparringItem :itemInfo="item" :activeTag="activeTag" @clickItem="toSparringDetail(item)" />
</view>
@@ -85,6 +81,7 @@
<view class="loading-box" v-show="loading">
<CommonLoading color="#06f" class="loading-val" />
</view>
<list-no-data v-show="sparringList.length == 0 && !loading">暂无数据</list-no-data>
</scroll-view>
</view>
</view>
@@ -113,7 +110,8 @@
onUnmounted
} from 'vue'
import {
onShow
onShow,
onHide
} from '@dcloudio/uni-app'
import {
useSocketStore
@@ -137,6 +135,8 @@
borderRadius: '23rpx'
}
const catelogList = ref([])
const currentTab = ref(0)
const currentTabSec = ref(0)
const tabList = computed(() => {
return [{
name: '全 部',
@@ -227,21 +227,6 @@
// showFilterList.value = false
}
const activeLeftIndex = ref(-1)
const getActiveItemClass = () => {
let _class = ''
if ('生产线' === activeTab.value) {
_class = activeLeftIndex.value === 0 ? 'no-radius' : ''
} else if ('全部' === activeTab.value) {
_class = activeLeftIndex.value === 0 ? 'no-radius' : ''
}
return _class
}
// 线
const changePrdLine = (item, index) => {
activePrdlineType.value = item.value === activePrdlineType.value ? '' : item.value
activeLeftIndex.value = index
getMoreList(1)
}
//
const tagsList = computed(() => {
let _arr = []
@@ -355,20 +340,27 @@
common.navigateTo('/pages/search/search?from=sparring')
}
//
const toSparringDetail = item => {
const toSparringDetail = item => {
if (item.traId) {
checkTraPartnerInfoById({
traId: item.traId
}).then(res=>{
if(res.body.inRange){
}).then(res => {
if (res.body.inRange) {
common.navigateTo('/pages/sparring/detail?traId=' + item.traId)
}else{
common.show(res.body.message)
} else {
common.show('提示', res.body.message, false)
}
})
}
}
const reSeting = ref(false)
onMounted(() => {
reSeting.value = true
setTimeout(() => {
reSeting.value = false
})
currentTab.value = 0
currentTabSec.value = 0
queryTraPartnerCatelogList().then(res => {
catelogList.value = res.body || []
})
@@ -376,11 +368,13 @@
tagsTree.value = res.body || []
})
changeTab({
name: '全部'
name: '全部',
value: ''
})
uni.$on('refresh_sparring_list', () => {
changeTab({
name: activeTab.value || '全部'
name: activeTab.value || '全部',
value: activeCourseType.value || ''
})
})
})
@@ -388,6 +382,8 @@
uni.$off('refresh_sparring_list')
})
onActivated(() => {
currentTab.value = 0
currentTabSec.value = 0
//
getTraTagListApi().then(res => {
tagsTree.value = res.body || []
@@ -397,10 +393,26 @@
})
})
onShow(() => {
reSeting.value = true
setTimeout(() => {
reSeting.value = false
})
currentTab.value = 0
currentTabSec.value = 0
changeTab({
name: activeTab.value || '全部'
name: activeTab.value || '全部',
value: activeCourseType.value || ''
})
socketStore.closeSocket()
uni.$on('refresh_sparring_list', () => {
changeTab({
name: activeTab.value || '全部',
value: activeCourseType.value || ''
})
})
})
onHide(() => {
uni.$off('refresh_sparring_list')
})
</script>
+32 -8
View File
@@ -9,6 +9,7 @@
<view class="back-icon" @click="common.navigateBack()"></view>
{{ '陪练报告' }}
<view class="feedback-icon" @click="feedbackNow"></view>
<view class="top-desc">内容由AI生成</view>
</view>
</view>
<view class="body-content">
@@ -37,6 +38,7 @@
{{ roleInfo?.chaName }}
</view> -->
</view>
<view class="loading-box" v-if="isLoading"></view>
<TalkingPreviewItem class="talk-item" v-for="item in showTalkList" :talkingType="item.type"
:talkingInfo="item" :roleInfo="roleInfo" :traId="traId" :execId="execId" :isAnswering="false"
:activeVoiceId="activeVoiceTalkingItemId" @handleEvents="talkItemEvents"></TalkingPreviewItem>
@@ -58,7 +60,9 @@
<view :class="['body-bottom-static', isPass?'pass':'fialed']">
<view class="static-tip">得分</view>
<view class="static-score">{{ totalScore }}</view>
<view class="static-desc">{{!isPass?'你这个得分,不容易啊!':'恭喜阁下过关斩将,顺利通关!'}}</view>
<view class="static-desc" v-if="false">{{'朋友你挺能说违禁词啊'}}</view>
<view class="static-desc" v-if="false">以下均为违禁词:<text style="color: red;">{{'违禁词'}}</text></view>
<view class="static-desc">{{!isPass?'你这个得分,不容易的!':'恭喜阁下过关斩将,顺利通关!'}}</view>
<view class="static-charts">
<ChartThree v-if="length === 3" fromType="tra" :dataList="evalDimens" />
@@ -169,7 +173,6 @@
}
const filterType = ref('')
const changeTab = (info) => {
console.log(info)
filterType.value = info.value
}
const evalDimens = ref([])
@@ -179,7 +182,9 @@
const isPass = ref(false)
const negativeList = ref([]) //
const positiveList = ref([]) //
const isLoading = ref(false)
const getData = () => {
isLoading.value = true
partnerChatReport({
traId: traId.value,
execId: execId.value,
@@ -187,9 +192,7 @@
// traId: 'PARTNERINFO02501812207220251103160409000007402',
// execId: 'db2f275b-c04a-4572-83dd-74a95ff49d67'
}).then(res => {
if (res.body.code === 200) {
setTimeout(getData, 2000)
} else {
if (res.body.reportFlag){
traInfo.value = res.body.traPartnerInfo || {}
roleInfo.value = res.body.traPartnerCharacterInfoVo || {}
traTm.value = res.body.traTm || '0'
@@ -233,10 +236,15 @@
return t
}
})
isLoading.value = false
setTimeout(() => {
showLoading.value = false
}, 800)
}
} else {
setTimeout(getData, 2000)
}
}).catch(()=>{
isLoading.value = false
})
}
const setTextColor = (str) => {
@@ -324,7 +332,14 @@
top: var(--status-bar-height);
left: 0;
z-index: 2;
.top-desc{
position: absolute;
bottom: 0;
font-size: 18rpx;
color: #999;
left: 50%;
transform: translateX(-50%);
}
.top-title {
height: 90rpx;
// background-color: red;
@@ -465,7 +480,16 @@
}
}
}
.loading-box{
min-height: 180rpx;
width: 100%;
background: url(@/static/images/examination/getting_in.gif) no-repeat;
background-position: center;
background-size: auto 160rpx;
margin-top: 100rpx;
}
.collepse-tab {
position: absolute;
width: 300rpx;
+11 -2
View File
@@ -10,6 +10,7 @@
<view class="back-icon" @click="common.navigateBack()"></view>
{{ detailInfo.traName }}
</view>
<view class="top-desc">内容由AI生成</view>
</view>
<scroll-view :class="[' body-content index-dialog-body', detailInfo.traInterTyp === '01'?'talking-type1':'']" :scroll-y="true" refresher-default-style="none"
:scroll-top="scrollTop" :show-scrollbar="false" :scroll-with-animation="false">
@@ -328,7 +329,7 @@
talkingText: body.content,
isLoading: false,
intrctWay: '02',
id: _id,
id: _id + 'qns',
...body,
talkingVoice: askData.value.talkingVoice
});
@@ -361,7 +362,7 @@
talkingText: answerText.value,
isLoading: false,
execLogId: body.execLogId||'',
id: _id,
id: _id + 'ans',
...body,
askData: {
...askData.value
@@ -519,6 +520,14 @@
left: 0;
z-index: 2;
.top-desc{
position: absolute;
bottom: 0;
font-size: 18rpx;
color: #999;
left: 50%;
transform: translateX(-50%);
}
.top-title {
height: 90rpx;
// background-color: red;
Binary file not shown.

After

Width:  |  Height:  |  Size: 215 KiB

@@ -251,6 +251,8 @@
})
},
setScrollLeft() {
setTimeout(()=> {
// tabtabwidthleft()
const tabRect = this.list[this.innerCurrent]
// item
@@ -261,12 +263,14 @@
}, 0)
//
const windowWidth = this.$uv.sys().windowWidth
let _rect = tabRect?.rect?.width||0
// tabs-itemscroll-view
let scrollLeft = offsetLeft - (this.tabsRect.width - tabRect.rect.width) / 2 - (windowWidth - this.tabsRect
let scrollLeft = offsetLeft - (this.tabsRect.width - _rect) / 2 - (windowWidth - this.tabsRect
.right) / 2 + this.tabsRect.left / 2
// scrollLeftscroll-viewtabs
scrollLeft = Math.min(scrollLeft, this.scrollViewWidth - this.tabsRect.width)
this.scrollLeft = Math.max(0, scrollLeft)
},200)
},
//
resize() {