|
|
|
@ -25,107 +25,64 @@ |
|
|
|
|
<view class="stepBox"> |
|
|
|
|
<view class="step" v-for="(item, index) in tablist" :key="index"> |
|
|
|
|
<view class="stepItem"> |
|
|
|
|
<view |
|
|
|
|
:class="{ |
|
|
|
|
<view :class="{ |
|
|
|
|
stepCircleActive: index <= active, |
|
|
|
|
stepCircle: index > active, |
|
|
|
|
}" |
|
|
|
|
>{{ index + 1 }} |
|
|
|
|
}">{{ index + 1 }} |
|
|
|
|
</view> |
|
|
|
|
<view |
|
|
|
|
class="stepText" |
|
|
|
|
:style="{ color: index <= active ? '#000000' : '#bcc3cd' }" |
|
|
|
|
>{{ item.title }} |
|
|
|
|
<view class="stepText" :style="{ color: index <= active ? '#000000' : '#bcc3cd' }">{{ item.title||'' }} |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<view v-if="index !== 3" class="circles"> |
|
|
|
|
<view |
|
|
|
|
:class="{ circleActive: index < active, circle: index >= active }" |
|
|
|
|
v-for="i in 8" |
|
|
|
|
:key="i" |
|
|
|
|
> |
|
|
|
|
<view :class="{ circleActive: index < active, circle: index >= active }" v-for="i in 8" :key="i"> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<scroll-view |
|
|
|
|
scroll-y="true" |
|
|
|
|
:scroll-top="scrollTop" |
|
|
|
|
:style="{ |
|
|
|
|
<scroll-view scroll-y="true" :scroll-top="scrollTop" :style="{ |
|
|
|
|
height: isExpanded ? 'calc(100% - 350rpx)' : 'calc(100% - 250rpx)', |
|
|
|
|
}" |
|
|
|
|
class="chatlist" |
|
|
|
|
id="scrollView" |
|
|
|
|
ref="scrollView" |
|
|
|
|
@click="clickContent" |
|
|
|
|
> |
|
|
|
|
<view |
|
|
|
|
:class="['bar', item.answerId == '0' ? 'currAnswer' : '']" |
|
|
|
|
v-for="(item, i) in msgList" |
|
|
|
|
:key="item.id" |
|
|
|
|
> |
|
|
|
|
}" class="chatlist" id="scrollView" ref="scrollView" @click="clickContent"> |
|
|
|
|
<view :class="['bar', item.answerId == '0' ? 'currAnswer' : '']" v-for="(item, i) in msgList" |
|
|
|
|
:key="item.id"> |
|
|
|
|
<!-- <image |
|
|
|
|
:src=" |
|
|
|
|
item.answerId == '0' ? '/static/self.png' : '/static/left_user.png' |
|
|
|
|
" |
|
|
|
|
class="img" |
|
|
|
|
/> --> |
|
|
|
|
<image |
|
|
|
|
:src=" |
|
|
|
|
<image :src=" |
|
|
|
|
item.answerId == '0' |
|
|
|
|
? 'data:image/jpeg;base64,iVBORw0KGgoAAAANSUhEUgAAACYAAAAmCAYAAACoPemuAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMDY3IDc5LjE1Nzc0NywgMjAxNS8wMy8zMC0yMzo0MDo0MiAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTUgKFdpbmRvd3MpIiB4bXBNTTpJb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OAtxO1ofg07l4BqFIkhPzUF+lo3N2WGwKeYVudfOuEUbbVeRTlAOnuwSZrDlMRtpNyc/hfAQYAFFwdv9Iba+4AAAAASUVORK5CYII=' |
|
|
|
|
: '/static/left_user.png' |
|
|
|
|
" |
|
|
|
|
class="img" |
|
|
|
|
/> |
|
|
|
|
" class="img" /> |
|
|
|
|
<view class="content"> |
|
|
|
|
<view style="width: 100%; overflow: hidden;"> |
|
|
|
|
<zeroMarkdownView :markdown="item.data || ''" /> |
|
|
|
|
</view> |
|
|
|
|
<!-- <ua-markdown :source="mdvalue" /> --> |
|
|
|
|
<view class="btnBox"> |
|
|
|
|
<view |
|
|
|
|
class="btn" |
|
|
|
|
@click="handleBtn(text)" |
|
|
|
|
v-for="(text, index) in item.options" |
|
|
|
|
:key="index" |
|
|
|
|
>{{ text }}</view |
|
|
|
|
> |
|
|
|
|
<view class="btn" @click="handleBtn(text)" v-for="(text, index) in item.options" :key="index"> |
|
|
|
|
{{ text||'' }}</view> |
|
|
|
|
</view> |
|
|
|
|
<view |
|
|
|
|
v-if="item.answerOptions && item.answerOptions.length > 0 && item.optionType == 1" |
|
|
|
|
style="display: flex; flex-wrap: wrap;" |
|
|
|
|
:class="item.answerOptions.length > 1 ? '' : 'btnBox'" |
|
|
|
|
> |
|
|
|
|
<u-checkbox-group |
|
|
|
|
v-model="item.checkboxValue1" |
|
|
|
|
placement="column" |
|
|
|
|
iconPlacement="right" |
|
|
|
|
style="width: 100%; padding: 0 15px; box-sizing: border-box" |
|
|
|
|
> |
|
|
|
|
<u-checkbox |
|
|
|
|
:customStyle="{ marginBottom: '8px' }" |
|
|
|
|
v-for="(item, index) in item.answerOptions" |
|
|
|
|
:key="index" |
|
|
|
|
:label="item" |
|
|
|
|
:name="item" |
|
|
|
|
style="background-color: #ededed;padding: 8px;" |
|
|
|
|
> |
|
|
|
|
<view v-if="item.answerOptions && item.answerOptions.length > 0 && item.optionType == 1" |
|
|
|
|
style="display: flex; flex-wrap: wrap;" :class="item.answerOptions.length > 1 ? '' : 'btnBox'"> |
|
|
|
|
<u-checkbox-group v-model="item.checkboxValue1" placement="column" iconPlacement="right" |
|
|
|
|
style="width: 100%; padding: 0 15px; box-sizing: border-box"> |
|
|
|
|
<u-checkbox :customStyle="{ marginBottom: '8px' }" |
|
|
|
|
v-for="(item, index) in item.answerOptions" :key="index" :label="item" :name="item" |
|
|
|
|
style="background-color: #ededed;padding: 8px;"> |
|
|
|
|
</u-checkbox> |
|
|
|
|
</u-checkbox-group> |
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<view |
|
|
|
|
v-if="item.answerOptions && item.answerOptions.length > 0 && item.optionType == 0" |
|
|
|
|
:style="item.answerOptions.length > 1 ? 'display: flex; flex-wrap: wrap;' : ''" |
|
|
|
|
:class="item.answerOptions.length > 1 ? '' : 'btnBox'" |
|
|
|
|
> |
|
|
|
|
<view v-if="item.answerOptions && item.answerOptions.length > 0 && item.optionType == 0" |
|
|
|
|
:style="item.answerOptions.length > 2 ? 'display: flex; flex-wrap: wrap;' : ''" |
|
|
|
|
:class="item.answerOptions.length > 2 ? '' : 'btnBox'"> |
|
|
|
|
<view v-for="(it, ind) in item.answerOptions" :key="ind" |
|
|
|
|
:style="it.length > 1 ? 'padding: 8px 8px;margin:0 0 8px 8px;background-color: #ededed;' : ''" |
|
|
|
|
:class="it.length > 1 ? '' : 'btn'" |
|
|
|
|
@click="handleGroup(it)"> |
|
|
|
|
{{ it }} |
|
|
|
|
:style="item.answerOptions.length > 2 ? 'padding: 8px 8px;margin:0 0 8px 8px;background-color: #ededed' : ''" |
|
|
|
|
:class="item.answerOptions.length > 2 ? '' : 'btn'" @click="handleGroup(it)"> |
|
|
|
|
{{ it ||''}} |
|
|
|
|
</view> |
|
|
|
|
<!-- <u-radio-group |
|
|
|
|
v-model="it.radiovalue1" |
|
|
|
@ -144,10 +101,8 @@ |
|
|
|
|
</u-radio> |
|
|
|
|
</u-radio-group> --> |
|
|
|
|
</view> |
|
|
|
|
<view |
|
|
|
|
class="btnBox" |
|
|
|
|
v-if="item.answerOptions && item.answerOptions.length > 0 && item.optionType == 1" |
|
|
|
|
> |
|
|
|
|
<view class="btnBox" |
|
|
|
|
v-if="item.answerOptions && item.answerOptions.length > 0 && item.optionType == 1"> |
|
|
|
|
<view class="btn" @click="handleGroup(item)">确认</view> |
|
|
|
|
<view class="btn" @click="handleGroup2(i)">清空</view> |
|
|
|
|
</view> |
|
|
|
@ -162,27 +117,12 @@ |
|
|
|
|
|
|
|
|
|
</view> |
|
|
|
|
</scroll-view> |
|
|
|
|
<view |
|
|
|
|
class="input-wrapper" |
|
|
|
|
:class="{ 'input-wrapper-expanded': isExpanded }" |
|
|
|
|
> |
|
|
|
|
<view class="input-wrapper" :class="{ 'input-wrapper-expanded': isExpanded }"> |
|
|
|
|
<view class="topContent"> |
|
|
|
|
<input |
|
|
|
|
class="uni-input" |
|
|
|
|
:placeholder="loading ? '请等待回复结束' : '请输入内容'" |
|
|
|
|
:value="inputValue" |
|
|
|
|
@confirm="handleSend" |
|
|
|
|
@input="onKeyInput" |
|
|
|
|
:disabled="loading" |
|
|
|
|
/> |
|
|
|
|
|
|
|
|
|
<uni-icons |
|
|
|
|
class="uni-icon" |
|
|
|
|
type="plus" |
|
|
|
|
size="30" |
|
|
|
|
@click="handlePlus" |
|
|
|
|
:disabled="loading" |
|
|
|
|
></uni-icons> |
|
|
|
|
<input class="uni-input" :placeholder="loading ? '请等待回复结束' : '请输入内容'" :value="inputValue" |
|
|
|
|
@confirm="handleSend" @input="onKeyInput" :disabled="loading" /> |
|
|
|
|
|
|
|
|
|
<uni-icons class="uni-icon" type="plus" size="30" @click="handlePlus" :disabled="loading"></uni-icons> |
|
|
|
|
</view> |
|
|
|
|
<view v-if="isExpanded" class="expanded"> |
|
|
|
|
<view @click="chooseImage" class="expandedItem"> |
|
|
|
@ -207,7 +147,9 @@ import zeroMarkdownView from "../../components/zeroMarkdownView/zeroMarkdownView |
|
|
|
|
// EventSourcePolyfill |
|
|
|
|
// } from 'event-source-polyfill'; |
|
|
|
|
import $ from "../../common/globalJs/globalJs.js"; |
|
|
|
|
import { fetchEventSource } from "@microsoft/fetch-event-source"; |
|
|
|
|
import { |
|
|
|
|
fetchEventSource |
|
|
|
|
} from "@microsoft/fetch-event-source"; |
|
|
|
|
// import { |
|
|
|
|
// baseUrl |
|
|
|
|
// } from '../../utils/config.js'; |
|
|
|
@ -220,8 +162,7 @@ export default { |
|
|
|
|
data() { |
|
|
|
|
return { |
|
|
|
|
active: 0, |
|
|
|
|
tablist: [ |
|
|
|
|
{ |
|
|
|
|
tablist: [{ |
|
|
|
|
title: "信息确认", |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
@ -344,14 +285,13 @@ export default { |
|
|
|
|
this.active = this.tabkey - 1 > 0 ? this.tabkey - 1 : 0; |
|
|
|
|
} |
|
|
|
|
if (this.msgList.length == 0) { |
|
|
|
|
this.msgList = [ |
|
|
|
|
{ |
|
|
|
|
this.msgList = [{ |
|
|
|
|
answerId, |
|
|
|
|
data: res.result.data.content, |
|
|
|
|
optionType: res.result.data?.optionType, |
|
|
|
|
answerOptions: res.result.data?res.result.data.answerOptions : [], |
|
|
|
|
}, |
|
|
|
|
]; |
|
|
|
|
answerOptions: res.result.data ? res.result.data.answerOptions : |
|
|
|
|
[], |
|
|
|
|
}, ]; |
|
|
|
|
} else { |
|
|
|
|
// debugger |
|
|
|
|
//回答 |
|
|
|
@ -371,7 +311,8 @@ export default { |
|
|
|
|
answerId: "1", |
|
|
|
|
data: res.result.data.content, |
|
|
|
|
optionType: res.result.data?.optionType, |
|
|
|
|
answerOptions: res.result.data?res.result.data.answerOptions : [], |
|
|
|
|
answerOptions: res.result.data ? res.result.data |
|
|
|
|
.answerOptions : [], |
|
|
|
|
}, |
|
|
|
|
]; |
|
|
|
|
} |
|
|
|
@ -496,8 +437,12 @@ console.log({ |
|
|
|
|
|
|
|
|
|
if (res && res.data && res.data.code == 200) { |
|
|
|
|
// console.log('request success', res.data) |
|
|
|
|
const { result = {} } = res.data; |
|
|
|
|
const { data = {} } = result; |
|
|
|
|
const { |
|
|
|
|
result = {} |
|
|
|
|
} = res.data; |
|
|
|
|
const { |
|
|
|
|
data = {} |
|
|
|
|
} = result; |
|
|
|
|
if (data.tabkey - 1 != this.active) { |
|
|
|
|
this.active = data.tabkey - 1 > 0 ? data.tabkey - 1 : 0; |
|
|
|
|
} |
|
|
|
@ -810,11 +755,12 @@ console.log({ |
|
|
|
|
display: flex; |
|
|
|
|
justify-content: flex-end; |
|
|
|
|
position: absolute; |
|
|
|
|
right: -4px; |
|
|
|
|
bottom: -42px; |
|
|
|
|
right: -0px; |
|
|
|
|
bottom: -44px; |
|
|
|
|
|
|
|
|
|
.btn { |
|
|
|
|
color: #2663BF; |
|
|
|
|
background-color: rgba(0, 102, 255, 0.1); |
|
|
|
|
color: #2663BF!important; |
|
|
|
|
background-color: rgba(0, 102, 255, 0.1)!important; |
|
|
|
|
display: flex; |
|
|
|
|
justify-content: center; |
|
|
|
|
align-items: center; |
|
|
|
@ -946,6 +892,7 @@ console.log({ |
|
|
|
|
animation-delay: 0.4s; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.loading-animation2 { |
|
|
|
|
width: 100%; |
|
|
|
|
height: 120rpx; |
|
|
|
@ -955,6 +902,7 @@ console.log({ |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@keyframes bounce { |
|
|
|
|
|
|
|
|
|
0%, |
|
|
|
|
80%, |
|
|
|
|
100% { |
|
|
|
|