OptimizerRoleInfoList.vue 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  1. <template>
  2. <a-card :bordered="false">
  3. <!-- 查询区域 -->
  4. <div class="table-page-search-wrapper">
  5. <a-form layout="inline">
  6. <a-row :gutter="24">
  7. <a-col :md="6" :sm="8">
  8. <a-form-item label="部门代码">
  9. <a-input placeholder="请输入部门代码" v-model="queryParam.orgCode"></a-input>
  10. </a-form-item>
  11. </a-col>
  12. <template>
  13. <a-col :md="6" :sm="8">
  14. <a-form-item label="用户id">
  15. <a-input placeholder="请输入用户id" v-model="queryParam.userId"></a-input>
  16. </a-form-item>
  17. </a-col>
  18. <a-col :md="6" :sm="8">
  19. <a-form-item label="归属人id">
  20. <a-input placeholder="请输入归属人id" v-model="queryParam.belongerId"></a-input>
  21. </a-form-item>
  22. </a-col>
  23. <a-col :md="6" :sm="8">
  24. <a-form-item label="enabled">
  25. <a-input placeholder="请输入enabled" v-model="queryParam.enabled"></a-input>
  26. </a-form-item>
  27. </a-col>
  28. </template>
  29. <a-col :md="6" :sm="8" >
  30. <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
  31. <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
  32. <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
  33. </span>
  34. </a-col>
  35. </a-row>
  36. </a-form>
  37. </div>
  38. <!-- 操作按钮区域 -->
  39. <div class="table-operator">
  40. <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
  41. </div>
  42. <!-- table区域-begin -->
  43. <div>
  44. <a-table
  45. ref="table"
  46. size="middle"
  47. bordered
  48. rowKey="id"
  49. :columns="columns"
  50. :dataSource="dataSource"
  51. :pagination="ipagination"
  52. :loading="loading"
  53. @change="handleTableChange">
  54. <span slot="action" slot-scope="text, record">
  55. <a @click="handleEdit(record)">编辑</a>
  56. <a-divider type="vertical" />
  57. <a-dropdown>
  58. <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
  59. <a-menu slot="overlay">
  60. <a-menu-item>
  61. <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
  62. <a>删除</a>
  63. </a-popconfirm>
  64. </a-menu-item>
  65. </a-menu>
  66. </a-dropdown>
  67. </span>
  68. </a-table>
  69. </div>
  70. <!-- table区域-end -->
  71. <!-- 表单区域 -->
  72. <optimizerRoleInfo-modal ref="modalForm" @ok="modalFormOk"></optimizerRoleInfo-modal>
  73. </a-card>
  74. </template>
  75. <script>
  76. import OptimizerRoleInfoModal from './modules/OptimizerRoleInfoModal'
  77. import { JeecgListMixin } from '@/mixins/JeecgListMixin'
  78. export default {
  79. name: "OptimizerRoleInfoList",
  80. mixins:[JeecgListMixin],
  81. components: {
  82. OptimizerRoleInfoModal
  83. },
  84. data () {
  85. return {
  86. description: '优化师角色关系表管理页面',
  87. // 表头
  88. columns: [
  89. {
  90. title: '部门代码',
  91. align:"center",
  92. dataIndex: 'orgCode'
  93. },
  94. {
  95. title: '角色类型',
  96. align:"center",
  97. dataIndex: 'type'
  98. },
  99. {
  100. title: '用户名称',
  101. align:"center",
  102. dataIndex: 'userId'
  103. },
  104. {
  105. title: '归属人名称',
  106. align:"center",
  107. dataIndex: 'belongerId'
  108. },
  109. {
  110. title: '操作',
  111. dataIndex: 'action',
  112. align:"center",
  113. scopedSlots: { customRender: 'action' },
  114. }
  115. ],
  116. url: {
  117. list: "/ctop/optimizerRoleInfo/list",
  118. delete: "/ctop/optimizerRoleInfo/delete",
  119. deleteBatch: "/ctop/optimizerRoleInfo/deleteBatch",
  120. exportXlsUrl: "ctop/optimizerRoleInfo/exportXls",
  121. importExcelUrl: "ctop/optimizerRoleInfo/importExcel",
  122. },
  123. }
  124. },
  125. computed: {
  126. importExcelUrl: function(){
  127. return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
  128. }
  129. },
  130. methods: {
  131. }
  132. }
  133. </script>
  134. <style scoped>
  135. @import '~@assets/less/common.less'
  136. </style>