| | |
| | | v-model="location" |
| | | ></OptionLocation2> |
| | | </el-form-item> |
| | | <OptionGridGroup |
| | | ref="gridGroupRef" |
| | | v-model="gridGroup" |
| | | ></OptionGridGroup> |
| | | <OptionGridGroup ref="gridGroupRef" v-model="gridGroup"></OptionGridGroup> |
| | | </el-form> |
| | | <!-- </el-col> --> |
| | | <!-- <el-col :span="4"> --> |
| | |
| | | import { ref, watch } from 'vue'; |
| | | |
| | | defineProps({ |
| | | loading: Boolean, |
| | | loading: Boolean |
| | | }); |
| | | |
| | | const location = ref(undefined); |
| | | const gridGroup = ref(undefined); |
| | | const gridGroupRef = ref(null); |
| | | const area = ref({}); |
| | | |
| | | const emits = defineEmits(['search']); |
| | | |
| | | watch(location, (nv, ov) => { |
| | | if (nv != ov) { |
| | | const area = { |
| | | area.value = { |
| | | provinceCode: nv.pCode, |
| | | provinceName: nv.pName, |
| | | cityCode: nv.cCode, |
| | |
| | | townCode: nv.tCode, |
| | | townName: nv.tName |
| | | }; |
| | | gridGroupRef.value.fetchGridGroup(area); |
| | | gridGroupRef.value.fetchGridGroup(area.value, 'origin'); |
| | | } |
| | | }); |
| | | |
| | |
| | | function handleClick() { |
| | | emits('search', gridGroup.value); |
| | | } |
| | | |
| | | defineExpose({ area }); |
| | | </script> |