Merge branch 'dev' into dev-dictionary

This commit is contained in:
XieYongHong 2023-11-15 18:12:24 +08:00
commit dcc6afc6b7
3 changed files with 14 additions and 5 deletions

View File

@ -21,8 +21,9 @@
:max="_value[1] ? _value[1].value : 999999" :min="1" @change="handleChange" /> :max="_value[1] ? _value[1].value : 999999" :min="1" @change="handleChange" />
</j-col> </j-col>
<j-col> <j-col>
<j-select v-model:value="_value[0].termType" :showArrow="false" :options="termTypeOptions" <j-select v-model:value="_value[0].termType" :showArrow="false"
placeholder="符号" @change="handleChange" /> :options="_value.length !== 2 ? termTypeOptions : leftOptions" placeholder="符号"
@change="handleChange" />
</j-col> </j-col>
<template v-if="swap === 'range'"> <template v-if="swap === 'range'">
<j-col>点位值</j-col> <j-col>点位值</j-col>
@ -88,6 +89,11 @@ const termTypeOptions = computed(() => {
} }
}); });
const leftOptions = [
{ label: '<', value: 'lte' },
{ label: '≤', value: 'lt' },
];
const handleDeathArea = (e: any) => { const handleDeathArea = (e: any) => {
if (e) { if (e) {
_value.value = [{ _value.value = [{

View File

@ -242,7 +242,7 @@ getTypes();
const dataAreaFilterList = computed(() => { const dataAreaFilterList = computed(() => {
let result = daveAreaList.value.filter((item: any) => let result = daveAreaList.value.filter((item: any) =>
dataAreaFilter[deviceType.value].includes(item.id), dataAreaFilter[deviceType.value]?.includes(item.id),
); );
if (deviceType.value == 'S200') { if (deviceType.value == 'S200') {
result.push({ result.push({

View File

@ -505,7 +505,10 @@ const handlEdit = (data: any) => {
}else{ }else{
visible.saveModBus = true; visible.saveModBus = true;
} }
current.value = cloneDeep(data); current.value = cloneDeep({
...data,
deviceType:props.data?.configuration.type,
});
}; };
const handlDelete = async (id: string | undefined = undefined) => { const handlDelete = async (id: string | undefined = undefined) => {