1 弹窗与主页面传值
弹窗(传值):
//确定
DictionarycInputClose() {
this.$bus.emit("DictionarycInputAction", {
contentCh: this.ChooseMaintenData.contentCh,
contentEn: this.ChooseMaintenData.contentEn,
});
this.input = "";
this.cloceTan(false);
},
//双击事件
RowDbclick(row) {
this.$bus.emit("DictionarycInputAction", {
contentCh: this.ChooseMaintenData.contentCh,
contentEn: this.ChooseMaintenData.contentEn,
});
this.input = "";
this.cloceTan(false);
},
主页面(接收使用):
DictionarycInputAction() {
this.$bus.on("DictionarycInputAction", (res) => {
if (res.contentCh != undefined) {
if (res.contentCh == "其他") {
if (res.contentEn != null) {
this.dialogData[this.setEcho] = res.contentEn;
} else {
this.dialogData[this.setEcho] = "";
}
} else if (
res.contentCh != "其他" &&
res.contentEn != "" &&
res.contentEn != null
) {
this.dialogData[
this.setEcho
] = `${res.contentCh}(${res.contentEn})`;
} else {
this.dialogData[this.setEcho] = res.contentCh;
}
}
});
},
// <!-- 企业字典 -->
PrincipalSurveyorAction() {
this.$bus.on("principalsurveyoraction", (res) => {
if (res.PrincipalSurveyorName != undefined) {
this.dialogData[this.setEcho] = res.PrincipalSurveyorName;
}
});
},
2 路由懒加载
component: () => import('@/views/shipinsp/certinput/seajl/Hjl_01_cbjbqk01_dw.vue')
例:
{ path: '/hjl_01_cbjbqk01_dw', name: 'hjl_01_cbjbqk01_dw', component: () => import('@/views/shipinsp/certinput/seajl/Hjl_01_cbjbqk01_dw.vue') },