From 16c3dbc8c3363999bb72aadab3af702abd0b6a5e Mon Sep 17 00:00:00 2001 From: wangdan-fit2cloud Date: Thu, 30 Nov 2023 14:05:49 +0800 Subject: [PATCH 1/2] =?UTF-8?q?feat:=20=E6=A6=82=E8=A7=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ui/src/api/application.ts | 2 +- ui/src/views/application/AppOverview.vue | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ui/src/api/application.ts b/ui/src/api/application.ts index fe1cd7e25..a2d3a2d35 100644 --- a/ui/src/api/application.ts +++ b/ui/src/api/application.ts @@ -153,7 +153,7 @@ const getAccessToken: (applicaiton_id: string, loading?: Ref) => Promis applicaiton_id, loading ) => { - return get(`${prefix}/${applicaiton_id}/access-token`, undefined, loading) + return get(`${prefix}/${applicaiton_id}/access_token`, undefined, loading) } export default { diff --git a/ui/src/views/application/AppOverview.vue b/ui/src/views/application/AppOverview.vue index c58a496fc..1bf224699 100644 --- a/ui/src/views/application/AppOverview.vue +++ b/ui/src/views/application/AppOverview.vue @@ -17,7 +17,7 @@ - + 公开访问链接
@@ -29,7 +29,7 @@
- +
演示 @@ -89,7 +89,7 @@ function openDialog() { } function getAccessToken() { application.asyncGetAccessToken(id, loading).then((res) => { - shareUrl.value = application.location + res.data + shareUrl.value = application.location + res?.data?.access_token }) } From f1ea4bf6594adb600de72995cac357e6e9233bc8 Mon Sep 17 00:00:00 2001 From: wangdan-fit2cloud Date: Thu, 30 Nov 2023 16:35:52 +0800 Subject: [PATCH 2/2] =?UTF-8?q?feat:=20=E5=85=B3=E8=81=94=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E9=9B=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ui/src/api/dataset.ts | 5 +- ui/src/components/card-checkbox/index.vue | 91 +++++++++++++------ .../dynamics-form/items/radio/RadioCard.vue | 4 +- .../items/table/TableCheckbox.vue | 2 +- .../dynamics-form/items/table/TableRadio.vue | 2 +- ui/src/stores/modules/dataset.ts | 5 +- ui/src/views/application/CreateAndSetting.vue | 29 +++--- .../components/AddDatasetDialog.vue | 40 ++++---- .../views/template/component/CreateModel.vue | 2 +- 9 files changed, 115 insertions(+), 65 deletions(-) diff --git a/ui/src/api/dataset.ts b/ui/src/api/dataset.ts index 9247e4e4a..a75b0a254 100644 --- a/ui/src/api/dataset.ts +++ b/ui/src/api/dataset.ts @@ -2,6 +2,7 @@ import { Result } from '@/request/Result' import { get, post, del, put } from '@/request/index' import type { datasetData } from '@/api/type/dataset' import type { pageRequest } from '@/api/type/common' +import { type Ref } from 'vue' const prefix = '/dataset' /** @@ -23,8 +24,8 @@ const getDateset: (param: pageRequest) => Promise> = (param) => { * 获取全部数据集 * @param 参数 */ -const getAllDateset: () => Promise> = () => { - return get(`${prefix}`) +const getAllDateset: (loading?: Ref) => Promise> = (loading) => { + return get(`${prefix}`, undefined, loading) } /** diff --git a/ui/src/components/card-checkbox/index.vue b/ui/src/components/card-checkbox/index.vue index 7d4e9f408..bf8fc431b 100644 --- a/ui/src/components/card-checkbox/index.vue +++ b/ui/src/components/card-checkbox/index.vue @@ -1,51 +1,90 @@ diff --git a/ui/src/components/dynamics-form/items/radio/RadioCard.vue b/ui/src/components/dynamics-form/items/radio/RadioCard.vue index 6029b90b7..492cff408 100644 --- a/ui/src/components/dynamics-form/items/radio/RadioCard.vue +++ b/ui/src/components/dynamics-form/items/radio/RadioCard.vue @@ -70,8 +70,8 @@ watch( .active { border-radius: 4px; - background: rgba(51, 112, 255, 0.1); - color: #3370ff; + background: var(--el-color-primary-light-9); + color: var(--el-color-primary); } .item { cursor: pointer; diff --git a/ui/src/components/dynamics-form/items/table/TableCheckbox.vue b/ui/src/components/dynamics-form/items/table/TableCheckbox.vue index 4a51f2131..8c26ae9dc 100644 --- a/ui/src/components/dynamics-form/items/table/TableCheckbox.vue +++ b/ui/src/components/dynamics-form/items/table/TableCheckbox.vue @@ -205,7 +205,7 @@ const activeText = computed(() => { color: rgba(100, 106, 115, 1); .active { margin-left: 3px; - color: rgba(51, 112, 255, 1); + color: var(--el-color-primary); } } diff --git a/ui/src/components/dynamics-form/items/table/TableRadio.vue b/ui/src/components/dynamics-form/items/table/TableRadio.vue index c9230ef96..63d58cc87 100644 --- a/ui/src/components/dynamics-form/items/table/TableRadio.vue +++ b/ui/src/components/dynamics-form/items/table/TableRadio.vue @@ -193,7 +193,7 @@ const activeText = computed(() => { color: rgba(100, 106, 115, 1); .active { margin-left: 3px; - color: rgba(51, 112, 255, 1); + color: var(--el-color-primary); } } diff --git a/ui/src/stores/modules/dataset.ts b/ui/src/stores/modules/dataset.ts index 0ea9217ca..ca4219b86 100644 --- a/ui/src/stores/modules/dataset.ts +++ b/ui/src/stores/modules/dataset.ts @@ -2,6 +2,7 @@ import { defineStore } from 'pinia' import type { datasetData } from '@/api/type/dataset' import type { UploadUserFile } from 'element-plus' import datasetApi from '@/api/dataset' +import { type Ref } from 'vue' export interface datasetStateTypes { baseInfo: datasetData | null @@ -21,10 +22,10 @@ const useDatasetStore = defineStore({ saveDocumentsFile(file: UploadUserFile[]) { this.documentsFiles = file }, - async asyncGetAllDateset() { + async asyncGetAllDateset(loading?: Ref) { return new Promise((resolve, reject) => { datasetApi - .getAllDateset() + .getAllDateset(loading) .then((data) => { resolve(data) }) diff --git a/ui/src/views/application/CreateAndSetting.vue b/ui/src/views/application/CreateAndSetting.vue index 98f15cf32..cf9b0cdf1 100644 --- a/ui/src/views/application/CreateAndSetting.vue +++ b/ui/src/views/application/CreateAndSetting.vue @@ -155,7 +155,14 @@
- + {{ datasetLoading }} + diff --git a/ui/src/views/template/component/CreateModel.vue b/ui/src/views/template/component/CreateModel.vue index 978224100..336285497 100644 --- a/ui/src/views/template/component/CreateModel.vue +++ b/ui/src/views/template/component/CreateModel.vue @@ -191,7 +191,7 @@ defineExpose({ open, close }) line-height: 24px; cursor: pointer; &:hover { - color: rgba(51, 112, 255, 1); + color: var(--el-color-primary); } } .active-breadcrumb {