|
@@ -14,7 +14,7 @@
|
|
>{{ item.name }}</span>
|
|
>{{ item.name }}</span>
|
|
</span>
|
|
</span>
|
|
<!-- 其他 -->
|
|
<!-- 其他 -->
|
|
- <span v-if="list?.length > num" class="mx-3" style="line-height: 32px;">{{ $t('common.other') }}</span>
|
|
|
|
|
|
+ <span v-if="list?.length > num" class="mx-3" style="line-height: 32px;" @click="handleShowOther({ list, index: levelIndex })">{{ $t('common.other') }}</span>
|
|
</div>
|
|
</div>
|
|
<!-- 多选级别 -->
|
|
<!-- 多选级别 -->
|
|
<div v-else class="embedded">
|
|
<div v-else class="embedded">
|
|
@@ -28,8 +28,26 @@
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
+ <!-- 其他-弹窗 -->
|
|
|
|
+ <CtDialog :visible="showDialog" :footer="false" :widthType="0" :title="$t('common.pleaseSelect')" @close="showDialog = false">
|
|
|
|
+ <div style="min-height: 450px;overflow: auto;">
|
|
|
|
+ <textUI
|
|
|
|
+ :modelValue="areaSearch.value"
|
|
|
|
+ :item="areaSearch"
|
|
|
|
+ v-bind="props"
|
|
|
|
+ class="mt-3"
|
|
|
|
+ style="position: relative;"
|
|
|
|
+ @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>
|
|
|
|
+ </div>
|
|
|
|
+ </CtDialog>
|
|
</template>
|
|
</template>
|
|
<script setup>
|
|
<script setup>
|
|
|
|
+import CtDialog from '@/components/CtDialog'
|
|
|
|
+import textUI from '@/components/FormUI/TextInput'
|
|
import { getDict } from '@/hooks/web/useDictionaries'
|
|
import { getDict } from '@/hooks/web/useDictionaries'
|
|
import { inject, reactive, ref } from 'vue'
|
|
import { inject, reactive, ref } from 'vue'
|
|
defineOptions({ name:'common-components-areaTree'})
|
|
defineOptions({ name:'common-components-areaTree'})
|
|
@@ -145,6 +163,31 @@ const clear = (list, levelIndex) => {
|
|
idChecked.splice(levelIndex, idChecked.length) // 清除本级选中及其下级选中
|
|
idChecked.splice(levelIndex, idChecked.length) // 清除本级选中及其下级选中
|
|
emits('checkedInput', idChecked)
|
|
emits('checkedInput', idChecked)
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+// 弹窗
|
|
|
|
+const showDialog = ref(false)
|
|
|
|
+const dialogData = ref({})
|
|
|
|
+const otherAreaList = ref([])
|
|
|
|
+// const keyWord = ref('')
|
|
|
|
+const handleShowOther = ({ list, index }) => {
|
|
|
|
+ dialogData.value = { list, index }
|
|
|
|
+ otherAreaList.value = [...dialogData.value.list]
|
|
|
|
+ showDialog.value = true
|
|
|
|
+}
|
|
|
|
+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) => {
|
|
|
|
+ handleNext({ item, index: dialogData.value.index })
|
|
|
|
+ showDialog.value = false
|
|
|
|
+}
|
|
|
|
+const areaSearch = ref({
|
|
|
|
+ type: 'text',
|
|
|
|
+ key: 'name',
|
|
|
|
+ value: '',
|
|
|
|
+ label: '请输入关键字',
|
|
|
|
+})
|
|
</script>
|
|
</script>
|
|
<style lang="scss" scoped>
|
|
<style lang="scss" scoped>
|
|
.text666 {
|
|
.text666 {
|
|
@@ -178,4 +221,19 @@ span {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+.otherAreaBox {
|
|
|
|
+ padding: 4px;
|
|
|
|
+ // background-color: #f8f8f8;
|
|
|
|
+ border-radius: 5px;
|
|
|
|
+ width: 100%; /* 设置容器宽度 */
|
|
|
|
+ div {
|
|
|
|
+ cursor: pointer;
|
|
|
|
+ // line-height: 40px;
|
|
|
|
+ margin: 0 16px 12px;
|
|
|
|
+ font-size: 14px;
|
|
|
|
+ &:hover {
|
|
|
|
+ color: var(--v-primary-lighten2);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+}
|
|
</style>
|
|
</style>
|