-
+
+
+
+
-
+
@@ -19,12 +22,7 @@
diff --git a/ui/src/views/dataset/index.vue b/ui/src/views/dataset/index.vue
index f65f080d5..4cc161389 100644
--- a/ui/src/views/dataset/index.vue
+++ b/ui/src/views/dataset/index.vue
@@ -22,7 +22,7 @@
>
-
+
@@ -107,17 +107,20 @@
+
-
diff --git a/ui/src/views/log/component/EditMarkDialog.vue b/ui/src/views/log/component/EditMarkDialog.vue
index cae7155c5..29adb9282 100644
--- a/ui/src/views/log/component/EditMarkDialog.vue
+++ b/ui/src/views/log/component/EditMarkDialog.vue
@@ -141,4 +141,13 @@ const submit = async (formEl: FormInstance) => {
defineExpose({ open })
-
+
diff --git a/ui/src/views/paragraph/component/ParagraphForm.vue b/ui/src/views/paragraph/component/ParagraphForm.vue
index 4a1b1028b..814c5f24e 100644
--- a/ui/src/views/paragraph/component/ParagraphForm.vue
+++ b/ui/src/views/paragraph/component/ParagraphForm.vue
@@ -23,7 +23,7 @@
v-if="isEdit"
v-model="form.content"
placeholder="请输入分段内容"
- :maxLength="4096"
+ :maxLength="100000"
:preview="false"
:toolbars="toolbars"
style="height: 300px"
@@ -31,7 +31,7 @@
:footers="footers"
>
- / 4096
+ / 100000
+
+
+ 权限
+
+
+
+
+
+
+
+
+ {{ value }}
+
+ {{ PermissionDesc[key] }}
+
+
+
+
+
+
+
+
模型类型
@@ -74,6 +100,7 @@
>
+
@@ -135,6 +162,7 @@ import type { FormField } from '@/components/dynamics-form/type'
import DynamicsForm from '@/components/dynamics-form/index.vue'
import type { FormRules } from 'element-plus'
import { MsgSuccess } from '@/utils/message'
+import { PermissionType, PermissionDesc } from '@/enums/model'
const providerValue = ref
()
const dynamicsFormRef = ref>()
@@ -150,17 +178,18 @@ const dialogVisible = ref(false)
const base_form_data_rule = ref({
name: { required: true, trigger: 'blur', message: '模型名不能为空' },
+ permission_type: { required: true, trigger: 'change', message: '权限不能为空' },
model_type: { required: true, trigger: 'change', message: '模型类型不能为空' },
model_name: { required: true, trigger: 'change', message: '基础模型不能为空' }
})
const base_form_data = ref<{
name: string
-
+ permission_type: string
model_type: string
model_name: string
-}>({ name: '', model_type: '', model_name: '' })
+}>({ name: '', model_type: '', model_name: '', permission_type: 'PRIVATE' })
const credential_form_data = ref>({})
@@ -212,7 +241,7 @@ const list_base_model = (model_type: any) => {
}
const close = () => {
- base_form_data.value = { name: '', model_type: '', model_name: '' }
+ base_form_data.value = { name: '', model_type: '', model_name: '', permission_type: 'PRIVATE' }
credential_form_data.value = {}
model_form_field.value = []
base_model_list.value = []
diff --git a/ui/src/views/template/component/EditModel.vue b/ui/src/views/template/component/EditModel.vue
index d506f041c..9278906f3 100644
--- a/ui/src/views/template/component/EditModel.vue
+++ b/ui/src/views/template/component/EditModel.vue
@@ -48,6 +48,32 @@
placeholder="请给基础模型设置一个名称"
/>
+
+
+ 权限
+
+
+
+
+
+
+
+
+ {{ value }}
+
+ {{ PermissionDesc[key] }}
+
+
+
+
+
+
+
+
模型类型
@@ -128,7 +154,7 @@ import type { FormField } from '@/components/dynamics-form/type'
import DynamicsForm from '@/components/dynamics-form/index.vue'
import type { FormRules } from 'element-plus'
import { MsgSuccess } from '@/utils/message'
-import AppIcon from '@/components/icons/AppIcon.vue'
+import { PermissionType, PermissionDesc } from '@/enums/model'
const providerValue = ref()
const dynamicsFormRef = ref>()
@@ -151,11 +177,11 @@ const base_form_data_rule = ref({
const base_form_data = ref<{
name: string
-
+ permission_type: string
model_type: string
model_name: string
-}>({ name: '', model_type: '', model_name: '' })
+}>({ name: '', model_type: '', model_name: '', permission_type: 'PRIVATE' })
const credential_form_data = ref>({})
@@ -204,6 +230,7 @@ const open = (provider: Provider, model: Model) => {
base_form_data.value = {
name: model.name,
+ permission_type: model.permission_type,
model_type: model.model_type,
model_name: model.model_name
}
@@ -214,7 +241,7 @@ const open = (provider: Provider, model: Model) => {
}
const close = () => {
- base_form_data.value = { name: '', model_type: '', model_name: '' }
+ base_form_data.value = { name: '', model_type: '', model_name: '', permission_type: '' }
dynamicsFormRef.value?.ruleFormRef?.resetFields()
credential_form_data.value = {}
model_form_field.value = []
diff --git a/ui/src/views/template/component/ModelCard.vue b/ui/src/views/template/component/ModelCard.vue
index 1446031c3..3d91533f9 100644
--- a/ui/src/views/template/component/ModelCard.vue
+++ b/ui/src/views/template/component/ModelCard.vue
@@ -1,16 +1,30 @@
-
+
-
- {{ model.name }}
-
-
-
失败
-
-
-
+
+
+
+ {{ model.name }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 私有
+ 公有
+
@@ -29,18 +43,14 @@
-
-
- {{ percentage }}%
-
-
-
正在下载
+
+
+
+ 正在下载中
+ 取消下载
+
@@ -48,7 +58,13 @@
-
+
@@ -68,6 +84,7 @@ import type { Provider, Model } from '@/api/type/model'
import ModelApi from '@/api/model'
import { computed, ref, onMounted, onBeforeUnmount } from 'vue'
import EditModel from '@/views/template/component/EditModel.vue'
+import DownloadLoading from '@/components/loading/DownloadLoading.vue'
import { MsgConfirm } from '@/utils/message'
const props = defineProps<{
@@ -94,27 +111,6 @@ const errMessage = computed(() => {
}
return ''
})
-const progress = computed(() => {
- if (currentModel.value) {
- const down_model_chunk = currentModel.value.meta['down_model_chunk']
- if (down_model_chunk) {
- const maxObj = down_model_chunk
- .filter((chunk: any) => chunk.index > 1)
- .reduce(
- (prev: any, current: any) => {
- return (prev.index || 0) > (current.index || 0) ? prev : current
- },
- { progress: 0 }
- )
- if (maxObj) {
- return parseFloat(maxObj.progress?.toFixed(1))
- }
- return 0
- }
- return 0
- }
- return 0
-})
const emit = defineEmits(['change', 'update:model'])
const eidtModelRef = ref>()
let interval: any
@@ -130,6 +126,13 @@ const deleteModel = () => {
})
.catch(() => {})
}
+
+const cancelDownload = () => {
+ ModelApi.pauseDownload(props.model.id).then(() => {
+ downModel.value = undefined
+ emit('change')
+ })
+}
const openEditModel = () => {
const provider = props.provider_list.find((p) => p.provider === props.model.provider)
if (provider) {
@@ -197,21 +200,21 @@ onBeforeUnmount(() => {
z-index: 99;
text-align: center;
.percentage {
- top: 50%;
- transform: translateY(-65%);
+ margin-top: 55px;
+ margin-bottom: 16px;
}
- .percentage-value {
- display: block;
- font-size: 12px;
- color: var(--el-color-primary);
- }
+ // .percentage-value {
+ // display: flex;
+ // font-size: 13px;
+ // align-items: center;
+ // color: var(--app-text-color-secondary);
+ // }
.percentage-label {
- display: block;
- margin-top: 45px;
+ margin-top: 50px;
margin-left: 10px;
- font-size: 12px;
- color: var(--el-color-primary);
+ font-size: 13px;
+ color: var(--app-text-color-secondary);
}
}
}
diff --git a/ui/src/views/user-manage/index.vue b/ui/src/views/user-manage/index.vue
index 5d641ba9a..c9528cbeb 100644
--- a/ui/src/views/user-manage/index.vue
+++ b/ui/src/views/user-manage/index.vue
@@ -145,10 +145,7 @@ function createUser() {
title.value = '创建用户'
UserDialogRef.value.open()
} else {
- MsgAlert(
- '提示',
- '社区版最多支持 2 个用户,如需拥有更多用户,请联系我们(https://fit2cloud.com/)。'
- )
+ MsgAlert('提示', '社区版最多支持 2 个用户,如需拥有更多用户,请升级为专业版。')
}
})
}