SelMune.vue 1.47 KB
Newer Older
zhengxiaokui committed
1 2 3 4 5 6 7 8 9 10
<template>
  <el-table
    :data="data"
    border
    stripe
    :show-header="false"
    :cell-style="cellSttyle"
  >
    <el-table-column prop="title" align="center">
      <template slot-scope="scope">
zhengxiaokui committed
11
        <c-button
zhengxiaokui committed
12
          class="c_button_style"
zhengxiaokui committed
13 14 15 16 17 18
          @click.native="onNarBtnClick(scope.row.url, scope.row.hotsubx)"
          :title="scope.row.title"
          :disabled="scope.row.disabled"
          >{{ scope.row.title }}</c-button
        >
        <!-- <el-link
zhengxiaokui committed
19 20 21 22
          :disabled="scope.row.disabled"
          :href="scope.row.url"
          v-if="scope.row.title"
          >{{ scope.row.title }}</el-link
zhengxiaokui committed
23
        > -->
zhengxiaokui committed
24 25 26 27 28 29
      </template>
    </el-table-column>
  </el-table>
</template>

<script>
wangren committed
30
import commonProcess from "~/mixin/commonProcess";
zhengxiaokui committed
31
export default {
zhengxiaokui committed
32 33
  inject: ["root"],
  props: ["data", "model"],
wangren committed
34
  mixins: [commonProcess], // 里面包含了Default、Check等的公共处理
zhengxiaokui committed
35 36 37 38 39
  data() {
    return {
      cellSttyle: { height: "25px" },
    };
  },
zhengxiaokui committed
40 41 42 43 44
  methods: {
    //各入口按钮请求
    async onNarBtnClick(href, hotsubx) {
      let rtnmsg = await this.executeRule(`cfgfil.hotsub${hotsubx}`);
      console.log("cfgfil.code:" + this.model.cfgfil[`subtrn${hotsubx}`]);
吴佳 committed
45
      if ((rtnmsg.respCode == SUCCESS)) {
zhengxiaokui committed
46 47 48 49 50 51
        this.$router.history.push(href);
      } else {
        this.$notify.error({ title: "错误", message: "服务请求失败!" });
      }
    },
  },
zhengxiaokui committed
52 53 54 55
};
</script>

<style>
zhengxiaokui committed
56 57 58
.c_button_style {
  border: 0px;
  border-radius: 5px;
zhengxiaokui committed
59 60
}
</style>