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

修改图标显示逻辑

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