fix(operator): fix operator edit issue
All checks were successful
构建并部署前端到测试环境 / build-and-deploy (push) Successful in 4m51s

This commit is contained in:
sexygoat
2026-04-10 14:00:21 +08:00
parent 9a6f085cde
commit 2b3119c549
53 changed files with 547 additions and 418 deletions

View File

@@ -40,6 +40,7 @@
<script setup lang="ts">
import { ref } from 'vue'
import { useRoute } from 'vue-router'
import { ElCard, ElInput, ElButton } from 'element-plus'
import { Search, Refresh } from '@element-plus/icons-vue'
import { useAssetFormatters } from '../composables/useAssetFormatters'
@@ -47,6 +48,8 @@
// Use formatters
const { formatIccidWithDashes } = useAssetFormatters()
const route = useRoute()
// Props
interface Props {
hasCardInfo?: boolean
@@ -66,6 +69,26 @@
const searchIccid = ref('')
const iccidInputFocused = ref(false)
// 从URL参数中获取初始值
const initializeFromQuery = () => {
const iccid = route.query.iccid as string
const virtualNo = route.query.virtual_no as string
const deviceNo = route.query.device_no as string
const identifier = iccid || virtualNo || deviceNo
if (identifier) {
searchIccid.value = identifier
}
}
// 初始化时从URL参数加载
initializeFromQuery()
// 暴露方法供父组件调用,用于更新搜索框值
const updateSearchValue = (value: string) => {
searchIccid.value = value
}
// Methods
const handleSearch = () => {
if (!searchIccid.value.trim()) {
@@ -77,6 +100,11 @@
const handleRefresh = () => {
emit('refresh')
}
// 暴露给父组件
defineExpose({
updateSearchValue
})
</script>
<style scoped lang="scss">