Browse Source

fix: lis设置

master
guoapeng 2 weeks ago
parent
commit
537f565112
  1. 25
      src/pages/Index/Settings/EditLis.vue
  2. 10
      src/pages/Index/Settings/Lis.vue

25
src/pages/Index/Settings/EditLis.vue

@ -13,6 +13,29 @@
</button>
</div>
</div>
<div class="setting-item">
<span class="label">自动上报</span>
<div class="options">
<button
:class="{
active: lisForm?.lisAutoExport
}"
@click="setLisForm('lisAutoExport', true)"
>
开启
</button>
<button
:class="{
active: !lisForm?.lisAutoExport
}"
@click="setLisForm('lisAutoExport', false)"
>
关闭
</button>
</div>
</div>
<div class="setting-item">
<span class="label">协议</span>
<div class="options">
@ -155,7 +178,7 @@ const getLisSetting = async () => {
}
}
const setLisForm = async (type: string, value: string) => {
const setLisForm = async (type: string, value: string | boolean) => {
lisForm.value[type] = value
}

10
src/pages/Index/Settings/Lis.vue

@ -6,6 +6,14 @@
{{ LISTypeMap[lisSettings && lisSettings.lisType || ''] }}
</div>
</div>
<div class="setting-item">
<span class="label">自动上报</span>
<div class="options">
{{ lisSettings?.lisAutoExport ? '开启' : '关闭' }}
</div>
</div>
<div class="setting-item">
<span class="label">协议</span>
<div class="options">
@ -84,7 +92,7 @@ const inputValue = ref('')
const keyboardType = ref<'text' | 'number'>('number')
const softKeyboardRef = ref()
const lisVisible = ref(false)
const lisSettings = ref<(LISSettings & { LISNetPortStr: string }) | undefined>(
const lisSettings = ref<(LISSettings & { LISNetPortStr: string, lisAutoExport: boolean }) | undefined>(
undefined,
)
const getLisSetting = async () => {

Loading…
Cancel
Save