+
@@ -555,7 +555,6 @@
}
} catch (error) {
console.error('获取失败数据失败:', error)
- ElMessage.error('获取失败数据失败')
} finally {
failDataLoading.value = false
}
@@ -594,7 +593,6 @@
ElMessage.success('失败数据下载成功')
} catch (error) {
console.error('下载失败数据失败:', error)
- ElMessage.error('下载失败数据失败')
}
}
@@ -653,7 +651,6 @@
ElMessage.success('IoT卡导入模板下载成功')
} catch (error) {
console.error('下载模板失败:', error)
- ElMessage.error('下载模板失败')
}
}
@@ -774,7 +771,6 @@
})
} catch (error: any) {
console.error('IoT卡导入失败:', error)
- ElMessage.error(error.message || 'IoT卡导入失败')
} finally {
uploading.value = false
}
diff --git a/src/views/asset-management/task-detail/index.vue b/src/views/asset-management/task-detail/index.vue
index 3a17ef5..df4f896 100644
--- a/src/views/asset-management/task-detail/index.vue
+++ b/src/views/asset-management/task-detail/index.vue
@@ -237,7 +237,7 @@
}
} catch (error) {
console.error(error)
- ElMessage.error('获取任务详情失败')
+ console.log('获取任务详情失败')
} finally {
loading.value = false
}
@@ -252,8 +252,8 @@
.task-detail-page {
.detail-header {
display: flex;
- align-items: center;
gap: 16px;
+ align-items: center;
padding-bottom: 16px;
.detail-title {
diff --git a/src/views/auth/login/index.vue b/src/views/auth/login/index.vue
index 534b139..c98f7a7 100644
--- a/src/views/auth/login/index.vue
+++ b/src/views/auth/login/index.vue
@@ -115,15 +115,7 @@
const { isDark, systemThemeType } = storeToRefs(settingStore)
// 使用登录 Composable
- const {
- formRef,
- formData,
- rules,
- loading,
- mockAccounts,
- setupAccount,
- handleLogin
- } = useLogin()
+ const { formRef, formData, rules, loading, mockAccounts, setupAccount, handleLogin } = useLogin()
const systemName = AppConfig.systemInfo.name
diff --git a/src/views/card-management/my-cards/index.vue b/src/views/card-management/my-cards/index.vue
index bfc4d66..2874b34 100644
--- a/src/views/card-management/my-cards/index.vue
+++ b/src/views/card-management/my-cards/index.vue
@@ -644,7 +644,7 @@
// 刷新列表
getMyCardsList()
} catch (error) {
- ElMessage.error('分销操作失败,请重试')
+ console.log('分销操作失败,请重试')
}
}
@@ -660,7 +660,7 @@
// 刷新列表
getMyCardsList()
} catch (error) {
- ElMessage.error('充值操作失败,请重试')
+ console.log('充值操作失败,请重试')
}
}
@@ -677,7 +677,7 @@
tableData.value = tableData.value.filter((item) => !recycledIds.includes(item.id))
selectedRows.value = []
} catch (error) {
- ElMessage.error('回收操作失败,请重试')
+ console.log('回收操作失败,请重试')
}
}
diff --git a/src/views/common/account-list.vue b/src/views/common/account-list.vue
index 48ed9a6..324a08a 100644
--- a/src/views/common/account-list.vue
+++ b/src/views/common/account-list.vue
@@ -679,8 +679,8 @@
.account-list-page {
.detail-header {
display: flex;
- align-items: center;
gap: 16px;
+ align-items: center;
padding-bottom: 16px;
.detail-title {
@@ -694,8 +694,8 @@
.dialog-header {
display: flex;
- justify-content: space-between;
align-items: center;
+ justify-content: space-between;
width: 100%;
.dialog-title {
@@ -705,8 +705,8 @@
.account-info {
display: flex;
- align-items: center;
gap: 8px;
+ align-items: center;
.account-name {
font-size: 14px;
@@ -717,25 +717,25 @@
.role-transfer-container {
display: flex;
- justify-content: space-between;
- align-items: stretch;
gap: 20px;
- padding: 20px 0;
+ align-items: stretch;
+ justify-content: space-between;
min-height: 500px;
+ padding: 20px 0;
.transfer-panel {
- flex: 1;
display: flex;
+ flex: 1;
flex-direction: column;
+ max-width: 380px;
+ overflow: hidden;
border: 1px solid var(--el-border-color);
border-radius: 4px;
- overflow: hidden;
- max-width: 380px;
.panel-header {
display: flex;
- justify-content: space-between;
align-items: center;
+ justify-content: space-between;
padding: 12px 16px;
background: var(--el-fill-color-light);
border-bottom: 1px solid var(--el-border-color);
@@ -749,8 +749,8 @@
.panel-body {
flex: 1;
- overflow-y: auto;
padding: 12px;
+ overflow-y: auto;
.role-list {
display: flex;
@@ -772,15 +772,15 @@
width: 100%;
.el-checkbox__label {
- width: 100%;
display: flex;
+ width: 100%;
.role-info {
display: flex;
+ flex: 1;
+ gap: 8px;
align-items: center;
justify-content: space-between;
- gap: 8px;
- flex: 1;
width: 100%;
> span:first-child {
@@ -794,16 +794,16 @@
.assigned-role-item {
display: flex;
- justify-content: space-between;
- align-items: center;
gap: 12px;
+ align-items: center;
+ justify-content: space-between;
.role-info {
- flex: 1;
display: flex;
+ flex: 1;
+ gap: 8px;
align-items: center;
justify-content: space-between;
- gap: 8px;
> span:first-child {
flex: 1;
@@ -825,9 +825,9 @@
.transfer-buttons {
display: flex;
flex-direction: column;
- justify-content: center;
- align-items: center;
gap: 12px;
+ align-items: center;
+ justify-content: center;
padding: 0 10px;
.el-button {
diff --git a/src/views/dashboard/analysis/widget/ActiveWechatConfig.vue b/src/views/dashboard/analysis/widget/ActiveWechatConfig.vue
index 8023afa..9d57eb0 100644
--- a/src/views/dashboard/analysis/widget/ActiveWechatConfig.vue
+++ b/src/views/dashboard/analysis/widget/ActiveWechatConfig.vue
@@ -132,10 +132,10 @@
.card-header {
display: flex;
- align-items: center;
- justify-content: space-between;
flex-wrap: wrap;
gap: 12px;
+ align-items: center;
+ justify-content: space-between;
.header-left {
display: flex;
@@ -220,7 +220,7 @@
}
}
- @media (max-width: 768px) {
+ @media (width <= 768px) {
.active-wechat-config-widget {
.card-header {
.header-left,
diff --git a/src/views/dashboard/analysis/widget/CommissionSummary.vue b/src/views/dashboard/analysis/widget/CommissionSummary.vue
index bae7733..adcbd47 100644
--- a/src/views/dashboard/analysis/widget/CommissionSummary.vue
+++ b/src/views/dashboard/analysis/widget/CommissionSummary.vue
@@ -151,8 +151,8 @@
.stats-container {
display: flex;
- gap: 16px;
flex-wrap: wrap;
+ gap: 16px;
}
.stat-card-wrapper {
@@ -171,6 +171,7 @@
.stat-icon {
display: flex;
+ flex-shrink: 0;
align-items: center;
justify-content: center;
width: 40px;
@@ -178,7 +179,6 @@
font-size: 20px;
color: white;
border-radius: 8px;
- flex-shrink: 0;
}
.stat-content {
@@ -193,10 +193,10 @@
}
.stat-value {
+ overflow: hidden;
font-size: 18px;
font-weight: 600;
color: var(--el-text-color-primary);
- overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
@@ -204,7 +204,7 @@
}
}
- @media (max-width: 1400px) {
+ @media (width <= 1400px) {
.commission-summary-widget {
.stats-container {
gap: 12px;
@@ -224,7 +224,7 @@
}
}
- @media (max-width: 1200px) {
+ @media (width <= 1200px) {
.commission-summary-widget {
.stat-card-wrapper {
flex: 1 1 calc(33.333% - 12px);
@@ -233,7 +233,7 @@
}
}
- @media (max-width: 768px) {
+ @media (width <= 768px) {
.commission-summary-widget {
.stats-container {
gap: 12px;
@@ -246,7 +246,7 @@
}
}
- @media (max-width: 480px) {
+ @media (width <= 480px) {
.commission-summary-widget {
.stat-card-wrapper {
flex: 1 1 100%;
diff --git a/src/views/dashboard/analysis/widget/WithdrawalSettings.vue b/src/views/dashboard/analysis/widget/WithdrawalSettings.vue
index 7460f83..ea276d4 100644
--- a/src/views/dashboard/analysis/widget/WithdrawalSettings.vue
+++ b/src/views/dashboard/analysis/widget/WithdrawalSettings.vue
@@ -117,10 +117,10 @@
.card-header {
display: flex;
- align-items: center;
- justify-content: space-between;
flex-wrap: wrap;
gap: 12px;
+ align-items: center;
+ justify-content: space-between;
.header-left {
display: flex;
@@ -205,7 +205,7 @@
}
}
- @media (max-width: 768px) {
+ @media (width <= 768px) {
.withdrawal-settings-widget {
.card-header {
.header-left,
diff --git a/src/views/finance/agent-recharge/detail.vue b/src/views/finance/agent-recharge/detail.vue
index 16b1546..c943313 100644
--- a/src/views/finance/agent-recharge/detail.vue
+++ b/src/views/finance/agent-recharge/detail.vue
@@ -32,11 +32,7 @@
import DetailPage from '@/components/common/DetailPage.vue'
import type { DetailSection } from '@/components/common/DetailPage.vue'
import { AgentRechargeService } from '@/api/modules'
- import type {
- AgentRecharge,
- AgentRechargeStatus,
- AgentRechargePaymentMethod
- } from '@/types/api'
+ import type { AgentRecharge, AgentRechargeStatus, AgentRechargePaymentMethod } from '@/types/api'
import { formatDateTime } from '@/utils/business/format'
import { RoutesAlias } from '@/router/routesAlias'
@@ -100,7 +96,8 @@
},
{
label: '状态',
- render: (data) => h(ElTag, { type: getStatusType(data.status) }, () => getStatusText(data.status))
+ render: (data) =>
+ h(ElTag, { type: getStatusType(data.status) }, () => getStatusText(data.status))
}
]
},
@@ -194,8 +191,8 @@
.detail-header {
display: flex;
- align-items: center;
gap: 16px;
+ align-items: center;
margin-bottom: 24px;
.detail-title {
@@ -209,10 +206,10 @@
.loading-container {
display: flex;
flex-direction: column;
+ gap: 12px;
align-items: center;
justify-content: center;
padding: 60px 0;
- gap: 12px;
color: var(--el-text-color-secondary);
.el-icon {
diff --git a/src/views/finance/commission/agent-commission/index.vue b/src/views/finance/commission/agent-commission/index.vue
index 72302cc..8888885 100644
--- a/src/views/finance/commission/agent-commission/index.vue
+++ b/src/views/finance/commission/agent-commission/index.vue
@@ -259,21 +259,14 @@
>
-
+
-
+
金额单位为分,例如:100元 = 10000分
@@ -736,7 +729,10 @@
}
// 处理佣金修正
- const handleResolveCommission = (row: ShopCommissionRecordItem, action: CommissionResolveAction) => {
+ const handleResolveCommission = (
+ row: ShopCommissionRecordItem,
+ action: CommissionResolveAction
+ ) => {
currentCommissionId.value = row.id
resolveAction.value = action
resolveForm.amount = undefined
diff --git a/src/views/finance/commission/my-commission/index.vue b/src/views/finance/commission/my-commission/index.vue
index dff7aa3..f74491d 100644
--- a/src/views/finance/commission/my-commission/index.vue
+++ b/src/views/finance/commission/my-commission/index.vue
@@ -22,7 +22,12 @@
style="margin-top: 20px"
>
- 发起提现
+ 发起提现
diff --git a/src/views/finance/commission/withdrawal-settings/index.vue b/src/views/finance/commission/withdrawal-settings/index.vue
index ef79f29..3fe4ea1 100644
--- a/src/views/finance/commission/withdrawal-settings/index.vue
+++ b/src/views/finance/commission/withdrawal-settings/index.vue
@@ -10,7 +10,9 @@
@refresh="handleRefresh"
>
- 新增配置
+ 新增配置
diff --git a/src/views/finance/refund/detail.vue b/src/views/finance/refund/detail.vue
index 28fa678..af0cda4 100644
--- a/src/views/finance/refund/detail.vue
+++ b/src/views/finance/refund/detail.vue
@@ -25,9 +25,7 @@
- {{
- refund.approved_refund_amount ? formatCurrency(refund.approved_refund_amount) : '-'
- }}
+ {{ refund.approved_refund_amount ? formatCurrency(refund.approved_refund_amount) : '-' }}
{{ formatCurrency(refund.actual_received_amount) }}
@@ -95,12 +93,7 @@
width="500px"
@closed="handleApproveDialogClosed"
>
-
+
{{ refund?.refund_no }}
@@ -341,9 +334,7 @@
}
// 获取状态标签类型
- const getStatusType = (
- status: RefundStatus
- ): 'warning' | 'success' | 'danger' | 'info' => {
+ const getStatusType = (status: RefundStatus): 'warning' | 'success' | 'danger' | 'info' => {
const statusMap: Record = {
1: 'warning', // 待审批
2: 'success', // 已通过
@@ -551,15 +542,15 @@
.card-header {
display: flex;
- justify-content: space-between;
align-items: center;
+ justify-content: space-between;
}
.action-buttons {
- margin-top: 20px;
display: flex;
gap: 10px;
justify-content: flex-end;
+ margin-top: 20px;
}
}
diff --git a/src/views/finance/refund/index.vue b/src/views/finance/refund/index.vue
index fd8745d..2527173 100644
--- a/src/views/finance/refund/index.vue
+++ b/src/views/finance/refund/index.vue
@@ -183,12 +183,7 @@
width="500px"
@closed="handleRejectDialogClosed"
>
-
+
{{ currentRefund?.refund_no }}
@@ -220,12 +215,7 @@
width="500px"
@closed="handleReturnDialogClosed"
>
-
+
{{ currentRefund?.refund_no }}
@@ -460,9 +450,7 @@
const createRules = reactive({
order_id: [{ required: true, message: '请输入订单ID', trigger: 'blur' }],
- requested_refund_amount: [
- { required: true, message: '请输入申请退款金额', trigger: 'blur' }
- ],
+ requested_refund_amount: [{ required: true, message: '请输入申请退款金额', trigger: 'blur' }],
actual_received_amount: [{ required: true, message: '请输入实收金额', trigger: 'blur' }]
})
@@ -519,9 +507,7 @@
}
// 获取状态标签类型
- const getStatusType = (
- status: RefundStatus
- ): 'warning' | 'success' | 'danger' | 'info' => {
+ const getStatusType = (status: RefundStatus): 'warning' | 'success' | 'danger' | 'info' => {
const statusMap: Record = {
1: 'warning', // 待审批
2: 'success', // 已通过
@@ -998,10 +984,7 @@
}
// 已拒绝或已退回状态可以重新提交
- if (
- currentOperatingRefund.value.status === 3 ||
- currentOperatingRefund.value.status === 4
- ) {
+ if (currentOperatingRefund.value.status === 3 || currentOperatingRefund.value.status === 4) {
items.push({
key: 'resubmit',
label: '重新提交'
diff --git a/src/views/my-simcard/single-card/index.vue b/src/views/my-simcard/single-card/index.vue
index 44452b1..c5de696 100644
--- a/src/views/my-simcard/single-card/index.vue
+++ b/src/views/my-simcard/single-card/index.vue
@@ -32,13 +32,19 @@
type="primary"
@click="handleSearchCard"
:loading="loading"
+ :icon="Search"
style="margin-left: 16px"
>查询
-
+
刷新
@@ -60,7 +66,7 @@
-
+
@@ -70,10 +76,9 @@
{{ cardInfo?.iccid || '--' }}
- 暂未接入
-
-
-
+ {{
+ cardInfo?.carrier_name || '--'
+ }}
{{ getRealNameStatusName(cardInfo?.real_name_status) }}
@@ -83,6 +88,9 @@
{{
cardInfo?.shop_name || '--'
}}
+ {{
+ cardInfo?.series_name || '--'
+ }}
{{
cardInfo?.virtual_no || '--'
}}
@@ -155,7 +163,11 @@
cardInfo?.activated_at || '--'
}}
暂未接入
- 暂未接入
+
+
+ {{ calculateSignalStrength() }}
+
+
@@ -205,21 +217,22 @@
-
-
-
+
+
+
{{ scope.row.slot_position }}
当前
-
+
-
+
{{ getRealNameStatusName(scope.row.real_name_status) }}
@@ -242,7 +255,7 @@
设备实时信息
-
+
@@ -426,13 +439,13 @@
恢复出厂
-
- 设置限速
-
+
+
+
+
+
+
+
-
+
{{
cardInfo.currentPackageDetail.package_name || '--'
@@ -524,11 +537,6 @@
{{
formatDateTime(cardInfo.currentPackageDetail.created_at)
}}
-
-
- {{
- cardInfo.currentPackageDetail.master_usage_id || '--'
- }}
@@ -573,40 +581,10 @@
-
-
-
-
-
-
-
-
-
-
-
-
- {{
- cardInfo?.series_name || '--'
- }}
- {{
- cardInfo?.batch_no || '--'
- }}
- {{
- formatDateTime(cardInfo?.created_at)
- }}
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
-
- {{
- walletInfo.wallet_id || '--'
- }}
- {{
- walletInfo.currency || 'CNY'
- }}
- {{
- walletInfo.resource_type || '--'
- }}
- {{
- walletInfo.resource_id || '--'
- }}
- {{
- formatDateTime(walletInfo.created_at)
- }}
- {{
- formatDateTime(walletInfo.updated_at)
- }}
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ scope.row.package_name }}
-
-
-
-
-
-
- {{ scope.row.package_type === 'formal' ? '正式套餐' : '加油包' }}
-
-
-
-
-
-
- {{ scope.row.usage_type === 'single_card' ? '单卡' : '设备' }}
-
-
-
-
-
-
- {{ scope.row.status_name }}
-
-
-
-
-
- {{ formatDataSize(scope.row.data_limit_mb) }}
-
-
-
-
- {{ formatDataSize(scope.row.data_usage_mb) }}
-
-
-
-
- {{ formatDataSize(scope.row.virtual_limit_mb) }}
-
-
-
-
- {{ formatDataSize(scope.row.virtual_used_mb) }}
-
-
-
-
- {{ formatDataSize(scope.row.virtual_remain_mb) }}
-
-
-
-
- {{ scope.row.virtual_ratio?.toFixed(2) || '1.00' }}
-
-
-
-
-
- {{ scope.row.master_usage_id || '-' }}
-
-
-
+
+
+
+
+
+
+
-
- {{ formatDateTime(scope.row.activated_at) }}
-
-
-
-
- {{ formatDateTime(scope.row.expires_at) }}
-
-
-
-
- {{ formatDateTime(scope.row.created_at) }}
-
-
-
-
-
-
+
+
+
+ {{ scope.row.package_name }}
+
+
+
+
+
+
+ {{ scope.row.package_type === 'formal' ? '正式套餐' : '加油包' }}
+
+
+
+
+
+
+ {{ scope.row.usage_type === 'single_card' ? '单卡' : '设备' }}
+
+
+
+
+
+
+ {{ scope.row.status_name }}
+
+
+
+
+
+ {{ formatDataSize(scope.row.data_limit_mb) }}
+
+
+
+
+ {{ formatDataSize(scope.row.data_usage_mb) }}
+
+
+
+
+ {{ formatDataSize(scope.row.virtual_limit_mb) }}
+
+
+
+
+ {{ formatDataSize(scope.row.virtual_used_mb) }}
+
+
+
+
+ {{ formatDataSize(scope.row.virtual_remain_mb) }}
+
+
+
+
+ {{ scope.row.virtual_ratio?.toFixed(2) || '1.00' }}
+
+
+
+
+
+ {{ formatDateTime(scope.row.activated_at) }}
+
+
+
+
+ {{ formatDateTime(scope.row.expires_at) }}
+
+
+
+
+ {{ formatDateTime(scope.row.created_at) }}
+
+
+
+
+
+
+
@@ -955,7 +917,7 @@
controls-position="right"
style="width: 100%"
/>
- 单位: KB/s
+ 单位: KB/s
- 单位: KB/s
+ 单位: KB/s
@@ -982,7 +944,7 @@
-
+
@@ -1026,7 +988,7 @@
:label="`${card.iccid} - 插槽${card.slot_position} - ${card.carrier_name}`"
:value="card.iccid"
>
-
+
{{ card.iccid }}
插槽{{ card.slot_position }}
@@ -1117,7 +1079,7 @@
-
+
筛选方式:
全部
@@ -1183,7 +1145,7 @@
-
+
@@ -1221,7 +1183,7 @@
ElInput
} from 'element-plus'
import type { FormInstance, FormRules } from 'element-plus'
- import { Loading } from '@element-plus/icons-vue'
+ import { Loading, Search, Refresh } from '@element-plus/icons-vue'
import { useRoute, useRouter } from 'vue-router'
import { EnterpriseService } from '@/api/modules/enterprise'
import { CardService, AssetService, DeviceService } from '@/api/modules'
@@ -1773,6 +1735,50 @@
}
}
+ // 计算信号强度等级(基于RSSI、RSRP、RSRQ)
+ const calculateSignalStrength = () => {
+ if (!deviceRealtime.value) return '--'
+
+ const rssi = deviceRealtime.value.rssi ? Number(deviceRealtime.value.rssi) : null
+ const rsrp = deviceRealtime.value.rsrp ? Number(deviceRealtime.value.rsrp) : null
+ const rsrq = deviceRealtime.value.rsrq ? Number(deviceRealtime.value.rsrq) : null
+
+ // 优先使用RSRP判断(更准确)
+ // RSRP范围通常在-140到-44 dBm之间,0或正值表示无效数据
+ if (rsrp !== null && !isNaN(rsrp) && rsrp < 0) {
+ if (rsrp >= -80) return '优秀'
+ if (rsrp >= -90) return '良好'
+ if (rsrp >= -100) return '一般'
+ if (rsrp >= -110) return '较差'
+ return '极差'
+ }
+
+ // 其次使用RSSI
+ // RSSI范围通常在-113到-51 dBm之间,0或正值表示无效数据
+ if (rssi !== null && !isNaN(rssi) && rssi < 0) {
+ if (rssi >= -70) return '优秀'
+ if (rssi >= -85) return '良好'
+ if (rssi >= -100) return '一般'
+ if (rssi >= -110) return '较差'
+ return '极差'
+ }
+
+ return '--'
+ }
+
+ // 获取信号强度标签类型
+ const getSignalStrengthType = () => {
+ const strength = calculateSignalStrength()
+ const map: Record
= {
+ 优秀: 'success',
+ 良好: 'success',
+ 一般: 'warning',
+ 较差: 'danger',
+ 极差: 'danger'
+ }
+ return map[strength] || 'info'
+ }
+
// 点击ICCID查看卡详情
const handleViewCardDetail = (iccid: string) => {
if (!iccid) return
@@ -2295,7 +2301,7 @@
})
enableCardLoading.value = true
- const res = await CardService.enableIotCard(cardInfo.value.asset_id)
+ const res = await CardService.enableIotCard(cardInfo.value.iccid)
if (res.code === 0) {
ElMessage.success('启用成功')
await handleRefreshAsset()
@@ -2318,7 +2324,7 @@
})
disableCardLoading.value = true
- const res = await CardService.disableIotCard(cardInfo.value.asset_id)
+ const res = await CardService.disableIotCard(cardInfo.value.iccid)
if (res.code === 0) {
ElMessage.success('停用成功')
await handleRefreshAsset()
@@ -2380,7 +2386,6 @@
} catch (error: any) {
if (error !== 'cancel') {
console.error('重启失败:', error)
- ElMessage.error(error?.message || '重启失败')
}
} finally {
rebootDeviceLoading.value = false
@@ -2405,7 +2410,6 @@
} catch (error: any) {
if (error !== 'cancel') {
console.error('恢复出厂失败:', error)
- ElMessage.error(error?.message || '恢复出厂失败')
}
} finally {
resetDeviceLoading.value = false
@@ -2560,7 +2564,6 @@
} catch (error: any) {
if (error !== 'cancel') {
console.error('手动停用失败:', error)
- ElMessage.error(error?.message || '手动停用失败')
}
} finally {
manualDeactivateDeviceLoading.value = false
@@ -2672,9 +2675,9 @@
.iccid-search {
display: flex;
- align-items: flex-start;
flex-wrap: wrap;
gap: 12px;
+ align-items: flex-start;
overflow: visible;
.iccid-input-wrapper {
@@ -2686,8 +2689,8 @@
position: absolute;
top: calc(100% + 12px);
left: 0;
- white-space: nowrap;
z-index: 1000;
+ white-space: nowrap;
// 三角箭头 - 上边框样式
.magnifier-arrow {
@@ -2706,6 +2709,7 @@
.magnifier-content {
display: inline-block;
padding: 16px 24px;
+ font-family: 'Courier New', Courier, monospace;
font-size: 28px;
font-weight: 600;
line-height: 1.4;
@@ -2716,8 +2720,7 @@
background-color: var(--el-bg-color, #fff);
border: 2px solid var(--el-color-primary);
border-radius: 8px;
- box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
- font-family: 'Courier New', Courier, monospace;
+ box-shadow: 0 4px 12px rgb(0 0 0 / 10%);
}
}
}
@@ -2738,7 +2741,7 @@
}
// 移动端
- @media (max-width: 768px) {
+ @media (width <= 768px) {
padding: 16px;
.search-card {
@@ -2827,6 +2830,17 @@
}
}
}
+
+ // 钱包和套餐两栏在小屏幕也改为垂直布局
+ .wallet-package-row {
+ flex-direction: column;
+
+ .wallet-col,
+ .package-col {
+ flex: 1;
+ min-width: 100%;
+ }
+ }
}
@media (width <= 768px) {
@@ -2858,8 +2872,8 @@
}
.package-series-value {
- color: var(--el-color-primary);
font-weight: 500;
+ color: var(--el-color-primary);
}
i {
@@ -2882,8 +2896,8 @@
}
.traffic-progress-wrapper {
- margin-top: 24px;
padding: 20px;
+ margin-top: 24px;
background: var(--el-fill-color-light);
border-radius: 8px;
@@ -2908,19 +2922,19 @@
.flow-stats {
display: flex;
- justify-content: space-between;
gap: 12px;
+ justify-content: space-between;
margin-bottom: 12px;
.stat-item {
display: flex;
+ flex: 1;
flex-direction: column;
gap: 4px;
- flex: 1;
padding: 12px;
+ text-align: center;
background: var(--el-bg-color, #fff);
border-radius: 6px;
- text-align: center;
.stat-label {
font-size: 12px;
@@ -2987,19 +3001,19 @@
.progress-stats {
display: flex;
- justify-content: space-between;
gap: 12px;
+ justify-content: space-between;
margin-top: 8px;
.stat-item {
display: flex;
+ flex: 1;
flex-direction: column;
gap: 4px;
- flex: 1;
padding: 12px;
+ text-align: center;
background: var(--el-fill-color-light);
border-radius: 6px;
- text-align: center;
.stat-label {
font-size: 12px;
@@ -3031,13 +3045,13 @@
.info-item {
display: flex;
+ flex: 1;
flex-direction: column;
gap: 4px;
- flex: 1;
padding: 12px;
+ text-align: center;
background: var(--el-fill-color-light);
border-radius: 8px;
- text-align: center;
.label {
font-size: 13px;
@@ -3054,9 +3068,41 @@
}
}
+ // 钱包概况和套餐列表两栏布局
+ .wallet-package-row {
+ align-items: stretch;
+
+ .wallet-col {
+ flex: 0 0 380px;
+ min-width: 320px;
+ max-width: 400px;
+ }
+
+ .package-col {
+ flex: 1;
+ min-width: 0;
+ }
+
+ .info-card {
+ display: flex;
+ flex-direction: column;
+ height: 100%;
+
+ :deep(.el-card__body) {
+ display: flex;
+ flex: 1;
+ flex-direction: column;
+ overflow: hidden;
+ }
+ }
+ }
+
// 套餐信息卡片
.package-info {
.package-table-wrapper {
+ flex: 1;
+ overflow: auto;
+
.package-table {
:deep(.el-table__header) {
th {
@@ -3073,66 +3119,66 @@
.wallet-balance-cards {
display: flex;
flex-direction: column;
- gap: 12px;
- margin-bottom: 20px;
+ gap: 14px;
.balance-card {
display: flex;
+ gap: 18px;
align-items: center;
- gap: 16px;
- padding: 16px;
+ padding: 18px 20px;
background: var(--el-fill-color-light);
+ border: 1px solid var(--el-border-color-lighter);
border-radius: 8px;
transition: all 0.3s ease;
&:hover {
- transform: translateY(-2px);
- box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
+ border-color: var(--el-color-primary);
+ box-shadow: 0 2px 12px rgb(0 0 0 / 10%);
+ transform: translateX(4px);
}
.balance-icon {
- font-size: 28px;
+ flex-shrink: 0;
+ font-size: 32px;
line-height: 1;
}
.balance-info {
- flex: 1;
display: flex;
+ flex: 1;
flex-direction: column;
- gap: 4px;
+ gap: 6px;
.balance-label {
- font-size: 12px;
+ font-size: 13px;
+ font-weight: 500;
color: var(--el-text-color-secondary);
}
.balance-value {
- font-size: 20px;
+ font-size: 22px;
font-weight: 700;
+ line-height: 1.2;
color: var(--el-text-color-primary);
}
}
&.total {
- background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
-
- .balance-label,
.balance-value {
- color: #fff;
+ color: var(--el-color-primary);
}
}
&.available {
- background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
-
- .balance-label,
.balance-value {
- color: #fff;
+ color: var(--el-color-success);
}
}
&.frozen {
- background: var(--el-fill-color-light);
+ .balance-value {
+ color: var(--el-color-warning);
+ }
}
}
}
@@ -3142,10 +3188,10 @@
.wallet-info {
.wallet-header {
display: flex;
- justify-content: space-between;
- align-items: center;
- gap: 16px;
flex-wrap: wrap;
+ gap: 16px;
+ align-items: center;
+ justify-content: space-between;
.header-left {
display: flex;
@@ -3155,9 +3201,9 @@
.filter-section {
display: flex;
+ flex-wrap: wrap;
gap: 12px;
align-items: center;
- flex-wrap: wrap;
}
}
@@ -3172,10 +3218,10 @@
.reference-no-link {
color: var(--el-color-primary);
- cursor: pointer;
text-decoration: underline;
text-decoration-style: dashed;
text-underline-offset: 2px;
+ cursor: pointer;
&:hover {
color: var(--el-color-primary-light-3);
diff --git a/src/views/order-management/order-list/detail.vue b/src/views/order-management/order-list/detail.vue
index aafa344..57d6dfa 100644
--- a/src/views/order-management/order-list/detail.vue
+++ b/src/views/order-management/order-list/detail.vue
@@ -139,7 +139,8 @@
{
label: '实付金额',
prop: 'actual_paid_amount',
- formatter: (value) => (value !== undefined && value !== null ? formatCurrency(value) : '-')
+ formatter: (value) =>
+ value !== undefined && value !== null ? formatCurrency(value) : '-'
},
{
label: 'IoT卡ID',
@@ -157,7 +158,8 @@
},
{
label: '订单渠道',
- formatter: (_, data) => (data.purchase_role ? getPurchaseRoleText(data.purchase_role) : '-')
+ formatter: (_, data) =>
+ data.purchase_role ? getPurchaseRoleText(data.purchase_role) : '-'
},
{
label: '购买备注',
@@ -256,8 +258,8 @@
.detail-header {
display: flex;
- align-items: center;
gap: 16px;
+ align-items: center;
padding-bottom: 16px;
.detail-title {
@@ -269,12 +271,12 @@
}
.order-items-section {
- margin-top: 30px;
padding-top: 20px;
+ margin-top: 30px;
border-top: 1px solid var(--el-border-color-lighter);
.section-title {
- margin: 0 0 16px 0;
+ margin: 0 0 16px;
font-size: 16px;
font-weight: 600;
color: var(--el-text-color-primary);
@@ -284,10 +286,10 @@
.loading-container {
display: flex;
flex-direction: column;
+ gap: 12px;
align-items: center;
justify-content: center;
padding: 60px 20px;
- gap: 12px;
color: var(--el-text-color-secondary);
.el-icon {
diff --git a/src/views/order-management/order-list/index.vue b/src/views/order-management/order-list/index.vue
index 0c00bf2..29782d0 100644
--- a/src/views/order-management/order-list/index.vue
+++ b/src/views/order-management/order-list/index.vue
@@ -99,7 +99,7 @@
>
{{ card.iccid }}
-
+
{{ card.msisdn || '无接入号' }}
@@ -130,7 +130,7 @@
>
{{ device.virtual_no }}
-
+
{{ device.device_name }}
@@ -163,7 +163,7 @@
>
{{ pkg.package_name }}
-
+
¥{{ (pkg.cost_price / 100).toFixed(2) }}
diff --git a/src/views/package-management/package-list/detail.vue b/src/views/package-management/package-list/detail.vue
index a235836..68956be 100644
--- a/src/views/package-management/package-list/detail.vue
+++ b/src/views/package-management/package-list/detail.vue
@@ -259,8 +259,8 @@
.detail-header {
display: flex;
- align-items: center;
gap: 16px;
+ align-items: center;
padding-bottom: 16px;
.detail-title {
@@ -274,10 +274,10 @@
.loading-container {
display: flex;
flex-direction: column;
+ gap: 12px;
align-items: center;
justify-content: center;
padding: 60px 20px;
- gap: 12px;
color: var(--el-text-color-secondary);
.el-icon {
diff --git a/src/views/package-management/package-list/index.vue b/src/views/package-management/package-list/index.vue
index bd7bbfb..89d9644 100644
--- a/src/views/package-management/package-list/index.vue
+++ b/src/views/package-management/package-list/index.vue
@@ -61,11 +61,11 @@
-
+
@@ -109,7 +109,7 @@
:value="series.id"
/>
-
+
暂无套餐系列,请先创建套餐系列
@@ -182,17 +182,17 @@
-
-
+
+
-
+
@@ -341,7 +341,11 @@
@@ -547,13 +551,25 @@
cost_price: [{ required: true, message: '请输入成本价', trigger: 'blur' }]
}
- // 如果启用虚流量,则虚流量额度为必填
+ // 如果启用虚流量,则虚流量额度为必填,并且不能超过真流量额度
if (form.enable_virtual_data) {
- baseRules.virtual_data_mb = [{ required: true, message: '请输入虚流量额度', trigger: 'blur' }]
+ baseRules.virtual_data_mb = [
+ { required: true, message: '请输入虚流量额度', trigger: 'blur' },
+ {
+ validator: (rule: any, value: any, callback: any) => {
+ if (value && form.real_data_mb && value > form.real_data_mb) {
+ callback(new Error('虚流量额度不能超过真流量额度'))
+ } else {
+ callback()
+ }
+ },
+ trigger: 'blur'
+ }
+ ]
}
- // 如果套餐周期类型是按天,则套餐天数为必填
- if (form.calendar_type === 'by_day') {
+ // 如果流量重置周期是每日,或套餐周期类型是按天,则套餐天数为必填
+ if (form.data_reset_cycle === 'daily' || form.calendar_type === 'by_day') {
baseRules.duration_days = [
{ required: true, message: '请输入套餐天数', trigger: 'blur' },
{ type: 'number', min: 1, max: 3650, message: '套餐天数范围 1-3650 天', trigger: 'blur' }
@@ -755,22 +771,36 @@
}
)
- // 监听流量重置周期变化,不是每月时清空套餐周期类型
+ // 监听真流量额度变化,如果虚流量超过真流量则触发验证
+ watch(
+ () => form.real_data_mb,
+ () => {
+ if (form.enable_virtual_data && formRef.value) {
+ formRef.value.validateField('virtual_data_mb')
+ }
+ }
+ )
+
+ // 监听流量重置周期变化
watch(
() => form.data_reset_cycle,
(cycle) => {
+ // 不是每月时清空套餐周期类型
if (cycle !== 'monthly') {
form.calendar_type = undefined
+ }
+ // 不是每日且calendar_type不是按天时,清空套餐天数
+ if (cycle !== 'daily' && form.calendar_type !== 'by_day') {
form.duration_days = undefined
}
}
)
- // 监听套餐周期类型变化,不是按天时清空套餐天数
+ // 监听套餐周期类型变化,不是按天且流量重置周期不是每日时清空套餐天数
watch(
() => form.calendar_type,
(type) => {
- if (type !== 'by_day') {
+ if (type !== 'by_day' && form.data_reset_cycle !== 'daily') {
form.duration_days = undefined
}
}
@@ -1036,7 +1066,8 @@
if (form.data_reset_cycle === 'monthly' && form.calendar_type) {
data.calendar_type = form.calendar_type
}
- if (form.calendar_type === 'by_day' && form.duration_days) {
+ // 当流量重置周期为每日,或套餐周期类型为按天时,传递套餐天数
+ if ((form.data_reset_cycle === 'daily' || form.calendar_type === 'by_day') && form.duration_days) {
data.duration_days = form.duration_days
}
if (suggestedRetailPriceInCents !== undefined) {
diff --git a/src/views/package-management/package-series/detail.vue b/src/views/package-management/package-series/detail.vue
index 0c93ab0..9891528 100644
--- a/src/views/package-management/package-series/detail.vue
+++ b/src/views/package-management/package-series/detail.vue
@@ -244,8 +244,8 @@
.detail-header {
display: flex;
- align-items: center;
gap: 16px;
+ align-items: center;
padding-bottom: 16px;
.detail-title {
@@ -259,10 +259,10 @@
.loading-container {
display: flex;
flex-direction: column;
+ gap: 12px;
align-items: center;
justify-content: center;
padding: 60px 20px;
- gap: 12px;
color: var(--el-text-color-secondary);
.el-icon {
diff --git a/src/views/package-management/series-grants/detail.vue b/src/views/package-management/series-grants/detail.vue
index 14849d9..088a3ed 100644
--- a/src/views/package-management/series-grants/detail.vue
+++ b/src/views/package-management/series-grants/detail.vue
@@ -597,8 +597,8 @@
.detail-header {
display: flex;
- align-items: center;
gap: 16px;
+ align-items: center;
padding-bottom: 16px;
margin-bottom: 20px;
border-bottom: 1px solid var(--el-border-color);
@@ -619,8 +619,8 @@
display: flex;
align-items: center;
justify-content: space-between;
- margin-bottom: 12px;
padding-bottom: 8px;
+ margin-bottom: 12px;
font-size: 16px;
font-weight: 600;
color: var(--el-text-color-primary);
@@ -642,10 +642,10 @@
.loading-container {
display: flex;
flex-direction: column;
+ gap: 12px;
align-items: center;
justify-content: center;
padding: 60px 20px;
- gap: 12px;
color: var(--el-text-color-secondary);
.el-icon {
diff --git a/src/views/package-management/series-grants/index.vue b/src/views/package-management/series-grants/index.vue
index 758cadf..944a124 100644
--- a/src/views/package-management/series-grants/index.vue
+++ b/src/views/package-management/series-grants/index.vue
@@ -211,7 +211,7 @@
@@ -2184,8 +2184,8 @@
}
.form-section-title {
- margin: 20px 0 16px;
padding-bottom: 8px;
+ margin: 20px 0 16px;
border-bottom: 1px solid var(--el-border-color);
.title-text {
@@ -2197,8 +2197,8 @@
.commission-type-display {
display: flex;
- align-items: center;
gap: 12px;
+ align-items: center;
.type-hint {
font-size: 13px;
@@ -2252,8 +2252,8 @@
.cost-price-input-wrapper {
display: flex;
- align-items: center;
gap: 8px;
+ align-items: center;
.min-cost-hint {
font-size: 12px;
@@ -2282,8 +2282,8 @@
.info-label {
margin-right: 8px;
font-size: 14px;
- white-space: nowrap;
color: var(--el-text-color-regular);
+ white-space: nowrap;
}
.info-value {
@@ -2294,8 +2294,8 @@
.readonly-value {
font-size: 14px;
- color: var(--el-text-color-primary);
font-weight: 500;
+ color: var(--el-text-color-primary);
}
.package-list-dialog-content {
diff --git a/src/views/polling-management/alert-history/index.vue b/src/views/polling-management/alert-history/index.vue
index d4565f6..1713684 100644
--- a/src/views/polling-management/alert-history/index.vue
+++ b/src/views/polling-management/alert-history/index.vue
@@ -285,8 +285,8 @@
diff --git a/src/views/polling-management/alert-rules/index.vue b/src/views/polling-management/alert-rules/index.vue
index 9cfdee1..0557991 100644
--- a/src/views/polling-management/alert-rules/index.vue
+++ b/src/views/polling-management/alert-rules/index.vue
@@ -58,7 +58,11 @@
-
+
@@ -155,188 +159,33 @@
diff --git a/src/views/polling-management/concurrency/index.vue b/src/views/polling-management/concurrency/index.vue
index 2019d0f..e09f6c8 100644
--- a/src/views/polling-management/concurrency/index.vue
+++ b/src/views/polling-management/concurrency/index.vue
@@ -71,12 +71,7 @@
width="500px"
@close="handleDialogClose"
>
-
+
@@ -99,194 +94,183 @@
diff --git a/src/views/polling-management/config/index.vue b/src/views/polling-management/config/index.vue
index c1e2562..9250a84 100644
--- a/src/views/polling-management/config/index.vue
+++ b/src/views/polling-management/config/index.vue
@@ -697,8 +697,8 @@
diff --git a/src/views/polling-management/data-cleanup/index.vue b/src/views/polling-management/data-cleanup/index.vue
index 1428159..8d27fa7 100644
--- a/src/views/polling-management/data-cleanup/index.vue
+++ b/src/views/polling-management/data-cleanup/index.vue
@@ -208,7 +208,7 @@
:total="logPagination.total"
:page-sizes="[10, 20, 50]"
layout="total, sizes, prev, pager, next, jumper"
- style="margin-top: 16px; justify-content: flex-end"
+ style=" justify-content: flex-end;margin-top: 16px"
@size-change="getCleanupLogs"
@current-change="getCleanupLogs"
/>
@@ -619,7 +619,7 @@
}
.text-danger {
- color: var(--el-color-danger);
font-weight: 600;
+ color: var(--el-color-danger);
}
diff --git a/src/views/polling-management/manual-trigger/index.vue b/src/views/polling-management/manual-trigger/index.vue
index 2be4f06..0814eb5 100644
--- a/src/views/polling-management/manual-trigger/index.vue
+++ b/src/views/polling-management/manual-trigger/index.vue
@@ -86,7 +86,11 @@
>
-
+
@@ -261,7 +265,11 @@
-
+
@@ -278,277 +286,62 @@
diff --git a/src/views/polling-management/monitor/index.vue b/src/views/polling-management/monitor/index.vue
index a1034f2..a0256e5 100644
--- a/src/views/polling-management/monitor/index.vue
+++ b/src/views/polling-management/monitor/index.vue
@@ -290,17 +290,17 @@
.stat-card {
display: flex;
- align-items: center;
gap: 16px;
+ align-items: center;
.stat-icon {
- width: 64px;
- height: 64px;
- border-radius: 12px;
display: flex;
align-items: center;
justify-content: center;
- color: #ffffff;
+ width: 64px;
+ height: 64px;
+ color: #fff;
+ border-radius: 12px;
&.total {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
@@ -327,9 +327,9 @@
flex: 1;
.stat-label {
+ margin-bottom: 4px;
font-size: 14px;
color: var(--el-text-color-secondary);
- margin-bottom: 4px;
}
.stat-value {
@@ -345,8 +345,8 @@
.card-header {
display: flex;
- justify-content: space-between;
align-items: center;
+ justify-content: space-between;
font-weight: bold;
color: var(--el-text-color-primary);
}
@@ -361,14 +361,14 @@
.info-item {
.label {
- color: var(--el-text-color-secondary);
font-size: 14px;
+ color: var(--el-text-color-secondary);
}
.value {
- color: var(--el-text-color-primary);
- font-weight: 500;
margin-left: 8px;
+ font-weight: 500;
+ color: var(--el-text-color-primary);
}
}
}
diff --git a/src/views/product/shop/index.vue b/src/views/product/shop/index.vue
index b5cbe6d..5fb130e 100644
--- a/src/views/product/shop/index.vue
+++ b/src/views/product/shop/index.vue
@@ -189,7 +189,7 @@
:value="role.ID"
>
{{ role.role_name }}
客户角色
@@ -273,7 +273,7 @@
-
@@ -1076,10 +1076,10 @@
}
.current-role-display {
- border-radius: 8px;
padding: 16px 20px;
margin-bottom: 24px;
border: 2px solid var(--el-color-primary);
+ border-radius: 8px;
&.no-role {
border: 2px dashed var(--el-border-color);
@@ -1090,30 +1090,30 @@
}
.current-role-label {
- font-size: 14px;
- color: var(--el-text-color-secondary);
margin-bottom: 12px;
+ font-size: 14px;
font-weight: 500;
+ color: var(--el-text-color-secondary);
}
.current-role-value {
+ display: flex;
+ align-items: center;
font-size: 20px;
font-weight: 600;
color: var(--el-color-primary);
- display: flex;
- align-items: center;
}
}
.default-roles-section {
.section-header {
display: flex;
- justify-content: space-between;
align-items: center;
+ justify-content: space-between;
+ margin-bottom: 4px;
font-size: 14px;
font-weight: 500;
color: #303133;
- margin-bottom: 4px;
}
}
diff --git a/src/views/settings/wechat-config/detail.vue b/src/views/settings/wechat-config/detail.vue
index 95d43b6..b6a9ec2 100644
--- a/src/views/settings/wechat-config/detail.vue
+++ b/src/views/settings/wechat-config/detail.vue
@@ -279,8 +279,8 @@
.detail-header {
display: flex;
- align-items: center;
gap: 16px;
+ align-items: center;
padding-bottom: 16px;
.detail-title {
@@ -294,10 +294,10 @@
.loading-container {
display: flex;
flex-direction: column;
+ gap: 12px;
align-items: center;
justify-content: center;
padding: 60px 20px;
- gap: 12px;
color: var(--el-text-color-secondary);
.el-icon {
diff --git a/src/views/settings/wechat-config/index.vue b/src/views/settings/wechat-config/index.vue
index a42dd2e..0cae85e 100644
--- a/src/views/settings/wechat-config/index.vue
+++ b/src/views/settings/wechat-config/index.vue
@@ -64,7 +64,13 @@
:close-on-click-modal="false"
@closed="handleDialogClosed"
>
-
+
@@ -103,10 +109,7 @@
-
+
@@ -127,10 +130,7 @@
-
+
@@ -167,10 +167,7 @@
-
+
@@ -179,18 +176,12 @@
-
+
-
+
@@ -217,10 +208,7 @@
-
+
@@ -252,10 +240,7 @@
-
+
@@ -276,10 +261,7 @@
-
+
@@ -316,10 +298,7 @@
-
+
@@ -328,18 +307,12 @@
-
+
-
+
@@ -366,10 +339,7 @@
-
+
@@ -400,44 +370,29 @@
-
+
-
+
-
+
-
+
-
+
@@ -1117,8 +1072,8 @@
.config-form {
max-height: 600px;
- overflow-y: auto;
padding-right: 10px;
+ overflow-y: auto;
.divider-title {
font-size: 14px;
@@ -1127,7 +1082,7 @@
}
:deep(.el-divider) {
- margin: 24px 0 20px 0;
+ margin: 24px 0 20px;
}
:deep(.el-form-item) {
diff --git a/src/views/system/role/index.vue b/src/views/system/role/index.vue
index c94d028..de63826 100644
--- a/src/views/system/role/index.vue
+++ b/src/views/system/role/index.vue
@@ -143,7 +143,7 @@
class="permission-tree"
>
-
+
{{ node.label }}
{{ data.perm_type === 1 ? '菜单' : '按钮' }}
@@ -519,7 +519,7 @@
}
// 检查所有顶层节点
- availablePermissions.value.forEach(node => checkNode(node))
+ availablePermissions.value.forEach((node) => checkNode(node))
return Array.from(parentIdsToHalfCheck)
}
@@ -568,7 +568,8 @@
label: node.perm_name,
perm_type: node.perm_type,
status: node.status ?? 1,
- children: node.children && node.children.length > 0 ? buildTreeData(node.children) : undefined
+ children:
+ node.children && node.children.length > 0 ? buildTreeData(node.children) : undefined
}))
}
@@ -692,7 +693,11 @@
const parentIds: number[] = []
// 在原始权限树中递归查找父节点
- const findInTree = (treeNodes: PermissionTreeNode[], targetId: number, parentId?: number): number | null => {
+ const findInTree = (
+ treeNodes: PermissionTreeNode[],
+ targetId: number,
+ parentId?: number
+ ): number | null => {
for (const node of treeNodes) {
if (node.id === targetId) {
return parentId || null
@@ -727,7 +732,7 @@
// 为每个勾选的节点找到所有父节点
checkedKeys.forEach((key: number) => {
const parents = getParentNodeIds(key)
- parents.forEach(parentId => allIds.add(parentId))
+ parents.forEach((parentId) => allIds.add(parentId))
})
return Array.from(allIds)
@@ -1079,8 +1084,8 @@
.dialog-header {
display: flex;
- justify-content: space-between;
align-items: center;
+ justify-content: space-between;
width: 100%;
.dialog-title {
@@ -1090,8 +1095,8 @@
.role-info {
display: flex;
- align-items: center;
gap: 8px;
+ align-items: center;
.role-name {
font-size: 14px;
@@ -1102,25 +1107,25 @@
.permission-tree-transfer-container {
display: flex;
- justify-content: space-between;
- align-items: stretch;
gap: 20px;
- padding: 20px 0;
+ align-items: stretch;
+ justify-content: space-between;
min-height: 500px;
+ padding: 20px 0;
.transfer-panel {
- flex: 1;
display: flex;
+ flex: 1;
flex-direction: column;
+ max-width: 340px;
+ overflow: hidden;
border: 1px solid var(--el-border-color);
border-radius: 4px;
- overflow: hidden;
- max-width: 340px;
.panel-header {
display: flex;
- justify-content: space-between;
align-items: center;
+ justify-content: space-between;
padding: 12px 16px;
background: var(--el-fill-color-light);
border-bottom: 1px solid var(--el-border-color);
@@ -1134,8 +1139,8 @@
.panel-body {
flex: 1;
- overflow-y: auto;
padding: 12px;
+ overflow-y: auto;
.permission-tree {
:deep(.el-tree-node) {
@@ -1144,8 +1149,8 @@
:deep(.el-tree-node__content) {
height: 36px;
- line-height: 36px;
padding-right: 8px;
+ line-height: 36px;
}
:deep(.el-tree-node__label) {
@@ -1162,16 +1167,16 @@
.tree-node-content {
display: flex;
- justify-content: space-between;
- align-items: center;
- width: 100%;
gap: 8px;
+ align-items: center;
+ justify-content: space-between;
+ width: 100%;
.tree-node-label {
- flex: 1;
display: flex;
- align-items: center;
+ flex: 1;
gap: 8px;
+ align-items: center;
}
.el-button {
@@ -1186,9 +1191,9 @@
.transfer-buttons {
display: flex;
flex-direction: column;
- justify-content: center;
- align-items: center;
gap: 12px;
+ align-items: center;
+ justify-content: center;
padding: 0 10px;
.el-button {