范围配置修改
This commit is contained in:
parent
c7d0bbe9bc
commit
450780677e
@ -84,6 +84,7 @@ import { saveAlertTypeData, showAlertTypeData } from '../alarm/alarmInfoEnum';
|
||||
import { Section, SectionType } from 'src/graphics/section/Section';
|
||||
import { useRangeConfigStore } from 'src/stores/range-config-store';
|
||||
import { getRangeConfigApp } from 'src/drawApp/rangeConfigApp';
|
||||
import { errorNotify } from 'src/utils/CommonNotify';
|
||||
|
||||
defineExpose({ searchById });
|
||||
|
||||
@ -183,7 +184,13 @@ let handle = ref('');
|
||||
let handleError = ref('');
|
||||
async function onSubmit() {
|
||||
myForm.value?.validate().then(async (res) => {
|
||||
if (res) {
|
||||
let validataOfDevice = false;
|
||||
if (rangeConfig.device.length) {
|
||||
validataOfDevice = true;
|
||||
} else {
|
||||
errorNotify('请框选设备', '');
|
||||
}
|
||||
if (res && validataOfDevice) {
|
||||
try {
|
||||
const lineId = +route.params.id as number;
|
||||
const alertTypes = rangeConfig.alertTypes.map(
|
||||
@ -216,7 +223,7 @@ async function onSubmit() {
|
||||
} catch (err) {
|
||||
$q.notify({
|
||||
type: 'negative',
|
||||
message: handleError.value,
|
||||
message: (err as { title: '' }).title,
|
||||
});
|
||||
} finally {
|
||||
setTimeout(() => {
|
||||
@ -274,6 +281,7 @@ function onReset() {
|
||||
rangeConfig.areaName = '';
|
||||
rangeConfig.deviceType = '';
|
||||
rangeConfig.alertTypes = [];
|
||||
rangeConfig.device = [];
|
||||
clearSelect();
|
||||
}
|
||||
</script>
|
||||
|
Loading…
Reference in New Issue
Block a user