|
@@ -0,0 +1,145 @@
|
|
|
|
+<template>
|
|
|
|
+ <div>
|
|
|
|
+ <a-card title="素材管理" style="width: 100%">
|
|
|
|
+ <div class="table-page-search-wrapper">
|
|
|
|
+ <a-form layout="inline" :form="form"
|
|
|
|
+ hide-required-mark :selfUpdate="true"
|
|
|
|
+ @submit="handleQueryList">
|
|
|
|
+ <a-row :gutter="24">
|
|
|
|
+ <a-col :md="8" :sm="8" :xxl="6">
|
|
|
|
+ <!-- <a-form-item label="项目名称"> -->
|
|
|
|
+ <selectTable :projectId.sync="projectId" ref="selectTable" :requireCheck="false"></selectTable>
|
|
|
|
+ </a-col>
|
|
|
|
+ <a-col :md="8" :sm="8" :xxl="6">
|
|
|
|
+ <a-form-item label="唯一编码">
|
|
|
|
+ <a-input
|
|
|
|
+ v-decorator="['name']" type="text"
|
|
|
|
+ placeholder="请输入需要搜索的定向包名称"
|
|
|
|
+ />
|
|
|
|
+ </a-form-item>
|
|
|
|
+ </a-col>
|
|
|
|
+ <!-- -->
|
|
|
|
+ <a-col :md="8" :sm="8" :xxl="6">
|
|
|
|
+ <a-form-item label="素材状态">
|
|
|
|
+ <a-select
|
|
|
|
+ v-decorator="['status']"
|
|
|
|
+ placeholder="请选择"
|
|
|
|
+ allow-clear
|
|
|
|
+ >
|
|
|
|
+ <a-select-option v-for="item in platform" :key="item.label">
|
|
|
|
+ {{ item.value }}
|
|
|
|
+ </a-select-option>
|
|
|
|
+ </a-select>
|
|
|
|
+ </a-form-item>
|
|
|
|
+ </a-col>
|
|
|
|
+ <!-- -->
|
|
|
|
+ <a-col :md="8" :sm="8" :xxl="6">
|
|
|
|
+ <a-form-item label="系统平台">
|
|
|
|
+ <a-select
|
|
|
|
+ v-decorator="['status']"
|
|
|
|
+ placeholder="请选择"
|
|
|
|
+ allow-clear
|
|
|
|
+ >
|
|
|
|
+ <a-select-option v-for="item in platform" :key="item.label">
|
|
|
|
+ {{ item.value }}
|
|
|
|
+ </a-select-option>
|
|
|
|
+ </a-select>
|
|
|
|
+ </a-form-item>
|
|
|
|
+ </a-col>
|
|
|
|
+ <a-col :md="8" :sm="8" :xxl="6">
|
|
|
|
+ <span style="float: left; overflow: hidden" class="table-page-search-submitButtons">
|
|
|
|
+ <a-button type="primary" icon="search" @click="handleQueryList">查询</a-button>
|
|
|
|
+ <a-button type="primary" @click="handleResetForm" icon="reload" class="middle-button">重置</a-button>
|
|
|
|
+ <a-button type="primary" @click="addNewTemplate(null)">新建定向包</a-button>
|
|
|
|
+ </span>
|
|
|
|
+
|
|
|
|
+ </a-col>
|
|
|
|
+ </a-row>
|
|
|
|
+ </a-form>
|
|
|
|
+ </div>
|
|
|
|
+ </a-card>
|
|
|
|
+ </div>
|
|
|
|
+</template>
|
|
|
|
+
|
|
|
|
+<script>
|
|
|
|
+import moment from 'moment'
|
|
|
|
+import selectTable from '@/views/modules/Statistics/components/selectPagination.vue';
|
|
|
|
+export default {
|
|
|
|
+ components: {
|
|
|
|
+ selectTable
|
|
|
|
+ },
|
|
|
|
+ data() {
|
|
|
|
+ return {
|
|
|
|
+ form:this.$form.createForm(this),
|
|
|
|
+ projectId: '',
|
|
|
|
+ dataSource: [],
|
|
|
|
+ dataLoading: false,
|
|
|
|
+ ipagination: {
|
|
|
|
+ current: 1,
|
|
|
|
+ pageSize: 10,
|
|
|
|
+ // pageSizeOptions: ['10', '20', '30'],
|
|
|
|
+ showTotal: (total, range) => {
|
|
|
|
+ return range[0] + "-" + range[1] + " 共" + total + "条"
|
|
|
|
+ },
|
|
|
|
+ showQuickJumper: true,
|
|
|
|
+ showSizeChanger:false,
|
|
|
|
+ pageSizeOptions: ['10', '30', '50'],
|
|
|
|
+ total: 0,
|
|
|
|
+ onChange: (current, pageSize) => {
|
|
|
|
+ // 切换分页时的回调,
|
|
|
|
+ // 当在页面定义change事件时,切记要把此处的事件清除,因为这两个事件重叠了,可能到时候会导致一些莫名的bug
|
|
|
|
+ this.ipagination.current = current;
|
|
|
|
+ this.ipagination.pageSize= pageSize;
|
|
|
|
+ this.handleGetTableList({})
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ methods: {
|
|
|
|
+ handleQueryList() {
|
|
|
|
+ this.ipagination.current = 1;
|
|
|
|
+ event.preventDefault();
|
|
|
|
+ const paramsData = this.form.getFieldsValue();
|
|
|
|
+ this.handleGetTableList(paramsData);
|
|
|
|
+ },
|
|
|
|
+ handleResetForm() {
|
|
|
|
+ this.ipagination.current = 1;
|
|
|
|
+ this.form.resetFields();
|
|
|
|
+ this.projectId = undefined;
|
|
|
|
+ this.handleGetTableList({});
|
|
|
|
+ this.$refs.selectTable.keyValue = "";
|
|
|
|
+ this.$refs.selectTable.getData()
|
|
|
|
+ },
|
|
|
|
+ handleGetTableList(data) {
|
|
|
|
+ const paramsData = {
|
|
|
|
+ templateName: data.name,
|
|
|
|
+ projectId: this.projectId,
|
|
|
|
+ platformOs: data.status,
|
|
|
|
+ pageNo: this.ipagination.current,
|
|
|
|
+ pageSize: this.ipagination.pageSize
|
|
|
|
+ };
|
|
|
|
+ this.dataSource = []
|
|
|
|
+ this.dataLoading = true;
|
|
|
|
+ getAction('/kuaishouProjectVideoGet/list', paramsData).then(result => {
|
|
|
|
+ this.dataLoading = false;
|
|
|
|
+ if (result.code === 200) {
|
|
|
|
+ this.dataSource = result.result.list || [];
|
|
|
|
+ this.ipagination.total = result.result.total || 0;
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
|
|
+ this.$message.error(result.message);
|
|
|
|
+ }
|
|
|
|
+ }).catch(error => {
|
|
|
|
+ this.dataLoading = false;
|
|
|
|
+ console.log(error, 'eeee');
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ },
|
|
|
|
+ mounted() {
|
|
|
|
+ this.handleGetTableList({});
|
|
|
|
+ },
|
|
|
|
+}
|
|
|
|
+</script>
|
|
|
|
+<style lang="less" scoped>
|
|
|
|
+ @import "material";
|
|
|
|
+</style>
|