|
@@ -17,23 +17,31 @@
|
|
|
</keep-alive>
|
|
|
<div class="topOptions">
|
|
|
<span class="OptinItem">
|
|
|
- <a-select style="width: 120px" @change="statusChange" placeholder="请选择状态">
|
|
|
- <a-select-option value="open" >
|
|
|
- 开
|
|
|
+ <Treeselect :appId.sync="accountID" :multiple="false" request="2,4" ref="treeSelect" style="margin-bottom:8px " />
|
|
|
+ </span>
|
|
|
+ <span class="OptinItem">
|
|
|
+ <a-select style="width: 120px" v-model="statusValue" @change="statusChange" placeholder="请选择状态">
|
|
|
+ <a-select-option value=" " >
|
|
|
+ 不限
|
|
|
+ </a-select-option>
|
|
|
+ <a-select-option value="CAMPAIGN_STATUS_ENABLE" >
|
|
|
+ 启用
|
|
|
</a-select-option>
|
|
|
- <a-select-option value="close">
|
|
|
- 关
|
|
|
+ <a-select-option value="CAMPAIGN_STATUS_DISABLE" >
|
|
|
+ 暂停
|
|
|
+ </a-select-option>
|
|
|
+ <a-select-option value="CAMPAIGN_STATUS_DELETE">
|
|
|
+ 删除
|
|
|
</a-select-option>
|
|
|
</a-select>
|
|
|
</span>
|
|
|
+
|
|
|
<span class="OptinItem">
|
|
|
- <a-input-search placeholder="请选择媒体账户" style="width: 200px" v-model="account" />
|
|
|
+ <!-- <a-date-picker @change="dateChange" /> -->
|
|
|
+ <a-range-picker v-model="dateValue" :disabled-date="disabledDate" style="width: 250px;" format="YYYY-MM-DD" @change="dateChange" />
|
|
|
</span>
|
|
|
<span class="OptinItem">
|
|
|
- <a-date-picker @change="dateChange" />
|
|
|
- </span>
|
|
|
- <span class="OptinItem">
|
|
|
- <a-input-search placeholder="请输入ID或名称关键词" v-model="optionId" style="width: 200px" @search="onSearch" />
|
|
|
+ <a-input-search placeholder="请输入ID或名称关键词" v-model="optionId" style="width: 200px" />
|
|
|
</span>
|
|
|
<span class="optionBtn">
|
|
|
<a-button type='primary' @click="search" class="searchBtn">查询</a-button>
|
|
@@ -105,6 +113,9 @@
|
|
|
:data-source="data"
|
|
|
:row-selection="rowSelection"
|
|
|
bordered
|
|
|
+ :pagination="ipagination"
|
|
|
+ :loading="loading"
|
|
|
+ @change="sort"
|
|
|
>
|
|
|
<template slot="name" slot-scope="text,record">
|
|
|
<editableCell :text="text" slotName='campaignName' @change="onCellChange(record.key, 'campaignName', $event)" />
|
|
@@ -197,7 +208,9 @@
|
|
|
<script>
|
|
|
import moment from 'moment';
|
|
|
import { getAction, postAction, downFile, downFilePost } from '@/api/manage';
|
|
|
+import { JeecgListMixin } from '@/mixins/ipagination'
|
|
|
import editableCell from './editableCell'
|
|
|
+import Treeselect from '@/views/modules/Statistics/components/Treeselect.vue'
|
|
|
let typeValue='预算'
|
|
|
let modifyTableCol=[
|
|
|
{
|
|
@@ -458,12 +471,19 @@ let data=[
|
|
|
export default {
|
|
|
components: {
|
|
|
editableCell,
|
|
|
+ Treeselect,
|
|
|
},
|
|
|
+ mixins: [JeecgListMixin],
|
|
|
data() {
|
|
|
return {
|
|
|
- account:'',//媒体账号
|
|
|
+ moment,
|
|
|
+ loading:false,
|
|
|
+ accountID:'',
|
|
|
+ // account:'',//媒体账号
|
|
|
optionId:'',//input输入的id或关键词
|
|
|
- dateValue:'',//日期选择框选择的事件--我赋值的是dateString
|
|
|
+ statusValue:undefined,
|
|
|
+ dateValue:[],//日期选择框选择
|
|
|
+ dateString:[],//--我赋值的是dateString
|
|
|
tabkey:'group',//tab选中的页
|
|
|
selectDisable:true,
|
|
|
optValue:'',//操作设置的值 删除 暂停 开启
|
|
@@ -547,6 +567,11 @@ export default {
|
|
|
//日期改变
|
|
|
dateChange(date, dateString) {
|
|
|
console.log(date, dateString);
|
|
|
+ this.dateString=dateString;
|
|
|
+ },
|
|
|
+ disabledDate(current) {
|
|
|
+ // console.log(current)
|
|
|
+ return current && current > moment().subtract(1, 'day')
|
|
|
},
|
|
|
//输入框查询事件
|
|
|
onSearch(value){
|
|
@@ -554,7 +579,31 @@ export default {
|
|
|
},
|
|
|
//查询按钮事件
|
|
|
search(){
|
|
|
-
|
|
|
+ // console.log(this.accountID,this.dateString,this.statusValue,this.optionId);
|
|
|
+ this.refreshCampaignList({
|
|
|
+ accountId:this.accountID,
|
|
|
+ name:this.optionId,
|
|
|
+ status:this.statusValue,
|
|
|
+ startDate:this.dateString[0],
|
|
|
+ endDate:this.dateString[1],
|
|
|
+ pageNo:this.ipagination.current
|
|
|
+ })
|
|
|
+ // postAction('',{
|
|
|
+
|
|
|
+ // }).then((res)=>{
|
|
|
+ // console.log(res)
|
|
|
+ // })
|
|
|
+ },
|
|
|
+ //点击分页
|
|
|
+ sort(pagination, filters, sorter, { currentDataSource }){
|
|
|
+ console.log(pagination, filters, sorter)
|
|
|
+ // if(sorter.order == 'ascend'){
|
|
|
+ // this.HttpPost(sorter.columnKey+'+')
|
|
|
+ // }else if(sorter.order == 'descend'){
|
|
|
+ // this.HttpPost(sorter.columnKey+'-')
|
|
|
+ // }
|
|
|
+ this.ipagination.current=pagination.current;
|
|
|
+ this.search()
|
|
|
},
|
|
|
//重置按钮事件
|
|
|
reset(){
|
|
@@ -706,10 +755,13 @@ export default {
|
|
|
console.log(this.copyNum,'---',this.copyGroup)
|
|
|
},
|
|
|
refreshCampaignList(params){
|
|
|
+ this.loading=true
|
|
|
getAction(this.url.campaignList, params).then(res => {
|
|
|
console.log(res);
|
|
|
if (res.success) {
|
|
|
- this.data = res.result.records;
|
|
|
+ this.ipagination.total = res.result.total
|
|
|
+ this.loading = false
|
|
|
+ this.data = res.result.records;
|
|
|
|
|
|
} else {
|
|
|
console.log(res.message);
|
|
@@ -721,6 +773,7 @@ export default {
|
|
|
console.log(this);
|
|
|
this.data=data;
|
|
|
let params = {}
|
|
|
+ // this.dateString=[moment().format("YYYY-MM-DD"),moment().format("YYYY-MM-DD")]
|
|
|
//初始
|
|
|
this.refreshCampaignList(params);
|
|
|
},
|