信用修复预警统计加上数量统计表格
This commit is contained in:
parent
d823dafea8
commit
4fb8bdd540
|
|
@ -216,3 +216,16 @@ export function exportqzzxList(data) {
|
|||
responseType: 'blob'
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 信用修复预警统计
|
||||
* @param data
|
||||
* @returns {AxiosPromise}
|
||||
*/
|
||||
export function repairTaskStatistic(data) {
|
||||
return request({
|
||||
url: '/task/repairTaskStatistic',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -99,7 +99,7 @@
|
|||
<span v-if="showMore" style="margin-right:20px;color:#409EFF;cursor:pointer" @click="showMoreCriteria">
|
||||
<i class="el-icon-d-arrow-left" />隐藏
|
||||
</span>
|
||||
<el-button size="mini" type="primary" @click="search" :loading="loading">查询</el-button>
|
||||
<el-button size="mini" type="primary" :loading="loading" @click="search">查询</el-button>
|
||||
<el-button size="mini" @click="searchForm.acceptno = '';searchForm.searchName='';searchForm.reportYear='';searchForm.busType='';searchForm.busStatus=''">
|
||||
重置
|
||||
</el-button>
|
||||
|
|
@ -110,11 +110,30 @@
|
|||
<!--body-查询结果-->
|
||||
<div class="content-body">
|
||||
<div class="body">
|
||||
<el-row>
|
||||
<el-col :span="24" :offset="1">
|
||||
<el-button type="primary" size="mini" @click="exportRepairTask">导出</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<!-- <el-row>-->
|
||||
<!-- <el-col :span="24" :offset="1">-->
|
||||
<!-- <el-button type="primary" size="mini" @click="exportRepairTask">导出</el-button>-->
|
||||
<!-- </el-col>-->
|
||||
<!-- </el-row>-->
|
||||
<div style="margin: 20px">
|
||||
<div class="table-title">信用修复未完结数量统计</div>
|
||||
<el-table
|
||||
ref="initialTable"
|
||||
:data="currentData"
|
||||
tooltip-effect="dark"
|
||||
style="width: 95%;margin:0 auto 20px auto"
|
||||
:fit="true"
|
||||
:header-cell-style="{background:'#8cc3fb',color:'#fff'}"
|
||||
>
|
||||
<el-table-column prop="index" label="序号" min-width="50" align="center" />
|
||||
<el-table-column prop="name" label="单位名称" min-width="120" align="center" />
|
||||
<el-table-column prop="outerCount" label="外网未完结数量" min-width="80" align="center" />
|
||||
<el-table-column prop="innerCount" label="内网未完结数量" min-width="80" align="center" />
|
||||
<el-table-column prop="total" label="总计未完结数量" min-width="80" align="center" />
|
||||
</el-table>
|
||||
</div>
|
||||
<div v-show="tableData.length > 0">
|
||||
<div class="table-title">信用修复预警名单</div>
|
||||
<el-table
|
||||
ref="multipleTable"
|
||||
v-loading="loading"
|
||||
|
|
@ -140,6 +159,7 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<div class="page-box">
|
||||
<el-pagination
|
||||
:disabled="loading"
|
||||
|
|
@ -164,8 +184,8 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import { repairTaskQuery, queryAllOrg } from '@/api/comprehensive'
|
||||
import {exportRepairTask} from "@/api/task";
|
||||
import { repairTaskQuery, queryAllOrg, repairTaskStatistic } from '@/api/comprehensive'
|
||||
import { exportRepairTask } from '@/api/task'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
|
|
@ -219,8 +239,19 @@ export default {
|
|||
mounted() {
|
||||
// 加载办理机关
|
||||
this.getOrgList()
|
||||
// 获取新表格的数据
|
||||
this.loadInitialTableData()
|
||||
// 可以先设置默认搜索条件或直接调用统计搜索
|
||||
this.searchStatistic()
|
||||
},
|
||||
methods: {
|
||||
// 获取初始表格数据的方法
|
||||
loadInitialTableData() {
|
||||
// 调用API获取初始表格数据
|
||||
// 示例:initialTableQuery().then(res => {
|
||||
// this.currentData = res.data
|
||||
// })
|
||||
},
|
||||
// 导出信用修复待办
|
||||
exportRepairTask() {
|
||||
this.loading = true
|
||||
|
|
@ -295,6 +326,7 @@ export default {
|
|||
return
|
||||
}
|
||||
this.pageParam.curPage = 1
|
||||
this.loadStatistic()
|
||||
this.loadPage()
|
||||
},
|
||||
// 分页多选插件回调
|
||||
|
|
@ -464,7 +496,51 @@ export default {
|
|||
break
|
||||
}
|
||||
}
|
||||
},
|
||||
// 搜索
|
||||
searchStatistic() {
|
||||
this.pageParam.customParamMap = this.searchForm
|
||||
// 判断是否填写了条件
|
||||
let flag = false
|
||||
// obj的遍历
|
||||
Object.keys(this.pageParam.customParamMap).forEach(key => {
|
||||
if (this.pageParam.customParamMap[key] !== '' && this.pageParam.customParamMap[key] !== null) {
|
||||
flag = true
|
||||
}
|
||||
})
|
||||
if (!flag) {
|
||||
this.$message({
|
||||
message: '请至少填写一个查询条件!',
|
||||
type: 'warning'
|
||||
})
|
||||
return
|
||||
}
|
||||
this.pageParam.curPage = 1
|
||||
this.loadStatistic()
|
||||
},
|
||||
// 加载统计
|
||||
loadStatistic() {
|
||||
repairTaskStatistic(this.pageParam).then(res => {
|
||||
// 将返回的数据转换为适合第一个表格的格式
|
||||
const convertedData = []
|
||||
if (Array.isArray(res.data)) {
|
||||
res.data.forEach((each, index) => {
|
||||
convertedData.push({
|
||||
index: index + 1,
|
||||
name: each.orgName || each.orgNumber || '',
|
||||
outerCount: each.outerCount || 0,
|
||||
innerCount: each.innerCount || 0,
|
||||
total: each.total || 0
|
||||
})
|
||||
})
|
||||
}
|
||||
this.$set(this, 'currentData', convertedData)
|
||||
|
||||
// 不修改 pageParam.total,保持第二个表格的总数不变
|
||||
// this.pageParam.total = res.data.total // 移除这一行
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
|
|||
Loading…
Reference in New Issue