fix: 修改按钮

main
liyingang 10 months ago
parent 6d5b9381a6
commit 234e6d1c3f
  1. 117
      pages/index/detail.vue

@ -30,7 +30,8 @@
stepCircle: index > active,
}">{{ 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">
@ -58,12 +59,13 @@
<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>
{{ 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'">
@ -104,8 +106,8 @@
</view>
<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 class="btn" @click="handleGroup(item)">确认</view>
</view>
<!-- v-if="isShowYindao && item.isOver" -->
<view class="yindao" @click="clickYinDao(item.reference)">
@ -141,13 +143,13 @@
</view>
</view>
<u-popup :show="showYinDao" @close="showYinDao = false">
<view class="custom-pop-head">
<view class="title">{{ dataYinDao.title }}</view>
<uni-icons class="left" type="closeempty" size="23" @click="showYinDao = false"></uni-icons>
</view>
<view class="custom-pop-content">
{{ dataYinDao.content }}
</view>
<view class="custom-pop-head">
<view class="title">{{ dataYinDao.title }}</view>
<uni-icons class="left" type="closeempty" size="23" @click="showYinDao = false"></uni-icons>
</view>
<view class="custom-pop-content">
{{ dataYinDao.content }}
</view>
</u-popup>
</view>
</template>
@ -189,7 +191,7 @@
title: "工单生成",
},
],
isShowYindao:false,
isShowYindao: false,
inputValue: "",
es: null,
msgList: [],
@ -234,9 +236,9 @@
// this.SSE("," + str, "1");
if (params.id != "undefined") {
console.log('2222222222222222222222222222222')
setTimeout(() =>{
setTimeout(() => {
this.queryChat("开始隐患排查," + str);
},500)
}, 500)
} else {
this.$.toast('缺少相关信息');
@ -267,12 +269,12 @@
// },
methods: {
clickYinDao(data) {
console.log('data12121 ========>',data)
console.log('data12121 ========>', data)
this.showYinDao = true
// let newData = data.content + data.reference.content
// const timer = setInterval(() => {
// data.content += data.reference.content
// if (newdata == data.content) {
// clearInterval(timer);
// }
@ -281,7 +283,7 @@
this.dataYinDao = data
// const timer = setInterval(() => {
// data += data.reference ? data.reference.content :''
// if (this.dataYinDao == data.content) {
// clearInterval(timer);
// }
@ -291,7 +293,7 @@
// icon: "none",
// duration: 2000,
// });
// data.content += data.reference.content
},
// SSE
@ -322,7 +324,7 @@
openWhenHidden: true,
onopen: () => {},
onmessage: (ev) => {
console.log('ev ==========》',ev);
console.log('ev ==========》', ev);
this.loading = true;
const res = JSON.parse(ev.data);
if (res?.code == 200 && res.result) {
@ -424,10 +426,10 @@
id += 2
})
this.msgList = arr
console.log('msgList =========>',this.msgList)
console.log('msgList =========>', this.msgList)
}
},
async queryChat(voiceText) {
// console.log(voiceText,"voiceText");
@ -499,7 +501,7 @@
this.active = data.tabkey - 1 > 0 ? data.tabkey - 1 : 0;
}
if (data.content) {
console.log('1212111111111111111111111 ===========>',data)
console.log('1212111111111111111111111 ===========>', data)
this.changeMsgList(
data.answerId || "1",
data.content,
@ -508,13 +510,21 @@
data.reference
);
}
if(JSON.stringify(data.reference) != '{}'){
if(data.reference.content != null && data.reference.title != null) {
if (JSON.stringify(data.reference) != '{}') {
if (data.reference.content != null && data.reference.title != null) {
this.isShowYindao = true
this.$nextTick(() => {
if (item.isOver) {
this.msgList.forEach(item => {
item.data = item.data +
`<img src=${yindaoPng} width=20px height=20px class=yindao/>`
})
}
})
} else {
this.isShowYindao = false
}
}else{
} else {
this.isShowYindao = false
}
this.loading = false;
@ -586,11 +596,11 @@
data = data.replace("undefined", '')
data = data.replace("null", '')
this.msgList = [...this.msgList]
console.log('this.msgList ==========>',this.msgList)
console.log('this.msgList ==========>', this.msgList)
if (this.msgList.length > 0) {
id = this.msgList[this.msgList.length - 1].id + 1;
}
console.log('id ========>',id)
console.log('id ========>', id)
if (answerId == "1") {
//
let newdata = "";
@ -614,8 +624,10 @@
this.scrollBottom();
if (newdata == data) {
this.msgList[this.msgList.length - 1].data += `<image src="../../static/nav/yindao.png" style="height: 40rpx; width: 40rpx;"></image>`
console.log('this.msgList[this.msgList.length - 1].data', this.msgList[this.msgList.length - 1].data)
this.msgList[this.msgList.length - 1].data +=
`<image src="../../static/nav/yindao.png" style="height: 40rpx; width: 40rpx;"></image>`
console.log('this.msgList[this.msgList.length - 1].data', this.msgList[this.msgList
.length - 1].data)
if (optionType == 0 || optionType == 1) {
this.msgList[this.msgList.length - 1].optionType = optionType;
this.msgList[this.msgList.length - 1].answerOptions =
@ -831,15 +843,15 @@
bottom: -44px;
.btn {
color: #2663BF!important;
background-color: rgba(0, 102, 255, 0.1)!important;
color: #2663BF !important;
background-color: rgba(0, 102, 255, 0.1) !important;
display: flex;
justify-content: center;
align-items: center;
// width: 132px;
min-width: 72rpx;
padding: 10rpx 14rpx;
margin: 10rpx ;
margin: 10rpx;
border-radius: 4rpx;
font-size: 30rpx;
}
@ -986,7 +998,8 @@
transform: scale(1);
}
}
.yindao{
.yindao {
padding: 15rpx;
margin: 0 5px;
font-size: 15px;
@ -994,25 +1007,29 @@
word-spacing: 0.1em;
color: rgba(0, 102, 255, 1)
}
.custom-pop-head {
width: 100%;
padding: 20rpx 0;
display: flex;
align-items: center;
justify-content: space-between;
border-bottom: 1px solid #E6E6E6;
margin-bottom: 20rpx;
.left {
color: #666666;
font-size: 16px;
margin-right: 20rpx;
}
.title {
font-size: 18px;
margin-left: 20rpx;
}
width: 100%;
padding: 20rpx 0;
display: flex;
align-items: center;
justify-content: space-between;
border-bottom: 1px solid #E6E6E6;
margin-bottom: 20rpx;
.left {
color: #666666;
font-size: 16px;
margin-right: 20rpx;
}
.title {
font-size: 18px;
margin-left: 20rpx;
}
}
.custom-pop-content{
.custom-pop-content {
margin: 20rpx;
font-size: 16px;
line-height: 2.3;

Loading…
Cancel
Save