|
@@ -14,7 +14,7 @@
|
|
|
>{{ item.name }}</span>
|
|
|
</span>
|
|
|
<!-- 其他 -->
|
|
|
- <span v-if="list?.length > num" class="mx-3" style="line-height: 32px;" @click="handleShowOther({ list, index: levelIndex })">{{ $t('common.other') }}</span>
|
|
|
+ <span v-if="list?.length > num" class="mx-3" :class="{'act': otherIsAct[levelIndex]}" style="line-height: 32px;" @click="handleShowOther({ list, index: levelIndex })">{{ $t('common.other') }}</span>
|
|
|
</div>
|
|
|
<!-- 多选级别 -->
|
|
|
<div v-else class="embedded">
|
|
@@ -40,7 +40,7 @@
|
|
|
@change="areaSearchChange"
|
|
|
></textUI>
|
|
|
<div class="otherAreaBox d-flex flex-wrap">
|
|
|
- <div v-for="item in otherAreaList" :key="item.id" @click="handleOtherClick(item)">{{ item.name }}</div>
|
|
|
+ <div v-for="(item, index) in otherAreaList" :class="{'act': calcAct(item.id, otherIndex)}" :key="item.id" @click="handleOtherClick(item, index)">{{ item.name }}</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</CtDialog>
|
|
@@ -145,6 +145,7 @@ const handleNext = ({ item, index, expand = true, updateSearch = true }) => {
|
|
|
} else {
|
|
|
treeList.value.splice(index + 1, treeList.value.length)
|
|
|
}
|
|
|
+ otherIsAct.value.splice(index + 1, treeList.value.length)
|
|
|
}
|
|
|
|
|
|
// 选中样式判断
|
|
@@ -168,8 +169,10 @@ const clear = (list, levelIndex) => {
|
|
|
const showDialog = ref(false)
|
|
|
const dialogData = ref({})
|
|
|
const otherAreaList = ref([])
|
|
|
+let otherIndex = null
|
|
|
// const keyWord = ref('')
|
|
|
const handleShowOther = ({ list, index }) => {
|
|
|
+ otherIndex = index
|
|
|
dialogData.value = { list, index }
|
|
|
otherAreaList.value = [...dialogData.value.list]
|
|
|
showDialog.value = true
|
|
@@ -178,7 +181,9 @@ const areaSearchChange = (val) => {
|
|
|
if (val) otherAreaList.value = dialogData.value.list.filter(e => e.name.includes(val))
|
|
|
else otherAreaList.value = [...dialogData.value.list]
|
|
|
}
|
|
|
-const handleOtherClick = (item) => {
|
|
|
+const otherIsAct = ref([])
|
|
|
+const handleOtherClick = (item, index) => {
|
|
|
+ if (index >=0) otherIsAct.value[index] = true
|
|
|
handleNext({ item, index: dialogData.value.index })
|
|
|
showDialog.value = false
|
|
|
}
|