看板
Showing
2 changed files
with
31 additions
and
35 deletions
| 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 :span="8"> | 4 | <el-col :span="type=='是'?8:12"> |
| 5 | <left-page/> | 5 | <left-page/> |
| 6 | </el-col> | 6 | </el-col> |
| 7 | <el-col :span="8"> | 7 | <el-col v-if="type=='是'" :span="8"> |
| 8 | <center-page/> | 8 | <center-page/> |
| 9 | </el-col> | 9 | </el-col> |
| 10 | <el-col :span="8"> | 10 | <el-col :span="type=='是'?8:12"> |
| 11 | <right-page/> | 11 | <right-page/> |
| 12 | </el-col> | 12 | </el-col> |
| 13 | </el-row> | 13 | </el-row> |
| ... | @@ -20,9 +20,9 @@ import LeftPage from "@/viewsPc/vip/leftPage" | ... | @@ -20,9 +20,9 @@ import LeftPage from "@/viewsPc/vip/leftPage" |
| 20 | import CenterPage from "@/viewsPc/vip/centerPage" | 20 | 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 | import {ref} from 'vue' | ||
| 23 | 24 | ||
| 24 | const fullUrl = window.location.href; | 25 | const type = ref('是') |
| 25 | const type = ref(null) | ||
| 26 | // url.value = window.location.host + '/pc.html#/match/list/' | 26 | // url.value = window.location.host + '/pc.html#/match/list/' |
| 27 | handelGetYS000() | 27 | handelGetYS000() |
| 28 | console.log(window.location.host) | 28 | console.log(window.location.host) |
| ... | @@ -30,8 +30,7 @@ console.log(window.location.host) | ... | @@ -30,8 +30,7 @@ console.log(window.location.host) |
| 30 | 30 | ||
| 31 | async function handelGetYS000() { | 31 | async function handelGetYS000() { |
| 32 | const res = await getYS000() | 32 | const res = await getYS000() |
| 33 | type.value = res.data.IFBASE | 33 | // type.value = res.data?.IFBASE || '否' |
| 34 | console.log(res) | ||
| 35 | } | 34 | } |
| 36 | 35 | ||
| 37 | 36 | ... | ... |
| ... | @@ -252,7 +252,7 @@ async function handelGetYS004() { | ... | @@ -252,7 +252,7 @@ async function handelGetYS004() { |
| 252 | })).sort((v1, v2) => v2.DSO - v1.DSO) | 252 | })).sort((v1, v2) => v2.DSO - v1.DSO) |
| 253 | 253 | ||
| 254 | let arr = [...haishangArr, ...daluArr] | 254 | let arr = [...haishangArr, ...daluArr] |
| 255 | let listX = arr.map(v => v.BASE) | 255 | let listX = arr.map(v => v.BASEJC) |
| 256 | 256 | ||
| 257 | let styleItem1 = { | 257 | let styleItem1 = { |
| 258 | color: { | 258 | color: { |
| ... | @@ -275,7 +275,7 @@ async function handelGetYS004() { | ... | @@ -275,7 +275,7 @@ async function handelGetYS004() { |
| 275 | {offset: 1, color: 'rgba(77, 197, 243, 1)'} // 底部颜色 | 275 | {offset: 1, color: 'rgba(77, 197, 243, 1)'} // 底部颜色 |
| 276 | ] | 276 | ] |
| 277 | }, | 277 | }, |
| 278 | borderColor: 'rgba(0, 255, 190, 1)', | 278 | borderColor: 'rgba(0, 168, 255, 1)', |
| 279 | borderWidth: 1 | 279 | borderWidth: 1 |
| 280 | } | 280 | } |
| 281 | 281 | ||
| ... | @@ -283,12 +283,10 @@ async function handelGetYS004() { | ... | @@ -283,12 +283,10 @@ async function handelGetYS004() { |
| 283 | value: v.DSO, | 283 | value: v.DSO, |
| 284 | day: v.DAYS, | 284 | day: v.DAYS, |
| 285 | itemStyle: v.type == 2 ? styleItem1 : styleItem2, | 285 | itemStyle: v.type == 2 ? styleItem1 : styleItem2, |
| 286 | name: v.type == 2 ? "陆地" : '海上' | 286 | name: v.type == 2 ? "陆地" : '海上', |
| 287 | type: v.type | ||
| 287 | })) | 288 | })) |
| 288 | 289 | ||
| 289 | let listHai = arr.map(v => v.type === 1 ? v.DSO : 0) | ||
| 290 | let listLu = arr.map(v => v.type === 2 ? v.DSO : 0) | ||
| 291 | |||
| 292 | handelZhu4(listX, dataList) | 290 | handelZhu4(listX, dataList) |
| 293 | } | 291 | } |
| 294 | 292 | ||
| ... | @@ -1119,25 +1117,6 @@ const handelZhu3 = (row1, row2) => { | ... | @@ -1119,25 +1117,6 @@ const handelZhu3 = (row1, row2) => { |
| 1119 | autoHover(chart33, option, 0, 2000) | 1117 | autoHover(chart33, option, 0, 2000) |
| 1120 | } | 1118 | } |
| 1121 | const handelZhu4 = (listX, dataList) => { | 1119 | const handelZhu4 = (listX, dataList) => { |
| 1122 | // let name1 = row1.BLOCK | ||
| 1123 | // let name2 = row2.BLOCK | ||
| 1124 | // let x1 = row1.list.forEach(val => val.type = 1) || [] | ||
| 1125 | // let x2 = row2.list.forEach(val => val.type = 2) || [] | ||
| 1126 | // let list = [...x1, ...x2].map(val => val.BASE) | ||
| 1127 | // let listX = [] | ||
| 1128 | // let listL = [] | ||
| 1129 | // let listH = [] | ||
| 1130 | // for (const val of list) { | ||
| 1131 | // listX.push(val.BASE) | ||
| 1132 | // if (val.type == 1) { | ||
| 1133 | // listL.push(val.DSO) | ||
| 1134 | // listH.push(0) | ||
| 1135 | // } else { | ||
| 1136 | // listL.push(0) | ||
| 1137 | // listH.push(val.DSO) | ||
| 1138 | // } | ||
| 1139 | // } | ||
| 1140 | |||
| 1141 | chart44 = echarts.init(zhuRef4.value) | 1120 | chart44 = echarts.init(zhuRef4.value) |
| 1142 | const option = { | 1121 | const option = { |
| 1143 | tooltip: { | 1122 | tooltip: { |
| ... | @@ -1152,6 +1131,23 @@ const handelZhu4 = (listX, dataList) => { | ... | @@ -1152,6 +1131,23 @@ const handelZhu4 = (listX, dataList) => { |
| 1152 | textStyle: { | 1131 | textStyle: { |
| 1153 | color: '#fff', // 文字颜色 | 1132 | color: '#fff', // 文字颜色 |
| 1154 | fontSize: 12, // 文字大小 | 1133 | fontSize: 12, // 文字大小 |
| 1134 | }, | ||
| 1135 | // 过滤数据 | ||
| 1136 | formatter: (row) => { | ||
| 1137 | console.log(row[0].data) | ||
| 1138 | return ` | ||
| 1139 | <div style="color: #fff;font-size: 12px;">${row[0].data.name}</div> | ||
| 1140 | <div style="color: #fff;font-size: 12px;"> | ||
| 1141 | <span style="background:${row[0].data.itemStyle.borderColor};display: inline-block;width: 10px;height: 10px;border-radius: 50%;"></span> | ||
| 1142 | <span style="margin-right: 20px;">DSO</span> | ||
| 1143 | ${row[0]?.data?.value} | ||
| 1144 | </div> | ||
| 1145 | <div style="color: #fff;font-size: 12px;"> | ||
| 1146 | <span style="background:${row[0].data.itemStyle.borderColor};display: inline-block;width: 10px;height: 10px;border-radius: 50%;"></span> | ||
| 1147 | <span style="margin-right: 20px;">天数</span> | ||
| 1148 | ${row[0]?.data?.day} | ||
| 1149 | </div> | ||
| 1150 | ` | ||
| 1155 | } | 1151 | } |
| 1156 | }, | 1152 | }, |
| 1157 | legend: { | 1153 | legend: { |
| ... | @@ -1164,6 +1160,7 @@ const handelZhu4 = (listX, dataList) => { | ... | @@ -1164,6 +1160,7 @@ const handelZhu4 = (listX, dataList) => { |
| 1164 | left: '3%', | 1160 | left: '3%', |
| 1165 | right: '4%', | 1161 | right: '4%', |
| 1166 | bottom: '3%', | 1162 | bottom: '3%', |
| 1163 | top: "20%", | ||
| 1167 | containLabel: true | 1164 | containLabel: true |
| 1168 | }, | 1165 | }, |
| 1169 | xAxis: [ | 1166 | xAxis: [ |
| ... | @@ -1185,7 +1182,7 @@ const handelZhu4 = (listX, dataList) => { | ... | @@ -1185,7 +1182,7 @@ const handelZhu4 = (listX, dataList) => { |
| 1185 | yAxis: [ | 1182 | yAxis: [ |
| 1186 | { | 1183 | { |
| 1187 | type: 'value', | 1184 | type: 'value', |
| 1188 | name: '天', | 1185 | name: '', |
| 1189 | axisLine: { | 1186 | axisLine: { |
| 1190 | show: true, | 1187 | show: true, |
| 1191 | lineStyle: { | 1188 | lineStyle: { |
| ... | @@ -1221,8 +1218,8 @@ const handelZhu4 = (listX, dataList) => { | ... | @@ -1221,8 +1218,8 @@ const handelZhu4 = (listX, dataList) => { |
| 1221 | {offset: 1, color: 'rgba(106, 235, 228, 1)'} // 底部颜色 | 1218 | {offset: 1, color: 'rgba(106, 235, 228, 1)'} // 底部颜色 |
| 1222 | ] | 1219 | ] |
| 1223 | }, | 1220 | }, |
| 1224 | borderColor: 'rgba(0, 255, 190, 1)', | 1221 | // borderColor: 'rgba(0, 255, 190, .5)', |
| 1225 | borderWidth: 1 | 1222 | // borderWidth: 1 |
| 1226 | }, | 1223 | }, |
| 1227 | barWidth: '30%', | 1224 | barWidth: '30%', |
| 1228 | }, | 1225 | }, | ... | ... |
-
Please register or sign in to post a comment