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

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

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

Loading…
Cancel
Save