detail.vue
3.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
<template>
<div>
<el-dialog :title="$t('button.details')" :visible.sync="isShow" v-if="isShow" :close-on-click-modal='false' width="1000px" class="manage-dialog dialog_lj" :before-close="closeDialog">
<el-button type="primary" class="search-btn manage-add-btn" @click="exportFun">{{$t('button.export')}}</el-button>
<el-table
:data="tableData"
:max-height="500"
style="width: 100%"
header-row-class-name="manage-tab-head"
>
<el-table-column prop="order" :label="$t('table.order')" align="center" width="100"></el-table-column>
<el-table-column prop="groupName" :label="$t('table.group')" align="center"></el-table-column>
<el-table-column prop="mallName" :label="$t('table.mall')" align="center"></el-table-column>
<el-table-column prop="patrolTimes" :label="$t('table.tourNumber')" align="center"></el-table-column>
<el-table-column prop="unqualifiedNum" :label="$t('table.nonconformities')" align="center"></el-table-column>
<el-table-column prop="deductPoints" :label="$t('table.deductPoints')" align="center"></el-table-column>
</el-table>
<div slot="footer" class="dialog-footer">
<el-button @click="closeDialog" class="dialog-btn">{{$t('dialog.cancel')}}</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
export default {
data() {
return {
loading:false,
isShow:false,
tableData:[],
parmasObj:{}
}
},
methods: {
dialogInit(detailObj) {
this.parmasObj = {
...detailObj
}
let tabelParams = {
accountId: this.$cookie.get('accountId'),
startDate:detailObj.startDate,
endDate:detailObj.endDate,
mallIds:detailObj.mallIds,
sopProjectId:detailObj.sopProjectId,
patrolType:2
};
Object.keys(tabelParams).map(key => (!tabelParams[key] ? delete tabelParams[key] : ''));
this.$api.videoShopTourReport.checkProblemItemReport(tabelParams, null, true).then(data => {
this.tableData = [];
var result = data.data;
if(result.code==200){
if(result.data && result.data.length>0){
result.data.forEach((item, index) => {
item.order = index + 1;
});
}
this.tableData = result.data;
}
})
this.isShow = true;
},
exportFun(){
let parameter = {
accountId: this.$cookie.get('accountId'),
startDate:this.parmasObj.startDate,
endDate:this.parmasObj.endDate,
mallIds:this.parmasObj.mallIds,
sopProjectId:this.parmasObj.sopProjectId
};
let Url =window._vionConfig.tourUrl + "/report-form/sop-project/mall/export?";
let dowloadUrl =`${Url}accountId=${parameter.accountId}&patrolType=2&mallIds=${parameter.mallIds}&sopProjectId=${parameter.sopProjectId}&startDate=${parameter.startDate}&endDate=${parameter.endDate}&authorization=${this.$cookie.get("atoken")}`
window.open(dowloadUrl);
},
closeDialog() {
this.isShow = false;
}
}
}
</script>
<style lang="less" scoped="scoped">
.dialog_lj{
min-height: 500px;
.search-btn{
margin-bottom: 15px;
}
}
</style>