Merge branch 'main-v2' of http://192.168.2.166:3180/OMC/ems_frontend_vue3 into main-v2
This commit is contained in:
@@ -600,6 +600,7 @@ export default {
|
||||
result:'Result',
|
||||
success:'Success',
|
||||
default:'Default',
|
||||
allsuccess:'All NE have been configured successfully!',
|
||||
},
|
||||
quickUpload: {
|
||||
title: 'Quick License Upload',
|
||||
|
||||
@@ -600,6 +600,7 @@ export default {
|
||||
result:'操作结果',
|
||||
success:'成功',
|
||||
default:'失败',
|
||||
allsuccess:'所有网元配置成功!',
|
||||
},
|
||||
quickUpload: {
|
||||
title: '快速许可证上传',
|
||||
|
||||
@@ -245,8 +245,9 @@ async function fnModalOk() {
|
||||
message.warning(`${t('views.ne.neInfo.quickOam.success')} ${successCount} ,${t('views.ne.neInfo.quickOam.default')} ${failCount} `, 5);
|
||||
}
|
||||
|
||||
emit('ok');
|
||||
fnModalCancel();
|
||||
// 不自动关闭弹窗,让用户查看结果
|
||||
// emit('ok');
|
||||
// fnModalCancel();
|
||||
} catch (error: any) {
|
||||
message.error(t('common.errorFields', { num: error.errorFields?.length || 0 }), 3);
|
||||
} finally {
|
||||
@@ -271,6 +272,13 @@ function fnModalCancel() {
|
||||
emit('update:open', false);
|
||||
}
|
||||
|
||||
/**
|
||||
* 手动关闭弹窗(用于操作完成后)
|
||||
*/
|
||||
function fnModalClose() {
|
||||
fnModalCancel();
|
||||
}
|
||||
|
||||
/**监听是否显示,初始数据 */
|
||||
watch(
|
||||
() => props.open,
|
||||
@@ -385,32 +393,36 @@ watch(
|
||||
<div v-if="modalState.results.length > 0" style="margin-top: 20px;">
|
||||
<a-divider>{{ t('views.ne.neInfo.quickOam.result') }}</a-divider>
|
||||
<div style="max-height: 200px; overflow-y: auto;">
|
||||
<!-- 只显示失败的网元 -->
|
||||
<div
|
||||
v-for="(result, index) in modalState.results"
|
||||
v-for="(result, index) in modalState.results.filter(r => !r.success)"
|
||||
:key="index"
|
||||
style="margin-bottom: 8px; padding: 8px; border-radius: 4px;"
|
||||
:style="{
|
||||
backgroundColor: result.success ? '#f6ffed' : '#fff2f0',
|
||||
border: `1px solid ${result.success ? '#b7eb8f' : '#ffccc7'}`,
|
||||
backgroundColor: '#fff2f0',
|
||||
border: '1px solid #ffccc7',
|
||||
}"
|
||||
>
|
||||
<div style="display: flex; justify-content: space-between; align-items: center;">
|
||||
<span>
|
||||
<CheckCircleOutlined
|
||||
v-if="result.success"
|
||||
:style="{ color: '#52c41a', marginRight: '8px' }"
|
||||
/>
|
||||
<CloseCircleOutlined
|
||||
v-else
|
||||
:style="{ color: '#ff4d4f', marginRight: '8px' }"
|
||||
/>
|
||||
{{ result.neType }}-{{ result.neId }} ({{ result.neName }})
|
||||
</span>
|
||||
<span :style="{ color: result.success ? '#52c41a' : '#ff4d4f', fontSize: '12px' }">
|
||||
<span :style="{ color: '#ff4d4f', fontSize: '12px' }">
|
||||
{{ result.message }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 如果没有失败的网元,显示提示信息 -->
|
||||
<div
|
||||
v-if="modalState.results.filter(r => !r.success).length === 0"
|
||||
style="text-align: center; padding: 20px; color: #52c41a;"
|
||||
>
|
||||
<CheckCircleOutlined :style="{ marginRight: '8px' }" />
|
||||
{{ t('views.ne.neInfo.quickOam.allsuccess') }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ProModal>
|
||||
|
||||
Reference in New Issue
Block a user