|
|
@@ -117,6 +117,8 @@
|
|
|
<!-- 操作按钮区域 -->
|
|
|
<div class="table-operator">
|
|
|
<a-button type="primary" icon="download" @click="handleExportXls('入网统计')">导出</a-button>
|
|
|
+ <a-button type="primary" icon="download" v-has="'userStatistic:excel'" @click="excelOut()">导出</a-button>
|
|
|
+ <a-button type="primary" icon="download" v-has="'userStatistic:excelUp'" @click="handleExportXls('入网统计')">导出并上报</a-button>
|
|
|
<!-- 高级查询区域 -->
|
|
|
<a-dropdown v-if="selectedRowKeys.length > 0">
|
|
|
<a-menu slot="overlay">
|
|
|
@@ -199,7 +201,7 @@
|
|
|
|
|
|
</template>
|
|
|
<template v-slot:status="text, record">
|
|
|
- <a-badge :status="text | statusEscalation" :text="text | escalationFilter"/>
|
|
|
+ <a-badge :color="text | statusEscalationColor" :text="text | escalationFilter"/>
|
|
|
</template>
|
|
|
<template v-slot:createBy="text, record">
|
|
|
<a @click="showByCreateBy(record)">{{text}}</a>
|
|
|
@@ -240,7 +242,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import {getAction, postAction,deleteAction} from "@api/manage";
|
|
|
+import { getAction, postAction, deleteAction, downFile } from '@api/manage'
|
|
|
import {JeecgListMixin} from '@/mixins/JeecgListMixin'
|
|
|
import '@/assets/less/TableExpand.less'
|
|
|
|
|
|
@@ -250,7 +252,7 @@ export default {
|
|
|
inject: ['closeCurrent'],
|
|
|
data() {
|
|
|
return {
|
|
|
-
|
|
|
+ excelName:'入网统计',
|
|
|
optionsWithDisabled:
|
|
|
[{
|
|
|
text: '非高危',
|
|
|
@@ -285,7 +287,7 @@ export default {
|
|
|
showSizeChanger: true,
|
|
|
total: 0
|
|
|
},
|
|
|
- numberResults: null,
|
|
|
+ numberResults: [],
|
|
|
/**统计标签*/
|
|
|
currentTab: 'all',
|
|
|
tabAll: '全部(0)',
|
|
|
@@ -318,14 +320,14 @@ export default {
|
|
|
* 入网用户统计:身份证号/姓名/办理电话/创建人/创建人所属营业厅/更新人/更新人营业厅/研判结果/
|
|
|
* */
|
|
|
columns: [
|
|
|
- {
|
|
|
- title: '#',
|
|
|
- dataIndex: '',
|
|
|
- key: 'rowIndex',
|
|
|
- width: 60,
|
|
|
- align: "center",
|
|
|
- scopedSlots: {customRender: 'rowIndex'}
|
|
|
- },
|
|
|
+ // {
|
|
|
+ // title: '#',
|
|
|
+ // dataIndex: '',
|
|
|
+ // key: 'rowIndex',
|
|
|
+ // width: 60,
|
|
|
+ // align: "center",
|
|
|
+ // scopedSlots: {customRender: 'rowIndex'}
|
|
|
+ // },
|
|
|
{
|
|
|
title: '证件编号',
|
|
|
align: "center",
|
|
|
@@ -540,6 +542,14 @@ export default {
|
|
|
}
|
|
|
return statusTypeMap[type]
|
|
|
},
|
|
|
+ statusEscalationColor(type) {
|
|
|
+ const statusTypeMap = {
|
|
|
+ '1': 'green',
|
|
|
+ '0': 'gray',
|
|
|
+ }
|
|
|
+ console.log(statusTypeMap[type])
|
|
|
+ return statusTypeMap[type]
|
|
|
+ },
|
|
|
escalationFilter(status) {
|
|
|
const statusMap = {
|
|
|
'0': '未上报',
|
|
|
@@ -556,32 +566,74 @@ export default {
|
|
|
|
|
|
},
|
|
|
methods: {
|
|
|
- getSysCompanyData(){
|
|
|
- let data = {
|
|
|
|
|
|
- };
|
|
|
- getAction(this.url.getCompany, data).then((res) => {
|
|
|
- if (res.success) {
|
|
|
- let result = res.result;
|
|
|
- console.log(result + "result");
|
|
|
- if (result != null) {
|
|
|
- this.sysCompany = result;
|
|
|
- }
|
|
|
+ excelOut(){
|
|
|
+ if (this.queryParam.numberResults!==undefined&&this.queryParam.numberResults!==null && this.queryParam.numberResults.length===1){
|
|
|
+ if (this.queryParam.numberResults[0]==="3"){
|
|
|
+ this.handleExportXlsData('上报紫名单','4')
|
|
|
+ this.handleExportXlsData('上报蓝名单','3')
|
|
|
}
|
|
|
- })
|
|
|
+ }else {
|
|
|
+ this.handleExportXls(this.excelName)
|
|
|
+ }
|
|
|
},
|
|
|
- getSysCompany(id) {
|
|
|
-
|
|
|
- for (var item of this.sysCompany) {
|
|
|
-
|
|
|
- for (var it of item.sysBusinessHallList) {
|
|
|
- if (it.id === id) {
|
|
|
- return it.name
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
+ handleExportXlsData(fileName,num){
|
|
|
+ if(!fileName || typeof fileName != "string"){
|
|
|
+ fileName = "导出文件"
|
|
|
+ }
|
|
|
+ let param = this.getQueryParams();
|
|
|
+ param.numberResults=[];
|
|
|
+ param.numberResults[0]=num;
|
|
|
+ if(this.selectedRowKeys && this.selectedRowKeys.length>0){
|
|
|
+ param['selections'] = this.selectedRowKeys.join(",")
|
|
|
}
|
|
|
+ console.log("导出参数",param)
|
|
|
+ downFile(this.url.exportXlsUrl,param).then((data)=>{
|
|
|
+ if (!data) {
|
|
|
+ this.$message.warning("文件下载失败")
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (typeof window.navigator.msSaveBlob !== 'undefined') {
|
|
|
+ window.navigator.msSaveBlob(new Blob([data],{type: 'application/vnd.ms-excel'}), fileName+'.xls')
|
|
|
+ }else{
|
|
|
+ let url = window.URL.createObjectURL(new Blob([data],{type: 'application/vnd.ms-excel'}))
|
|
|
+ let link = document.createElement('a')
|
|
|
+ link.style.display = 'none'
|
|
|
+ link.href = url
|
|
|
+ link.setAttribute('download', fileName+'.xls')
|
|
|
+ document.body.appendChild(link)
|
|
|
+ link.click()
|
|
|
+ document.body.removeChild(link); //下载完成移除元素
|
|
|
+ window.URL.revokeObjectURL(url); //释放掉blob对象
|
|
|
+ }
|
|
|
+ })
|
|
|
},
|
|
|
+ // getSysCompanyData(){
|
|
|
+ // let data = {
|
|
|
+ //
|
|
|
+ // };
|
|
|
+ // getAction(this.url.getCompany, data).then((res) => {
|
|
|
+ // if (res.success) {
|
|
|
+ // let result = res.result;
|
|
|
+ // console.log(result + "result");
|
|
|
+ // if (result != null) {
|
|
|
+ // this.sysCompany = result;
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+ // },
|
|
|
+ // getSysCompany(id) {
|
|
|
+ //
|
|
|
+ // for (var item of this.sysCompany) {
|
|
|
+ //
|
|
|
+ // for (var it of item.sysBusinessHallList) {
|
|
|
+ // if (it.id === id) {
|
|
|
+ // return it.name
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ //
|
|
|
+ // }
|
|
|
+ // },
|
|
|
|
|
|
|
|
|
newPhone(newPhones){
|
|
|
@@ -638,7 +690,7 @@ export default {
|
|
|
// }
|
|
|
// })
|
|
|
//this.$router.push({path: '/networkAccess/registrationSelect', query: {id: record.id,cardNo: record.cardNo,isDisabled:true}});
|
|
|
- this.$router.push({path: '/networkAccess/registrationSelect', query: {id: record.id,isDisabled:true}});
|
|
|
+ this.$router.push({path: '/networkAccess/registrationSelect', query: {id: record.id}});
|
|
|
},
|
|
|
showByCardName(record){
|
|
|
this.selectRefresh();
|