UReportFileBindUserList.vue 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  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="fileId">
  9. <a-input placeholder="请输入fileId" v-model="queryParam.fileId"></a-input>
  10. </a-form-item>
  11. </a-col>
  12. <a-col :md="6" :sm="8">
  13. <a-form-item label="userId">
  14. <a-input placeholder="请输入userId" v-model="queryParam.userId"></a-input>
  15. </a-form-item>
  16. </a-col>
  17. <template v-if="toggleSearchStatus">
  18. <a-col :md="6" :sm="8">
  19. <a-form-item label="userName">
  20. <a-input placeholder="请输入userName" v-model="queryParam.userName"></a-input>
  21. </a-form-item>
  22. </a-col>
  23. <a-col :md="6" :sm="8">
  24. <a-form-item label="fileName">
  25. <a-input placeholder="请输入fileName" v-model="queryParam.fileName"></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. <a @click="handleToggleSearch" style="margin-left: 8px">
  34. {{ toggleSearchStatus ? '收起' : '展开' }}
  35. <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
  36. </a>
  37. </span>
  38. </a-col>
  39. </a-row>
  40. </a-form>
  41. </div>
  42. <!-- 操作按钮区域 -->
  43. <div class="table-operator">
  44. <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
  45. <a-button type="primary" icon="download" @click="handleExportXls('用户绑定报表信息')">导出</a-button>
  46. <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
  47. <a-button type="primary" icon="import">导入</a-button>
  48. </a-upload>
  49. <a-dropdown v-if="selectedRowKeys.length > 0">
  50. <a-menu slot="overlay">
  51. <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
  52. </a-menu>
  53. <a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
  54. </a-dropdown>
  55. </div>
  56. <!-- table区域-begin -->
  57. <div>
  58. <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
  59. <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项
  60. <a style="margin-left: 24px" @click="onClearSelected">清空</a>
  61. </div>
  62. <a-table
  63. ref="table"
  64. size="middle"
  65. bordered
  66. rowKey="id"
  67. :columns="columns"
  68. :dataSource="dataSource"
  69. :pagination="ipagination"
  70. :loading="loading"
  71. :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
  72. @change="handleTableChange">
  73. <span slot="action" slot-scope="text, record">
  74. <a @click="handleEdit(record)">编辑</a>
  75. <a-divider type="vertical" />
  76. <a-dropdown>
  77. <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
  78. <a-menu slot="overlay">
  79. <a-menu-item>
  80. <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
  81. <a>删除</a>
  82. </a-popconfirm>
  83. </a-menu-item>
  84. </a-menu>
  85. </a-dropdown>
  86. </span>
  87. </a-table>
  88. </div>
  89. <!-- table区域-end -->
  90. <!-- 表单区域 -->
  91. <uReportFileBindUser-modal ref="modalForm" @ok="modalFormOk"></uReportFileBindUser-modal>
  92. </a-card>
  93. </template>
  94. <script>
  95. import UReportFileBindUserModal from './modules/UReportFileBindUserModal'
  96. import { JeecgListMixin } from '@/mixins/JeecgListMixin'
  97. export default {
  98. name: "UReportFileBindUserList",
  99. mixins:[JeecgListMixin],
  100. components: {
  101. UReportFileBindUserModal
  102. },
  103. data () {
  104. return {
  105. description: '用户绑定报表信息管理页面',
  106. // 表头
  107. columns: [
  108. {
  109. title: '#',
  110. dataIndex: '',
  111. key:'rowIndex',
  112. width:60,
  113. align:"center",
  114. customRender:function (t,r,index) {
  115. return parseInt(index)+1;
  116. }
  117. },
  118. {
  119. title: 'fileId',
  120. align:"center",
  121. dataIndex: 'fileId'
  122. },
  123. {
  124. title: 'userId',
  125. align:"center",
  126. dataIndex: 'userId'
  127. },
  128. {
  129. title: 'userName',
  130. align:"center",
  131. dataIndex: 'userName'
  132. },
  133. {
  134. title: 'fileName',
  135. align:"center",
  136. dataIndex: 'fileName'
  137. },
  138. {
  139. title: '操作',
  140. dataIndex: 'action',
  141. align:"center",
  142. scopedSlots: { customRender: 'action' },
  143. }
  144. ],
  145. url: {
  146. list: "/ctop/uReportFileBindUser/list",
  147. delete: "/ctop/uReportFileBindUser/delete",
  148. deleteBatch: "/ctop/uReportFileBindUser/deleteBatch",
  149. exportXlsUrl: "ctop/uReportFileBindUser/exportXls",
  150. importExcelUrl: "ctop/uReportFileBindUser/importExcel",
  151. },
  152. }
  153. },
  154. computed: {
  155. importExcelUrl: function(){
  156. return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
  157. }
  158. },
  159. methods: {
  160. }
  161. }
  162. </script>
  163. <style scoped>
  164. @import '~@assets/less/common.less'
  165. </style>