Browse Source

运行参数禁止输入汉字

master
王梦远 2 days ago
parent
commit
0a46fec20b
  1. 10
      src/components/formula/RunFormulaConfig.vue

10
src/components/formula/RunFormulaConfig.vue

@ -1,5 +1,6 @@
<script lang="ts" setup>
import { inject, onMounted, ref, watchEffect } from 'vue'
import { useDeviceStore } from 'stores/deviceStore'
import { computed, inject, onMounted, ref, watchEffect } from 'vue'
import { convertValuesToString } from '@/libs/utils'
import { useFormulaStore } from '@/stores/formulaStore'
@ -72,6 +73,11 @@ const validatePass = (rule: any, value: any, callback: any, config: Formula.Form
}
callback()
}
const deviceType = computed(() => {
return __DEVICE_TYPE__
})
const deviceStore = useDeviceStore()
</script>
<template>
@ -110,6 +116,7 @@ const validatePass = (rule: any, value: any, callback: any, config: Formula.Form
:name="item.setting_id"
:controls="false"
:disabled="!item.is_editable"
:type="deviceType === deviceStore.deviceTypeMap.LargeSpaceDM_B ? 'number' : 'default'"
>
<template v-if="labelUnitMap[item.setting_id]" #append>
{{ labelUnitMap[item.setting_id] }}
@ -123,6 +130,7 @@ const validatePass = (rule: any, value: any, callback: any, config: Formula.Form
:name="item.setting_id"
:controls="false"
:disabled="!item.is_editable"
:type="deviceType === deviceStore.deviceTypeMap.LargeSpaceDM_B ? 'number' : 'default'"
>
<template v-if="labelUnitMap[item.setting_id]" #append>
{{ labelUnitMap[item.setting_id] }}

Loading…
Cancel
Save