拆分回显悬浮数据显示修改
This commit is contained in:
@@ -184,7 +184,7 @@
|
||||
scopedSlots: { customRender: 'operation' }
|
||||
})
|
||||
}
|
||||
console.log('columns',this.columns)
|
||||
// console.log('columns',this.columns)
|
||||
}
|
||||
})
|
||||
},
|
||||
@@ -206,7 +206,9 @@
|
||||
pageNo: pageNo + '',
|
||||
pageSize: pageSize + ''
|
||||
}
|
||||
|
||||
if(!params.info_id){
|
||||
params.info_id=this.infoId
|
||||
}
|
||||
// console.log('parmsss',params)
|
||||
this.loading = true
|
||||
postAction(this.url.tableList, params).then((res) => {
|
||||
|
||||
@@ -13,13 +13,14 @@
|
||||
:maxTagTextLength="2"
|
||||
:placeholder="placeholder"
|
||||
:getPopupContainer="getParentContainer"
|
||||
: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 style="display: inline-block;width: 100%" :title="item.text || item.label">
|
||||
{{ item.text || item.label }}
|
||||
</span>
|
||||
</a-select-option>
|
||||
@@ -54,7 +55,8 @@
|
||||
return {
|
||||
dictOptions: [],
|
||||
tagType:"",
|
||||
arrayValue:!this.value?[]:this.value.split(this.spliter)
|
||||
arrayValue:!this.value?[]:this.value.split(this.spliter),
|
||||
content:''
|
||||
}
|
||||
},
|
||||
created() {
|
||||
@@ -81,6 +83,19 @@
|
||||
this.arrayValue = []
|
||||
}else{
|
||||
this.arrayValue = this.value.split(this.spliter)
|
||||
let arrayValue=JSON.parse(JSON.stringify(this.arrayValue))
|
||||
let item = []
|
||||
this.dictOptions.forEach(res=>{
|
||||
arrayValue.forEach((val,index)=>{
|
||||
if (res.value == val&&index!=0){
|
||||
item.push(res.text || res.label)
|
||||
}
|
||||
|
||||
})
|
||||
this.content=item.join(',')
|
||||
})
|
||||
|
||||
console.log('value111',this.content)
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -106,18 +121,25 @@
|
||||
},
|
||||
onChange (selectedValue) {
|
||||
let content = []
|
||||
let item = []
|
||||
this.dictOptions.forEach(res=>{
|
||||
selectedValue.forEach(val=>{
|
||||
selectedValue.forEach((val,index)=>{
|
||||
if (res.value == val){
|
||||
content.push(res.text || res.label)
|
||||
if(index!=0){
|
||||
item.push(res.text || res.label)
|
||||
}
|
||||
}
|
||||
|
||||
})
|
||||
this.content=item.join(',')
|
||||
})
|
||||
this.$emit('change', selectedValue.join(this.spliter));
|
||||
this.$emit('changeQuery', content.join(this.spliter),this.db_field_name);
|
||||
},
|
||||
setCurrentDictOptions(dictOptions){
|
||||
this.dictOptions = dictOptions
|
||||
|
||||
},
|
||||
getCurrentDictOptions(){
|
||||
return this.dictOptions
|
||||
|
||||
@@ -200,7 +200,7 @@
|
||||
</a-col>
|
||||
|
||||
<a-col :span="12" v-else-if="item.field_show_type === '0'">
|
||||
<div class="box-title-text" :title="item.db_field_txt">
|
||||
<div class="box-title-text box-tree-text" :title="item.db_field_txt">
|
||||
<div class="title-text">
|
||||
<span class="Required" v-if="item.field_must_input == 1">*</span>
|
||||
<span class="title-text-text">{{item.db_field_txt}}</span>
|
||||
@@ -208,12 +208,14 @@
|
||||
<a-form-model-item class="itemModel" :prop="item.db_field_name">
|
||||
<a-tree-select
|
||||
v-model="formInline[item.db_field_name]"
|
||||
:maxTagCount="1"
|
||||
|
||||
style="width: 100%"
|
||||
:tree-data="item.tree"
|
||||
tree-checkable
|
||||
:placeholder="$t('PleaseSelect')+item.db_field_txt"
|
||||
@change="changeTree"
|
||||
/>
|
||||
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
@@ -541,7 +543,9 @@
|
||||
]
|
||||
},
|
||||
numberFlag:false,
|
||||
itemVal:{}
|
||||
itemVal:{},
|
||||
contentTrees:'',
|
||||
|
||||
}
|
||||
},
|
||||
props:{
|
||||
@@ -642,7 +646,7 @@
|
||||
this.$nextTick(() => {
|
||||
this.$refs.ueditor.setContent(item.itemContent)
|
||||
})
|
||||
console.log('ineciem',index,item)
|
||||
// console.log('ineciem',index,item)
|
||||
},
|
||||
//删除按钮
|
||||
splitDelete(item,index){
|
||||
@@ -660,7 +664,6 @@
|
||||
//保存
|
||||
splitSave(){
|
||||
// console.log('vallll',this.contentList)
|
||||
console.log('formInline',this.formInline)
|
||||
this.$refs.splitEditForm.validate(valid=>{
|
||||
if(valid){
|
||||
this.submitFlag=true
|
||||
@@ -943,6 +946,9 @@
|
||||
message: res.db_field_txt + this.$t('cannotEmpty'),
|
||||
trigger: 'blur'
|
||||
})
|
||||
|
||||
|
||||
|
||||
} else if (res.field_show_type === '4' || res.field_show_type === '6' ||
|
||||
res.field_show_type === '5' || res.field_show_type === '7'
|
||||
) {
|
||||
@@ -1017,6 +1023,7 @@
|
||||
getAction(this.url.getDocumentInfo, { id: item.id }).then((res) => {
|
||||
if (res.success) {
|
||||
this.formInline = res.result
|
||||
|
||||
// console.log('form11111',this.formInline)
|
||||
}
|
||||
})
|
||||
@@ -1039,6 +1046,14 @@
|
||||
this.formInline[value + '_id'] = id
|
||||
this.formInline = { ...this.formInline }
|
||||
},
|
||||
//树结果选择
|
||||
changeTree(value, label, extra){
|
||||
// console.log('changeValue',value, label, extra)
|
||||
let labelValues = label
|
||||
labelValues.shift()
|
||||
this.contentTrees= labelValues.join(',')
|
||||
},
|
||||
|
||||
|
||||
//正则替换小数点
|
||||
limitNumber(value) {
|
||||
@@ -1269,4 +1284,10 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
.box-tree-text{
|
||||
.ant-select-selection--multiple{
|
||||
height: 32px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -293,8 +293,21 @@
|
||||
deleteNode(){
|
||||
|
||||
}
|
||||
},
|
||||
computed:{
|
||||
|
||||
},
|
||||
mounted() {
|
||||
// let widthBrown = document.documentElement.offsetWidth || document.body.offsetWidth
|
||||
// let client = document.querySelector('.split-detail-table .ant-table-content').getBoundingClientRect()
|
||||
// let width = widthBrown - client.left
|
||||
// console.log('width111',width)
|
||||
//
|
||||
// document.querySelector('.split-detail-table .ant-table-content').style.width=width+'px'
|
||||
// window.fullHeight = document.documentElement.clientHeight
|
||||
// that.fullHeight = window.fullHeight
|
||||
|
||||
|
||||
this.infoId=this.$route.query.infoId
|
||||
// console.log('info',this.$route.query)
|
||||
this.loadMenuData()
|
||||
@@ -1092,6 +1105,7 @@
|
||||
.split-detail-right{
|
||||
padding-left: 20px;
|
||||
flex: 1;
|
||||
|
||||
.split-detail-search-header{
|
||||
margin-bottom: 20px;
|
||||
.table-page-search-submitButtons{
|
||||
|
||||
Reference in New Issue
Block a user