VideoWatermarkTaskList.vue 6.0 KB

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