This commit is contained in:
liuye
2024-07-24 13:59:29 +08:00
parent 4006f2db54
commit 6fce1a6e34
3 changed files with 14 additions and 2 deletions

View File

@@ -7,7 +7,7 @@
</div> </div>
</div> </div>
<Talk v-if="!tabIndex && !showDetail" /> <Talk v-if="!tabIndex && !showDetail" />
<Record v-if="tabIndex && !showDetail" @toDetail="toDetail" /> <Record v-if="tabIndex && !showDetail" @toDetail="toDetail" ref="Record" />
<!-- <Detail v-if="showDetail" :params="params" @back="back" /> --> <!-- <Detail v-if="showDetail" :params="params" @back="back" /> -->
</div> </div>
</template> </template>
@@ -59,6 +59,11 @@ export default {
this.showDetail = false this.showDetail = false
} }
}, },
onReachBottom() {
if(this.tabIndex == 1) {
this.$refs.Record.nextPage()
}
}
}; };
</script> </script>

View File

@@ -67,6 +67,7 @@ export default {
if(!this.user.token) { if(!this.user.token) {
return this.$u.toast("请先进行登录") return this.$u.toast("请先进行登录")
} }
if(this.current > this.pages) return
this.$loading() this.$loading()
this.$http.post(`/app/appaicopilotinfo/listHistory?current=${this.current}&size=10&content=${this.searchVal}`).then(res => { this.$http.post(`/app/appaicopilotinfo/listHistory?current=${this.current}&size=10&content=${this.searchVal}`).then(res => {
if(res.code == 0 && res.data.records.length) { if(res.code == 0 && res.data.records.length) {
@@ -95,6 +96,7 @@ export default {
}, },
getSearchList() { getSearchList() {
this.current = 1 this.current = 1
this.pages = 2
this.getHistoryList() this.getHistoryList()
}, },
handerClear() { handerClear() {
@@ -117,6 +119,10 @@ export default {
}) })
}).catch(() => { }).catch(() => {
}) })
},
nextPage() {
this.current ++
this.getHistoryList()
} }
}, },
} }

View File

@@ -315,6 +315,7 @@ export default {
confirmType(val) { confirmType(val) {
this.aiConfigId = val[0].value this.aiConfigId = val[0].value
this.aiConfigName = val[0].label this.aiConfigName = val[0].label
this.messageList = []
}, },
getAiTypeList() { getAiTypeList() {
this.$http.post(`/app/appaiconfiginfo/list?status=1`).then(res => { this.$http.post(`/app/appaiconfiginfo/list?status=1`).then(res => {
@@ -326,7 +327,7 @@ export default {
this.typeList = res.data.records this.typeList = res.data.records
this.aiConfigId = this.typeList[0].dictValue this.aiConfigId = this.typeList[0].dictValue
this.aiConfigName = this.typeList[0].dictName this.aiConfigName = this.typeList[0].dictName
this.getHistoryList() // this.getHistoryList()
} }
}) })
} }