Browse Source

地图

master
lucky 5 years ago
parent
commit
5f8826280e
  1. 1
      src/common/index.styl
  2. 44
      src/components/Map/Map.js
  3. 1
      src/components/Map/Map.vue
  4. 21
      src/components/RFID/RFID.styl
  5. 26
      src/components/RFID/RFID.vue
  6. 22
      src/views/Index/Index.vue

1
src/common/index.styl

@ -21,6 +21,7 @@
height: 100.64px; height: 100.64px;
left: 1.5%; left: 1.5%;
top: 0; top: 0;
z-index: 9;
} }
.wrap .bg-top .animation{ .wrap .bg-top .animation{

44
src/components/Map/Map.js

@ -4,47 +4,53 @@ var option = {
type: 'map3D', type: 'map3D',
name: '山西', name: '山西',
selectedMode: 'single', //地图高亮单选 selectedMode: 'single', //地图高亮单选
boxDepth: 90, //地图倾斜度 boxDepth: 230, //地图倾斜度
regionHeight: 8, //地图高度 regionHeight: 6, //地图高度
map: '山西', map: '山西',
viewControl: { viewControl: {
distance: 150, //地图视角 控制初始大小 distance: 1000, //地图视角 控制初始大小
rotateSensitivity: 0, //禁止旋转 rotateSensitivity: 1, //禁止旋转
zoomSensitivity: 0, //禁止缩放 zoomSensitivity: 1, //禁止缩放
}, },
label: { label: {
show: true, //是否显示市 show: true, //是否显示市
textStyle: { textStyle: {
color: '#0a1640', //文字颜色 color: '#c8ced5', //文字颜色
fontSize: 12, //文字大小 fontSize: 12, //文字大小
backgroundColor: 'rgba(0,0,0,0)', //透明度0清空文字背景 backgroundColor: 'rgba(0,0,0,0)', //透明度0清空文字背景
}, },
}, },
itemStyle: { itemStyle: {
color: '#81d0f1', //地图颜色 color: 'rgb(18,57,90)', //地图颜色
borderWidth: 0.5, //分界线wdith borderWidth: 1, //分界线wdith
borderColor: '#459bca', //分界线颜色 borderColor: '#459bca', //分界线颜色
}, },
emphasis: { emphasis: {
label: { label: {
show: true, //是否显示高亮 show: true, //是否显示高亮
textStyle: { textStyle: { color: '#fff' }, //高亮文字颜色
color: '#fff', //高亮文字颜色
},
},
itemStyle: {
color: '#0489d6', //地图高亮颜色
}, },
itemStyle: { color: '#A7820D' }, //地图高亮颜色
}, },
//高亮市区 echarts bug 不生效 data: [
regions: [
{ {
name: '运城市', name: '运城市',
itemStyle: { value: 0,
areaColor: '#f00', label: { textStyle: { color: '#fff' } }, //高亮文字颜色
}, itemStyle: { color: '#A7820D' }, //地图高亮颜色
}, },
], ],
//高亮市区 echarts bug 不生效
// regions: [
// {
// name: '运城',
// itemStyle: {
// borderWidth: 3,
// areaColor: 'red',
// color: 'red',
// },
// },
// ],
}, },
], ],
}; };

1
src/components/Map/Map.vue

