UReportFileBindUserList.vue 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  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.fileName"></a-input>
  10. </a-form-item>
  11. </a-col>
  12. <a-col :md="6" :sm="8">
  13. <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
  14. <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
  15. <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
  16. </span>
  17. </a-col>
  18. </a-row>
  19. </a-form>
  20. </div>
  21. <!--<a-row :gutter="24" style="margin-bottom:10px">
  22. <a-col :md="6" :sm="8">
  23. <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
  24. <a-button type="primary" @click="addData">新增</a-button>
  25. </span>
  26. </a-col>
  27. </a-row>-->
  28. <!-- table区域-begin -->
  29. <div>
  30. <a-table
  31. ref="table"
  32. size="middle"
  33. bordered
  34. rowKey="id"
  35. :columns="columns"
  36. :dataSource="dataSource"
  37. :pagination="ipagination"
  38. :loading="loading"
  39. @change="handleTableChange"
  40. >
  41. <span slot="action" slot-scope="text, record">
  42. <a @click="lookView(record)">预览</a>
  43. </span>
  44. </a-table>
  45. </div>
  46. <!-- table区域-end -->
  47. <!-- 表单区域 -->
  48. <uReportFileBindUser-modal ref="modalForm" @ok="modalFormOk"></uReportFileBindUser-modal>
  49. </a-card>
  50. </template>
  51. <script>
  52. import UReportFileBindUserModal from './modules/UReportFileBindUserModal'
  53. import { JeecgListMixin } from '@/mixins/JeecgListMixin'
  54. export default {
  55. name: 'UReportFileBindUserList',
  56. mixins: [JeecgListMixin],
  57. components: {
  58. UReportFileBindUserModal
  59. },
  60. data() {
  61. return {
  62. description: '用户绑定报表信息管理页面',
  63. // 表头
  64. columns: [
  65. {
  66. title: '报表模板名称',
  67. align: 'center',
  68. dataIndex: 'fileName'
  69. },
  70. {
  71. title: '操作',
  72. dataIndex: 'action',
  73. align: 'center',
  74. scopedSlots: { customRender: 'action' }
  75. }
  76. ],
  77. url: {
  78. list: '/ctop/uReportFileBindUser/list',
  79. delete: '/ctop/uReportFileBindUser/delete',
  80. deleteBatch: '/ctop/uReportFileBindUser/deleteBatch',
  81. exportXlsUrl: 'ctop/uReportFileBindUser/exportXls',
  82. importExcelUrl: 'ctop/uReportFileBindUser/importExcel'
  83. }
  84. }
  85. },
  86. computed: {
  87. importExcelUrl: function() {
  88. return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`
  89. }
  90. },
  91. methods: {
  92. lookView(item) {
  93. var url = ''
  94. if (process.env.NODE_ENV === 'development') {
  95. url = 'http://39.106.184.70:8080/jeecg-boot/ureport/preview?_u=mysql:' + item.fileName
  96. } else if (process.env.NODE_ENV === 'production') {
  97. url = 'http://139.186.29.76:8804/jeecg-boot/ureport/preview?_u=mysql:' + item.fileName
  98. }
  99. window.open(url, '_blank')
  100. }
  101. }
  102. }
  103. </script>
  104. <style scoped>
  105. @import '~@assets/less/common.less';
  106. </style>