|
@@ -1,6 +1,6 @@
|
|
|
<template>
|
|
|
<div class="directional-content">
|
|
|
- <a-card title="素材管理" style="width: 100%">
|
|
|
+ <a-card style="width: 100%">
|
|
|
<div class="table-page-search-wrapper">
|
|
|
<a-form layout="inline" :form="form"
|
|
|
hide-required-mark :selfUpdate="true"
|
|
@@ -13,8 +13,8 @@
|
|
|
<a-col :md="8" :sm="8" :xxl="6">
|
|
|
<a-form-item label="唯一编码">
|
|
|
<a-input
|
|
|
- v-decorator="['name']" type="text"
|
|
|
- placeholder="请输入需要搜索的定向包名称"
|
|
|
+ v-decorator="['signature']" type="text"
|
|
|
+ placeholder="请输入想要搜索的素材md5"
|
|
|
/>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
@@ -26,23 +26,21 @@
|
|
|
placeholder="请选择"
|
|
|
allow-clear
|
|
|
>
|
|
|
- <a-select-option v-for="item in platform" :key="item.label">
|
|
|
- {{ item.value }}
|
|
|
- </a-select-option>
|
|
|
+ <a-select-option :value="0">可用</a-select-option>
|
|
|
+ <a-select-option :value="1">删除</a-select-option>
|
|
|
</a-select>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<!-- -->
|
|
|
<a-col :md="8" :sm="8" :xxl="6">
|
|
|
- <a-form-item label="系统平台">
|
|
|
+ <a-form-item label="素材渠道">
|
|
|
<a-select
|
|
|
- v-decorator="['status']"
|
|
|
+ v-decorator="['channelType']"
|
|
|
placeholder="请选择"
|
|
|
allow-clear
|
|
|
>
|
|
|
- <a-select-option v-for="item in platform" :key="item.label">
|
|
|
- {{ item.value }}
|
|
|
- </a-select-option>
|
|
|
+ <a-select-option :value="0">自产</a-select-option>
|
|
|
+ <a-select-option :value="1">素造</a-select-option>
|
|
|
</a-select>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
@@ -50,7 +48,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>
|
|
@@ -58,8 +55,32 @@
|
|
|
</a-form>
|
|
|
</div>
|
|
|
</a-card>
|
|
|
- <a-card style="width: 100%;min-height:300px;margin-top:15px">
|
|
|
|
|
|
+ <a-card class="material-main">
|
|
|
+ <a-spin :spinning="spinning">
|
|
|
+ <div v-if="dataSource.length > 0">
|
|
|
+ <div class="home-card">
|
|
|
+ <div class="home-item" v-for="(items, index) in dataSource" :key="index" >
|
|
|
+ <img :src="items.coverUrl" alt="">
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <a-pagination
|
|
|
+ size="small"
|
|
|
+ :showTotal="ipagination.showTotal"
|
|
|
+ style="float: right"
|
|
|
+ v-if="dataSource.length > 0"
|
|
|
+ showQuickJumper
|
|
|
+ :pageSize.sync="ipagination.pageSize"
|
|
|
+ :total="ipagination.total"
|
|
|
+ v-model="ipagination.current"
|
|
|
+ @change="getDataSource"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ <div v-else class="home-card">
|
|
|
+
|
|
|
+ </div>
|
|
|
+ </a-spin>
|
|
|
</a-card>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -73,7 +94,8 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
- form:this.$form.createForm(this),
|
|
|
+ spinning: false,
|
|
|
+ form: this.$form.createForm(this),
|
|
|
projectId: '',
|
|
|
dataSource: [],
|
|
|
dataLoading: false,
|
|
@@ -99,6 +121,13 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ getDataSource(current, pageSize) {
|
|
|
+ // 切换分页时的回调,
|
|
|
+ // 当在页面定义change事件时,切记要把此处的事件清除,因为这两个事件重叠了,可能到时候会导致一些莫名的bug
|
|
|
+ this.ipagination.current = current;
|
|
|
+ this.ipagination.pageSize= pageSize;
|
|
|
+ this.handleGetTableList({})
|
|
|
+ },
|
|
|
handleQueryList() {
|
|
|
this.ipagination.current = 1;
|
|
|
event.preventDefault();
|
|
@@ -114,17 +143,21 @@ export default {
|
|
|
this.$refs.selectTable.getData()
|
|
|
},
|
|
|
handleGetTableList(data) {
|
|
|
+ this.spinning = true;
|
|
|
const paramsData = {
|
|
|
- templateName: data.name,
|
|
|
+ signature: data.signature,
|
|
|
projectId: this.projectId,
|
|
|
- platformOs: data.status,
|
|
|
+ status: data.status,
|
|
|
+ channelType: data.channelType,
|
|
|
+
|
|
|
pageNo: this.ipagination.current,
|
|
|
pageSize: this.ipagination.pageSize
|
|
|
};
|
|
|
this.dataSource = []
|
|
|
this.dataLoading = true;
|
|
|
- getAction('/kuaishouProjectVideoGet/list', paramsData).then(result => {
|
|
|
+ this.getAction('/kuaishouProjectVideoGet/list', paramsData).then(result => {
|
|
|
this.dataLoading = false;
|
|
|
+ this.spinning = false;
|
|
|
if (result.code === 200) {
|
|
|
this.dataSource = result.result.list || [];
|
|
|
this.ipagination.total = result.result.total || 0;
|
|
@@ -133,6 +166,7 @@ export default {
|
|
|
this.$message.error(result.message);
|
|
|
}
|
|
|
}).catch(error => {
|
|
|
+ this.spinning = false;
|
|
|
this.dataLoading = false;
|
|
|
console.log(error, 'eeee');
|
|
|
});
|