Commit 33e70c2e by crushh

Merge branch 'feature/3月迭代' of http://git.gicdev.com/marketing-web/marketing into feature/3月迭代

parents f6823d32 fd5e3c5e
......@@ -67,7 +67,7 @@ export default {
created() {
const { startTime, endTime } = this.$route.query;
this.search.activityId = this.$route.params.id;
this.search.dateRange = [this.formatDateTimeByType(startTime, 'yyyy-MM-dd'), this.formatDateTimeByType(endTime, 'yyyy-MM-dd')];
this.search.dateRange = [this.formatDateTimeByType(Number(startTime), 'yyyy-MM-dd'), this.formatDateTimeByType(Number(endTime), 'yyyy-MM-dd')];
this.getData();
},
methods: {
......
......@@ -12,7 +12,7 @@
<el-table-column label="批次时间" prop="createTime" min-width="240px" :formatter="(row, col, val) => (val ? formatDateTimeByType(val) : '--')"></el-table-column>
</el-table>
<dm-pagination v-show="total > 0" background @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="search.pageNum" :page-size="search.pageSize" :total="total" :page-sizes="[20, 40, 60, 80]" layout="total, sizes, prev, pager, next"> </dm-pagination>
<vue-gic-export-excel :dialogVisible.sync="exportData.dialogVisible" :dataArr="tableData" :params="exportData.params" type="2" excelUrl="/api-marketing/export-ai-member-log" projectName="marketing"></vue-gic-export-excel>
<vue-gic-export-excel :dialogVisible.sync="dialogVisible" :dataArr="tableData" :params="exportData" type="2" excelUrl="/api-marketing/export-ai-member-log" projectName="marketing"></vue-gic-export-excel>
</div>
</template>
......@@ -35,23 +35,21 @@ export default {
loading: false,
total: 0,
tableData: [],
dialogVisible: false,
exportData: {
dialogVisible: false,
selectedId: [],
params: {
activityName: '', // 营销活动名称
startTime: '', // 开始时间
endTime: '', // 结束时间
dataType: '' // 1:脱敏 2:完整
}
activityName: '', // 营销活动名称
startTime: '', // 开始时间
endTime: '', // 结束时间
dataType: '', // 1:脱敏 2:完整
logIdList: []
}
};
},
created() {
const { activityName, startTime, endTime } = this.$route.query;
this.search.activityId = this.$route.params.id;
this.search.dateRange = [this.formatDateTimeByType(startTime, 'yyyy-MM-dd'), this.formatDateTimeByType(endTime, 'yyyy-MM-dd')];
this.exportData.params.activityName = activityName;
this.search.dateRange = [this.formatDateTimeByType(Number(startTime), 'yyyy-MM-dd'), this.formatDateTimeByType(Number(endTime), 'yyyy-MM-dd')];
this.exportData.activityName = activityName;
this.getData();
},
......@@ -83,17 +81,17 @@ export default {
this.handleCurrentChange(1);
},
handleExportData() {
if (this.exportData.selectedId.length == 0) {
if (this.exportData.logIdList.length == 0) {
return this.$message.warning('请选择要导出的数据');
}
this.exportData.dialogVisible = true;
this.dialogVisible = true;
if (Array.isArray(this.search.dateRange)) {
this.exportData.params.startTime = this.search.dateRange[0];
this.exportData.params.endTime = this.search.dateRange[1];
this.exportData.startTime = this.search.dateRange[0];
this.exportData.endTime = this.search.dateRange[1];
}
},
handleSelectionChange(val) {
this.exportData.selectedId = val.map(v => v.planId);
this.exportData.logIdList = val.map(v => v.planId).join(',');
}
}
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment