ProjectList.vue 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  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.projectName"></a-input>
  10. </a-form-item>
  11. </a-col>
  12. <a-col :md="6" :sm="8">
  13. <a-form-item label="广告主名称">
  14. <a-input placeholder="请输入广告主名称" v-model="queryParam.advertiserName"></a-input>
  15. </a-form-item>
  16. </a-col>
  17. <template>
  18. <a-col :md="6" :sm="8">
  19. <a-form-item label="负责人">
  20. <a-input placeholder="请输入负责人" v-model="queryParam.responsible"></a-input>
  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. <!-- <a @click="handleToggleSearch" style="margin-left: 8px">
  29. {{ toggleSearchStatus ? '收起' : '展开' }}
  30. <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
  31. </a> -->
  32. </span>
  33. </a-col>
  34. </a-row>
  35. </a-form>
  36. </div>
  37. <!-- 操作按钮区域 -->
  38. <div class="table-operator">
  39. <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
  40. </div>
  41. <!-- table区域-begin -->
  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. @change="handleTableChange"
  53. >
  54. <span slot="maxBid" slot-scope="text">{{ text / 1000 }}</span>
  55. <span slot="action" slot-scope="text, record">
  56. <a @click="handleEdit(record)">编辑</a>
  57. <a-divider type="vertical" />
  58. <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
  59. <a>删除</a>
  60. </a-popconfirm>
  61. </span>
  62. </a-table>
  63. </div>
  64. <!-- table区域-end -->
  65. <!-- 表单区域 -->
  66. <project-modal ref="modalForm" @ok="modalFormOk"></project-modal>
  67. </a-card>
  68. </template>
  69. <script>
  70. import ProjectModal from './modules/ProjectModal'
  71. import { JeecgListMixin } from '@/mixins/JeecgListMixin'
  72. export default {
  73. name: 'ProjectList',
  74. mixins: [JeecgListMixin],
  75. components: {
  76. ProjectModal
  77. },
  78. data() {
  79. return {
  80. description: '项目管理页面',
  81. // 表头
  82. columns: [
  83. {
  84. title: '项目名称',
  85. align: 'center',
  86. dataIndex: 'projectName'
  87. },
  88. {
  89. title: '广告主名称',
  90. align: 'center',
  91. dataIndex: 'advertiserName'
  92. },
  93. {
  94. title: '最高出价',
  95. align: 'center',
  96. dataIndex: 'maxBid',
  97. scopedSlots: { customRender: 'maxBid' }
  98. },
  99. {
  100. title: '负责人',
  101. align: 'center',
  102. dataIndex: 'responsibleName'
  103. },
  104. {
  105. title: '操作',
  106. dataIndex: 'action',
  107. align: 'center',
  108. scopedSlots: { customRender: 'action' }
  109. }
  110. ],
  111. url: {
  112. list: '/ctop/project/list',
  113. delete: '/ctop/project/delete',
  114. deleteBatch: '/ctop/project/deleteBatch',
  115. exportXlsUrl: 'ctop/project/exportXls',
  116. importExcelUrl: 'ctop/project/importExcel'
  117. }
  118. }
  119. },
  120. computed: {
  121. importExcelUrl: function() {
  122. return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`
  123. }
  124. },
  125. methods: {}
  126. }
  127. </script>
  128. <style scoped>
  129. @import '~@assets/less/common.less';
  130. </style>