master
lion 3 years ago
parent adbc573bd9
commit 18aff53b82

@ -10,6 +10,10 @@ export default {
type:Number, type:Number,
default:55 default:55
}, },
// isFullScreen:{
// type:Boolean,
// default:false
// },
isShow:{ isShow:{
type:Boolean, type:Boolean,
default:false default:false
@ -36,10 +40,19 @@ export default {
}, },
data() { data() {
return { return {
isFullScreen:false
} }
}, },
methods: { methods: {
headerRender(){
return (
<div>
{this.title}
<a class="ivu-modal-close" on-click={this.closeshowChange}><i class="ivu-icon ivu-icon-ios-close"></i></a>
<a class="ivu-modal-screen" on-click={this.fullScreen}><i class={this.isFullScreen?'el-icon-aim':'el-icon-full-screen'}></i></a>
</div>
)
},
footerRender(){ footerRender(){
if(this.type === 'form'){ if(this.type === 'form'){
return ( return (
@ -58,6 +71,9 @@ export default {
) )
} }
}, },
closeshowChange(){
this.$emit('update:isShow',false)
},
showChange(e){ showChange(e){
this.$emit('update:isShow',e) this.$emit('update:isShow',e)
}, },
@ -67,6 +83,11 @@ export default {
} }
this.$refs['elForm'].resetFields() this.$refs['elForm'].resetFields()
}, },
fullScreen(){
this.isFullScreen = !this.isFullScreen
// this.width = 100
// this.height = '100vh'
},
submit(){ submit(){
if(this.type === 'normal'){ if(this.type === 'normal'){
return return
@ -95,16 +116,22 @@ export default {
footer slot: footer slot:
footerContent footerContent
*/ */
const {okText,okClick,footerRender,width,type,$scopedSlots,rules,form,showChange,isShow,title} = this const {okText,okClick,headerRender,footerRender,width,isFullScreen,type,$scopedSlots,rules,form,showChange,isShow,title} = this
return ( return (
<Modal <Modal
ok-text={okText} ok-text={okText}
class-name={'vertical-center-modal'} class-name={!isFullScreen?'vertical-center-modal':'vertical-center-modal vertical-full-modal'}
width={width} width={width}
title={title} title={title}
value={isShow} value={isShow}
on={{['on-visible-change']:showChange,['on-ok']:okClick}} on={{['on-visible-change']:showChange,['on-ok']:okClick}}
scopedSlots={{ scopedSlots={{
header(){
{
return headerRender()
}
},
default(){ default(){
if(type === "form"){ if(type === "form"){
let formItems = [] let formItems = []
@ -215,6 +242,29 @@ export default {
min-height: 300px; min-height: 300px;
overflow: scroll; overflow: scroll;
}
.ivu-modal-screen{
z-index: 1;
font-size: 15px;
position: absolute;
right: 40px;
top: 17px;
cursor: pointer;
color:#bf617c
}
.vertical-full-modal{
.ivu-modal{
width:100%!important
}
.ivu-modal-content{
height:100vh
}
.ivu-modal-body{
max-height: 80vh !important;
min-height: 300px;
overflow: scroll;
}
} }
.xy-table-item{ .xy-table-item{
display: flex; display: flex;

@ -1,7 +1,14 @@
<template> <template>
<div> <div>
<Modal :width="60" :title="name+'订单列表'" :value.sync="isShow" @on-visible-change="$emit('update:isShow',$event)" <Modal :width="80" :value.sync="isShow" :fullscreen='isFullScreen' @on-visible-change="$emit('update:isShow',$event)"
> >
<div class="ivu-modal-header ivu-modal-header-wrap">
<div v-solt:header>
{{name+'订单列表'}}
<a class="ivu-modal-screen" @click="isFullScreen=!isFullScreen"><i :class="isFullScreen?'el-icon-aim':'el-icon-full-screen'"></i></a>
</div>
</div>
<Button class="select" type="primary" style="margin-bottom: 10px;" @click="downloadExel"></Button> <Button class="select" type="primary" style="margin-bottom: 10px;" @click="downloadExel"></Button>
<xy-table id="print" :is-page="false" :list="list" :table-item="table" :height="300"> <xy-table id="print" :is-page="false" :list="list" :table-item="table" :height="300">
<template v-slot:btns> <template v-slot:btns>
@ -28,6 +35,7 @@ export default {
}, },
data() { data() {
return { return {
isFullScreen:false,
list:[], list:[],
table:[ table:[
{ {
@ -102,6 +110,8 @@ export default {
} }
}, },
methods: { methods: {
closeshowChange(){},
fullScreen(){},
async getOrder(){ async getOrder(){
await show({ await show({
id:this.id id:this.id
@ -143,4 +153,14 @@ export default {
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.ivu-modal-header-wrap{
margin-bottom:10px;
padding-top: 0;
.ivu-modal-screen{
top:16px;
}
}
.ivu-modal-close{
top:7px
}
</style> </style>

Loading…
Cancel
Save