@@ -118,13 +118,11 @@ export default {
pages: 2,
areaId: '',
statusBarHeight: uni.getSystemInfoSync().statusBarHeight,
- typeList: [
- {dictValue: '1', dictName: '文本助理'},
- {dictValue: '2', dictName: '日常助理'}
- ],
- type: '',
+ typeList: [],
+ aiConfigId: '',
+ aiConfigName: '',
showType: false,
- showPopup: true
+ showPopup: true,
}
},
computed: {
@@ -136,6 +134,7 @@ export default {
});
},
onShow() {
+ this.getAiTypeList()
this.getHistoryList()
},
onPullDownRefresh() {
@@ -218,7 +217,7 @@ export default {
return this.$u.toast("请先进行登录")
}
this.$loading()
- this.$instance.post("/app/appaicopilotinfo/add", {content: this.content, appType: 0, areaId: this.areaId}).then(res => {
+ this.$instance.post("/app/appaicopilotinfo/add", {content: this.content, appType: 0, areaId: this.areaId, aiConfigId: this.aiConfigId}).then(res => {
if(res.code == 0) {
this.content = ''
this.messageList.push(res.data[0])
@@ -238,7 +237,7 @@ export default {
return this.$u.toast("请先进行登录")
}
this.$loading()
- this.$instance.post("/app/appaicopilotinfo/add", {sdkFileUrl: this.voiceUrl, fileId: this.voiceId, appType: 0}).then(res => {
+ this.$instance.post("/app/appaicopilotinfo/add", {sdkFileUrl: this.voiceUrl, fileId: this.voiceId, appType: 0, aiConfigId: this.aiConfigId}).then(res => {
if(res.code == 0) {
this.voiceUrl = ''
this.voiceId = ''
@@ -262,7 +261,7 @@ export default {
return this.$u.toast("请先进行登录")
}
this.$loading()
- this.$instance.post(`/app/appaicopilotinfo/list?current=${this.current}&size=10`).then(res => {
+ this.$instance.post(`/app/appaicopilotinfo/list?current=${this.current}&size=10&aiConfigId=${this.aiConfigId}`).then(res => {
if(res.code == 0 && res.data.records.length) {
res.data.records.map((item) => {
if(item.sdkFileUrl) {
@@ -322,8 +321,23 @@ export default {
}
},
confirmType(val) {
- this.type = val[0].value;
+ this.aiConfigId = val[0].value
+ this.aiConfigName = val[0].label
},
+ getAiTypeList() {
+ this.$instance.post(`/app/appaiconfiginfo/list?status=1`).then(res => {
+ if(res.code == 0) {
+ res.data.records.map((item) => {
+ item.dictName = item.appName
+ item.dictValue = item.id
+ })
+ this.typeList = res.data.records
+ this.aiConfigId = this.typeList[0].dictValue
+ this.aiConfigName = this.typeList[0].dictName
+ this.getHistoryList()
+ }
+ })
+ }
},
}
diff --git a/src/project/baiduAI/AppRecord2/AppRecord.vue b/src/project/baiduAI/AppRecord2/AppRecord.vue
index 28f8ae3..81fe1aa 100644
--- a/src/project/baiduAI/AppRecord2/AppRecord.vue
+++ b/src/project/baiduAI/AppRecord2/AppRecord.vue
@@ -9,13 +9,13 @@