修改禅道已知bug

This commit is contained in:
qq787203167
2022-06-30 10:52:36 +08:00
parent 6931b3ffc7
commit db79b808f1
2 changed files with 55 additions and 44 deletions
+23 -16
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 v-for="(item, key) in dictOptions" :key="key" :value="item.value">{{ item.text }}</a-radio>
</a-radio-group> </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-button v-for="(item, key) in dictOptions" :key="key" :value="item.value">{{ item.text }}</a-radio-button>
</a-radio-group> </a-radio-group>
<a-select v-else-if="tagType=='select'" allowClear :getPopupContainer = "getPopupContainer" :placeholder="placeholder" :disabled="disabled" :value="getValueSting" @change="handleInput"> <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 :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"
:label="item.text || item.label"
:value="item.value">
<span class="itemOption-index" :title=" item.text || item.label "> <span class="itemOption-index" :title=" item.text || item.label ">
{{ item.text || item.label }} {{ item.text || item.label }}
</span> </span>
@@ -21,7 +28,7 @@
import { ajaxGetDictItems, getDictItemsFromCache } from '@/api/api' import { ajaxGetDictItems, getDictItemsFromCache } from '@/api/api'
export default { export default {
name: "JDictSelectTag", name: 'JDictSelectTag',
props: { props: {
dictCode: String, dictCode: String,
placeholder: String, placeholder: String,
@@ -38,7 +45,7 @@
data() { data() {
return { return {
dictOptions: [], dictOptions: [],
tagType:"" tagType: ''
} }
}, },
watch: { watch: {
@@ -46,13 +53,13 @@
immediate: true, immediate: true,
handler() { handler() {
this.initDictData() this.initDictData()
}, }
} }
}, },
created() { created() {
// console.log(this.dictCode); // console.log(this.dictCode);
if(!this.type || this.type==="list"){ if (!this.type || this.type === 'list') {
this.tagType = "select" this.tagType = 'select'
} else { } else {
this.tagType = this.type this.tagType = this.type
} }
@@ -63,7 +70,7 @@
getValueSting() { getValueSting() {
// update-begin author:wangshuai date:20200601 for: 不显示placeholder的文字 ------ // update-begin author:wangshuai date:20200601 for: 不显示placeholder的文字 ------
// 当有null或“” 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的文字 ------ // update-end author:wangshuai date:20200601 for: 不显示placeholder的文字 ------
}, },
dictOptionsValue: function() { dictOptionsValue: function() {
@@ -76,7 +83,7 @@
initDictData() { initDictData() {
//优先从缓存中读取字典配置 //优先从缓存中读取字典配置
if (getDictItemsFromCache(this.dictCode)) { if (getDictItemsFromCache(this.dictCode)) {
this.dictOptions = getDictItemsFromCache(this.dictCode); this.dictOptions = getDictItemsFromCache(this.dictCode)
return return
} }
@@ -84,13 +91,13 @@
ajaxGetDictItems(this.dictCode, null).then((res) => { ajaxGetDictItems(this.dictCode, null).then((res) => {
if (res.success) { if (res.success) {
// console.log(res.result); // console.log(res.result);
this.dictOptions = res.result; this.dictOptions = res.result
} }
}) })
}, },
handleInput(e) { handleInput(e) {
let val; let val
if(this.tagType=="radio"){ if (this.tagType == 'radio') {
val = e.target.value val = e.target.value
} else { } else {
val = e val = e
@@ -102,10 +109,10 @@
} }
}) })
if (this.triggerChange) { if (this.triggerChange) {
this.$emit('change', val); this.$emit('change', val)
} else { } else {
this.$emit('input', val); this.$emit('input', val)
this.$emit('changeQuery', content,this.db_field_name); this.$emit('changeQuery', content, this.db_field_name)
} }
}, },
setCurrentDictOptions(dictOptions) { setCurrentDictOptions(dictOptions) {
@@ -151,6 +151,7 @@
}, },
//带文件导出 //带文件导出
handleFileExport() { handleFileExport() {
if (this.idList.length > 0) {
let query = { let query = {
...this.$refs.searchRef.queryParam, ...this.$refs.searchRef.queryParam,
id: this.idList.join(','), id: this.idList.join(','),
@@ -158,6 +159,9 @@
} }
let handlingTime = moment(new Date()).format('YYYY-MM-DD') let handlingTime = moment(new Date()).format('YYYY-MM-DD')
downloadFile('document/bussDocumentLibraryEO/exportZip', this.$t('DocumentLibrary')+handlingTime+'.zip', query, this.Deselect) downloadFile('document/bussDocumentLibraryEO/exportZip', this.$t('DocumentLibrary')+handlingTime+'.zip', query, this.Deselect)
}else{
this.$message.warning(this.$t('selectLeastOne'))
}
}, },
//新增 //新增
handleAdd() { handleAdd() {