diff --git a/src/apis/user.ts b/src/apis/user.ts index b801afc..cd31788 100644 --- a/src/apis/user.ts +++ b/src/apis/user.ts @@ -2,7 +2,7 @@ import { createWebSocket } from 'libs/socket' const wsClient = createWebSocket() export const login = async (params: User.Login) => { - const res = await wsClient.waitAndSend({ + return await wsClient.waitAndSend({ messageType: 'Command', fnName: 'login', className: 'UserMgrService', @@ -11,5 +11,4 @@ export const login = async (params: User.Login) => { ...params, }, }) - return res } diff --git a/src/components/common/SoftKeyboard/index.vue b/src/components/common/SoftKeyboard/index.vue index 805980b..237600b 100644 --- a/src/components/common/SoftKeyboard/index.vue +++ b/src/components/common/SoftKeyboard/index.vue @@ -15,7 +15,7 @@ const emits = defineEmits<{ (e: 'confirm', value: string): void (e: 'close'): void }>() -const deviceStete = useDeviceStore() +const deviceState = useDeviceStore() const languageType = ref('en') const inputValue = ref(props.modelValue) const cnList = ref([]) @@ -41,7 +41,7 @@ onMounted(() => { const isOpen = ref(false) watchEffect(() => { // 在焦点内二次点击时不触发EventListener,做一下延迟处理 - if (deviceStete.deviceInfo.deviceType !== deviceStete.deviceTypeMap.LargeSpaceDM_B) { // 大空间标准版 + if (deviceState.deviceInfo.deviceType !== deviceState.deviceTypeMap.LargeSpaceDM_B) { // 大空间标准版 setTimeout(() => { isOpen.value = props.isVisible }, 100) @@ -52,7 +52,7 @@ watchEffect(() => { watch( () => props.isVisible, (newVal) => { - if (deviceStete.deviceInfo.deviceType !== deviceStete.deviceTypeMap.LargeSpaceDM_B) { + if (deviceState.deviceInfo.deviceType !== deviceState.deviceTypeMap.LargeSpaceDM_B) { isOpen.value = newVal } }, diff --git a/src/components/setting/History.vue b/src/components/setting/History.vue index 4ca8804..9bc80b1 100644 --- a/src/components/setting/History.vue +++ b/src/components/setting/History.vue @@ -2,7 +2,7 @@ // import { useSettingStore } from '@/stores/settingStore' import { syncSendCmd } from 'apis/system' import { ElMessageBox } from 'element-plus' -import { onMounted, ref } from 'vue' +import { computed, onMounted, ref } from 'vue' import { FtMessage } from '@/libs/message' @@ -93,13 +93,16 @@ const handleSelectionChange = (rows: Setting.History[]) => { const onClose = () => { visible.value = false } +const deleteBtnVisible = computed(() => { + return JSON.parse(localStorage.user).roleType.includes('admin') +})