添加为查找到提示

This commit is contained in:
fan 2023-07-25 11:22:10 +08:00
parent 2a5888912b
commit 0d64cc8185

View File

@ -236,7 +236,9 @@ import { SectionDraw } from 'src/graphics/section/SectionDrawAssistant';
import { Section } from 'src/graphics/section/Section';
import { LogicSection } from 'src/graphics/logicSection/LogicSection';
import { LogicSectionDraw } from 'src/graphics/logicSection/LogicSectionDrawAssistant';
import { useQuasar } from 'quasar';
const $q = useQuasar();
const route = useRoute();
const router = useRouter();
const searchId = ref('');
@ -254,14 +256,19 @@ watch(
watch(
() => searchId.value,
() => {
try {
if (searchId.value) {
const device = drawStore
.getDrawApp()
.queryStore.queryById(searchId.value);
if (device) {
drawStore.getDrawApp().makeGraphicCenterShow(device);
drawStore.getDrawApp().updateSelected(device);
}
} catch (err) {
$q.notify({
type: 'negative',
message: `未查找到id为【${searchId.value}】的设备`,
});
}
}
);