打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
成功vue一个页面引用另个页面

引用页面
<el-button type="text" @click="dialogShowImageVisible = true">实验室表单</el-button>
<el-dialog
      :visible.sync="dialogShowImageVisible"
      fullscreen="false"
      :modal="true"
      style="width:100%;height:90%;top:90px;left:10px;"
      append-to-body="true"
    >
      <ShowImage />
    </el-dialog>
import ShowImage from "@/views/LaboratoryEnrollmentF/ShowImage.vue";
export default {
  data() {
    return {
      dialogShowImageVisible: false,
},
components: {
    ShowImage,
  },
被引用页面
<template>
  <div class="app-container-search">
    <el-form ref="form" :model="form" :rules="rules2" label-width="120px" inline="true">
      <el-row>
        <el-form-item style="line-height: 10px;height:10px">
          <label style="font-weight:normal">病历号:XXXXXXXX</label>
        </el-form-item>
      </el-row>
      <el-row>
        <div style="border: 1px solid #151515;width:13%;float:left;">
          <el-table :data="tableDataZQ" border style="width: 100%">
            <el-table-column fixed prop="ZQ" label="周期"></el-table-column>

            <el-table-column fixed="right" label="类别">
              <template slot-scope="scope">
                <el-button type="text" size="small" @click="QL(scope.row)">{{ scope.row.LX }}</el-button>
              </template>
            </el-table-column>
          </el-table>
        </div>
        <div style="border: 1px solid #151515;width:86%;float:left;margin-left:3px">
          <img id="ImgID" style="height: 100%" src="@/assets/img/fz_jydj.1.jpg" />
        </div>
      </el-row>
    </el-form>
  </div>
</template>
<script>
export default {
  data() {
    return {
      tableDataZQ: [
        { ZQ: "1周期", LX: "取卵1" },
        { ZQ: "2周期", LX: "取卵2" },
        { ZQ: "3周期", LX: "取卵3" },
        { ZQ: "4周期", LX: "取卵4" },
      ],
    };
  },
  methods: {
    ReturnPage() {
      //this.$router.push("/TopMain/LaboratoryEnrollment_SaveData");
      // this.$router.push("/TopMain/LZBase_SaveData");
      // history.go(-1);
      history.back();
    },

    QL(row) {
      if (row.LX == "取卵1") {
        //document.getElementById("ImgID").src = "@/assets/img/fz_jydj.1.jpg";
        document.getElementById("ImgID").src =
          "/static/img/fz_jydj.1.cc296d54.jpg";
      } else if (row.LX == "取卵3") {
        document.getElementById("ImgID").src =
          "/static/img/fz_jydj.1.cc296d54.jpg";
      } else {
        document.getElementById("ImgID").src = "";
      }
    },
  },
};
</script>

本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
【热】打开小程序,算一算2024你的财运
 vue $attrs的使用
vue vue
前端实战:Vue实现数据导出导入案例
SpringBoot + Vue + ElementUI 实现后台管理系统模板 -- 前端篇(二):引入 element-ui 定义基本页面显示
vue中this.$route.query和this.$route.params & query传参和params传参的使用和区别
ElementUI的el-table的多选的取消选择和筛选的取消所有过滤器之ref冲突问题
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服