123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532 |
- <!--********************************************************************
- * Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
- *********************************************************************-->
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="UTF-8" />
- <title data-i18n="resources.title_componentsDemo_Vue"></title>
- <script type="text/javascript" include="vue" src="../js/include-web.js"></script>
- <script
- include="echarts-vue,ant-design-vue,iclient-mapboxgl-vue,mapbox-gl-enhance"
- src="../../dist/mapboxgl/include-mapboxgl.js"
- ></script>
- <style>
- #main {
- margin: 0 auto;
- width: 100%;
- height: 100vh;
- overflow: hidden;
- padding-left: 2.08vw;
- box-sizing: border-box;
- }
- @media screen and (max-width: 992px) {
- #main {
- overflow: auto;
- }
- }
- @media screen and (max-height: 640px) {
- #main {
- overflow: auto;
- }
- }
- /* #contentText {
- position: absolute;
- width: 490px;
- height: 130px;
- top: 180px;
- left: 60px;
- } */
- </style>
- </head>
- <body style="margin: 0;background: #fff;">
- <div id="main">
- <a-row>
- <a-col :md="8" class="left-container">
- <a-row v-if="!showMap">
- <div class="map-wrap">
- <sm-web-map server-url="https://www.supermapol.com" map-id="2068226677">
- <sm-zoom></sm-zoom>
- <sm-scale position="bottom-left"></sm-scale>
- </sm-web-map>
- </div>
- </a-row>
- <a-row class="title-text-wrap">
- <sm-text
- id="titleText"
- :font-style="titleFontStyle"
- text-color="#5AB1EF"
- title="国土空间规划实时监测评估预警"
- ></sm-text>
- </a-row>
- <a-row class="time-text-wrap">
- <sm-time-text
- id="timeText"
- :font-style='{"fontFamily": "微软雅黑"}'
- text-color="#B7B2B2"
- time-type="date+second+week"
- ></sm-time-text>
- </a-row>
- <a-row class="monitor-wrap">
- <a-row class="block-title">
- <sm-text id="monitoringText" :font-style="categoryFontStyle" title="监测情况"></sm-text>
- </a-row>
- <a-row class="monitor-text">
- <sm-text
- id="contentText"
- :font-style='{"fontFamily": "微软雅黑","fontWeight": "bolder","textAlign": "left"}'
- text-color="#807B7B"
- title="截止2018年底,国土空间整体开发强度为2.5%,三类空间比例为50%:30%:20%。耕地保有量为300万亩,城镇建设用地规模为300km²,森林覆盖率达到64%,水功能水质达标率为80%,生态环境治理良好。"
- >
- </sm-text>
- </a-row>
- </a-row>
- <a-row class="control-wrap">
- <a-row class="block-title">
- <sm-text id="sanxianText" :font-style="categoryFontStyle" title="三线管控"></sm-text>
- </a-row>
- <a-row type="flex" justify="space-around">
- <a-col :md="8" :sm="6" :xs="6" class="control-title">
- <sm-text id="ecologyText" :font-style="textFontStyle" title="生态空间"></sm-text>
- <sm-liquid-fill
- id="liquidFill1"
- :value="0.32"
- :font-size="18"
- :wave-count="2"
- :wave-animation="true"
- wave-color="#2EC7C9"
- >
- </sm-liquid-fill>
- </a-col>
- <a-col :md="8" :sm="6" :xs="6" class="control-title">
- <sm-text id="townText" :font-style="textFontStyle" title="城镇空间"></sm-text>
- <sm-liquid-fill
- id="liquidFill2"
- :value="0.48"
- :font-size="18"
- :wave-count="2"
- :wave-animation="true"
- wave-color="#ffb980"
- >
- </sm-liquid-fill>
- </a-col>
- <a-col :md="8" :sm="6" :xs="6" class="control-title">
- <sm-text id="farmText" :font-style="textFontStyle" title="农业空间"></sm-text>
- <sm-liquid-fill
- id="liquidFill3"
- :value="0.17"
- :font-size="18"
- :wave-count="3"
- :wave-animation="true"
- wave-color="#d87a80"
- >
- </sm-liquid-fill>
- </a-col>
- </a-row>
- </a-row>
- <a-row class="resource-wrap">
- <a-row class="block-title">
- <sm-text id="naturalText" :font-style="categoryFontStyle" title="自然资源"></sm-text>
- </a-row>
- <a-row type="flex" justify="end" class="resource-year">
- <a-col :md="9" :sm="8" :xs="8">
- <sm-text id="yearText1" :font-style="textFontStyle" title="2017年"></sm-text>
- </a-col>
- <a-col :md="9" :sm="8" :xs="8">
- <sm-text id="yearText2" :font-style="textFontStyle" title="2018年"></sm-text>
- </a-col>
- </a-row>
- <a-row type="flex" align="middle" class="resource-item">
- <a-col :md="6" :sm="8" :xs="8">
- <sm-indicator
- id="woodlandIndicator"
- title="林地保有量"
- unit="km²"
- num="300"
- font-size="26"
- ></sm-indicator>
- </a-col>
- <a-col :md="18" :sm="16" :xs="16" class="resource-chart">
- <a-col :md="12" :sm="12" :xs="12">
- <div class="sm-progress-wrap">
- <sm-progress
- id="progress5"
- size="100"
- stroke-color="#b6a2de"
- percent="30"
- stroke-width="6"
- type="circle"
- >
- </sm-progress>
- </div>
- </a-col>
- <a-col :md="12" :sm="12" :xs="12">
- <div class="sm-progress-wrap">
- <sm-progress
- id="progress6"
- size="100"
- stroke-color="#5ab1ef"
- percent="50"
- stroke-width="6"
- type="circle"
- >
- </sm-progress>
- </div>
- </a-col>
- </a-col>
- </a-row>
- <a-row type="flex" align="middle" class="resource-item">
- <a-col :md="6" :sm="8" :xs="8">
- <sm-indicator
- id="farmlandIndicator"
- title="耕地保有量"
- unit="万亩"
- num="300"
- font-size="26"
- ></sm-indicator>
- </a-col>
- <a-col :md="18" :sm="16" :xs="16" class="resource-chart">
- <a-col :md="12" :sm="12" :xs="12">
- <div class="sm-progress-wrap">
- <sm-progress
- id="progress7"
- size="100"
- stroke-color="#2ec7c9"
- percent="60"
- stroke-width="6"
- type="circle"
- >
- </sm-progress>
- </div>
- </a-col>
- <a-col :md="12" :sm="12" :xs="12">
- <div class="sm-progress-wrap">
- <sm-progress
- id="progress8"
- size="100"
- stroke-color="#ffb980"
- percent="80"
- stroke-width="6"
- type="circle"
- >
- </sm-progress>
- </div>
- </a-col>
- </a-col>
- </a-row>
- </a-row>
- </a-col>
- <a-col :md="16" :xs="24">
- <a-row v-if="showMap">
- <div class="map-wrap">
- <sm-web-map server-url="https://www.supermapol.com" map-id="2068226677">
- <sm-zoom></sm-zoom>
- <sm-scale position="bottom-left"></sm-scale>
- </sm-web-map>
- </div>
- </a-row>
- <a-row>
- <a-col :md="12" :xs="24" class="environment-wrap">
- <a-row class="environment-title block-title">
- <sm-icon id="icon1" icon-class="marker-layer" size="18" color="red"></sm-icon>
- <sm-text id="ecologicalText" :font-style="categoryFontStyle" title="生态环境"></sm-text>
- </a-row>
- <a-row class="environment-progress-holder">
- <a-col class="progress-col" :md="24" :xs="24">
- <sm-progress
- id="progress1"
- stroke-color="#2ec7c9"
- percent="80"
- stroke-width="10"
- type="line"
- ></sm-progress>
- </a-col>
- <a-col class="progress-col" :md="24" :xs="24">
- <sm-progress
- id="progress2"
- stroke-color="#ffb980"
- percent="40"
- stroke-width="10"
- type="line"
- ></sm-progress>
- </a-col>
- <a-col class="progress-col" :md="24" :xs="24">
- <sm-progress
- id="progress3"
- stroke-color="#b6a2de"
- percent="60"
- stroke-width="10"
- type="line"
- ></sm-progress>
- </a-col>
- <a-col class="progress-col" :md="24" :xs="24">
- <sm-progress
- id="progress4"
- stroke-color="#5ab1ef"
- percent="20"
- stroke-width="10"
- type="line"
- ></sm-progress>
- </a-col>
- </a-row>
- </a-col>
- <a-col :md="12" :xs="24" class="chart-wrap">
- <a-row class="chart-title block-title">
- <sm-icon id="icon2" icon-class="marker-layer" size="18" color="#2EC7C9"></sm-icon>
- <sm-text
- id="developmentText"
- :font-style="categoryFontStyle"
- title="开发利用"
- ></sm-text>
- </a-row>
- <a-row>
- <a-col :md="24" :xs="24">
- <sm-chart
- icon-class=""
- :options="echartOption"
- :dataset="dataset"
- :dataset-options="datasetOptions"
- >
- </sm-chart>
- </a-col>
- </a-row>
- </a-col>
- </a-row>
- </a-col>
- </a-row>
- </div>
- <script>
- //本示例数据纯属虚构
- new Vue({
- el: '#main',
- data() {
- return {
- dataset: {
- type: 'iPortal', //iServer iPortal
- url: 'https://iportal.supermap.io/iportal/web/datas/676516522',
- queryInfo: {
- maxFeatures: 20
- }
- },
- datasetOptions: [
- {
- seriesType: 'bar', //图表类型
- isStastic: true, //是否统计, 默认不统计
- xField: '机场', //x坐标轴数据字段
- yField: '2016起降架次(架次)' //统计的数据,legned默认名字
- },
- {
- seriesType: 'bar', //图表类型
- isStastic: true, //是否统计, 默认不统计
- xField: '机场', //x坐标轴数据字段
- yField: '2017起降架次(架次)' //统计的数据,legned默认名字
- }
- ],
- echartOption: {
- legend: { data: ['2017起降架次(架次)', '2016起降架次(架次)'] }, //与 yField数据一致
- grid: {
- top: 30,
- bottom: 65,
- left: 55,
- right: 40
- }
- },
- titleFontStyle: {
- fontFamily: '微软雅黑',
- fontWeight: 'bolder'
- },
- categoryFontStyle: {
- fontFamily: '微软雅黑',
- fontWeight: 'bolder',
- textAlign: 'left'
- },
- textFontStyle: {
- fontFamily: '微软雅黑',
- fontWeight: 'bolder',
- textAlign: 'center'
- },
- showMap: true
- };
- },
- mounted() {
- let screenWidth = document.body.clientWidth;
- if (screenWidth <= 540) {
- this.showMap = false;
- }
- }
- });
- </script>
- <style>
- html {
- font-size: 10px;
- }
- .left-container {
- padding-top: 2.2vh;
- padding-right: 1.2vw;
- }
- .map-wrap {
- height: 63vh;
- }
- #titleText {
- font-size: 2rem;
- }
- .title-text-wrap .sm-component-text {
- width: 100%;
- font-size: 1.6rem;
- line-height: 1.5;
- }
- .time-text-wrap .sm-component-time-text {
- text-align: center;
- display: block;
- margin: 0 auto;
- font-size: 1.2rem;
- }
- .block-title .sm-component-text {
- width: 100%;
- font-size: 1.4rem;
- line-height: 1.5;
- }
- .monitor-wrap {
- margin: 0.93vh 0;
- }
- .monitor-wrap .block-title {
- margin-bottom: 1.85vh;
- }
- .monitor-wrap .monitor-text .sm-component-text {
- width: 100%;
- font-size: 1.1rem;
- line-height: 1.5;
- }
- .control-wrap .block-title,
- .resource-wrap .block-title {
- /* margin-bottom: 1.2vh; */
- padding-top: 2.78vh;
- }
- .control-wrap .control-title .sm-component-liquidFill {
- height: 13.89vh;
- }
- .control-wrap .control-title .sm-component-text,
- .resource-wrap .resource-year .sm-component-text {
- width: 100%;
- margin-bottom: 0.93vh;
- font-size: 1.1rem;
- }
- .resource-wrap .resource-item {
- margin-bottom: 3.2vh;
- }
- .resource-wrap .resource-item:last-of-type {
- margin-bottom: 0;
- }
- .resource-wrap .resource-item .sm-component-indicator .sm-component-indicator__title,
- .resource-wrap .resource-item .sm-component-indicator .sm-component-indicator__unit {
- font-size: 1rem;
- line-height: 1.5;
- }
- .resource-wrap .resource-item .sm-component-indicator .sm-component-indicator__num {
- font-size: 1.5rem;
- }
- .resource-wrap .resource-item .sm-component-indicator .sm-component-indicator__content {
- margin-bottom: 0;
- margin-right: 0;
- }
- .resource-wrap .resource-chart .sm-component-progress-wrap {
- height: 12.96vh;
- }
- .resource-wrap .resource-chart .sm-component-progress {
- text-align: center;
- }
- .environment-wrap {
- padding-right: 6.77vw;
- }
- .environment-wrap .environment-title .sm-component-icon,
- .environment-wrap .environment-title .sm-component-text,
- .chart-wrap .chart-title .sm-component-icon,
- .chart-wrap .chart-title .sm-component-text {
- width: auto;
- display: inline-block;
- vertical-align: middle;
- }
- .environment-wrap .environment-title,
- .chart-wrap .chart-title {
- padding-top: 0.93vh;
- }
- .environment-wrap .environment-title {
- margin-bottom: 2.78vh;
- }
- .environment-wrap,
- .environment-progress-holder .progress-col {
- margin-bottom: 3.7vh;
- }
- .environment-wrap,
- .environment-progress-holder .progress-col:last-child {
- margin-bottom: 0;
- }
- .chart-wrap .chart-title {
- margin-bottom: 1.39vh;
- }
- .chart-wrap .sm-component-chart {
- height: 30vh;
- }
- .sm-component-chart .sm-component-collapse-card__content {
- box-shadow: 0 0 0 #fff;
- width: 100%;
- height: 28vh;
- }
- @media (max-width: 540px) {
- html {
- font-size: 10px;
- }
- .left-container {
- padding-top: 0;
- }
- .map-wrap {
- margin-left: -2.08vw;
- width: 100vw;
- height: 90vh;
- }
- }
- @media (min-width: 1200px) {
- html {
- font-size: 16px;
- }
- }
- </style>
- </body>
- </html>
|