|
@@ -3,38 +3,38 @@
|
|
|
<div class="container-box">
|
|
|
<div class="search">
|
|
|
<mySearch :searchList="searchList" @searchInfo="searchInfo"></mySearch>
|
|
|
- <el-button class="btn-check" size="medium" type="primary" @click="outlist">导出
|
|
|
+ <el-button class="btn-check" size="medium" type="primary" @click="outList">导出
|
|
|
</el-button>
|
|
|
</div>
|
|
|
<div class="tabbox">
|
|
|
- <el-table height="100%" class="com-table" ref="multipleTable" :data="tableData"
|
|
|
+ <el-table height="100%" class="com-table" ref="multipleTable" :data="tableData" :show-summary="true" :summary-method="getSummaries"
|
|
|
tooltip-effect="dark" size="small" border style="width: 100%" :header-cell-style="headerStyleFun" :cell-style="cellStyle">
|
|
|
- <el-table-column prop="recordRegionName" align="center" fixed="left" label="地市"></el-table-column>
|
|
|
+ <el-table-column prop="cityName" align="center" fixed="left" label="地市"></el-table-column>
|
|
|
<el-table-column align="center" width="800px" :label="tooltit">
|
|
|
<el-table-column align="center" label="区县">
|
|
|
- <el-table-column prop="fkzbs" align="center" label="区县个数" ></el-table-column>
|
|
|
- <el-table-column prop="fkjh" align="center" label="扣罚次数"></el-table-column>
|
|
|
- <el-table-column prop="fkzbs" align="center" label="扣分" ></el-table-column>
|
|
|
- <el-table-column prop="fkjh" align="center" label="约谈"></el-table-column>
|
|
|
+ <el-table-column prop="countyCount" align="center" label="区县个数" ></el-table-column>
|
|
|
+ <el-table-column prop="countyDeductCount" align="center" label="扣罚次数"></el-table-column>
|
|
|
+ <el-table-column prop="countyDeductPoints" align="center" label="扣分" ></el-table-column>
|
|
|
+ <el-table-column prop="countyInterview" align="center" label="约谈"></el-table-column>
|
|
|
</el-table-column>
|
|
|
<el-table-column align="center" label="人员">
|
|
|
- <el-table-column prop="fkzbs" align="center" label="扣罚人数" ></el-table-column>
|
|
|
- <el-table-column prop="fkzbs" align="center" label="扣罚人次" ></el-table-column>
|
|
|
- <el-table-column prop="fkzbs" align="center" label="扣分" ></el-table-column>
|
|
|
- <el-table-column prop="fkzbs" align="center" label="罚款" ></el-table-column>
|
|
|
- <el-table-column prop="fkjh" align="center" label="通报"></el-table-column>
|
|
|
+ <el-table-column prop="personnelPeopleNumber" align="center" label="扣罚人数" ></el-table-column>
|
|
|
+ <el-table-column prop="personnelDeductCount" align="center" label="扣罚人次" ></el-table-column>
|
|
|
+ <el-table-column prop="personnelDeductPoints" align="center" label="扣分" ></el-table-column>
|
|
|
+ <el-table-column prop="personnelFineMoney" align="center" label="罚款" ></el-table-column>
|
|
|
+ <el-table-column prop="personnelNotification" align="center" label="通报"></el-table-column>
|
|
|
</el-table-column>
|
|
|
<el-table-column align="center" label="渠道">
|
|
|
- <el-table-column prop="fkzbs" align="center" label="渠道个数" ></el-table-column>
|
|
|
- <el-table-column prop="fkzbs" align="center" label="扣罚次数" ></el-table-column>
|
|
|
- <el-table-column prop="fkzbs" align="center" label="扣罚金额" ></el-table-column>
|
|
|
- <el-table-column prop="fkzbs" align="center" label="关停工号(1个月、3个月)" ></el-table-column>
|
|
|
- <el-table-column prop="fkzbs" align="center" label="6个月不允许开户" ></el-table-column>
|
|
|
- <el-table-column prop="fkzbs" align="center" label="取消合作" ></el-table-column>
|
|
|
- <el-table-column prop="fkzbs" align="center" label="警示教育(约谈、通报)" ></el-table-column>
|
|
|
- <el-table-column prop="fkzbs" align="center" label="末梢渠道6个月不允许开户" ></el-table-column>
|
|
|
- <el-table-column prop="fkzbs" align="center" label="末梢渠道取消合作" ></el-table-column>
|
|
|
- <el-table-column prop="fkzbs" align="center" label="末梢渠道警示教育" ></el-table-column>
|
|
|
+ <el-table-column prop="channelCount" align="center" label="渠道个数" ></el-table-column>
|
|
|
+ <el-table-column prop="channelDeductCount" align="center" label="扣罚次数" ></el-table-column>
|
|
|
+ <el-table-column prop="channelFineMoney" align="center" label="扣罚金额" ></el-table-column>
|
|
|
+ <el-table-column prop="channelShutDownMonth" align="center" width="100" label="关停工号(1个月、3个月)" ></el-table-column>
|
|
|
+ <el-table-column prop="channelIsSixNotAllow" align="center" label="6个月不允许开户" ></el-table-column>
|
|
|
+ <el-table-column prop="channelIsCancelCooperation" align="center" label="取消合作" ></el-table-column>
|
|
|
+ <el-table-column prop="channelWarnEducation" align="center" width="100" label="警示教育(约谈、通报)" ></el-table-column>
|
|
|
+ <el-table-column prop="channelTerminalSixNotAllow" align="center" width="100" label="末梢渠道6个月不允许开户" ></el-table-column>
|
|
|
+ <el-table-column prop="channelTerminalCancelCooperation" align="center" label="末梢渠道取消合作" ></el-table-column>
|
|
|
+ <el-table-column prop="channelTerminalWarnEducation" align="center" label="末梢渠道警示教育" ></el-table-column>
|
|
|
</el-table-column>
|
|
|
</el-table-column>
|
|
|
<el-table-column align="center" fixed="right" label="操作">
|
|
@@ -49,12 +49,10 @@
|
|
|
</template>
|
|
|
<script>
|
|
|
import mySearch from "../../../components/search.vue";
|
|
|
- import toolList from "../../../components/toolList.vue";
|
|
|
|
|
|
export default {
|
|
|
components: {
|
|
|
- mySearch,
|
|
|
- toolList
|
|
|
+ mySearch
|
|
|
},
|
|
|
data() {
|
|
|
|
|
@@ -77,18 +75,22 @@
|
|
|
total: 0,
|
|
|
pageSize: 1,
|
|
|
tableData: [],
|
|
|
- params: {},
|
|
|
+ params: new FormData(),
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
- cellStyle(){
|
|
|
- return "borderColor:black"
|
|
|
+ cellStyle({row, column, rowIndex, columnIndex}){
|
|
|
+ if (columnIndex === 0){
|
|
|
+ return "font-weight:bold;"
|
|
|
+ }else {
|
|
|
+ return "";
|
|
|
+ }
|
|
|
},
|
|
|
headerStyleFun({row, column, rowIndex, columnIndex}){
|
|
|
if (rowIndex === 0){
|
|
|
- return "background-color:#d8e4bc;font-size:18px;font-weight:bold;color:black;borderColor:black"
|
|
|
+ return "background-color:#d8e4bc;font-size:14px;font-weight:bold;color:black;"
|
|
|
}else {
|
|
|
- return "background-color:#d8e4bc;font-size:14px;font-weight:bold;color:black;borderColor:black"
|
|
|
+ return "background-color:#d8e4bc;font-size:12px;font-weight:bold;color:black;"
|
|
|
}
|
|
|
},
|
|
|
handleClick(row){
|
|
@@ -102,66 +104,108 @@
|
|
|
},
|
|
|
//搜索数据
|
|
|
searchInfo(v) {
|
|
|
- this.params = {};
|
|
|
- v[0] ? this.params.opTimeFrom = this.$formatDate(v[0], "YYYY-MM") : '';
|
|
|
- v[1] ? this.params.opTimeTo = this.$formatDate(v[1], "YYYY-MM") : '';
|
|
|
+ this.params = new FormData();
|
|
|
+ this.params.append("startDate", v[0] ? this.$formatDate(v[0], "YYYY-MM") : '');
|
|
|
+ this.params.append("endDate", v[1] ? this.$formatDate(v[1], "YYYY-MM") : '');
|
|
|
this.getList(this.params, this.pageSize);
|
|
|
},
|
|
|
//获取列表
|
|
|
getList(v, n) {
|
|
|
this.pageSize = n;
|
|
|
- let _this = this;
|
|
|
this.$http({
|
|
|
- url: "/market/cwcompetitor/queryTotalPage",
|
|
|
+ url: "/market/antiSpoofing/getAllStandingBook",
|
|
|
method: "post",
|
|
|
headers: {
|
|
|
"Content-Type": "application/json",
|
|
|
- "page": '{"pageNo":"' + n + '","pageSize":"10"}'
|
|
|
+ "page": '{"pageNo":"' + n + '","pageSize":"20"}'
|
|
|
},
|
|
|
data: v,
|
|
|
}).then((res) => {
|
|
|
- this.tableData = res.data.data;
|
|
|
- this.total = res.data.totalRecord;
|
|
|
+ if (res.data.retCode === '1'){
|
|
|
+ this.$message.error(res.data.retMsg);
|
|
|
+ }else {
|
|
|
+ res.data.data.forEach((data)=> {
|
|
|
+ let keys = Object.keys(data);
|
|
|
+ keys.forEach((key)=>{
|
|
|
+ if (!data[key]){
|
|
|
+ data[key] = '未填写'
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ this.tableData = res.data.data;
|
|
|
+ this.total = res.data.totalRecord;
|
|
|
+ }
|
|
|
});
|
|
|
},
|
|
|
- // =======================
|
|
|
- outlist() {
|
|
|
- let data = {}
|
|
|
- // data.tital = JSON.stringify(data.tital)
|
|
|
- console.log(data);
|
|
|
- // return
|
|
|
+ outList() {
|
|
|
+ let param = new FormData();
|
|
|
+ param.append("startDate", this.searchList[0].value ? this.$formatDate(this.searchList[0].value, "YYYY-MM") : '');
|
|
|
+ param.append("endDate", this.searchList[1].value ? this.$formatDate(this.searchList[1].value, "YYYY-MM") : '');
|
|
|
this.$http({
|
|
|
- url: "/market/cwcompetitor/excelExport",
|
|
|
+ url: '/market/antiSpoofing/exportStandingBook',
|
|
|
method: "post",
|
|
|
+ responseType: 'blob',
|
|
|
headers: {
|
|
|
"Content-Type": "application/json",
|
|
|
},
|
|
|
- responseType: "blob",
|
|
|
- data: data,
|
|
|
+ data: param,
|
|
|
}).then((response) => {
|
|
|
if (window.navigator && window.navigator.msSaveOrOpenBlob) {
|
|
|
let blob = new Blob([response.data], {
|
|
|
- type: 'application/vnd.ms-excel'
|
|
|
- })
|
|
|
- window.navigator.msSaveOrOpenBlob(blob,
|
|
|
- new Date().getTime() + '.xlsx')
|
|
|
+ type: response.data.type
|
|
|
+ });
|
|
|
+ window.navigator.msSaveOrOpenBlob(blob, '人员考核模板.xlsx');
|
|
|
} else {
|
|
|
/* 火狐谷歌的文件下载方式 */
|
|
|
var blob = new Blob([response.data])
|
|
|
var downloadElement = document.createElement('a')
|
|
|
- var href = window.URL.createObjectURL(blob)
|
|
|
- downloadElement.href = href
|
|
|
- downloadElement.download = new Date().getTime() + '.xlsx'
|
|
|
- document.body.appendChild(downloadElement)
|
|
|
- downloadElement.click()
|
|
|
- document.body.removeChild(downloadElement)
|
|
|
- window.URL.revokeObjectURL(href)
|
|
|
+ var href = window.URL.createObjectURL(blob);
|
|
|
+ downloadElement.href = href;
|
|
|
+ downloadElement.download = '人员考核模板.xlsx';
|
|
|
+ document.body.appendChild(downloadElement);
|
|
|
+ downloadElement.click();
|
|
|
+ document.body.removeChild(downloadElement);
|
|
|
+ window.URL.revokeObjectURL(href);
|
|
|
}
|
|
|
- });
|
|
|
+ })
|
|
|
},
|
|
|
+ getSummaries(param) {
|
|
|
+ const { columns, data } = param;
|
|
|
+ const sums = [];
|
|
|
+ columns.forEach((column, index) => {
|
|
|
+ if (index === 0) {
|
|
|
+ sums[index] = '总计';
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (index === 20){
|
|
|
+ sums[index] = 'N/A';
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ const values = data.map(item => Number(item[column.property]));
|
|
|
+ if (!values.every(value => isNaN(value))) {
|
|
|
+ sums[index] = values.reduce((prev, curr) => {
|
|
|
+ const value = Number(curr);
|
|
|
+ if (!isNaN(value)) {
|
|
|
+ return prev + curr;
|
|
|
+ } else {
|
|
|
+ return prev;
|
|
|
+ }
|
|
|
+ }, 0);
|
|
|
+ sums[index] += ' 元';
|
|
|
+ } else {
|
|
|
+ sums[index] = '0';
|
|
|
+ }
|
|
|
+ });
|
|
|
+ return sums;
|
|
|
+ }
|
|
|
},
|
|
|
mounted() {
|
|
|
- this.getList([this.searchList[0].value, this.searchList[1].value], 1);
|
|
|
+ this.searchInfo([this.searchList[0].value, this.searchList[1].value], 1);
|
|
|
+ },
|
|
|
+ updated() {
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.$refs.multipleTable.doLayout()
|
|
|
+ })
|
|
|
},
|
|
|
created() {
|
|
|
|