|
@@ -18,15 +18,88 @@
|
|
|
<div class="right_visitor">
|
|
|
<div class="flex_spection">
|
|
|
<HeadlineTag type="right" value="园区基本信息"></HeadlineTag>
|
|
|
+ <div class="card_visitor_star">
|
|
|
+ <div class="item_visitor_top">
|
|
|
+ <div class="circle_itor center_in">
|
|
|
+ <svg class="visitor_star" aria-hidden="true">
|
|
|
+ <defs>
|
|
|
+ <linearGradient id="myGradient" x1="0%" y1="100%" x2="0%" y2="0%">
|
|
|
+ <stop offset="0%" stop-color="rgb(20, 188, 244)" />
|
|
|
+ <stop offset="100%" stop-color="#ffffff" />
|
|
|
+ </linearGradient>
|
|
|
+ </defs>
|
|
|
+ <use xlink:href="#icon-user" fill="url('#myGradient')" />
|
|
|
+ </svg>
|
|
|
+ </div>
|
|
|
+ <div class="title_box_itor">
|
|
|
+ <div class="title_itor_13">总规划建筑面积</div>
|
|
|
+ <div class="title_itor_18">142万</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="item_visitor_top">
|
|
|
+ <div class="circle_itor center_in">
|
|
|
+ <svg class="visitor_star" aria-hidden="true">
|
|
|
+ <defs>
|
|
|
+ <linearGradient id="myGradient" x1="0%" y1="100%" x2="0%" y2="0%">
|
|
|
+ <stop offset="0%" stop-color="rgb(20, 188, 244)" />
|
|
|
+ <stop offset="100%" stop-color="#ffffff" />
|
|
|
+ </linearGradient>
|
|
|
+ </defs>
|
|
|
+ <use xlink:href="#icon-user" fill="url('#myGradient')" />
|
|
|
+ </svg>
|
|
|
+ </div>
|
|
|
+ <div class="title_box_itor">
|
|
|
+ <div class="title_itor_13">总规划建筑面积</div>
|
|
|
+ <div class="title_itor_18">142万</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="item_visitor_top">
|
|
|
+ <div class="circle_itor center_in">
|
|
|
+ <svg class="visitor_star" aria-hidden="true">
|
|
|
+ <defs>
|
|
|
+ <linearGradient id="myGradient" x1="0%" y1="100%" x2="0%" y2="0%">
|
|
|
+ <stop offset="0%" stop-color="rgb(20, 188, 244)" />
|
|
|
+ <stop offset="100%" stop-color="#ffffff" />
|
|
|
+ </linearGradient>
|
|
|
+ </defs>
|
|
|
+ <use xlink:href="#icon-user" fill="url('#myGradient')" />
|
|
|
+ </svg>
|
|
|
+ </div>
|
|
|
+ <div class="title_box_itor">
|
|
|
+ <div class="title_itor_13">总规划建筑面积</div>
|
|
|
+ <div class="title_itor_18">142万</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="item_visitor_top">
|
|
|
+ <div class="circle_itor center_in">
|
|
|
+ <svg class="visitor_star" aria-hidden="true">
|
|
|
+ <defs>
|
|
|
+ <linearGradient id="myGradient" x1="0%" y1="100%" x2="0%" y2="0%">
|
|
|
+ <stop offset="0%" stop-color="rgb(20, 188, 244)" />
|
|
|
+ <stop offset="100%" stop-color="#ffffff" />
|
|
|
+ </linearGradient>
|
|
|
+ </defs>
|
|
|
+ <use xlink:href="#icon-user" fill="url('#myGradient')" />
|
|
|
+ </svg>
|
|
|
+ </div>
|
|
|
+ <div class="title_box_itor">
|
|
|
+ <div class="title_itor_13">总规划建筑面积</div>
|
|
|
+ <div class="title_itor_18">142万</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
<div class="flex_spection">
|
|
|
- <HeadlineTag type="right" value="园区基本信息"></HeadlineTag>
|
|
|
+ <HeadlineTag type="right" value="访客统计"></HeadlineTag>
|
|
|
<div class="box_arch">
|
|
|
<starView></starView>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="flex_spection">
|
|
|
- <HeadlineTag type="right" value="园区基本信息"></HeadlineTag>
|
|
|
+ <HeadlineTag type="right" value="外地人员分配"></HeadlineTag>
|
|
|
+ <div class="box_arch">
|
|
|
+ <div ref="chartDom" style="width: 100%;height: 100%;" />
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -46,6 +119,201 @@ const input = ref('')
|
|
|
/** 查询列表 */
|
|
|
function getList() {
|
|
|
};
|
|
|
+
|
|
|
+const chartDom = ref(null);
|
|
|
+let chartInstance = null;
|
|
|
+// 初始化图表
|
|
|
+const initChart = () => {
|
|
|
+ var colorList = [{
|
|
|
+ type: 'linear',
|
|
|
+ x: 0,
|
|
|
+ y: 0,
|
|
|
+ x2: 1,
|
|
|
+ y2: 1,
|
|
|
+ colorStops: [{
|
|
|
+ offset: 0,
|
|
|
+ color: 'rgba(51,192,205,0.01)' // 0% 处的颜色
|
|
|
+ },
|
|
|
+ {
|
|
|
+ offset: 1,
|
|
|
+ color: 'rgba(51,192,205,0.57)' // 100% 处的颜色
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ globalCoord: false // 缺省为 false
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: 'linear',
|
|
|
+ x: 1,
|
|
|
+ y: 0,
|
|
|
+ x2: 0,
|
|
|
+ y2: 1,
|
|
|
+ colorStops: [{
|
|
|
+ offset: 0,
|
|
|
+ color: 'rgba(115,172,255,0.02)' // 0% 处的颜色
|
|
|
+ },
|
|
|
+ {
|
|
|
+ offset: 1,
|
|
|
+ color: 'rgba(115,172,255,0.67)' // 100% 处的颜色
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ globalCoord: false // 缺省为 false
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: 'linear',
|
|
|
+ x: 1,
|
|
|
+ y: 0,
|
|
|
+ x2: 0,
|
|
|
+ y2: 0,
|
|
|
+ colorStops: [{
|
|
|
+ offset: 0,
|
|
|
+ color: 'rgba(158,135,255,0.02)' // 0% 处的颜色
|
|
|
+ },
|
|
|
+ {
|
|
|
+ offset: 1,
|
|
|
+ color: 'rgba(158,135,255,0.57)' // 100% 处的颜色
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ globalCoord: false // 缺省为 false
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: 'linear',
|
|
|
+ x: 0,
|
|
|
+ y: 1,
|
|
|
+ x2: 0,
|
|
|
+ y2: 0,
|
|
|
+ colorStops: [{
|
|
|
+ offset: 0,
|
|
|
+ color: 'rgba(252,75,75,0.01)' // 0% 处的颜色
|
|
|
+ },
|
|
|
+ {
|
|
|
+ offset: 1,
|
|
|
+ color: 'rgba(252,75,75,0.57)' // 100% 处的颜色
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ globalCoord: false // 缺省为 false
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: 'linear',
|
|
|
+ x: 1,
|
|
|
+ y: 1,
|
|
|
+ x2: 1,
|
|
|
+ y2: 0,
|
|
|
+ colorStops: [{
|
|
|
+ offset: 0,
|
|
|
+ color: 'rgba(253,138,106,0.01)' // 0% 处的颜色
|
|
|
+ },
|
|
|
+ {
|
|
|
+ offset: 1,
|
|
|
+ color: '#FDB36ac2' // 100% 处的颜色
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ globalCoord: false // 缺省为 false
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: 'linear',
|
|
|
+ x: 0,
|
|
|
+ y: 0,
|
|
|
+ x2: 1,
|
|
|
+ y2: 0,
|
|
|
+ colorStops: [{
|
|
|
+ offset: 0,
|
|
|
+ color: 'rgba(254,206,67,0.12)' // 0% 处的颜色
|
|
|
+ },
|
|
|
+ {
|
|
|
+ offset: 1,
|
|
|
+ color: '#FECE4391' // 100% 处的颜色
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ globalCoord: false // 缺省为 false
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ var colorLine = ['#33C0CD', '#73ACFF', '#9E87FF', '#FE6969', '#FDB36A', '#FECE43']
|
|
|
+
|
|
|
+ function getRich() {
|
|
|
+ let result = {}
|
|
|
+ colorLine.forEach((v, i) => {
|
|
|
+ result[`hr${i}`] = {
|
|
|
+ backgroundColor: colorLine[i],
|
|
|
+ borderRadius: 3,
|
|
|
+ width: 3,
|
|
|
+ height: 3,
|
|
|
+ padding: [3, 3, 0, -12]
|
|
|
+ }
|
|
|
+ result[`a${i}`] = {
|
|
|
+ padding: [-11, 6, -20, 6],
|
|
|
+ color: colorLine[i],
|
|
|
+ backgroundColor: 'transparent',
|
|
|
+ fontSize: 12
|
|
|
+ }
|
|
|
+ })
|
|
|
+ return result
|
|
|
+ }
|
|
|
+ let data = [{
|
|
|
+ 'name': '北京',
|
|
|
+ 'value': 25
|
|
|
+ }, {
|
|
|
+ 'name': '上海',
|
|
|
+ 'value': 20
|
|
|
+ }, {
|
|
|
+ 'name': '广州',
|
|
|
+ 'value': 18
|
|
|
+ }, {
|
|
|
+ 'name': '深圳',
|
|
|
+ 'value': 15
|
|
|
+ }, {
|
|
|
+ 'name': '未知',
|
|
|
+ 'value': 13
|
|
|
+ }, {
|
|
|
+ 'name': '海外',
|
|
|
+ 'value': 9
|
|
|
+ }].sort((a, b) => {
|
|
|
+ return b.value - a.value
|
|
|
+ })
|
|
|
+ data.forEach((v, i) => {
|
|
|
+ v.labelLine = {
|
|
|
+ lineStyle: {
|
|
|
+ width: 1,
|
|
|
+ color: colorLine[i]
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ chartInstance = echarts.init(chartDom.value);
|
|
|
+ chartInstance.setOption({
|
|
|
+ series: [{
|
|
|
+ type: 'pie',
|
|
|
+ radius: '60%',
|
|
|
+ center: ['50%', '45%'],
|
|
|
+ clockwise: true,
|
|
|
+ avoidLabelOverlap: true,
|
|
|
+ label: {
|
|
|
+ show: true,
|
|
|
+ position: 'outside',
|
|
|
+ formatter: function (params) {
|
|
|
+ const name = params.name
|
|
|
+ const percent = params.percent + '%'
|
|
|
+ const index = params.dataIndex
|
|
|
+ return [`{a${index}|${name}:${percent}}`, `{hr${index}|}`].join('\n')
|
|
|
+ },
|
|
|
+ rich: getRich()
|
|
|
+ },
|
|
|
+ itemStyle: {
|
|
|
+ normal: {
|
|
|
+ color: function (params) {
|
|
|
+ return colorList[params.dataIndex]
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ data,
|
|
|
+ roseType: 'radius'
|
|
|
+ }]
|
|
|
+ });
|
|
|
+};
|
|
|
+// 生命周期
|
|
|
+onMounted(initChart);
|
|
|
+// 窗口自适应
|
|
|
+window.addEventListener('resize', () => {
|
|
|
+ chartInstance?.resize();
|
|
|
+});
|
|
|
</script>
|
|
|
|
|
|
<style scoped lang="scss">
|
|
@@ -112,4 +380,53 @@ function getList() {
|
|
|
.point_box :deep(.el-input__inner) {
|
|
|
color: #ffffff !important;
|
|
|
}
|
|
|
+
|
|
|
+.card_visitor_star {
|
|
|
+ height: calc(100% - 40px);
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+}
|
|
|
+
|
|
|
+.item_visitor_top {
|
|
|
+ flex: 1;
|
|
|
+ margin: 10px 0px;
|
|
|
+ padding-left: 20px;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ border-left: 2px solid rgb(67, 182, 235);
|
|
|
+ background-image: linear-gradient(to right, rgba(15, 73, 138, 1) 0%, rgba(13, 65, 125, 0.5) 21%, rgba(13, 65, 125, 0.5) 52%, rgba(0, 0, 0, 0) 78%, rgba(0, 0, 0, 0) 100%);
|
|
|
+}
|
|
|
+
|
|
|
+.circle_itor {
|
|
|
+ width: 60px;
|
|
|
+ height: 60px;
|
|
|
+ border-radius: 50%;
|
|
|
+ border: 2px solid rgb(103, 168, 202);
|
|
|
+}
|
|
|
+
|
|
|
+.title_box_itor {
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ align-items: center;
|
|
|
+ padding-left: 20px;
|
|
|
+}
|
|
|
+
|
|
|
+.title_itor_13 {
|
|
|
+ font-size: 13px;
|
|
|
+}
|
|
|
+
|
|
|
+.title_itor_18 {
|
|
|
+ padding-top: 10px;
|
|
|
+ font-weight: bold;
|
|
|
+ font-size: 18px;
|
|
|
+ background-image: -webkit-linear-gradient(bottom, rgb(20, 127, 228), rgb(229, 232, 236));
|
|
|
+ -webkit-background-clip: text;
|
|
|
+ -webkit-text-fill-color: transparent;
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+.visitor_star {
|
|
|
+ width: 30px;
|
|
|
+ height: 30px;
|
|
|
+}
|
|
|
</style>
|