fix: model

This commit is contained in:
wangdan-fit2cloud 2025-06-25 10:36:24 +08:00
parent e16524d574
commit cd145b68d8
2 changed files with 4 additions and 11 deletions

View File

@ -60,7 +60,6 @@
link link
type="primary" type="primary"
class="ml-16" class="ml-16"
:disabled="!is_permisstion"
@click.stop="cancelDownload" @click.stop="cancelDownload"
>{{ $t('views.model.download.cancelDownload') }} >{{ $t('views.model.download.cancelDownload') }}
</el-button> </el-button>
@ -79,7 +78,6 @@
<el-dropdown-item <el-dropdown-item
v-if="permissionPrecise.modify()" v-if="permissionPrecise.modify()"
icon="EditPen" icon="EditPen"
:disabled="!is_permisstion"
text text
@click.stop="openEditModel" @click.stop="openEditModel"
> >
@ -100,7 +98,6 @@
currentModel.model_type === 'TTI' || currentModel.model_type === 'TTI' ||
permissionPrecise.paramSetting() permissionPrecise.paramSetting()
" "
:disabled="!is_permisstion"
icon="Setting" icon="Setting"
@click.stop="openParamSetting" @click.stop="openParamSetting"
> >
@ -109,7 +106,6 @@
<el-dropdown-item <el-dropdown-item
divided divided
icon="Delete" icon="Delete"
:disabled="!is_permisstion"
text text
@click.stop="deleteModel" @click.stop="deleteModel"
v-if="permissionPrecise.delete()" v-if="permissionPrecise.delete()"
@ -161,9 +157,7 @@ const permissionPrecise = computed(() => {
const downModel = ref<Model>() const downModel = ref<Model>()
const is_permisstion = computed(() => {
return user.userInfo?.id == props.model.user_id
})
const currentModel = computed(() => { const currentModel = computed(() => {
if (downModel.value) { if (downModel.value) {
return downModel.value return downModel.value
@ -204,7 +198,7 @@ const deleteModel = () => {
} }
const cancelDownload = () => { const cancelDownload = () => {
loadSharedApi({ type: 'model', systemType: apiType.value }) loadSharedApi({ type: 'model', systemType: props.sharedType })
.pauseDownload(props.model.id) .pauseDownload(props.model.id)
.then(() => { .then(() => {
downModel.value = undefined downModel.value = undefined
@ -227,7 +221,7 @@ const icon = computed(() => {
const initInterval = () => { const initInterval = () => {
interval = setInterval(() => { interval = setInterval(() => {
if (currentModel.value.status === 'DOWNLOAD') { if (currentModel.value.status === 'DOWNLOAD') {
loadSharedApi({ type: 'model', systemType: apiType.value }) loadSharedApi({ type: 'model', systemType: props.sharedType })
.getModelMetaById(props.model.id) .getModelMetaById(props.model.id)
.then((ok: any) => { .then((ok: any) => {
downModel.value = ok.data downModel.value = ok.data

View File

@ -88,7 +88,7 @@
:provider_list="provider_list" :provider_list="provider_list"
:isShared="isShared" :isShared="isShared"
:isSystemShare="isSystemShare" :isSystemShare="isSystemShare"
:sharedType="type" :sharedType="apiType"
> >
</ModelCard> </ModelCard>
</el-col> </el-col>
@ -221,7 +221,6 @@ onMounted(() => {
ProviderApi.getProvider(loading).then((ok) => { ProviderApi.getProvider(loading).then((ok) => {
active_provider.value = allObj active_provider.value = allObj
provider_list.value = [allObj, ...ok.data] provider_list.value = [allObj, ...ok.data]
list_model() list_model()
}) })
}) })