fix: wifi 自动填充
All checks were successful
构建并部署前端到测试环境 / build-and-deploy (push) Successful in 4m58s
All checks were successful
构建并部署前端到测试环境 / build-and-deploy (push) Successful in 4m58s
This commit is contained in:
@@ -17,6 +17,7 @@
|
|||||||
maxlength="32"
|
maxlength="32"
|
||||||
show-word-limit
|
show-word-limit
|
||||||
clearable
|
clearable
|
||||||
|
autocomplete="off"
|
||||||
/>
|
/>
|
||||||
</ElFormItem>
|
</ElFormItem>
|
||||||
<ElFormItem label="WiFi密码" prop="password">
|
<ElFormItem label="WiFi密码" prop="password">
|
||||||
@@ -28,6 +29,7 @@
|
|||||||
show-word-limit
|
show-word-limit
|
||||||
show-password
|
show-password
|
||||||
clearable
|
clearable
|
||||||
|
autocomplete="off"
|
||||||
/>
|
/>
|
||||||
</ElFormItem>
|
</ElFormItem>
|
||||||
</ElForm>
|
</ElForm>
|
||||||
@@ -96,7 +98,6 @@
|
|||||||
(val) => {
|
(val) => {
|
||||||
visible.value = val
|
visible.value = val
|
||||||
if (val) {
|
if (val) {
|
||||||
// 重置表单
|
|
||||||
formData.enabled = 1
|
formData.enabled = 1
|
||||||
formData.ssid = ''
|
formData.ssid = ''
|
||||||
formData.password = ''
|
formData.password = ''
|
||||||
|
|||||||
@@ -370,7 +370,7 @@
|
|||||||
<ElButton type="success" @click="handleEnableCard"> 启用此卡 </ElButton>
|
<ElButton type="success" @click="handleEnableCard"> 启用此卡 </ElButton>
|
||||||
<ElButton type="warning" @click="handleDisableCard"> 停用此卡 </ElButton>
|
<ElButton type="warning" @click="handleDisableCard"> 停用此卡 </ElButton>
|
||||||
<!--<ElButton type="danger" @click="handleManualDeactivate"> 手动停用 </ElButton>-->
|
<!--<ElButton type="danger" @click="handleManualDeactivate"> 手动停用 </ElButton>-->
|
||||||
<ElButton type="primary" @click="handleShowRealnamePolicy"> 实名认证策略 </ElButton>
|
<ElButton v-if="canShowRealnamePolicy" type="primary" @click="handleShowRealnamePolicy"> 实名认证策略 </ElButton>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 设备操作按钮 -->
|
<!-- 设备操作按钮 -->
|
||||||
@@ -380,7 +380,7 @@
|
|||||||
<ElButton type="warning" @click="handleResetDevice"> 恢复出厂 </ElButton>
|
<ElButton type="warning" @click="handleResetDevice"> 恢复出厂 </ElButton>
|
||||||
<ElButton type="success" @click="handleShowSwitchCard"> 切换SIM卡 </ElButton>
|
<ElButton type="success" @click="handleShowSwitchCard"> 切换SIM卡 </ElButton>
|
||||||
<ElButton type="primary" @click="handleShowSetWiFi"> 设置WiFi </ElButton>
|
<ElButton type="primary" @click="handleShowSetWiFi"> 设置WiFi </ElButton>
|
||||||
<ElButton type="primary" @click="handleShowRealnamePolicy"> 实名认证策略 </ElButton>
|
<ElButton v-if="canShowRealnamePolicy" type="primary" @click="handleShowRealnamePolicy"> 实名认证策略 </ElButton>
|
||||||
</div>
|
</div>
|
||||||
</ElCard>
|
</ElCard>
|
||||||
</template>
|
</template>
|
||||||
@@ -404,6 +404,7 @@
|
|||||||
} from 'element-plus'
|
} from 'element-plus'
|
||||||
import { CopyDocument } from '@element-plus/icons-vue'
|
import { CopyDocument } from '@element-plus/icons-vue'
|
||||||
import { useAssetFormatters } from '../composables/useAssetFormatters'
|
import { useAssetFormatters } from '../composables/useAssetFormatters'
|
||||||
|
import { useAuth } from '@/composables/useAuth'
|
||||||
import { formatDateTime } from '@/utils/business/format'
|
import { formatDateTime } from '@/utils/business/format'
|
||||||
|
|
||||||
// Props
|
// Props
|
||||||
@@ -495,6 +496,14 @@
|
|||||||
|
|
||||||
const props = defineProps<Props>()
|
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
|
// Emits
|
||||||
interface Emits {
|
interface Emits {
|
||||||
(e: 'update:pollingEnabled', value: boolean): void
|
(e: 'update:pollingEnabled', value: boolean): void
|
||||||
|
|||||||
@@ -14,6 +14,7 @@
|
|||||||
maxlength="32"
|
maxlength="32"
|
||||||
show-word-limit
|
show-word-limit
|
||||||
clearable
|
clearable
|
||||||
|
autocomplete="off"
|
||||||
/>
|
/>
|
||||||
</ElFormItem>
|
</ElFormItem>
|
||||||
<ElFormItem label="WiFi密码" prop="password">
|
<ElFormItem label="WiFi密码" prop="password">
|
||||||
@@ -25,6 +26,7 @@
|
|||||||
show-word-limit
|
show-word-limit
|
||||||
show-password
|
show-password
|
||||||
clearable
|
clearable
|
||||||
|
autocomplete="off"
|
||||||
/>
|
/>
|
||||||
</ElFormItem>
|
</ElFormItem>
|
||||||
</ElForm>
|
</ElForm>
|
||||||
|
|||||||
@@ -533,6 +533,7 @@
|
|||||||
maxlength="32"
|
maxlength="32"
|
||||||
show-word-limit
|
show-word-limit
|
||||||
clearable
|
clearable
|
||||||
|
autocomplete="off"
|
||||||
/>
|
/>
|
||||||
</ElFormItem>
|
</ElFormItem>
|
||||||
<ElFormItem label="WiFi密码" prop="password">
|
<ElFormItem label="WiFi密码" prop="password">
|
||||||
@@ -544,6 +545,7 @@
|
|||||||
show-word-limit
|
show-word-limit
|
||||||
show-password
|
show-password
|
||||||
clearable
|
clearable
|
||||||
|
autocomplete="off"
|
||||||
/>
|
/>
|
||||||
</ElFormItem>
|
</ElFormItem>
|
||||||
</ElForm>
|
</ElForm>
|
||||||
@@ -1956,7 +1958,7 @@
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hasAuth('asset:realname_policy')) {
|
if (hasAuth('device:realname_policy')) {
|
||||||
moreActions.push({
|
moreActions.push({
|
||||||
label: '实名认证策略',
|
label: '实名认证策略',
|
||||||
handler: () => handleDeviceOperation('realname-policy', row.virtual_no, row),
|
handler: () => handleDeviceOperation('realname-policy', row.virtual_no, row),
|
||||||
|
|||||||
@@ -1168,32 +1168,6 @@
|
|||||||
const getActions = (row: StandaloneIotCard) => {
|
const getActions = (row: StandaloneIotCard) => {
|
||||||
const actions: any[] = []
|
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')) {
|
if (hasAuth('iot_card:start_card')) {
|
||||||
actions.push({
|
actions.push({
|
||||||
label: '启用此卡',
|
label: '启用此卡',
|
||||||
@@ -1210,7 +1184,7 @@
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hasAuth('asset:realname_policy')) {
|
if (hasAuth('iot_card:realname_policy')) {
|
||||||
actions.push({
|
actions.push({
|
||||||
label: '实名认证策略',
|
label: '实名认证策略',
|
||||||
handler: () => handleCardOperation('realname-policy', row.iccid, row),
|
handler: () => handleCardOperation('realname-policy', row.iccid, row),
|
||||||
@@ -1218,29 +1192,14 @@
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 更多操作放到"更多"下拉菜单中
|
|
||||||
const moreActions: any[] = []
|
|
||||||
|
|
||||||
if (hasAuth('iot_card:clear_series')) {
|
if (hasAuth('iot_card:clear_series')) {
|
||||||
moreActions.push({
|
actions.push({
|
||||||
label: '清除关联',
|
label: '清除关联',
|
||||||
handler: () => handleCardOperation('clear-series', row.iccid),
|
handler: () => handleCardOperation('clear-series', row.iccid),
|
||||||
type: 'primary'
|
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
|
return actions
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1707,12 +1666,6 @@
|
|||||||
// IoT卡操作处理函数
|
// IoT卡操作处理函数
|
||||||
const handleCardOperation = (command: string, iccid: string, row?: any) => {
|
const handleCardOperation = (command: string, iccid: string, row?: any) => {
|
||||||
switch (command) {
|
switch (command) {
|
||||||
case 'realname-status':
|
|
||||||
showRealnameStatusDialog(iccid)
|
|
||||||
break
|
|
||||||
case 'card-status':
|
|
||||||
showCardStatusDialog(iccid)
|
|
||||||
break
|
|
||||||
case 'start-card':
|
case 'start-card':
|
||||||
handleStartCard(iccid)
|
handleStartCard(iccid)
|
||||||
break
|
break
|
||||||
@@ -1722,9 +1675,6 @@
|
|||||||
case 'realname-policy':
|
case 'realname-policy':
|
||||||
handleShowRealnamePolicy(iccid, row?.realname_policy)
|
handleShowRealnamePolicy(iccid, row?.realname_policy)
|
||||||
break
|
break
|
||||||
case 'manual-deactivate':
|
|
||||||
handleManualDeactivate(iccid)
|
|
||||||
break
|
|
||||||
case 'clear-series':
|
case 'clear-series':
|
||||||
handleClearSingleCardSeries(iccid)
|
handleClearSingleCardSeries(iccid)
|
||||||
break
|
break
|
||||||
|
|||||||
Reference in New Issue
Block a user