|
47 | 47 | <div id="main"> |
48 | 48 | <a-row> |
49 | 49 | <a-col :md="8" class="left-container"> |
| 50 | + <a-row v-if="!showMap"> |
| 51 | + <div class="map-wrap"> |
| 52 | + <sm-web-map server-url="http://support.supermap.com.cn:8092" map-id="213343819"> |
| 53 | + <sm-zoom></sm-zoom> |
| 54 | + <sm-scale position="bottom-left"></sm-scale> |
| 55 | + </sm-web-map> |
| 56 | + </div> |
| 57 | + </a-row> |
50 | 58 | <a-row class="title-text-wrap"> |
51 | 59 | <sm-text |
52 | 60 | id="titleText" |
|
179 | 187 | <a-col :md="6" :sm="8" :xs="8"> |
180 | 188 | <sm-indicator |
181 | 189 | id="farmlandIndicator" |
182 | | - title="耕地地保有量" |
| 190 | + title="耕地保有量" |
183 | 191 | unit="万亩" |
184 | 192 | num="300" |
185 | 193 | font-size="26" |
|
217 | 225 | </a-row> |
218 | 226 | </a-col> |
219 | 227 |
|
220 | | - <a-col :md="16"> |
221 | | - <a-row> |
| 228 | + <a-col :md="16" :xs="24"> |
| 229 | + <a-row v-if="showMap"> |
222 | 230 | <div class="map-wrap"> |
223 | | - <sm-web-map |
224 | | - server-url='http://support.supermap.com.cn:8092' |
225 | | - map-id="213343819" |
226 | | - > |
| 231 | + <sm-web-map server-url="http://support.supermap.com.cn:8092" map-id="213343819"> |
227 | 232 | <sm-zoom></sm-zoom> |
228 | 233 | <sm-scale position="bottom-left"></sm-scale> |
229 | 234 | </sm-web-map> |
|
237 | 242 | <sm-text id="ecologicalText" :font-style="categoryFontStyle" title="生态环境"></sm-text> |
238 | 243 | </a-row> |
239 | 244 | <a-row class="environment-progress-holder"> |
240 | | - <a-col class='progress-col' :md="24" :xs="24"> |
| 245 | + <a-col class="progress-col" :md="24" :xs="24"> |
241 | 246 | <sm-progress |
242 | 247 | id="progress1" |
243 | 248 | stroke-color="#2ec7c9" |
|
246 | 251 | type="line" |
247 | 252 | ></sm-progress> |
248 | 253 | </a-col> |
249 | | - <a-col class='progress-col' :md="24" :xs="24"> |
| 254 | + <a-col class="progress-col" :md="24" :xs="24"> |
250 | 255 | <sm-progress |
251 | 256 | id="progress2" |
252 | 257 | stroke-color="#ffb980" |
|
255 | 260 | type="line" |
256 | 261 | ></sm-progress> |
257 | 262 | </a-col> |
258 | | - <a-col class='progress-col' :md="24" :xs="24"> |
| 263 | + <a-col class="progress-col" :md="24" :xs="24"> |
259 | 264 | <sm-progress |
260 | 265 | id="progress3" |
261 | 266 | stroke-color="#b6a2de" |
|
264 | 269 | type="line" |
265 | 270 | ></sm-progress> |
266 | 271 | </a-col> |
267 | | - <a-col class='progress-col' :md="24" :xs="24"> |
| 272 | + <a-col class="progress-col" :md="24" :xs="24"> |
268 | 273 | <sm-progress |
269 | 274 | id="progress4" |
270 | 275 | stroke-color="#5ab1ef" |
|
288 | 293 | <a-row> |
289 | 294 | <a-col :md="24" :xs="24"> |
290 | 295 | <sm-chart |
291 | | - icon-class="" |
292 | | - :options="echartOption" |
293 | | - :dataset="dataset" |
294 | | - :dataset-options="datasetOptions"> |
295 | | - </sm-chart> |
| 296 | + icon-class="" |
| 297 | + :options="echartOption" |
| 298 | + :dataset="dataset" |
| 299 | + :dataset-options="datasetOptions" |
| 300 | + > |
| 301 | + </sm-chart> |
296 | 302 | </a-col> |
297 | 303 | </a-row> |
298 | 304 | </a-col> |
|
304 | 310 | <script> |
305 | 311 | //本示例数据纯属虚构 |
306 | 312 | new Vue({ |
307 | | - el: "#main", |
| 313 | + el: '#main', |
308 | 314 | data() { |
309 | 315 | return { |
310 | | - dataset: { |
311 | | - type: "iPortal", //iServer iPortal |
312 | | - url: "http://support.supermap.com.cn:8092/web/datas/1920557079", |
| 316 | + dataset: { |
| 317 | + type: 'iPortal', //iServer iPortal |
| 318 | + url: 'http://support.supermap.com.cn:8092/web/datas/1920557079', |
313 | 319 | queryInfo: { |
314 | 320 | maxFeatures: 20 |
315 | 321 | } |
316 | 322 | }, |
317 | 323 | datasetOptions: [ |
318 | 324 | { |
319 | | - seriesType: "bar", //图表类型 |
| 325 | + seriesType: 'bar', //图表类型 |
320 | 326 | isStastic: true, //是否统计, 默认不统计 |
321 | | - xField: "机场", //x坐标轴数据字段 |
322 | | - yField: "2016起降架次(架次)" //统计的数据,legned默认名字 |
| 327 | + xField: '机场', //x坐标轴数据字段 |
| 328 | + yField: '2016起降架次(架次)' //统计的数据,legned默认名字 |
323 | 329 | }, |
324 | 330 | { |
325 | | - seriesType: "bar", //图表类型 |
| 331 | + seriesType: 'bar', //图表类型 |
326 | 332 | isStastic: true, //是否统计, 默认不统计 |
327 | | - xField: "机场", //x坐标轴数据字段 |
328 | | - yField: "2017起降架次(架次)" //统计的数据,legned默认名字 |
| 333 | + xField: '机场', //x坐标轴数据字段 |
| 334 | + yField: '2017起降架次(架次)' //统计的数据,legned默认名字 |
329 | 335 | } |
330 | 336 | ], |
331 | 337 | echartOption: { |
332 | | - legend: { data: ["2017起降架次(架次)", "2016起降架次(架次)"] }, //与 yField数据一致 |
| 338 | + legend: { data: ['2017起降架次(架次)', '2016起降架次(架次)'] }, //与 yField数据一致 |
333 | 339 | grid: { |
334 | 340 | top: 30, |
335 | | - bottom: 60, |
336 | | - left: 100, |
337 | | - right: 30 |
| 341 | + bottom: 65, |
| 342 | + left: 55, |
| 343 | + right: 40 |
338 | 344 | } |
339 | 345 | }, |
340 | 346 | titleFontStyle: { |
341 | | - fontFamily: "微软雅黑", |
342 | | - fontWeight: "bolder" |
| 347 | + fontFamily: '微软雅黑', |
| 348 | + fontWeight: 'bolder' |
343 | 349 | }, |
344 | 350 | categoryFontStyle: { |
345 | | - fontFamily: "微软雅黑", |
346 | | - fontWeight: "bolder", |
347 | | - textAlign: "left" |
| 351 | + fontFamily: '微软雅黑', |
| 352 | + fontWeight: 'bolder', |
| 353 | + textAlign: 'left' |
348 | 354 | }, |
349 | 355 | textFontStyle: { |
350 | | - fontFamily: "微软雅黑", |
351 | | - fontWeight: "bolder", |
352 | | - textAlign: "center" |
353 | | - } |
| 356 | + fontFamily: '微软雅黑', |
| 357 | + fontWeight: 'bolder', |
| 358 | + textAlign: 'center' |
| 359 | + }, |
| 360 | + showMap: true |
354 | 361 | }; |
| 362 | + }, |
| 363 | + mounted() { |
| 364 | + let screenWidth = document.body.clientWidth; |
| 365 | + if (screenWidth <= 540) { |
| 366 | + this.showMap = false; |
| 367 | + } |
355 | 368 | } |
356 | 369 | }); |
357 | 370 | </script> |
358 | 371 | <style> |
| 372 | + html { |
| 373 | + font-size: 10px; |
| 374 | + } |
| 375 | + |
359 | 376 | .left-container { |
360 | 377 | padding-top: 2.2vh; |
361 | 378 | padding-right: 1.2vw; |
|
365 | 382 | height: 63vh; |
366 | 383 | } |
367 | 384 | #titleText { |
368 | | - font-size: 1.8vw; |
| 385 | + font-size: 2rem; |
369 | 386 | } |
370 | 387 | .title-text-wrap .sm-component-text { |
371 | 388 | width: 100%; |
372 | | - font-size: 1.66vw; |
| 389 | + font-size: 1.6rem; |
373 | 390 | line-height: 1.5; |
374 | 391 | } |
375 | 392 |
|
376 | 393 | .time-text-wrap .sm-component-time-text { |
377 | 394 | text-align: center; |
378 | 395 | display: block; |
379 | 396 | margin: 0 auto; |
380 | | - font-size: 1.04vw; |
| 397 | + font-size: 1.2rem; |
381 | 398 | } |
382 | 399 |
|
383 | 400 | .block-title .sm-component-text { |
384 | 401 | width: 100%; |
385 | | - font-size: 1.15vw; |
| 402 | + font-size: 1.4rem; |
386 | 403 | line-height: 1.5; |
387 | 404 | } |
388 | 405 |
|
|
396 | 413 |
|
397 | 414 | .monitor-wrap .monitor-text .sm-component-text { |
398 | 415 | width: 100%; |
399 | | - font-size: 0.94vw; |
| 416 | + font-size: 1.1rem; |
400 | 417 | line-height: 1.5; |
401 | 418 | } |
402 | 419 |
|
|
414 | 431 | .resource-wrap .resource-year .sm-component-text { |
415 | 432 | width: 100%; |
416 | 433 | margin-bottom: 0.93vh; |
417 | | - font-size: 0.94vw; |
| 434 | + font-size: 1.1rem; |
418 | 435 | } |
419 | 436 |
|
420 | 437 | .resource-wrap .resource-item { |
|
427 | 444 |
|
428 | 445 | .resource-wrap .resource-item .sm-component-indicator .sm-component-indicator__title, |
429 | 446 | .resource-wrap .resource-item .sm-component-indicator .sm-component-indicator__unit { |
430 | | - font-size: 0.94vw; |
| 447 | + font-size: 1rem; |
431 | 448 | line-height: 1.5; |
432 | 449 | } |
433 | 450 |
|
434 | 451 | .resource-wrap .resource-item .sm-component-indicator .sm-component-indicator__num { |
435 | | - font-size: 1.35vw; |
| 452 | + font-size: 1.5rem; |
436 | 453 | } |
437 | 454 |
|
438 | 455 | .resource-wrap .resource-item .sm-component-indicator .sm-component-indicator__content { |
|
471 | 488 | } |
472 | 489 |
|
473 | 490 | .environment-wrap, |
474 | | - .environment-progress-holder .progress-col{ |
| 491 | + .environment-progress-holder .progress-col { |
475 | 492 | margin-bottom: 3.7vh; |
476 | 493 | } |
477 | 494 |
|
|
492 | 509 | width: 100%; |
493 | 510 | height: 28vh; |
494 | 511 | } |
| 512 | + @media (max-width: 540px) { |
| 513 | + html { |
| 514 | + font-size: 10px; |
| 515 | + } |
| 516 | + .left-container { |
| 517 | + padding-top: 0; |
| 518 | + } |
| 519 | + .map-wrap { |
| 520 | + margin-left: -2.08vw; |
| 521 | + width: 100vw; |
| 522 | + height: 90vh; |
| 523 | + } |
| 524 | + } |
| 525 | + @media (min-width: 1200px) { |
| 526 | + html { |
| 527 | + font-size: 16px; |
| 528 | + } |
| 529 | + } |
495 | 530 | </style> |
496 | 531 | </body> |
497 | 532 | </html> |
0 commit comments