|
@@ -79,7 +79,7 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="assistant-main-content">
|
|
|
- <chatCom ref="ref_chat" @getText="getText"/>
|
|
|
+ <chatCom ref="ref_chat" @getText="getText" @getSuggest="getSuggest" @loadingSuggest="state.adviseList.loading = true"/>
|
|
|
</div>
|
|
|
</div>
|
|
|
<CzrDialog
|
|
@@ -192,21 +192,21 @@ const state: any = reactive({
|
|
|
},
|
|
|
adviseList: {
|
|
|
loading: false,
|
|
|
- value: 'question',
|
|
|
+ value: 'wenti',
|
|
|
options: [
|
|
|
- {label: '相关问题', value: 'question'},
|
|
|
- {label: '相关政策', value: 'policy'},
|
|
|
- {label: '相关事项', value: 'item'},
|
|
|
+ {label: '相关问题', value: 'wenti'},
|
|
|
+ {label: '相关政策', value: 'zhengce'},
|
|
|
+ {label: '相关事项', value: 'shixiang'},
|
|
|
],
|
|
|
- question: [],
|
|
|
- policy: [],
|
|
|
- item: [],
|
|
|
+ wenti: [],
|
|
|
+ zhengce: [],
|
|
|
+ shixiang: [],
|
|
|
},
|
|
|
})
|
|
|
const ref_chat = ref()
|
|
|
const getText = (text: string) => {
|
|
|
setAskList(text)
|
|
|
- initRelation(text)
|
|
|
+ // initRelation(text)
|
|
|
}
|
|
|
const setAskList = (text: string) => {
|
|
|
const nowAsk = localStorage.getItem(askKey) ? localStorage.getItem(askKey).split(askSplit) : []
|
|
@@ -262,7 +262,7 @@ const initRelation = (text = '') => {
|
|
|
}
|
|
|
}
|
|
|
staticConQueryQuestionslist(params1).then(res => {
|
|
|
- state.adviseList.question = res?.data?.list.map(v => ({name: v.title, url: `https://iport.ka.sz.gov.cn/szka/article?id=${v.id}&type=cjwt`})) || []
|
|
|
+ state.adviseList.wenti = res?.data?.list.map(v => ({name: v.title, url: `https://iport.ka.sz.gov.cn/szka/article?id=${v.id}&type=cjwt`})) || []
|
|
|
})
|
|
|
const params2 = {
|
|
|
data: {
|
|
@@ -274,7 +274,7 @@ const initRelation = (text = '') => {
|
|
|
}
|
|
|
}
|
|
|
matterQueryMatterlist(params2).then(res => {
|
|
|
- state.adviseList.item = res?.data?.list.map(v => ({name: v.mattersName, url: v.workGuide})) || []
|
|
|
+ state.adviseList.shixiang = res?.data?.list.map(v => ({name: v.mattersName, url: v.workGuide})) || []
|
|
|
})
|
|
|
const params3 = {
|
|
|
data: {
|
|
@@ -286,12 +286,18 @@ const initRelation = (text = '') => {
|
|
|
}
|
|
|
}
|
|
|
policyInfoQueryPolicyInfolist(params3).then(res => {
|
|
|
- state.adviseList.policy = res?.data?.list.map(v => ({name: v.contentTitle, url: `https://iport.ka.sz.gov.cn/szka/article?id=${v.id}&type=zczx`})) || []
|
|
|
+ state.adviseList.zhengce = res?.data?.list.map(v => ({name: v.contentTitle, url: `https://iport.ka.sz.gov.cn/szka/article?id=${v.id}&type=zczx`})) || []
|
|
|
})
|
|
|
}
|
|
|
const toUrl = (url) => {
|
|
|
window.open(url, '_blank');
|
|
|
}
|
|
|
+const getSuggest = (json) => {
|
|
|
+ state.adviseList.wenti = json.wenti || []
|
|
|
+ state.adviseList.zhengce = json.zhengce || []
|
|
|
+ state.adviseList.shixiang = json.shixiang || []
|
|
|
+ state.adviseList.loading = false
|
|
|
+}
|
|
|
onMounted(() => {
|
|
|
initTheme()
|
|
|
initRelation()
|