fix: 大模型调试

main
liyingang 1 year ago
parent 7f4434220e
commit 3dcb86ded4
  1. 11
      manifest.json
  2. 34
      pages/index/detail.vue
  3. 4
      pages/investigation/complete.vue

@ -2,8 +2,8 @@
"name": "隐患排查",
"appid": "__UNI__F12FECC",
"description": "",
"versionName" : "1.0.1.4",
"versionCode" : 1014,
"versionName": "1.0.1.6",
"versionCode": 1016,
"transformPx": false,
/* 5+App */
"app-plus": {
@ -45,7 +45,8 @@
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
]
],
"abiFilters": ["armeabi-v7a", "x86"]
},
/* ios */
"ios": {
@ -166,8 +167,8 @@
"https": false,
"proxy": {
"/HiatmpPro": {
"target" : "http://49.235.207.167:8800",
// "target" : "http://219.147.31.25:30001/tht-app-api",
// "target" : "http://49.235.207.167:8800",
"target": "http://219.147.31.25:30001/tht-app-api",
"changeOrigin": true,
"secure": false,
"pathRewrite": {

@ -1,6 +1,7 @@
<template>
<view class="detail" :data="params" :change:data="renderjs.renderjsGet" :imgArr="imgArr"
:change:imgArr="renderjs.getImgArr" :check="check" :change:check="renderjs.checkGet" :taskId="taskId" :change:taskId="renderjs.taskIdGet" >
:change:imgArr="renderjs.getImgArr" :check="check" :change:check="renderjs.checkGet" :taskId="taskId"
:change:taskId="renderjs.taskIdGet">
<!-- <view class="Content BorderBox Width100">
<top-title
:is-show-left="true"
@ -48,8 +49,7 @@
<view class="cur-time font-family-SR">
{{curTime}}
</view>
<view :class="['bar', item.answerId == '0' ? 'currAnswer' : '']" v-for="(item, i) in msgList"
:key="item.id">
<view :class="['bar', item.answerId == '0' ? 'currAnswer' : '']" v-for="(item, i) in msgList" :key="i">
<!-- <image
:src="
item.answerId == '0' ? '/static/self.png' : '/static/left_user.png'
@ -93,7 +93,8 @@
</u-checkbox-group>
</view>
<view v-if="item.answerOptions && item.answerOptions.length > 0 && item.optionType == 0"
<view
v-if="item.answerOptions && item.answerOptions.length > 0 && item.optionType == 0 && !item.check"
: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"
@ -119,7 +120,7 @@
</u-radio-group> -->
</view>
<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 && !item.check">
<view class="btn" @click="handleGroup2(i)">清空</view>
<view class="btn" @click="handleGroup(item)">确认</view>
</view>
@ -337,7 +338,10 @@
{
answerId: "1",
data: '',
},
optionType: res.result.data?.optionType,
answerOptions: res.result.data ? res.result.data
.answerOptions : [],
}
];
console.log('contentcontentcontent', content)
this.tempStr = content
@ -347,6 +351,7 @@
}, 50)
}
}
console.log('msgList', this.msgList)
// }
// debugger
@ -426,6 +431,7 @@
res.result.data?.optionType;
this.msgList[this.msgList.length - 1].answerOptions =
res.result.data ? res.result.data.answerOptions : [];
console.log('msgList', this.msgList)
} else {
//
this.msgList = [
@ -438,6 +444,7 @@
.answerOptions : [],
},
];
console.log('msgList', this.msgList)
}
}, index * 50)
})
@ -997,7 +1004,15 @@
} else {
text = item;
}
this.$set(this.msgList[this.msgList.length - 1], 'check', true)
this.msgList.push({
answerId: '0',
data: text
})
this.check = text
setTimeout(() => {
this.check = ''
}, 100)
return
this.handleSend(text);
},
@ -1056,6 +1071,7 @@
}
},
newSSE(voiceText, answerId = '') {
if (!voiceText) return
console.log('排查chat发送', voiceText, {
voiceText,
sceneFlag: "",
@ -1089,7 +1105,7 @@
stream: true,
type: "1",
id: this.params.id || '',
taskId: this.params.taskId || '',
taskId: this.params.taskId || this.taskId,
sectionId: this.params.sectionId || '',
sectionType: this.params.sectionType || '',
}),
@ -1097,6 +1113,10 @@
openWhenHidden: true,
onopen: () => {},
onmessage: (ev) => {
if (!this.taskId) {
const result = JSON.parse(ev.data);
this.taskId = result.taskId
}
console.log('chat内容返回', ev);
//
this.$ownerInstance.callMethod('sseBack', ev);

@ -379,7 +379,7 @@
this.getRoadTypes()
this.getEnumValues2()
this.getEnumValues3()
console.log(e.pageName)
console.log(e)
this.pageTitle = e.pageName || '排查'
this.approveStatus = e.approveStatus
this.isSP = e.isSP || 2
@ -390,7 +390,7 @@
this.type = e.type;
this.sectionType = e.sectionType
this.getBaseData(e.id);
this.getSectionNameList(e.sectionCode, e.taskName)
this.getSectionNameList(e.sectionCode, e.sectionName)
this.getTaskInfo()
this.getFileData()
this.getChartList()

Loading…
Cancel
Save