| | |
| | | title="设置编号" |
| | | width="80%" |
| | | :show-close="false" |
| | | class="scheduled-task-dialog" |
| | | :destroy-on-close="true" |
| | | :close-on-click-modal="false" |
| | | > |
| | | <template #header> |
| | | <div class="setting-dialog-header"> |
| | |
| | | </template> |
| | | <div class="setting-device-dialog-content"> |
| | | <div class="content-row1"> |
| | | <div class="row1-label">设备编号</div> |
| | | <div class="row1-label" @click="openQrScanner">设备编号<i class="iconfont icon-saoma"></i></div> |
| | | <div class="row1-inp-box"> |
| | | <input |
| | | v-model="devcieCode" |
| | |
| | | <template #footer> |
| | | <div class="my-button cancel" @click="handleCancel">取消</div> |
| | | <div class="my-button confirm" @click="handleConfirm">确认</div> |
| | | <div class="my-button refresh" @click="handleRefresh">刷新</div> |
| | | <div class="my-button refresh" @click="handleRefresh">检查更新</div> |
| | | </template> |
| | | </el-dialog> |
| | | <!-- 长识别二维码 --> |
| | | <QrScanner ref="QrScannerRef" @scan="onQrScan" /> |
| | | |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | import closeImg from "@/img/close.png"; |
| | | import uploadImg from "@/img/upload.png"; |
| | | import { useBedsideAuxiliaryScreenStore } from "@/store/bedsideAuxiliaryScreen"; |
| | | import QrScanner from "@/components/QrScanner/index.vue"; |
| | | |
| | | const bedsideAuxiliaryScreenStore = useBedsideAuxiliaryScreenStore(); |
| | | |
| | | const QrScannerRef = ref(null); |
| | | |
| | | const isShow = ref(false); |
| | | const isUploading = ref(false); |
| | |
| | | |
| | | const handleConfirm = () => { |
| | | bedsideAuxiliaryScreenStore.setDeviceCode(devcieCode.value + ""); |
| | | bedsideAuxiliaryScreenStore.refresh( |
| | | `${import.meta.env.VITE_SSE_BASE_URL}${devcieCode.value}` |
| | | ); |
| | | handleCancel(); |
| | | }; |
| | | |
| | | const handleRefresh = () => {}; |
| | | const handleRefresh = () => { |
| | | window.location.reload(); |
| | | ElMessage.success('已更新至最新版本') |
| | | }; |
| | | |
| | | const openQrScanner = () => { |
| | | QrScannerRef.value?.open(); |
| | | }; |
| | | |
| | | const onQrScan = ({ success, code}) => { |
| | | if (!success) return; |
| | | devcieCode.value = code; |
| | | ElMessage.success("识别成功"); |
| | | }; |
| | | |
| | | defineExpose({ |
| | | openDialog, |
| | |
| | | line-height: 16px; |
| | | color: #ffffff; |
| | | font-style: normal; |
| | | .iconfont { |
| | | margin-left: 2px; |
| | | font-size: 9px; |
| | | } |
| | | } |
| | | .row1-inp-box { |
| | | flex: 1; |
| | |
| | | height: 100%; |
| | | border: none; |
| | | outline: none; |
| | | padding: 0 4px; // 给一点水平 padding 更美观 |
| | | padding: 0 4px; |
| | | line-height: 16px; |
| | | font-size: 9px; |
| | | font-family: PingFangSC, PingFang SC; |
| | | vertical-align: middle; // ✅ 关键设置 |
| | | vertical-align: middle; |
| | | box-sizing: border-box; // 避免padding撑高 |
| | | |
| | | &::placeholder { |
| | |
| | | } |
| | | } |
| | | } |
| | | </style> |
| | | <style> |
| | | .scheduled-task-dialog { |
| | | margin: 0 auto; |
| | | top: 50% !important; |
| | | transform: translateY(-50%) !important; |
| | | } |
| | | </style> |