数据对接
Showing
5 changed files
with
171 additions
and
60 deletions
| ... | @@ -5,13 +5,13 @@ import request from '@/utils/request' | ... | @@ -5,13 +5,13 @@ import request from '@/utils/request' |
| 5 | * @returns {*} | 5 | * @returns {*} |
| 6 | */ | 6 | */ |
| 7 | export function getYS001() { | 7 | export function getYS001() { |
| 8 | return request({ | 8 | return request({ |
| 9 | method: 'post', | 9 | method: 'post', |
| 10 | data: { | 10 | data: { |
| 11 | 'INTERFACEID': 'YS001', | 11 | 'INTERFACEID': 'YS001', |
| 12 | 'USERCONTEXT': 'a6c49439-f01c-0292-1757-30563fb41c77' | 12 | 'USERCONTEXT': 'a6c49439-f01c-0292-1757-30563fb41c77' |
| 13 | } | 13 | } |
| 14 | }) | 14 | }) |
| 15 | } | 15 | } |
| 16 | 16 | ||
| 17 | /** | 17 | /** |
| ... | @@ -19,13 +19,13 @@ export function getYS001() { | ... | @@ -19,13 +19,13 @@ export function getYS001() { |
| 19 | * @returns {*} | 19 | * @returns {*} |
| 20 | */ | 20 | */ |
| 21 | export function getYS002() { | 21 | export function getYS002() { |
| 22 | return request({ | 22 | return request({ |
| 23 | method: 'post', | 23 | method: 'post', |
| 24 | data: { | 24 | data: { |
| 25 | 'INTERFACEID': 'YS002', | 25 | 'INTERFACEID': 'YS002', |
| 26 | 'USERCONTEXT': 'a6c49439-f01c-0292-1757-30563fb41c77' | 26 | 'USERCONTEXT': 'a6c49439-f01c-0292-1757-30563fb41c77' |
| 27 | } | 27 | } |
| 28 | }) | 28 | }) |
| 29 | } | 29 | } |
| 30 | 30 | ||
| 31 | /** | 31 | /** |
| ... | @@ -33,13 +33,13 @@ export function getYS002() { | ... | @@ -33,13 +33,13 @@ export function getYS002() { |
| 33 | * @returns {*} | 33 | * @returns {*} |
| 34 | */ | 34 | */ |
| 35 | export function getYS003() { | 35 | export function getYS003() { |
| 36 | return request({ | 36 | return request({ |
| 37 | method: 'post', | 37 | method: 'post', |
| 38 | data: { | 38 | data: { |
| 39 | 'INTERFACEID': 'YS003', | 39 | 'INTERFACEID': 'YS003', |
| 40 | 'USERCONTEXT': 'a6c49439-f01c-0292-1757-30563fb41c77' | 40 | 'USERCONTEXT': 'a6c49439-f01c-0292-1757-30563fb41c77' |
| 41 | } | 41 | } |
| 42 | }) | 42 | }) |
| 43 | } | 43 | } |
| 44 | 44 | ||
| 45 | /** | 45 | /** |
| ... | @@ -47,13 +47,13 @@ export function getYS003() { | ... | @@ -47,13 +47,13 @@ export function getYS003() { |
| 47 | * @returns {*} | 47 | * @returns {*} |
| 48 | */ | 48 | */ |
| 49 | export function getYS004() { | 49 | export function getYS004() { |
| 50 | return request({ | 50 | return request({ |
| 51 | method: 'post', | 51 | method: 'post', |
| 52 | data: { | 52 | data: { |
| 53 | 'INTERFACEID': 'YS004', | 53 | 'INTERFACEID': 'YS004', |
| 54 | 'USERCONTEXT': 'a6c49439-f01c-0292-1757-30563fb41c77' | 54 | 'USERCONTEXT': 'a6c49439-f01c-0292-1757-30563fb41c77' |
| 55 | } | 55 | } |
| 56 | }) | 56 | }) |
| 57 | } | 57 | } |
| 58 | 58 | ||
| 59 | /** | 59 | /** |
| ... | @@ -61,11 +61,68 @@ export function getYS004() { | ... | @@ -61,11 +61,68 @@ export function getYS004() { |
| 61 | * @returns {*} | 61 | * @returns {*} |
| 62 | */ | 62 | */ |
| 63 | export function getYS005() { | 63 | export function getYS005() { |
| 64 | return request({ | 64 | return request({ |
| 65 | method: 'post', | 65 | method: 'post', |
| 66 | data: { | 66 | data: { |
| 67 | 'INTERFACEID': 'YS005', | 67 | 'INTERFACEID': 'YS005', |
| 68 | 'USERCONTEXT': 'a6c49439-f01c-0292-1757-30563fb41c77' | 68 | 'USERCONTEXT': 'a6c49439-f01c-0292-1757-30563fb41c77' |
| 69 | } | 69 | } |
| 70 | }) | 70 | }) |
| 71 | } | ||
| 72 | |||
| 73 | /** | ||
| 74 | * 左侧 应收账款 | ||
| 75 | * @returns {*} | ||
| 76 | */ | ||
| 77 | export function getYS006() { | ||
| 78 | return request({ | ||
| 79 | method: 'post', | ||
| 80 | data: { | ||
| 81 | 'INTERFACEID': 'YS006', | ||
| 82 | 'USERCONTEXT': 'a6c49439-f01c-0292-1757-30563fb41c77' | ||
| 83 | } | ||
| 84 | }) | ||
| 85 | } | ||
| 86 | |||
| 87 | /** | ||
| 88 | * 右侧 开票计划与执行 | ||
| 89 | * @returns {*} | ||
| 90 | */ | ||
| 91 | export function getYS007() { | ||
| 92 | return request({ | ||
| 93 | method: 'post', | ||
| 94 | data: { | ||
| 95 | 'INTERFACEID': 'YS007', | ||
| 96 | 'USERCONTEXT': 'a6c49439-f01c-0292-1757-30563fb41c77' | ||
| 97 | } | ||
| 98 | }) | ||
| 99 | } | ||
| 100 | |||
| 101 | |||
| 102 | /** | ||
| 103 | * 右侧 回款 | ||
| 104 | * @returns {*} | ||
| 105 | */ | ||
| 106 | export function getYS008() { | ||
| 107 | return request({ | ||
| 108 | method: 'post', | ||
| 109 | data: { | ||
| 110 | 'INTERFACEID': 'YS008', | ||
| 111 | 'USERCONTEXT': 'a6c49439-f01c-0292-1757-30563fb41c77' | ||
| 112 | } | ||
| 113 | }) | ||
| 114 | } | ||
| 115 | |||
| 116 | /** | ||
| 117 | * 右侧 右侧模块-逾期360天以上未开票 | ||
| 118 | * @returns {*} | ||
| 119 | */ | ||
| 120 | export function getYS009() { | ||
| 121 | return request({ | ||
| 122 | method: 'post', | ||
| 123 | data: { | ||
| 124 | 'INTERFACEID': 'YS009', | ||
| 125 | 'USERCONTEXT': 'a6c49439-f01c-0292-1757-30563fb41c77' | ||
| 126 | } | ||
| 127 | }) | ||
| 71 | } | 128 | } | ... | ... |
| ... | @@ -108,7 +108,9 @@ const bing1 = ref(null) | ... | @@ -108,7 +108,9 @@ const bing1 = ref(null) |
| 108 | const bing2 = ref(null) | 108 | const bing2 = ref(null) |
| 109 | const bing3 = ref(null) | 109 | const bing3 = ref(null) |
| 110 | const textRef = ref(null) | 110 | const textRef = ref(null) |
| 111 | const form = ref({}) | 111 | const form = ref({ |
| 112 | leaderinfo: [] | ||
| 113 | }) | ||
| 112 | 114 | ||
| 113 | const resYear1 = ref() | 115 | const resYear1 = ref() |
| 114 | const resYear2 = ref() | 116 | const resYear2 = ref() |
| ... | @@ -182,8 +184,6 @@ async function handelGetYS004() { | ... | @@ -182,8 +184,6 @@ async function handelGetYS004() { |
| 182 | async function handelGetYS005() { | 184 | async function handelGetYS005() { |
| 183 | const res = await getYS005() | 185 | const res = await getYS005() |
| 184 | form.value = res.data | 186 | form.value = res.data |
| 185 | console.log(res) | ||
| 186 | |||
| 187 | } | 187 | } |
| 188 | 188 | ||
| 189 | const init = () => { | 189 | const init = () => { | ... | ... |
| ... | @@ -18,8 +18,7 @@ | ... | @@ -18,8 +18,7 @@ |
| 18 | </el-select> | 18 | </el-select> |
| 19 | </div> | 19 | </div> |
| 20 | <div class="itemBox"> | 20 | <div class="itemBox"> |
| 21 | <el-select v-model="queryParams.select2" class="select" placeholder="数据因素(可多选)" | 21 | <el-select v-model="queryParams.select2" class="select" placeholder="数据因素(可多选)" size="small"> |
| 22 | size="small"> | ||
| 23 | <el-option label="数据因素(可多选)" value="month"/> | 22 | <el-option label="数据因素(可多选)" value="month"/> |
| 24 | </el-select> | 23 | </el-select> |
| 25 | </div> | 24 | </div> |
| ... | @@ -71,6 +70,8 @@ import {onMounted, ref, onUnmounted} from 'vue' | ... | @@ -71,6 +70,8 @@ import {onMounted, ref, onUnmounted} from 'vue' |
| 71 | import {autoToolTip} from "@/plugins/auto-toolTip"; | 70 | import {autoToolTip} from "@/plugins/auto-toolTip"; |
| 72 | import * as echarts from "echarts"; | 71 | import * as echarts from "echarts"; |
| 73 | import * as api from "@/apiPc/common" | 72 | import * as api from "@/apiPc/common" |
| 73 | import {getYS006} from '@/api/server.js' | ||
| 74 | |||
| 74 | 75 | ||
| 75 | const queryParams = ref({ | 76 | const queryParams = ref({ |
| 76 | select: null, | 77 | select: null, |
| ... | @@ -83,6 +84,18 @@ const kindList = ref([]) | ... | @@ -83,6 +84,18 @@ const kindList = ref([]) |
| 83 | const dataA = ref([]) | 84 | const dataA = ref([]) |
| 84 | const radioA = ref('month') | 85 | const radioA = ref('month') |
| 85 | const radioB = ref('month') | 86 | const radioB = ref('month') |
| 87 | |||
| 88 | const list = ref([]) | ||
| 89 | const set1 = ref([]) | ||
| 90 | const arr1 = ref([]) | ||
| 91 | const arr2 = ref([]) | ||
| 92 | const arr3 = ref([]) | ||
| 93 | const arr4 = ref([]) | ||
| 94 | |||
| 95 | const h1 = ref([]) | ||
| 96 | const h2 = ref([]) | ||
| 97 | const h3 = ref([]) | ||
| 98 | |||
| 86 | let chartA | 99 | let chartA |
| 87 | let chartB | 100 | let chartB |
| 88 | let chartC | 101 | let chartC |
| ... | @@ -92,11 +105,47 @@ let intervalA = null; | ... | @@ -92,11 +105,47 @@ let intervalA = null; |
| 92 | onMounted(() => { | 105 | onMounted(() => { |
| 93 | // init() | 106 | // init() |
| 94 | window.addEventListener('resize', handleResize); | 107 | window.addEventListener('resize', handleResize); |
| 95 | setA() | 108 | handelGetYS006() |
| 109 | // setA() | ||
| 96 | setB() | 110 | setB() |
| 97 | setC() | 111 | // setC() |
| 98 | }) | 112 | }) |
| 99 | 113 | ||
| 114 | async function handelGetYS006() { | ||
| 115 | const res = await getYS006() | ||
| 116 | list.value = res.data.baselist | ||
| 117 | set1.value = [] | ||
| 118 | arr1.value = [] | ||
| 119 | arr2.value = [] | ||
| 120 | arr3.value = [] | ||
| 121 | arr4.value = [] | ||
| 122 | h1.value = [] | ||
| 123 | h2.value = [] | ||
| 124 | h3.value = [] | ||
| 125 | for (const val of list.value) { | ||
| 126 | set1.value.push({ | ||
| 127 | value: val.TOTAL, | ||
| 128 | name: val.BASE | ||
| 129 | }) | ||
| 130 | arr1.value.push(val.YSBALANCE) | ||
| 131 | arr2.value.push(val.LASTTOTAL) | ||
| 132 | arr3.value.push(val.TOTAL) | ||
| 133 | arr4.value.push(val.LASTTOTAL) | ||
| 134 | h1.value.push(val.YSDSK) | ||
| 135 | h2.value.push(val.SFDDQ) | ||
| 136 | h3.value.push(val.HTDQ) | ||
| 137 | } | ||
| 138 | |||
| 139 | |||
| 140 | setA(set1.value) | ||
| 141 | setC(h1.value, h2.value, h3.value) | ||
| 142 | // resYear1.value = res.data.yeargroup | ||
| 143 | // handelBing1(res.data.yeargroup[0], res.data.yeargroup[1]) | ||
| 144 | // handelZhu1(res.data.yeargroup[0], res.data.yeargroup[1]) | ||
| 145 | // activeName1.value = res.data.yeargroup[1].YEAR | ||
| 146 | } | ||
| 147 | |||
| 148 | |||
| 100 | const init = () => { | 149 | const init = () => { |
| 101 | if (!intervalA) { | 150 | if (!intervalA) { |
| 102 | getdata() | 151 | getdata() |
| ... | @@ -138,7 +187,7 @@ const getBdata = () => { | ... | @@ -138,7 +187,7 @@ const getBdata = () => { |
| 138 | }) | 187 | }) |
| 139 | } | 188 | } |
| 140 | 189 | ||
| 141 | const setA = () => { | 190 | const setA = (arr) => { |
| 142 | chartA = echarts.init(zhuRef.value) | 191 | chartA = echarts.init(zhuRef.value) |
| 143 | const option = { | 192 | const option = { |
| 144 | tooltip: { | 193 | tooltip: { |
| ... | @@ -161,8 +210,9 @@ const setA = () => { | ... | @@ -161,8 +210,9 @@ const setA = () => { |
| 161 | } | 210 | } |
| 162 | } | 211 | } |
| 163 | // 计算百分比 | 212 | // 计算百分比 |
| 164 | let percentage = ((value / option.series[2].data.reduce((a, b) => a + b.value, 0)) * 100).toFixed(2) + '%'; | 213 | let num1 = ((value / option.series[2].data.reduce((a, b) => a + b.value, 0)) * 100).toFixed(2); |
| 165 | return name + ' ' + percentage; | 214 | let num2 = num1 > 0 ? num1 + '%' : 0 + '%' |
| 215 | return name + ' ' + num2; | ||
| 166 | }, | 216 | }, |
| 167 | }, | 217 | }, |
| 168 | series: [ | 218 | series: [ |
| ... | @@ -238,16 +288,17 @@ const setA = () => { | ... | @@ -238,16 +288,17 @@ const setA = () => { |
| 238 | labelLine: { | 288 | labelLine: { |
| 239 | show: false | 289 | show: false |
| 240 | }, | 290 | }, |
| 241 | data: [ | 291 | // data: [ |
| 242 | {value: 1048, name: '山西'}, | 292 | // {value: 1048, name: '山西'}, |
| 243 | {value: 735, name: '深圳'}, | 293 | // {value: 735, name: '深圳'}, |
| 244 | {value: 580, name: '上海'}, | 294 | // {value: 580, name: '上海'}, |
| 245 | {value: 484, name: '海南'}, | 295 | // {value: 484, name: '海南'}, |
| 246 | {value: 484, name: '郑州'}, | 296 | // {value: 484, name: '郑州'}, |
| 247 | {value: 484, name: '合肥'}, | 297 | // {value: 484, name: '合肥'}, |
| 248 | {value: 484, name: '武汉'}, | 298 | // {value: 484, name: '武汉'}, |
| 249 | {value: 300, name: '新疆'} | 299 | // {value: 300, name: '新疆'} |
| 250 | ], | 300 | // ], |
| 301 | data: arr, | ||
| 251 | } | 302 | } |
| 252 | ] | 303 | ] |
| 253 | }; | 304 | }; |
| ... | @@ -400,7 +451,7 @@ const setB = () => { | ... | @@ -400,7 +451,7 @@ const setB = () => { |
| 400 | chartB.setOption(option) | 451 | chartB.setOption(option) |
| 401 | autoHover(chartB, option, 0, 2000) | 452 | autoHover(chartB, option, 0, 2000) |
| 402 | } | 453 | } |
| 403 | const setC = () => { | 454 | const setC = (h1, h2, h3) => { |
| 404 | chartC = echarts.init(payeeRef.value) | 455 | chartC = echarts.init(payeeRef.value) |
| 405 | const option = { | 456 | const option = { |
| 406 | tooltip: { | 457 | tooltip: { |
| ... | @@ -461,7 +512,8 @@ const setC = () => { | ... | @@ -461,7 +512,8 @@ const setC = () => { |
| 461 | emphasis: { | 512 | emphasis: { |
| 462 | focus: 'series' | 513 | focus: 'series' |
| 463 | }, | 514 | }, |
| 464 | data: [320, 332, 301, 334, 390, 330, 320, 320, 332, 301, 334, 390], | 515 | // data: [320, 332, 301, 334, 390, 330, 320, 320, 332, 301, 334, 390], |
| 516 | data: h1, | ||
| 465 | itemStyle: { | 517 | itemStyle: { |
| 466 | color: { | 518 | color: { |
| 467 | type: 'linear', | 519 | type: 'linear', |
| ... | @@ -481,7 +533,8 @@ const setC = () => { | ... | @@ -481,7 +533,8 @@ const setC = () => { |
| 481 | emphasis: { | 533 | emphasis: { |
| 482 | focus: 'series' | 534 | focus: 'series' |
| 483 | }, | 535 | }, |
| 484 | data: [120, 132, 101, 134, 90, 230, 210, 101, 134, 90, 230, 210], | 536 | // data: [120, 132, 101, 134, 90, 230, 210, 101, 134, 90, 230, 210], |
| 537 | data: h2, | ||
| 485 | itemStyle: { | 538 | itemStyle: { |
| 486 | color: { | 539 | color: { |
| 487 | type: 'linear', | 540 | type: 'linear', |
| ... | @@ -501,7 +554,8 @@ const setC = () => { | ... | @@ -501,7 +554,8 @@ const setC = () => { |
| 501 | emphasis: { | 554 | emphasis: { |
| 502 | focus: 'series' | 555 | focus: 'series' |
| 503 | }, | 556 | }, |
| 504 | data: [220, 182, 191, 234, 290, 330, 310, 220, 182, 191, 234, 290,], | 557 | // data: [220, 182, 191, 234, 290, 330, 310, 220, 182, 191, 234, 290,], |
| 558 | data: h3, | ||
| 505 | itemStyle: { | 559 | itemStyle: { |
| 506 | color: { | 560 | color: { |
| 507 | type: 'linear', | 561 | type: 'linear', | ... | ... |
This diff is collapsed.
Click to expand it.
| ... | @@ -30,7 +30,7 @@ const props = defineProps({ | ... | @@ -30,7 +30,7 @@ const props = defineProps({ |
| 30 | } | 30 | } |
| 31 | }); | 31 | }); |
| 32 | 32 | ||
| 33 | const dataList = ref([...props.data]); | 33 | const dataList = ref([...props.data] || []); |
| 34 | const offset = ref(0); | 34 | const offset = ref(0); |
| 35 | const scrollInterval = ref(null); | 35 | const scrollInterval = ref(null); |
| 36 | const isPaused = ref(false); | 36 | const isPaused = ref(false); | ... | ... |
-
Please register or sign in to post a comment