|
@@ -24,6 +24,7 @@
|
|
start-placeholder="开始日期"
|
|
start-placeholder="开始日期"
|
|
end-placeholder="结束日期"
|
|
end-placeholder="结束日期"
|
|
:clearable="false"
|
|
:clearable="false"
|
|
|
|
+ @change="dateChange"
|
|
>
|
|
>
|
|
</el-date-picker>
|
|
</el-date-picker>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
@@ -96,6 +97,22 @@
|
|
</el-option>
|
|
</el-option>
|
|
</el-select>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
+ <el-form-item label="栏目">
|
|
|
|
+ <el-select
|
|
|
|
+ collapse-tags
|
|
|
|
+ clearable
|
|
|
|
+ v-model="form.appColumn"
|
|
|
|
+ placeholder="请选择栏目"
|
|
|
|
+ >
|
|
|
|
+ <el-option
|
|
|
|
+ v-for="item in appColumn"
|
|
|
|
+ :key="item"
|
|
|
|
+ :label="item"
|
|
|
|
+ :value="item"
|
|
|
|
+ >
|
|
|
|
+ </el-option>
|
|
|
|
+ </el-select>
|
|
|
|
+ </el-form-item>
|
|
<el-form-item style="float: right">
|
|
<el-form-item style="float: right">
|
|
<el-button type="primary" @click="onSubmit">查询</el-button>
|
|
<el-button type="primary" @click="onSubmit">查询</el-button>
|
|
<el-button size="small" type="primary" @click="onExport">
|
|
<el-button size="small" type="primary" @click="onExport">
|
|
@@ -356,6 +373,7 @@ import {
|
|
getContentChart,
|
|
getContentChart,
|
|
getContentPage,
|
|
getContentPage,
|
|
getContentTotle,
|
|
getContentTotle,
|
|
|
|
+ getAppColumn,
|
|
} from '@/api/index';
|
|
} from '@/api/index';
|
|
|
|
|
|
import countTo from '@/components/counto/vue-countTo.vue';
|
|
import countTo from '@/components/counto/vue-countTo.vue';
|
|
@@ -403,6 +421,7 @@ export default {
|
|
top: [],
|
|
top: [],
|
|
total: [],
|
|
total: [],
|
|
client: [],
|
|
client: [],
|
|
|
|
+ appColumn: [],
|
|
};
|
|
};
|
|
},
|
|
},
|
|
async mounted() {
|
|
async mounted() {
|
|
@@ -435,6 +454,7 @@ export default {
|
|
},
|
|
},
|
|
true
|
|
true
|
|
);
|
|
);
|
|
|
|
+ this.getAppColFun();
|
|
this.form = {
|
|
this.form = {
|
|
// app: (this.cycle[0] || { value: "" }).value,
|
|
// app: (this.cycle[0] || { value: "" }).value,
|
|
app: defaultAppNameFunc(this.cycle),
|
|
app: defaultAppNameFunc(this.cycle),
|
|
@@ -445,11 +465,28 @@ export default {
|
|
page: 1,
|
|
page: 1,
|
|
size: 20,
|
|
size: 20,
|
|
sortBy: '',
|
|
sortBy: '',
|
|
|
|
+ appColumn: '不限',
|
|
};
|
|
};
|
|
this.onSubmit();
|
|
this.onSubmit();
|
|
},
|
|
},
|
|
computed: {},
|
|
computed: {},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ dateChange() {
|
|
|
|
+ this.form.appColumn = '不限';
|
|
|
|
+ this.appColumn = [];
|
|
|
|
+ this.getAppColFun();
|
|
|
|
+ },
|
|
|
|
+ async getAppColFun() {
|
|
|
|
+ const start = this.form.date[0] || new Date(Date.now() - 604800000);
|
|
|
|
+ const end = this.form.date[1] || new Date(Date.now() - 604800000);
|
|
|
|
+ const appColumn = await getAppColumn({
|
|
|
|
+ app: this.form.app || defaultAppNameFunc(this.cycle),
|
|
|
|
+ start,
|
|
|
|
+ end,
|
|
|
|
+ });
|
|
|
|
+ const col = appColumn || [];
|
|
|
|
+ this.appColumn = ['不限', ...col];
|
|
|
|
+ },
|
|
tableChange(e) {
|
|
tableChange(e) {
|
|
this.form.page = 1;
|
|
this.form.page = 1;
|
|
this.form.sortBy = e.column ? e.column.property : '';
|
|
this.form.sortBy = e.column ? e.column.property : '';
|
|
@@ -498,7 +535,8 @@ export default {
|
|
match: this.match,
|
|
match: this.match,
|
|
sortBy: this.form.sortBy,
|
|
sortBy: this.form.sortBy,
|
|
lib: this.form.client == -1 ? undefined : this.form.client,
|
|
lib: this.form.client == -1 ? undefined : this.form.client,
|
|
- order: this.form.order
|
|
|
|
|
|
+ order: this.form.order,
|
|
|
|
+ channelName: this.form.appColumn === '不限' || !this.form.appColumn ? undefined : this.form.appColumn,
|
|
};
|
|
};
|
|
getContentPage(this.lastParams).then(r => (this.table = r || {}));
|
|
getContentPage(this.lastParams).then(r => (this.table = r || {}));
|
|
getContentTotle({
|
|
getContentTotle({
|
|
@@ -770,6 +808,11 @@ export default {
|
|
};
|
|
};
|
|
});
|
|
});
|
|
});
|
|
});
|
|
|
|
+
|
|
|
|
+ // 切换应用时重置栏目
|
|
|
|
+ this.form.appColumn = '不限';
|
|
|
|
+ this.appColumn = [];
|
|
|
|
+ this.getAppColFun();
|
|
},
|
|
},
|
|
changeversion(v) {
|
|
changeversion(v) {
|
|
if (!v.length) return (this.form.version = [-1]);
|
|
if (!v.length) return (this.form.version = [-1]);
|
|
@@ -784,12 +827,8 @@ export default {
|
|
this.form.version = ver;
|
|
this.form.version = ver;
|
|
},
|
|
},
|
|
onExport() {
|
|
onExport() {
|
|
- const S = this.lastParams.start
|
|
|
|
- ? this.lastParams.start
|
|
|
|
- : undefined;
|
|
|
|
- const E = this.lastParams.end
|
|
|
|
- ? this.lastParams.end
|
|
|
|
- : undefined;
|
|
|
|
|
|
+ const S = this.lastParams.start ? this.lastParams.start : undefined;
|
|
|
|
+ const E = this.lastParams.end ? this.lastParams.end : undefined;
|
|
const app = this.lastParams.app || this.form.app;
|
|
const app = this.lastParams.app || this.form.app;
|
|
const version =
|
|
const version =
|
|
this.form.version == -1 ? undefined : this.form.version.join(',');
|
|
this.form.version == -1 ? undefined : this.form.version.join(',');
|