ReportService/ReportService/Views/Home/Index.cshtml

30 lines
838 B
Plaintext

<div id="reportMain">
<ul class="nav nav-tabs">
<li class="nav-item" v-for="m in reportList">
<a class="nav-link" href="#" v-on:click="cli(m)">{{m}}</a>
</li>
</ul>
<div id="rpPage"></div>
</div>
<script type="text/javascript">
var vm = new Vue({
el: "#reportMain",
data: {
reportList: [],
url: myjs.urls.files,
fileContentUrl: myjs.urls.fileContentUrl,
},
created() {
$.get(this.url, function (d) {
vm.reportList = d;
});
},
methods: {
cli(m) {
$.get(this.fileContentUrl, { fileName: m }, function (h) {
$("#rpPage").html(h);
});
},
}
});
</script>