fix: 修改按钮

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

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

Loading…
Cancel
Save