其它推送

 that.$emitter.emit('on-dialog-link-else',{
         meta:dataT.meta||{
            fullscreen:false,
            top:0,
            width:"70%",
            draw:true
        },
        attrs:dataT.attrs||{},
        popup:dataT.popup||{},
        tabs:dataT.tabs||[],
        query:dataT.query||{},
      });

其它推送案例

  handleDoField(item) {
      let that=this;
      let metaT = {
          primaryId: [],
          modulesHide: ["else"],
          mkey: that.config.response.mkey,
          field: that.config.response.field,
          menuId: that.config.response.menuId,
          auth: true,
          component: "popedom-field",
        };
        that.$emitter.emit("on-dialog-link-else", {
          visible:true,
          src:'component',
          html:null,
          meta: metaT,
          attrs: {
            title: `${item.row.menuName}字段权限`,
            "hidde-title": true,
            // "scrollbar-style": "height: calc(100vh - 150px)",
          },
          popup: {},
          tabs: [],
          query: {
            mapperField:item.row.mapperField,
            menuId:item.row.menuId,
          },
        });
    },

订阅信息

 that.$emitter.on("on-dialog-link-view", (dataT) => {
      that.dialog={
        attrs:dataT.attrs||{
            fullscreen:false,
            top:0,
            width:"70%",
            draw:true
        },
        popup:dataT.popup||{},
        tabs:dataT.tabs||{},
        query:dataT.query||{},
      }
    });

订阅容器

<section class="dialog-extand">
      <el-dialog
        :modal-append-to-body="false"
        :title="dialog.attrs.title||$store.getters.bsDialog.title"
        :close-on-click-modal="false"
        :visible.sync="$store.getters.bsDialog.visible"
        :custom-class="dialog.attrs.class||$store.getters.bsDialog.class"
        fullscreen
      >
        <!-- v-bind="$store.getters.bsDialog.args" -->
        <component
          v-bind="dialog.attrs"
          v-model="dialog.meta"
          :main-popup="dialog.popup"
          :main-tabs="dialog.tabs"
          :meta-query="dialog.query"
          v-if="$store.getters.bsDialog.src === 'component'"
          v-bind:is="$store.getters.bsDialog.component"
        >
          {{ ($store.getters.bsDialog.args || {}).html }}
        </component>
        <iframe
          v-else-if="$store.getters.bsDialog.src"
          :style="$store.getters.bsDialog.style"
          :src="$store.getters.bsDialog.src"
        ></iframe>
      </el-dialog>
    </section>

推送

 that.$emitter.emit('on-dialog-link-view',{
         meta:dataT.meta||{},
        attrs:dataT.attrs||{},
        popup:dataT.popup||{},
        tabs:dataT.tabs||[],
        query:dataT.query||{},
      });

表格弹出框


if (that.emitterId === data.thatRootUsed.emitterId) {
        let metaT = {
          primaryId: [{ field: "roleId", alias: "role_id" }],
          modulesHide: ["form"],
          mkey: "bo-role",
          field: "manager",
          menuId: "bt-deve-bt-20200-01948a99-bc99-4463",
          auth: true,
          component: "bs-table",
        };
        that.$emitter.emit("on-dialog-link-table", {
          visible:true,
          src:'component',
          html:null,
          meta: metaT,
          attrs: {
            title: "信息表格",
            "hidde-title": true,            
            //  "table-height":"600"
          },
          popup: {},
          tabs: [],
          query: {},
        });
      }

表单弹出框


let metaT = {
          primaryId: [],
          modulesHide: ["form"],
          mkey: "bs-single-article",
          field: "aboutus",
          menuId: "rg-deve-rg-20200-6343b99c-b159-454d",
          auth: true,
          component: "bs-form",
        };
        that.$emitter.emit("on-dialog-link-view", {
          visible:true,
          src:'component',
          html:null,
          meta: metaT,
          attrs: {
            title: "信息编辑",
            "hidde-title": true,
            "scrollbar-style": "height: calc(100vh - 150px)",
          },
          popup: {},
          tabs: [],
          query: {},
        });
      }

