mirror of
http://112.124.100.131/GFRS/ebiz-h5.git
synced 2025-12-18 10:56:43 +08:00
修改机构查询接口, 调整表格宽度, 调整查询数据时机
This commit is contained in:
@@ -27,3 +27,12 @@ export function getComPerformance(data) {
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 个险业绩排行优化: 机构查询
|
||||
export function getOrgList(data) {
|
||||
return request({
|
||||
url: getUrl('/data/performance/getBranchComList', 1),
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<van-tab title="下辖营业区"></van-tab>
|
||||
</van-tabs>
|
||||
<div class="table-wrapper">
|
||||
<table class="myTable mb30" cellspacing="0" cellpadding="0">
|
||||
<table class="myTable mb30" :style="widthObj" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<th class="sticky th-rank">排名</th>
|
||||
<th v-for="(column, index) in columns" :key="index" :class="{ fixedWidth: index === 0, orgName: index === 0 }">
|
||||
@@ -54,18 +54,20 @@ export default {
|
||||
computed: {
|
||||
// 获取需要显示的列名称
|
||||
columns() {
|
||||
this.widthObj.minWidth = '200vw'
|
||||
if (this.dataType === 0) {
|
||||
switch (this.timeType) {
|
||||
case 0:
|
||||
case 3:
|
||||
return this.tableColumns[this.dataType][0]
|
||||
return this.tableColumns[0][0]
|
||||
case 1:
|
||||
return this.tableColumns[this.dataType][1]
|
||||
return this.tableColumns[0][1]
|
||||
case 2:
|
||||
if (this.active <= 1) {
|
||||
return this.tableColumns[this.dataType][2]
|
||||
return this.tableColumns[0][2]
|
||||
} else {
|
||||
return this.tableColumns[this.dataType][3]
|
||||
this.widthObj.minWidth = '100%'
|
||||
return this.tableColumns[0][3]
|
||||
}
|
||||
default:
|
||||
return []
|
||||
@@ -84,6 +86,9 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
widthObj: {
|
||||
minWidth: '200vw'
|
||||
},
|
||||
active: 0,
|
||||
tableColumns: [
|
||||
[
|
||||
@@ -250,7 +255,6 @@ $white: #fff;
|
||||
|
||||
.myTable {
|
||||
text-align: center;
|
||||
min-width: 200vw;
|
||||
}
|
||||
|
||||
.myTable td,
|
||||
|
||||
@@ -92,7 +92,7 @@ import { Popup, Tab, Tabs, DatetimePicker, Picker, Toast } from 'vant'
|
||||
import Summarizing from './Summarizing.vue'
|
||||
import Organization from './Organization.vue'
|
||||
import dateUtil from '@/assets/js/utils/date-utils.js'
|
||||
import { getComPerformance, getComList } from '@/api/ebiz/branchOffice/branchOffice'
|
||||
import { getComPerformance, getOrgList } from '@/api/ebiz/branchOffice/branchOffice'
|
||||
|
||||
// 当前时间
|
||||
const currentDate = new Date()
|
||||
@@ -152,7 +152,7 @@ export default {
|
||||
OrgLv3Code: 0,
|
||||
OrgLv3s: [],
|
||||
areaCode: 0,
|
||||
areaObjs: [],
|
||||
OrgLv4s: [],
|
||||
years: [],
|
||||
params: {
|
||||
// 86: 全国
|
||||
@@ -199,7 +199,7 @@ export default {
|
||||
},
|
||||
area() {
|
||||
const area = ['全部']
|
||||
this.areaObjs.forEach(item => {
|
||||
this.OrgLv4s.forEach(item => {
|
||||
if (item.upBranchCode === this.OrgLv3Code) {
|
||||
area.push(item.name)
|
||||
}
|
||||
@@ -268,7 +268,8 @@ export default {
|
||||
* 查询机构下拉列表
|
||||
* manageCode, manageLv传空查全国所有二级机构
|
||||
**/
|
||||
const res = await getComList({
|
||||
console.log('getOrgList :>> ', getOrgList)
|
||||
const res = await getOrgList({
|
||||
bussinessType: 'normal',
|
||||
manageCode: '',
|
||||
manageLv: ''
|
||||
@@ -343,11 +344,12 @@ export default {
|
||||
this.OrgLv4Name = '全部'
|
||||
this.OrgLv3Name = '全部'
|
||||
// 查询三级机构
|
||||
const res = await getComList({
|
||||
const res = await getOrgList({
|
||||
bussinessType: 'normal',
|
||||
manageCode: this.OrgLv2Code,
|
||||
manageLv: '02'
|
||||
})
|
||||
this.OrgLv3s.splice(0)
|
||||
this.OrgLv3s.push(...res.content)
|
||||
this.setRankData()
|
||||
},
|
||||
@@ -367,19 +369,20 @@ export default {
|
||||
}
|
||||
this.OrgLv3Name = '全部'
|
||||
// 查询四级机构
|
||||
const res = await getComList({
|
||||
const res = await getOrgList({
|
||||
bussinessType: 'normal',
|
||||
manageCode: this.OrgLv3Code,
|
||||
manageLv: '03'
|
||||
})
|
||||
this.areaObjs.push(...res.content)
|
||||
this.OrgLv4s.splice(0)
|
||||
this.OrgLv4s.push(...res.content)
|
||||
this.setRankData()
|
||||
},
|
||||
// 筛选四级机构
|
||||
async onOrgLv4ConditionConfirm(data) {
|
||||
this.isOrgLv4ConditionShow = false
|
||||
this.OrgLv3Name = data
|
||||
let area = this.areaObjs.find(item => item.name === data)
|
||||
let area = this.OrgLv4s.find(item => item.name === data)
|
||||
if (area) {
|
||||
this.areaCode = area.code
|
||||
this.params.manageCode = this.areaCode
|
||||
@@ -470,6 +473,7 @@ export default {
|
||||
// nv = 0 查询汇总
|
||||
if (nv === 0) {
|
||||
this.params.type = 'all'
|
||||
this.setRankData()
|
||||
} else {
|
||||
switch (this.typeIndex) {
|
||||
case 0:
|
||||
|
||||
Reference in New Issue
Block a user