Commit 8ee5259f by 潘际乾

BusNavbar 修改

parent 51e19128
...@@ -305,12 +305,8 @@ ...@@ -305,12 +305,8 @@
</c-col> </c-col>
</el-row> </el-row>
<el-dialog :visible.sync="initdialog" :title="'交易列表'" append-to-body>
<div class="m-list-btns">
<m-busbtn ref="childs" :ownref="ownref" trnCode="ditsel" :model="ditselModel" ownrefPath="bddgrp" tabIndex=3 @onChoose="onChoose" >11</m-busbtn> <m-busbtn ref="childs" :ownref="ownref" trnCode="ditsel" :model="ditselModel" ownrefPath="bddgrp" tabIndex=3 @onChoose="onChoose" >11</m-busbtn>
</div> </div>
</el-dialog>
</div>
</template> </template>
<script> <script>
import Api from "~/service/Api"; import Api from "~/service/Api";
...@@ -330,7 +326,6 @@ export default { ...@@ -330,7 +326,6 @@ export default {
return { return {
ditselModel: new DitselModel().data, ditselModel: new DitselModel().data,
ownref:"", ownref:"",
initdialog:false,
trnData: { trnData: {
columns: [ columns: [
'1 1 "编号" 200', '1 1 "编号" 200',
...@@ -370,22 +365,19 @@ export default { ...@@ -370,22 +365,19 @@ export default {
methods: { methods: {
...Event, ...Event,
async getButtons(ownref){ async getButtons(ownref){
this.initdialog = true
this.ownref = ownref this.ownref = ownref
this.$refs.childs.initdialog = true
console.log("ownref:" +ownref); console.log("ownref:" +ownref);
setTimeout(()=>{
this.$refs.childs.$emit("childmethods")
},10)
}, },
async onChoose(code){ async onChoose(code){
//跳转交易 //跳转交易
this.$router.history.push("/business/" + code) this.$router.history.push("/business/" + code)
this.initdialog = false this.$refs.childs.initdialog = false
} , } ,
async getDitSelInfo(code){ async getDitSelInfo(code){
//跳转交易 //跳转交易
this.$router.history.push("/business/" + code) this.$router.history.push("/business/" + code)
this.initdialog = false this.$refs.childs.initdialog = false
}, },
closeTrn(refId){ closeTrn(refId){
this.$refs[refId].doClose(); this.$refs[refId].doClose();
......
<template> <template>
<el-dialog
:visible.sync="initdialog"
:title="'交易列表'"
append-to-body
:before-close="beforeClose"
@opened="opened"
>
<div class="m-list-btns">
<div class="busnavbar"> <div class="busnavbar">
<div class="busnavbar-items"> <div class="busnavbar-items">
<c-button <c-button
...@@ -15,6 +23,8 @@ ...@@ -15,6 +23,8 @@
> >
</div> </div>
</div> </div>
</div>
</el-dialog>
</template> </template>
<script> <script>
import Api from "~/service/Api"; import Api from "~/service/Api";
...@@ -22,28 +32,29 @@ import commonProcess from "~/mixin/commonProcess"; ...@@ -22,28 +32,29 @@ import commonProcess from "~/mixin/commonProcess";
export default { export default {
props: { props: {
"ownref": { ownref: {
required: true, required: true,
}, },
"trnCode": { trnCode: {
required: true, required: true,
}, },
"model": { model: {
required: true, required: true,
}, },
"ownrefPath": { ownrefPath: {
required: false, required: false,
default: "didgrp" default: "didgrp",
}, },
"tabIndex": { tabIndex: {
required: false, required: false,
default: 1 default: 1,
}, },
}, },
components: {}, components: {},
mixins: [commonProcess], // 里面包含了Default、Check等的公共处理 mixins: [commonProcess], // 里面包含了Default、Check等的公共处理
data() { data() {
return { return {
initdialog: false,
navcode: [ navcode: [
// {code:"",label:"",isDis:"",title:""}, // {code:"",label:"",isDis:"",title:""},
], ],
...@@ -70,12 +81,18 @@ export default { ...@@ -70,12 +81,18 @@ export default {
} }
return 0; return 0;
}, },
opened() {
this.$emit("childmethods");
},
beforeClose() {
this.navcode = [];
this.initdialog = false;
},
}, },
mounted() { mounted() {
this.trnName = this.trnCode this.trnName = this.trnCode;
this.$nextTick(function () { this.$nextTick(function () {
this.$on("childmethods", async function () { this.$on("childmethods", async function () {
let res = await this.executeRule(`cfgfil.hotreg${this.tabIndex}`); let res = await this.executeRule(`cfgfil.hotreg${this.tabIndex}`);
if (res.respCode == SUCCESS) { if (res.respCode == SUCCESS) {
this.updateModel(res.data); this.updateModel(res.data);
...@@ -89,7 +106,7 @@ export default { ...@@ -89,7 +106,7 @@ export default {
this.navcode = []; this.navcode = [];
//请求按钮数据 //请求按钮数据
this.model[this.ownrefPath].rec.ownref = this.ownref; this.model[this.ownrefPath].rec.ownref = this.ownref;
let rtnmsg = await this.executeRule(this.ownrefPath+".rec.ownref"); //didgrp_rec_ownref let rtnmsg = await this.executeRule(this.ownrefPath + ".rec.ownref"); //didgrp_rec_ownref
if (rtnmsg.respCode == SUCCESS) { if (rtnmsg.respCode == SUCCESS) {
//重置数组 //重置数组
this.navcode = []; this.navcode = [];
......
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