|
|
@ -13,7 +13,7 @@ |
|
|
|
> |
|
|
|
<!-- 数据填写 --> |
|
|
|
<div v-if="active === 0" style="height: 100%;"> |
|
|
|
<div class="centerInnerContent"> |
|
|
|
<div class="centerInnerContent" :class="{'hasDetails' : flexTableData}"> |
|
|
|
<!-- 左侧主表 --> |
|
|
|
<div class="leftMainForm"> |
|
|
|
<div class="dialogOuterTitle">{{formTitle}} 【主表信息】</div> |
|
|
@ -98,16 +98,14 @@ |
|
|
|
</el-form> |
|
|
|
</div> |
|
|
|
<!-- 右侧子表 --> |
|
|
|
<div class="rightDetailTable"> |
|
|
|
<div class="rightDetailTable" v-if="flexTableData"> |
|
|
|
<div class="dialogOuterTitle">{{formTitle}} 【子表信息】</div> |
|
|
|
<!-- 子表 --> |
|
|
|
<currenTableFlex |
|
|
|
ref="currenTableFlex_Ref" |
|
|
|
:isShowIndex="true" |
|
|
|
:isEditable="true" |
|
|
|
:setUTableHeight="230" |
|
|
|
class="currenTableFlex" |
|
|
|
v-if="flexTableData" |
|
|
|
:flexTableData="flexTableData" |
|
|
|
:flexTableColumns="flexTableColumns" |
|
|
|
></currenTableFlex> |
|
|
@ -214,7 +212,11 @@ export default { |
|
|
|
initFormItems(){ |
|
|
|
let _dtoList_type = this.handleType == 'add' ? 'C' : 'U' |
|
|
|
let _dtoList = this.currentDtos[_dtoList_type].dtoList |
|
|
|
this.formItemData = JSON.parse(JSON.stringify(_dtoList)) |
|
|
|
// 除去子表信息 |
|
|
|
let _formItems = _dtoList.filter(item=>{ |
|
|
|
return item.prop.toUpperCase() != 'DETAILS' |
|
|
|
}) |
|
|
|
if(_formItems)this.formItemData = _formItems |
|
|
|
// 编辑格式:特殊处理默认值 |
|
|
|
if(this.handleType == 'edit' && this.editRowData){ |
|
|
|
this.formData = JSON.parse(JSON.stringify(this.editRowData)) |
|
|
@ -222,7 +224,7 @@ export default { |
|
|
|
this.formData = {} |
|
|
|
} |
|
|
|
// 子表数据 |
|
|
|
let _list = this.formItemData.filter(item=>{ |
|
|
|
let _list = _dtoList.filter(item=>{ |
|
|
|
return item.prop.toUpperCase() == 'DETAILS' |
|
|
|
}) |
|
|
|
if(_list && _list.length > 0){ |
|
|
@ -233,9 +235,11 @@ export default { |
|
|
|
} |
|
|
|
} |
|
|
|
// 子表数据列 |
|
|
|
if(this.URLOption_detailList){ |
|
|
|
let _detailApi = this.URLOption_detailList.slice(0,this.URLOption_detailList.lastIndexOf('/')) |
|
|
|
let _detailDtos = this.$store.getters.dtoColumnTypes[_detailApi].S.dtoList |
|
|
|
this.flexTableColumns = _detailDtos |
|
|
|
} |
|
|
|
|
|
|
|
// 表单验证格式化 |
|
|
|
this.formRules={} |
|
|
@ -359,12 +363,17 @@ export default { |
|
|
|
.centerInnerContent{ |
|
|
|
height: calc(100% - 60px); |
|
|
|
overflow: auto; |
|
|
|
|
|
|
|
.leftMainForm{ |
|
|
|
height: calc(100% - 60px); |
|
|
|
} |
|
|
|
|
|
|
|
&.hasDetails{ |
|
|
|
display: flex; |
|
|
|
|
|
|
|
.leftMainForm{ |
|
|
|
width: 50%; |
|
|
|
flex-shrink: 0; |
|
|
|
height: calc(100% - 60px); |
|
|
|
} |
|
|
|
|
|
|
|
.rightDetailTable{ |
|
|
@ -374,4 +383,5 @@ export default { |
|
|
|
border-left: #ddd solid 1px; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
</style> |