看板
Showing
4 changed files
with
91 additions
and
35 deletions
| 1 | import request from '@/utils/request' | 1 | import request from '@/utils/request' |
| 2 | 2 | ||
| 3 | const urlCopy = new URL(window.location.href); | ||
| 4 | const params = new URLSearchParams(urlCopy.search); | ||
| 5 | const sidValue = params.get('sid'); | ||
| 6 | console.log(sidValue) | ||
| 7 | |||
| 8 | let url = '5342b777-d86a-4967-a18b-7329a3fca56b' | ||
| 9 | |||
| 10 | |||
| 3 | /** | 11 | /** |
| 4 | * 用户信息 | 12 | * 用户信息 |
| 5 | * @returns {*} | 13 | * @returns {*} |
| ... | @@ -9,7 +17,7 @@ export function getYS000() { | ... | @@ -9,7 +17,7 @@ export function getYS000() { |
| 9 | method: 'post', | 17 | method: 'post', |
| 10 | data: { | 18 | data: { |
| 11 | 'INTERFACEID': 'YS000', | 19 | 'INTERFACEID': 'YS000', |
| 12 | 'USERCONTEXT': '5342b777-d86a-4967-a18b-7329a3fca56b' | 20 | 'USERCONTEXT': url |
| 13 | } | 21 | } |
| 14 | }) | 22 | }) |
| 15 | } | 23 | } |
| ... | @@ -24,7 +32,7 @@ export function getYS001() { | ... | @@ -24,7 +32,7 @@ export function getYS001() { |
| 24 | method: 'post', | 32 | method: 'post', |
| 25 | data: { | 33 | data: { |
| 26 | 'INTERFACEID': 'YS001', | 34 | 'INTERFACEID': 'YS001', |
| 27 | 'USERCONTEXT': 'a6c49439-f01c-0292-1757-30563fb41c77' | 35 | 'USERCONTEXT': url |
| 28 | } | 36 | } |
| 29 | }) | 37 | }) |
| 30 | } | 38 | } |
| ... | @@ -38,7 +46,7 @@ export function getYS002() { | ... | @@ -38,7 +46,7 @@ export function getYS002() { |
| 38 | method: 'post', | 46 | method: 'post', |
| 39 | data: { | 47 | data: { |
| 40 | 'INTERFACEID': 'YS002', | 48 | 'INTERFACEID': 'YS002', |
| 41 | 'USERCONTEXT': 'a6c49439-f01c-0292-1757-30563fb41c77' | 49 | 'USERCONTEXT': url |
| 42 | } | 50 | } |
| 43 | }) | 51 | }) |
| 44 | } | 52 | } |
| ... | @@ -52,7 +60,7 @@ export function getYS003() { | ... | @@ -52,7 +60,7 @@ export function getYS003() { |
| 52 | method: 'post', | 60 | method: 'post', |
| 53 | data: { | 61 | data: { |
| 54 | 'INTERFACEID': 'YS003', | 62 | 'INTERFACEID': 'YS003', |
| 55 | 'USERCONTEXT': 'a6c49439-f01c-0292-1757-30563fb41c77' | 63 | 'USERCONTEXT': url |
| 56 | } | 64 | } |
| 57 | }) | 65 | }) |
| 58 | } | 66 | } |
| ... | @@ -66,7 +74,7 @@ export function getYS004() { | ... | @@ -66,7 +74,7 @@ export function getYS004() { |
| 66 | method: 'post', | 74 | method: 'post', |
| 67 | data: { | 75 | data: { |
| 68 | 'INTERFACEID': 'YS004', | 76 | 'INTERFACEID': 'YS004', |
| 69 | 'USERCONTEXT': 'a6c49439-f01c-0292-1757-30563fb41c77' | 77 | 'USERCONTEXT': url |
| 70 | } | 78 | } |
| 71 | }) | 79 | }) |
| 72 | } | 80 | } |
| ... | @@ -80,7 +88,7 @@ export function getYS005() { | ... | @@ -80,7 +88,7 @@ export function getYS005() { |
| 80 | method: 'post', | 88 | method: 'post', |
| 81 | data: { | 89 | data: { |
| 82 | 'INTERFACEID': 'YS005', | 90 | 'INTERFACEID': 'YS005', |
| 83 | 'USERCONTEXT': 'a6c49439-f01c-0292-1757-30563fb41c77' | 91 | 'USERCONTEXT': url |
| 84 | } | 92 | } |
| 85 | }) | 93 | }) |
| 86 | } | 94 | } |
| ... | @@ -94,7 +102,7 @@ export function getYS006() { | ... | @@ -94,7 +102,7 @@ export function getYS006() { |
| 94 | method: 'post', | 102 | method: 'post', |
| 95 | data: { | 103 | data: { |
| 96 | 'INTERFACEID': 'YS006', | 104 | 'INTERFACEID': 'YS006', |
| 97 | 'USERCONTEXT': 'a6c49439-f01c-0292-1757-30563fb41c77' | 105 | 'USERCONTEXT': url |
| 98 | } | 106 | } |
| 99 | }) | 107 | }) |
| 100 | } | 108 | } |
| ... | @@ -108,7 +116,7 @@ export function getYS007() { | ... | @@ -108,7 +116,7 @@ export function getYS007() { |
| 108 | method: 'post', | 116 | method: 'post', |
| 109 | data: { | 117 | data: { |
| 110 | 'INTERFACEID': 'YS007', | 118 | 'INTERFACEID': 'YS007', |
| 111 | 'USERCONTEXT': 'a6c49439-f01c-0292-1757-30563fb41c77' | 119 | 'USERCONTEXT': url |
| 112 | } | 120 | } |
| 113 | }) | 121 | }) |
| 114 | } | 122 | } |
| ... | @@ -123,7 +131,7 @@ export function getYS008() { | ... | @@ -123,7 +131,7 @@ export function getYS008() { |
| 123 | method: 'post', | 131 | method: 'post', |
| 124 | data: { | 132 | data: { |
| 125 | 'INTERFACEID': 'YS008', | 133 | 'INTERFACEID': 'YS008', |
| 126 | 'USERCONTEXT': 'a6c49439-f01c-0292-1757-30563fb41c77' | 134 | 'USERCONTEXT': url |
| 127 | } | 135 | } |
| 128 | }) | 136 | }) |
| 129 | } | 137 | } |
| ... | @@ -137,7 +145,7 @@ export function getYS009() { | ... | @@ -137,7 +145,7 @@ export function getYS009() { |
| 137 | method: 'post', | 145 | method: 'post', |
| 138 | data: { | 146 | data: { |
| 139 | 'INTERFACEID': 'YS009', | 147 | 'INTERFACEID': 'YS009', |
| 140 | 'USERCONTEXT': 'a6c49439-f01c-0292-1757-30563fb41c77' | 148 | 'USERCONTEXT': url |
| 141 | } | 149 | } |
| 142 | }) | 150 | }) |
| 143 | } | 151 | } | ... | ... |
| 1 | import router from './routerPc/cn' | 1 | import router from './routerPc/cn' |
| 2 | import { ElMessage } from 'element-plus' | 2 | import {ElMessage} from 'element-plus' |
| 3 | import NProgress from 'nprogress' | 3 | import NProgress from 'nprogress' |
| 4 | import 'nprogress/nprogress.css' | 4 | import 'nprogress/nprogress.css' |
| 5 | import { getToken, setToken } from '@/utils/auth' | 5 | import {getToken, setToken} from '@/utils/auth' |
| 6 | import { isRelogin } from '@/utils/request' | 6 | import {isRelogin} from '@/utils/request' |
| 7 | import useUserStore from '@/store/modules/user' | 7 | import useUserStore from '@/store/modules/user' |
| 8 | 8 | ||
| 9 | NProgress.configure({ showSpinner: false }) | 9 | NProgress.configure({showSpinner: false}) |
| 10 | 10 | ||
| 11 | router.beforeEach((to, from, next) => { | 11 | router.beforeEach((to, from, next) => { |
| 12 | console.log('to', to) | ||
| 13 | NProgress.start() | 12 | NProgress.start() |
| 14 | if (getToken()) { | 13 | if (getToken()) { |
| 15 | // 判断当前用户是否已拉取完user_info信息 | 14 | // 判断当前用户是否已拉取完user_info信息 |
| ... | @@ -21,7 +20,7 @@ router.beforeEach((to, from, next) => { | ... | @@ -21,7 +20,7 @@ router.beforeEach((to, from, next) => { |
| 21 | }).catch(err => { | 20 | }).catch(err => { |
| 22 | useUserStore().logOut().then(() => { | 21 | useUserStore().logOut().then(() => { |
| 23 | ElMessage.error(err) | 22 | ElMessage.error(err) |
| 24 | next({ path: '/' }) | 23 | next({path: '/'}) |
| 25 | }) | 24 | }) |
| 26 | }) | 25 | }) |
| 27 | } else { | 26 | } else { | ... | ... |
| ... | @@ -21,11 +21,16 @@ import CenterPage from "@/viewsPc/vip/centerPage" | ... | @@ -21,11 +21,16 @@ import CenterPage from "@/viewsPc/vip/centerPage" |
| 21 | import RightPage from "@/viewsPc/vip/rightPage" | 21 | import RightPage from "@/viewsPc/vip/rightPage" |
| 22 | import {getYS000} from '@/api/server.js' | 22 | import {getYS000} from '@/api/server.js' |
| 23 | 23 | ||
| 24 | 24 | const fullUrl = window.location.href; | |
| 25 | const type = ref(null) | ||
| 26 | // url.value = window.location.host + '/pc.html#/match/list/' | ||
| 25 | handelGetYS000() | 27 | handelGetYS000() |
| 28 | console.log(window.location.host) | ||
| 29 | |||
| 26 | 30 | ||
| 27 | async function handelGetYS000() { | 31 | async function handelGetYS000() { |
| 28 | const res = await getYS000() | 32 | const res = await getYS000() |
| 33 | type.value = res.data.IFBASE | ||
| 29 | console.log(res) | 34 | console.log(res) |
| 30 | } | 35 | } |
| 31 | 36 | ... | ... |
| ... | @@ -214,6 +214,47 @@ let chartB | ... | @@ -214,6 +214,47 @@ let chartB |
| 214 | let chartC | 214 | let chartC |
| 215 | let intervalA = null | 215 | let intervalA = null |
| 216 | 216 | ||
| 217 | let color1 = { | ||
| 218 | color: { | ||
| 219 | type: 'linear', | ||
| 220 | x: 0, y: 0, x2: 1, y2: 1, // 垂直渐变 | ||
| 221 | colorStops: [ | ||
| 222 | {offset: 0, color: 'rgba(0, 162, 255, .3)'}, // 顶部颜色 | ||
| 223 | {offset: 1, color: 'rgba(34, 117, 255, .3)'} // 底部颜色 | ||
| 224 | ], | ||
| 225 | }, | ||
| 226 | } | ||
| 227 | let color2 = { | ||
| 228 | color: { | ||
| 229 | type: 'linear', | ||
| 230 | x: 0, y: 0, x2: 1, y2: 1, // 垂直渐变 | ||
| 231 | colorStops: [ | ||
| 232 | {offset: 0, color: 'rgba(0, 162, 255, 1)'}, // 顶部颜色 | ||
| 233 | {offset: 1, color: 'rgba(34, 117, 255,1)'} // 底部颜色 | ||
| 234 | ], | ||
| 235 | }, | ||
| 236 | } | ||
| 237 | let color3 = { | ||
| 238 | color: { | ||
| 239 | type: 'linear', | ||
| 240 | x: 0, y: 0, x2: 1, y2: 1, // 垂直渐变 | ||
| 241 | colorStops: [ | ||
| 242 | {offset: 0, color: 'rgba(0, 255, 190, .5)'}, // 顶部颜色 | ||
| 243 | {offset: 1, color: 'rgba(8, 130, 160, .3)'} // 底部颜色 | ||
| 244 | ], | ||
| 245 | }, | ||
| 246 | } | ||
| 247 | let color4 = { | ||
| 248 | color: { | ||
| 249 | type: 'linear', | ||
| 250 | x: 0, y: 0, x2: 1, y2: 1, // 垂直渐变 | ||
| 251 | colorStops: [ | ||
| 252 | {offset: 0, color: 'rgba(0, 255, 190, 1)'}, // 顶部颜色 | ||
| 253 | {offset: 1, color: 'rgba(8, 130, 160, 1)'} // 底部颜色 | ||
| 254 | ], | ||
| 255 | }, | ||
| 256 | } | ||
| 257 | |||
| 217 | onMounted(() => { | 258 | onMounted(() => { |
| 218 | init() | 259 | init() |
| 219 | window.addEventListener('resize', handleResize); | 260 | window.addEventListener('resize', handleResize); |
| ... | @@ -250,12 +291,13 @@ async function handelGetYS007() { | ... | @@ -250,12 +291,13 @@ async function handelGetYS007() { |
| 250 | }) | 291 | }) |
| 251 | arr1.push({ | 292 | arr1.push({ |
| 252 | value: Math.round(val.PLANCOST / 10000), | 293 | value: Math.round(val.PLANCOST / 10000), |
| 253 | value2: Math.round(val.EXECOST / 10000), | 294 | itemStyle: val.EXERATIO * 100 >= 90 ? color1 : color3, |
| 254 | name: (val.EXERATIO * 100).toFixed() + '%', | 295 | name: (val.EXERATIO * 100).toFixed() + '%', |
| 255 | }) | 296 | }) |
| 256 | arr2.push({ | 297 | arr2.push({ |
| 257 | value: Math.round(val.EXECOST / 10000), | 298 | value: Math.round(val.EXECOST / 10000), |
| 258 | name: (val.EXERATIO * 100).toFixed() + '%', | 299 | name: (val.EXERATIO * 100).toFixed() + '%', |
| 300 | itemStyle: val.EXERATIO * 100 >= 90 ? color2 : color4 | ||
| 259 | }) | 301 | }) |
| 260 | arr3.push(val.EXERATIO) | 302 | arr3.push(val.EXERATIO) |
| 261 | } | 303 | } |
| ... | @@ -278,12 +320,13 @@ function handelSelect7() { | ... | @@ -278,12 +320,13 @@ function handelSelect7() { |
| 278 | }) | 320 | }) |
| 279 | arr1.push({ | 321 | arr1.push({ |
| 280 | value: Math.round(val.PLANCOST / 10000), | 322 | value: Math.round(val.PLANCOST / 10000), |
| 281 | value2: Math.round(val.EXECOST / 10000), | ||
| 282 | name: (val.EXERATIO * 100).toFixed() + '%', | 323 | name: (val.EXERATIO * 100).toFixed() + '%', |
| 324 | itemStyle: val.EXERATIO * 100 >= 90 ? color1 : color3 | ||
| 283 | }) | 325 | }) |
| 284 | arr2.push({ | 326 | arr2.push({ |
| 285 | value: Math.round(val.EXECOST / 10000), | 327 | value: Math.round(val.EXECOST / 10000), |
| 286 | name: (val.EXERATIO * 100).toFixed() + '%', | 328 | name: (val.EXERATIO * 100).toFixed() + '%', |
| 329 | itemStyle: val.EXERATIO * 100 >= 90 ? color2 : color4 | ||
| 287 | }) | 330 | }) |
| 288 | arr3.push(val.EXERATIO) | 331 | arr3.push(val.EXERATIO) |
| 289 | } | 332 | } |
| ... | @@ -338,15 +381,13 @@ function handelType8() { | ... | @@ -338,15 +381,13 @@ function handelType8() { |
| 338 | 381 | ||
| 339 | async function handelGetYS009() { | 382 | async function handelGetYS009() { |
| 340 | const res = await getYS009() | 383 | const res = await getYS009() |
| 341 | console.log(res) | ||
| 342 | console.log(res) | ||
| 343 | list9.value = res.data.list | 384 | list9.value = res.data.list |
| 344 | let arrY = [] | 385 | let arrY = [] |
| 345 | let arr1 = [] | 386 | let arr1 = [] |
| 346 | let arr2 = [] | 387 | let arr2 = [] |
| 347 | let arr3 = [] | 388 | let arr3 = [] |
| 348 | for (const val of list9.value) { | 389 | for (const val of list9.value) { |
| 349 | arrY.push(val.BASE) | 390 | arrY.push(val.BASEJC) |
| 350 | arr1.push(Math.round(val.WKPCOSTONE / 10000)) | 391 | arr1.push(Math.round(val.WKPCOSTONE / 10000)) |
| 351 | arr2.push(Math.round(val.WKPCOSTTWO / 10000)) | 392 | arr2.push(Math.round(val.WKPCOSTTWO / 10000)) |
| 352 | arr3.push(Math.round(val.WKPCOSTTHREE / 10000)) | 393 | arr3.push(Math.round(val.WKPCOSTTHREE / 10000)) |
| ... | @@ -375,7 +416,7 @@ const getA = () => { | ... | @@ -375,7 +416,7 @@ const getA = () => { |
| 375 | 416 | ||
| 376 | 417 | ||
| 377 | const setA = (arrY, arr1, arr2, arr3) => { | 418 | const setA = (arrY, arr1, arr2, arr3) => { |
| 378 | console.log(arrY) | 419 | console.log(arr1, arr2) |
| 379 | 420 | ||
| 380 | chartA = echarts.init(zhuRef.value) | 421 | chartA = echarts.init(zhuRef.value) |
| 381 | const option = { | 422 | const option = { |
| ... | @@ -481,16 +522,16 @@ const setA = (arrY, arr1, arr2, arr3) => { | ... | @@ -481,16 +522,16 @@ const setA = (arrY, arr1, arr2, arr3) => { |
| 481 | }, | 522 | }, |
| 482 | // data: [320, 302, 301, 334, 390, 330, 320, 330, 320], | 523 | // data: [320, 302, 301, 334, 390, 330, 320, 330, 320], |
| 483 | data: arr1, | 524 | data: arr1, |
| 484 | itemStyle: { | 525 | // itemStyle: { |
| 485 | color: { | 526 | // color: { |
| 486 | type: 'linear', | 527 | // type: 'linear', |
| 487 | x: 0, y: 0, x2: 1, y2: 1, // 垂直渐变 | 528 | // x: 0, y: 0, x2: 1, y2: 1, // 垂直渐变 |
| 488 | colorStops: [ | 529 | // colorStops: [ |
| 489 | {offset: 0, color: 'rgba(0, 162, 255, .5)'}, // 顶部颜色 | 530 | // {offset: 0, color: 'rgba(0, 162, 255, .3)'}, // 顶部颜色 |
| 490 | {offset: 1, color: 'rgba(34, 117, 255, .5)'} // 底部颜色 | 531 | // {offset: 1, color: 'rgba(34, 117, 255, .3)'} // 底部颜色 |
| 491 | ], | 532 | // ], |
| 492 | }, | 533 | // }, |
| 493 | }, | 534 | // }, |
| 494 | }, | 535 | }, |
| 495 | { | 536 | { |
| 496 | name: '执行金额', | 537 | name: '执行金额', |
| ... | @@ -535,10 +576,13 @@ const setA = (arrY, arr1, arr2, arr3) => { | ... | @@ -535,10 +576,13 @@ const setA = (arrY, arr1, arr2, arr3) => { |
| 535 | yAxis: 4, // 在Y轴150的位置画垂直线 | 576 | yAxis: 4, // 在Y轴150的位置画垂直线 |
| 536 | lineStyle: { | 577 | lineStyle: { |
| 537 | color: 'rgba(255, 252, 40, 1)', | 578 | color: 'rgba(255, 252, 40, 1)', |
| 538 | type: 'dashed' | 579 | type: 'dashed', |
| 580 | lineWidth: 2 | ||
| 539 | }, | 581 | }, |
| 540 | label: { | 582 | label: { |
| 541 | formatter: '' | 583 | formatter: '90%', |
| 584 | position: 'end', // 可选值: 'start', 'middle', 'end' | ||
| 585 | distance: [-20, 40] | ||
| 542 | } | 586 | } |
| 543 | } | 587 | } |
| 544 | ] | 588 | ] | ... | ... |
-
Please register or sign in to post a comment