修改禅道已知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-option :value="null">{{$t('pleaseSelect')}}</a-select-option>-->
<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 }}
</span>
</a-select-option>
@@ -118,4 +118,12 @@
}
</script>
<style scoped>
.itemOption {
display: inline-block;
width: 100%;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
-o-text-overflow:ellipsis;
}
</style>
@@ -1,6 +1,7 @@
<template>
<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-select
@@ -13,14 +14,14 @@
:maxTagTextLength="2"
:placeholder="placeholder"
:getPopupContainer="getParentContainer"
:maxTagPlaceholder="content+'...'"
:maxTagPlaceholder="content"
optionFilterProp="children"
:filterOption="filterOption">
<a-select-option
v-for="(item,index) in dictOptions"
:key="index"
: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 }}
</span>
</a-select-option>
@@ -30,6 +31,7 @@
<script>
import { ajaxGetDictItems, getDictItemsFromCache } from '@/api/api'
export default {
name: 'JMultiSelectTag',
props: {
@@ -49,19 +51,19 @@
type: String,
default: '',
required: false
},
}
},
data() {
return {
dictOptions: [],
tagType:"",
tagType: '',
arrayValue: !this.value ? [] : this.value.split(this.spliter),
content: ''
}
},
created() {
if(!this.type || this.type==="list_multi"){
this.tagType = "select"
if (!this.type || this.type === 'list_multi') {
this.tagType = 'select'
} else {
this.tagType = this.type
}
@@ -70,13 +72,13 @@
},
watch: {
options: function(val) {
this.setCurrentDictOptions(val);
this.setCurrentDictOptions(val)
},
dictCode: {
immediate: true,
handler() {
this.initDictData()
},
}
},
value(val) {
if (!val) {
@@ -102,7 +104,7 @@
}
})
})
this.$emit('changelabel', arrayLabel);
this.$emit('changelabel', arrayLabel)
}
}
},
@@ -120,7 +122,7 @@
//根据字典Code, 初始化字典数组
ajaxGetDictItems(this.dictCode, null).then((res) => {
if (res.success) {
this.dictOptions = res.result;
this.dictOptions = res.result
}
})
}
@@ -141,8 +143,8 @@
})
this.content = item.join(',')
})
this.$emit('change', selectedValue.join(this.spliter));
this.$emit('changeQuery', content.join(this.spliter),this.db_field_name);
this.$emit('change', selectedValue.join(this.spliter))
this.$emit('changeQuery', content.join(this.spliter), this.db_field_name)
},
setCurrentDictOptions(dictOptions) {
this.dictOptions = dictOptions
@@ -170,8 +172,28 @@
}
}
</script>
<style scoped>
.itemOption {
display: inline-block;
width: 100%;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
-o-text-overflow: ellipsis;
}
</style>
<style>
.ant-select-selection__choice{
max-width: 50% !important;
/*.ant-select-selection__choice{*/
/* 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>