|
@ -66,23 +66,15 @@ |
|
|
:propsData="propsData" |
|
|
:propsData="propsData" |
|
|
> |
|
|
> |
|
|
</curren-descriptions> |
|
|
</curren-descriptions> |
|
|
<!-- todo-new 代码整理--> |
|
|
<!-- 明细头部按钮 --> |
|
|
<div |
|
|
<div |
|
|
class="currenTabel-drawer-mx-header" |
|
|
class="currenTabel-drawer-mx-header" |
|
|
v-if="scope.value == 'mx' && (showDetailColumnsSet || showDetailFilters)" |
|
|
v-if="scope.value == 'mx' && (showDetailColumnsSet || showDetailFilters)" |
|
|
> |
|
|
> |
|
|
<el-button |
|
|
<curren-Button |
|
|
v-if="showDetailColumnsSet" |
|
|
:Butttondata="detailHeaderButton" |
|
|
class="rowDropNotHideItem" |
|
|
@tableButtonClick="detailHeaderClick" |
|
|
@click="columnsSettingHandle()" |
|
|
></curren-Button> |
|
|
size="mini" |
|
|
|
|
|
>字段设置</el-button> |
|
|
|
|
|
<el-button |
|
|
|
|
|
type="primary" |
|
|
|
|
|
v-if="showDetailFilters" |
|
|
|
|
|
@click="detailFiltersHandle()" |
|
|
|
|
|
size="mini" |
|
|
|
|
|
>筛选</el-button> |
|
|
|
|
|
</div> |
|
|
</div> |
|
|
<!-- 字段设置弹窗 --> |
|
|
<!-- 字段设置弹窗 --> |
|
|
<rowDrop |
|
|
<rowDrop |
|
@ -125,6 +117,8 @@ |
|
|
@handleSelectionChange="handleSelectionChange" |
|
|
@handleSelectionChange="handleSelectionChange" |
|
|
@inlineDialog="inlineDialog" |
|
|
@inlineDialog="inlineDialog" |
|
|
@buttonClick="buttonClick" |
|
|
@buttonClick="buttonClick" |
|
|
|
|
|
:buttonOperationList="buttonOperationList" |
|
|
|
|
|
@buttonOperationClick="buttonOperationClick" |
|
|
> |
|
|
> |
|
|
<template> |
|
|
<template> |
|
|
<slot></slot> |
|
|
<slot></slot> |
|
@ -209,6 +203,28 @@ |
|
|
<div class="drawer-Shut" @click="drawerShut"> |
|
|
<div class="drawer-Shut" @click="drawerShut"> |
|
|
<el-button type="danger" size="mini">关闭</el-button> |
|
|
<el-button type="danger" size="mini">关闭</el-button> |
|
|
</div> |
|
|
</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> |
|
|
</el-drawer> |
|
|
</template> |
|
|
</template> |
|
|
<script> |
|
|
<script> |
|
@ -223,6 +239,8 @@ import currenTable from "@/components/currenTable" |
|
|
import pagination from "@/components/Pagination" |
|
|
import pagination from "@/components/Pagination" |
|
|
import rowDrop from "@/components/rowDrop/index.vue" |
|
|
import rowDrop from "@/components/rowDrop/index.vue" |
|
|
import { getParentNode } from '@/utils' |
|
|
import { getParentNode } from '@/utils' |
|
|
|
|
|
import * as allUrlOption from '@/utils/baseData/urlOption' |
|
|
|
|
|
import { LoadingMixins } from "@/mixins/LoadingMixins"; |
|
|
export default { |
|
|
export default { |
|
|
name: 'currenTabel-drawer', |
|
|
name: 'currenTabel-drawer', |
|
|
components: { |
|
|
components: { |
|
@ -234,7 +252,15 @@ export default { |
|
|
searchOverall, |
|
|
searchOverall, |
|
|
rowDrop |
|
|
rowDrop |
|
|
}, |
|
|
}, |
|
|
|
|
|
mixins: [ |
|
|
|
|
|
LoadingMixins, |
|
|
|
|
|
], |
|
|
props: { |
|
|
props: { |
|
|
|
|
|
// 操作列按钮 |
|
|
|
|
|
buttonOperationList:{ |
|
|
|
|
|
type: Array, |
|
|
|
|
|
default: null, |
|
|
|
|
|
}, |
|
|
// 是否显示明细-字段设置 |
|
|
// 是否显示明细-字段设置 |
|
|
showDetailColumnsSet:{ |
|
|
showDetailColumnsSet:{ |
|
|
type: Boolean, |
|
|
type: Boolean, |
|
@ -381,6 +407,7 @@ export default { |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
mounted () { |
|
|
mounted () { |
|
|
|
|
|
this.initDetailHeaderButton() |
|
|
// 点击外部,字段设置弹窗隐藏 |
|
|
// 点击外部,字段设置弹窗隐藏 |
|
|
document.addEventListener('click',(e)=>{ |
|
|
document.addEventListener('click',(e)=>{ |
|
|
if(!this.rowDropVisible)return |
|
|
if(!this.rowDropVisible)return |
|
@ -395,6 +422,9 @@ export default { |
|
|
}, |
|
|
}, |
|
|
data () { |
|
|
data () { |
|
|
return { |
|
|
return { |
|
|
|
|
|
detailHeaderButton:null,//明细-上方按钮 |
|
|
|
|
|
detailInfoTableData:null,//明细-查看详情弹窗数据 |
|
|
|
|
|
detailInfoTitle:null,//明细-查看详情弹窗title |
|
|
// table 重新渲染所需key |
|
|
// table 重新渲染所需key |
|
|
isUpdate: false, |
|
|
isUpdate: false, |
|
|
// 明细-字段设置是否显示 |
|
|
// 明细-字段设置是否显示 |
|
@ -428,6 +458,37 @@ export default { |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
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) { |
|
|
rowDrop(data,type) { |
|
|
this.$emit('rowDrop',data,type) |
|
|
this.$emit('rowDrop',data,type) |
|
|
this.isUpdate = !this.isUpdate |
|
|
this.isUpdate = !this.isUpdate |
|
@ -456,6 +517,7 @@ export default { |
|
|
this.$emit('handleCommand', command) |
|
|
this.$emit('handleCommand', command) |
|
|
}, |
|
|
}, |
|
|
drawerShut () { |
|
|
drawerShut () { |
|
|
|
|
|
this.closeDetailInfo(false) |
|
|
this.$emit('drawerShut', false) |
|
|
this.$emit('drawerShut', false) |
|
|
}, |
|
|
}, |
|
|
tableButtonClick (val) { |
|
|
tableButtonClick (val) { |
|
|