mirror of
http://112.124.100.131/ebiz-ai/ebiz-ai-knowledge-manage.git
synced 2025-12-09 19:06:49 +08:00
feat(knowledge): 新增知识库创建功能
- 添加知识库创建表单组件 knowledgeForm - 实现知识库创建逻辑和界面- 集成 loading 组件用于表单提交时的加载效果 - 更新路由配置,增加知识库创建页面
This commit is contained in:
@@ -12,14 +12,18 @@
|
||||
<div class='card-body'>
|
||||
<el-row>
|
||||
<el-col :span='8'>
|
||||
<el-input placeholder='输入知识库名称'>
|
||||
<el-button slot="append" icon="el-icon-search"></el-button>
|
||||
<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' @click='createdKnowLedge'>新增知识库</el-card>
|
||||
<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 >
|
||||
@@ -33,47 +37,70 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class='item-bottom mt20'>
|
||||
<el-button type='text' class='fs14' @click='knowLedgeDetail'>查看详情</el-button>
|
||||
<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'>删除</el-button>
|
||||
<el-button type='text' class='fs14 danger'>删除</el-button>
|
||||
</div>
|
||||
|
||||
</el-card>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
<div class='table-container'>
|
||||
<div class='button-container'></div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import {docManageDataset} from '@/api/generatedApi/index'
|
||||
import knowledgeForm from '@/views/knowledge/detail/components/knowledgeForm.vue'
|
||||
|
||||
export default {
|
||||
name: 'index',
|
||||
data() {
|
||||
return {
|
||||
datasetList:[]
|
||||
datasetList:[],
|
||||
nameLike:'',
|
||||
drawer:false,
|
||||
direction:'ltr',
|
||||
size:'50%',
|
||||
withHeader:false,
|
||||
drawerTitle:'创建知识库',
|
||||
knowledgeId:'',
|
||||
knowledgeForm:{
|
||||
name:'knowledgeForm',
|
||||
component:knowledgeForm
|
||||
}
|
||||
}
|
||||
},
|
||||
props: {},
|
||||
watch: {},
|
||||
components: {},
|
||||
components: {
|
||||
knowledgeForm
|
||||
},
|
||||
filters: {},
|
||||
methods: {
|
||||
|
||||
getList (){
|
||||
docManageDataset({nameLike:''}).then(res=>{
|
||||
docManageDataset({nameLike:this.nameLike}).then(res=>{
|
||||
console.log(res)
|
||||
this.datasetList = res.content.content.list
|
||||
})
|
||||
},
|
||||
createdKnowLedge() {
|
||||
},
|
||||
knowLedgeDetail(){
|
||||
|
||||
|
||||
this.$router.push({
|
||||
path:'/knowledge/detail'
|
||||
path:'/knowledge/knowledge-create',
|
||||
query:{
|
||||
datasetId:''
|
||||
}
|
||||
})
|
||||
},
|
||||
knowLedgeDetail(item){
|
||||
this.$router.push({
|
||||
path:'/knowledge/detail',
|
||||
query:{
|
||||
datasetId:item.id
|
||||
}
|
||||
})
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user