fix: wifi 自动填充
All checks were successful
构建并部署前端到测试环境 / build-and-deploy (push) Successful in 4m58s

This commit is contained in:
sexygoat
2026-04-20 16:28:09 +08:00
parent 9b66b78110
commit 11bfcadf65
5 changed files with 20 additions and 56 deletions

View File

@@ -17,6 +17,7 @@
maxlength="32"
show-word-limit
clearable
autocomplete="off"
/>
</ElFormItem>
<ElFormItem label="WiFi密码" prop="password">
@@ -28,6 +29,7 @@
show-word-limit
show-password
clearable
autocomplete="off"
/>
</ElFormItem>
</ElForm>
@@ -96,7 +98,6 @@
(val) => {
visible.value = val
if (val) {
// 重置表单
formData.enabled = 1
formData.ssid = ''
formData.password = ''

View File

@@ -370,7 +370,7 @@
<ElButton type="success" @click="handleEnableCard"> 启用此卡 </ElButton>
<ElButton type="warning" @click="handleDisableCard"> 停用此卡 </ElButton>
<!--<ElButton type="danger" @click="handleManualDeactivate"> 手动停用 </ElButton>-->
<ElButton type="primary" @click="handleShowRealnamePolicy"> 实名认证策略 </ElButton>
<ElButton v-if="canShowRealnamePolicy" type="primary" @click="handleShowRealnamePolicy"> 实名认证策略 </ElButton>
</div>
<!-- 设备操作按钮 -->
@@ -380,7 +380,7 @@
<ElButton type="warning" @click="handleResetDevice"> 恢复出厂 </ElButton>
<ElButton type="success" @click="handleShowSwitchCard"> 切换SIM卡 </ElButton>
<ElButton type="primary" @click="handleShowSetWiFi"> 设置WiFi </ElButton>
<ElButton type="primary" @click="handleShowRealnamePolicy"> 实名认证策略 </ElButton>
<ElButton v-if="canShowRealnamePolicy" type="primary" @click="handleShowRealnamePolicy"> 实名认证策略 </ElButton>
</div>
</ElCard>
</template>
@@ -404,6 +404,7 @@
} from 'element-plus'
import { CopyDocument } from '@element-plus/icons-vue'
import { useAssetFormatters } from '../composables/useAssetFormatters'
import { useAuth } from '@/composables/useAuth'
import { formatDateTime } from '@/utils/business/format'
// Props
@@ -495,6 +496,14 @@
const props = defineProps<Props>()
const { hasAuth } = useAuth()
const realnamePolicyPermission = computed(() => {
return props.cardInfo?.asset_type === 'card' ? 'asset:card_realname_policy' : 'asset:device_realname_policy'
})
const canShowRealnamePolicy = computed(() => hasAuth(realnamePolicyPermission.value))
// Emits
interface Emits {
(e: 'update:pollingEnabled', value: boolean): void

View File

@@ -14,6 +14,7 @@
maxlength="32"
show-word-limit
clearable
autocomplete="off"
/>
</ElFormItem>
<ElFormItem label="WiFi密码" prop="password">
@@ -25,6 +26,7 @@
show-word-limit
show-password
clearable
autocomplete="off"
/>
</ElFormItem>
</ElForm>

View File

@@ -533,6 +533,7 @@
maxlength="32"
show-word-limit
clearable
autocomplete="off"
/>
</ElFormItem>
<ElFormItem label="WiFi密码" prop="password">
@@ -544,6 +545,7 @@
show-word-limit
show-password
clearable
autocomplete="off"
/>
</ElFormItem>
</ElForm>
@@ -1956,7 +1958,7 @@
})
}
if (hasAuth('asset:realname_policy')) {
if (hasAuth('device:realname_policy')) {
moreActions.push({
label: '实名认证策略',
handler: () => handleDeviceOperation('realname-policy', row.virtual_no, row),

View File

@@ -1168,32 +1168,6 @@
const getActions = (row: StandaloneIotCard) => {
const actions: any[] = []
// 查询流量按钮
if (hasAuth('iot_card:query_flow')) {
actions.push({
label: '查询流量',
handler: () => showFlowUsageDialog(row.iccid),
type: 'primary'
})
}
// 其他操作放到更多中
if (hasAuth('iot_card:query_realname_status')) {
actions.push({
label: '查询实名状态',
handler: () => handleCardOperation('realname-status', row.iccid),
type: 'primary'
})
}
if (hasAuth('iot_card:query_card_status')) {
actions.push({
label: '查询卡状态',
handler: () => handleCardOperation('card-status', row.iccid),
type: 'primary'
})
}
if (hasAuth('iot_card:start_card')) {
actions.push({
label: '启用此卡',
@@ -1210,7 +1184,7 @@
})
}
if (hasAuth('asset:realname_policy')) {
if (hasAuth('iot_card:realname_policy')) {
actions.push({
label: '实名认证策略',
handler: () => handleCardOperation('realname-policy', row.iccid, row),
@@ -1218,29 +1192,14 @@
})
}
// 更多操作放到"更多"下拉菜单中
const moreActions: any[] = []
if (hasAuth('iot_card:clear_series')) {
moreActions.push({
actions.push({
label: '清除关联',
handler: () => handleCardOperation('clear-series', row.iccid),
type: 'primary'
})
}
if (moreActions.length > 0) {
actions.push(...moreActions)
}
// if (hasAuth('iot_card:manual_deactivate')) {
// actions.push({
// label: '手动停用',
// handler: () => handleCardOperation('manual-deactivate', row.iccid),
// type: 'primary'
// })
// }
return actions
}
@@ -1707,12 +1666,6 @@
// IoT卡操作处理函数
const handleCardOperation = (command: string, iccid: string, row?: any) => {
switch (command) {
case 'realname-status':
showRealnameStatusDialog(iccid)
break
case 'card-status':
showCardStatusDialog(iccid)
break
case 'start-card':
handleStartCard(iccid)
break
@@ -1722,9 +1675,6 @@
case 'realname-policy':
handleShowRealnamePolicy(iccid, row?.realname_policy)
break
case 'manual-deactivate':
handleManualDeactivate(iccid)
break
case 'clear-series':
handleClearSingleCardSeries(iccid)
break