|
@@ -2,7 +2,7 @@
|
|
|
<div class="d-flex">
|
|
|
<companyIndustry @inputChange="val => inputChange('industryIds', val)"></companyIndustry>
|
|
|
<positionType @inputChange="val => inputChange('positionId', val)"></positionType>
|
|
|
- <JobType @inputChange="val => emits('change', 'jobType', val)"></JobType>
|
|
|
+ <JobType positionIndexPage @inputChange="val => inputChange('jobType', val)"></JobType>
|
|
|
<expType :isSingle="false" @inputChange="val => inputChange('expType', val)"></expType>
|
|
|
<payScope @inputChange="val => inputChange('payType', val)"></payScope>
|
|
|
<educationType :isSingle="false" @inputChange="val => inputChange('eduType', val)"></educationType>
|
|
@@ -19,38 +19,43 @@ import payScope from './conditionFilter/payScope.vue'
|
|
|
import educationType from './conditionFilter/educationType.vue'
|
|
|
import scale from './conditionFilter/scale.vue'
|
|
|
import financingStatus from './conditionFilter/financingStatus.vue'
|
|
|
-import { reactive, defineExpose } from 'vue'
|
|
|
-import { useRoute } from 'vue-router'
|
|
|
+// import { reactive, defineExpose } from 'vue'
|
|
|
+// import { useRoute } from 'vue-router'
|
|
|
defineOptions({name: 'retrieval-components-conditionFilter'})
|
|
|
const emits = defineEmits(['change'])
|
|
|
-const route = useRoute()
|
|
|
|
|
|
-const removeEmptyStringsAndReturnNew = (obj) => {
|
|
|
- const result = {}
|
|
|
- Object.keys(obj).forEach(function(key) {
|
|
|
- if (obj[key]) {
|
|
|
- result[key] = obj[key]
|
|
|
- }
|
|
|
- })
|
|
|
- return result
|
|
|
+const inputChange = (key, arr) => {
|
|
|
+ const str = arr.length ? arr.join('_') : ''
|
|
|
+ emits('change', key, str)
|
|
|
}
|
|
|
+// const route = useRoute()
|
|
|
+
|
|
|
+// const removeEmptyStringsAndReturnNew = (obj) => {
|
|
|
+// const result = {}
|
|
|
+// Object.keys(obj).forEach(function(key) {
|
|
|
+// if (obj[key]) {
|
|
|
+// result[key] = obj[key]
|
|
|
+// }
|
|
|
+// })
|
|
|
+// return result
|
|
|
+// }
|
|
|
|
|
|
-const params = reactive({})
|
|
|
-let query = reactive({})
|
|
|
+// const params = reactive({})
|
|
|
+// let query = reactive({})
|
|
|
|
|
|
-if (route.query?.content) {
|
|
|
- query['content'] = route.query.content
|
|
|
- emits('change')
|
|
|
-}
|
|
|
+// if (route.query?.content) {
|
|
|
+// query['content'] = route.query.content
|
|
|
+// emits('change')
|
|
|
+// }
|
|
|
|
|
|
-const inputChange = (key, { values }) => {
|
|
|
- params[key] = values
|
|
|
- query[key] = Array.isArray(values) ? values.join('_') : values
|
|
|
- query = removeEmptyStringsAndReturnNew(query)
|
|
|
- emits('change', query.value)
|
|
|
-}
|
|
|
-const getQuery = () => {
|
|
|
- return query
|
|
|
-}
|
|
|
-defineExpose({ getQuery, params })
|
|
|
+// const inputChange = (key, { values }) => {
|
|
|
+// params[key] = values
|
|
|
+// query[key] = Array.isArray(values) ? values.join('_') : values
|
|
|
+// query = removeEmptyStringsAndReturnNew(query)
|
|
|
+// emits('change', query.value)
|
|
|
+// }
|
|
|
+// const getQuery = () => {
|
|
|
+// return query
|
|
|
+// }
|
|
|
+// defineExpose({ getQuery, params })
|
|
|
</script>
|