PlatformConfigList.vue 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. <template>
  2. <a-row :gutter="24">
  3. <a-col :md="24">
  4. <a-card :style="cardStyle" :bordered="false">
  5. <!-- table区域-begin -->
  6. <div>
  7. <a-table
  8. ref="table"
  9. size="middle"
  10. bordered
  11. rowKey="id"
  12. :columns="columns"
  13. :dataSource="dataSource"
  14. :pagination="ipagination"
  15. :scroll="scroll"
  16. :loading="loading"
  17. @change="handleTableChange"
  18. >
  19. <span slot="action" slot-scope="text, record">
  20. <a @click="handleEdit(record)">编辑</a>
  21. </span>
  22. </a-table>
  23. </div>
  24. <!-- table区域-end -->
  25. <!-- 表单区域 -->
  26. <platform-config-modal ref="modalForm" @ok="modalFormOk"></platform-config-modal>
  27. </a-card>
  28. </a-col>
  29. </a-row>
  30. </template>
  31. <!-- f r o m 7 5 2 7 1 8 9 2 0 -->
  32. <script>
  33. import PlatformConfigModal from './modules/PlatformConfigModal'
  34. import { JeecgListMixin } from '@/mixins/JeecgListMixin'
  35. export default {
  36. name: 'PlatformConfigList',
  37. mixins: [JeecgListMixin],
  38. components: {
  39. PlatformConfigModal,
  40. },
  41. data() {
  42. return {
  43. currentRoleId: '',
  44. labelCol: {
  45. span: 5,
  46. },
  47. wrapperCol: {
  48. span: 18,
  49. offset: 1,
  50. },
  51. // 查询条件
  52. queryParam: { platformKey: '' },
  53. // 表头
  54. columns: [
  55. {
  56. title: '#',
  57. dataIndex: '',
  58. key: 'rowIndex',
  59. width: 40,
  60. align: 'center',
  61. customRender: function (t, r, index) {
  62. return parseInt(index) + 1
  63. },
  64. },
  65. {
  66. title: '操作',
  67. dataIndex: 'action',
  68. align: 'center',
  69. width: 100,
  70. scopedSlots: { customRender: 'action' },
  71. },
  72. {
  73. title: '配置名称',
  74. dataIndex: 'platformKeyInfo',
  75. width: 100,
  76. },
  77. {
  78. title: '配置值',
  79. dataIndex: 'platformValue',
  80. width: 500,
  81. },
  82. ],
  83. url: {
  84. list: '/platformConfig/list',
  85. delete: '/platformConfig/delete',
  86. deleteBatch: '/platformConfig/deleteBatch',
  87. },
  88. }
  89. },
  90. methods: {
  91. handleEdit: function (record) {
  92. this.$refs.modalForm.edit(record)
  93. this.$refs.modalForm.title = '编辑'
  94. this.$refs.modalForm.disableSubmit = false
  95. if (this.btnEnableList.indexOf(1) === -1) {
  96. this.$refs.modalForm.isReadOnly = true
  97. }
  98. },
  99. },
  100. }
  101. </script>
  102. <style scoped>
  103. @import '~@assets/less/common.less';
  104. </style>