diff --git a/package-lock.json b/package-lock.json index 4045c1d..3b9be9e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,6 +12,7 @@ "echarts": "^5.4.3", "moment": "^2.29.4", "pinia": "^2.0.32", + "simple-keyboard": "^3.6.40", "vant": "^4.6.3", "vue": "^3.2.45", "vue-router": "^4.0.13" @@ -707,6 +708,11 @@ "node": ">=12.0.0" } }, + "node_modules/simple-keyboard": { + "version": "3.6.40", + "resolved": "https://registry.npmmirror.com/simple-keyboard/-/simple-keyboard-3.6.40.tgz", + "integrity": "sha512-4QmY9lpGhEIPeSUbUVnyLaYZBm9akR8z40c3ReSIij0h/oGaUxmVfcQIfG/Yvydym9m+PIWXdcquRv9fR+g/1w==" + }, "node_modules/source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", @@ -1352,6 +1358,11 @@ "source-map-js": ">=0.6.2 <2.0.0" } }, + "simple-keyboard": { + "version": "3.6.40", + "resolved": "https://registry.npmmirror.com/simple-keyboard/-/simple-keyboard-3.6.40.tgz", + "integrity": "sha512-4QmY9lpGhEIPeSUbUVnyLaYZBm9akR8z40c3ReSIij0h/oGaUxmVfcQIfG/Yvydym9m+PIWXdcquRv9fR+g/1w==" + }, "source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", diff --git a/package.json b/package.json index ef7b6af..d915d6e 100644 --- a/package.json +++ b/package.json @@ -13,6 +13,7 @@ "echarts": "^5.4.3", "moment": "^2.29.4", "pinia": "^2.0.32", + "simple-keyboard": "^3.6.40", "vant": "^4.6.3", "vue": "^3.2.45", "vue-router": "^4.0.13" diff --git a/src/components/LoginForm.vue b/src/components/LoginForm.vue index 8efa73e..65260f3 100644 --- a/src/components/LoginForm.vue +++ b/src/components/LoginForm.vue @@ -6,12 +6,14 @@ type="text" v-model="username" class="username" + @focus="handleFocus(1)" placeholder="请输入用户名" />
@@ -22,10 +24,32 @@ import Eye from '@/assets/img/login/eye.png' import Open from '@/assets/img/login/open.png' import { useWebSocketStore, useUserStore } from '@/store' -import { ref } from 'vue' +import { ref, watch } from 'vue' import { useRouter } from 'vue-router' import { loginJSON } from '@/mock/command' +const props = defineProps({ + handleShowKey: { + type: Function, + }, + handleHideKey: { + type: Function, + }, + clearInput: { + type: Function, + }, + input: { + type: String, + }, +}) + +const activeInput = ref(1) +const handleFocus = flag => { + props.handleShowKey() + props.clearInput() + activeInput.value = flag +} + const router = useRouter() const userStore = useUserStore() const webSocketStore = useWebSocketStore() @@ -37,8 +61,17 @@ const tip = ref('') const handleEye = () => { showPassword.value = !showPassword.value } +watch(() => { + // 需要有个逻辑判断 + if (activeInput.value == 1) { + username.value = props.input + } else { + password.value = props.input + } +}) const handleLogin = () => { + props.handleHideKey() if (username.value == '') { tip.value = '用户名不能为空' return diff --git a/src/components/Progress.vue b/src/components/Progress.vue index c0b1ea8..761b7b9 100644 --- a/src/components/Progress.vue +++ b/src/components/Progress.vue @@ -3,7 +3,7 @@1000:00:00
+{{ operatorStore.estimatedRemainingTimeS }}
加液蠕动泵
-000/000
+000 RPM
喷液蠕动泵
-000/000
+000 RPM
空压机
-000/000
+000 A
风机
-000/000
+000 RPM
水浸
-000/000
+有水
液位
-000/000
+000 kPa/100g
仓内
-温度 100 ℃
-湿度 100 ℃
-过氧化氢浓度 100 PPM
+温度 {{ deviceStore.binTemperature }} ℃
+湿度 {{ deviceStore.binHumidity }} ℃
+过氧化氢浓度 {{ deviceStore.binHP }} PPM
环境1
-温度 100 ℃
-湿度 100 ℃
-过氧化氢浓度 100 PPM
+温度 {{ deviceStore.envirTemperature1 }} ℃
+湿度 {{ deviceStore.envirHumidity1 }} ℃
+过氧化氢浓度 {{ deviceStore.envirHP1 }} PPM
环境2
-温度 100 ℃
-湿度 100 ℃
-过氧化氢浓度 100 PPM
+温度 {{ deviceStore.envirTemperature2 }} ℃
+湿度 {{ deviceStore.envirHumidity2 }} ℃
+过氧化氢浓度 {{ deviceStore.envirHP2 }} PPM