5a091cb6 by zrj

daping zonggongsi

1 parent 43ee9327
1 <template> 1 <template>
2 <div class="main"> 2 <div class="main">
3 <el-row class="w100"> 3 <el-row class="w100">
4 <el-col v-if="obj.IFBASE" :span="type=='否'?8:12"> 4 <el-col v-if="obj.IFBASE" :span="8">
5 <left-page :obj="obj" :type="type" :url="result"/> 5 <left-page :obj="obj" :type="type" :url="result"/>
6 </el-col> 6 </el-col>
7 <el-col v-if="type=='否'" :span="8"> 7 <el-col v-if="obj.IFBASE" :span="8">
8 <center-page :obj="obj" :type="type=='否'" :url="result"/> 8 <center-page :obj="obj" :isLeader="isLeader" :type="type=='否'" :url="result"/>
9 </el-col> 9 </el-col>
10 <el-col v-if="obj.IFBASE" :span="type=='否'?8:12"> 10 <el-col v-if="obj.IFBASE" :span="8">
11 <right-page :obj="obj" :type="type" :url="result"/> 11 <right-page :obj="obj" :type="type" :url="result"/>
12 </el-col> 12 </el-col>
13 </el-row> 13 </el-row>
...@@ -28,15 +28,22 @@ const url = ref() ...@@ -28,15 +28,22 @@ const url = ref()
28 const obj = ref({}) 28 const obj = ref({})
29 const result = ref() 29 const result = ref()
30 const router = useRouter() 30 const router = useRouter()
31 // url.value = 'http://192.168.1.152:8899/login/sid=a3afc265-1e60-4376-bcfb-6ca124db8704#/' 31 let isLeader = ref(false)
32 url.value = window.location.href 32 url.value = 'http://192.168.1.152:8899/login/sid=3e6ac454-6d9a-4f37-a593-d06c65703792#/'
33 // url.value = window.location.href
33 result.value = url.value?.split('=')[1]?.split('#')[0]; 34 result.value = url.value?.split('=')[1]?.split('#')[0];
34 35
36 function validateEmail(email) {
37 const re = /^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
38 return re.test(String(email).toLowerCase());
39 }
40
35 onMounted(() => { 41 onMounted(() => {
36 console.log(url.value) 42 console.log(url.value)
37 console.log(result.value) 43 console.log(result.value)
38 if (result.value) { 44 if (result.value) {
39 handelGetYS000() 45 handelGetYS000()
46 isLeader.value = validateEmail(result.value)
40 } else { 47 } else {
41 // result.value = 'a3afc265-1e60-4376-bcfb-6ca124db8704' 48 // result.value = 'a3afc265-1e60-4376-bcfb-6ca124db8704'
42 // handelGetYS000() 49 // handelGetYS000()
......
...@@ -28,9 +28,9 @@ ...@@ -28,9 +28,9 @@
28 </div> 28 </div>
29 <div ref="bing1" style="width: 100%;height:13.3vh;"> 29 <div ref="bing1" style="width: 100%;height:13.3vh;">
30 </div> 30 </div>
31 <div class="bingBottom heiti"> 31 <!-- <div class="bingBottom heiti">-->
32 <div style="text-align: center">{{ `${dayjs().format('YYYY')}年` }}营业收入 <br>(万元)</div> 32 <!-- <div style="text-align: center">{{ `${dayjs().format('YYYY')}年` }}营业收入 <br>(万元)</div>-->
33 </div> 33 <!-- </div>-->
34 </div> 34 </div>
35 <div ref="zhuRef1" class="zhu" style="width:70%;height: 17.3vh"/> 35 <div ref="zhuRef1" class="zhu" style="width:70%;height: 17.3vh"/>
36 </div> 36 </div>
...@@ -46,11 +46,11 @@ ...@@ -46,11 +46,11 @@
46 </div> 46 </div>
47 <div ref="bing2" style="width: 100%;height:13.3vh;"> 47 <div ref="bing2" style="width: 100%;height:13.3vh;">
48 </div> 48 </div>
49 <div class="bingBottom"> 49 <!-- <div class="bingBottom">-->
50 <div style="text-align: center;">{{ `${dayjs().format('YYYY')}年${dayjs().format('MM')}月` }} <br> 50 <!-- <div style="text-align: center;">{{ `${dayjs().format('YYYY')}年${dayjs().format('MM')}月` }} <br>-->
51 累计应收余额 <br>(万元) 51 <!-- 累计应收余额 <br>(万元)-->
52 </div> 52 <!-- </div>-->
53 </div> 53 <!-- </div>-->
54 </div> 54 </div>
55 <div ref="zhuRef2" class="zhu" style="width:70%;height: 17.3vh"/> 55 <div ref="zhuRef2" class="zhu" style="width:70%;height: 17.3vh"/>
56 </div> 56 </div>
...@@ -64,12 +64,13 @@ ...@@ -64,12 +64,13 @@
64 <span><img alt="" class="titleImg" src="@/assets/image/title_bg.png"></span> 64 <span><img alt="" class="titleImg" src="@/assets/image/title_bg.png"></span>
65 现金余额 65 现金余额
66 </div> 66 </div>
67 <div ref="bing3" style="width: 100%;height:13.3vh;"> 67 <div class="bingImg" style="width: 100%;height:13.3vh;">{{bing_number3}}</div>
68 </div> 68 <!-- <div ref="bing3" style="width: 100%;height:13.3vh;">-->
69 <div class="bingBottom"> 69 <!-- </div>-->
70 <div style="text-align: center">{{ `${dayjs().format('YYYY')}年${dayjs().format('MM')}月` }} <br> 累计现金余额<br>(万元) 70 <!-- <div class="bingBottom">-->
71 </div> 71 <!-- <div style="text-align: center">{{ `${dayjs().format('YYYY')}年${dayjs().format('MM')}月` }} <br> 累计现金余额<br>(万元)-->
72 </div> 72 <!-- </div>-->
73 <!-- </div>-->
73 </div> 74 </div>
74 <div ref="zhuRef3" class="zhu" style="width:70%;height: 17.3vh"/> 75 <div ref="zhuRef3" class="zhu" style="width:70%;height: 17.3vh"/>
75 </div> 76 </div>
...@@ -97,7 +98,7 @@ import {autoToolTip} from "@/plugins/auto-toolTip"; ...@@ -97,7 +98,7 @@ import {autoToolTip} from "@/plugins/auto-toolTip";
97 import ScrollingData from './scrollingData.vue' 98 import ScrollingData from './scrollingData.vue'
98 import * as echarts from "echarts"; 99 import * as echarts from "echarts";
99 import * as api from "@/apiPc/common" 100 import * as api from "@/apiPc/common"
100 import {onMounted, ref, computed, onUnmounted, getCurrentInstance} from 'vue' 101 import {onMounted, ref, computed, onUnmounted, getCurrentInstance, nextTick} from 'vue'
101 import {dayjs} from 'element-plus' 102 import {dayjs} from 'element-plus'
102 import {getYS000, getYS001, getYS002, getYS003, getYS004, getYS005} from '@/api/server.js' 103 import {getYS000, getYS001, getYS002, getYS003, getYS004, getYS005} from '@/api/server.js'
103 import Information from "/@/viewsPc/vip/components/information.vue"; 104 import Information from "/@/viewsPc/vip/components/information.vue";
...@@ -109,6 +110,10 @@ const props = defineProps({ ...@@ -109,6 +110,10 @@ const props = defineProps({
109 type: Boolean, 110 type: Boolean,
110 default: false 111 default: false
111 }, 112 },
113 isLeader: {
114 type: Boolean,
115 default: false
116 },
112 url: { 117 url: {
113 type: String, 118 type: String,
114 default: undefined 119 default: undefined
...@@ -123,6 +128,7 @@ const props = defineProps({ ...@@ -123,6 +128,7 @@ const props = defineProps({
123 128
124 const url = computed(() => props.url) 129 const url = computed(() => props.url)
125 const obj = computed(() => props.obj) 130 const obj = computed(() => props.obj)
131 const isLeader = computed(() => props.isLeader)
126 const zhuRef1 = ref(null) 132 const zhuRef1 = ref(null)
127 const zhuRef2 = ref(null) 133 const zhuRef2 = ref(null)
128 const zhuRef3 = ref(null) 134 const zhuRef3 = ref(null)
...@@ -143,6 +149,7 @@ const resYear3 = ref() ...@@ -143,6 +149,7 @@ const resYear3 = ref()
143 const activeName1 = ref() 149 const activeName1 = ref()
144 const activeName2 = ref() 150 const activeName2 = ref()
145 const activeName3 = ref() 151 const activeName3 = ref()
152 const bing_number3 = ref()
146 153
147 154
148 let chart1 155 let chart1
...@@ -165,7 +172,6 @@ onMounted(async () => { ...@@ -165,7 +172,6 @@ onMounted(async () => {
165 } 172 }
166 window.addEventListener('resize', handleResize); 173 window.addEventListener('resize', handleResize);
167 } 174 }
168
169 // handelBing1() 175 // handelBing1()
170 // handelZhu1() 176 // handelZhu1()
171 // handelGetYS001() 177 // handelGetYS001()
...@@ -218,9 +224,10 @@ async function handelGetYS003() { ...@@ -218,9 +224,10 @@ async function handelGetYS003() {
218 // if (v.XJCOST == 0) v.XJCOST = null 224 // if (v.XJCOST == 0) v.XJCOST = null
219 // } 225 // }
220 obj1.list = obj1.list.filter(v => v.XJCOST != 0) 226 obj1.list = obj1.list.filter(v => v.XJCOST != 0)
227
228 bing_number3.value = toDieThousands((res.data.yeargroup[0].TOTAL / 10000).toFixed() || 0)
221 229
222 230 // handelBing3(obj1, obj2)
223 handelBing3(obj1, obj2)
224 handelZhu3(obj1, obj2) 231 handelZhu3(obj1, obj2)
225 232
226 233
...@@ -345,6 +352,10 @@ async function handelGetYS004() { ...@@ -345,6 +352,10 @@ async function handelGetYS004() {
345 async function handelGetYS005() { 352 async function handelGetYS005() {
346 const res = await getYS005(url.value, obj.value) 353 const res = await getYS005(url.value, obj.value)
347 form.value = res.data 354 form.value = res.data
355 console.log(isLeader)
356 if (isLeader.value) {
357 proxy.$refs['InformationRef'].open(form.value.leaderinfo,form.value.APPLYDATE)
358 }
348 } 359 }
349 360
350 361
...@@ -367,6 +378,17 @@ function handleResize() { ...@@ -367,6 +378,17 @@ function handleResize() {
367 chart44?.resize() 378 chart44?.resize()
368 } 379 }
369 380
381 function toDieThousands(num) {
382 let newNum = num
383 if (num) {
384 //转为数字类型
385 const numNum = Number(newNum.toString())
386 //正则修改千分位
387 newNum = numNum.toFixed(0).toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",")
388 }
389 return newNum
390 }
391
370 const handelBing1 = (arr1, arr2) => { 392 const handelBing1 = (arr1, arr2) => {
371 // arr1 2025 393 // arr1 2025
372 // arr2 2024 394 // arr2 2024
...@@ -429,7 +451,7 @@ const handelBing1 = (arr1, arr2) => { ...@@ -429,7 +451,7 @@ const handelBing1 = (arr1, arr2) => {
429 label: { 451 label: {
430 show: true, // 显示标签 452 show: true, // 显示标签
431 position: 'center', // 位置居中 453 position: 'center', // 位置居中
432 formatter: (arr1.TOTAL / 10000).toFixed(), // 文字内容 454 formatter: toDieThousands((arr1.TOTAL / 10000).toFixed()), // 文字内容
433 color: "#ffff", 455 color: "#ffff",
434 rich: { 456 rich: {
435 total: { 457 total: {
...@@ -598,7 +620,7 @@ const handelBing2 = (row1, row2) => { ...@@ -598,7 +620,7 @@ const handelBing2 = (row1, row2) => {
598 label: { 620 label: {
599 show: true, // 显示标签 621 show: true, // 显示标签
600 position: 'center', // 位置居中 622 position: 'center', // 位置居中
601 formatter: (row1.TOTAL / 10000).toFixed() || 0, // 文字内容 623 formatter: toDieThousands((row1.TOTAL / 10000).toFixed() || 0), // 文字内容
602 color: "#ffff", 624 color: "#ffff",
603 rich: { 625 rich: {
604 total: { 626 total: {
...@@ -834,7 +856,6 @@ const handelZhu1 = (row1, row2) => { ...@@ -834,7 +856,6 @@ const handelZhu1 = (row1, row2) => {
834 yAxis: [ 856 yAxis: [
835 { 857 {
836 type: 'value', 858 type: 'value',
837 name: '单位(万)',
838 axisLine: { 859 axisLine: {
839 show: true, 860 show: true,
840 lineStyle: { 861 lineStyle: {
...@@ -843,6 +864,10 @@ const handelZhu1 = (row1, row2) => { ...@@ -843,6 +864,10 @@ const handelZhu1 = (row1, row2) => {
843 type: 'solid' 864 type: 'solid'
844 }, 865 },
845 }, 866 },
867 axisLabel: {
868 show:false
869 // formatter: '{value}w' // 在数值后添加单位
870 },
846 splitLine: { 871 splitLine: {
847 show: true, // 默认false,需显式开启 872 show: true, // 默认false,需显式开启
848 lineStyle: { 873 lineStyle: {
...@@ -952,7 +977,6 @@ const handelZhu2 = (row1, row2) => { ...@@ -952,7 +977,6 @@ const handelZhu2 = (row1, row2) => {
952 yAxis: [ 977 yAxis: [
953 { 978 {
954 type: 'value', 979 type: 'value',
955 name: '单位(万)',
956 axisLine: { 980 axisLine: {
957 show: true, 981 show: true,
958 lineStyle: { 982 lineStyle: {
...@@ -961,6 +985,10 @@ const handelZhu2 = (row1, row2) => { ...@@ -961,6 +985,10 @@ const handelZhu2 = (row1, row2) => {
961 type: 'solid' 985 type: 'solid'
962 } 986 }
963 }, 987 },
988 axisLabel: {
989 show:false
990 // formatter: '{value}w' // 在数值后添加单位
991 },
964 splitLine: { 992 splitLine: {
965 show: true, // 默认false,需显式开启 993 show: true, // 默认false,需显式开启
966 lineStyle: { 994 lineStyle: {
...@@ -1025,7 +1053,6 @@ const handelZhu2 = (row1, row2) => { ...@@ -1025,7 +1053,6 @@ const handelZhu2 = (row1, row2) => {
1025 // autoHover(chart22, option, 0, 2000) 1053 // autoHover(chart22, option, 0, 2000)
1026 } 1054 }
1027 const handelZhu3 = (row1, row2) => { 1055 const handelZhu3 = (row1, row2) => {
1028 console.log(11111, row1, row2)
1029 let name1 = row1.YEAR + '年' 1056 let name1 = row1.YEAR + '年'
1030 let name2 = row2.YEAR + '年' 1057 let name2 = row2.YEAR + '年'
1031 console.log('年', row1.YEAR) 1058 console.log('年', row1.YEAR)
...@@ -1091,7 +1118,6 @@ const handelZhu3 = (row1, row2) => { ...@@ -1091,7 +1118,6 @@ const handelZhu3 = (row1, row2) => {
1091 yAxis: [ 1118 yAxis: [
1092 { 1119 {
1093 type: 'value', 1120 type: 'value',
1094 name: '单位(万)',
1095 axisLine: { 1121 axisLine: {
1096 show: true, 1122 show: true,
1097 lineStyle: { 1123 lineStyle: {
...@@ -1100,6 +1126,10 @@ const handelZhu3 = (row1, row2) => { ...@@ -1100,6 +1126,10 @@ const handelZhu3 = (row1, row2) => {
1100 type: 'solid' 1126 type: 'solid'
1101 } 1127 }
1102 }, 1128 },
1129 axisLabel: {
1130 show:false
1131 // formatter: '{value}w' // 在数值后添加单位
1132 },
1103 splitLine: { 1133 splitLine: {
1104 show: true, // 默认false,需显式开启 1134 show: true, // 默认false,需显式开启
1105 lineStyle: { 1135 lineStyle: {
...@@ -1248,6 +1278,10 @@ const handelZhu4 = (listX, dataList, arr1, arr2) => { ...@@ -1248,6 +1278,10 @@ const handelZhu4 = (listX, dataList, arr1, arr2) => {
1248 type: 'solid' 1278 type: 'solid'
1249 } 1279 }
1250 }, 1280 },
1281 axisLabel: {
1282 show:false
1283 // formatter: '{value}w' // 在数值后添加单位
1284 },
1251 splitLine: { 1285 splitLine: {
1252 show: true, // 默认false,需显式开启 1286 show: true, // 默认false,需显式开启
1253 lineStyle: { 1287 lineStyle: {
...@@ -1419,7 +1453,7 @@ const clear = () => { ...@@ -1419,7 +1453,7 @@ const clear = () => {
1419 } 1453 }
1420 1454
1421 function handelView() { 1455 function handelView() {
1422 proxy.$refs['InformationRef'].open(form.value.leaderinfo) 1456 proxy.$refs['InformationRef'].open(form.value.leaderinfo,form.value.APPLYDATE)
1423 } 1457 }
1424 1458
1425 onUnmounted(() => { 1459 onUnmounted(() => {
...@@ -1632,6 +1666,13 @@ onUnmounted(() => { ...@@ -1632,6 +1666,13 @@ onUnmounted(() => {
1632 color: #FFFFFF; 1666 color: #FFFFFF;
1633 } 1667 }
1634 } 1668 }
1669
1670 .bingImg {
1671 background: url("@/assets/image/rmb.png") no-repeat center;
1672 color: #fff;
1673 font-size: 12px;
1674 padding: 49px;
1675 }
1635 } 1676 }
1636 } 1677 }
1637 } 1678 }
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
7 width="33%" 7 width="33%"
8 > 8 >
9 <div class="son"> 9 <div class="son">
10 <div style="color: #fff;font-size: 15px">填写日期: {{myDate}}</div>
10 <p v-for="val in list" :key="val" class="row"> 11 <p v-for="val in list" :key="val" class="row">
11 <span></span> {{ val }} 12 <span></span> {{ val }}
12 </p> 13 </p>
...@@ -19,14 +20,15 @@ ...@@ -19,14 +20,15 @@
19 import {ref} from 'vue' 20 import {ref} from 'vue'
20 21
21 const list = ref([]) 22 const list = ref([])
23 const myDate = ref()
22 const showGroup = ref(false) 24 const showGroup = ref(false)
23 25
24 26
25 function open(row) { 27 function open(row,date) {
26 debugger 28 debugger
27 showGroup.value = true 29 showGroup.value = true
28 list.value = row 30 list.value = row
29 31 myDate.value = date
30 console.log(list.value) 32 console.log(list.value)
31 } 33 }
32 34
...@@ -73,4 +75,12 @@ defineExpose({ ...@@ -73,4 +75,12 @@ defineExpose({
73 border-radius: calc(3 * 100vw / 1920); 75 border-radius: calc(3 * 100vw / 1920);
74 } 76 }
75 } 77 }
78
79 .el-overlay {
80 /* 自定义样式 */
81 background-color: rgba(0, 0, 0, 0.7); /* 例如,更改背景颜色 */
82 }
83 .el-dialog__title{
84 color: #fff;
85 }
76 </style> 86 </style>
......
1 <template> 1 <template>
2 <div class="pd20"> 2 <div class="pd20">
3 <div class="chartCard"> 3 <div class="chartCard">
4 <div class="title">开票计划与执行</div> 4 <div class="title">开票情况</div>
5 <div class="po_right" style="justify-content: end"> 5 <div class="po_right" style="justify-content: end">
6 <div class="itemBox"> 6 <div class="itemBox">
7 <el-select 7 <el-select
...@@ -21,17 +21,18 @@ ...@@ -21,17 +21,18 @@
21 </div> 21 </div>
22 22
23 <div class="chartCard mt30"> 23 <div class="chartCard mt30">
24 <div class="title">回款</div> 24 <div class="title">回款情况</div>
25 <div class="po_right" style="justify-content: end;"> 25 <div class="po_right" style="justify-content: end;">
26 <div class="itemBox month" style="margin-right: 5px;width: 30%;"> 26 <div class="itemBox" style="margin-right: 5px;width: 45%;">
27 <el-select 27 <el-select
28 v-model="type8" 28 v-model="type8"
29 class="select" 29 class="select"
30 placeholder="全部基地" 30 placeholder="全部基地"
31 collapse-tags
32 multiple
31 size="small" 33 size="small"
32 @change="handelType8"> 34 @change="handelType8">
33 <el-option label="本月" value="1"/> 35 <el-option v-for="(item,index) in monthList" :label="item" :value="index"/>
34 <el-option label="累计" value="2"/>
35 </el-select> 36 </el-select>
36 </div> 37 </div>
37 <div class="itemBox"> 38 <div class="itemBox">
...@@ -53,7 +54,7 @@ ...@@ -53,7 +54,7 @@
53 </div> 54 </div>
54 55
55 <div class="chartCard mt30"> 56 <div class="chartCard mt30">
56 <div class="title">应收账款账</div> 57 <div class="title">应收账期</div>
57 <div ref="overdueRef" style="width: 100%; height: 24vh;"></div> 58 <div ref="overdueRef" style="width: 100%; height: 24vh;"></div>
58 </div> 59 </div>
59 </div> 60 </div>
...@@ -86,6 +87,7 @@ const overdueRef = ref(null) ...@@ -86,6 +87,7 @@ const overdueRef = ref(null)
86 const kindList = ref(['文书', '婚姻', '图书', '档案', '司法', '环保', '音频', '视频', '会计', '其他']) 87 const kindList = ref(['文书', '婚姻', '图书', '档案', '司法', '环保', '音频', '视频', '会计', '其他'])
87 const dataA = ref([80, 60, 55, 62, 50, 55, 60, 62, 48, 53]) 88 const dataA = ref([80, 60, 55, 62, 50, 55, 60, 62, 48, 53])
88 const radioA = ref('month') 89 const radioA = ref('month')
90 const monthList = ref(["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"])
89 91
90 const itemStyleList = ref([ 92 const itemStyleList = ref([
91 { 93 {
...@@ -182,7 +184,7 @@ const itemStyleList = ref([ ...@@ -182,7 +184,7 @@ const itemStyleList = ref([
182 184
183 const list9 = ref([]) 185 const list9 = ref([])
184 const list8Y = ref([]) 186 const list8Y = ref([])
185 const type8 = ref('2') 187 const type8 = ref([])
186 const month8 = ref([]) 188 const month8 = ref([])
187 const year8 = ref([]) 189 const year8 = ref([])
188 const list8 = ref([ 190 const list8 = ref([
...@@ -366,51 +368,76 @@ function handelSelect7() { ...@@ -366,51 +368,76 @@ function handelSelect7() {
366 368
367 async function handelGetYS008() { 369 async function handelGetYS008() {
368 const res = await getYS008(url.value, obj.value) 370 const res = await getYS008(url.value, obj.value)
371 let nowMonth = new Date().getMonth()
372 for (let i = 0;i <= nowMonth;i++) {
373 type8.value.push(i)
374 }
369 list8.value = res.data.list || [] 375 list8.value = res.data.list || []
370 list8Y.value = [] 376 list8Y.value = []
371 month8.value = [] 377 month8.value = []
372 year8.value = [] 378 year8.value = []
373 list8.value.sort((a, b) => a.HKQKMONTH - b.HKQKMONTH); 379 list8.value.sort((a, b) => a.HKQKMONTH - b.HKQKMONTH);
374 for (let i = 0; i < list8.value.length; i++) { 380 for (let i = 0; i < list8.value.length; i++) {
381 let monthValue = []
375 list8.value[i].itemStyle = itemStyleList.value[i % itemStyleList.value.length] 382 list8.value[i].itemStyle = itemStyleList.value[i % itemStyleList.value.length]
376 list8Y.value.push(list8.value[i].BASEJC) 383 list8Y.value.push(list8.value[i].BASEJC)
377 month8.value.push({ 384 month8.value.push({
378 value: list8.value[i].HKQKTOTAL / 10000, 385 value: list8.value[i].HKQKTOTAL / 10000,
379 itemStyle: list8.value[i].itemStyle, 386 itemStyle: list8.value[i].itemStyle,
380 }) 387 })
388 for (let j=1;j<13;j++) {
389 monthValue.push(list8.value[i]["HKQKMONTH"+j]/10000)
390 }
381 year8.value.push({ 391 year8.value.push({
382 value: list8.value[i].HKQKMONTH / 10000, 392 value: monthValue,
383 itemStyle: list8.value[i].itemStyle, 393 itemStyle: list8.value[i].itemStyle,
384 }) 394 })
385 } 395 }
386 let arr = type8.value == '2' ? month8.value : year8.value 396 let arr = month8.value
387 setB(list8Y.value, arr) 397 setB(list8Y.value, arr)
388 } 398 }
389 399
390 function handelSelect8() { 400 function handelSelect8() {
391 console.log(list8.value)
392 month8.value = [] 401 month8.value = []
393 year8.value = [] 402 year8.value = []
394 let arr = list8Y.value.map(val => list8.value.find(item => item.BASEJC === val)); 403 let arr = list8Y.value.map(val => list8.value.find(item => item.BASEJC === val));
395 list8Y.value = [] 404 list8Y.value = []
396 arr.sort((a, b) => a.HKQKMONTH - b.HKQKMONTH); 405 arr.sort((a, b) => a.HKQKTOTAL - b.HKQKTOTAL);
397 for (let i = 0; i < arr.length; i++) { 406 for (let i = 0; i < arr.length; i++) {
407 let monthValue = []
398 list8Y.value.push(arr[i].BASEJC) 408 list8Y.value.push(arr[i].BASEJC)
399 month8.value.push({ 409 month8.value.push({
400 value: arr[i].HKQKTOTAL / 10000, 410 value: arr[i].HKQKTOTAL / 10000,
401 itemStyle: arr[i].itemStyle, 411 itemStyle: arr[i].itemStyle,
402 }) 412 })
413 for (let j=1;j<13;j++) {
414 monthValue.push(arr[i]["HKQKMONTH"+j]/10000)
415 }
403 year8.value.push({ 416 year8.value.push({
404 value: arr[i].HKQKMONTH / 10000, 417 value: monthValue,
405 itemStyle: arr[i].itemStyle, 418 itemStyle: arr[i].itemStyle,
406 }) 419 })
407 } 420 }
408 let arrc = type8.value == '2' ? month8.value : year8.value 421 let arrc = month8.value
409 setB(list8Y.value, arrc) 422 setB(list8Y.value, arrc)
410 } 423 }
411 424
412 function handelType8() { 425 function handelType8() {
413 let arrc = type8.value == '2' ? month8.value : year8.value 426 // let arrc = type8.value == '2' ? month8.value : year8.value
427 let myData = [];
428 for (let i=0;i<year8.value.length;i++) {
429 let sum = 0
430 for (let j=0;j<type8.value.length;j++) {
431 sum += year8.value[i].value[type8.value[j]]
432 }
433 myData.push({
434 value:sum,
435 itemStyle:year8.value[i].itemStyle
436 })
437 }
438
439 let arrc = type8.value.length>0 ? myData : month8.value
440
414 setB(list8Y.value, arrc) 441 setB(list8Y.value, arrc)
415 } 442 }
416 443
...@@ -472,7 +499,7 @@ const setA = (arrY, arr1, arr2, arr3, markLineName, BC) => { ...@@ -472,7 +499,7 @@ const setA = (arrY, arr1, arr2, arr3, markLineName, BC) => {
472 xAxis: { 499 xAxis: {
473 type: 'value', 500 type: 'value',
474 axisLabel: { 501 axisLabel: {
475 formatter: '{value}w' // 在数值后添加单位 502 formatter: '{value}' // 在数值后添加单位
476 }, 503 },
477 axisLine: { 504 axisLine: {
478 show: true, 505 show: true,
...@@ -655,7 +682,7 @@ const setB = (arrY, arr1, arr2) => { ...@@ -655,7 +682,7 @@ const setB = (arrY, arr1, arr2) => {
655 xAxis: { 682 xAxis: {
656 type: 'value', 683 type: 'value',
657 axisLabel: { 684 axisLabel: {
658 formatter: '{value}w' // 在数值后添加单位 685 formatter: '{value}' // 在数值后添加单位
659 }, 686 },
660 axisLine: { 687 axisLine: {
661 show: true, 688 show: true,
...@@ -932,8 +959,8 @@ const setC = (arry, arr1, arr2, arr3) => { ...@@ -932,8 +959,8 @@ const setC = (arry, arr1, arr2, arr3) => {
932 type: 'linear', 959 type: 'linear',
933 x: 0, y: 0, x2: 1, y2: 1, // 垂直渐变 960 x: 0, y: 0, x2: 1, y2: 1, // 垂直渐变
934 colorStops: [ 961 colorStops: [
935 {offset: 0, color: 'rgba(147, 119, 28, 1)'}, // 顶部颜色 962 {offset: 0, color: 'rgba(109, 217, 255, 1)'}, // 顶部颜色
936 {offset: 1, color: 'rgba(244, 171, 9, 1)'} // 底部颜色 963 // {offset: 1, color: 'rgba(244, 171, 9, 1)'} // 底部颜色
937 ], 964 ],
938 }, 965 },
939 }, 966 },
...@@ -954,8 +981,8 @@ const setC = (arry, arr1, arr2, arr3) => { ...@@ -954,8 +981,8 @@ const setC = (arry, arr1, arr2, arr3) => {
954 type: 'linear', 981 type: 'linear',
955 x: 0, y: 0, x2: 1, y2: 1, // 垂直渐变 982 x: 0, y: 0, x2: 1, y2: 1, // 垂直渐变
956 colorStops: [ 983 colorStops: [
957 {offset: 0, color: 'rgba(82, 72, 228, 1)'}, // 顶部颜色 984 {offset: 0, color: 'rgba(24, 124, 236, 1)'}, // 顶部颜色
958 {offset: 1, color: 'rgba(148, 140, 252, 1)'} // 底部颜色 985 // {offset: 1, color: 'rgba(148, 140, 252, 1)'} // 底部颜色
959 ], 986 ],
960 }, 987 },
961 }, 988 },
...@@ -977,8 +1004,8 @@ const setC = (arry, arr1, arr2, arr3) => { ...@@ -977,8 +1004,8 @@ const setC = (arry, arr1, arr2, arr3) => {
977 type: 'linear', 1004 type: 'linear',
978 x: 0, y: 0, x2: 1, y2: 1, // 垂直渐变 1005 x: 0, y: 0, x2: 1, y2: 1, // 垂直渐变
979 colorStops: [ 1006 colorStops: [
980 {offset: 0, color: 'rgba(254, 151, 198, 1)'}, // 顶部颜色 1007 {offset: 0, color: 'rgba(201, 19, 34, 1)'}, // 顶部颜色
981 {offset: 1, color: 'rgba(176, 72, 119, 1)'} // 底部颜色 1008 // {offset: 1, color: 'rgba(176, 72, 119, 1)'} // 底部颜色
982 ], 1009 ],
983 }, 1010 },
984 }, 1011 },
......
...@@ -34,11 +34,15 @@ const list = computed(() => props.data || []) ...@@ -34,11 +34,15 @@ const list = computed(() => props.data || [])
34 34
35 const offset = ref(0); 35 const offset = ref(0);
36 const scrollInterval = ref(null); 36 const scrollInterval = ref(null);
37 const scrollInterval2 = ref(null);
37 const isPaused = ref(false); 38 const isPaused = ref(false);
38 const containerHeight = ref(0); 39 const containerHeight = ref(0);
39 const contentHeight = ref(0); 40 const contentHeight = ref(0);
40 const itemHeight = ref(0); 41 const itemHeight = ref(0);
41 42
43 function delay(ms) {
44 return new Promise(resolve => setTimeout(resolve, ms));
45 }
42 // 初始化滚动 46 // 初始化滚动
43 const initScroll = () => { 47 const initScroll = () => {
44 // 清除之前的定时器 48 // 清除之前的定时器
...@@ -46,18 +50,24 @@ const initScroll = () => { ...@@ -46,18 +50,24 @@ const initScroll = () => {
46 clearInterval(scrollInterval.value); 50 clearInterval(scrollInterval.value);
47 } 51 }
48 // 重置位置到第一条数据 52 // 重置位置到第一条数据
49 offset.value = 0; 53 offset.value = -props.speed-0.1;
50 54 scrollInterval2.value = setInterval(()=> {
51 // 设置定时器 55 // 设置定时器
52 scrollInterval.value = setInterval(() => { 56 scrollInterval.value = setInterval(() => {
53 if (!isPaused.value) { 57 if (!isPaused.value) {
54 offset.value -= props.speed; 58 offset.value -= props.speed;
55 // 当滚动到内容的一半时,重置位置实现无缝滚动 59 // 当滚动到内容的一半时,重置位置实现无缝滚动
56 if (Math.abs(offset.value) >= contentHeight.value / 2) { 60 if (Math.abs(offset.value) >= contentHeight.value / 2) {
57 offset.value += contentHeight.value / 2; 61 offset.value += contentHeight.value / 2;
62 }
58 } 63 }
59 } 64 if (offset.value>=(-props.speed)) {
60 }, 20); 65 console.log("1111111111111111111111111")
66 clearInterval(scrollInterval.value);
67 }
68 }, 20);
69 },10000)
70
61 }; 71 };
62 72
63 // 暂停滚动 73 // 暂停滚动
...@@ -96,6 +106,9 @@ onUnmounted(() => { ...@@ -96,6 +106,9 @@ onUnmounted(() => {
96 if (scrollInterval.value) { 106 if (scrollInterval.value) {
97 clearInterval(scrollInterval.value); 107 clearInterval(scrollInterval.value);
98 } 108 }
109 if (scrollInterval2.value) {
110 clearInterval(scrollInterval2.value);
111 }
99 }); 112 });
100 </script> 113 </script>
101 114
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!