RolePerformanceCommissionList.vue 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  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="请输入sys_role的主键id" v-model="queryParam.roleId"></a-input>
  10. </a-form-item>
  11. </a-col>
  12. <template>
  13. <a-col :md="6" :sm="8">
  14. <a-form-item label="是否有效">
  15. <j-dict-select-tag v-model="queryParam.enabled" placeholder="请选择" dictCode="valid_status"/>
  16. </a-form-item>
  17. </a-col>
  18. <a-col :md="6" :sm="8">
  19. <a-form-item label="媒体类型">
  20. <j-dict-select-tag v-model="queryParam.appType" placeholder="请选择类型" dictCode="media_type"/>
  21. </a-form-item>
  22. </a-col>
  23. </template>
  24. <a-col :md="6" :sm="8" >
  25. <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
  26. <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
  27. <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
  28. </span>
  29. </a-col>
  30. </a-row>
  31. </a-form>
  32. </div>
  33. <!-- 操作按钮区域 -->
  34. <div class="table-operator">
  35. <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
  36. </div>
  37. <!-- table区域-begin -->
  38. <div>
  39. <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
  40. <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项
  41. <a style="margin-left: 24px" @click="onClearSelected">清空</a>
  42. </div>
  43. <a-table
  44. ref="table"
  45. size="middle"
  46. bordered
  47. rowKey="id"
  48. :columns="columns"
  49. :dataSource="dataSource"
  50. :pagination="ipagination"
  51. :loading="loading"
  52. :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
  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. <rolePerformanceCommission-modal ref="modalForm" @ok="modalFormOk"></rolePerformanceCommission-modal>
  73. </a-card>
  74. </template>
  75. <script>
  76. import RolePerformanceCommissionModal from './modules/RolePerformanceCommissionModal'
  77. import { JeecgListMixin } from '@/mixins/JeecgListMixin'
  78. import JDictSelectTag from '@/components/dict/JDictSelectTag.vue'
  79. export default {
  80. name: "RolePerformanceCommissionList",
  81. mixins:[JeecgListMixin],
  82. components: {
  83. RolePerformanceCommissionModal,
  84. JDictSelectTag
  85. },
  86. data () {
  87. return {
  88. description: '角色提成比例管理页面',
  89. // 表头
  90. columns: [
  91. {
  92. title: '#',
  93. dataIndex: '',
  94. key:'rowIndex',
  95. width:60,
  96. align:"center",
  97. customRender:function (t,r,index) {
  98. return parseInt(index)+1;
  99. }
  100. },
  101. {
  102. title: '角色',
  103. align:"center",
  104. dataIndex: 'roleId_dictText'
  105. },
  106. {
  107. title: '角色提成比例',
  108. align:"center",
  109. dataIndex: 'roleCommissionRate'
  110. },
  111. {
  112. title: '是否有效',
  113. align:"center",
  114. dataIndex: 'enabled_dictText'
  115. },
  116. {
  117. title: '媒体类型',
  118. align:"center",
  119. dataIndex: 'appType_dictText'
  120. },
  121. {
  122. title: '操作',
  123. dataIndex: 'action',
  124. align:"center",
  125. scopedSlots: { customRender: 'action' },
  126. }
  127. ],
  128. url: {
  129. list: "/ctop/rolePerformanceCommission/list",
  130. delete: "/ctop/rolePerformanceCommission/delete",
  131. deleteBatch: "/ctop/rolePerformanceCommission/deleteBatch",
  132. exportXlsUrl: "ctop/rolePerformanceCommission/exportXls",
  133. importExcelUrl: "ctop/rolePerformanceCommission/importExcel",
  134. },
  135. }
  136. },
  137. computed: {
  138. importExcelUrl: function(){
  139. return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
  140. }
  141. },
  142. methods: {
  143. }
  144. }
  145. </script>
  146. <style scoped>
  147. @import '~@assets/less/common.less'
  148. </style>