| | |
| | | </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 + ""); |
| | | handleRefresh(); |
| | | bedsideAuxiliaryScreenStore.refresh( |
| | | `${import.meta.env.VITE_SSE_BASE_URL}${devcieCode.value}` |
| | | ); |
| | | handleCancel(); |
| | | }; |
| | | |
| | | const handleRefresh = () => { |
| | | bedsideAuxiliaryScreenStore.refresh( |
| | | `${import.meta.env.VITE_SSE_BASE_URL}${devcieCode.value}` |
| | | ); |
| | | window.location.reload(); |
| | | ElMessage.success('已更新至最新版本') |
| | | }; |
| | | |
| | | const openQrScanner = () => { |
| | | QrScannerRef.value?.open(); |
| | | }; |
| | | |
| | | const onQrScan = ({ success, code}) => { |
| | | if (!success) return; |
| | | devcieCode.value = code; |
| | | ElMessage.success("识别成功"); |
| | | }; |
| | | |
| | | defineExpose({ |
| | |
| | | line-height: 16px; |
| | | color: #ffffff; |
| | | font-style: normal; |
| | | .iconfont { |
| | | margin-left: 2px; |
| | | font-size: 9px; |
| | | } |
| | | } |
| | | .row1-inp-box { |
| | | flex: 1; |