diff --git a/ui/src/api/dataset.ts b/ui/src/api/dataset.ts index a5de294f0..1442a77dd 100644 --- a/ui/src/api/dataset.ts +++ b/ui/src/api/dataset.ts @@ -82,11 +82,29 @@ const getDocument: (dataset_id: string, name?: string) => Promise> = return get(`${prefix}/${dataset_id}/document`, name && { name }) } +/** + * 修改文档 + * @param 参数 + * dataset_id, document_id, + * { + "name": "string", + "is_active": true + } + */ +const putDocument: (dataset_id: string, document_id: string, data: any) => Promise> = ( + dataset_id, + document_id, + data: any +) => { + return put(`${prefix}/${dataset_id}/document/${document_id}`, data) +} + export default { getDateset, getAllDateset, delDateset, postDateset, postSplitDocument, - getDocument + getDocument, + putDocument } diff --git a/ui/src/components/app-table/index.vue b/ui/src/components/app-table/index.vue new file mode 100644 index 000000000..6f1a7badb --- /dev/null +++ b/ui/src/components/app-table/index.vue @@ -0,0 +1,96 @@ + + + + diff --git a/ui/src/components/index.ts b/ui/src/components/index.ts index 5453020d8..e3ac6770a 100644 --- a/ui/src/components/index.ts +++ b/ui/src/components/index.ts @@ -8,6 +8,8 @@ import TagsInput from './tags-input/index.vue' import CardBox from './card-box/index.vue' import CardAdd from './card-add/index.vue' import BackButton from './back-button/index.vue' +import AppTable from './app-table/index.vue' +import ReadWrite from './read-write/index.vue' export default { install(app: App) { @@ -20,5 +22,7 @@ export default { app.component(CardBox.name, CardBox) app.component(CardAdd.name, CardAdd) app.component(BackButton.name, BackButton) + app.component(AppTable.name, AppTable) + app.component(ReadWrite.name, ReadWrite) } } diff --git a/ui/src/components/read-write/index.vue b/ui/src/components/read-write/index.vue new file mode 100644 index 000000000..ec63523a3 --- /dev/null +++ b/ui/src/components/read-write/index.vue @@ -0,0 +1,60 @@ + + + diff --git a/ui/src/styles/app.scss b/ui/src/styles/app.scss index ad1524cdf..380df65f1 100644 --- a/ui/src/styles/app.scss +++ b/ui/src/styles/app.scss @@ -258,7 +258,7 @@ h4 { } // 表格第一行插入自定义行 -.table-custom-append { +.table-quick-append { .el-table__append-wrapper { position: absolute; top: 0; @@ -269,6 +269,7 @@ h4 { align-items: center; display: flex; padding: 0 12px; + cursor: pointer; &:hover { background: var(--el-color-primary-light-9); } @@ -277,3 +278,16 @@ h4 { margin-top: 49px; } } + +.success { + color: var(--el-color-success); +} +.danger { + color: var(--el-color-danger); +} +.warning { + color: var(--el-color-warning); +} +.primary { + color: var(--el-color-primary); +} diff --git a/ui/src/styles/element-plus.scss b/ui/src/styles/element-plus.scss index 43a07b551..cffc38266 100644 --- a/ui/src/styles/element-plus.scss +++ b/ui/src/styles/element-plus.scss @@ -120,6 +120,10 @@ } } +.el-pagination .el-select .el-input { + width: 100px; +} + // el-steps .el-step__icon { background: none; diff --git a/ui/src/views/dataset/CreateDataset.vue b/ui/src/views/dataset/CreateDataset.vue index eced95a7b..89a43e157 100644 --- a/ui/src/views/dataset/CreateDataset.vue +++ b/ui/src/views/dataset/CreateDataset.vue @@ -21,39 +21,39 @@