修改禅道已知bug

This commit is contained in:
qq787203167
2022-05-10 14:22:07 +08:00
parent 788b5e733b
commit 8d5021bcca
2 changed files with 93 additions and 63 deletions
@@ -10,7 +10,7 @@
<a-select v-else-if="tagType=='select'" :getPopupContainer = "getPopupContainer" :placeholder="placeholder" :disabled="disabled" :value="getValueSting" @change="handleInput"> <a-select v-else-if="tagType=='select'" :getPopupContainer = "getPopupContainer" :placeholder="placeholder" :disabled="disabled" :value="getValueSting" @change="handleInput">
<!-- <a-select-option :value="null">{{$t('pleaseSelect')}}</a-select-option>--> <!-- <a-select-option :value="null">{{$t('pleaseSelect')}}</a-select-option>-->
<a-select-option v-for="(item, key) in dictOptionsValue" :key="key" :value="item.value"> <a-select-option v-for="(item, key) in dictOptionsValue" :key="key" :value="item.value">
<span style="display: inline-block;width: 100%" :title=" item.text || item.label "> <span class="itemOption" :title=" item.text || item.label ">
{{ item.text || item.label }} {{ item.text || item.label }}
</span> </span>
</a-select-option> </a-select-option>
@@ -118,4 +118,12 @@
} }
</script> </script>
<style scoped> <style scoped>
.itemOption {
display: inline-block;
width: 100%;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
-o-text-overflow:ellipsis;
}
</style> </style>
@@ -1,6 +1,7 @@
<template> <template>
<a-checkbox-group v-if="tagType=='checkbox'" @change="onChange" :value="arrayValue" :disabled="disabled"> <a-checkbox-group v-if="tagType=='checkbox'" @change="onChange" :value="arrayValue" :disabled="disabled">
<a-checkbox v-for="(item, key) in dictOptions" :key="key" :value="item.value">{{ item.text || item.label }}</a-checkbox> <a-checkbox v-for="(item, key) in dictOptions" :key="key" :value="item.value">{{ item.text || item.label }}
</a-checkbox>
</a-checkbox-group> </a-checkbox-group>
<a-select <a-select
@@ -13,14 +14,14 @@
:maxTagTextLength="2" :maxTagTextLength="2"
:placeholder="placeholder" :placeholder="placeholder"
:getPopupContainer="getParentContainer" :getPopupContainer="getParentContainer"
:maxTagPlaceholder="content+'...'" :maxTagPlaceholder="content"
optionFilterProp="children" optionFilterProp="children"
:filterOption="filterOption"> :filterOption="filterOption">
<a-select-option <a-select-option
v-for="(item,index) in dictOptions" v-for="(item,index) in dictOptions"
:key="index" :key="index"
:value="item.value"> :value="item.value">
<span style="display: inline-block;width: 100%" :title="item.text || item.label"> <span class="itemOption" :title="item.text || item.label">
{{ item.text || item.label }} {{ item.text || item.label }}
</span> </span>
</a-select-option> </a-select-option>
@@ -30,6 +31,7 @@
<script> <script>
import { ajaxGetDictItems, getDictItemsFromCache } from '@/api/api' import { ajaxGetDictItems, getDictItemsFromCache } from '@/api/api'
export default { export default {
name: 'JMultiSelectTag', name: 'JMultiSelectTag',
props: { props: {
@@ -49,19 +51,19 @@
type: String, type: String,
default: '', default: '',
required: false required: false
}, }
}, },
data() { data() {
return { return {
dictOptions: [], dictOptions: [],
tagType:"", tagType: '',
arrayValue: !this.value ? [] : this.value.split(this.spliter), arrayValue: !this.value ? [] : this.value.split(this.spliter),
content: '' content: ''
} }
}, },
created() { created() {
if(!this.type || this.type==="list_multi"){ if (!this.type || this.type === 'list_multi') {
this.tagType = "select" this.tagType = 'select'
} else { } else {
this.tagType = this.type this.tagType = this.type
} }
@@ -70,13 +72,13 @@
}, },
watch: { watch: {
options: function(val) { options: function(val) {
this.setCurrentDictOptions(val); this.setCurrentDictOptions(val)
}, },
dictCode: { dictCode: {
immediate: true, immediate: true,
handler() { handler() {
this.initDictData() this.initDictData()
}, }
}, },
value(val) { value(val) {
if (!val) { if (!val) {
@@ -102,7 +104,7 @@
} }
}) })
}) })
this.$emit('changelabel', arrayLabel); this.$emit('changelabel', arrayLabel)
} }
} }
}, },
@@ -120,7 +122,7 @@
//根据字典Code, 初始化字典数组 //根据字典Code, 初始化字典数组
ajaxGetDictItems(this.dictCode, null).then((res) => { ajaxGetDictItems(this.dictCode, null).then((res) => {
if (res.success) { if (res.success) {
this.dictOptions = res.result; this.dictOptions = res.result
} }
}) })
} }
@@ -141,8 +143,8 @@
}) })
this.content = item.join(',') this.content = item.join(',')
}) })
this.$emit('change', selectedValue.join(this.spliter)); this.$emit('change', selectedValue.join(this.spliter))
this.$emit('changeQuery', content.join(this.spliter),this.db_field_name); this.$emit('changeQuery', content.join(this.spliter), this.db_field_name)
}, },
setCurrentDictOptions(dictOptions) { setCurrentDictOptions(dictOptions) {
this.dictOptions = dictOptions this.dictOptions = dictOptions
@@ -170,8 +172,28 @@
} }
} }
</script> </script>
<style scoped>
.itemOption {
display: inline-block;
width: 100%;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
-o-text-overflow: ellipsis;
}
</style>
<style> <style>
.ant-select-selection__choice{ /*.ant-select-selection__choice{*/
max-width: 50% !important; /* max-width: 50% !important;*/
/*}*/
.ant-select-selection--multiple {
overflow: hidden;
}
.ant-select-selection__rendered ul {
word-break: break-all;
display: -webkit-box;
-webkit-box-orient: vertical;
float: left;
} }
</style> </style>