You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

94 lines
2.5 KiB

  1. <template>
  2. <div class="mod-config">
  3. <el-form :inline="true" label-position="top" label-width="100px" style="margin-top: -10px;">
  4. <el-button @click="getData()" type="primary" style="margin-left: 2px;margin-top: 33px">{{buttons.search}}</el-button>
  5. </el-form>
  6. <el-table
  7. :height="height"
  8. :data="dataList"
  9. border
  10. v-loading="dataListLoading"
  11. style="width: 100%;">
  12. <el-table-column
  13. header-align="center"
  14. align="center"
  15. width="150"
  16. label="操作">
  17. <template slot-scope="scope">
  18. <a type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">修改</a>
  19. <a type="text" size="small" @click="deleteHandle(scope.row.id)">删除</a>
  20. </template>
  21. </el-table-column>
  22. <el-table-column
  23. v-for="(item,index) in columnList" :key="index"
  24. :sortable="item.columnSortable"
  25. :prop="item.columnProp"
  26. :header-align="item.headerAlign"
  27. :show-overflow-tooltip="item.showOverflowTooltip"
  28. :align="item.align"
  29. :fixed="item.fixed==''?false:item.fixed"
  30. min-width="20%"
  31. :label="item.columnLabel">
  32. <template slot-scope="scope">
  33. <span v-if="!item.columnHidden"> {{scope.row[item.columnProp]}}</span>
  34. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
  35. style="width: 100px; height: 80px"/></span>
  36. </template>
  37. </el-table-column>
  38. </el-table>
  39. </div>
  40. </template>
  41. <script>
  42. import {} from "@/api/sysLanguage.js"
  43. export default {
  44. name: "null",
  45. data() {
  46. return {
  47. height: 200,
  48. dataList:[],
  49. dataListLoading: false,
  50. buttons:{
  51. search:'查询',
  52. },
  53. columnList: [
  54. {
  55. userId: this.$store.state.user.name,
  56. functionId: 9002,
  57. serialNumber: '9002tBlbasedataId',
  58. tableId: "9002Blbasedata",
  59. tableName: "工厂信息表",
  60. columnProp: "id",
  61. headerAlign: "center",
  62. align: "left",
  63. columnLabel: "工厂id",
  64. columnHidden: false,
  65. columnImage: false,
  66. columnSortable: false,
  67. sortLv: 0,
  68. status: true,
  69. fixed: '',
  70. columnWidth: 50
  71. },
  72. ],
  73. }
  74. },
  75. mounted() {
  76. this.$nextTick(() => {
  77. this.height = window.innerHeight - 240;
  78. })
  79. },
  80. methods: {},
  81. created() {
  82. }
  83. }
  84. </script>
  85. <style scoped>
  86. </style>