Merge branch 'develop' of http://25.13.9.101:9000/K17_AITS/tra-app into develop
This commit is contained in:
@@ -9,7 +9,14 @@
|
||||
</view>
|
||||
<uv-overlay :show="showModel" opacity=".6" @click.stop="showModel = false">
|
||||
<view class="overlay-box" @click.stop="showModel = false">
|
||||
<video class="video-cont-center" v-if="showModel && fileUrlShow" :src="fileUrlShow" controls @error="playError" object-fit="contain"></video>
|
||||
<video class="video-cont-center"
|
||||
ref="playerRef"
|
||||
v-if="showModel && fileUrlShow"
|
||||
:src="fileUrlShow"
|
||||
controls
|
||||
@error="playError"
|
||||
@ended="playEnded"
|
||||
object-fit="contain"></video>
|
||||
</view>
|
||||
</uv-overlay>
|
||||
</view>
|
||||
@@ -57,6 +64,10 @@
|
||||
methods: {
|
||||
playError(info){
|
||||
console.log('err:',info)
|
||||
this.$refs.playerRef.stop();
|
||||
},
|
||||
playEnded(){
|
||||
this.$refs.playerRef.stop();
|
||||
},
|
||||
getPreviewUrlBlob(id) {
|
||||
if (!id) {
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -207,10 +207,12 @@ import { onShow } from "@dcloudio/uni-app"
|
||||
// 点击生产线分类
|
||||
const changePrdLine = (item)=>{
|
||||
activePrdlineType.value = item.value === activePrdlineType.value ? '' : item.value
|
||||
getMoreList(1)
|
||||
}
|
||||
// 点击课程分类
|
||||
const changeCourseType = (item)=>{
|
||||
activeCourseType.value = item.value === activeCourseType.value ? '' : item.value
|
||||
getMoreList(1)
|
||||
}
|
||||
const showTypeName = computed(()=>{
|
||||
return (activeTab.value === '全部' && activeCourseType.value === '') || (activeTab.value === '生产线' && activePrdlineType.value === '')
|
||||
@@ -312,7 +314,8 @@ import { onShow } from "@dcloudio/uni-app"
|
||||
case '全部':
|
||||
queryCrsInfoByCatalogApi({
|
||||
...pageObj.value,
|
||||
tagId: activeTag.value.join(',')
|
||||
tagId: activeTag.value.join(','),
|
||||
catalogId: activeCourseType.value
|
||||
}).then(res=>{
|
||||
courseListBase.value = courseListBase.value.concat(res.body || [])
|
||||
pageObj.value.total = res.total
|
||||
@@ -327,7 +330,8 @@ import { onShow } from "@dcloudio/uni-app"
|
||||
case '生产线':
|
||||
queryCrsInfoByPrdLineApi({
|
||||
...pageObj.value,
|
||||
tagId: activeTag.value.join(',')
|
||||
tagId: activeTag.value.join(','),
|
||||
prdLineId: activePrdlineType.value
|
||||
}).then(res=>{
|
||||
courseListBase.value = courseListBase.value.concat(res.body || [])
|
||||
pageObj.value.total = res.total
|
||||
|
||||
@@ -1,99 +1,103 @@
|
||||
<template>
|
||||
<uni-popup ref="historyPopupRef" class="popup">
|
||||
<view class="history-popup-view">
|
||||
<view class="history-title">
|
||||
<image class="icon-image" src="@/static/images/dialog/history-icon.png" mode=""></image>
|
||||
对话记录
|
||||
</view>
|
||||
<scroll-view class="history-list" :scroll-y="true">
|
||||
<view class="history-item" v-for="item in historyList" :key="item.reqBatch" @click="chooseHistory(item)">
|
||||
{{item.sseContent}}
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</uni-popup>
|
||||
<uni-popup ref="historyPopupRef" class="popup">
|
||||
<view class="history-popup-view">
|
||||
<view class="history-title">
|
||||
<image class="icon-image" src="@/static/images/dialog/history-icon.png" mode=""></image>
|
||||
对话记录
|
||||
</view>
|
||||
<scroll-view class="history-list" :scroll-y="true" @scrolltolower="scrolltolower">
|
||||
<view class="history-item" v-for="item in historyList" :key="item.reqBatch" @click="chooseHistory(item)">
|
||||
{{ item.sseContent }}
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</uni-popup>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {
|
||||
ref,
|
||||
reactive,
|
||||
computed,
|
||||
onMounted,
|
||||
nextTick
|
||||
} from 'vue';
|
||||
import { queryAskBatchSessionPaging } from '@/api/dialog.js'
|
||||
const emit = defineEmits(['showDetail'])
|
||||
|
||||
const historyPopupRef = ref()
|
||||
const historyList = ref([])
|
||||
const open = () => {
|
||||
historyList.value = []
|
||||
openFeedback(true)
|
||||
}
|
||||
const close = () => {
|
||||
openFeedback()
|
||||
}
|
||||
const pageInfo = ref({
|
||||
page: 1,
|
||||
limit: 20
|
||||
})
|
||||
const getList = async () => {
|
||||
try {
|
||||
const res = await queryAskBatchSessionPaging(pageInfo.value)
|
||||
historyList.value = historyList.value.concat(res.body|| [])
|
||||
}catch{}finally{}
|
||||
}
|
||||
const openFeedback = async (status) => {
|
||||
if (status) {
|
||||
await getList()
|
||||
historyPopupRef.value.open('left')
|
||||
} else {
|
||||
historyPopupRef.value.close()
|
||||
}
|
||||
}
|
||||
const chooseHistory = (item) => {
|
||||
console.log(item)
|
||||
emit('showDetail',item)
|
||||
}
|
||||
defineExpose({
|
||||
open,close
|
||||
})
|
||||
import { ref, reactive, computed, onMounted, nextTick } from 'vue'
|
||||
import { queryAskBatchSessionPaging } from '@/api/dialog.js'
|
||||
const emit = defineEmits(['showDetail'])
|
||||
|
||||
const historyPopupRef = ref()
|
||||
const historyList = ref([])
|
||||
const open = () => {
|
||||
historyList.value = []
|
||||
openFeedback(true)
|
||||
}
|
||||
const close = () => {
|
||||
openFeedback()
|
||||
}
|
||||
const pageInfo = ref({
|
||||
page: 1,
|
||||
limit: 20,
|
||||
total: 0
|
||||
})
|
||||
const getList = async () => {
|
||||
try {
|
||||
const res = await queryAskBatchSessionPaging(pageInfo.value)
|
||||
historyList.value = historyList.value.concat(res.body || [])
|
||||
pageInfo.value.total = res.total
|
||||
} catch {
|
||||
} finally {
|
||||
}
|
||||
}
|
||||
const scrolltolower = () => {
|
||||
// if(pageInfo.value.total <= (pageInfo.value.page * pageInfo.value.limit)) return
|
||||
// pageInfo.value.page += 1
|
||||
// getList()
|
||||
}
|
||||
const openFeedback = async status => {
|
||||
if (status) {
|
||||
await getList()
|
||||
historyPopupRef.value.open('left')
|
||||
} else {
|
||||
historyPopupRef.value.close()
|
||||
}
|
||||
}
|
||||
const chooseHistory = item => {
|
||||
console.log(item)
|
||||
emit('showDetail', item)
|
||||
}
|
||||
defineExpose({
|
||||
open,
|
||||
close
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.history-popup-view{
|
||||
width: 582rpx;
|
||||
height: 100vh;
|
||||
background-color: #fff;
|
||||
padding: 40rpx;
|
||||
padding-top: calc(20rpx + var(--status-bar-height));
|
||||
.history-title{
|
||||
height: 40rpx;
|
||||
line-height: 40rpx;
|
||||
padding-left: 40rpx;
|
||||
position: relative;
|
||||
font-size: 29rpx;
|
||||
color: #000;
|
||||
margin-bottom: 20rpx;
|
||||
.icon-image{
|
||||
position: absolute;
|
||||
left:0;
|
||||
height: 32rpx;
|
||||
width: 32rpx;
|
||||
top: 4rpx;
|
||||
}
|
||||
}
|
||||
.history-list{
|
||||
height: calc(100% - 60rpx);
|
||||
.history-item{
|
||||
height: 78rpx;
|
||||
line-height: 78rpx;
|
||||
font-size: 28rpx;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
.history-popup-view {
|
||||
width: 582rpx;
|
||||
height: 100vh;
|
||||
background-color: #fff;
|
||||
padding: 40rpx;
|
||||
padding-top: calc(20rpx + var(--status-bar-height));
|
||||
.history-title {
|
||||
height: 40rpx;
|
||||
line-height: 40rpx;
|
||||
padding-left: 40rpx;
|
||||
position: relative;
|
||||
font-size: 29rpx;
|
||||
color: #000;
|
||||
margin-bottom: 20rpx;
|
||||
.icon-image {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
height: 32rpx;
|
||||
width: 32rpx;
|
||||
top: 4rpx;
|
||||
}
|
||||
}
|
||||
.history-list {
|
||||
height: calc(100% - 60rpx);
|
||||
.history-item {
|
||||
height: 78rpx;
|
||||
line-height: 78rpx;
|
||||
font-size: 28rpx;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user