@ -22,7 +22,6 @@ export default {
let hg = window.innerHeight; let hg = window.innerHeight;
this.width = wh + 'px'; this.width = wh + 'px';
this.height = hg + 'px'; this.height = hg + 'px';
console.log(this.height);
window.onresize = () => { window.onresize = () => {
return (() => { return (() => {
wh = window.innerWidth; wh = window.innerWidth;

21
src/components/RFID/RFID.styl

@ -5,8 +5,6 @@
.list { .list {
width: 4.4rem; width: 4.4rem;
height: 4.4rem; height: 4.4rem;
line-height: 4.4rem;
text-align: center;
font-size: 12px; font-size: 12px;
color: #C8CED5; color: #C8CED5;
background: url('~assets/rfid-bg.png') no-repeat center; background: url('~assets/rfid-bg.png') no-repeat center;
@ -14,13 +12,26 @@ width: 4.4rem;
position: absolute; position: absolute;
} }
.list span{
display: inline-block;
position: relative;
top: 25%;
width: 100%;
height: 50%;
text-align: center;
}
.active { .active {
width: 5rem; width: 5.4rem;
height: 5rem; height: 5.4rem;
line-height: 5rem;
font-size: 12px; font-size: 12px;
background: url('~assets/rfid-bg-active.png') no-repeat center; background: url('~assets/rfid-bg-active.png') no-repeat center;
background-size: contain; background-size: contain;
text-align: center;
}
.list.active span{
width: 80%;
} }
.list1 { .list1 {

26
src/components/RFID/RFID.vue

@ -18,22 +18,14 @@ export default {
data() { data() {
return { return {
lists: [ lists: [
{ id: 1, active: false, name: '专科护士' }, { code: 1, active: false, name: '急救医生到场' },
{ id: 2, active: false, name: '专科医生' }, { code: 1, active: false, name: '急救护士到场' },
{ id: 3, active: false, name: '采血推车' }, { code: 3, active: false, name: '护士采血' },
{ id: 4, active: false, name: '心电图推车' }, { code: 3, active: false, name: '采血车到场' },
{ id: 5, active: false, name: '介入室' }, { code: 4, active: false, name: 'CT室' },
{ id: 6, active: false, name: 'CT室' }, { code: 8, active: false, name: '介入室' },
{ id: 7, active: false, name: '急救室' }, { code: 8, active: false, name: '抢救室' },
{ id: 8, active: false, name: '急诊医生' }, { code: 8, active: false, name: '抢救室' },
{ id: 9, active: false, name: '专科护士' },
{ id: 10, active: false, name: '专科医生' },
{ id: 11, active: false, name: '采血推车' },
{ id: 12, active: false, name: '心电图推车' },
{ id: 13, active: false, name: '介入室' },
{ id: 14, active: false, name: 'CT室' },
{ id: 15, active: false, name: '急救室' },
{ id: 16, active: false, name: '急诊医生' },
], ],
num: 0, //div num: 0, //div
}; };
@ -55,7 +47,7 @@ export default {
// //
for (let a = 0; a < this.newArr.length; a++) { for (let a = 0; a < this.newArr.length; a++) {
const arr = this.newArr[a]; const arr = this.newArr[a];
const item = arr.find(item => item.id === element.id); const item = arr.find(item => item.name === element.name);
if (item) { if (item) {
this.num = a; this.num = a;
} }

22
src/views/Index/Index.vue

@ -49,9 +49,12 @@
</div> </div>
</div> </div>
</div> </div>
<div class="flex-2 ma-2"> <div class="flex-2 ma-2" style="position:relative">
<!-- <iframe src="https://www.thingjs.com/pp/6dab0a018283ef357a85684c"></iframe> --> <iframe
<shanxi-map /> class="fill-width fill-height"
src="https://www.thingjs.com/pp/6dab0a018283ef357a85684c"
></iframe>
<shanxi-map class="sxmap" />
<!-- <div class="bg s-pic"> --> <!-- <div class="bg s-pic"> -->
<!-- </div> --> <!-- </div> -->
</div> </div>
@ -171,6 +174,19 @@ export default {
</script> </script>
<style lang="stylus" scoped> <style lang="stylus" scoped>
iframe {
border: none !important;
}
.sxmap {
position: absolute;
top: -4rem;
right: -2rem;
z-index: 9;
width: 19rem;
height: 25rem;
}
.time { .time {
position: absolute; position: absolute;
top: 2.5rem; top: 2.5rem;

Loading…
Cancel
Save