|
@@ -4,15 +4,16 @@
|
|
|
<el-tab-pane label="推荐知识库" name=""> </el-tab-pane>
|
|
|
<el-tab-pane label="中心知识库" name="中心知识库"> </el-tab-pane>
|
|
|
<el-tab-pane label="部门知识库" name="部门知识库"> </el-tab-pane>
|
|
|
+ <el-tab-pane label="问答" name="issue" v-if="['LuZhou'].includes(themeConfig.appScope)"> </el-tab-pane>
|
|
|
</el-tabs>
|
|
|
- <div class="knowledge-input">
|
|
|
+ <div class="knowledge-input" v-if="['', '中心知识库', '部门知识库'].includes(state.queryParams.Attribution)">
|
|
|
<el-input v-model="state.queryParams.Keyword" placeholder="关键词" clearable class="mr10 w100" @keyup.enter="knowledgeRetrievalPaged">
|
|
|
<template #prefix>
|
|
|
<SvgIcon name="ele-Search" size="16px" />
|
|
|
</template>
|
|
|
<template #append>
|
|
|
<el-button type="primary" @click="knowledgeRetrievalPaged" class="search-button" size="small" round
|
|
|
- ><SvgIcon name="ele-Search" class="mr4" /> 查询
|
|
|
+ ><SvgIcon name="ele-Search" class="mr4" /> 查询
|
|
|
</el-button>
|
|
|
</template>
|
|
|
</el-input>
|
|
@@ -34,7 +35,7 @@
|
|
|
</el-radio-group>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="mt10 retrieval-content" v-loading="state.loading">
|
|
|
+ <div class="mt10 retrieval-content" v-loading="state.loading" v-if="['', '中心知识库', '部门知识库'].includes(state.queryParams.Attribution)">
|
|
|
<el-empty description="暂无数据" v-if="!state.knowledgeList.length" class="mb20">
|
|
|
<template #image>
|
|
|
<span></span>
|
|
@@ -45,8 +46,8 @@
|
|
|
<div class="mb10" style="display: flex">
|
|
|
<p class="text-no-wrap" style="flex: 1">{{ v.title }}</p>
|
|
|
<el-button type="primary" size="small" @click.stop="changeYYType(v)" v-if="['ZiGong'].includes(themeConfig.appScope)">{{
|
|
|
- v.isChoose ? '取消引用' : '引用'
|
|
|
- }}</el-button>
|
|
|
+ v.isChoose ? '取消引用' : '引用'
|
|
|
+ }}</el-button>
|
|
|
</div>
|
|
|
<!-- <div class="text-ellipsis2">{{ v.summary }}</div>-->
|
|
|
<div class="flex-center-between mt10 color-info">
|
|
@@ -71,7 +72,20 @@
|
|
|
v-model:page-size="state.queryParams.PageSize"
|
|
|
layout="prev, pager, next"
|
|
|
class="pt10"
|
|
|
+ v-if="['', '中心知识库', '部门知识库'].includes(state.queryParams.Attribution)"
|
|
|
/>
|
|
|
+ <div v-if="['issue'].includes(state.queryParams.Attribution)">
|
|
|
+ <el-input v-model="issueKeyword" placeholder="关键词" clearable class="mr10 w100" @keyup.enter="sendQIssue">
|
|
|
+ <template #prefix>
|
|
|
+ <SvgIcon name="ele-Search" size="16px" />
|
|
|
+ </template>
|
|
|
+ <template #append>
|
|
|
+ <el-button type="primary" @click="sendQIssue" size="small" round>发送 </el-button>
|
|
|
+ </template>
|
|
|
+ </el-input>
|
|
|
+ <el-empty description="暂无数据" v-if="!issueList" class="mb20"> </el-empty>
|
|
|
+ <el-scrollbar max-height="400px"> </el-scrollbar>
|
|
|
+ </div>
|
|
|
</template>
|
|
|
<script setup lang="ts" name="orderAcceptKnowledge">
|
|
|
// 定义变量内容
|
|
@@ -119,6 +133,7 @@ const state = reactive<any>({
|
|
|
});
|
|
|
// 手动查询,将页码设置为1
|
|
|
const handleQuery = () => {
|
|
|
+ if (state.queryParams.Attribution === 'issue') return;
|
|
|
state.queryParams.PageIndex = 1;
|
|
|
knowledgeRetrievalPaged();
|
|
|
};
|
|
@@ -233,6 +248,15 @@ watch(
|
|
|
},
|
|
|
{ immediate: true, deep: true }
|
|
|
);
|
|
|
+// 问答关键词
|
|
|
+const issueKeyword = ref('');
|
|
|
+// 发送问题
|
|
|
+const issueList = ref<EmptyArrayType>([]); // 问答列表
|
|
|
+const sendQIssue = () => {
|
|
|
+ if (!issueKeyword.value) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+};
|
|
|
onMounted(() => {
|
|
|
knowledgeRetrievalPaged();
|
|
|
});
|
|
@@ -268,4 +292,4 @@ defineExpose({
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-</style>
|
|
|
+</style>
|