|
@@ -12,29 +12,32 @@
|
|
|
</template>
|
|
|
<script setup>
|
|
|
import areaTree from './areaCascader'
|
|
|
-import { reactive, ref, defineExpose } from 'vue'
|
|
|
+// import { reactive, ref, defineExpose } from 'vue'
|
|
|
+import { ref } from 'vue'
|
|
|
|
|
|
defineOptions({name: 'retrieval-components-cityFilter'})
|
|
|
-const emits = defineEmits(['updateCheckedInput'])
|
|
|
-let query = reactive({})
|
|
|
+const emits = defineEmits(['change'])
|
|
|
+// let query = reactive({})
|
|
|
const checkedInputChange = (idChecked) => {
|
|
|
+ let city = ''
|
|
|
if (idChecked?.length) {
|
|
|
- const obj = {}
|
|
|
+ // const obj = {}
|
|
|
idChecked.forEach((_e, index) => {
|
|
|
if (_e?.length) {
|
|
|
- obj[`level${index+1}`] = _e.join('_')
|
|
|
+ // obj[`level${index+1}`] = _e.join('_')
|
|
|
+ city += `${index ? '%' : ''}CL${index+1}_${_e.join('_')}` // CL: city-level
|
|
|
}
|
|
|
})
|
|
|
- query = obj
|
|
|
- emits('updateCheckedInput')
|
|
|
+ // query = obj
|
|
|
+ emits('change', 'city', city)
|
|
|
}
|
|
|
}
|
|
|
|
|
|
const tab = ref(1)
|
|
|
const tabClick = () => {
|
|
|
}
|
|
|
-const getQuery = () => {
|
|
|
- return query
|
|
|
-}
|
|
|
-defineExpose({ getQuery })
|
|
|
+// const getQuery = () => {
|
|
|
+// return query
|
|
|
+// }
|
|
|
+// defineExpose({ getQuery })
|
|
|
</script>
|