fix: 网元快速安装授权检查是否可用后在进行文件上传

This commit is contained in:
TsMask
2024-05-29 18:06:26 +08:00
parent a61716d40d
commit 4c16888184

View File

@@ -73,6 +73,7 @@ function fnModalOk(e: any) {
/**对话框弹出关闭执行函数*/
function fnModalCancel() {
state.visibleByFile = false;
state.confirmLoading = false;
}
/**结束操作 */
@@ -91,7 +92,19 @@ onMounted(() => {
if (neId) {
state.from.neType = neType;
state.from.neId = neId;
codeNeLicense(neType, neId);
state.confirmLoading = true;
stateNeLicense(neType, neId)
.then(res => {
if (res.code === RESULT_CODE_SUCCESS && res.data) {
state.from.sn = res.data.sn;
state.from.expire = res.data.expire;
} else {
return codeNeLicense(neType, neId);
}
})
.finally(() => {
state.confirmLoading = false;
});
}
});
@@ -117,14 +130,14 @@ onUnmounted(() => {
<a-button
type="primary"
:disabled="state.from.sn !== ''"
:loading="state.timeCount < 30"
:loading="state.timeCount < 30 || state.confirmLoading"
@click="() => (state.visibleByFile = !state.visibleByFile)"
>
{{ t('views.ne.neQuickSetup.licenseUpload') }}
</a-button>
<a-button
type="default"
:disabled="state.timeCount < 30"
:disabled="state.timeCount < 30 || state.confirmLoading"
@click="fnStepEnd()"
>
{{ t('views.ne.neQuickSetup.licenseEnd') }}
@@ -146,6 +159,8 @@ onUnmounted(() => {
</a-space>
</div>
<div v-if="state.from.sn !== ''" style="font-size: 16px">
<p>{{ t('views.ne.common.neType') }}{{ state.from.neType }}</p>
<p>{{ t('views.ne.common.neId') }}{{ state.from.neId }}</p>
<p>{{ t('views.ne.common.serialNum') }}{{ state.from.sn }}</p>
<p>{{ t('views.ne.common.expiryDate') }}{{ state.from.expire }}</p>
</div>