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

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

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

Loading…
Cancel
Save