91e152cb by zhangmeng

看板

1 parent 9835b057
...@@ -104,7 +104,8 @@ let intervalA = null; ...@@ -104,7 +104,8 @@ let intervalA = null;
104 onMounted(() => { 104 onMounted(() => {
105 // init() 105 // init()
106 window.addEventListener('resize', handleResize); 106 window.addEventListener('resize', handleResize);
107 handelGetYS006() 107 init()
108 // handelGetYS006()
108 // setA() 109 // setA()
109 // setB() 110 // setB()
110 // setC() 111 // setC()
...@@ -131,13 +132,13 @@ async function handelGetYS006() { ...@@ -131,13 +132,13 @@ async function handelGetYS006() {
131 type2.value.push(v1.BASE) 132 type2.value.push(v1.BASE)
132 for (const v2 of v1.list) { 133 for (const v2 of v1.list) {
133 const i2 = v2.MONTH - 1; // 转为 0~11 的索引 134 const i2 = v2.MONTH - 1; // 转为 0~11 的索引
134 h1.value[i2] += v2.YSDSK || 0; 135 h1.value[i2] += v2.YSDSK / 10000 || 0;
135 h2.value[i2] += v2.SFDDQ || 0; 136 h2.value[i2] += v2.SFDDQ / 10000 || 0;
136 h3.value[i2] += v2.HTDQ || 0; 137 h3.value[i2] += v2.HTDQ / 10000 || 0;
137 s1.value[i2] += v2.INCOME || 0; 138 s1.value[i2] += v2.INCOME / 10000 || 0;
138 s2.value[i2] += v2.LASTINCOME || 0; 139 s2.value[i2] += v2.LASTINCOME / 10000 || 0;
139 s3.value[i2] += v2.LASTYSBALANCE || 0; 140 s3.value[i2] += v2.LASTYSBALANCE / 10000 || 0;
140 s4.value[i2] += v2.YSBALANCE || 0; 141 s4.value[i2] += v2.YSBALANCE / 10000 || 0;
141 } 142 }
142 } 143 }
143 144
...@@ -187,10 +188,10 @@ function handelSelect2() { ...@@ -187,10 +188,10 @@ function handelSelect2() {
187 for (const v1 of arr) { 188 for (const v1 of arr) {
188 for (const v2 of v1.list) { 189 for (const v2 of v1.list) {
189 const i2 = v2.MONTH - 1; // 转为 0~11 的索引 190 const i2 = v2.MONTH - 1; // 转为 0~11 的索引
190 s1.value[i2] += v2.INCOME || 0; 191 s1.value[i2] += v2.INCOME / 10000 || 0;
191 s2.value[i2] += v2.LASTINCOME || 0; 192 s2.value[i2] += v2.LASTINCOME / 10000 || 0;
192 s3.value[i2] += v2.LASTYSBALANCE || 0; 193 s3.value[i2] += v2.LASTYSBALANCE / 10000 || 0;
193 s4.value[i2] += v2.YSBALANCE || 0; 194 s4.value[i2] += v2.YSBALANCE / 10000 || 0;
194 } 195 }
195 } 196 }
196 197
...@@ -218,9 +219,9 @@ function handelSelect3() { ...@@ -218,9 +219,9 @@ function handelSelect3() {
218 for (const department of list.value) { 219 for (const department of list.value) {
219 for (const monthData of department.list) { 220 for (const monthData of department.list) {
220 const monthIndex = monthData.MONTH - 1; // 转为 0~11 的索引 221 const monthIndex = monthData.MONTH - 1; // 转为 0~11 的索引
221 h1.value[monthIndex] += monthData.YSDSK || 0; 222 h1.value[monthIndex] += monthData.YSDSK / 10000 || 0;
222 h2.value[monthIndex] += monthData.SFDDQ || 0; 223 h2.value[monthIndex] += monthData.SFDDQ / 10000 || 0;
223 h3.value[monthIndex] += monthData.HTDQ || 0; 224 h3.value[monthIndex] += monthData.HTDQ / 10000 || 0;
224 } 225 }
225 } 226 }
226 227
...@@ -239,8 +240,9 @@ function handelSelect3() { ...@@ -239,8 +240,9 @@ function handelSelect3() {
239 240
240 241
241 const init = () => { 242 const init = () => {
243 clear()
242 if (!intervalA) { 244 if (!intervalA) {
243 getdata() 245 handelGetYS006()
244 } 246 }
245 intervalA = setInterval(getdata, 1000 * 60 * 60); 247 intervalA = setInterval(getdata, 1000 * 60 * 60);
246 } 248 }
...@@ -284,6 +286,14 @@ const setA = (arr) => { ...@@ -284,6 +286,14 @@ const setA = (arr) => {
284 const option = { 286 const option = {
285 tooltip: { 287 tooltip: {
286 trigger: 'item', 288 trigger: 'item',
289 valueFormatter: (value) => (value / 10000).toFixed() + '万',
290 backgroundColor: 'rgba(5, 28, 51, 1)', // 背景色
291 borderColor: 'rgba(46, 151, 198, 1)', // 边框颜色
292 borderWidth: 1, // 边框宽度
293 textStyle: {
294 color: '#fff', // 文字颜色
295 fontSize: 12, // 文字大小
296 }
287 }, 297 },
288 legend: { 298 legend: {
289 orient: 'vertical', 299 orient: 'vertical',
...@@ -402,6 +412,14 @@ const setB = (arr1, arr2, arr3, arr4) => { ...@@ -402,6 +412,14 @@ const setB = (arr1, arr2, arr3, arr4) => {
402 const option = { 412 const option = {
403 tooltip: { 413 tooltip: {
404 trigger: 'axis', 414 trigger: 'axis',
415 valueFormatter: (value) => (value / 10000).toFixed() + '万',
416 backgroundColor: 'rgba(5, 28, 51, 1)', // 背景色
417 borderColor: 'rgba(46, 151, 198, 1)', // 边框颜色
418 borderWidth: 1, // 边框宽度
419 textStyle: {
420 color: '#fff', // 文字颜色
421 fontSize: 12, // 文字大小
422 },
405 axisPointer: { 423 axisPointer: {
406 type: 'shadow' 424 type: 'shadow'
407 } 425 }
...@@ -559,6 +577,14 @@ const setC = (h1, h2, h3) => { ...@@ -559,6 +577,14 @@ const setC = (h1, h2, h3) => {
559 trigger: 'axis', 577 trigger: 'axis',
560 axisPointer: { 578 axisPointer: {
561 type: 'shadow' 579 type: 'shadow'
580 },
581 valueFormatter: (value) => (value / 10000).toFixed() + '万',
582 backgroundColor: 'rgba(5, 28, 51, 1)', // 背景色
583 borderColor: 'rgba(46, 151, 198, 1)', // 边框颜色
584 borderWidth: 1, // 边框宽度
585 textStyle: {
586 color: '#fff', // 文字颜色
587 fontSize: 12, // 文字大小
562 } 588 }
563 }, 589 },
564 legend: { 590 legend: {
......
...@@ -216,13 +216,23 @@ let chartC ...@@ -216,13 +216,23 @@ let chartC
216 let intervalA = null 216 let intervalA = null
217 217
218 onMounted(() => { 218 onMounted(() => {
219 // init() 219 init()
220 window.addEventListener('resize', handleResize); 220 window.addEventListener('resize', handleResize);
221 handelGetYS007() 221 // handelGetYS007()
222 handelGetYS008() 222 // handelGetYS008()
223 handelGetYS009() 223 // handelGetYS009()
224 224
225 }) 225 })
226 const init = () => {
227 clear()
228 if (!intervalA) {
229 handelGetYS007()
230 handelGetYS008()
231 handelGetYS009()
232 }
233 intervalA = setInterval(getdata, 1000 * 60 * 60);
234 }
235
226 236
227 async function handelGetYS007() { 237 async function handelGetYS007() {
228 const res = await getYS007() 238 const res = await getYS007()
...@@ -256,7 +266,6 @@ function handelSelect7() { ...@@ -256,7 +266,6 @@ function handelSelect7() {
256 setA(list7Y.value, arr1, arr2, arr3) 266 setA(list7Y.value, arr1, arr2, arr3)
257 } 267 }
258 268
259
260 async function handelGetYS008() { 269 async function handelGetYS008() {
261 const res = await getYS008() 270 const res = await getYS008()
262 list8Y.value = [] 271 list8Y.value = []
...@@ -311,20 +320,13 @@ async function handelGetYS009() { ...@@ -311,20 +320,13 @@ async function handelGetYS009() {
311 let arr3 = [] 320 let arr3 = []
312 for (const val of list9.value) { 321 for (const val of list9.value) {
313 arrY.push(val.BASE) 322 arrY.push(val.BASE)
314 arr1.push(val.WKPCOSTONE) 323 arr1.push(Math.round(val.WKPCOSTONE / 10000))
315 arr2.push(val.WKPCOSTTWO) 324 arr2.push(Math.round(val.WKPCOSTTWO / 10000))
316 arr3.push(val.WKPCOSTTHREE) 325 arr3.push(Math.round(val.WKPCOSTTHREE / 10000))
317 } 326 }
318 setC(arrY, arr1, arr2, arr3) 327 setC(arrY, arr1, arr2, arr3)
319 } 328 }
320 329
321 const init = () => {
322 clear()
323 if (!intervalA) {
324 getdata()
325 }
326 intervalA = setInterval(getdata, 1000 * 60 * 60);
327 }
328 const getdata = () => { 330 const getdata = () => {
329 getA() 331 getA()
330 getB() 332 getB()
...@@ -353,6 +355,14 @@ const setA = (arrY, arr1, arr2, arr3) => { ...@@ -353,6 +355,14 @@ const setA = (arrY, arr1, arr2, arr3) => {
353 trigger: 'axis', 355 trigger: 'axis',
354 axisPointer: { 356 axisPointer: {
355 type: 'shadow' // 'shadow' as default; can also be 'line' or 'shadow' 357 type: 'shadow' // 'shadow' as default; can also be 'line' or 'shadow'
358 },
359 valueFormatter: (value) => value + '万',
360 backgroundColor: 'rgba(5, 28, 51, 1)', // 背景色
361 borderColor: 'rgba(46, 151, 198, 1)', // 边框颜色
362 borderWidth: 1, // 边框宽度
363 textStyle: {
364 color: '#fff', // 文字颜色
365 fontSize: 12, // 文字大小
356 } 366 }
357 }, 367 },
358 legend: { 368 legend: {
...@@ -492,6 +502,14 @@ const setB = (arrY, arr1, arr2) => { ...@@ -492,6 +502,14 @@ const setB = (arrY, arr1, arr2) => {
492 axisPointer: { 502 axisPointer: {
493 // Use axis to trigger tooltip 503 // Use axis to trigger tooltip
494 type: 'shadow' // 'shadow' as default; can also be 'line' or 'shadow' 504 type: 'shadow' // 'shadow' as default; can also be 'line' or 'shadow'
505 },
506 valueFormatter: (value) => value + '万',
507 backgroundColor: 'rgba(5, 28, 51, 1)', // 背景色
508 borderColor: 'rgba(46, 151, 198, 1)', // 边框颜色
509 borderWidth: 1, // 边框宽度
510 textStyle: {
511 color: '#fff', // 文字颜色
512 fontSize: 12, // 文字大小
495 } 513 }
496 }, 514 },
497 grid: { 515 grid: {
...@@ -685,6 +703,14 @@ const setC = (arry, arr1, arr2, arr3) => { ...@@ -685,6 +703,14 @@ const setC = (arry, arr1, arr2, arr3) => {
685 trigger: 'axis', 703 trigger: 'axis',
686 axisPointer: { 704 axisPointer: {
687 type: 'shadow' 705 type: 'shadow'
706 },
707 valueFormatter: (value) => value + '万',
708 backgroundColor: 'rgba(5, 28, 51, 1)', // 背景色
709 borderColor: 'rgba(46, 151, 198, 1)', // 边框颜色
710 borderWidth: 1, // 边框宽度
711 textStyle: {
712 color: '#fff', // 文字颜色
713 fontSize: 12, // 文字大小
688 } 714 }
689 }, 715 },
690 legend: { 716 legend: {
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!