<style>

</style>
<template>
  <div>
    <el-table ref="multipleTable" :data="dataList" tooltip-effect="dark" style="width: 100%"
      @selection-change="handleSelectionChange">
        <el-table-column type="selection" width="55">
        </el-table-column>
        <el-table-column label="导航名称">
            <template slot-scope="scope">{{ scope.row.NavIconName }}</template>
        </el-table-column>
        <el-table-column prop="name" label="导航链接">
            <template slot-scope="scope">{{ scope.row.NavIconUrl }}</template>
        </el-table-column>
    </el-table>
    <el-pagination style="text-align:right" background @current-change="handleCurrentChange"
        :page-size="msg.pageSize" layout="prev, pager, next" :total="total">
    </el-pagination>
  </div>
</template>
<script>
  export default {
    data() {
      return {
        loading: false,
        dataList: [],
        msg: {
          pageIndex: 1,
          pageSize: 15,
          NavIconName: "",
          MallBaseId: 0,
          NavIconIsShow:0,
        },
        total: 0,
        navArr:[]
      };
    },
    created() {

    },
    methods: {
      handleCurrentChange(val) {
        this.msg.pageIndex = val;
        this.getList();
      },
      getList() {
        this.apipost("/api/Tenant/GetMiniProgrameNaviconPage", this.msg, res => {
          if (res.data.resultCode == 1) {
            this.dataList = res.data.data.pageData;
            this.total = res.data.data.count;
            console.log(this.dataList,'datalist');
          } else {
            this.Info(res.data.message);
          }
        })
      },
      handleSelectionChange(val){
          this.navArr=val;
      },
      getChooseLink(){
          var newArr=[];
          this.navArr.forEach(x=>{
              let obj={
                icon:x.NavIconImg,
                name:x.NavIconName,
                url:x.NavIconUrl,
                openType:'navigate',
                key:'diy'
              }
              newArr.push(obj);
          })
          return newArr;
      }
    },
    mounted() {
      this.getList();
    }
  };
</script>

