Merge remote-tracking branch 'origin/master'

# Conflicts:
#	jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/template/service/impl/ParamsInfoEOServiceImpl.java
#	jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/job/InventoryAffirmJob.java
#	jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectLawsInventoryEOServiceImpl.java
#	jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectTaskInventoryEOServiceImpl.java
#	jero-boot/jero-boot-modules/src/main/java/com/jero/modules/split/service/impl/FileSplitItemsEOServiceImpl.java
#	jero-web/src/common/lang/en-us.js
#	jero-web/src/common/lang/zh-cn.js
#	jero-web/src/components/uploadFileChangeDown/file.vue
This commit is contained in:
zer0Black
2022-07-01 15:12:31 +08:00
74 changed files with 1796 additions and 722 deletions
+45 -38
View File
@@ -3,13 +3,20 @@
<a-radio v-for="(item, key) in dictOptions" :key="key" :value="item.value">{{ item.text }}</a-radio>
</a-radio-group>
<a-radio-group v-else-if="tagType=='radioButton'" buttonStyle="solid" @change="handleInput" :value="getValueSting" :disabled="disabled">
<a-radio-group v-else-if="tagType=='radioButton'" buttonStyle="solid" @change="handleInput" :value="getValueSting"
:disabled="disabled">
<a-radio-button v-for="(item, key) in dictOptions" :key="key" :value="item.value">{{ item.text }}</a-radio-button>
</a-radio-group>
<a-select v-else-if="tagType=='select'" allowClear :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">
<a-select v-else-if="tagType=='select'" allowClear :getPopupContainer="getPopupContainer"
show-search
optionFilterProp="label"
: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"
:label="item.text || item.label"
:value="item.value">
<span class="itemOption-index" :title=" item.text || item.label ">
{{ item.text || item.label }}
</span>
@@ -18,19 +25,19 @@
</template>
<script>
import {ajaxGetDictItems,getDictItemsFromCache} from '@/api/api'
import { ajaxGetDictItems, getDictItemsFromCache } from '@/api/api'
export default {
name: "JDictSelectTag",
name: 'JDictSelectTag',
props: {
dictCode: String,
placeholder: String,
triggerChange: Boolean,
disabled: Boolean,
db_field_name:String,
db_field_name: String,
value: [String, Number],
type: String,
getPopupContainer:{
getPopupContainer: {
type: Function,
default: (node) => node.parentNode
}
@@ -38,36 +45,36 @@
data() {
return {
dictOptions: [],
tagType:""
tagType: ''
}
},
watch:{
dictCode:{
immediate:true,
watch: {
dictCode: {
immediate: true,
handler() {
this.initDictData()
},
}
}
},
created() {
// console.log(this.dictCode);
if(!this.type || this.type==="list"){
this.tagType = "select"
}else{
if (!this.type || this.type === 'list') {
this.tagType = 'select'
} else {
this.tagType = this.type
}
//获取字典数据
// this.initDictData();
},
computed: {
getValueSting(){
getValueSting() {
// update-begin author:wangshuai date:20200601 for: 不显示placeholder的文字 ------
// 当有null或“” placeholder不显示
return this.value != null ? this.value.toString() : undefined;
return this.value != null ? this.value.toString() : undefined
// update-end author:wangshuai date:20200601 for: 不显示placeholder的文字 ------
},
dictOptionsValue: function () {
return this.dictOptions.filter(function (dictOption) {
dictOptionsValue: function() {
return this.dictOptions.filter(function(dictOption) {
return dictOption.value
})
}
@@ -75,8 +82,8 @@
methods: {
initDictData() {
//优先从缓存中读取字典配置
if(getDictItemsFromCache(this.dictCode)){
this.dictOptions = getDictItemsFromCache(this.dictCode);
if (getDictItemsFromCache(this.dictCode)) {
this.dictOptions = getDictItemsFromCache(this.dictCode)
return
}
@@ -84,34 +91,34 @@
ajaxGetDictItems(this.dictCode, null).then((res) => {
if (res.success) {
// console.log(res.result);
this.dictOptions = res.result;
this.dictOptions = res.result
}
})
},
handleInput(e) {
let val;
if(this.tagType=="radio"){
let val
if (this.tagType == 'radio') {
val = e.target.value
}else{
} else {
val = e
}
let content = ''
this.dictOptions.forEach(res=>{
if (res.value == e){
content = res.text || res.label
}
this.dictOptions.forEach(res => {
if (res.value == e) {
content = res.text || res.label
}
})
if(this.triggerChange){
this.$emit('change', val);
}else{
this.$emit('input', val);
this.$emit('changeQuery', content,this.db_field_name);
if (this.triggerChange) {
this.$emit('change', val)
} else {
this.$emit('input', val)
this.$emit('changeQuery', content, this.db_field_name)
}
},
setCurrentDictOptions(dictOptions){
setCurrentDictOptions(dictOptions) {
this.dictOptions = dictOptions
},
getCurrentDictOptions(){
getCurrentDictOptions() {
return this.dictOptions
}
}
@@ -124,6 +131,6 @@
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
-o-text-overflow:ellipsis;
-o-text-overflow: ellipsis;
}
</style>