DsetView.vue 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <template>
  2. <div>
  3. <template v-if="dsetId != null">
  4. <el-table :data="tableData" style="width: 100%" height="420" border header-row-class-name="tableHeadbg">
  5. <template v-for="item in headData">
  6. <el-table-column :key="item" :prop="item" :label="item" min-width="130">
  7. </el-table-column>
  8. </template>
  9. </el-table>
  10. </template>
  11. </div>
  12. </template>
  13. <script>
  14. import { baseUrl, ajax } from "@/common/biConfig";
  15. import $ from "jquery"
  16. export default {
  17. name: 'dsetView',
  18. data() {
  19. return {
  20. tableData:[],
  21. headData:[],
  22. dsetId:null,
  23. dsid:null
  24. }
  25. },
  26. props: {
  27. },
  28. components: {
  29. },
  30. mounted() {
  31. },
  32. computed: {},
  33. methods: {
  34. loadData(dsetId, dsid){
  35. this.dsetId = dsetId;
  36. ajax({
  37. type:"get",
  38. url:"model/queryDataset.action",
  39. data:{dsetId:dsetId, dsid:dsid},
  40. success:(resp)=>{
  41. this.headData = resp.rows.header;
  42. this.tableData = resp.rows.datas;
  43. this.$forceUpdate();
  44. }
  45. }, this);
  46. }
  47. }
  48. };
  49. </script>
  50. <style lang="less" scoped>
  51. @import "../../style/mixin";
  52. </style>