mirror of
http://112.124.100.131/ebiz-ai/ebiz-ai-knowledge-manage.git
synced 2025-12-09 02:46:50 +08:00
feat(knowledge): 新增知识库创建、删除功能并优化知识库列表和详情页面
- 新增知识库创建和删除接口 - 实现知识库创建、删除功能 - 优化知识库列表页面,增加删除按钮 - 更新知识库详情页面,支持修改功能- 修复知识库更新接口,改为 POST 方法
This commit is contained in:
@@ -39,8 +39,8 @@
|
||||
</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>
|
||||
<el-button type="text" class="fs14" @click='createdKnowLedge(item)'>修改</el-button>
|
||||
<el-button type="text" class="fs14 danger" @click='deleteKnowLedge(item)'>删除</el-button>
|
||||
</div>
|
||||
</el-card>
|
||||
</div>
|
||||
@@ -49,7 +49,7 @@
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { docManageDataset } from '@/api/generatedApi/index'
|
||||
import { docManageDataset,datasetDelete } from '@/api/generatedApi/index'
|
||||
import knowledgeForm from '@/views/knowledge/detail/components/knowledgeForm.vue'
|
||||
|
||||
export default {
|
||||
@@ -82,11 +82,11 @@ export default {
|
||||
this.datasetList = res.content.content
|
||||
})
|
||||
},
|
||||
createdKnowLedge() {
|
||||
createdKnowLedge(item) {
|
||||
this.$router.push({
|
||||
path: '/knowledge/knowledge-create',
|
||||
query: {
|
||||
datasetId: ''
|
||||
query:{
|
||||
datasetId: item?item.id:null
|
||||
}
|
||||
})
|
||||
},
|
||||
@@ -97,6 +97,22 @@ export default {
|
||||
datasetId: item.id
|
||||
}
|
||||
})
|
||||
},
|
||||
deleteKnowLedge(item) {
|
||||
this.$confirm('此操作将永久删除该知识库, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
.then(() => {
|
||||
datasetDelete({id: item.id}).then(res => {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '删除成功!'
|
||||
})
|
||||
this.getList()
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
created() {},
|
||||
|
||||
Reference in New Issue
Block a user