mirror of
http://112.124.100.131/ebiz-ai/ebiz-ai-knowledge-manage.git
synced 2025-12-06 17:36:48 +08:00
feat(knowledge): 添加知识拆分功能并优化相关页面
- 修改网站标题为"智能知识管理平台" - 新增上传组件样式和进度条样式 - 在知识表单中添加图标上传功能 - 优化知识拆分创建页面的逻辑 - 在知识信息页面添加去拆分按钮和相关路由跳转 - 优化知识信息组件的渲染方式
This commit is contained in:
@@ -2,7 +2,7 @@ module.exports = {
|
||||
/**
|
||||
* @description 网站标题
|
||||
*/
|
||||
title: '知识库',
|
||||
title: '智能知识管理平台',
|
||||
/**
|
||||
* @description 是否显示 tagsView
|
||||
*/
|
||||
|
||||
17
src/assets/sass/renderSass/upload.scss
Normal file
17
src/assets/sass/renderSass/upload.scss
Normal file
@@ -0,0 +1,17 @@
|
||||
.el-upload--picture-card {
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
line-height: 90px;
|
||||
&:hover,
|
||||
&:focus {
|
||||
border-color: $--color-primary;
|
||||
color: $--color-primary;
|
||||
}
|
||||
}
|
||||
.el-upload-list--picture-card {
|
||||
& .el-upload-list__item {
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
line-height: 90px;
|
||||
}
|
||||
}
|
||||
@@ -8,6 +8,7 @@
|
||||
@import 'renderSass/drawer';
|
||||
@import 'renderSass/steps';
|
||||
@import 'renderSass/message';
|
||||
@import 'renderSass/upload';
|
||||
|
||||
html,
|
||||
body,
|
||||
@@ -219,3 +220,13 @@ body,
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
}
|
||||
|
||||
#nprogress {
|
||||
& .bar {
|
||||
background: $--color-primary-button-gradient;
|
||||
}
|
||||
& .peg {
|
||||
box-shadow: 0 0 10px $--color-primary-button-gradient,
|
||||
0 0 5px $--color-primary-button-gradient;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,6 +38,41 @@
|
||||
<el-radio :label="1">Q&A分段模式</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="图标" prop="segmentedMode">
|
||||
<el-upload
|
||||
action="#"
|
||||
list-type="picture-card"
|
||||
:file-list="uploadList"
|
||||
:auto-upload="false"
|
||||
:limit="1"
|
||||
>
|
||||
<i slot="default" class="el-icon-plus"></i>
|
||||
<div slot="file" slot-scope="{ file }">
|
||||
<img
|
||||
class="el-upload-list__item-thumbnail"
|
||||
:src="file.url"
|
||||
alt=""
|
||||
/>
|
||||
<span class="el-upload-list__item-actions">
|
||||
<span
|
||||
v-if="!disabled"
|
||||
class="el-upload-list__item-delete"
|
||||
@click="handleDownload(file)"
|
||||
>
|
||||
<i class="el-icon-download"></i>
|
||||
</span>
|
||||
<span
|
||||
v-if="!disabled"
|
||||
class="el-upload-list__item-delete"
|
||||
@click="handleRemove(file)"
|
||||
>
|
||||
<i class="el-icon-delete"></i>
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -86,6 +121,11 @@ export default {
|
||||
name: 'knowledgeForm',
|
||||
data() {
|
||||
return {
|
||||
uploadList: [],
|
||||
dialogImageUrl: '',
|
||||
dialogVisible: false,
|
||||
disabled: false,
|
||||
|
||||
infoDialogVisible: false,
|
||||
|
||||
model: {
|
||||
@@ -149,6 +189,17 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleRemove(file) {
|
||||
console.log(file)
|
||||
},
|
||||
handlePictureCardPreview(file) {
|
||||
this.dialogImageUrl = file.url
|
||||
this.dialogVisible = true
|
||||
},
|
||||
handleDownload(file) {
|
||||
console.log(file)
|
||||
},
|
||||
|
||||
jumpKnowledgeList() {
|
||||
this.$router.push({
|
||||
path: '/knowledge/list'
|
||||
@@ -198,4 +249,9 @@ export default {
|
||||
computed: {}
|
||||
}
|
||||
</script>
|
||||
<style scoped lang="scss"></style>
|
||||
<style scoped lang="scss">
|
||||
.el-upload--picture-card {
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -178,7 +178,15 @@ export default {
|
||||
this.active = 0
|
||||
}
|
||||
},
|
||||
created() {},
|
||||
created() {
|
||||
let { documentId, datasetId, activeLevel } = this.$route.query
|
||||
if (documentId) {
|
||||
this.documentId = documentId
|
||||
}
|
||||
if (activeLevel) {
|
||||
this.active = activeLevel
|
||||
}
|
||||
},
|
||||
mounted() {},
|
||||
computed: {}
|
||||
}
|
||||
|
||||
@@ -330,7 +330,7 @@ export default {
|
||||
<knowledge-info
|
||||
:form="activeForm"
|
||||
:fullscreen="true"
|
||||
v-if="infoDialogVisible"
|
||||
:key="activeForm.id"
|
||||
></knowledge-info>
|
||||
</el-drawer>
|
||||
</div>
|
||||
|
||||
@@ -71,6 +71,17 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
toSplit() {
|
||||
this.$router.push({
|
||||
path: '/knowledge/detail/create',
|
||||
query: {
|
||||
documentId: this.form.id,
|
||||
datasetId: this.form.datasetId,
|
||||
activeLevel: 1
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
getPdfUrl,
|
||||
_getTaskDetail() {
|
||||
queryTask({ id: this.form.id }).then(res => {
|
||||
@@ -165,7 +176,16 @@ export default {
|
||||
:descriptions="descriptions"
|
||||
/>
|
||||
</div>
|
||||
<div v-else class="p20">暂无知识内容</div>
|
||||
<div v-else class="p20 flex align-items-c">
|
||||
<div class="mr10 fs14">暂无知识内容</div>
|
||||
<el-button
|
||||
class="line-button render-button"
|
||||
@click="toSplit"
|
||||
disabled
|
||||
>
|
||||
去拆分</el-button
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user