Commit 4590423c authored by 郭铭瑶's avatar 郭铭瑶 🤘

修改图标显示逻辑

parent ec56dfe7
<!DOCTYPE html>
<html id="html">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1">
<title>浦东新区电梯加装地图</title>
<style>
html {
font-size: 1.6vh;
}
</style>
<script language="javascript" src="http://webapi.amap.com/maps?v=1.4.15&key=ee2b5d5c0c44c768f1d2593eb4a7dfa6&plugin=Map3D,AMap.DistrictSearch,AMap.ControlBar,ElasticMarker"></script>
</head>
<body>
<div id="app"></div>
<!-- built files will be auto injected -->
</body>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1">
<title>浦东新区电梯加装地图</title>
<style>
html {
font-size: 16vh;
}
</style>
<script language="javascript"
src="http://webapi.amap.com/maps?v=1.4.15&key=ee2b5d5c0c44c768f1d2593eb4a7dfa6&plugin=Map3D,AMap.DistrictSearch,AMap.ControlBar,ElasticMarker"></script>
</head>
<body>
<div id="app"></div>
<!-- built files will be auto injected -->
</body>
</html>
......@@ -18,7 +18,7 @@ html, body
#app
width 100%
height: 100%
font-size 1rem
font-size .1rem
overflow hidden
font-family 'Avenir', Helvetica, Arial, sans-serif
-webkit-font-smoothing antialiased
......
......@@ -2,7 +2,6 @@ import Vue from 'vue'
import Router from 'vue-router'
const Main = () => import('@/views/main.vue')
const HouseMap = () => import('@/views/house-map.vue')
// const Test = () => import('@/views/test.vue')
Vue.use(Router)
......@@ -18,10 +17,5 @@ export default new Router({
name: 'house-map',
component: HouseMap,
}
// {
// path: '/test',
// name: 'test',
// component: Test,
// },
]
})
let BASE_URL = ''
const BASE_URL = 'http://10.220.105.137:81/api'
let STATIC_URL = ''
switch (process.env.NODE_ENV) {
case 'production':
BASE_URL = ''
STATIC_URL = 'http://10.220.105.137:81/elev/static'
break
default:
BASE_URL = ''
STATIC_URL = 'http://localhost:8081/static'
STATIC_URL = 'http://localhost:8080/static'
};
export default {
BASE_URL,
STATIC_URL,
GET_ELE_DATA: BASE_URL + '/service-report/public/elv/consentRate',
GET_ANNOUNCE_DATA: BASE_URL + '/service-report/public/successcase',
// http://211.136.105.193/apiv2/service-report/public/inform/1 //加装 已公告数据
// 0-未签约 1-已公告 2-已开工 3-已完工
......
......@@ -11,30 +11,18 @@ export default{
return []
}
},
switchImg(ratio) {
if (!ratio) ratio = 0
if (ratio < 1) {
ratio = ratio * 100
}
if (ratio <= 10) return 1
if (ratio <= 20) return 2
if (ratio <= 30) return 3
if (ratio <= 40) return 4
if (ratio <= 50) return 5
if (ratio <= 60) return 6
if (ratio <= 70) return 7
if (ratio <= 80) return 8
if (ratio <= 90) return 9
if (ratio <= 100) return 10
switchRate(ratio) {
if (!ratio) return 0
const result = ratio * 100
if (result >= 100) return 100
return result
},
switchIcon(ratio) {
if (!ratio) ratio = 0
if (ratio < 1) {
ratio = ratio * 100
}
ratio = ratio * 100
if (ratio <= 50) return 'star1'
if (ratio <= 75) return 'star2'
if (ratio <= 100) return 'star3'
return 'star3'
},
switchColor(color) {
if (!color) return null
......@@ -56,9 +44,9 @@ export default{
case 1:
return '已公告'
case 2:
return '已工'
return '已工'
case 3:
return '已工'
return '已工'
default:
return '暂无状态'
}
......
......@@ -149,19 +149,19 @@ export default {
position relative
.icon-tooltip
position absolute
bottom 2rem
left 2rem
bottom .2rem
left .2rem
z-index 100
p
display flex
align-items center
color #000
font-weight bold
margin-bottom 1rem
font-size 1.4rem
margin-bottom .1rem
font-size .14rem
img
width 2rem
margin-right 1rem
width .2rem
margin-right .1rem
</style>
<style lang="stylus">
.amap-logo
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment