|
|
@ -66,23 +66,15 @@ |
|
|
|
:propsData="propsData" |
|
|
|
> |
|
|
|
</curren-descriptions> |
|
|
|
<!-- todo-new 代码整理--> |
|
|
|
<!-- 明细头部按钮 --> |
|
|
|
<div |
|
|
|
class="currenTabel-drawer-mx-header" |
|
|
|
v-if="scope.value == 'mx' && (showDetailColumnsSet || showDetailFilters)" |
|
|
|
v-if="scope.value == 'mx' && detailHeaderButton" |
|
|
|
> |
|
|
|
<el-button |
|
|
|
v-if="showDetailColumnsSet" |
|
|
|
class="rowDropNotHideItem" |
|
|
|
@click="columnsSettingHandle()" |
|
|
|
size="mini" |
|
|
|
>字段设置</el-button> |
|
|
|
<el-button |
|
|
|
type="primary" |
|
|
|
v-if="showDetailFilters" |
|
|
|
@click="detailFiltersHandle()" |
|
|
|
size="mini" |
|
|
|
>筛选</el-button> |
|
|
|
<curren-Button |
|
|
|
:Butttondata="detailHeaderButton" |
|
|
|
@tableButtonClick="detailHeaderClick" |
|
|
|
></curren-Button> |
|
|
|
</div> |
|
|
|
<!-- 字段设置弹窗 --> |
|
|
|
<rowDrop |
|
|
@ -125,6 +117,8 @@ |
|
|
|
@handleSelectionChange="handleSelectionChange" |
|
|
|
@inlineDialog="inlineDialog" |
|
|
|
@buttonClick="buttonClick" |
|
|
|
:buttonOperationList="buttonOperationList" |
|
|
|
@buttonOperationClick="buttonOperationClick" |
|
|
|
> |
|
|
|
<template> |
|
|
|
<slot></slot> |
|
|
@ -209,6 +203,28 @@ |
|
|
|
<div class="drawer-Shut" @click="drawerShut"> |
|
|
|
<el-button type="danger" size="mini">关闭</el-button> |
|
|
|
</div> |
|
|
|
<!-- 明细-查看详情 --> |
|
|
|
<el-dialog |
|
|
|
width="90%" |
|
|
|
:modal-append-to-body="false" |
|
|
|
:append-to-body="false" |
|
|
|
:title="detailInfoTitle" |
|
|
|
:visible.sync="displayDialog.detailInfoDialog" |
|
|
|
:show-close="true" |
|
|
|
> |
|
|
|
<div> |
|
|
|
<curren-descriptions |
|
|
|
v-if="detailInfoTableData" |
|
|
|
border |
|
|
|
:column="column" |
|
|
|
:direction="direction" |
|
|
|
:colon="false" |
|
|
|
:tabsDesTions="tableColumns" |
|
|
|
:propsData="detailInfoTableData" |
|
|
|
style="padding-bottom: 20px;" |
|
|
|
></curren-descriptions> |
|
|
|
</div> |
|
|
|
</el-dialog> |
|
|
|
</el-drawer> |
|
|
|
</template> |
|
|
|
<script> |
|
|
@ -223,6 +239,8 @@ import currenTable from "@/components/currenTable" |
|
|
|
import pagination from "@/components/Pagination" |
|
|
|
import rowDrop from "@/components/rowDrop/index.vue" |
|
|
|
import { getParentNode } from '@/utils' |
|
|
|
import * as allUrlOption from '@/utils/baseData/urlOption' |
|
|
|
import { LoadingMixins } from "@/mixins/LoadingMixins"; |
|
|
|
export default { |
|
|
|
name: 'currenTabel-drawer', |
|
|
|
components: { |
|
|
@ -234,7 +252,15 @@ export default { |
|
|
|
searchOverall, |
|
|
|
rowDrop |
|
|
|
}, |
|
|
|
mixins: [ |
|
|
|
LoadingMixins, |
|
|
|
], |
|
|
|
props: { |
|
|
|
// 操作列按钮 |
|
|
|
buttonOperationList:{ |
|
|
|
type: Array, |
|
|
|
default: null, |
|
|
|
}, |
|
|
|
// 是否显示明细-字段设置 |
|
|
|
showDetailColumnsSet:{ |
|
|
|
type: Boolean, |
|
|
@ -381,6 +407,7 @@ export default { |
|
|
|
}, |
|
|
|
}, |
|
|
|
mounted () { |
|
|
|
this.initDetailHeaderButton() |
|
|
|
// 点击外部,字段设置弹窗隐藏 |
|
|
|
document.addEventListener('click',(e)=>{ |
|
|
|
if(!this.rowDropVisible)return |
|
|
@ -395,6 +422,9 @@ export default { |
|
|
|
}, |
|
|
|
data () { |
|
|
|
return { |
|
|
|
detailHeaderButton:null,//明细-上方按钮 |
|
|
|
detailInfoTableData:null,//明细-查看详情弹窗数据 |
|
|
|
detailInfoTitle:null,//明细-查看详情弹窗title |
|
|
|
// table 重新渲染所需key |
|
|
|
isUpdate: false, |
|
|
|
// 明细-字段设置是否显示 |
|
|
@ -428,6 +458,37 @@ export default { |
|
|
|
} |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
// 初始化明细-上方按钮 |
|
|
|
initDetailHeaderButton(){ |
|
|
|
this.detailHeaderButton = [] |
|
|
|
if(this.showDetailColumnsSet){this.detailHeaderButton.push(this.defaultFieldSettingBtn())} |
|
|
|
if(this.showDetailFilters){this.detailHeaderButton.push(this.defaultFilterBtn())} |
|
|
|
}, |
|
|
|
detailHeaderClick(val,item){ |
|
|
|
// 字段设置 |
|
|
|
if(val == 'field'){ |
|
|
|
this.columnsSettingHandle() |
|
|
|
} |
|
|
|
// 筛选 |
|
|
|
if(val == 'filter'){ |
|
|
|
this.detailFiltersHandle() |
|
|
|
} |
|
|
|
}, |
|
|
|
// 关闭明细-详情弹窗 |
|
|
|
closeDetailInfo(val){ |
|
|
|
this.displayDialog.detailInfoDialog = val || false |
|
|
|
}, |
|
|
|
// 明细-操作列事件 |
|
|
|
buttonOperationClick(row, item, index){ |
|
|
|
// 查看详情 |
|
|
|
if(item.name == "info"){ |
|
|
|
this.displayDialog.detailInfoDialog = true |
|
|
|
this.detailInfoTableData = row |
|
|
|
let _name = allUrlOption[this.$route.name].detailInfoName |
|
|
|
this.detailInfoTitle = _name ? row[_name] + ' 详情' : '详情' |
|
|
|
} |
|
|
|
this.$emit('buttonOperationClick',row, item, index) |
|
|
|
}, |
|
|
|
rowDrop(data,type) { |
|
|
|
this.$emit('rowDrop',data,type) |
|
|
|
this.isUpdate = !this.isUpdate |
|
|
@ -456,6 +517,7 @@ export default { |
|
|
|
this.$emit('handleCommand', command) |
|
|
|
}, |
|
|
|
drawerShut () { |
|
|
|
this.closeDetailInfo(false) |
|
|
|
this.$emit('drawerShut', false) |
|
|
|
}, |
|
|
|
tableButtonClick (val) { |
|
|
|