<div class="main" id="main">

    <div class="main" id="main" v-cloak>

        <div class="menu-bar-box">
            <table border=0 cellpadding=0 cellspacing=0>
                <tr>
                    <td align="right">
                        <el-input size="small"  style="width:150px;"  placeholder="搜索站点名称" v-model="searchData.searchKeyword"></el-input>
                        <el-button size="mini"   onclick="loadData()">确定</el-button>
                    </td>
                </tr>
            </table>
        </div>

        <el-table :data="dataList" border style="width: 100%">
            <el-table-column label="选择">
                <template slot-scope="scope">
                    <el-radio v-model="selectedValue" :label="scope.row.Id" v-on:change="setData">{{scope.row.Remark}}</el-radio>
                </template>
            </el-table-column>
        </el-table>

        <ui-page-panel v-model="pageInfo" v-on:change="reLoadData" v-if="pageInfo.RecordCount>0"></ui-page-panel>

        <div class="footer-submit-bar">
            <el-button type="button" onclick="closeSelf()">关闭</el-button>
        </div>
    </div>
</div>

<script type="text/javascript">
    var setData = "@Request.QueryString["setData"]";
    var parentData = eval(setData);
    //vue实例化
    var vue = new Vue({
        el: "#main",
        data: {
            searchData: { searchField: "remark", searchKeyword: "" },
            pageInfo: { PageSize:15, CurrentPage: 1, RecordCount: 0, PageCount: 1 },
            dataList: [],
            selectedValue: parentData,
        },
        methods: {
            reLoadData: function () {
                loadData();
            },
            setData: function () {
                eval(setData + "=(this.selectedValue)");
                closeSelf();
            },
        }
    });

        //加载数据
    function loadData()
    {
        var serverData = extend(vue.pageInfo, vue.searchData);
        vue.ajax({
            url: "@Url.ActionUrl("PageListData")?_isload=1",
            data: serverData,
            success: function (responseData) {
                if (responseData != "")
                {
                    vue.dataList = responseData.Data;
                    vue.pageInfo = responseData.PageInfo;
                }
            }
        });
    }
    loadData();
</script>