案例


 that.$emitter.on("on-bridge-action-edit", (data, e) => {
      // 订阅信息
      if (that.emitterId === data.thatRootUsed.emitterId) {
        let metaT = {
          primaryId: [],
          modulesHide: ["form"],
          mkey: "bs-single-article",
          field: "aboutus",
          menuId: "rg-deve-rg-20200-6343b99c-b159-454d",
          auth: true,
          component: "bs-form",
        };
        let options = {
          url: "component",
          option: {
            component: "bs-form",
            // style: "border: none; width: 100%; height: calc(100vh - 5px)",
            class: "bs-root-dialog-p0",
            method: "bs-dialog", // "modal-dialog",
            args: null,
            params: {},
            query: {},
          },
        };
        let url = options.url;
        that.$link.toLinkUrl(url, that, options.option);
        that.$emitter.emit("on-dialog-link-view", {
          meta:metaT,
          attrs: {},
          popup: {},
          tabs:[],
          query:{}
        });
        }
    });

信息新增

// eslint-disable-next-line no-unused-vars
    that.$emitter.on("on-bridge-action-add", (data, e) => {
      //that, thatRoot, thatRootUsed, itemT
      // 订阅信息
      if (that.emitterId === data.thatRootUsed.emitterId) {
        let metaT = {
          primaryId: [],
          modulesHide: ["form"],
          mkey: "bs-single-article",
          field: "aboutus",
          menuId: "rg-deve-rg-20200-6343b99c-b159-454d",
          auth: true,
          component: "bs-form",
        };
        that.$emitter.emit("on-dialog-link-view", {
          visible:true,
          src:'component',
          html:null,
          meta: metaT,
          attrs: {
            title: "信息新增",
            "hidde-title": true,
            "scrollbar-style": "height: calc(100vh - 150px)",
          },
          popup: {},
          tabs: [],
          query: {},
        });
      }
    });

订阅信息

  // eslint-disable-next-line no-unused-vars
    that.$emitter.on("on-bridge-action-view", (data, e) => {
      // 订阅信息
      if (that.emitterId === data.thatRootUsed.emitterId) {
        let metaT = {
          primaryId: [{ field: "roleId", alias: "role_id" }],
          modulesHide: ["form"],
          mkey: "bo-role",
          field: "manager",
          menuId: "bt-deve-bt-20200-01948a99-bc99-4463",
          auth: true,
          component: "bs-table",
        };
        that.$emitter.emit("on-dialog-link-table", {
          visible:true,
          src:'component',
          html:null,
          meta: metaT,
          attrs: {
            title: "信息表格",
            "hidde-title": true,            
            //  "table-height":"600"
          },
          popup: {},
          tabs: [],
          query: {},
        });
      }
    });

信息编辑


 that.$emitter.on("on-bridge-action-edit", (data, e) => {
      // 订阅信息
      if (that.emitterId === data.thatRootUsed.emitterId) {
        let metaT = {
          primaryId: [],
          modulesHide: ["form"],
          mkey: "bs-single-article",
          field: "aboutus",
          menuId: "rg-deve-rg-20200-6343b99c-b159-454d",
          auth: true,
          component: "bs-form",
        };
        that.$emitter.emit("on-dialog-link-view", {
          visible:true,
          src:'component',
          html:null,
          meta: metaT,
          attrs: {
            title: "信息编辑",
            "hidde-title": true,
            "scrollbar-style": "height: calc(100vh - 150px)",
          },
          popup: {},
          tabs: [],
          query: {},
        });
      }
    });

数据加载(已废弃)

 that.$emitter.on("on-bridge-action-view", (data, e) => {
      // 订阅信息
      if (that.emitterId === data.thatRootUsed.emitterId) {
        // methodBsBridge.loadBridgeData(
        //   data.that,
        //   data.thatRoot,
        //   that,
        //   data.itemT
        // );
        // doLoadFormDetailData({}, that, data.itemT, () => {}, data.query);
      }
    });
文档更新时间: 2021-12-05 08:41   作者:admin