mirror of
http://112.124.100.131/ebiz-ai/ebiz-ai-knowledge-manage.git
synced 2025-12-10 11:26:50 +08:00
feat(knowledge): 更新知识库列表和详情页面
- 修改知识库列表 API 接口 - 新增知识库详情 API 接口 - 实现知识库详情页面功能 - 优化知识库列表页面样式 - 调整 API 前缀以适应新环境
This commit is contained in:
@@ -1,73 +1,72 @@
|
||||
<template>
|
||||
<div id='index-container' class='container index-container'>
|
||||
<div id="index-container" class="container index-container">
|
||||
<el-card shadow="hover">
|
||||
<div slot="header" class="clearfix">
|
||||
<h3>知识库列表</h3>
|
||||
<p class='mt10 fs14' style='line-height: 20px'>易商数智知识库平台,旨在为用户提供更便捷、更灵敏、更全面的知识存储和操作平台,用户可以通过创建不同的知识库,完成对系统内知识的细分和储备。</p>
|
||||
<p class='mt10 fs14' style='line-height: 20px'>同时也可以通过修改和删除操作,对系统内知识体系进行修正和优化。</p>
|
||||
<el-button type='text' disabled class='mt10'>操作文档</el-button>
|
||||
<p class="mt10 fs14" style="line-height: 20px">
|
||||
易商数智知识库平台,旨在为用户提供更便捷、更灵敏、更全面的知识存储和操作平台,用户可以通过创建不同的知识库,完成对系统内知识的细分和储备。
|
||||
</p>
|
||||
<p class="mt10 fs14" style="line-height: 20px">同时也可以通过修改和删除操作,对系统内知识体系进行修正和优化。</p>
|
||||
<el-button type="text" disabled class="mt10">操作文档</el-button>
|
||||
</div>
|
||||
|
||||
|
||||
<div class='card-body'>
|
||||
<div class="card-body">
|
||||
<el-row>
|
||||
<el-col :span='8'>
|
||||
<el-input placeholder='输入知识库名称' v-model='nameLike'>
|
||||
<el-button slot="append" icon="el-icon-search" @click='getList'></el-button>
|
||||
<el-col :span="8">
|
||||
<el-input placeholder="输入知识库名称" v-model="nameLike">
|
||||
<el-button slot="append" icon="el-icon-search" @click="getList"></el-button>
|
||||
</el-input>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<div class='ledge-list mt20'>
|
||||
<el-card shadow="hover" class='item dashed' >
|
||||
<div @click='createdKnowLedge()'>
|
||||
<div class="ledge-list mt20">
|
||||
<el-card shadow="hover" class="item dashed">
|
||||
<div @click="createdKnowLedge()">
|
||||
新增知识库
|
||||
</div>
|
||||
</el-card>
|
||||
<el-card v-for='(item,index) in datasetList' class='item' shadow="hover" :key='index'>
|
||||
<div class='item-body flex '>
|
||||
<div >
|
||||
<div class='folder-content mr20 '>
|
||||
<svg-icon iconClass='folder' className='folder' ></svg-icon>
|
||||
<el-card v-for="(item, index) in datasetList" class="item" shadow="hover" :key="index">
|
||||
<div class="item-body flex ">
|
||||
<div>
|
||||
<div class="folder-content mr20 ">
|
||||
<svg-icon iconClass="folder" className="folder"></svg-icon>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<h4>{{item.name}}</h4>
|
||||
<p class='fs13 mt20 gray'>{{item.description}}</p>
|
||||
<h4>{{ item.name }}</h4>
|
||||
<p class="fs13 mt20 gray">{{ item.description }}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class='item-bottom mt20'>
|
||||
<el-button type='text' class='fs14' @click='knowLedgeDetail(item)'>查看详情</el-button>
|
||||
<el-button type='text' class='fs14'>修改</el-button>
|
||||
<el-button type='text' class='fs14 danger'>删除</el-button>
|
||||
<div class="item-bottom mt20">
|
||||
<el-button type="text" class="fs14" @click="knowLedgeDetail(item)">查看详情</el-button>
|
||||
<el-button type="text" class="fs14">修改</el-button>
|
||||
<el-button type="text" class="fs14 danger">删除</el-button>
|
||||
</div>
|
||||
|
||||
</el-card>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import {docManageDataset} from '@/api/generatedApi/index'
|
||||
import { docManageDataset } from '@/api/generatedApi/index'
|
||||
import knowledgeForm from '@/views/knowledge/detail/components/knowledgeForm.vue'
|
||||
|
||||
export default {
|
||||
name: 'index',
|
||||
data() {
|
||||
return {
|
||||
datasetList:[],
|
||||
nameLike:'',
|
||||
drawer:false,
|
||||
direction:'ltr',
|
||||
size:'50%',
|
||||
withHeader:false,
|
||||
drawerTitle:'创建知识库',
|
||||
knowledgeId:'',
|
||||
knowledgeForm:{
|
||||
name:'knowledgeForm',
|
||||
component:knowledgeForm
|
||||
datasetList: [],
|
||||
nameLike: '',
|
||||
drawer: false,
|
||||
direction: 'ltr',
|
||||
size: '50%',
|
||||
withHeader: false,
|
||||
drawerTitle: '创建知识库',
|
||||
knowledgeId: '',
|
||||
knowledgeForm: {
|
||||
name: 'knowledgeForm',
|
||||
component: knowledgeForm
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -78,44 +77,37 @@ export default {
|
||||
},
|
||||
filters: {},
|
||||
methods: {
|
||||
|
||||
getList (){
|
||||
docManageDataset({nameLike:this.nameLike}).then(res=>{
|
||||
console.log(res)
|
||||
this.datasetList = res.content.content.list
|
||||
getList() {
|
||||
docManageDataset({ nameLike: this.nameLike }).then(res => {
|
||||
this.datasetList = res.content.content
|
||||
})
|
||||
},
|
||||
createdKnowLedge() {
|
||||
|
||||
|
||||
this.$router.push({
|
||||
path:'/knowledge/knowledge-create',
|
||||
query:{
|
||||
datasetId:''
|
||||
path: '/knowledge/knowledge-create',
|
||||
query: {
|
||||
datasetId: ''
|
||||
}
|
||||
})
|
||||
},
|
||||
knowLedgeDetail(item){
|
||||
knowLedgeDetail(item) {
|
||||
this.$router.push({
|
||||
path:'/knowledge/detail',
|
||||
query:{
|
||||
datasetId:item.id
|
||||
path: '/knowledge/detail',
|
||||
query: {
|
||||
datasetId: item.id
|
||||
}
|
||||
})
|
||||
},
|
||||
},
|
||||
created() {
|
||||
}
|
||||
},
|
||||
created() {},
|
||||
mounted() {
|
||||
this.getList()
|
||||
},
|
||||
computed: {
|
||||
|
||||
}
|
||||
computed: {}
|
||||
}
|
||||
</script>
|
||||
<style scoped lang='scss'>
|
||||
.ledge-list{
|
||||
<style scoped lang="scss">
|
||||
.ledge-list {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
//justify-content: space-between;
|
||||
@@ -127,79 +119,75 @@ export default {
|
||||
margin-bottom: 20px;
|
||||
margin-left: 0; // 移除左右内边距
|
||||
margin-right: 25px;
|
||||
/deep/ .el-card__body {
|
||||
padding:0;
|
||||
& .item-body{
|
||||
padding:0 20px;
|
||||
/deep/ .el-card__body {
|
||||
padding: 0;
|
||||
& .item-body {
|
||||
padding: 0 20px;
|
||||
display: flex;
|
||||
height: 119px;
|
||||
margin-top:20px
|
||||
margin-top: 20px;
|
||||
}
|
||||
& .item-bottom{
|
||||
& .item-bottom {
|
||||
//padding:0 20px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
background: #F7F9FA;
|
||||
border-top: 1px solid #EFF0F1;
|
||||
& .el-button{
|
||||
color:#8D8F8F;
|
||||
width:33%;
|
||||
background: #f7f9fa;
|
||||
border-top: 1px solid #eff0f1;
|
||||
& .el-button {
|
||||
color: #8d8f8f;
|
||||
width: 33%;
|
||||
text-align: center;
|
||||
&:nth-child(2){
|
||||
position: relative;
|
||||
&::before{
|
||||
position: absolute;
|
||||
content: '';
|
||||
left:0;
|
||||
height:100%;
|
||||
width:1px;
|
||||
background: #EFF0F1;
|
||||
top:0
|
||||
}
|
||||
&::after{
|
||||
position: absolute;
|
||||
content: '';
|
||||
right:0;
|
||||
height:100%;
|
||||
width:1px;
|
||||
background: #EFF0F1;
|
||||
top:0
|
||||
}
|
||||
&:nth-child(2) {
|
||||
position: relative;
|
||||
&::before {
|
||||
position: absolute;
|
||||
content: '';
|
||||
left: 0;
|
||||
height: 100%;
|
||||
width: 1px;
|
||||
background: #eff0f1;
|
||||
top: 0;
|
||||
}
|
||||
&::after {
|
||||
position: absolute;
|
||||
content: '';
|
||||
right: 0;
|
||||
height: 100%;
|
||||
width: 1px;
|
||||
background: #eff0f1;
|
||||
top: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
& .item:nth-child(4n) {
|
||||
margin-right:0;
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
& .dashed{
|
||||
& .dashed {
|
||||
border: 1px dashed #dedede;
|
||||
cursor: pointer;
|
||||
text-align: center;
|
||||
line-height: 200px;
|
||||
color: #6666;
|
||||
&:hover{
|
||||
color: #409EFF;
|
||||
border: 1px dashed #409EFF;
|
||||
&:hover {
|
||||
color: #409eff;
|
||||
border: 1px dashed #409eff;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
& .folder-content{
|
||||
background-color: rgba(245, 248, 255,1);
|
||||
& .folder-content {
|
||||
background-color: rgba(245, 248, 255, 1);
|
||||
text-align: center;
|
||||
border-radius: 8px;
|
||||
padding:10px;
|
||||
& .folder{
|
||||
padding: 10px;
|
||||
& .folder {
|
||||
width: 40px;
|
||||
height:40px;
|
||||
height: 40px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user