8aaa76f2 by zhangmeng

数据对接

1 parent 9a56dbd1
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
17 </div> 17 </div>
18 </div> 18 </div>
19 </div> 19 </div>
20 20
21 <div class="bottom"> 21 <div class="bottom">
22 <div class="father dong"> 22 <div class="father dong">
23 <div style="display: flex"> 23 <div style="display: flex">
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
35 </div> 35 </div>
36 <div ref="zhuRef1" class="zhu" style="width:70%;height: 17vh"/> 36 <div ref="zhuRef1" class="zhu" style="width:70%;height: 17vh"/>
37 </div> 37 </div>
38 38
39 <hr> 39 <hr>
40 </div> 40 </div>
41 <div class="father"> 41 <div class="father">
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
54 </div> 54 </div>
55 <div ref="zhuRef2" class="zhu" style="width:70%;height: 17vh"/> 55 <div ref="zhuRef2" class="zhu" style="width:70%;height: 17vh"/>
56 </div> 56 </div>
57 57
58 <hr> 58 <hr>
59 </div> 59 </div>
60 <div class="father"> 60 <div class="father">
...@@ -97,6 +97,7 @@ import * as api from "@/apiPc/common" ...@@ -97,6 +97,7 @@ import * as api from "@/apiPc/common"
97 import {onMounted, ref} from 'vue' 97 import {onMounted, ref} from 'vue'
98 import {dayjs} from 'element-plus' 98 import {dayjs} from 'element-plus'
99 import {getYS001, getYS002, getYS003, getYS004, getYS005} from '@/api/server.js' 99 import {getYS001, getYS002, getYS003, getYS004, getYS005} from '@/api/server.js'
100 import {getLocalList} from "/@/apiPc/local";
100 101
101 102
102 const dataItems = ref([]); 103 const dataItems = ref([]);
...@@ -148,7 +149,7 @@ onMounted(() => { ...@@ -148,7 +149,7 @@ onMounted(() => {
148 // handelBing3() 149 // handelBing3()
149 // handelZhu3() 150 // handelZhu3()
150 // handelZhu4() 151 // handelZhu4()
151 152
152 }) 153 })
153 154
154 async function handelGetYS001() { 155 async function handelGetYS001() {
...@@ -178,7 +179,106 @@ async function handelGetYS003() { ...@@ -178,7 +179,106 @@ async function handelGetYS003() {
178 179
179 async function handelGetYS004() { 180 async function handelGetYS004() {
180 const res = await getYS004() 181 const res = await getYS004()
181 handelZhu4(res.data.blockgroup[0], res.data.blockgroup[1]) 182 console.log(res)
183 // let arrList = res.data.blockgroup
184 let arrList = [
185 {
186 BLOCK: '海上',
187 list: [
188 {
189 BASE: '上海',
190 DAYS: '6',
191 DSO: '20'
192 },
193 {
194 BASE: '浙江',
195 DAYS: '3',
196 DSO: '202'
197 },
198 {
199 BASE: '青岛',
200 DAYS: '61',
201 DSO: '230'
202 }
203 ]
204 },
205 {
206 BLOCK: '陆地',
207 list: [
208 {
209 BASE: '合肥',
210 DAYS: '61',
211 DSO: '20'
212 },
213 {
214 BASE: '北京',
215 DAYS: '33',
216 DSO: '202'
217 },
218 {
219 BASE: '河南',
220 DAYS: '61',
221 DSO: '230'
222 }
223 ]
224 }
225 ]
226 let haishang
227 let dalu
228 for (const v of arrList) {
229 if (v.BLOCK === '海上') {
230 haishang = v
231 } else {
232 dalu = v
233 }
234 }
235 let haishangArr = haishang.list.map(v => ({
236 ...v,
237 type: 1
238 }))
239 let daluArr = dalu.list.map(v => ({
240 ...v,
241 type: 2
242 }))
243
244 let arr = [...haishangArr, ...daluArr]
245 let listX = arr.map(v => v.BASE)
246
247 let styleItem1 = {
248 color: {
249 type: 'linear',
250 x: 0, y: 0, x2: 1, y2: 1, // 垂直渐变
251 colorStops: [
252 {offset: 0, color: 'rgba(21, 219, 203, 1)'}, // 顶部颜色
253 {offset: 1, color: 'rgba(106, 235, 228, 1)'} // 底部颜色
254 ]
255 },
256 borderColor: 'rgba(0, 255, 190, 1)',
257 borderWidth: 1
258 }
259 let styleItem2 = {
260 color: {
261 type: 'linear',
262 x: 0, y: 0, x2: 1, y2: 1, // 垂直渐变
263 colorStops: [
264 {offset: 0, color: 'rgba(0, 168, 255, 1)'}, // 顶部颜色
265 {offset: 1, color: 'rgba(77, 197, 243, 1)'} // 底部颜色
266 ]
267 },
268 borderColor: 'rgba(0, 255, 190, 1)',
269 borderWidth: 1
270 }
271
272 let dataList = arr.map(v => ({
273 value: v.DSO,
274 itemStyle: v.type == 2 ? styleItem1 : styleItem2,
275 name: v.type == 2 ? "陆地" : '海上'
276 }))
277
278 let listHai = arr.map(v => v.type === 1 ? v.DSO : 0)
279 let listLu = arr.map(v => v.type === 2 ? v.DSO : 0)
280
281 handelZhu4(listX, dataList)
182 } 282 }
183 283
184 async function handelGetYS005() { 284 async function handelGetYS005() {
...@@ -219,7 +319,7 @@ const handelBing1 = (arr1, arr2) => { ...@@ -219,7 +319,7 @@ const handelBing1 = (arr1, arr2) => {
219 tooltip: { 319 tooltip: {
220 trigger: '' 320 trigger: ''
221 }, 321 },
222 322
223 series: [ 323 series: [
224 { 324 {
225 name: '', 325 name: '',
...@@ -229,7 +329,7 @@ const handelBing1 = (arr1, arr2) => { ...@@ -229,7 +329,7 @@ const handelBing1 = (arr1, arr2) => {
229 label: { 329 label: {
230 show: false 330 show: false
231 }, 331 },
232 332
233 emphasis: { 333 emphasis: {
234 scale: false 334 scale: false
235 }, 335 },
...@@ -319,7 +419,7 @@ const handelBing1 = (arr1, arr2) => { ...@@ -319,7 +419,7 @@ const handelBing1 = (arr1, arr2) => {
319 } 419 }
320 ] 420 ]
321 } 421 }
322 422
323 chart1.setOption(option) 423 chart1.setOption(option)
324 autoHover(chart1, option, 3, 2000) 424 autoHover(chart1, option, 3, 2000)
325 } 425 }
...@@ -329,7 +429,7 @@ const handelBing2 = (row1, row2) => { ...@@ -329,7 +429,7 @@ const handelBing2 = (row1, row2) => {
329 tooltip: { 429 tooltip: {
330 trigger: '' 430 trigger: ''
331 }, 431 },
332 432
333 series: [ 433 series: [
334 { 434 {
335 name: '1', 435 name: '1',
...@@ -408,7 +508,7 @@ const handelBing2 = (row1, row2) => { ...@@ -408,7 +508,7 @@ const handelBing2 = (row1, row2) => {
408 }, 508 },
409 ] 509 ]
410 } 510 }
411 511
412 chart2.setOption(option) 512 chart2.setOption(option)
413 autoHover(chart2, option, 2, 2000) 513 autoHover(chart2, option, 2, 2000)
414 } 514 }
...@@ -418,7 +518,7 @@ const handelBing3 = (row1, row2) => { ...@@ -418,7 +518,7 @@ const handelBing3 = (row1, row2) => {
418 tooltip: { 518 tooltip: {
419 trigger: '' 519 trigger: ''
420 }, 520 },
421 521
422 series: [ 522 series: [
423 { 523 {
424 name: '1', 524 name: '1',
...@@ -508,7 +608,7 @@ const handelBing3 = (row1, row2) => { ...@@ -508,7 +608,7 @@ const handelBing3 = (row1, row2) => {
508 }, 608 },
509 ] 609 ]
510 } 610 }
511 611
512 chart3.setOption(option) 612 chart3.setOption(option)
513 autoHover(chart3, option, 0, 2000) 613 autoHover(chart3, option, 0, 2000)
514 } 614 }
...@@ -856,27 +956,27 @@ const handelZhu3 = (row1, row2) => { ...@@ -856,27 +956,27 @@ const handelZhu3 = (row1, row2) => {
856 chart33.setOption(option) 956 chart33.setOption(option)
857 autoHover(chart33, option, 0, 2000) 957 autoHover(chart33, option, 0, 2000)
858 } 958 }
859 const handelZhu4 = (row1, row2) => { 959 const handelZhu4 = (listX, dataList) => {
860 let name1 = row1.BLOCK 960 // let name1 = row1.BLOCK
861 let name2 = row2.BLOCK 961 // let name2 = row2.BLOCK
862 962 // console.log(name1, name2)
863 let x1 = row1.list.forEach(val => val.type = 1) || [] 963 // let x1 = row1.list.forEach(val => val.type = 1) || []
864 let x2 = row2.list.forEach(val => val.type = 2) || [] 964 // let x2 = row2.list.forEach(val => val.type = 2) || []
865 let list = [...x1, ...x2].map(val => val.BASE) 965 // let list = [...x1, ...x2].map(val => val.BASE)
866 let listX = [] 966 // let listX = []
867 let listL = [] 967 // let listL = []
868 let listH = [] 968 // let listH = []
869 for (const val of list) { 969 // for (const val of list) {
870 listX.push(val.BASE) 970 // listX.push(val.BASE)
871 if (val.type == 1) { 971 // if (val.type == 1) {
872 listL.push(val.DSO) 972 // listL.push(val.DSO)
873 listH.push(0) 973 // listH.push(0)
874 } else { 974 // } else {
875 listL.push(0) 975 // listL.push(0)
876 listH.push(val.DSO) 976 // listH.push(val.DSO)
877 } 977 // }
878 } 978 // }
879 979
880 chart44 = echarts.init(zhuRef4.value) 980 chart44 = echarts.init(zhuRef4.value)
881 const option = { 981 const option = {
882 tooltip: { 982 tooltip: {
...@@ -928,14 +1028,14 @@ const handelZhu4 = (row1, row2) => { ...@@ -928,14 +1028,14 @@ const handelZhu4 = (row1, row2) => {
928 ], 1028 ],
929 series: [ 1029 series: [
930 { 1030 {
931 name: name1, 1031 name: '陆地',
932 type: 'bar', 1032 type: 'bar',
933 barGap: 0, 1033 barGap: 0,
934 emphasis: { 1034 emphasis: {
935 focus: 'series' 1035 focus: 'series'
936 }, 1036 },
937 // data: [320, 332, 301, 334, 390, 330, 320, 320, 332, 301, 334, 390], 1037 // data: [320, 332, 301, 334, 390, 330, 320, 320, 332, 301, 334, 390],
938 data: listL, 1038 data: dataList,
939 itemStyle: { 1039 itemStyle: {
940 color: { 1040 color: {
941 type: 'linear', 1041 type: 'linear',
...@@ -951,14 +1051,14 @@ const handelZhu4 = (row1, row2) => { ...@@ -951,14 +1051,14 @@ const handelZhu4 = (row1, row2) => {
951 barWidth: '30%', 1051 barWidth: '30%',
952 }, 1052 },
953 { 1053 {
954 name: name2, 1054 name: '海上',
955 type: 'bar', 1055 type: 'bar',
956 barGap: 0, 1056 barGap: 0,
957 emphasis: { 1057 emphasis: {
958 focus: 'series' 1058 focus: 'series'
959 }, 1059 },
960 // data: [30, 332, 301, 334, 390, 330, 320, 320, 332, 301, 334, 390], 1060 // data: [30, 332, 301, 334, 390, 330, 320, 320, 332, 301, 334, 390],
961 data: listH, 1061 // data: listHai,
962 itemStyle: { 1062 itemStyle: {
963 color: { 1063 color: {
964 type: 'linear', 1064 type: 'linear',
...@@ -996,10 +1096,10 @@ function autoHover(myChart, option, index, time) { ...@@ -996,10 +1096,10 @@ function autoHover(myChart, option, index, time) {
996 1096
997 .center { 1097 .center {
998 width: 100%; 1098 width: 100%;
999 1099
1000 .father { 1100 .father {
1001 position: relative; 1101 position: relative;
1002 1102
1003 .tex4 { 1103 .tex4 {
1004 position: absolute; 1104 position: absolute;
1005 font-family: PingFang SC, serif; 1105 font-family: PingFang SC, serif;
...@@ -1012,7 +1112,7 @@ function autoHover(myChart, option, index, time) { ...@@ -1012,7 +1112,7 @@ function autoHover(myChart, option, index, time) {
1012 -webkit-text-fill-color: transparent; 1112 -webkit-text-fill-color: transparent;
1013 display: flex; 1113 display: flex;
1014 margin-top: calc(5 * 100vw / 1920); 1114 margin-top: calc(5 * 100vw / 1920);
1015 1115
1016 .titleImg { 1116 .titleImg {
1017 display: block; 1117 display: block;
1018 width: calc(50 * 100vw / 1920); 1118 width: calc(50 * 100vw / 1920);
...@@ -1020,10 +1120,10 @@ function autoHover(myChart, option, index, time) { ...@@ -1020,10 +1120,10 @@ function autoHover(myChart, option, index, time) {
1020 } 1120 }
1021 } 1121 }
1022 } 1122 }
1023 1123
1024 .dong { 1124 .dong {
1025 position: relative; 1125 position: relative;
1026 1126
1027 &::after { 1127 &::after {
1028 content: ''; 1128 content: '';
1029 width: 40%; 1129 width: 40%;
...@@ -1036,7 +1136,7 @@ function autoHover(myChart, option, index, time) { ...@@ -1036,7 +1136,7 @@ function autoHover(myChart, option, index, time) {
1036 animation: movelr 4s ease-in infinite; 1136 animation: movelr 4s ease-in infinite;
1037 } 1137 }
1038 } 1138 }
1039 1139
1040 .top { 1140 .top {
1041 padding-top: calc(20 * 100vw / 1920); 1141 padding-top: calc(20 * 100vw / 1920);
1042 display: flex; 1142 display: flex;
...@@ -1044,14 +1144,14 @@ function autoHover(myChart, option, index, time) { ...@@ -1044,14 +1144,14 @@ function autoHover(myChart, option, index, time) {
1044 align-items: center; 1144 align-items: center;
1045 position: relative; 1145 position: relative;
1046 overflow: hidden; 1146 overflow: hidden;
1047 1147
1048 .left { 1148 .left {
1049 background: url("@/assets/image/box02@2x.png") no-repeat center; 1149 background: url("@/assets/image/box02@2x.png") no-repeat center;
1050 background-size: 100% 100%; 1150 background-size: 100% 100%;
1051 width: calc(140 * 100vw / 1920); 1151 width: calc(140 * 100vw / 1920);
1052 height: calc(210 * 100vh / 1920); 1152 height: calc(210 * 100vh / 1920);
1053 1153
1054 1154
1055 .titleTop { 1155 .titleTop {
1056 text-align: center; 1156 text-align: center;
1057 font-family: PingFang SC, serif; 1157 font-family: PingFang SC, serif;
...@@ -1063,7 +1163,7 @@ function autoHover(myChart, option, index, time) { ...@@ -1063,7 +1163,7 @@ function autoHover(myChart, option, index, time) {
1063 -webkit-background-clip: text; 1163 -webkit-background-clip: text;
1064 -webkit-text-fill-color: transparent; 1164 -webkit-text-fill-color: transparent;
1065 } 1165 }
1066 1166
1067 .titleCenter { 1167 .titleCenter {
1068 //text-align: center; 1168 //text-align: center;
1069 padding-left: calc(21 * 100vw / 1920); 1169 padding-left: calc(21 * 100vw / 1920);
...@@ -1072,30 +1172,30 @@ function autoHover(myChart, option, index, time) { ...@@ -1072,30 +1172,30 @@ function autoHover(myChart, option, index, time) {
1072 font-size: calc(15 * 100vw / 1920); 1172 font-size: calc(15 * 100vw / 1920);
1073 color: #FFFFFF; 1173 color: #FFFFFF;
1074 margin-top: calc(22 * 100vh / 1920); 1174 margin-top: calc(22 * 100vh / 1920);
1075 1175
1076 span { 1176 span {
1077 margin-left: calc(10 * 100vw / 1920); 1177 margin-left: calc(10 * 100vw / 1920);
1078 font-size: calc(17 * 100vw / 1920); 1178 font-size: calc(17 * 100vw / 1920);
1079 } 1179 }
1080 1180
1081 .tex1 { 1181 .tex1 {
1082 color: #F4AB09 1182 color: #F4AB09
1083 } 1183 }
1084 1184
1085 .tex2 { 1185 .tex2 {
1086 color: #1DFBD1; 1186 color: #1DFBD1;
1087 } 1187 }
1088 } 1188 }
1089 1189
1090 } 1190 }
1091 1191
1092 .right { 1192 .right {
1093 background: url("@/assets/image/box03@2x.png") no-repeat center; 1193 background: url("@/assets/image/box03@2x.png") no-repeat center;
1094 background-size: 100% 100%; 1194 background-size: 100% 100%;
1095 width: calc(480 * 100vw / 1920); 1195 width: calc(480 * 100vw / 1920);
1096 height: calc(220 * 100vh / 1920); 1196 height: calc(220 * 100vh / 1920);
1097 padding: calc(13 * 100vw / 1920) calc(35 * 100vw / 1920); 1197 padding: calc(13 * 100vw / 1920) calc(35 * 100vw / 1920);
1098 1198
1099 .rTop { 1199 .rTop {
1100 display: flex; 1200 display: flex;
1101 justify-content: space-between; 1201 justify-content: space-between;
...@@ -1107,13 +1207,13 @@ function autoHover(myChart, option, index, time) { ...@@ -1107,13 +1207,13 @@ function autoHover(myChart, option, index, time) {
1107 background: linear-gradient(180deg, #75E2E9 0%, #FFFFFF 100%); 1207 background: linear-gradient(180deg, #75E2E9 0%, #FFFFFF 100%);
1108 -webkit-background-clip: text; 1208 -webkit-background-clip: text;
1109 -webkit-text-fill-color: transparent; 1209 -webkit-text-fill-color: transparent;
1110 1210
1111 .rTop-img { 1211 .rTop-img {
1112 width: calc(30 * 100vw / 1920); 1212 width: calc(30 * 100vw / 1920);
1113 height: calc(24 * 100vh / 1920); 1213 height: calc(24 * 100vh / 1920);
1114 } 1214 }
1115 } 1215 }
1116 1216
1117 .rBotton { 1217 .rBotton {
1118 height: calc(130 * 100vh / 1920); 1218 height: calc(130 * 100vh / 1920);
1119 //overflow-y: scroll; 1219 //overflow-y: scroll;
...@@ -1124,7 +1224,7 @@ function autoHover(myChart, option, index, time) { ...@@ -1124,7 +1224,7 @@ function autoHover(myChart, option, index, time) {
1124 color: #FFFFFF; 1224 color: #FFFFFF;
1125 height: calc(40 * 100vh / 1920); 1225 height: calc(40 * 100vh / 1920);
1126 margin: calc(8 * 100vw / 1920) 0; 1226 margin: calc(8 * 100vw / 1920) 0;
1127 1227
1128 span { 1228 span {
1129 display: inline-block; 1229 display: inline-block;
1130 width: calc(12 * 100vw / 1920); 1230 width: calc(12 * 100vw / 1920);
...@@ -1138,7 +1238,7 @@ function autoHover(myChart, option, index, time) { ...@@ -1138,7 +1238,7 @@ function autoHover(myChart, option, index, time) {
1138 } 1238 }
1139 } 1239 }
1140 } 1240 }
1141 1241
1142 .bottom { 1242 .bottom {
1143 background: url("@/assets/image/box04@2x.png") no-repeat center; 1243 background: url("@/assets/image/box04@2x.png") no-repeat center;
1144 background-size: 100% 100%; 1244 background-size: 100% 100%;
...@@ -1146,11 +1246,11 @@ function autoHover(myChart, option, index, time) { ...@@ -1146,11 +1246,11 @@ function autoHover(myChart, option, index, time) {
1146 padding: calc(10 * 100vw / 1920); 1246 padding: calc(10 * 100vw / 1920);
1147 position: relative; 1247 position: relative;
1148 overflow: hidden; 1248 overflow: hidden;
1149 1249
1150 1250
1151 .bing { 1251 .bing {
1152 text-align: center; 1252 text-align: center;
1153 1253
1154 .bingTitle { 1254 .bingTitle {
1155 font-family: PingFang SC, serif; 1255 font-family: PingFang SC, serif;
1156 font-weight: 500; 1256 font-weight: 500;
...@@ -1162,21 +1262,21 @@ function autoHover(myChart, option, index, time) { ...@@ -1162,21 +1262,21 @@ function autoHover(myChart, option, index, time) {
1162 -webkit-text-fill-color: transparent; 1262 -webkit-text-fill-color: transparent;
1163 display: flex; 1263 display: flex;
1164 margin-top: calc(10 * 100vw / 1920); 1264 margin-top: calc(10 * 100vw / 1920);
1165 1265
1166 .titleImg { 1266 .titleImg {
1167 display: block; 1267 display: block;
1168 width: calc(50 * 100vw / 1920); 1268 width: calc(50 * 100vw / 1920);
1169 height: calc(20 * 100vw / 1920); 1269 height: calc(20 * 100vw / 1920);
1170 } 1270 }
1171 } 1271 }
1172 1272
1173 .bingBottom { 1273 .bingBottom {
1174 position: absolute; 1274 position: absolute;
1175 z-index: 9; 1275 z-index: 9;
1176 bottom: 4%; 1276 bottom: 4%;
1177 left: 0; 1277 left: 0;
1178 width: 30%; 1278 width: 30%;
1179 1279
1180 div { 1280 div {
1181 font-family: PingFang SC; 1281 font-family: PingFang SC;
1182 font-weight: 400; 1282 font-weight: 400;
......
...@@ -22,8 +22,16 @@ ...@@ -22,8 +22,16 @@
22 </el-select> 22 </el-select>
23 </div> 23 </div>
24 <div class="itemBox"> 24 <div class="itemBox">
25 <el-select v-model="queryParams.select2" class="select" placeholder="数据因素(可多选)" size="small"> 25 <el-select
26 <el-option label="数据因素(可多选)" value="month"/> 26 v-model="type1"
27 class="select"
28 collapse-tags
29 multiple
30 placeholder="数据因素"
31 size="small"
32 @change="handelSelect1">
33 <el-option label="收入" value="1"/>
34 <el-option label="应收账款余额" value="2"/>
27 </el-select> 35 </el-select>
28 </div> 36 </div>
29 </div> 37 </div>
...@@ -74,6 +82,7 @@ const radioB = ref('month') ...@@ -74,6 +82,7 @@ const radioB = ref('month')
74 82
75 const type3 = ref('0') 83 const type3 = ref('0')
76 const type2 = ref([]) 84 const type2 = ref([])
85 const type1 = ref(['1', '2'])
77 86
78 const list = ref([]) 87 const list = ref([])
79 88
...@@ -133,7 +142,6 @@ async function handelGetYS006() { ...@@ -133,7 +142,6 @@ async function handelGetYS006() {
133 s2.value[i2] += v2.LASTINCOME || 0; 142 s2.value[i2] += v2.LASTINCOME || 0;
134 s3.value[i2] += v2.LASTYSBALANCE || 0; 143 s3.value[i2] += v2.LASTYSBALANCE || 0;
135 s4.value[i2] += v2.YSBALANCE || 0; 144 s4.value[i2] += v2.YSBALANCE || 0;
136
137 } 145 }
138 } 146 }
139 147
...@@ -159,10 +167,24 @@ async function handelGetYS006() { ...@@ -159,10 +167,24 @@ async function handelGetYS006() {
159 // 167 //
160 168
161 setA(set1.value) 169 setA(set1.value)
162 setB(s1.value, s2.value, s3.value, s4.value) 170 setB(
171 type1.value.includes('1') ? s1.value : [],
172 type1.value.includes('1') ? s2.value : [],
173 type1.value.includes('2') ? s3.value : [],
174 type1.value.includes('2') ? s4.value : []
175 )
163 setC(h1.value, h2.value, h3.value) 176 setC(h1.value, h2.value, h3.value)
164 } 177 }
165 178
179 function handelSelect1() {
180 setB(
181 type1.value.includes('1') ? s1.value : [],
182 type1.value.includes('1') ? s2.value : [],
183 type1.value.includes('2') ? s3.value : [],
184 type1.value.includes('2') ? s4.value : []
185 )
186 }
187
166 function handelSelect2() { 188 function handelSelect2() {
167 console.log(type2.value) 189 console.log(type2.value)
168 let arr = type2.value.map(val => list.value.find(item => item.BASE === val)) 190 let arr = type2.value.map(val => list.value.find(item => item.BASE === val))
...@@ -175,7 +197,13 @@ function handelSelect2() { ...@@ -175,7 +197,13 @@ function handelSelect2() {
175 s4.value[i2] += v2.YSBALANCE || 0; 197 s4.value[i2] += v2.YSBALANCE || 0;
176 } 198 }
177 } 199 }
178 setB(s1.value, s2.value, s3.value, s4.value) 200
201 setB(
202 type1.value.includes('1') ? s1.value : [],
203 type1.value.includes('1') ? s2.value : [],
204 type1.value.includes('2') ? s3.value : [],
205 type1.value.includes('2') ? s4.value : []
206 )
179 } 207 }
180 208
181 function handelSelect3() { 209 function handelSelect3() {
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!