|
@@ -1,19 +1,35 @@
|
|
|
<template>
|
|
|
- <commonStyle btnTitle="公司规模">
|
|
|
- <div></div>
|
|
|
+ <commonStyle btnTitle="公司规模" :close-on-content-click="false">
|
|
|
+ <v-list>
|
|
|
+ <v-list-item
|
|
|
+ color="primary"
|
|
|
+ :active="selectedItems.includes(item.value)"
|
|
|
+ v-for="item in items" :key="item.id" :value="item.value"
|
|
|
+ @click="handle(item.value)"
|
|
|
+ >
|
|
|
+ <v-list-item-title>{{ item.label }}</v-list-item-title>
|
|
|
+ </v-list-item>
|
|
|
+ </v-list>
|
|
|
</commonStyle>
|
|
|
</template>
|
|
|
<script setup>
|
|
|
import commonStyle from './commonStyle.vue'
|
|
|
import { getDict } from '@/hooks/web/useDictionaries'
|
|
|
-import { ref } from 'vue';
|
|
|
+import { ref, defineEmits } from 'vue';
|
|
|
|
|
|
defineOptions({name: 'conditionFilter-scale'})
|
|
|
+const emits = defineEmits(['selectedItems'])
|
|
|
let items = ref()
|
|
|
-getDict('menduner_scale').then(({ data }) => { // 公司规模
|
|
|
+const selectedItems = ref([])
|
|
|
+getDict('menduner_scale').then(({ data }) => {
|
|
|
data = data?.length && data || []
|
|
|
items.value = data
|
|
|
})
|
|
|
+const handle = (val) => {
|
|
|
+ if (selectedItems.value.includes(val)) selectedItems.value = selectedItems.value.filter(i => i !== val)
|
|
|
+ else selectedItems.value.push(val)
|
|
|
+ emits('selectedItems', selectedItems.value)
|
|
|
+}
|
|
|
</script>
|
|
|
<style lang="scss" scoped>
|
|
|
</style>
|