管骁翰_修改

main
guanxiaohan 11 months ago
parent d0ffd43a1a
commit 1c0940dd71
  1. 1699
      pages/index/detail.vue
  2. 4
      pages/investigation/task.vue
  3. 97
      pages/knowledge/index.vue

File diff suppressed because it is too large Load Diff

@ -1249,7 +1249,8 @@
.globalRequest(
"/hiddenDanger/config/getDangerBaseData", {
nuserid: this.$.getData("token"),
sectionCode: this.sectionCode
sectionCode: this.sectionCode,
businessId: this.businessId
},
"GET"
)
@ -1834,6 +1835,7 @@
.globalRequest(
"/hiddenDanger/highDanger/saveManualInvestigation", {
...this.formData,
operator: this.$.getData("token"),
businessId: this.businessId,
extraConfigs: this.extraConfigs,
describe: this.describeArr,

@ -1,6 +1,6 @@
<template>
<view class="detail" @touchmove="handleTouchMove" @touchstart="handleTouchStart">
<scroll-view scroll-y="true" :scroll-top="scrollTop" :style="{
<view class="detail">
<scroll-view @scroll="handleScroll" 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"
@click="clickContent">
@ -39,12 +39,14 @@
<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>
@ -54,18 +56,14 @@
<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">
@ -171,13 +169,13 @@
async clickIcon(type, qaId) {
console.log(this.msgList)
this.msgList.forEach(item => {
if (item.qaId == qaId) {
if (item.iconsType == '' || !item.hasOwnProperty('iconsType')) {
if(item.qaId == qaId) {
if(item.iconsType == '' || !item.hasOwnProperty('iconsType')) {
this.iconsType = type
this.$set(item, 'iconsType', type)
} else {
if (item.iconsType == 'handUp') {
if (type == 'handUp') {
if(item.iconsType == 'handUp') {
if(type == 'handUp') {
this.iconsType = ''
this.$set(item, 'iconsType', '')
} else {
@ -185,7 +183,7 @@
this.$set(item, 'iconsType', 'handDown')
}
} else {
if (type == 'handUp') {
if(type == 'handUp') {
this.iconsType = 'handUp'
this.$set(item, 'iconsType', 'handUp')
} else {
@ -196,14 +194,14 @@
}
}
})
const params = {
qaId,
feedbackStatus: this.iconsType == '' ? 0 : (this.iconsType == 'handUp' ? 1 : 2),
feedbackStatus : this.iconsType == '' ? 0 : (this.iconsType == 'handUp' ? 1 : 2),
feedbackInfo: ''
}
// this.$request.globalRequest('/hitap/feadBack', params, 'POST').then(res => {
// })
const [err, res] = await uni.request({
url: this.$.chatUrl + "/feadBack",
@ -221,31 +219,44 @@
// duration: 2000
// });
},
//
handleTouchStart(e) {
//
//
this.startX = e.touches[0].clientX;
this.startY = e.touches[0].clientY;
// this.isScrolling = false; //
},
handleTouchMove(e) { //
// this.isHandleScroll = false
let currentX = e.touches[0].clientX;
let currentY = e.touches[0].clientY;
handleTouchMove(e) {
//
let moveX = e.touches[0].clientX;
let moveY = e.touches[0].clientY;
//
let deltaX = moveX - this.startX;
let deltaY = moveY - this.startY;
// 5px
if (Math.abs(deltaX) > 5 || Math.abs(deltaY) > 5) {
// this.isScrolling = true; //
this.isHandleScroll = false
// deltaY
if (deltaY > 0) {
console.log('用户正在向下滑动');
} else if (deltaY < 0) {
// Y
let moveY = currentY - this.startY;
console.log('用户正在向上滑动');
}
//
if (moveY < 0) {
this.isHandleScroll = false
//
// startXstartYmoveXmoveY
//
}
// startXstartY便
//
// startXstartY
},
handleTouchEnd(e) {
//
// startXstartY
//
},
handleScroll(event) {
// event.detail
const scrollTop = event.detail.scrollTop;
@ -271,7 +282,6 @@
// 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",
@ -326,7 +336,6 @@
//
handleBtn(text) {
this.handleSend(text);
this.isHandleScroll = true
},
//
onKeyInput(event) {
@ -819,7 +828,6 @@
.titleTwo {
margin: 15rpx 0;
font-size: 28rpx;
line-height: 42rpx;
}
.tipItem {
@ -1034,11 +1042,6 @@
margin: 0 10rpx;
}
.loading-animation2 {
width: 100%;
height: 120rpx;
}
.loading-animation {
display: flex;
justify-content: center;
@ -1106,14 +1109,12 @@
color: #999999 !important;
}
}
.icon {
.icon{
display: flex;
justify-content: flex-end;
margin: 0 15rpx 15rpx 12rpx;
.uni-icons {
.uni-icons{
margin-left: 15rpx;
}
}
</style>
</style>

Loading…
Cancel
Save