VideoMergeTaskList.vue 5.3 KB

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