hwq пре 3 година
родитељ
комит
305080a217

+ 3 - 4
src/App.vue

@@ -23,12 +23,11 @@ export default {
 <style lang="scss" scoped>
 #app {
 	max-width: 1920px;
-	min-width: 1200px;
+	min-width: 1080px;
 	margin: 0 auto;
 }
 .main-wrapper {
-	max-width: 1920px;
-	min-width: 1200px;
+	width: 100%;
 	margin: 0 auto;
 }
 .bg {
@@ -39,7 +38,7 @@ export default {
 	// margin: 0 auto -300px;
 	height: 300px;
 	max-width: 1920px;
-	min-width: 1200px;
+	min-width: 1080px;
 	// background-image: url(assets/img/m1.png);
 	// background-size: auto 100%;
 	z-index: -1;

+ 12 - 12
src/api/index.js

@@ -3,7 +3,7 @@ import request from '@/utils/request'
 // 获取首页数据
 export function loadIndexs(data) {
 	return request({
-		url: '/api/index',
+		url: '/apis/index',
 		method: 'get',
 		data
 	});
@@ -12,7 +12,7 @@ export function loadIndexs(data) {
 // 公司产品列表
 export function cateList(data, type) {
 	return request({
-		url: '/api/cate/' + type,
+		url: '/apis/cate/' + type,
 		method: 'get',
 		data
 	});
@@ -21,7 +21,7 @@ export function cateList(data, type) {
 // 获取公司产品详情
 // export function productInfo(data, id) {
 // 	return request({
-// 		url: '/api/product/' + id,
+// 		url: '/apis/product/' + id,
 // 		method: 'get',
 // 		data
 // 	});
@@ -30,7 +30,7 @@ export function cateList(data, type) {
 // aboutlist
 export function aboutlist(data) {
 	return request({
-		url: '/api/about',
+		url: '/apis/about',
 		method: 'get',
 		data
 	});
@@ -39,7 +39,7 @@ export function aboutlist(data) {
 // storylist
 export function storylist(data) {
 	return request({
-		url: '/api/story',
+		url: '/apis/story',
 		method: 'get',
 		data
 	});
@@ -47,7 +47,7 @@ export function storylist(data) {
 // caseslist
 export function caseslist(data) {
 	return request({
-		url: '/api/cases',
+		url: '/apis/cases',
 		method: 'get',
 		data
 	});
@@ -55,7 +55,7 @@ export function caseslist(data) {
 // productlist
 export function productlist(data) {
 	return request({
-		url: '/api/product',
+		url: '/apis/product',
 		method: 'get',
 		data
 	});
@@ -63,7 +63,7 @@ export function productlist(data) {
 // articlelist
 export function articlelist(data) {
 	return request({
-		url: '/api/article',
+		url: '/apis/article',
 		method: 'get',
 		data
 	});
@@ -72,7 +72,7 @@ export function articlelist(data) {
 // 提交表单 addForm
 export function addForm(data) {
 	return request({
-		url: '/api/form',
+		url: '/apis/form',
 		method: 'post',
 		data
 	});
@@ -81,7 +81,7 @@ export function addForm(data) {
 // 获取公司列表
 export function companies(data) {
 	return request({
-		url: '/api/companies',
+		url: '/apis/companies',
 		method: 'get',
 		data
 	});
@@ -89,7 +89,7 @@ export function companies(data) {
 // 获取设备信息
 export function machine(data,id) {
 	return request({
-		url: '/api/machine/'+id,
+		url: '/apis/machine/'+id,
 		method: 'get',
 		data
 	});
@@ -97,7 +97,7 @@ export function machine(data,id) {
 // 获取设备信息数据展示
 export function machineId(data,id) {
 	return request({
-		url: '/api/machine/'+id,
+		url: '/apis/machine/'+id,
 		method: 'get',
 		data
 	});

+ 4 - 4
src/api/product.js

@@ -3,7 +3,7 @@ import request from '@/utils/request'
 // 获取公司产品详情
 export function productInfo(data, id) {
 	return request({
-		url: '/api/product/' + id,
+		url: '/apis/product/' + id,
 		method: 'get',
 		data
 	});
@@ -12,7 +12,7 @@ export function productInfo(data, id) {
 // 关于我们详情
 export function aboutInfo(data, id) {
 	return request({
-		url: '/api/about/' + id,
+		url: '/apis/about/' + id,
 		method: 'get',
 		data
 	});
@@ -21,7 +21,7 @@ export function aboutInfo(data, id) {
 //  公司案例详情 
 export function casesInfo(data, id) {
 	return request({
-		url: '/api/cases/' + id,
+		url: '/apis/cases/' + id,
 		method: 'get',
 		data
 	});
@@ -30,7 +30,7 @@ export function casesInfo(data, id) {
 // 公司介绍 articleInfo
 export function articleInfo(data, id) {
 	return request({
-		url: '/api/article/' + id,
+		url: '/apis/article/' + id,
 		method: 'get',
 		data
 	});

BIN
src/assets/img/close.png


BIN
src/assets/img/info001.png


BIN
src/assets/img/info002.png


BIN
src/assets/img/info003.png


BIN
src/assets/img/info004.png


BIN
src/assets/img/info005.jpg


+ 280 - 0
src/components/MyOverlay.vue

@@ -0,0 +1,280 @@
+<template>
+  <bm-overlay
+    ref="customOverlay"
+    :class="{sample: true, active}"
+    pane="labelPane"
+    @draw="draw">
+    <div class="popup-box3">
+			
+    	<div class="map-info">
+				<div class="map_close">
+					<el-image class="close_img" @click="PopClose()" :src="require('@/assets/img/close.png')" fit="cover"></el-image>
+				</div>
+    		<div class="map2">
+    			<div class="map-icon">
+    				<el-image class="" :src="require('@/assets/img/info001.png')" fit="cover"></el-image>
+    			</div>
+    			<div class="map-2">
+    				<div class="info2">企业名称</div>
+    				<div class="num2">
+    					<span class="tit1">{{ item.data.machine_name }}</span>
+    				</div>
+    			</div>
+    		</div>
+    		<div class="map2">
+    			<div class="map-icon">
+    				<el-image class="" :src="require('@/assets/img/info004.png')" fit="cover"></el-image>
+    			</div>
+    			<div class="map-2">
+    				<div class="info2">设备统计</div>
+    				<div class="num2">
+    					<span class="tit1">{{ item.data.machine_company_num }}</span>
+    				</div>
+    			</div>
+    		</div>
+			<div class="map2">
+				<div class="map-icon">
+					<el-image class="" :src="require('@/assets/img/info002.png')" fit="cover"></el-image>
+				</div>
+				<div class="map-2">
+					<div class="info2">节水改造日期</div>
+					<div class="num2">
+						<span class="tit1">{{ item.data.machine_setup_time| trimTime }}</span>
+					</div>
+				</div>
+			</div>
+    		<div class="map2">
+    			<div class="map-icon">
+    				<el-image class="" :src="require('@/assets/img/info002.png')" fit="cover"></el-image>
+    			</div>
+    			<div class="map-2">
+    				<div class="info2">改造前流量(吨/小时)</div>
+    				<div class="num2">
+    					<span class="tit1">{{item.data.machine_use_before_hour }}</span>
+    				</div>
+    			</div>
+    		</div>
+    		<div class="map2">
+    			<div class="map-icon">
+    				<el-image class="" :src="require('@/assets/img/info002.png')" fit="cover"></el-image>
+    			</div>
+    			<div class="map-2">
+    				<div class="info2">改造后流量(吨/小时)</div>
+    				<div class="num2">
+    					<span class="tit1">{{ item.data.machine_use_now_hour  }}</span>
+    				</div>
+    			</div>
+    		</div>
+    		
+    	</div>
+    </div>
+  </bm-overlay>
+</template>
+
+<script>
+export default {
+  props: ['item', 'position', 'active'],
+  watch: {
+    position: {
+      handler () {
+        this.$refs.customOverlay.reload()
+      },
+      deep: true
+    },
+  },
+  filters: {
+  	trimTime: function(value) {
+  		return value.split(' ')[0];
+  	}
+  },
+  methods: {
+    handleClick () {
+      global.alert('Well done.')
+    },
+    draw ({el, BMap, map}) {
+      const {lng, lat} = this.position
+      const pixel = map.pointToOverlayPixel(new BMap.Point(lng, lat))
+      el.style.left = pixel.x - 60 + 'px'
+      el.style.top = pixel.y - 20 + 'px'
+    },
+		PopClose() {
+			this.item.alertShow = false
+		}
+  }
+}
+</script>
+
+<style lang="scss">
+.sample {
+  width: 250px;
+  height: 300px;
+  line-height: 40px;
+  // background: rgba(0,0,0,0.5);
+  overflow: hidden;
+  // box-shadow: 0 0 5px #000;
+  color: #fff;
+  text-align: center;
+  padding: 10px;
+  position: absolute;
+}
+.sample.active {
+  // background: rgba(0,0,0,0.75);
+  color: #fff;
+}
+.popup-box3 {
+		border-radius: 4px;
+		.map-info {
+			border-radius: 4px;
+			position: absolute;
+			background-color: #ffffff;
+			top: 10px;
+			left: 7px;
+			padding: 10px;
+			.map_close {
+				display: flex;
+				align-items: center;
+				justify-content: flex-end;
+				// padding: 8px 6px 0 0;
+				.close_img {
+					width: 18px;
+					height: 18px;
+				}
+			}
+			.map1 {
+				padding: 4px 4px;
+				// width: 100%;
+				// height: 78rpx;
+				border-radius: 5px;
+				background-color: #ffffff;
+				display: flex;
+				align-items: center;
+
+				.map1-left {
+					// width: 50%;
+					padding-right: 9px;
+					border-right: 1px solid #f0f0f0;
+					display: flex;
+
+					.map-icon {
+						width: 44px;
+						height: 44px;
+
+						image {
+							width: 44px;
+							height: 44px;
+						}
+					}
+
+					.map-2 {
+						display: flex;
+						flex-direction: column;
+
+						.info2 {
+							color: #101010;
+							font-size: 16px;
+						}
+
+						.num2 {
+							display: flex;
+							align-items: center;
+
+							image {
+								margin: 0 3px;
+								width: 4px;
+								height: 5px;
+							}
+
+							.tit2 {
+								font-size: 2px;
+							}
+						}
+					}
+				}
+
+				.map1-right {
+					padding: 0 16rpx;
+					// width: 50%;
+					font-size: 8rpx;
+
+					.warn1 {
+						display: flex;
+						align-items: center;
+
+						.circle {
+							width: 8rpx;
+							height: 8rpx;
+							border-radius: 4rpx;
+							margin-right: 6px;
+							background-color: #448ef7;
+						}
+
+						.circle1 {
+							width: 8rpx;
+							height: 8rpx;
+							border-radius: 4rpx;
+							margin-right: 6px;
+							background-color: #d9d2be;
+						}
+
+						.circle2 {
+							width: 8rpx;
+							height: 8rpx;
+							border-radius: 4rpx;
+							margin-right: 6px;
+							background-color: #eeeeee;
+						}
+					}
+				}
+			}
+
+			.map2 {
+				padding: 4px 4px;
+				// padding-top: 5px;
+				// width: 260rpx;
+				// border-radius: 4px;
+				// background-color: #fff;
+				display: flex;
+				align-items: center;
+
+				.map-icon {
+					width: 44px;
+					height: 44px;
+
+					image {
+						width: 44px;
+						height: 44px;
+					}
+				}
+
+				.map-2 {
+					text-align: left;
+					display: flex;
+					flex-direction: column;
+
+					.info2 {
+						color: #101010;
+						font-size: 16px;
+						line-height: 1;
+					}
+
+					.num2 {
+						display: flex;
+						align-items: center;
+						line-height: 1;
+						color: #101010;
+						margin-top: 2px;
+						image {
+							margin: 0 6rpx;
+							width: 8rpx;
+							height: 11rpx;
+						}
+
+						.tit2 {
+							font-size: 4rpx;
+						}
+					}
+				}
+			}
+		}
+	}
+</style>

+ 19 - 71
src/components/leftNav/LeftNav.vue

@@ -1,7 +1,14 @@
 <template>
 	<div class="wrapper">
 		<div class="left-nav" :style="{height: navHeight}">
-			<div class="nav-title">关于我们</div>
+			<div class="nav-title">
+				<div class="china">
+					关于我们
+				</div>
+				<div class="English">
+					About us
+				</div>
+			</div>
 			<div class="nav-item" v-for="item in navList" :key="item.id" :class="{'action': currentUrl.indexOf(item.path) !== -1 }" @click="navTo(item.path)">
 				<div class="item-name">
 					<div class="yuan">
@@ -31,73 +38,11 @@
 			}
 		},
 		computed: {
-			isShow() {
-				return this.$route.path !== '/donation/Hpc'
-			},
 			navHeight() {
 				return this.navList.length*51 + 52 + 'px'
 			},
 			currentUrl() {
 				return this.$route.path
-			},
-			rightTitle() {
-				let title = ''
-				switch(this.currentUrl) {
-				     case '/donation/contribution':
-				        title = '我要捐款'
-				        break;
-				     case '/donation/organDonation':
-				         title = '我要捐献器官'
-				        break;
-					case '/join/rescue':
-					    title = '我要成为救护员'
-					   break;
-					case '/join/member':
-						title = '我要成为会员'
-						break
-					case '/join/volunteer':
-						title = '我要成为志愿者'
-						break
-					case '/join/train':
-						title = '报名普及培训'
-						break
-					case '/about':
-						title = '关于我们'
-						break
-					case '/concat':
-						title = '联系我们'
-						break
-					case '/popularScience/list':
-						title = '红会科普'
-						break
-					case '/popularScience/detail':
-						title = '红会科普'
-						break
-					case '/news/list':
-						title = '红会新闻'
-						break
-					case '/news/detail':
-						title = '红会新闻'
-						break
-					case '/publicity/list':
-						title = '信息公示'
-						break
-					case '/publicity/detail':
-						title = '信息公示'
-						break
-					case '/regulations/detail':
-						title = '政策法规'
-						break
-					case '/regulations/list':
-						title = '政策法规'
-						break
-					case '/regulations':
-						title = '政策法规'
-						break
-				     default:
-				        title = ''
-				}
-				return title
 			}
 		},
 		data() {
@@ -136,21 +81,25 @@
 		// height: 154px;
 		box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.1);
 		.nav-title {
-			height: 52px;
 			background-color: #0165B5;
-			line-height: 52px;
 			text-align: center;
-			font-size: 18px;
+			font-size: 20px;
 			font-family: PingFang SC;
 			font-weight: bold;
 			color: #FFFFFF;
 			letter-spacing:3px;
 			cursor:default;
+			padding: 25px 0 50px 30px;
+			text-align: left;
+			.English {
+				margin-top: 20px;
+			}
 		}
 		.nav-item {
 			cursor:pointer;
 			margin-top: 5px;
 			display: flex;
+			align-items: center;
 			height: 50px;
 			background-color: #f2eeef;
 			justify-content: space-between;
@@ -173,14 +122,13 @@
 				}
 			}
 			.item-icon {
-				font-size: 16px;
-				font-family: PingFang SC;
-				font-weight: bold;
-				color: #999999;
+				width: 10px;
+				height: 10px;
+				background: #0165B5;
 			}
 		}
 		.action {
-			background-color: #0165B5;
+			background-color: #B2D0E9;
 		}
 	}
 	.right-content {

+ 1 - 6
src/components/navBar/NavBar.vue

@@ -53,16 +53,11 @@ export default {
   methods: {
 	  navClick(url,index) {
 		  let currentUrl = this.$route.path
-		  console.log(url)
-		  console.log(currentUrl,"now")
 		  if(currentUrl === url) {
 			  return 
 		  }else {
-			  console.log("1")
 			 this.currentIndex = index
-			 console.log(this.currentIndex)
-			 console.log(url,55555555555555)
-			 this.$router.push('/about') 
+			 this.$router.push(url) 
 		  }
 		  
 		  

+ 10 - 0
src/components/swiper/swiper.vue

@@ -26,6 +26,16 @@ export default {
 					return obj.$store.state.www + e;
 				});
 			});
+		},
+		async aa(){
+			const c = await bb()
+			console.log(c);
+			
+		},
+		bb(){
+			return new Promise((resolve,reject) => {
+				resolve('5')
+			})
 		}
 	}
 };

+ 50 - 0
src/router.js

@@ -0,0 +1,50 @@
+import Vue from 'vue'
+import Router from 'vue-router'
+Vue.use(Router)
+export default new Router({
+  // mode: 'history',
+  base: process.env.BASE_URL,
+  routes: [
+    {
+      path: '/',
+      redirect: '/home'
+    },
+    {
+      path: '/home',
+      name: 'home',
+      component: () => import('./views/Home.vue'),
+      meta: {
+        title: '添利'
+      }
+    },
+	{
+	  path: '/about',
+	  name: 'about',
+	  component: () => import('./views/About.vue'),
+	  meta: {
+	    title: '关于我们'
+	  }
+	},
+	{
+	  path: '/product',
+	  name: 'product',
+	  component: () => import('./views/Product.vue'),
+	  meta: {
+	    title: '产品介绍'
+	  }
+	},
+	{
+	  path: '/concat',
+	  name: 'concat',
+	  component: () => import('./views/Concat.vue'),
+	  meta: {
+	    title: '联系我们'
+	  }
+	},
+	
+	{
+		path: '*',
+		redirect: '/home'
+	}
+  ]
+})

+ 8 - 8
src/router/index.js

@@ -21,7 +21,7 @@ const ter = new Router({
 			path: '/about',
 			name: 'about',
 			component: () => import('../views/About.vue'),
-			redirect: '/about/company',
+			redirect: '/about/Company',
 			meta: {
 				title: '关于我们'
 			},
@@ -34,7 +34,7 @@ const ter = new Router({
 					}
 				},
 				{
-					path: 'concat',
+					path: 'Concat',
 					name: 'concat',
 					component: () => import('../views/about/Concat.vue'),
 					meta: {
@@ -42,7 +42,7 @@ const ter = new Router({
 					}
 				},
 				{
-					path: 'product',
+					path: 'Product',
 					name: 'product',
 					component: () => import('../views/about/Product.vue'),
 					meta: {
@@ -50,12 +50,12 @@ const ter = new Router({
 					}
 				}
 			]
-		},
-
-		{
-			path: '*',
-			redirect: '/home'
 		}
+
+		// {
+		// 	path: '*',
+		// 	redirect: '/home'
+		// }
 	]
 })
 

+ 13 - 4
src/utils/request.js

@@ -5,11 +5,20 @@ import {
 } from 'element-ui'
 import store from '../store.js'
 // create an axios instance
-const service = axios.create({
-	baseURL: store.state.www, // url = base url + request url
-	// withCredentials: true, // send cookies when cross-domain requests
+let configBase ={
 	timeout: 5000 // request timeout
-})
+}
+if(process.env.NODE_ENV === 'development'){
+	configBase.baseURL = '';
+	console.log('开发环境')
+}else{
+	configBase.baseURL = store.state.www;
+    console.log('生产环境')
+}
+
+
+
+const service = axios.create(configBase)
 
 // request interceptor
 service.interceptors.request.use(

+ 326 - 7
src/views/Home.vue

@@ -44,27 +44,213 @@
 				</div>
 			</div>
 		</div>
+		<div class="mpBoxTitle">
+			<div class="mpBoxTitleBox">
+			<div class="titleText">
+				动态数据看板
+			</div>
+			</div>
+			<div class="border"></div>
+		</div>
+		<div class="mapBox">
+			<div class="sjkb_box">
+				<div class="sjkb_frame">
+					<!-- 数据 -->
+					<baidu-map class="bm-view" @zoomend="zoomendChange" @ready="init" :min-zoom="5" :max-zoom="18">
+						<bm-navigation anchor="BMAP_ANCHOR_BOTTOM_RIGHT"></bm-navigation>
+						<bm-copyright
+							anchor="BMAP_ANCHOR_TOP_RIGHT"
+							:copyright="[
+								{ id: 1, content: 'Copyright Message', bounds: { ne: { lng: 110, lat: 40 }, sw: { lng: 0, lat: 0 } } },
+								{ id: 2, content: '<a>添利节能科技有限公司</a>' }
+							]"
+						></bm-copyright>
+						<bm-marker
+							class="bm-marker"
+							v-for="(item, index) in companyList"
+							:key="index"
+							:position="{
+								lng: item.longtitude,
+								lat: item.lattitude
+							}"
+							@click="infoWindowOpen(item)"
+						>
+							<bm-label v-if="zoomActive >= 15" :content="item.name" :labelStyle="item.style" :offset="item.textType" />
+							<my-overlay :position="{ lng: item.longtitude, lat: item.lattitude - 0.003 }" :item="item" v-if="item.alertShow == true"></my-overlay>
+						</bm-marker>
+					</baidu-map>
+					
+					<div class="sjkb_wrap">
+						<div class="sjkb_item">
+							<el-image class="iconMapTop" :src="require('@/assets/img/info001.png')" fit="cover"></el-image>
+							<div class="shebeitji_box">
+								<span class="sjkb_title">合作企业(家)</span>
+								<div class="sjkb_content">
+									<span class="sjkb_now">{{ machineList.machine_company_num || '0' }}</span>
+									<!-- <el-image class="" :src="require('@/assets/index_up.png')" fit="cover"></el-image>
+									<span class="sjkb_upNum">0</span> -->
+								</div>
+							</div>
+						</div>
+						<div class="sjkb_item">
+							<el-image class="iconMapTop" :src="require('@/assets/img/info003.png')" fit="cover"></el-image>
+							<div class="shebeitji_box">
+								<span class="sjkb_title">经济效益(万元)</span>
+								<div class="sjkb_content">
+									<span class="sjkb_now">{{ parseFloat(machineList.machine_save_money / 10000).toFixed(2) || '0' }}</span>
+									<!-- <el-image class="" :src="require('@/assets/index_up.png')" fit="cover"></el-image>
+									<span class="sjkb_upNum">0</span> -->
+								</div>
+							</div>
+						</div>
+						<div class="sjkb_item">
+							<el-image class="iconMapTop" :src="require('@/assets/img/info002.png')" fit="cover"></el-image>
+							<div class="shebeitji_box">
+								<span class="sjkb_title">用水总量(万吨)</span>
+								<div class="sjkb_content">
+									<span class="sjkb_now">{{ parseFloat(machineList.machine_use_water / 10000).toFixed(2) || '0' }}</span>
+									<!-- <el-image class="" :src="require('@/assets/rili.png')" fit="cover"></el-image>
+									<span class="sjkb_upNum">{{ machineList.machine_use_time_max }}</span> -->
+								</div>
+							</div>
+						</div>
+						<div class="sjkb_item">
+							<el-image class="iconMapTop" :src="require('@/assets/img/info002.png')" fit="cover"></el-image>
+							<div class="shebeitji_box">
+								<span class="sjkb_title">节水总量(万吨)</span>
+								<div class="sjkb_content">
+									<span class="sjkb_now">{{ parseFloat(machineList.machine_save_water / 10000).toFixed(2) || '0' }}</span>
+									<!-- <el-image class="" :src="require('@/assets/rili.png')" fit="cover"></el-image>
+									<span class="sjkb_upNum">{{ machineList.machine_use_time_max }}</span> -->
+								</div>
+							</div>
+						</div>
+						
+					</div>
+				</div>
+			</div>
+		</div>
 	</div>
 </template>
 
 <script>
 import ItemTitle from './homeChild/ItemTitle.vue';
-
+import { loadIndexs, aboutList, machine, companies, formBaoCun } from '@/api/index';
+import MyOverlay from '@/components/MyOverlay.vue';
 export default {
 	components: {
-		ItemTitle
+		ItemTitle,
+		MyOverlay
 	},
 	data() {
 		return {
 			openNews: [],
 			redNews: [],
-			showNew: [{}, {}]
+			showNew: [{}, {}],
+			map: null, //保存地图
+			// 公司列表
+			companyList: [],
+			// 默认层级
+			zoomActive: 12,
+			machineList: {} // 设备总体信息
 		};
 	},
 	filters: {},
 	computed: {},
-	created() {},
-	methods: {}
+	created() {
+		this.loadData();
+	},
+	methods: {
+		// 加载初始数据
+		loadData(){
+			companies().then(e => {
+				this.companyList = e.data.map(e => {
+					// 初始化弹窗显示隐藏
+					e.alertShow = false;
+					// e.lattitude = 28.243198;
+					// e.longtitude = 121.279239;
+					// 设置文字样式
+					e.textType = {
+						width: -((e.name.length / 2) * 10),
+						height: 30
+					};
+					e.data = {};
+					e.style = {
+						background: 'none',
+						color: '#333333',
+						fontSize: '10px',
+						border: 'none'
+					};
+					return e;
+				});
+				this.setCompanyData();
+			})
+			machine({}, 0).then(res => {
+				this.machineList = res.data;
+				console.log(res);
+			});
+		},
+		// 保存处理公司数据
+		setCompanyData() {
+			let obj = this;
+			console.log(this.companyList, 55);
+			for (let i = 0; i < this.companyList.length; i++) {
+				let data = this.companyList[i];
+				setTimeout(() => {
+					obj.getData(data.id)
+						.then(e => {
+							data.data = e.data;
+							data.data.machine_name = data.name;
+						})
+						.catch(e => {
+							console.log(e);
+						});
+				}, 100 * i);
+			}
+		},
+		// 获取单个公司数据
+		getData(machineid) {
+			return new Promise((ok, err) => {
+				machine({}, machineid)
+					.then(e => {
+						ok(e);
+					})
+					.catch(e => {
+						err(e);
+						console.log(e);
+					});
+			});
+		},
+		/* 设置弹窗 */
+		zoomendChange(type) {
+			const obj = this;
+			obj.zoomActive = type.target.getZoom();
+			// if (obj.zoomActive >= 15) {
+			// 	for(let i=0; i< obj.companyList.length; i++) {
+			// 		obj.companyList[i].alertShow = true;
+			// 	}
+			// }
+			if (obj.zoomActive <= 10) {
+				for (let i = 0; i < obj.companyList.length; i++) {
+					obj.companyList[i].alertShow = false;
+				}
+			}
+		},
+		// 显示数据
+		infoWindowOpen(item) {
+			item.alertShow = true;
+		},
+		// 初始化地图
+		init({ BMap, map }) {
+			this.map = map;
+			// 初始化地图,设置中心点坐标
+			var point = new BMap.Point(121.434817, 28.653649);
+			map.centerAndZoom(point, this.zoomActive);
+			// this.setMarker();
+			// 添加鼠标滚动缩放
+			map.enableScrollWheelZoom();
+		}
+	}
 };
 </script>
 
@@ -124,10 +310,10 @@ export default {
 			bottom: 0;
 		}
 	}
-	.case{
+	.case {
 		width: 33%;
 		height: 450px;
-		background: #FFFFFF;
+		background: #ffffff;
 		margin-left: 20px;
 	}
 	.news {
@@ -194,4 +380,137 @@ export default {
 		}
 	}
 }
+// 地图样式
+.mpBoxTitle{
+	display: flex;
+	align-items: center;
+	height: 50px;
+	position: relative;
+	margin-top: 30px;
+	.border{
+		height: 1px;
+		width: 100%;
+		background-color: #E0E2E4;
+	}
+	.mpBoxTitleBox{
+		position: absolute;
+		top: 0;
+		left: 0;
+		width: 100%;
+		height: 100%;
+		display: flex;
+		align-items: center;
+		justify-content: center;
+		.titleText{
+			background-color: #FFFFFF;
+			font-size: 26px;
+			padding:  30px;
+			font-weight: bold;
+		}
+	}
+}
+.mapBox{
+	position: relative;
+	padding-top: 33.33%;
+	margin: 15px;
+}
+.sjkb_box {
+	position: absolute;
+	top: 0;
+	bottom: 0;
+	left: 0;
+	right: 0;
+	.sjkb_frame {
+		width: 100%;
+		height: 100%;
+		position: relative;
+		// 地图
+		.bm-view {
+			width: 100%;
+			height: 100%;
+		}
+		// 数据
+		.sjkb_wrap {
+			position: absolute;
+			top: 40px;
+			left: 30px;
+			display: flex;
+			align-items: center;
+			.sjkb_item {
+				padding: 10px;
+				margin-right: 15px;
+				line-height: 1;
+				background: #ffffff;
+				display: flex;
+				&:last-of-type {
+					margin-right: 0;
+					// padding-right: 20px;
+				}
+				.iconMapTop{
+					width: 80px;
+					height: 80px;
+				}
+				// align-items: center;
+				.shebeitji_box {
+					padding-right: 20px;
+					padding-top: 8px;
+					// border-right: 1px solid #f0f0f0;
+					text-align: left;
+					.sjkb_title {
+						font-size: 24px;
+						font-family: PingFang SC;
+						font-weight: 500;
+						color: #101010;
+					}
+					.sjkb_content {
+						text-align: left;
+						.sjkb_now {
+							font-size: 40px;
+							font-family: PingFang SC;
+							font-weight: 500;
+							color: #101010;
+						}
+						.sjkb_upNum {
+							margin-left: 3px;
+							font-size: 20px;
+							font-family: PingFang SC;
+							font-weight: 500;
+							color: #101010;
+						}
+					}
+				}
+				.sbtj_tongji {
+					padding: 0 70px 10px 20px;
+					display: flex;
+					flex-direction: column;
+					align-items: center;
+					justify-content: space-around;
+					.sbtj_shuju {
+						display: flex;
+						align-items: center;
+						font-size: 18px;
+						font-family: PingFang SC;
+						font-weight: bold;
+						color: #101010;
+						.sbtj_dian {
+							margin-right: 3px;
+							width: 10px;
+							height: 10px;
+							border-radius: 50%;
+						}
+						.lanse {
+							background: #1890ff;
+						}
+						.hongse {
+							background: #f25657;
+						}
+						.huise {
+							background: #eeeeee;
+						}
+					}
+				}
+			}
+		}
+	}
+}
 </style>

+ 20 - 1
src/views/about/Company.vue

@@ -1,8 +1,27 @@
 <template>
+	<div class="center">
+		<div class="" v-html="text">
+		</div>
+	</div>
 </template>
 
 <script>
+	export default {
+		data() {
+			return {
+				text: ''
+			}
+		},
+		created() {
+			this.getContent()
+		},
+		methods: {
+			getContent() {
+				
+			}
+		}
+	}
 </script>
 
-<style>
+<style lang="scss" scoped="">
 </style>

+ 20 - 1
src/views/about/Concat.vue

@@ -1,8 +1,27 @@
 <template>
+	<div class="center">
+		<div class="" v-html="text">
+		</div>
+	</div>
 </template>
 
 <script>
+	export default {
+		data() {
+			return {
+				text: ''
+			}
+		},
+		created() {
+			this.getContent()
+		},
+		methods: {
+			getContent() {
+				
+			}
+		}
+	}
 </script>
 
-<style>
+<style lang="scss" scoped="">
 </style>

+ 20 - 1
src/views/about/Product.vue

@@ -1,8 +1,27 @@
 <template>
+	<div class="center">
+		<div class="" v-html="text">
+		</div>
+	</div>
 </template>
 
 <script>
+	export default {
+		data() {
+			return {
+				text: ''
+			}
+		},
+		created() {
+			this.getContent()
+		},
+		methods: {
+			getContent() {
+				
+			}
+		}
+	}
 </script>
 
-<style>
+<style lang="scss" scoped="">
 </style>

+ 0 - 32
src/views/donation/Contribution.vue

@@ -1,32 +0,0 @@
-<template>
-	<div class="contribution">
-		<div class="" v-html="content">
-			
-		</div>
-	</div>
-</template>
-
-<script>
-	// import { details } from '../../request/api.js'
-	
-	export default {
-		data() {
-			return {
-				content: ''
-			}
-		},
-		created() {
-			this.getContent()
-		},
-		methods: {
-			getContent() {
-				details({},25).then(({data}) => {
-					this.content = data.content
-				})
-			}
-		}
-	}
-</script>
-
-<style lang="scss" scoped="">
-</style>

+ 0 - 50
src/views/donation/Hpc.vue

@@ -1,50 +0,0 @@
-<template>
-	<div class="hpc">
-		<div v-html="content"></div>
-	</div>
-</template>
-
-<script>
-	// import { details } from '../../request/api.js'
-	export default {
-		data() {
-			return {
-				content: ''
-			}
-		},
-		created() {
-			this.getData()
-			this.getContent(27)
-		},
-		computed: {
-			iid() {
-				return this.$route.query.id || 0
-			}
-		},
-		watch: {
-			iid(val) {
-				this.getData(val)
-			}
-		},
-		methods: {
-			getData(val) {
-				if(!val){
-					val = 0
-				}
-				if(val==0){
-					this.getContent(27)
-				}else {
-					this.getContent(28)
-				}
-			},
-			getContent(id) {
-				details({},id).then(({data}) => {
-					this.content = data.content
-				})
-			}
-		}
-	}
-</script>
-
-<style>
-</style>

+ 0 - 34
src/views/donation/OrganDonation.vue

@@ -1,34 +0,0 @@
-<template>
-	<div class="organ-donation">
-		<div class="content" v-html="content"></div>
-	</div>
-</template>
-
-<script>
-	// import { details } from '../../request/api.js'
-	
-	export default {
-		data() {
-			return {
-				content: ''
-			}
-		},
-		created() {
-			this.getContent()
-		},
-		methods: {
-			getContent() {
-				details({},26).then(({data}) => {
-					this.content = data.content
-				})
-			}
-		}
-	}
-</script>
-
-<style lang="scss" scoped>
-	// .content {
-	// 	width: 100%;
-	// 	// overflow: hidden;
-	// }
-</style>

+ 3 - 3
vue.config.js

@@ -15,12 +15,12 @@ module.exports = {
 			errors: true
 		},
 		"proxy": {
-			"/api": {
-				"target": "http://tianli.liuniu946.com/api", //请求的目标域名
+			"/apis": {
+				"target": "http://tianli.liuniu946.com/apis", //请求的目标域名
 				"changeOrigin": true,
 				// "secure": false,
 				"pathRewrite": {
-					'^/api': ''
+					'^/apis': ''
 				}
 			}
 		}