|
|
@ -66,29 +66,42 @@ |
|
|
|
:propsData="propsData" |
|
|
|
> |
|
|
|
</curren-descriptions> |
|
|
|
<!-- todo-new 代码整理--> |
|
|
|
<div |
|
|
|
class="currenTabel-drawer-mx-header" |
|
|
|
v-if="scope.value == 'mx' && (showDetailColumnsSet || showDetailFilters)" |
|
|
|
> |
|
|
|
<el-button |
|
|
|
v-if="showDetailColumnsSet" |
|
|
|
class="rowDropNotHideItem" |
|
|
|
@click="columnsSettingHandle()" |
|
|
|
>字段设置</el-button> |
|
|
|
<!-- <el-button |
|
|
|
type="primary" |
|
|
|
v-if="showDetailFilters" |
|
|
|
@click="detailFiltersHandle()" |
|
|
|
>筛选</el-button> --> |
|
|
|
</div> |
|
|
|
<!-- 字段设置弹窗 --> |
|
|
|
<rowDrop |
|
|
|
@radio="rowDrop" |
|
|
|
:tableColumns="tableColumns" |
|
|
|
:visible="rowDropVisible" |
|
|
|
@closeRowDrop="closeRowDrop" |
|
|
|
:source="'detail_api'" |
|
|
|
:innerMaxHeight="'calc(90vh - 400px)'" |
|
|
|
></rowDrop> |
|
|
|
<!-- currenTableDetails 组件 明细中带分页功能 --> |
|
|
|
<!-- 字段设置弹窗 --> |
|
|
|
<!-- <div |
|
|
|
class="mx-header" |
|
|
|
v-if="scope.value == 'mx'" |
|
|
|
> |
|
|
|
<el-button @click="columnsSettingHandle()">字段设置</el-button> |
|
|
|
</div> --> |
|
|
|
<umyTable |
|
|
|
v-if="scope.value == 'mx'" |
|
|
|
:isUpdate="isUpdate" |
|
|
|
:tableBorder="true" |
|
|
|
:tableData="propsData.details" |
|
|
|
:propsData="propsData" |
|
|
|
:tableColumns="tableColumns" |
|
|
|
:selectionTable="selectionTable" |
|
|
|
:requiredRules="false" |
|
|
|
:setUTableHeight="260" |
|
|
|
:setUTableHeight="showDetailColumnsSet ? 305 : 260" |
|
|
|
@sortChange="sortChange" |
|
|
|
@handleSelectionChange="handleSelectionChange" |
|
|
|
@inlineDialog="inlineDialog" |
|
|
@ -189,6 +202,7 @@ import currenTabs from "@/components/currenTabs" |
|
|
|
import currenTable from "@/components/currenTable" |
|
|
|
import pagination from "@/components/Pagination" |
|
|
|
import rowDrop from "@/components/rowDrop/index.vue" |
|
|
|
import { getParentNode } from '@/utils' |
|
|
|
export default { |
|
|
|
name: 'currenTabel-drawer', |
|
|
|
components: { |
|
|
@ -200,6 +214,16 @@ export default { |
|
|
|
rowDrop |
|
|
|
}, |
|
|
|
props: { |
|
|
|
// 是否显示明细-字段设置 |
|
|
|
showDetailColumnsSet:{ |
|
|
|
type: Boolean, |
|
|
|
default: true |
|
|
|
}, |
|
|
|
// 是否显示明细-筛选 |
|
|
|
showDetailFilters:{ |
|
|
|
type: Boolean, |
|
|
|
default: true |
|
|
|
}, |
|
|
|
title: { |
|
|
|
type: Array, |
|
|
|
default: () => { |
|
|
@ -343,9 +367,22 @@ export default { |
|
|
|
}, |
|
|
|
}, |
|
|
|
mounted () { |
|
|
|
// 点击外部,字段设置弹窗隐藏 |
|
|
|
document.addEventListener('click',(e)=>{ |
|
|
|
if(!this.rowDropVisible)return |
|
|
|
let _class = "rowDropNotHideItem" |
|
|
|
let _hasParent = getParentNode(e.target,_class) |
|
|
|
let _current_class = e.target._prevClass || e.target.className |
|
|
|
let _hasCurrent = _current_class ? String(_current_class).includes(_class) : false |
|
|
|
if(!_hasParent && !_hasCurrent){ |
|
|
|
this.closeRowDrop() |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
data () { |
|
|
|
return { |
|
|
|
// table 重新渲染所需key |
|
|
|
isUpdate: false, |
|
|
|
// 明细-字段设置是否显示 |
|
|
|
rowDropVisible: false, |
|
|
|
otherData:[], // 切换tabs页赋值 |
|
|
@ -369,13 +406,17 @@ export default { |
|
|
|
} |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
rowDrop(data) { |
|
|
|
this.$emit('rowDrop',data) |
|
|
|
// this.isUpdate = !this.isUpdate |
|
|
|
rowDrop(data,type) { |
|
|
|
this.$emit('rowDrop',data,type) |
|
|
|
this.isUpdate = !this.isUpdate |
|
|
|
}, |
|
|
|
// 字段设置 |
|
|
|
// 明细-字段设置 |
|
|
|
columnsSettingHandle(){ |
|
|
|
this.rowDropVisible = !this.rowDropVisible |
|
|
|
}, |
|
|
|
// 明细-筛选 |
|
|
|
detailFiltersHandle(){ |
|
|
|
|
|
|
|
}, |
|
|
|
// 关闭字段设置 |
|
|
|
closeRowDrop() { |
|
|
|