mirror of
http://112.124.100.131/ebiz-ai/ebiz-ai-knowledge-manage.git
synced 2025-12-09 10:56:50 +08:00
feat(knowledge): 添加知识拆分功能并优化相关页面
- 修改网站标题为"智能知识管理平台" - 新增上传组件样式和进度条样式 - 在知识表单中添加图标上传功能 - 优化知识拆分创建页面的逻辑 - 在知识信息页面添加去拆分按钮和相关路由跳转 - 优化知识信息组件的渲染方式
This commit is contained in:
@@ -2,7 +2,7 @@ module.exports = {
|
|||||||
/**
|
/**
|
||||||
* @description 网站标题
|
* @description 网站标题
|
||||||
*/
|
*/
|
||||||
title: '知识库',
|
title: '智能知识管理平台',
|
||||||
/**
|
/**
|
||||||
* @description 是否显示 tagsView
|
* @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/drawer';
|
||||||
@import 'renderSass/steps';
|
@import 'renderSass/steps';
|
||||||
@import 'renderSass/message';
|
@import 'renderSass/message';
|
||||||
|
@import 'renderSass/upload';
|
||||||
|
|
||||||
html,
|
html,
|
||||||
body,
|
body,
|
||||||
@@ -219,3 +220,13 @@ body,
|
|||||||
width: 50px;
|
width: 50px;
|
||||||
height: 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 :label="1">Q&A分段模式</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</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-form>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@@ -86,6 +121,11 @@ export default {
|
|||||||
name: 'knowledgeForm',
|
name: 'knowledgeForm',
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
uploadList: [],
|
||||||
|
dialogImageUrl: '',
|
||||||
|
dialogVisible: false,
|
||||||
|
disabled: false,
|
||||||
|
|
||||||
infoDialogVisible: false,
|
infoDialogVisible: false,
|
||||||
|
|
||||||
model: {
|
model: {
|
||||||
@@ -149,6 +189,17 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
handleRemove(file) {
|
||||||
|
console.log(file)
|
||||||
|
},
|
||||||
|
handlePictureCardPreview(file) {
|
||||||
|
this.dialogImageUrl = file.url
|
||||||
|
this.dialogVisible = true
|
||||||
|
},
|
||||||
|
handleDownload(file) {
|
||||||
|
console.log(file)
|
||||||
|
},
|
||||||
|
|
||||||
jumpKnowledgeList() {
|
jumpKnowledgeList() {
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
path: '/knowledge/list'
|
path: '/knowledge/list'
|
||||||
@@ -198,4 +249,9 @@ export default {
|
|||||||
computed: {}
|
computed: {}
|
||||||
}
|
}
|
||||||
</script>
|
</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
|
this.active = 0
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {},
|
created() {
|
||||||
|
let { documentId, datasetId, activeLevel } = this.$route.query
|
||||||
|
if (documentId) {
|
||||||
|
this.documentId = documentId
|
||||||
|
}
|
||||||
|
if (activeLevel) {
|
||||||
|
this.active = activeLevel
|
||||||
|
}
|
||||||
|
},
|
||||||
mounted() {},
|
mounted() {},
|
||||||
computed: {}
|
computed: {}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -330,7 +330,7 @@ export default {
|
|||||||
<knowledge-info
|
<knowledge-info
|
||||||
:form="activeForm"
|
:form="activeForm"
|
||||||
:fullscreen="true"
|
:fullscreen="true"
|
||||||
v-if="infoDialogVisible"
|
:key="activeForm.id"
|
||||||
></knowledge-info>
|
></knowledge-info>
|
||||||
</el-drawer>
|
</el-drawer>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -71,6 +71,17 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
toSplit() {
|
||||||
|
this.$router.push({
|
||||||
|
path: '/knowledge/detail/create',
|
||||||
|
query: {
|
||||||
|
documentId: this.form.id,
|
||||||
|
datasetId: this.form.datasetId,
|
||||||
|
activeLevel: 1
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
getPdfUrl,
|
getPdfUrl,
|
||||||
_getTaskDetail() {
|
_getTaskDetail() {
|
||||||
queryTask({ id: this.form.id }).then(res => {
|
queryTask({ id: this.form.id }).then(res => {
|
||||||
@@ -165,7 +176,16 @@ export default {
|
|||||||
:descriptions="descriptions"
|
:descriptions="descriptions"
|
||||||
/>
|
/>
|
||||||
</div>
|
</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>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user