BusNavbar.vue 2.95 KB
Newer Older
1 2 3
<template>
  <el-dialog
    :visible.sync="initdialog"
zhujiazhan committed
4
    :title="'操作列表'"
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55
    append-to-body
    :before-close="beforeClose"
    @opened="opened"
  >
    <div class="m-list-btns">
      <div class="busnavbar">
        <div class="busnavbar-items">
          <c-button
            style="margin-left: 7px"
            size="medium"
            type="primary"
            class="medium_bcs"
            @click.native="onRelease()"
            title="Release">
                Release
            </c-button>
            <c-button
              style="margin-left: 7px"
              size="medium"
              type="primary"
              class="medium_bcs"
              @click.native="onRepair()"
              title="Repair">
                    Repair
              </c-button>

            <c-button
                style="margin-left: 7px"
                size="medium"
                type="primary"
                class="medium_bcs"
                @click.native="onReject()"
                title="Reject">
                    Reject
            </c-button>
        </div>
      </div>
    </div>
  </el-dialog>
</template>
<script>
import Api from "~/service/Api";
import commonProcess from "~/mixin/commonProcess";

import _ from "~/utils/Lodash"

export default {
  props: {
    ownref: {
      required: true,
    },
zhujiazhan committed
56 57 58 59 60 61 62 63 64
    row: {
      required: true,
    },
    trnCode: {
      required: true,
    },
    model:{
        required: true,
    },
65 66 67 68 69 70 71 72 73 74 75
  },
  components: {},
  mixins: [commonProcess], // 里面包含了Default、Check等的公共处理
  data() {
    return {
      initdialog: false,
    };
  },
  methods: {
    //各入口按钮请求
    async onRelease(){
zhujiazhan committed
76 77 78 79 80 81 82 83 84 85 86 87
        this.model.sptstm = this.row;
        this.trnName = this.trnCode;
        const selIds = [1]; //rowno选中行
        const selDst = "sptstm" //列表对应后台模型中的stream
        let params = { selDst: selDst, selIds: selIds };
        let rtnmsg = await this.executeRule('relrow',params);
        if (rtnmsg.respCode == SUCCESS) {
           this.$emit("onChoose");
         } else {
           //this.$notify.error({ title: "错误", message: "服务请求失败!" });
           this.$emit("onChoose");
         }
88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127

    },
    async onRepair(){

    },
    async onReject(){

    },
    async onNarBtnClick(code, i) {
      this.model.cfgfil[`subtrn${i}`] = code;
      let rtnmsg = await this.executeRule(`cfgfil.hotsub${i}`);
      if (rtnmsg.respCode == SUCCESS) {
        this.navcode = [];
        this.$emit("onChoose", code.toLowerCase());
      } else {
        this.$notify.error({ title: "错误", message: "服务请求失败!" });
      }
    },
    getIndex(module) {
      for (let i = 1; i <= 12; i++) {
        var temp = this.model.cfgfil[`subtxt${i}`];
        if (module == temp) {
          return i;
        }
      }
      return 1;
    },
    opened() {

    },
    beforeClose() {
      this.navcode = [];
      this.initdialog = false;
    },
  },

};
</script>
<style>
</style>