Commit 8fb72fbb authored by 李苏's avatar 李苏 💬

changeExcelParams自定义调整excel的参数

parent e0ae09ba
......@@ -3,7 +3,7 @@
<div class=" higher flex-column">
<!-- 分层-->
<div class="top">
<Top @getRow='topGetRow' ref="top"></Top>
<Top :app='this' @getRow='topGetRow' ref="top"></Top>
</div>
<div class="bottom flex">
<div class="full" >
......
<template>
<BasePage @getRow='getRow' class="min_full" style="height: 100%;" :config="config">
<BasePage :changeExcelParams='changeExcelParams' @getRow='getRow' class="min_full" style="height: 100%;" :config="config">
<template #dialog="ctx">
<!-- 嵌入默认页面额外弹框的插槽 ctx.pagePage来操作默认页面 -->
......@@ -191,7 +191,27 @@
},
methods: {
/**
* @description: 调整excel传递的参数
* @param {Object} params
* @return {*}
* @author: lisu
*/
changeExcelParams(params) {
let fields = JSON.parse(params.fields)
let expandTitle = this.$attrs.app.$refs.mx.$refs.basePage.tableTitle
let newExpandTitle = []
expandTitle.forEach((item, index) => {
let newObj = {
caption: item.label,
name: item.prop,
width: item.width
}
newExpandTitle[index] = newObj
})
fields = [...fields, ...newExpandTitle]
params.fields = JSON.stringify(fields)
},
qr(ctx) {
if (ctx.singleItem && ctx.singleItem.id) {
......
......@@ -3,7 +3,7 @@
<div class=" higher flex-column">
<!-- 分层-->
<div class="top">
<Top @getRow='topGetRow' ref="top"></Top>
<Top :app='this' @getRow='topGetRow' ref="top"></Top>
</div>
<div class="bottom flex">
<div class="full" >
......
<template>
<BasePage ref="basePage" @beforeEdit='beforeEdit' @getRow='getRow' class="min_full" style="height: 100%;" :config="config">
<BasePage :changeExcelParams='changeExcelParams' ref="basePage" @beforeEdit='beforeEdit' @getRow='getRow' class="min_full" style="height: 100%;" :config="config">
<template #dialog="ctx">
<!-- 嵌入默认页面额外弹框的插槽 ctx.pagePage来操作默认页面 -->
<Tbwl :app='ctx.basePage' v-if="ctx.basePage.showDialog&&ctx.basePage.DialogTitle=='同步领料单'" />
......@@ -201,6 +201,27 @@
},
methods: {
/**
* @description: 调整excel传递的参数
* @param {Object} params
* @return {*}
* @author: lisu
*/
changeExcelParams(params) {
let fields = JSON.parse(params.fields)
let expandTitle = this.$attrs.app.$refs.mx.$refs.basePage.tableTitle
let newExpandTitle = []
expandTitle.forEach((item, index) => {
let newObj = {
caption: item.label,
name: item.prop,
width: item.width
}
newExpandTitle[index] = newObj
})
fields = [...fields, ...newExpandTitle]
params.fields = JSON.stringify(fields)
},
beforeEdit(val) {
let {
row,
......
......@@ -3,7 +3,7 @@
<div class=" higher flex-column">
<!-- 分层-->
<div class="top">
<Top @getRow='topGetRow' ref="top"></Top>
<Top :app='this' @getRow='topGetRow' ref="top"></Top>
</div>
<div class="bottom flex">
<div class="full" >
......
<template>
<BasePage ref="basePage" @beforeEdit='beforeEdit' :power='power' @getRow='getRow' class="min_full" style="height: 100%;" :config="config">
<BasePage :changeExcelParams='changeExcelParams' ref="basePage" @beforeEdit='beforeEdit' :power='power' @getRow='getRow' class="min_full" style="height: 100%;" :config="config">
<template #dialog="ctx">
<!-- 嵌入默认页面额外弹框的插槽 ctx.pagePage来操作默认页面 -->
<Akck :type="'add'" v-if="ctx.basePage.showAdd&&showName=='akck'" :app='ctx.basePage' :buttonApp='ctx.basePage' />
......@@ -190,6 +190,27 @@
},
methods: {
/**
* @description: 调整excel传递的参数
* @param {Object} params
* @return {*}
* @author: lisu
*/
changeExcelParams(params) {
let fields = JSON.parse(params.fields)
let expandTitle = this.$attrs.app.$refs.ckdmx.$refs.basePage.tableTitle
let newExpandTitle = []
expandTitle.forEach((item, index) => {
let newObj = {
caption: item.label,
name: item.prop,
width: item.width
}
newExpandTitle[index] = newObj
})
fields = [...fields, ...newExpandTitle]
params.fields = JSON.stringify(fields)
},
beforeEdit(val) {
let {
row,
......
......@@ -3,7 +3,7 @@
<div class=" higher flex-column">
<!-- 分层-->
<div class="top">
<Top @getRow='topGetRow' ref="top"></Top>
<Top :app='this' @getRow='topGetRow' ref="top"></Top>
</div>
<div class="bottom flex">
<div class="full" >
......
<template>
<BasePage class="min_full" @getRow='getRow' ref="basePage" style="height: 100%;" :config="config">
<BasePage :changeExcelParams='changeExcelParams' class="min_full" @getRow='getRow' ref="basePage" style="height: 100%;" :config="config">
<template #dialog="ctx">
<!-- 嵌入默认页面额外弹框的插槽 ctx.pagePage来操作默认页面 -->
<Xzgw @saveGw='saveGw' :app='ctx.basePage' v-if="ctx.basePage.showDialog&&ctx.basePage.DialogTitle=='选择工位'" />
......@@ -141,6 +141,27 @@
},
methods: {
/**
* @description: 调整excel传递的参数
* @param {Object} params
* @return {*}
* @author: lisu
*/
changeExcelParams(params) {
let fields = JSON.parse(params.fields)
let expandTitle = this.$attrs.app.$refs.mx.$refs.basePage.tableTitle
let newExpandTitle = []
expandTitle.forEach((item, index) => {
let newObj = {
caption: item.label,
name: item.prop,
width: item.width
}
newExpandTitle[index] = newObj
})
fields = [...fields, ...newExpandTitle]
params.fields = JSON.stringify(fields)
},
saveGw(form) {
let ctx = this.$refs.basePage
this.$post('lxyl/kcgl/kcpd/lkxj', {
......
......@@ -3,7 +3,7 @@
<div class=" higher flex-column">
<!-- 分层-->
<div class="top">
<Top @getRow='topGetRow' ref="top"></Top>
<Top :app='this' @getRow='topGetRow' ref="top"></Top>
</div>
<div class="bottom flex">
<div class="full" >
......
<template>
<BasePage :toolButtonConfig="{
showExcel:false,
<BasePage :changeExcelParams='changeExcelParams' :toolButtonConfig="{
showExcel:true,
showPrint:false,
showField:true
}" addRename='装包' :power='power' @getRow='getRow' class="min_full" style="height: 100%;" :config="config">
......@@ -159,6 +159,27 @@
},
methods: {
/**
* @description: 调整excel传递的参数
* @param {Object} params
* @return {*}
* @author: lisu
*/
changeExcelParams(params) {
let fields = JSON.parse(params.fields)
let expandTitle = this.$attrs.app.$refs.mx.$refs.basePage.tableTitle
let newExpandTitle = []
expandTitle.forEach((item, index) => {
let newObj = {
caption: item.label,
name: item.prop,
width: item.width
}
newExpandTitle[index] = newObj
})
fields = [...fields, ...newExpandTitle]
params.fields = JSON.stringify(fields)
},
qxwc(ctx) {
if (ctx.singleItem && ctx.singleItem.id) {
this.$post('lxyl/rkgl/bzzy/cancelComplete', {
......
......@@ -3,7 +3,7 @@
<div class=" higher flex-column">
<!-- 分层-->
<div class="top">
<Top @getRow='topGetRow' ref="top"></Top>
<Top :app='this' @getRow='topGetRow' ref="top"></Top>
</div>
<div class="bottom flex">
<div class="full" >
......@@ -50,7 +50,7 @@
},
rkdmxGetRow(row){
let mid = row.id
}
}
......
<template>
<BasePage @getRow='getRow' :power='power' class="min_full" style="height: 100%;" :config="config">
<BasePage :changeExcelParams='changeExcelParams' @getRow='getRow' :power='power' class="min_full" style="height: 100%;" :config="config">
<template #dialog="ctx">
<!-- 嵌入默认页面额外弹框的插槽 ctx.pagePage来操作默认页面 -->
</template>
......@@ -202,6 +202,27 @@
},
methods: {
/**
* @description: 调整excel传递的参数
* @param {Object} params
* @return {*}
* @author: lisu
*/
changeExcelParams(params) {
let fields = JSON.parse(params.fields)
let expandTitle = this.$attrs.app.$refs.rkdmx.$refs.basePage.tableTitle
let newExpandTitle = []
expandTitle.forEach((item, index) => {
let newObj = {
caption: item.label,
name: item.prop,
width: item.width
}
newExpandTitle[index] = newObj
})
fields = [...fields, ...newExpandTitle]
params.fields = JSON.stringify(fields)
},
/* 示例*/
getRow(val){
this.$emit('getRow',val)
......
......@@ -2,8 +2,8 @@
<div class="outer">
<div class=" higher flex-column">
<!-- 分层-->
<div class="top">
<Top @getRow='topGetRow' ref="top"></Top>
<div class="top">
<Top :app='this' @getRow='topGetRow' ref="top"></Top>
</div>
<div class="bottom flex">
<div class="full" >
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment