main
limingtao 11 months ago
parent c9396276d8
commit d0ffd43a1a
  1. 6
      pages/investigation/index.vue
  2. 49
      pages/knowledge/index.vue

@ -226,8 +226,7 @@
datas, 'POST')
.then(res => {
this.$set(this.totalData, 'UnderInvestigation', res.result.total)
}).catch((err) => {
})
}).catch((err) => {})
},
getNum2() {
let datas = {
@ -243,8 +242,7 @@
datas, 'POST')
.then(res => {
this.$set(this.totalData, 'InGovernance', res.result.total)
}).catch((err) => {
})
}).catch((err) => {})
},
getList() {
let datas = {

@ -1,5 +1,5 @@
<template>
<view class="detail" @touchmove="handleTouchMove">
<view class="detail" @touchmove="handleTouchMove" @touchstart="handleTouchStart">
<scroll-view scroll-y="true" :scroll-top="scrollTop" :style="{
height: isExpanded ? 'calc(100% - 1rpx)' : 'calc(100% - 1rpx)',
}" class="chatlist" :class="{ 'chatlist-wrapper-expanded': isExpanded }" id="scrollView" ref="scrollView"
@ -39,14 +39,12 @@
<view class="icon" v-show="item.answerId != '0' && item.isOver && item.isSuccess">
<uni-icons
:type="item.iconsType == '' ? 'hand-up' : (item.iconsType == 'handUp' ? 'hand-up-filled' : 'hand-up')"
:color="item.iconsType == 'handUp' ? '#FFD131' : ''"
size="22"
:color="item.iconsType == 'handUp' ? '#FFD131' : ''" size="22"
@click="clickIcon('handUp', item.qaId)">
</uni-icons>
<uni-icons
:type="item.iconsType == '' ? 'hand-down' : (item.iconsType == 'handDown' ? 'hand-down-filled' : 'hand-down')"
size="22"
@click="clickIcon('handDown', item.qaId)">
size="22" @click="clickIcon('handDown', item.qaId)">
</uni-icons>
</view>
</view>
@ -56,14 +54,18 @@
<view class="bounce-dot"></view>
<view class="bounce-dot"></view>
</view>
<view class="loading-animation2" v-if="loading">
</view>
</scroll-view>
<view class="con" :class="{ 'con-wrapper-expanded': isExpanded }"></view>
<view class="input-wrapper" :class="{ 'input-wrapper-expanded': isExpanded }">
<view class="topContent">
<input class="uni-input" :placeholder="loading ? '请等待回复结束' : '请输入内容'" :value="inputValue" @confirm="handleSend" :disabled="loading"
@input="onKeyInput" />
<input class="uni-input" :placeholder="loading ? '请等待回复结束' : '请输入内容'" :value="inputValue"
@confirm="handleSend" :disabled="loading" @input="onKeyInput" />
<uni-icons class="uni-icon" type="plus" size="30" @click="handlePlus" color='#cccccc' :disabled="loading"></uni-icons>
<uni-icons class="uni-icon" type="plus" size="30" @click="handlePlus" color='#cccccc'
:disabled="loading"></uni-icons>
</view>
<view v-if="isExpanded" class="expanded">
<view @click="chooseImage" class="expandedItem">
@ -219,9 +221,29 @@
// duration: 2000
// });
},
//
handleTouchStart(e) {
//
this.startX = e.touches[0].clientX;
this.startY = e.touches[0].clientY;
},
handleTouchMove(e) { //
// this.isHandleScroll = false
let currentX = e.touches[0].clientX;
let currentY = e.touches[0].clientY;
// Y
let moveY = currentY - this.startY;
handleTouchMove(e) {
//
if (moveY < 0) {
this.isHandleScroll = false
//
}
// startXstartY便
//
},
handleScroll(event) {
@ -249,6 +271,7 @@
// console.log(voiceText,"voiceText");
clearInterval(this.timer)
this.loading = true;
this.scrollTop = Number(this.scrollTop) + 100;
const [err, res] = await uni.request({
// url: 'http://10.16.3.159:8777/api/local_doc_qa/local_doc_chat',
url: this.$.chatUrl + "/chat",
@ -303,6 +326,7 @@
//
handleBtn(text) {
this.handleSend(text);
this.isHandleScroll = true
},
//
onKeyInput(event) {
@ -1010,6 +1034,11 @@
margin: 0 10rpx;
}
.loading-animation2 {
width: 100%;
height: 120rpx;
}
.loading-animation {
display: flex;
justify-content: center;
@ -1077,10 +1106,12 @@
color: #999999 !important;
}
}
.icon {
display: flex;
justify-content: flex-end;
margin: 0 15rpx 15rpx 12rpx;
.uni-icons {
margin-left: 15rpx;
}

Loading…
Cancel
Save