Commit cf277f7b authored by 李苏's avatar 李苏 💬

自定义EDIT页面

parent ef782674
<template> <template>
<BasePage @getRow='getRow' class="min_full" style="height: 100%;" :config="config"> <BasePage @beforeEdit='beforeEdit' @getRow='getRow' class="min_full" style="height: 100%;" :config="config">
<template #dialog="ctx"> <template #dialog="ctx">
<!-- 嵌入默认页面额外弹框的插槽 ctx.pagePage来操作默认页面 --> <!-- 嵌入默认页面额外弹框的插槽 ctx.pagePage来操作默认页面 -->
<Tbwl :app='ctx.basePage' v-if="ctx.basePage.showDialog" /> <Tbwl :app='ctx.basePage' v-if="ctx.basePage.showDialog" />
...@@ -175,6 +175,14 @@ ...@@ -175,6 +175,14 @@
}, },
methods: { methods: {
beforeEdit(val){
let {row,edit} = val
if(row.djly=='KC'){
edit.otherEdit=Akck
}else{
edit.otherEdit=false
}
},
akck(ctx){ akck(ctx){
ctx.showAdd=true ctx.showAdd=true
}, },
......
<template> <template>
<RelDialog bigTitle detailTable='CKTZMX' @getForm='getForm' @getFormDetail='getFormDetail' width="70%" :type='type' :editApp='editApp' <RelDialog bigTitle detailTable='CKTZQD' @getForm='getForm' @getFormDetail='getFormDetail' width="70%" :type='type' :editApp='editApp'
:app='app' :buttonApp='buttonApp'> :app='app' :buttonApp='buttonApp'>
<el-form slot="form" ref="form" :model="form" label-width="100px" :rules="rules"> <el-form slot="form" ref="form" :model="form" label-width="100px" :rules="rules">
<el-row :gutter="20" :app="this" class="editRow"> <el-row :gutter="20" :app="this" class="editRow">
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
mixins: [editMixin, editMixin_expand], mixins: [editMixin, editMixin_expand],
methods: { methods: {
getForm(val){ getForm(val){
val.djly='M' val.djly='KC'
}, },
/* 需要整体row时的回调 */ /* 需要整体row时的回调 */
computedRow(row) { computedRow(row) {
......
<template> <template>
<BasePage :power='power' @getRow='getRow' class="min_full" style="height: 100%;" :config="config"> <BasePage @beforeEdit='beforeEdit' :power='power' @getRow='getRow' class="min_full" style="height: 100%;" :config="config">
<template #dialog="ctx"> <template #dialog="ctx">
<!-- 嵌入默认页面额外弹框的插槽 ctx.pagePage来操作默认页面 --> <!-- 嵌入默认页面额外弹框的插槽 ctx.pagePage来操作默认页面 -->
<Tbwl :app='ctx.basePage' v-if="ctx.basePage.showDialog" /> <Tbwl :app='ctx.basePage' v-if="ctx.basePage.showDialog" />
...@@ -30,13 +30,13 @@ ...@@ -30,13 +30,13 @@
power: { power: {
add: false, add: false,
copy: false, copy: false,
delButton: false, delButton: true,
editButton: false, editButton: true,
operateButtons: false, operateButtons: true,
workFlow: false, workFlow: false,
/* 表格 */ /* 表格 */
showSelection: true, showSelection: false,
saveSelected: true saveSelected: false
}, },
config: { config: {
queryDetail: true, queryDetail: true,
...@@ -177,6 +177,10 @@ ...@@ -177,6 +177,10 @@
}, },
methods: { methods: {
beforeEdit(val){
let {row,edit} = val
edit.otherEdit=Akck
},
akck(ctx){ akck(ctx){
ctx.showAdd=true ctx.showAdd=true
}, },
......
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