Przeglądaj źródła

Merge remote-tracking branch 'origin/main'

0714Star 1 rok temu
rodzic
commit
5f8769338f

+ 90 - 35
display_model_for_smartagriculture/public/data/mapdata.json

@@ -1,39 +1,39 @@
 {
 	"geoCoordMap": [
-		[116.448537, 39.924453],
-		[116.706099, 39.94437],
-		[116.179477, 39.908515],
-		[116.336429, 39.871755],
-		[116.336429, 39.871755],
-		[116.443219, 39.846832],
-		[124.541, 40.4242],
-		[116.433086, 39.876794],
-		[116.372648, 39.910231],
-		[116.374014, 39.901043],
-		[116.428128, 39.913496],
-		[116.4494, 39.893625],
-		[116.413108, 39.911725],
-		[116.431505, 39.894124],
-		[116.397657, 39.879674],
-		[118.8062, 31.9208],
-		[116.395789, 39.893792],
-		[116.437255, 39.897196],
-		[116.447621, 39.900323],
-		[116.452148, 39.898912],
-		[116.456874, 39.900362],
-		[116.451583, 39.897435],
-		[116.45107, 39.901455],
-		[116.451879, 39.898403],
-		[116.244815,39.726849 ],
-		[116.378024,39.833443 ],
-		[116.152805,39.940924 ],
-		[116.662296,39.862964 ],
-		[116.338199,39.925128 ],
-		[116.255801,39.714174 ],
-		[116.454929,39.752193 ],
-		[116.571658,39.874558 ],
-		[116.178897,39.858748 ],
-		[116.475528,39.879828 ],
+		[115.8166855,28.6609181],
+		[115.8231198,28.6358355],
+		[115.8057020,28.5902496],
+		[115.9360135,28.5507510],
+		[115.8745735,28.4958505],
+		[115.7973310,28.3333952],
+		[115.6310868,28.4415251],
+		[115.8107210,28.3282578],
+		[115.8517146,28.5100308],
+		[115.8328994,28.5063351],
+		[115.8105080,28.4896648],
+		[115.7898152,28.4469589],
+		[115.7550595,28.4763871],
+		[115.7499461,28.5655270],
+		[115.7887218,28.5417034],
+		[115.7478533,28.5208911],
+		[116.1401343,28.6375681],
+		[116.1354980,28.6238570],
+		[116.1488919,28.6142129],
+		[116.1485484,28.6042665],
+		[115.9547840,28.5577623],
+		[115.9475747,28.5548975],
+		[115.9103248,28.5331075],
+		[115.9092086,28.5302421],
+		[115.9019965,28.5291863],
+		[115.9177865,28.6109729],
+		[115.9197778,28.6150794],
+		[117.2546058,28.2941028],
+		[117.2094118,28.3166221],
+		[117.2327652,28.3253868],
+		[115.0725153,25.3787723],
+		[115.5450785,25.1104715],
+		[115.3472613,26.0024871],
+		[115.7099261,25.9037033],
 		[116.306613,39.815513 ],
 		[116.31348,40.202596  ],
 		[116.972659,40.113384 ],
@@ -42,6 +42,61 @@
 		[116.005268,39.899251 ],
 		[116.773624,40.376939 ],
 		[116.507206,40.358105 ],
-		[116.14191,40.215636  ]
+		[116.14191,40.215636  ],
+		[113.0409194,24.0063262],
+		[116.8214249,24.8864365],
+		[119.1952307,26.2343020],
+		[115.8010718,28.1436001],
+		[115.4690436,28.3912494],
+		[115.3952056,28.4277885],
+		[115.4140924,28.3537912],
+		[115.7086826,28.1037836],
+		[116.5856815,27.4604533],
+		[116.5685099,27.4226714],
+		[116.3051120,27.8938598],
+		[116.3759760,27.9133537],
+		[116.9619929,28.2590297],
+		[117.0978835,28.2665895],
+		[115.1494442,24.8814533],
+		[115.0835052,24.4321467],
+		[114.2152374,26.6818214],
+		[113.8305930,26.7014526],
+		[114.5184725,27.7613299],
+		[114.5212200,27.8706446],
+		[114.6173811,27.9119126],
+		[114.7602490,27.8997766],
+		[114.9392858,27.7725701],
+		[115.4089114,27.2790435],
+		[115.5765065,27.3620105],
+		[115.8214214,27.4254141],
+		[116.1837884,27.5423710],
+		[117.7096732,29.1233732],
+		[117.2700796,29.3342982],
+		[118.0111051,28.3793186],
+		[118.0481958,28.5073156],
+		[117.7522248,28.5254158],
+		[115.8905207,26.5099045],
+		[116.0604785,27.3229749],
+		[115.5852015,28.1540438],
+		[115.5852015,28.4540438],
+		[115.6852015,28.1540438],
+		[115.7852015,28.5540438],
+		[115.9852015,28.1540438],
+		[115.8752015,28.2540438],
+		[115.8252015,28.1540438],
+		[115.6852015,28.9540438],
+		[112.2496508,27.6446064],
+		[110.8429511,28.6520306],
+		[114.0959442,30.4107818],
+		[117.7885310,25.6811373],
+		[116.9972624,30.1071179],
+		[111.8979759,30.2590672],
+		[116.6852015,28.9540438],
+		[114.2496508,27.6446064],
+		[111.8429511,27.5520306],
+		[113.0959442,29.4107818],
+		[116.7885310,25.9811373],
+		[116.2972624,30.3071179],
+		[112.9979759,30.5590672]
 	]
 }

+ 522 - 521
display_model_for_smartagriculture/src/App.vue

@@ -1,529 +1,530 @@
 <template>
-	<transition name="bounce">
-		<welcome v-if="welcome" @loaddingend="loaddingend"></welcome>
-	</transition>
-	<transition name="bounce">
-		<div v-if="!welcome" class="container" :class="curTheme">
-			<el-row class="title">
-				<el-col :span="8">
-					<div class="time_div flex">
-						<div class="time " style="width:200px">
-							<el-icon>
-								<alarm-clock />
-							</el-icon>
-							<span>{{time}}</span>
-						</div>
-						<div class="flex_item weather">
-							<!-- 展示当前天气情况 -->
-							<!-- 天气 -->
-							<span class="item"><img style="width: 20px;position: relative;top: 5px;" src="./assets/5.png"></span>
-							<!-- 地区 -->
-							<span class="item">西安</span>
-							<!-- 温度 -->
-							<span class="item">23℃~25℃</span>
-							<!-- 空气质量 -->
-							<span class="item">空气质量 <span style="color:orangered">差</span></span>
-						</div>
-					</div>
-				</el-col>
-				<el-col :span="8" style="position: relative;">
-					<div
-						style="position: absolute; background: #26871a; left: -8px; width: 54px; height: 2px; transform: rotate(45deg); top: 59px;">
-					</div>
-					<div class="header">君君军智慧农业监控平台</div>
-					<div
-						style="position: absolute; background: #26871a; right: -9px; width: 55px; height: 2px; transform: rotate(-45deg); top: 59px;">
-					</div>
-					<div
-						style="position: absolute; left: 0px; bottom: 0px; height: 2px; width: 36px; background: rgb(0 0 0);border-radius: 10px;">
-					</div>
-					<div style="position: absolute;right:0px;bottom: 0px;height: 2px;width: 36px;background: #100c2a;">
-					</div>
-				</el-col>
-				<el-col :span="8">
-					<div class="flex menus_div">
-						<div class="menus flex_item flex">
-							<div class="flex_item">
-								<div class="menu_item" @click="turnPage('/index')">综合监控</div>
-							</div>
-							<div class="flex_item">
-								<div class="menu_item" @click="turnPage('/crop')">作物监控</div>
-							</div>
-							<div class="flex_item">
-								<div class="menu_item" @click="turnPage('/environment')">环境监控</div>
-							</div>
-							<div class="flex_item">
-								<div class="menu_item" @click="turnPage('/market')">市场监控</div>
-							</div>
-							<div class="flex_item">
-								<div class="menu_item" @click="turnPage('/device')">设备监控</div>
-							</div>
-						</div>
-						<div class="tools  flex" style="">
-							<div class="flex_item">
-								<div class="tool_item" @click="screen">
-									<el-icon>
-										<full-screen />
-									</el-icon>
-									<span>{{screenText}}</span>
-								</div>
-							</div>
-							<div class="flex_item">
-								<div class="tool_item" @click="showSetting">
-									<el-icon>
-										<setting />
-									</el-icon>
-									<span>配置</span>
-								</div>
-							</div>
-							<div class="flex_item">
-								<div class="tool_item" @click="exit">
-									<el-icon>
-										<switch-button />
-									</el-icon>
-									<span>退出</span>
-							</div>
-								</div>
-						</div>
-					</div>
-				</el-col>
-			</el-row>
-
-			<div>
-				<transition name="bounce" mode="out-in">
-					<router-view></router-view>
-				</transition>
-			</div>
-
-			<!-- 系统菜单选择弹框 -->
-			<div class="menu_panel" v-if="menushow">
-				<div class="menu_panel_maker" @click="hideMenu">
-					<div class="inner_contaner" @click.stop="stopPropagation">
-						<el-row style="margin-top: 20px;" v-for="(item,index) in menus" :key="item.id">
-							<el-col :span="6" v-for="(subitem,subindex) in item" :key="subitem.id">
-								<div class="menu_item" @click="turnPage(subitem.url)">
-									<div class="icon">
-										<el-icon :size="40">
-											<component :is="subitem.icon" :size="40"></component>
-										</el-icon>
-									</div>
-									<div class="text">{{subitem.name}}</div>
-								</div>
-							</el-col>
-						</el-row>
-						<el-icon :size="25" class="menuPanelCloseBtn" @click="hideMenu">
-							<Close-bold :size="25" />
-						</el-icon>
-					</div>
-				</div>
-			</div>
-			<!-- 系统配置弹框 -->
-			<div class="setting_panel" v-if="settingshow">
-				<div class="setting_panel_maker" @click="hideSetting">
-					<div class="inner_contaner" @click.stop="stopPropagation">
-						<el-icon :size="25" class="settingPanelCloseBtn" @click="hideSetting">
-							<Close-bold :size="25" />
-						</el-icon>
-						<div class="setting_panel_title">
-							系统配置
-						</div>
-						<el-form ref="settingFormRef" :model="settingForm" status-icon :rules="rules"
-							label-width="120px" class="settingForm">
-							<el-form-item :label="item.label+':'" prop="item.type" v-for="(item,index) in configs">
-								<!-- 识别配置项类型并创建对应组件 -->
-								<el-input v-if="item.type != 'select'" v-model="settingForm[item.key]"
-									placeholder="请输入{{item.label}}" type="item.type" autocomplete="off" />
-								<el-select v-if="item.type == 'select'" style="width:100%"
-									v-model="settingForm[item.key]" placeholder="请选择{{item.label}}">
-									<el-option v-for="(optionitem,index1) in item.options" :label="optionitem.label"
-										:value="optionitem.value" />
-								</el-select>
-							</el-form-item>
-							<el-form-item>
-								<el-row style="width:100%">
-									<el-col :span="11">
-										<el-button style="width:100%" type="primary"
-											@click="submitForm(settingFormRef)">
-											保存配置</el-button>
-									</el-col>
-									<el-col :span="2">
-									</el-col>
-									<el-col :span="11">
-										<el-button style="width:100%" @click="defalutForm(settingFormRef)">恢复默认
-										</el-button>
-									</el-col>
-								</el-row>
-							</el-form-item>
-						</el-form>
-
-					</div>
-				</div>
-			</div>
-		</div>
-	</transition>
+  <transition name="bounce">
+    <welcome v-if="welcome" @loaddingend="loaddingend"></welcome>
+  </transition>
+  <transition name="bounce">
+    <div v-if="!welcome" class="container" :class="curTheme">
+      <el-row class="title">
+        <el-col :span="8">
+          <div class="time_div flex">
+            <div class="time " style="width:200px">
+              <el-icon>
+                <alarm-clock />
+              </el-icon>
+              <span>{{time}}</span>
+            </div>
+            <div class="flex_item weather">
+              <!-- 展示当前天气情况 -->
+              <!-- 天气 -->
+              <span class="item"><img style="width: 20px;position: relative;top: 5px;" src="./assets/5.png"></span>
+              <!-- 地区 -->
+              <span class="item">南昌</span>
+              <!-- 温度 -->
+              <span class="item">27℃~34℃</span>
+              <!-- 空气质量 -->
+              <span class="item">空气质量 <span style="color:green">好</span></span>
+            </div>
+          </div>
+        </el-col>
+        <el-col :span="8" style="position: relative;">
+          <div
+              style="position: absolute; background: #26871a; left: -8px; width: 54px; height: 2px; transform: rotate(45deg); top: 59px;">
+          </div>
+          <div class="header">农妙果蔬通数据监控平台</div>
+          <div
+              style="position: absolute; background: #26871a; right: -9px; width: 55px; height: 2px; transform: rotate(-45deg); top: 59px;">
+          </div>
+          <div
+              style="position: absolute; left: 0px; bottom: 0px; height: 2px; width: 36px; background: rgb(0 0 0);border-radius: 10px;">
+          </div>
+          <div style="position: absolute;right:0px;bottom: 0px;height: 2px;width: 36px;background: #100c2a;">
+          </div>
+        </el-col>
+        <el-col :span="8">
+          <div class="flex menus_div">
+            <div class="menus flex_item flex">
+              <div class="flex_item">
+                <div class="menu_item" @click="turnPage('/index')">综合</div>
+              </div>
+              <div class="flex_item">
+                <div class="menu_item" @click="turnPage('/crop')">作物</div>
+              </div>
+              <div class="flex_item">
+                <div class="menu_item" @click="turnPage('/environment')">环境</div>
+              </div>
+              <div class="flex_item">
+                <div class="menu_item" @click="turnPage('/market')">市场</div>
+              </div>
+              <div class="flex_item">
+                <div class="menu_item" @click="turnPage('/device')">设备
+                </div>
+              </div>
+            </div>
+            <div class="tools  flex" style="">
+              <div class="flex_item">
+                <div class="tool_item" @click="screen">
+                  <el-icon>
+                    <full-screen />
+                  </el-icon>
+                  <span>{{screenText}}</span>
+                </div>
+              </div>
+              <div class="flex_item">
+                <div class="tool_item" @click="showSetting">
+                  <el-icon>
+                    <setting />
+                  </el-icon>
+                  <span>设置</span>
+                </div>
+              </div>
+              <div class="flex_item">
+                <div class="tool_item" @click="exit">
+                  <el-icon>
+                    <switch-button />
+                  </el-icon>
+                  <span>退出</span>
+                </div>
+              </div>
+            </div>
+          </div>
+        </el-col>
+      </el-row>
+
+      <div>
+        <transition name="bounce" mode="out-in">
+          <router-view></router-view>
+        </transition>
+      </div>
+
+      <!-- 系统菜单选择弹框 -->
+      <div class="menu_panel" v-if="menushow">
+        <div class="menu_panel_maker" @click="hideMenu">
+          <div class="inner_contaner" @click.stop="stopPropagation">
+            <el-row style="margin-top: 20px;" v-for="(item,index) in menus" :key="item.id">
+              <el-col :span="6" v-for="(subitem,subindex) in item" :key="subitem.id">
+                <div class="menu_item" @click="turnPage(subitem.url)">
+                  <div class="icon">
+                    <el-icon :size="40">
+                      <component :is="subitem.icon" :size="40"></component>
+                    </el-icon>
+                  </div>
+                  <div class="text">{{subitem.name}}</div>
+                </div>
+              </el-col>
+            </el-row>
+            <el-icon :size="25" class="menuPanelCloseBtn" @click="hideMenu">
+              <Close-bold :size="25" />
+            </el-icon>
+          </div>
+        </div>
+      </div>
+      <!-- 系统配置弹框 -->
+      <div class="setting_panel" v-if="settingshow">
+        <div class="setting_panel_maker" @click="hideSetting">
+          <div class="inner_contaner" @click.stop="stopPropagation">
+            <el-icon :size="25" class="settingPanelCloseBtn" @click="hideSetting">
+              <Close-bold :size="25" />
+            </el-icon>
+            <div class="setting_panel_title">
+              系统设置
+            </div>
+            <el-form ref="settingFormRef" :model="settingForm" status-icon :rules="rules"
+                     label-width="120px" class="settingForm">
+              <el-form-item :label="item.label+':'" prop="item.type" v-for="(item,index) in configs">
+                <!-- 识别配置项类型并创建对应组件 -->
+                <el-input v-if="item.type != 'select'" v-model="settingForm[item.key]"
+                          placeholder="请输入{{item.label}}" type="item.type" autocomplete="off" />
+                <el-select v-if="item.type == 'select'" style="width:100%"
+                           v-model="settingForm[item.key]" placeholder="请选择{{item.label}}">
+                  <el-option v-for="(optionitem,index1) in item.options" :label="optionitem.label"
+                             :value="optionitem.value" />
+                </el-select>
+              </el-form-item>
+              <el-form-item>
+                <el-row style="width:100%">
+                  <el-col :span="11">
+                    <el-button style="width:100%" type="primary"
+                               @click="submitForm(settingFormRef)">
+                      保存设置</el-button>
+                  </el-col>
+                  <el-col :span="2">
+                  </el-col>
+                  <el-col :span="11">
+                    <el-button style="width:100%" @click="defalutForm(settingFormRef)">恢复默认
+                    </el-button>
+                  </el-col>
+                </el-row>
+              </el-form-item>
+            </el-form>
+
+          </div>
+        </div>
+      </div>
+    </div>
+  </transition>
 </template>
 
 <script>
-	import "/public/dark_theme.css"
-
-	import $ from 'jquery'
-	import config from '/public/config.js'
-	import utils from '/public/utils.js'
-	import api from '/public/api.js'
-
-
-	import welcome from "./pages/welcome.vue"
-
-	export default {
-		components: {
-			welcome
-		},
-		data() {
-			return {
-				welcome: true,
-				titleHeight: 80,
-				menuHeight: 35,
-				time: new Date().format('yyyy-MM-dd hh:mm:ss'),
-				//当前主题,可以通过设置进行控制
-				curTheme: "dark",
-				turntime: 60 * 1000,
-
-				//菜单居中
-				settingPanelTop: 11,
-				//菜单居中
-				settingPanelLeft: 11,
-				settingPanelWidth: 600,
-				settingPanelHeight: 350,
-
-				settingshow: false,
-
-				configs: config.getConfig(),
-				settingForm: {},
-				rules: {},
-				timer: null,
-				isfullscreen: false,
-				screenText: '全屏'
-			}
-		},
-		unmounted: function() {
-			if (this.timer) {
-				clearInterval(this.timer);
-			}
-		},
-		mounted: function() {
-      console.log("hello")
-			this.settingPanelTop = ($(window).height() - this.settingPanelHeight) / 2;
-			this.settingPanelLeft = ($(window).width() - this.settingPanelWidth) / 2;
-
-			var that = this;
-			this.timer = setInterval(function() {
-				that.time = new Date().format('yyyy-MM-dd hh:mm:ss');
-			}, 1000);
-
-			this.configs.forEach(function(item, index, arr) {
-				that.settingForm[item.key] = item.value;
-
-				that.rules[item.key] = [{
-					required: item.required,
-					message: '请输入' + item.label,
-					trigger: 'blur'
-				}];
-
-				//更新界面主题
-				if (item.key == 'theme') {
-					that.curTheme = item.value
-				}
-				//更细切换周期
-				if (item.key == 'turntime') {
-					that.turntime = item.value * 1
-				}
-			});
-		},
-		methods: {
-			loaddingend: function() {
-				this.welcome = false;
-			},
-			/**
-			 * 切换界面
-			 * @param {Object} path
-			 */
-			turnPage: function(path) { //切换界面
-				this.$router.push(path);
-				this.hideSetting(); //切换界面
-			},
-			/**
-			 * 全屏切换
-			 */
-			screen: function() {
-				if (this.isfullscreen) {
-					if (document.exitFullscreen) {
-						document.exitFullscreen();
-					} else if (document.msExitFullscreen) {
-						document.msExitFullscreen();
-					} else if (document.mozCancelFullScreen) {
-						document.mozCancelFullScreen();
-					} else if (document.webkitExitFullscreen) {
-						document.webkitExitFullscreen();
-					}
-					this.screenText = '全屏';
-				} else {
-					var element = document.documentElement;
-					if (element.requestFullscreen) {
-						element.requestFullscreen();
-					} else if (element.msRequestFullscreen) {
-						element.msRequestFullscreen();
-					} else if (element.mozRequestFullScreen) {
-						element.mozRequestFullScreen();
-					} else if (element.webkitRequestFullscreen) {
-						element.webkitRequestFullscreen();
-					}
-					this.screenText = '恢复';
-				}
-				this.isfullscreen = !this.isfullscreen;
-			},
-			/**
-			 * 退出系统
-			 */
-			exit: function() {
-				utils.showconfirm('确定要退出吗?');
-			},
-			/**
-			 * 显示设置框
-			 */
-			showSetting: function() {
-				this.settingshow = true;
-			},
-			/**
-			 * 显示设置框
-			 */
-			hideSetting: function() {
-				this.settingshow = false;
-			},
-			/**
-			 * 阻止事件冒泡
-			 */
-			stopPropagation: function() {},
-			/**
-			 * 恢复默认
-			 */
-			defalutForm: function() {
-				var that = this;
-				this.configs = config.defaultconfig;
-				this.configs.forEach(function(item, index, arr) {
-					that.settingForm[item.key] = item.value;
-
-					that.rules[item.key] = [{
-						required: item.required,
-						message: '请输入' + item.label,
-						trigger: 'blur'
-					}];
-				});
-			},
-			/**
-			 * 提交表单
-			 */
-			submitForm: function() {
-				var that = this;
-				this.$refs.settingFormRef.validate((valid, fields) => {
-					if (!valid) {
-						return;
-					}
-					//将数据组合成数组格式
-					var configdata = [];
-					for (var key in that.settingForm) {
-						var itemconfig = null;
-						for (var i = 0; i < that.configs.length; i++) {
-							if (that.configs[i].key == key) {
-								itemconfig = that.configs[i];
-								break;
-							}
-						}
-						if (!itemconfig) { //未识别的配置项
-							continue;
-						}
-						//更新数据
-						itemconfig.value = that.settingForm[key];
-						configdata.push(itemconfig);
-					}
-
-					//保存系统配置
-					utils.saveConfig(configdata);
-
-					//刷新并应用系统配置
-					this.refreshConfig();
-				});
-			},
-			/**
-			 * 刷新并应用系统配置
-			 */
-			refreshConfig: function() {
-				//更新配置表单对应数据
-				this.configs = config.getConfig();
-				var that = this;
-				this.configs.forEach(function(item, index, arr) {
-					that.settingForm[item.key] = item.value;
-
-					that.rules[item.key] = [{
-						required: item.required,
-						message: '请输入' + item.label,
-						trigger: 'blur'
-					}];
-
-					//更新界面主题
-					if (item.key == 'theme') {
-						that.curTheme = item.value
-					}
-
-					//简单期间,直接刷新界面
-					window.location.reload();
-				});
-			}
-		}
-	}
+import "/public/dark_theme.css"
+
+import $ from 'jquery'
+import config from '/public/config.js'
+import utils from '/public/utils.js'
+import api from '/public/api.js'
+
+
+import welcome from "./pages/welcome.vue"
+
+export default {
+  components: {
+    welcome
+  },
+  data() {
+    return {
+      welcome: true,
+      titleHeight: 80,
+      menuHeight: 35,
+      time: new Date().format('yyyy-MM-dd hh:mm:ss'),
+      //当前主题,可以通过设置进行控制
+      curTheme: "dark",
+      turntime: 60 * 1000,
+
+      //菜单居中
+      settingPanelTop: 11,
+      //菜单居中
+      settingPanelLeft: 11,
+      settingPanelWidth: 600,
+      settingPanelHeight: 350,
+
+      settingshow: false,
+
+      configs: config.getConfig(),
+      settingForm: {},
+      rules: {},
+      timer: null,
+      isfullscreen: false,
+      screenText: '全屏'
+    }
+  },
+  unmounted: function() {
+    if (this.timer) {
+      clearInterval(this.timer);
+    }
+  },
+  mounted: function() {
+    console.log("hello")
+    this.settingPanelTop = ($(window).height() - this.settingPanelHeight) / 2;
+    this.settingPanelLeft = ($(window).width() - this.settingPanelWidth) / 2;
+
+    var that = this;
+    this.timer = setInterval(function() {
+      that.time = new Date().format('yyyy-MM-dd hh:mm:ss');
+    }, 1000);
+
+    this.configs.forEach(function(item, index, arr) {
+      that.settingForm[item.key] = item.value;
+
+      that.rules[item.key] = [{
+        required: item.required,
+        message: '请输入' + item.label,
+        trigger: 'blur'
+      }];
+
+      //更新界面主题
+      if (item.key == 'theme') {
+        that.curTheme = item.value
+      }
+      //更细切换周期
+      if (item.key == 'turntime') {
+        that.turntime = item.value * 1
+      }
+    });
+  },
+  methods: {
+    loaddingend: function() {
+      this.welcome = false;
+    },
+    /**
+     * 切换界面
+     * @param {Object} path
+     */
+    turnPage: function(path) { //切换界面
+      this.$router.push(path);
+      this.hideSetting(); //切换界面
+    },
+    /**
+     * 全屏切换
+     */
+    screen: function() {
+      if (this.isfullscreen) {
+        if (document.exitFullscreen) {
+          document.exitFullscreen();
+        } else if (document.msExitFullscreen) {
+          document.msExitFullscreen();
+        } else if (document.mozCancelFullScreen) {
+          document.mozCancelFullScreen();
+        } else if (document.webkitExitFullscreen) {
+          document.webkitExitFullscreen();
+        }
+        this.screenText = '全屏';
+      } else {
+        var element = document.documentElement;
+        if (element.requestFullscreen) {
+          element.requestFullscreen();
+        } else if (element.msRequestFullscreen) {
+          element.msRequestFullscreen();
+        } else if (element.mozRequestFullScreen) {
+          element.mozRequestFullScreen();
+        } else if (element.webkitRequestFullscreen) {
+          element.webkitRequestFullscreen();
+        }
+        this.screenText = '恢复';
+      }
+      this.isfullscreen = !this.isfullscreen;
+    },
+    /**
+     * 退出系统
+     */
+    exit: function() {
+      utils.showconfirm('确定要退出吗?');
+    },
+    /**
+     * 显示设置框
+     */
+    showSetting: function() {
+      this.settingshow = true;
+    },
+    /**
+     * 显示设置框
+     */
+    hideSetting: function() {
+      this.settingshow = false;
+    },
+    /**
+     * 阻止事件冒泡
+     */
+    stopPropagation: function() {},
+    /**
+     * 恢复默认
+     */
+    defalutForm: function() {
+      var that = this;
+      this.configs = config.defaultconfig;
+      this.configs.forEach(function(item, index, arr) {
+        that.settingForm[item.key] = item.value;
+
+        that.rules[item.key] = [{
+          required: item.required,
+          message: '请输入' + item.label,
+          trigger: 'blur'
+        }];
+      });
+    },
+    /**
+     * 提交表单
+     */
+    submitForm: function() {
+      var that = this;
+      this.$refs.settingFormRef.validate((valid, fields) => {
+        if (!valid) {
+          return;
+        }
+        //将数据组合成数组格式
+        var configdata = [];
+        for (var key in that.settingForm) {
+          var itemconfig = null;
+          for (var i = 0; i < that.configs.length; i++) {
+            if (that.configs[i].key == key) {
+              itemconfig = that.configs[i];
+              break;
+            }
+          }
+          if (!itemconfig) { //未识别的配置项
+            continue;
+          }
+          //更新数据
+          itemconfig.value = that.settingForm[key];
+          configdata.push(itemconfig);
+        }
+
+        //保存系统配置
+        utils.saveConfig(configdata);
+
+        //刷新并应用系统配置
+        this.refreshConfig();
+      });
+    },
+    /**
+     * 刷新并应用系统配置
+     */
+    refreshConfig: function() {
+      //更新配置表单对应数据
+      this.configs = config.getConfig();
+      var that = this;
+      this.configs.forEach(function(item, index, arr) {
+        that.settingForm[item.key] = item.value;
+
+        that.rules[item.key] = [{
+          required: item.required,
+          message: '请输入' + item.label,
+          trigger: 'blur'
+        }];
+
+        //更新界面主题
+        if (item.key == 'theme') {
+          that.curTheme = item.value
+        }
+
+        //简单期间,直接刷新界面
+        window.location.reload();
+      });
+    }
+  }
+}
 </script>
 
 <style>
-	.flex {
-		display: flex;
-	}
-
-	.flex_item {
-		flex: 1;
-	}
-
-	.title {
-		height: v-bind(titleHeight+'px');
-		position: relative;
-	}
-
-	.title .time_div {
-		border-bottom: 1px solid #26871a;
-		line-height: 40px;
-		height: 40px;
-	}
-
-	.title .menus_div {
-		border-bottom: 1px solid #26871a;
-		height: 40px;
-	}
-
-	.title .time {
-		line-height: 40px;
-		height: 40px;
-		font-size: 14px;
-		text-align: left;
-		padding-left: 10px;
-	}
-
-	.title .time i {
-		margin-right: 5px;
-		position: relative;
-		top: 2px;
-	}
-
-	.title .header {
-		line-height: v-bind(titleHeight+'px');
-		letter-spacing: 3px;
-		height: 79px;
-		border-bottom: 1px solid #26871a;
-		background: linear-gradient(to left, #30a55f, #24fda3, #2f9737);
-		-webkit-background-clip: text;
-		color: transparent;
-	}
-
-	.title .menus {
-		display: flex;
-		height: 60px;
-		line-height: 60px;
-	}
-
-	.title .menus .menu_item {
-		height: 30px;
-		line-height: 30px;
-		font-size: 14px;
-		margin: 0 auto;
-		width: 90%;
-		background: rgba(255, 255, 255, 0.3);
-		border-radius: 3px;
-		margin-top: 5px;
-		cursor: pointer;
-	}
-
-	.title .menus .menu_item:hover {
-		background: #26871a;
-	}
-
-	.title .tools {
-		width: 180px;
-		padding-top: 5px;
-		height: 60px;
-	}
-
-	.title .tool_item {
-		font-size: 14px;
-		cursor: pointer;
-	}
-
-	.title .tool_item i {
-		height: 30px;
-		line-height: 30px;
-		margin-right: 5px;
-		position: relative;
-		top: 2px;
-	}
-
-	.title .tool_item:hover {
-		color: #26871a;
-	}
-
-	.anchorBL {
-		display: none !important;
-	}
-
-	.container {
-		position: fixed;
-		left: 0px;
-		top: 0px;
-		width: 100%;
-		height: 100%;
-		overflow: auto;
-	}
-
-	.setting_panel .inner_contaner {
-		width: v-bind(settingPanelWidth+"px");
-		height: v-bind(settingPanelHeight+"px");
-		top: v-bind(settingPanelTop+"px");
-		left: v-bind(settingPanelLeft+"px");
-	}
-
-	.bounce-enter-active {
-		animation: bounce-in .5s ease-out both;
-	}
-
-	.bounce-leave-active {
-		animation: bounce-in .5s reverse ease-in both;
-	}
-
-	.weather {
-		font-size: 14px;
-		text-align: left;
-	}
-
-	.weather .item {
-		margin: 0 10px;
-	}
-
-	@keyframes bounce-in {
-		0% {
-			transform: scale(0);
-		}
-
-		50% {
-			transform: scale(1.25);
-		}
-
-		100% {
-			transform: scale(1);
-		}
-	}
+.flex {
+  display: flex;
+}
+
+.flex_item {
+  flex: 1;
+}
+
+.title {
+  height: v-bind(titleHeight+'px');
+  position: relative;
+}
+
+.title .time_div {
+  border-bottom: 1px solid #26871a;
+  line-height: 40px;
+  height: 40px;
+}
+
+.title .menus_div {
+  border-bottom: 1px solid #26871a;
+  height: 40px;
+}
+
+.title .time {
+  line-height: 40px;
+  height: 40px;
+  font-size: 14px;
+  text-align: left;
+  padding-left: 10px;
+}
+
+.title .time i {
+  margin-right: 5px;
+  position: relative;
+  top: 2px;
+}
+
+.title .header {
+  line-height: v-bind(titleHeight+'px');
+  letter-spacing: 3px;
+  height: 79px;
+  border-bottom: 1px solid #26871a;
+  background: linear-gradient(to left, #30a55f, #24fda3, #2f9737);
+  -webkit-background-clip: text;
+  color: transparent;
+}
+
+.title .menus {
+  display: flex;
+  height: 60px;
+  line-height: 60px;
+}
+
+.title .menus .menu_item {
+  height: 30px;
+  line-height: 30px;
+  font-size: 14px;
+  margin: 0 auto;
+  width: 90%;
+  background: rgba(255, 255, 255, 0.3);
+  border-radius: 3px;
+  margin-top: 5px;
+  cursor: pointer;
+}
+
+.title .menus .menu_item:hover {
+  background: #26871a;
+}
+
+.title .tools {
+  width: 180px;
+  padding-top: 5px;
+  height: 60px;
+}
+
+.title .tool_item {
+  font-size: 14px;
+  cursor: pointer;
+}
+
+.title .tool_item i {
+  height: 30px;
+  line-height: 30px;
+  margin-right: 5px;
+  position: relative;
+  top: 2px;
+}
+
+.title .tool_item:hover {
+  color: #26871a;
+}
+
+.anchorBL {
+  display: none !important;
+}
+
+.container {
+  position: fixed;
+  left: 0px;
+  top: 0px;
+  width: 100%;
+  height: 100%;
+  overflow: auto;
+}
+
+.setting_panel .inner_contaner {
+  width: v-bind(settingPanelWidth+"px");
+  height: v-bind(settingPanelHeight+"px");
+  top: v-bind(settingPanelTop+"px");
+  left: v-bind(settingPanelLeft+"px");
+}
+
+.bounce-enter-active {
+  animation: bounce-in .5s ease-out both;
+}
+
+.bounce-leave-active {
+  animation: bounce-in .5s reverse ease-in both;
+}
+
+.weather {
+  font-size: 14px;
+  text-align: left;
+}
+
+.weather .item {
+  margin: 0 10px;
+}
+
+@keyframes bounce-in {
+  0% {
+    transform: scale(0);
+  }
+
+  50% {
+    transform: scale(1.25);
+  }
+
+  100% {
+    transform: scale(1);
+  }
+}
 </style>

BIN
display_model_for_smartagriculture/src/assets/111.webp


BIN
display_model_for_smartagriculture/src/assets/222.webp


BIN
display_model_for_smartagriculture/src/assets/333.webp


BIN
display_model_for_smartagriculture/src/assets/444.webp


+ 511 - 511
display_model_for_smartagriculture/src/pages/crop.vue

@@ -1,521 +1,521 @@
 <template>
-	<el-row>
-		<el-col :span="6">
-			<div class="chart" :style="{height:((height-80)/3 - 40)+'px'}">
-				<div class="itemtitle" style="">基本情况</div>
-				<el-row :style="{paddingTop:((((height-80)/3 - 40)/2)/2 - 35)/2+'px'}">
-					<el-col :span="8">
-						<div class="flex">
-							<div style="width:60px;text-align: center;line-height: 100px;">
-								<el-icon :size="40" style="">
-									<football />
-								</el-icon>
-							</div>
-							<div class="flex_item" style="text-align: center;">
-								<div style="line-height: 40px;color: #24fda3;">
-									<span style="font-size: 24px;font-weight: bold;">{{size}}</span>
-									<span style="font-size:20px;margin-left:5px">㎡</span>
-								</div>
-								<div style="line-height: 40px;color: #fff;font-size: 16px;">
-									<span style="margin-left: 5px;">种植面积</span>
-								</div>
-							</div>
-						</div>
-					</el-col>
-					<el-col :span="8">
-						<div class="flex">
-							<div style="width:60px;text-align: center;line-height: 100px;">
-								<el-icon :size="40" style="">
-									<user />
-								</el-icon>
-							</div>
-							<div class="flex_item" style="text-align: center;">
-								<div style="line-height: 40px;color: #24fda3;">
-									<span style="font-size: 24px;font-weight: bold;">{{count}}</span>
-									<span style="font-size:20px;margin-left:5px">户</span>
-								</div>
-								<div style="line-height: 40px;color: #fff;font-size: 16px;">
-									<span style="margin-left: 5px;">农户数量</span>
-								</div>
-							</div>
-						</div>
-					</el-col>
-					<el-col :span="8">
-						<div class="flex">
-							<div style="width:60px;text-align: center;line-height: 100px;">
-								<el-icon :size="40" style="">
-									<cellphone />
-								</el-icon>
-							</div>
-							<div class="flex_item" style="text-align: center;">
-								<div style="line-height: 40px;color: #24fda3;">
-									<span style="font-size: 24px;font-weight: bold;">{{devicecount}}</span>
-									<span style="font-size:20px;margin-left:5px">个</span>
-								</div>
-								<div style="line-height: 40px;color: #fff;font-size: 16px;">
-									<span style="margin-left: 5px;">注册设备</span>
-								</div>
-							</div>
-						</div>
-					</el-col>
-				</el-row>
-				<el-row :style="{paddingTop:((((height-80)/3 - 40)/2)/2 - 55)/2+'px'}">
-					<el-col :span="8">
-						<div class="flex">
-							<div style="width:60px;text-align: center;line-height: 100px;">
-								<el-icon :size="40" style="">
-									<SetUp />
-								</el-icon>
-							</div>
-							<div class="flex_item" style="text-align: center;">
-								<div style="line-height: 40px;color: #24fda3;">
-									<span style="font-size: 24px;font-weight: bold;">{{category}}</span>
-									<span style="font-size:20px;margin-left:5px">种</span>
-								</div>
-								<div style="line-height: 40px;color: #fff;font-size: 16px;">
-									<span style="margin-left: 5px;">作物种类</span>
-								</div>
-							</div>
-						</div>
-					</el-col>
-					<el-col :span="8">
-						<div class="flex">
-							<div style="width:60px;text-align: center;line-height: 100px;">
-								<el-icon :size="40" style="">
-									<money />
-								</el-icon>
-							</div>
-							<div class="flex_item" style="text-align: center;">
-								<div style="line-height: 40px;color: #24fda3;">
-									<span style="font-size: 24px;font-weight: bold;">{{cost}}</span>
-									<span style="font-size:20px;margin-left:5px">元</span>
-								</div>
-								<div style="line-height: 40px;color: #fff;font-size: 16px;">
-									<span style="margin-left: 5px;">作物销量</span>
-								</div>
-							</div>
-						</div>
-					</el-col>
-					<el-col :span="8">
-						<div class="flex">
-							<div style="width:60px;text-align: center;line-height: 100px;">
-								<el-icon :size="40" style="">
-									<basketball />
-								</el-icon>
-							</div>
-							<div class="flex_item" style="text-align: center;">
-								<div style="line-height: 40px;color: #24fda3;">
-									<span style="font-size: 24px;font-weight: bold;">{{deviceonlinecount}}</span>
-									<span style="font-size:20px;margin-left:5px">个</span>
-								</div>
-								<div style="line-height: 40px;color: #fff;font-size: 16px;">
-									<span style="margin-left: 5px;">活跃设备</span>
-								</div>
-							</div>
-						</div>
-					</el-col>
-				</el-row>
-			</div>
-			<div class="chart" :style="{height:((height-80)/3 - 10)+'px'}">
-				<div class="itemtitle" style="">视频监控</div>
-				<div style="padding:10px">
-					<div>
-						<div v-for="(item,index) in videos" class="vidoeitem" :style="{height:(((height-80)/3 - 10 - 35 - 20)/2)+'px'}">
-							<div class="flex" style="height:30px;line-height: 30px;">
-								<div class="flex_item" style="font-size:16px">
-									{{item.name}}
-								</div>
-								<div class="flex_item" style="font-size:12px;text-align: right;padding-right:10px">
-									<span v-if="item.status == '1'" style="color:#00FAC1">监测正常</span>
-									<span v-if="item.status != '1'" style="color:#FF5722">监测异常</span>
-								</div>
-							</div>
-							<div style="position: relative;width:100%;margin: 0 auto;">
-								<div :style="{background:item.status == '1'?'#00FAC1':'#FF5722'}" style="position: absolute;left:0px;top:0px;width:20px;height:2px;:"></div>
-								<div :style="{background:item.status == '1'?'#00FAC1':'#FF5722'}" style="position: absolute;left:0px;top:0px;width:2px;height:20px;"></div>
-								
-								<div :style="{background:item.status == '1'?'#00FAC1':'#FF5722'}" style="position: absolute;right:10px;top:0px;width:20px;height:2px;"></div>
-								<div :style="{background:item.status == '1'?'#00FAC1':'#FF5722'}" style="position: absolute;right:10px;top:0px;width:2px;height:20px;"></div>
-								
-								<div class="inner" :style="{height:(((height-80)/3 - 10 - 35 - 20 - 30 - 30)/2)+'px'}">
-									<img :src="item.url" style="height:100%;width:105%"/>
-								</div>
-								
-								<div :style="{background:item.status == '1'?'#00FAC1':'#FF5722'}" style="position: absolute;left:0px;bottom:0px;width:20px;height:2px;"></div>
-								<div :style="{background:item.status == '1'?'#00FAC1':'#FF5722'}" style="position: absolute;left:0px;bottom:0px;width:2px;height:20px;"></div>
-								
-								<div :style="{background:item.status == '1'?'#00FAC1':'#FF5722'}" style="position: absolute;right:10px;bottom:0px;width:20px;height:2px;"></div>
-								<div :style="{background:item.status == '1'?'#00FAC1':'#FF5722'}" style="position: absolute;right:10px;bottom:0px;width:2px;height:20px;"></div>
-							</div>
-						</div>
-					</div>
-				</div>
-			</div>
-			<div class="chart" :style="{height:((height-80)/3 - 40)+'px'}">
-				<div class="itemtitle" style="">作物种类</div>
-				<!-- 展示字符云,各种作物占比 -->
-				<v-chart ref="cropchart" :style="{height:(((height-80)/3 - 20)+'px')}" :option="cropoption" />
-			</div>
-		</el-col>
-		<el-col :span="18" >
-			<div style="padding:10px;position: relative;">
-				<!-- 展示可搜索的地图 -->
-				<div id="mapchart" style="position: relative;" :style="{height:(height-80 - 20)+'px'}"></div>
-				
-				<div style="position: absolute;left:0px;top:0px;width:20px;height:2px;background:#FF5722"></div>
-				<div style="position: absolute;left:0px;top:0px;width:2px;height:20px;background:#FF5722"></div>
-				
-				<div style="position: absolute;right:10px;top:0px;width:20px;height:2px;background:#FF5722"></div>
-				<div style="position: absolute;right:10px;top:0px;width:2px;height:20px;background:#FF5722"></div>
-				
-				<div style="position: absolute;left:0px;bottom:0px;width:20px;height:2px;background:#FF5722"></div>
-				<div style="position: absolute;left:0px;bottom:0px;width:2px;height:20px;background:#FF5722"></div>
-				
-				<div style="position: absolute;right:10px;bottom:0px;width:20px;height:2px;background:#FF5722"></div>
-				<div style="position: absolute;right:10px;bottom:0px;width:2px;height:20px;background:#FF5722"></div>
-			</div>
-		</el-col>
-	</el-row>
+  <el-row>
+    <el-col :span="6">
+      <div class="chart" :style="{height:((height-80)/3 - 40)+'px'}">
+        <div class="itemtitle" style="">基本情况</div>
+        <el-row :style="{paddingTop:((((height-80)/3 - 40)/2)/2 - 35)/2+'px'}">
+          <el-col :span="8">
+            <div class="flex">
+              <div style="width:60px;text-align: center;line-height: 100px;">
+                <el-icon :size="40" style="">
+                  <football />
+                </el-icon>
+              </div>
+              <div class="flex_item" style="text-align: center;">
+                <div style="line-height: 40px;color: #24fda3;">
+                  <span style="font-size: 24px;font-weight: bold;">{{size}}</span>
+                  <span style="font-size:20px;margin-left:5px">㎡</span>
+                </div>
+                <div style="line-height: 40px;color: #fff;font-size: 16px;">
+                  <span style="margin-left: 5px;">种植面积</span>
+                </div>
+              </div>
+            </div>
+          </el-col>
+          <el-col :span="8">
+            <div class="flex">
+              <div style="width:60px;text-align: center;line-height: 100px;">
+                <el-icon :size="40" style="">
+                  <user />
+                </el-icon>
+              </div>
+              <div class="flex_item" style="text-align: center;">
+                <div style="line-height: 40px;color: #24fda3;">
+                  <span style="font-size: 24px;font-weight: bold;">{{count}}</span>
+                  <span style="font-size:20px;margin-left:5px">户</span>
+                </div>
+                <div style="line-height: 40px;color: #fff;font-size: 16px;">
+                  <span style="margin-left: 5px;">农户数量</span>
+                </div>
+              </div>
+            </div>
+          </el-col>
+          <el-col :span="8">
+            <div class="flex">
+              <div style="width:60px;text-align: center;line-height: 100px;">
+                <el-icon :size="40" style="">
+                  <cellphone />
+                </el-icon>
+              </div>
+              <div class="flex_item" style="text-align: center;">
+                <div style="line-height: 40px;color: #24fda3;">
+                  <span style="font-size: 24px;font-weight: bold;">{{devicecount}}</span>
+                  <span style="font-size:20px;margin-left:5px">个</span>
+                </div>
+                <div style="line-height: 40px;color: #fff;font-size: 16px;">
+                  <span style="margin-left: 5px;">注册设备</span>
+                </div>
+              </div>
+            </div>
+          </el-col>
+        </el-row>
+        <el-row :style="{paddingTop:((((height-80)/3 - 40)/2)/2 - 55)/2+'px'}">
+          <el-col :span="8">
+            <div class="flex">
+              <div style="width:60px;text-align: center;line-height: 100px;">
+                <el-icon :size="40" style="">
+                  <SetUp />
+                </el-icon>
+              </div>
+              <div class="flex_item" style="text-align: center;">
+                <div style="line-height: 40px;color: #24fda3;">
+                  <span style="font-size: 24px;font-weight: bold;">{{category}}</span>
+                  <span style="font-size:20px;margin-left:5px">种</span>
+                </div>
+                <div style="line-height: 40px;color: #fff;font-size: 16px;">
+                  <span style="margin-left: 5px;">作物种类</span>
+                </div>
+              </div>
+            </div>
+          </el-col>
+          <el-col :span="8">
+            <div class="flex">
+              <div style="width:60px;text-align: center;line-height: 100px;">
+                <el-icon :size="40" style="">
+                  <money />
+                </el-icon>
+              </div>
+              <div class="flex_item" style="text-align: center;">
+                <div style="line-height: 40px;color: #24fda3;">
+                  <span style="font-size: 24px;font-weight: bold;">{{cost}}</span>
+                  <span style="font-size:20px;margin-left:5px">元</span>
+                </div>
+                <div style="line-height: 40px;color: #fff;font-size: 16px;">
+                  <span style="margin-left: 5px;">作物销量</span>
+                </div>
+              </div>
+            </div>
+          </el-col>
+          <el-col :span="8">
+            <div class="flex">
+              <div style="width:60px;text-align: center;line-height: 100px;">
+                <el-icon :size="40" style="">
+                  <basketball />
+                </el-icon>
+              </div>
+              <div class="flex_item" style="text-align: center;">
+                <div style="line-height: 40px;color: #24fda3;">
+                  <span style="font-size: 24px;font-weight: bold;">{{deviceonlinecount}}</span>
+                  <span style="font-size:20px;margin-left:5px">个</span>
+                </div>
+                <div style="line-height: 40px;color: #fff;font-size: 16px;">
+                  <span style="margin-left: 5px;">活跃设备</span>
+                </div>
+              </div>
+            </div>
+          </el-col>
+        </el-row>
+      </div>
+      <div class="chart" :style="{height:((height-80)/3 - 10)+'px'}">
+        <div class="itemtitle" style="">监控视频</div>
+        <div style="padding:10px">
+          <div>
+            <div v-for="(item,index) in videos" class="vidoeitem" :style="{height:(((height-80)/3 - 10 - 35 - 20)/2)+'px'}">
+              <div class="flex" style="height:30px;line-height: 30px;">
+                <div class="flex_item" style="font-size:16px">
+                  {{item.name}}
+                </div>
+                <div class="flex_item" style="font-size:12px;text-align: right;padding-right:10px">
+                  <span v-if="item.status == '1'" style="color:green">监测正常</span>
+                  <span v-if="item.status != '1'" style="color:red">监测异常</span>
+                </div>
+              </div>
+              <div style="position: relative;width:100%;margin: 0 auto;">
+                <div :style="{background:item.status == '1'?'green':'red'}" style="position: absolute;left:0px;top:0px;width:20px;height:2px;:"></div>
+                <div :style="{background:item.status == '1'?'green':'red'}" style="position: absolute;left:0px;top:0px;width:2px;height:20px;"></div>
+
+                <div :style="{background:item.status == '1'?'green':'red'}" style="position: absolute;right:10px;top:0px;width:20px;height:2px;"></div>
+                <div :style="{background:item.status == '1'?'green':'red'}" style="position: absolute;right:10px;top:0px;width:2px;height:20px;"></div>
+
+                <div class="inner" :style="{height:(((height-80)/3 - 10 - 35 - 20 - 30 - 30)/2)+'px'}">
+                  <img :src="item.url" style="height:100%;width:105%"/>
+                </div>
+
+                <div :style="{background:item.status == '1'?'green':'red'}" style="position: absolute;left:0px;bottom:0px;width:20px;height:2px;"></div>
+                <div :style="{background:item.status == '1'?'green':'red'}" style="position: absolute;left:0px;bottom:0px;width:2px;height:20px;"></div>
+
+                <div :style="{background:item.status == '1'?'green':'red'}" style="position: absolute;right:10px;bottom:0px;width:20px;height:2px;"></div>
+                <div :style="{background:item.status == '1'?'green':'red'}" style="position: absolute;right:10px;bottom:0px;width:2px;height:20px;"></div>
+              </div>
+            </div>
+          </div>
+        </div>
+      </div>
+      <div class="chart" :style="{height:((height-80)/3 - 40)+'px'}">
+        <div class="itemtitle" style="">作物种类</div>
+        <!-- 展示字符云,各种作物占比 -->
+        <v-chart ref="cropchart" :style="{height:(((height-80)/3 - 20)+'px')}" :option="cropoption" />
+      </div>
+    </el-col>
+    <el-col :span="18" >
+      <div style="padding:10px;position: relative;">
+        <!-- 展示可搜索的地图 -->
+        <div id="mapchart" style="position: relative;" :style="{height:(height-80 - 20)+'px'}"></div>
+
+        <div style="position: absolute;left:0px;top:0px;width:20px;height:2px;background:#FF5722"></div>
+        <div style="position: absolute;left:0px;top:0px;width:2px;height:20px;background:#FF5722"></div>
+
+        <div style="position: absolute;right:10px;top:0px;width:20px;height:2px;background:#FF5722"></div>
+        <div style="position: absolute;right:10px;top:0px;width:2px;height:20px;background:#FF5722"></div>
+
+        <div style="position: absolute;left:0px;bottom:0px;width:20px;height:2px;background:#FF5722"></div>
+        <div style="position: absolute;left:0px;bottom:0px;width:2px;height:20px;background:#FF5722"></div>
+
+        <div style="position: absolute;right:10px;bottom:0px;width:20px;height:2px;background:#FF5722"></div>
+        <div style="position: absolute;right:10px;bottom:0px;width:2px;height:20px;background:#FF5722"></div>
+      </div>
+    </el-col>
+  </el-row>
 </template>
 
 <script>
-	import $ from 'jquery'
-	import config from '/public/config.js'
-	import utils from '/public/utils.js'
-	import api from '/public/api.js'
-	import VChart, {
-		THEME_KEY
-	} from "vue-echarts";
+import $ from 'jquery'
+import config from '/public/config.js'
+import utils from '/public/utils.js'
+import api from '/public/api.js'
+import VChart, {
+  THEME_KEY
+} from "vue-echarts";
+
+import * as echarts from 'echarts';
+import 'echarts-extension-amap';
+
+import 'echarts-wordcloud';
+
+export default{
+  components: {
+    VChart
+  },
+  provide: {
+    [THEME_KEY]: "dark"
+  },
+  data(){
+    return{
+      height: $(window).height(),
+      size: (Math.random(100) * 1000).toFixed(0),
+      count: (Math.random(100) * 1000).toFixed(0),
+      category: (Math.random(100) * 1000).toFixed(0),
+      cost: (Math.random(100) * 1000).toFixed(0),
+      devicecount: (Math.random(100) * 1000).toFixed(0),
+      deviceonlinecount: (Math.random(100) * 100).toFixed(0),
+      videos:[{
+        id:1,
+        name:'摄像001',
+        url:'/src/assets/111.webp',
+        status:'1'
+      },{
+        id:2,
+        name:'摄像002',
+        url:'/src/assets/222.webp',
+        status:'2'
+      },{
+        id:3,
+        name:'摄像003',
+        url:'/src/assets/333.webp',
+        status:'1'
+      },{
+        id:4,
+        name:'摄像004',
+        url:'/src/assets/444.webp',
+        status:'1'
+      }],
+      categorys:['玉米', '水稻', '小麦', '大豆', '青稞', '蔬菜', '水果', '花卉', '薯类', '药材', '蚕豆', '油籽', '蔓青', '大芥', '花生',
+        '胡麻', '大麻', '向日葵', '梨', '苹果', '桃', '杏', '核桃', '李子', '樱桃', '草莓', '酸梨', '野杏', '毛桃', '苞瑙', '山樱桃',
+        '沙棘', '草莓'
+      ],
+      cropoption: {},
+      charts: {},
+      timer: null,
+    }
+  },
+  mounted:function(){
+    var that = this;
+    $(window).resize(function() {
+      this.height = $(window).height() - this.titleheight;
 
-	import * as echarts from 'echarts';
-	import 'echarts-extension-amap';
+      for (var key in that.charts) {
+        that.charts[key].resize();
+      }
+      that.$refs['cropchart'].resize();
+    });
 
-	import 'echarts-wordcloud';
-		
-	export default{
-		components: {
-			VChart
-		},
-		provide: {
-			[THEME_KEY]: "dark"
-		},
-		data(){
-			 return{
-				height: $(window).height(),
-				size: (Math.random(100) * 1000).toFixed(0),
-				count: (Math.random(100) * 1000).toFixed(0),
-				category: (Math.random(100) * 1000).toFixed(0),
-				cost: (Math.random(100) * 1000).toFixed(0),
-				devicecount: (Math.random(100) * 1000).toFixed(0),
-				deviceonlinecount: (Math.random(100) * 100).toFixed(0),
-				videos:[{
-					id:1,
-					name:'摄像001',
-					url:'/src/assets/111.webp',
-					status:'1'
-				},{
-					id:2,
-					name:'摄像002',
-					url:'/src/assets/222.webp',
-					status:'2'
-				},{
-					id:3,
-					name:'摄像003',
-					url:'/src/assets/333.webp',
-					status:'1'
-				},{
-					id:4,
-					name:'摄像004',
-					url:'/src/assets/444.webp',
-					status:'1'
-				}],
-				categorys:['玉米', '水稻', '小麦', '大豆', '青稞', '蔬菜', '水果', '花卉', '薯类', '药材', '蚕豆', '油籽', '蔓青', '大芥', '花生',
-					'胡麻', '大麻', '向日葵', '梨', '苹果', '桃', '杏', '核桃', '李子', '樱桃', '草莓', '酸梨', '野杏', '毛桃', '苞瑙', '山樱桃',
-					'沙棘', '草莓'
-				],
-				cropoption: {},
-				charts: {},
-				timer: null,
-			 }
-		},
-		mounted:function(){
-			var that = this;
-			$(window).resize(function() {
-				this.height = $(window).height() - this.titleheight;
-			
-				for (var key in that.charts) {
-					that.charts[key].resize();
-				}
-				that.$refs['cropchart'].resize();
-			});
-			
-			
-			this.loadData();
-			
-			//开始定时刷新报表数据
-			this.startRefreshChart();
-		},
-		unmounted:function(){
-			if (this.timer) {
-				clearInterval(this.timer);
-			}
-		},
-		methods: {
-			/**
-			 * 定时刷新报表数据
-			 */
-			startRefreshChart: function() {
-				if (this.timer) {
-					clearInterval(this.timer);
-				}
-				var that = this;
-			
-				//获取刷新周期,TODO 配置变动时,此处需自动更新
-				var refreshtime = 60 * 1000;
-				config.getConfig().forEach(function(item, index) {
-					if (item.key == 'refreshtime') {
-						refreshtime = item.value;
-					}
-				});
-			
-				this.timer = setInterval(function() {
-					that.size = (Math.random(100) * 1000).toFixed(0);
-					that.count = (Math.random(100) * 1000).toFixed(0);
-					that.category = (Math.random(100) * 1000).toFixed(0);
-					that.cost = (Math.random(100) * 1000).toFixed(0);
-					that.devicecount = (Math.random(100) * 1000).toFixed(0);
-					that.deviceonlinecount = (Math.random(100) * 100).toFixed(0);
-					//------------------------------
-					that.cropoption.series[0].data = [];
-					that.categorys.forEach(function(item, index) {
-						that.cropoption.series[0].data.push({
-							name: item,
-							value: (Math.random(100) * 1000).toFixed(0),
-							textStyle: {
-								color: config.colors[index % config.colors.length]
-							}
-						});
-					})
-				}, refreshtime);
-			},
-			loadData: function() {
-				var that = this;
-				api.loadMapData(function(res) {
-					if (!res || res.status != 200) {
-						utils.showerror("数据加载失败!");
-						return;
-					}
-					that.initMapChart(res);
-				});
-				this.cropoption = this.initcropoption();
-			},
-			initcropoption: function() {
-				var data = [];
-				this.categorys.forEach(function(item, index) {
-					data.push({
-						name: item,
-						value: (Math.random(100) * 1000).toFixed(0),
-						textStyle: {
-							color: config.colors[index % config.colors.length]
-						}
-					});
-				})
-				return {
-					backgroundColor:'#000000',
-					tooltip: {
-						show: true,
-						position: 'top',
-						textStyle: {
-							fontSize: 14
-						}
-					},
-					grid: {
-						top: '40px'
-					},
-					series: [{
-						type: "wordCloud",
-						// 网格大小,各项之间间距
-						gridSize: 20,
-						// 形状 circle 圆,cardioid  心, diamond 菱形,
-						// triangle-forward 、triangle 三角,star五角星
-						shape: 'circle',
-						// 字体大小范围
-						sizeRange: [12, 30],
-						// 文字旋转角度范围
-						rotationRange: [0, 90],
-						// 旋转步值
-						rotationStep: 90,
-						// 自定义图形
-						// maskImage: maskImage,
-						left: 'center',
-						top: '40px',
-						right: null,
-						bottom: null,
-						// 画布宽
-						width: '90%',
-						// 画布高
-						height: '80%',
-						// 是否渲染超出画布的文字
-						drawOutOfBound: false,
-						data: data
-					}]
-				};
-			},
-			initMapChart: function(res) {
-				var mapchart = this.$echarts.init(document.getElementById('mapchart'));
-				var values = [];
-				for (var i = 0; i < res.data.geoCoordMap.length; i++) {
-					values.push([res.data.geoCoordMap[i][0], res.data.geoCoordMap[i][1]], (Math.random() * 1000)
-						.toFixed(0));
-				}
-			
-				var option = {
-					geoCoordMap: res.data.geoCoordMap,
-					title: utils.createChartTitle('产区概览'),
-					amap: {
-						rotateEnable: true,
-						pitchEnable: true,
-						pitch: 45,
-						// rotation: -45,
-						// 3D模式,无论你使用的是1.x版本还是2.x版本,都建议开启此项以获得更好的渲染体验
-						viewMode: '3D',
-						// 高德地图支持的初始化地图配置
-						// 高德地图初始中心经纬度
-						center: [116.436561, 39.897346],
-						// 高德地图初始缩放级别
-						zoom: 9,
-						// 是否开启resize
-						resizeEnable: true,
-						// 自定义地图样式主题
-						mapStyle: 'amap://styles/darkblue',
-						// 移动过程中实时渲染 默认为true 如数据量较大 建议置为false
-						renderOnMoving: true,
-						// ECharts 图层的 zIndex 默认 2000
-						// 从 v1.9.0 起 此配置项已被弃用 请使用 `echartsLayerInteractive` 代替
-						echartsLayerZIndex: 2019,
-						// 设置 ECharts 图层是否可交互 默认为 true
-						// 设置为 false 可实现高德地图自身图层交互
-						// 此配置项从 v1.9.0 起开始支持
-						echartsLayerInteractive: true,
-						// 是否启用大数据模式 默认为 false
-						// 此配置项从 v1.9.0 起开始支持
-						layers: [new AMap.TileLayer.Satellite()],
-						largeMode: false
-						// 说明:如果想要添加卫星、路网等图层
-						// 暂时先不要使用layers配置,因为存在Bug
-						// 建议使用amap.add的方式,使用方式参见最下方代码
-					},
-					series: [{
-						type: 'effectScatter',
-						// 使用百度地图坐标系
-						coordinateSystem: 'amap',
-						//设置图形 'circle', 'rect', 'roundRect', 'triangle', 'diamond', 'pin', 'arrow'
-						// symbol: 'image://http://localhost:3000/src/assets/video.png',
-						symbol: 'pin',
-						// //标记的大小,可以设置成诸如 10 这样单一的数字,也可以用数组分开表示宽和高,例如 [20, 10] 表示标记宽为20,高为10
-						symbolSize: [20, 20],
-						itemStyle: {
-							normal: {
-								color: '#FF5252', //标志颜色
-							}
-						},
-						// 数据格式跟在 geo 坐标系上一样,每一项都是 [经度,纬度,数值大小,其它维度...]
-						data: values,
-						rippleEffect: {
-							scale: 6,
-							brushType: "stroke"
-						},
-						hoverAnimation: true, //是否开启鼠标 hover 的提示动画效果。
-					}]
-				}
-				// 使用刚指定的配置项和数据显示图表。
-				mapchart.setOption(option);
-			
-				// 获取 ECharts 高德地图组件
-				var amapComponent = mapchart.getModel().getComponent('amap');
-				// 获取高德地图实例,使用高德地图自带的控件(需要在高德地图js API script标签手动引入)
-				var amap = amapComponent.getAMap();
-				// 添加控件
-				amap.addControl(new AMap.Scale());
-				amap.addControl(new AMap.ToolBar());
-				amap.addControl(new AMap.ControlBar({
-					position: {
-						left: '10px',
-						top: '10px'
-					},
-					showControlButton: true,  // 是否显示倾斜、旋转按钮。默认为 true
-				}));
-				amap.addControl(new AMap.MapType({
-					defaultType: 1,
-					position: {
-						right: '30px',
-						top: '10px'
-					}
-				}));
-				// 禁用 ECharts 图层交互,从而使高德地图图层可以点击交互
-				amapComponent.setEChartsLayerInteractive(false);
-				
-				var disProvince = new AMap.DistrictLayer.Province({
-					zIndex: 1000,
-					adcode: [110000],
-					depth: 2,
-					styles: {
-						'fill': function(properties) {
-							// properties为可用于做样式映射的字段,包含
-							// NAME_CHN:中文名称
-							// adcode_pro
-							// adcode_cit
-							// adcode
-							// console.log(properties)
-							var adcode = properties.adcode;
-							// var colors = {};
-							// if (!colors[adcode]) {
-							// 	var gb = Math.random() * 155 + 50;
-							// 	colors[adcode] = 'rgb(' + gb + ',' + gb + ',255)';
-							// }
-							// return colors[adcode];
-							var colors = ['#fac858', '#ee6666', '#91cc75', '#38cafb', '#4caff9', '#4adeca',
-								'#2aa7ee', '#0270f2', '#488cf7'
-							];
-							return colors[adcode % colors.length] + 'aa';
-			
-							// return 'red';
-						},
-						'province-stroke': 'cornflowerblue',
-						'city-stroke': 'white', // 中国地级市边界
-						'county-stroke': 'rgba(255,255,255,0.5)' // 中国区县边界
-					}
-				});
-				disProvince.setMap(amap);
-			
-				this.charts['mapchart'] = mapchart;
-				
-				// setTimeout(function(){
-				// 	amap.setZoom(10,false,30000);
-				// 	amap.setPitch(45,false,30000);
-				// },1000);
-			}
-		}
-	}
+
+    this.loadData();
+
+    //开始定时刷新报表数据
+    this.startRefreshChart();
+  },
+  unmounted:function(){
+    if (this.timer) {
+      clearInterval(this.timer);
+    }
+  },
+  methods: {
+    /**
+     * 定时刷新报表数据
+     */
+    startRefreshChart: function() {
+      if (this.timer) {
+        clearInterval(this.timer);
+      }
+      var that = this;
+
+      //获取刷新周期,TODO 配置变动时,此处需自动更新
+      var refreshtime = 60 * 1000;
+      config.getConfig().forEach(function(item, index) {
+        if (item.key == 'refreshtime') {
+          refreshtime = item.value;
+        }
+      });
+
+      this.timer = setInterval(function() {
+        that.size = (Math.random(100) * 1000).toFixed(0);
+        that.count = (Math.random(100) * 1000).toFixed(0);
+        that.category = (Math.random(100) * 1000).toFixed(0);
+        that.cost = (Math.random(100) * 1000).toFixed(0);
+        that.devicecount = (Math.random(100) * 1000).toFixed(0);
+        that.deviceonlinecount = (Math.random(100) * 100).toFixed(0);
+        //------------------------------
+        that.cropoption.series[0].data = [];
+        that.categorys.forEach(function(item, index) {
+          that.cropoption.series[0].data.push({
+            name: item,
+            value: (Math.random(100) * 1000).toFixed(0),
+            textStyle: {
+              color: config.colors[index % config.colors.length]
+            }
+          });
+        })
+      }, refreshtime);
+    },
+    loadData: function() {
+      var that = this;
+      api.loadMapData(function(res) {
+        if (!res || res.status != 200) {
+          utils.showerror("数据加载失败!");
+          return;
+        }
+        that.initMapChart(res);
+      });
+      this.cropoption = this.initcropoption();
+    },
+    initcropoption: function() {
+      var data = [];
+      this.categorys.forEach(function(item, index) {
+        data.push({
+          name: item,
+          value: (Math.random(100) * 1000).toFixed(0),
+          textStyle: {
+            color: config.colors[index % config.colors.length]
+          }
+        });
+      })
+      return {
+        backgroundColor:'#000000',
+        tooltip: {
+          show: true,
+          position: 'top',
+          textStyle: {
+            fontSize: 14
+          }
+        },
+        grid: {
+          top: '40px'
+        },
+        series: [{
+          type: "wordCloud",
+          // 网格大小,各项之间间距
+          gridSize: 20,
+          // 形状 circle 圆,cardioid  心, diamond 菱形,
+          // triangle-forward 、triangle 三角,star五角星
+          shape: 'circle',
+          // 字体大小范围
+          sizeRange: [12, 30],
+          // 文字旋转角度范围
+          rotationRange: [0, 90],
+          // 旋转步值
+          rotationStep: 90,
+          // 自定义图形
+          // maskImage: maskImage,
+          left: 'center',
+          top: '40px',
+          right: null,
+          bottom: null,
+          // 画布宽
+          width: '90%',
+          // 画布高
+          height: '80%',
+          // 是否渲染超出画布的文字
+          drawOutOfBound: false,
+          data: data
+        }]
+      };
+    },
+    initMapChart: function(res) {
+      var mapchart = this.$echarts.init(document.getElementById('mapchart'));
+      var values = [];
+      for (var i = 0; i < res.data.geoCoordMap.length; i++) {
+        values.push([res.data.geoCoordMap[i][0], res.data.geoCoordMap[i][1]], (Math.random() * 1000)
+            .toFixed(0));
+      }
+
+      var option = {
+        geoCoordMap: res.data.geoCoordMap,
+        title: utils.createChartTitle('产区概览'),
+        amap: {
+          rotateEnable: true,
+          pitchEnable: true,
+          pitch: 45,
+          // rotation: -45,
+          // 3D模式,无论你使用的是1.x版本还是2.x版本,都建议开启此项以获得更好的渲染体验
+          viewMode: '3D',
+          // 高德地图支持的初始化地图配置
+          // 高德地图初始中心经纬度
+          center: [115.8540042,28.687547],
+          // 高德地图初始缩放级别
+          zoom: 9,
+          // 是否开启resize
+          resizeEnable: true,
+          // 自定义地图样式主题
+          mapStyle: 'amap://styles/darkblue',
+          // 移动过程中实时渲染 默认为true 如数据量较大 建议置为false
+          renderOnMoving: true,
+          // ECharts 图层的 zIndex 默认 2000
+          // 从 v1.9.0 起 此配置项已被弃用 请使用 `echartsLayerInteractive` 代替
+          echartsLayerZIndex: 2019,
+          // 设置 ECharts 图层是否可交互 默认为 true
+          // 设置为 false 可实现高德地图自身图层交互
+          // 此配置项从 v1.9.0 起开始支持
+          echartsLayerInteractive: true,
+          // 是否启用大数据模式 默认为 false
+          // 此配置项从 v1.9.0 起开始支持
+          layers: [new AMap.TileLayer.Satellite()],
+          largeMode: false
+          // 说明:如果想要添加卫星、路网等图层
+          // 暂时先不要使用layers配置,因为存在Bug
+          // 建议使用amap.add的方式,使用方式参见最下方代码
+        },
+        series: [{
+          type: 'effectScatter',
+          // 使用百度地图坐标系
+          coordinateSystem: 'amap',
+          //设置图形 'circle', 'rect', 'roundRect', 'triangle', 'diamond', 'pin', 'arrow'
+          // symbol: 'image://http://localhost:3000/src/assets/video.png',
+          symbol: 'pin',
+          // //标记的大小,可以设置成诸如 10 这样单一的数字,也可以用数组分开表示宽和高,例如 [20, 10] 表示标记宽为20,高为10
+          symbolSize: [20, 20],
+          itemStyle: {
+            normal: {
+              color: '#FF5252', //标志颜色
+            }
+          },
+          // 数据格式跟在 geo 坐标系上一样,每一项都是 [经度,纬度,数值大小,其它维度...]
+          data: values,
+          rippleEffect: {
+            scale: 6,
+            brushType: "stroke"
+          },
+          hoverAnimation: true, //是否开启鼠标 hover 的提示动画效果。
+        }]
+      }
+      // 使用刚指定的配置项和数据显示图表。
+      mapchart.setOption(option);
+
+      // 获取 ECharts 高德地图组件
+      var amapComponent = mapchart.getModel().getComponent('amap');
+      // 获取高德地图实例,使用高德地图自带的控件(需要在高德地图js API script标签手动引入)
+      var amap = amapComponent.getAMap();
+      // 添加控件
+      amap.addControl(new AMap.Scale());
+      amap.addControl(new AMap.ToolBar());
+      amap.addControl(new AMap.ControlBar({
+        position: {
+          left: '10px',
+          top: '10px'
+        },
+        showControlButton: true,  // 是否显示倾斜、旋转按钮。默认为 true
+      }));
+      amap.addControl(new AMap.MapType({
+        defaultType: 1,
+        position: {
+          right: '30px',
+          top: '10px'
+        }
+      }));
+      // 禁用 ECharts 图层交互,从而使高德地图图层可以点击交互
+      amapComponent.setEChartsLayerInteractive(false);
+
+      var disProvince = new AMap.DistrictLayer.Province({
+        zIndex: 1000,
+        adcode: [360000],
+        depth: 2,
+        styles: {
+          'fill': function(properties) {
+            // properties为可用于做样式映射的字段,包含
+            // NAME_CHN:中文名称
+            // adcode_pro
+            // adcode_cit
+            // adcode
+            // console.log(properties)
+            var adcode = properties.adcode;
+            // var colors = {};
+            // if (!colors[adcode]) {
+            // 	var gb = Math.random() * 155 + 50;
+            // 	colors[adcode] = 'rgb(' + gb + ',' + gb + ',255)';
+            // }
+            // return colors[adcode];
+            var colors = ['#fac858', '#ee6666', '#91cc75', '#38cafb', '#4caff9', '#4adeca',
+              '#2aa7ee', '#0270f2', '#488cf7'
+            ];
+            return colors[adcode % colors.length] + 'aa';
+
+            // return 'red';
+          },
+          'province-stroke': 'cornflowerblue',
+          'city-stroke': 'white', // 中国地级市边界
+          'county-stroke': 'rgba(255,255,255,0.5)' // 中国区县边界
+        }
+      });
+      disProvince.setMap(amap);
+
+      this.charts['mapchart'] = mapchart;
+
+      // setTimeout(function(){
+      // 	amap.setZoom(10,false,30000);
+      // 	amap.setPitch(45,false,30000);
+      // },1000);
+    }
+  }
+}
 </script>
 
 <style scoped="scoped">
-	.chart {
-		padding: 10px;
-		overflow: hidden;
-	}
-	
-	.itemtitle {
-		background: linear-gradient(to right, #40a55f, #000, #000);
-		height: 35px;
-		line-height: 35px;
-		padding-left: 10px;
-	}
-	.vidoeitem{
-		width:50%;display: inline-block;
-		position: relative;
-	}
-	.inner{
-		width:90%;
-	}
+.chart {
+  padding: 10px;
+  overflow: hidden;
+}
+
+.itemtitle {
+  background: linear-gradient(to right, #40a55f, #000, #000);
+  height: 35px;
+  line-height: 35px;
+  padding-left: 10px;
+}
+.vidoeitem{
+  width:50%;display: inline-block;
+  position: relative;
+}
+.inner{
+  width:90%;
+}
 </style>

+ 3 - 3
display_model_for_smartagriculture/src/pages/index.vue

@@ -518,7 +518,7 @@
 					}
 					that.initMapChart(res);
 				});
-				
+
 				this.emvorromntchart = this.initemvorromntchart();
 				this.cropoption = this.initcropoption();
 			},
@@ -542,7 +542,7 @@
 						viewMode: '3D',
 						// 高德地图支持的初始化地图配置
 						// 高德地图初始中心经纬度
-						center: [116.436561, 39.897346],
+						center: [115.8540042,28.687547],
 						// 高德地图初始缩放级别
 						zoom: 9,
 						// 是否开启resize
@@ -609,7 +609,7 @@
 
 				var disProvince = new AMap.DistrictLayer.Province({
 					zIndex: 1000,
-					adcode: [110000],
+					adcode: [360000],
 					depth: 2,
 					styles: {
 						'fill': function(properties) {

+ 642 - 642
display_model_for_smartagriculture/src/pages/market.vue

@@ -1,659 +1,659 @@
 <template>
-	<el-row>
-		<el-col :span="18">
-			<el-row>
-				<el-col :span="12">
-					<!-- 采购需求 -->
-					<div class="chart" :style="{height:((height-80)/2 - 30)+'px'}">
-						<div class="itemtitle" style="">市场采购需求</div>
-						<v-chart ref="xuqiuchart" :style="{height:(((height-80)/2 - 30 - 25)+'px')}" :option="xuqiuchart" />
-					</div>
-				</el-col>
-				<el-col :span="12">
-					<!-- 在售产品 -->
-					<div class="chart" :style="{height:((height-80)/2 - 30)+'px'}">
-						<div class="itemtitle" style="">产品供应排行</div>
-						<v-chart ref="goodschart" :style="{height:(((height-80)/2 - 30 - 25)+'px')}" :option="goodschart" />
-					</div>
-				</el-col>
-			</el-row>
-			<div>
-				<!-- 价格走势 -->
-				<div class="chart" :style="{height:((height-80)/2 - 30)+'px'}">
-					<div class="itemtitle" style="">价格走势</div>
-					<v-chart ref="costchart" :style="{height:(((height-80)/2 - 30 - 25)+'px')}" :option="costchart" />
-				</div>
-			</div>
-		</el-col>
-		<el-col :span="6">
-			<!-- 市场资讯 -->
-			<div class="chart" :style="{height:((height-80 - 20) )+'px'}">
-				<div class="itemtitle" style="">市场资讯</div>
-				<div>
-					<div class="swiper-container" :style="{height:(((height-80) - 20  - 45)+'px')}">
-						<div class="swiper-wrapper" :style="{height:(((height-80) - 20 - 45)+'px')}">
-							<div v-for="(item,index) in news" class="swiper-slide newitem" style="height: 110px;">
-								<div class="innner">
-									<div class="title">{{item.title}}</div>
-									<div class="flex">
-										<div class="flex_item">时间:{{item.date}}</div>
-										<div class="flex_item">来源:{{item.from_}}</div>
-									</div>
-									<div class="desc">
-										{{item.desc}}
-									</div>
-								</div>
-							</div>
-						</div>
-					</div>
-				</div>
-			</div>
-		</el-col>
-	</el-row>
+  <el-row>
+    <el-col :span="18">
+      <el-row>
+        <el-col :span="12">
+          <!-- 采购需求 -->
+          <div class="chart" :style="{height:((height-80)/2 - 30)+'px'}">
+            <div class="itemtitle" style="">市场采购需求</div>
+            <v-chart ref="xuqiuchart" :style="{height:(((height-80)/2 - 30 - 25)+'px')}" :option="xuqiuchart" />
+          </div>
+        </el-col>
+        <el-col :span="12">
+          <!-- 在售产品 -->
+          <div class="chart" :style="{height:((height-80)/2 - 30)+'px'}">
+            <div class="itemtitle" style="">产品供应排行</div>
+            <v-chart ref="goodschart" :style="{height:(((height-80)/2 - 30 - 25)+'px')}" :option="goodschart" />
+          </div>
+        </el-col>
+      </el-row>
+      <div>
+        <!-- 价格走势 -->
+        <div class="chart" :style="{height:((height-80)/2 - 30)+'px'}">
+          <div class="itemtitle" style="">价格走势</div>
+          <v-chart ref="costchart" :style="{height:(((height-80)/2 - 30 - 25)+'px')}" :option="costchart" />
+        </div>
+      </div>
+    </el-col>
+    <el-col :span="6">
+      <!-- 市场资讯 -->
+      <div class="chart" :style="{height:((height-80 - 20) )+'px'}">
+        <div class="itemtitle" style="">市场资讯</div>
+        <div>
+          <div class="swiper-container" :style="{height:(((height-80) - 20  - 45)+'px')}">
+            <div class="swiper-wrapper" :style="{height:(((height-80) - 20 - 45)+'px')}">
+              <div v-for="(item,index) in news" class="swiper-slide newitem" style="height: 110px;">
+                <div class="innner">
+                  <div class="title">{{item.title}}</div>
+                  <div class="flex">
+                    <div class="flex_item">时间:{{item.date}}</div>
+                    <div class="flex_item">来源:{{item.from_}}</div>
+                  </div>
+                  <div class="desc">
+                    {{item.desc}}
+                  </div>
+                </div>
+              </div>
+            </div>
+          </div>
+        </div>
+      </div>
+    </el-col>
+  </el-row>
 </template>
 
 <script>
-	import $ from 'jquery'
-	import config from '/public/config.js'
-	import utils from '/public/utils.js'
-	import api from '/public/api.js'
-	import VChart, {
-		THEME_KEY
-	} from "vue-echarts";
-	import * as echarts from 'echarts';
-	
-	import Swiper from 'swiper';
-	import 'swiper/dist/css/swiper.min.css';
+import $ from 'jquery'
+import config from '/public/config.js'
+import utils from '/public/utils.js'
+import api from '/public/api.js'
+import VChart, {
+  THEME_KEY
+} from "vue-echarts";
+import * as echarts from 'echarts';
 
-	export default {
-		components: {
-			VChart
-		},
-		provide: {
-			[THEME_KEY]: "dark"
-		},
-		data() {
-			return {
-				height: $(window).height(),
-				charts: {},
-				timer: null,
-				xuqiuchart: {},
-				goodschart: {},
-				costchart: {},
-				categorys : ['玉米', '水稻', '小麦', '大豆', '青稞'],
-				news: [{
-					id: 1,
-					title: '江苏东海给农业插上“数字化”翅膀',
-					desc: '5月份,这些葡萄就可以销售了。”走进东海县石梁河镇金朵家庭农场,农场主曹桂林与父亲曹玉早正在种植的60亩温室内依据县农业物联网信息中心专家的“指令”,对葡萄进行抹芽、定梢和花穗',
-					date: '2022-04-09 12:11',
-					from_: '百度一下'
-				}, {
-					id: 1,
-					title: '中国农业智能装备亮相哥伦比亚农科创新博览会',
-					desc: '人民网里约热内卢4月8日电 (记者吴杰)当地时间4月6日至8日,由华南农业大学牵头组织的中国水果采摘机器人、播种及施肥无人机等智能装备亮相哥伦比亚农业科技国际云博览会,展示了中国精准农业、智慧农业、现代农业智能装备等领域的优势,',
-					date: '2022-04-09 12:11',
-					from_: '百度一下'
-				}, {
-					id: 1,
-					title: '安徽出台规划助推农业农村现代化',
-					desc: '安徽出台规划助推农业农村现代化作者:李应松 张守营 来源:中国经济导报 字数:839本报讯 李应松 记者张守营报道 日前',
-					date: '2022-04-09 12:11',
-					from_: '百度一下'
-				}, {
-					id: 1,
-					title: '战疫情、保春耕、促生产,崇明现代农业园区做好春耕备耕',
-					desc: '“东风吹绿草,布谷劝春耕。”春耕农时不等人,当前正处于疫情防控攻坚阶段,也是春耕生产备耕的关键时间节点,崇明现代农业园区以“战疫情、保春耕、促生产”为着力点,抢农时、抓备耕,确保',
-					date: '2022-04-09 12:11',
-					from_: '百度一下'
-				}, {
-					id: 1,
-					title: '江苏东海给农业插上“数字化”翅膀',
-					desc: '5月份,这些葡萄就可以销售了。”走进东海县石梁河镇金朵家庭农场,农场主曹桂林与父亲曹玉早正在种植的60亩温室内依据县农业物联网信息中心专家的“指令”,对葡萄进行抹芽、定梢和花穗',
-					date: '2022-04-09 12:11',
-					from_: '百度一下'
-				}, {
-					id: 1,
-					title: '江苏东海给农业插上“数字化”翅膀',
-					desc: '5月份,这些葡萄就可以销售了。”走进东海县石梁河镇金朵家庭农场,农场主曹桂林与父亲曹玉早正在种植的60亩温室内依据县农业物联网信息中心专家的“指令”,对葡萄进行抹芽、定梢和花穗',
-					date: '2022-04-09 12:11',
-					from_: '百度一下'
-				}],
-				swiper:null
-			}
-		},
-		mounted: function() {
-			var that = this;
-			$(window).resize(function() {
-				this.height = $(window).height() - this.titleheight;
+import Swiper from 'swiper';
+import 'swiper/dist/css/swiper.min.css';
 
-				for (var key in that.charts) {
-					that.charts[key].resize();
-				}
-				that.$refs['xuqiuchart'].resize();
-				that.$refs['goodschart'].resize();
-				that.$refs['costchart'].resize();
-			});
-			
-			this.swiper = new Swiper('.swiper-container', {
-				autoplay: 1000, //可选选项,自动滑动
-				loop: true,
-				direction: 'vertical',
-				slidesPerView: (((this.height - 80) - 35)) / 110,
-			})
+export default {
+  components: {
+    VChart
+  },
+  provide: {
+    [THEME_KEY]: "dark"
+  },
+  data() {
+    return {
+      height: $(window).height(),
+      charts: {},
+      timer: null,
+      xuqiuchart: {},
+      goodschart: {},
+      costchart: {},
+      categorys : ['玉米', '水稻', '小麦', '大豆', '青稞'],
+      news: [{
+        id: 1,
+        title:'中国农业展望报告(2024—2033)',
+        desc: '4月20日至21日,中国农业展望大会在京召开,大会发布了《中国农业展望报告(2024—2033)》(以下简称报告)。报告总结回顾了20种(类)主要农产品的2023年市场形势,对未来十年尤其是2024年、2028年和2033年等重要时间节点的生产、消费、贸易、价格走势进行了展望。报告显示,未来10年粮食等重要农产品综合生产能力将显著增强,农产品消费持续升级,食物消费结构不断优化,农产品贸易保持增长趋势。在大力实施粮油等主要作物大面积单产提升行动下,农产品产量稳步增长,预计2033年粮食产量将达到7.66亿吨,年均增长1.1%。',
+        date: '2024-04-23',
+        from_: '农民日报'
+      }, {
+        id: 1,
+        title: '科技赋能助力实现好“丰”景',
+        desc: '4月28日,中国社会科学院发布了《中国数字经济高质量发展报告(2023)》(以下简称《报告》)。《报告》指出,大数据、云计算、区块链等新兴数字技术与农业、农村和乡村振兴有效融合,正在改变传统资源配置模式,为农业现代化提供新机遇。在数字经济与实体经济融合过程中,我国涌现了以京东、华为、中国联通等为代表的一系列新型实体企业,成为乡村振兴新主体。促进产业链、供应链数字化、智能化转型,以数字经济和数字技术补齐乡村振兴“短板”。',
+        date: '2024-04-30',
+        from_: '央视网'
+      }, {
+        id: 1,
+        title:'2024年农业主导品种主推技术的通知',
+        desc: '各地农业农村部门要抓好主要作物主导品种主推技术推广应用,充分利用基层农业技术推广体系、国家现代农业产业技术体系以及农业科技社会化服务组织等,开展主导品种主推技术示范展示和指导培训,引导带动广大农户和新型农业经营主体应用先进适用技术,促进农业科技成果尽快进村入户到田,不断提高技术入户率到位率,为提升粮油等主要作物生产能力提供有力科技支撑。',
+        date: '2024-04-28',
+        from_: '农业农村部网站'
+      }, {
+        id: 1,
+        title:'两会-有力有效推进乡村全面振兴',
+        desc: '党的十八大以来,以习近平同志为核心的党中央坚持把解决“三农”问题作为全党工作的重中之重。实施乡村振兴战略,是我们党“三农”工作一系列方针政策的继承和发展,是亿万农民的殷切期盼。今年全国两会,乡村全面振兴成为热议的话题。代表委员表示,要锚定建设农业强国目标,有力有效推进乡村全面振兴,以加快农业农村现代化更好推进中国式现代化建设。',
+        date: '2024-03-10',
+        from_: '人民日报'
+      }, {
+        id: 1,
+        title: '2024年中国农业数字化行业政策解读',
+        desc: '“十四五”期间,我国大部分省份都提出了有关农业数字化行业的发展规划。例如辽宁省规划到2025年年底,农村互联网普及率超过80%,农业数字经济在农业增加值中的占比达15%。浙江省提出到2025年,数字“三农”协同应用平台全面建成,生产管理、流通营销、行业监管、公共服务、乡村治理等五大领域核心业务应用全面推广。',
+        date: '2024-03-05',
+        from_: '前瞻网'
+      }, {
+        id: 1,
+        title:'2024中国农业农村发展趋势报告发布',
+        desc: '农业强国是社会主义现代化强国的根基,推进农业农村现代化是实现高质量发展的必然要求。坚持农业农村优先发展,坚持城乡融合发展,把责任扛在肩上、抓在手上,结合实际创造性开展工作,有力有效推进乡村全面振兴,以加快农业农村现代化更好推进中国式现代化建设。',
+        date: '2024-01-19',
+        from_: '中国经济网'
+      }],
+      swiper:null
+    }
+  },
+  mounted: function() {
+    var that = this;
+    $(window).resize(function() {
+      this.height = $(window).height() - this.titleheight;
 
-			this.initcharts();
+      for (var key in that.charts) {
+        that.charts[key].resize();
+      }
+      that.$refs['xuqiuchart'].resize();
+      that.$refs['goodschart'].resize();
+      that.$refs['costchart'].resize();
+    });
 
-			//开始定时刷新报表数据
-			this.startRefreshChart();
-		},
-		unmounted: function() {
-			if (this.timer) {
-				clearInterval(this.timer);
-			}
-		},
-		methods: {
-			/**
-			 * 定时刷新报表数据
-			 */
-			startRefreshChart: function() {
-				if (this.timer) {
-					clearInterval(this.timer);
-				}
-				var that = this;
+    this.swiper = new Swiper('.swiper-container', {
+      autoplay: 1000, //可选选项,自动滑动
+      loop: true,
+      direction: 'vertical',
+      slidesPerView: (((this.height - 80) - 35)) / 110,
+    })
 
-				//获取刷新周期,TODO 配置变动时,此处需自动更新
-				var refreshtime = 60 * 1000;
-				config.getConfig().forEach(function(item, index) {
-					if (item.key == 'refreshtime') {
-						refreshtime = item.value;
-					}
-				});
+    this.initcharts();
 
-				this.timer = setInterval(function() {
-					that.swiper.slideNext();
-					
-					//---------------
-					var values = [(Math.random(100) * 100).toFixed(0), (Math.random(100) * 100).toFixed(0), (Math
-							.random(100) * 100).toFixed(0), (Math.random(100) * 100).toFixed(0), (Math
-							.random(100) * 100).toFixed(0), (Math.random(100) * 100).toFixed(0), (Math
-							.random(100) * 100).toFixed(0)];
-					that.xuqiuchart.series[0].data = values;
-					that.xuqiuchart.series[1].data = values;
-					that.xuqiuchart.series[2].data = values;
-							
-					//---------------
-					var values = [(Math.random(100) * 100).toFixed(0), (Math.random(100) * 100).toFixed(0), (Math
-							.random(100) * 100).toFixed(0), (Math.random(100) * 100).toFixed(0), (Math
-							.random(100) * 100).toFixed(0), (Math.random(100) * 100).toFixed(0), (Math
-							.random(100) * 100).toFixed(0)];
-					that.goodschart.series[0].data = values;
-					that.goodschart.series[1].data = values;
-					that.goodschart.series[2].data = values;
-							
-					//---------------
-					var dates = [];
-					var start = new Date();
-					start.setDate(start.getDate()-30);
-					for(var i=new Date(start.getTime());i.getTime()<new Date().getTime();i.setDate(i.getDate()+1)){
-						dates.push(i.format('MM-dd'));
-					}
-					
-					var series = [];
-					var xData = [];
-					that.categorys.forEach(function (item,index){
-						xData.push(item);
-						series.push({
-							name: item,
-							data: [],
-							type: 'line',
-							stack:'1',
-							// smooth:true,
-							lineStyle: {
-								nomal:{
-									width:1,
-									color: config.colors[index%config.colors.length]
-								}
-							},
-							label: {
-								show: true,
-								formatter: '{c}%',
-								position: 'top',
-								color: 'rgba(255,228,59,1)',
-								fontSize: 12,
-								textAlign: 'center',
-							}
-						});
-						for(var i=new Date(start.getTime());i.getTime()<new Date().getTime();i.setDate(i.getDate()+1)){
-							series[index].data.push((Math.random(100) * 100).toFixed(0));
-						}
-					});		
-					that.costchart.xAxis.data = dates;
-					that.costchart.series = series;
-				}, refreshtime);
-			},
-			initcharts: function() {
-				this.xuqiuchart = this.initxuqiuchart();
-				this.goodschart = this.initgoodschart();
-				this.costchart = this.initcostchart();
-			},
-			initxuqiuchart: function() {
-				var values = [(Math.random(100) * 100).toFixed(0), (Math.random(100) * 100).toFixed(0), (Math
-							.random(100) * 100).toFixed(0), (Math.random(100) * 100).toFixed(0), (Math
-							.random(100) * 100).toFixed(0), (Math.random(100) * 100).toFixed(0), (Math
-							.random(100) * 100).toFixed(0)];
-				return {
-					backgroundColor: '#000000',
-					grid: utils.createChartGaid(null, null, "20px", "20px"),
-					tooltip: {
-						trigger: 'axis',
-						axisPointer: {
-							type: 'shadow',
-						},
-					},
-					xAxis: {
-						axisLine: {
-							show: true,
-							lineStyle: {
-								color: utils.getChartXColor()
-							}
-						},
-						axisLabel: {
-							color: utils.getChartXTextColor()
-						},
-						axisTick: {
-							show: false
-						},
-						splitLine: {
-							show: false
-						},
-						// boundaryGap: false,//
-						data: this.categorys,
-						type: 'category',
-					},
-					yAxis: {
-						axisLabel: {
-							color: utils.getChartYTextColor(),
-						},
-						axisLine: {
-							show: true,
-							lineStyle: {
-								color: utils.getChartXColor()
-							}
-						},
-						splitLine: {
-							lineStyle: {
-								color: utils.getChartYColor(),
-								type: 'dashed'
-							},
-						},
-						name: '',
-					},
-					series: [
-					// 	{
-					// 	name: "含量",
-					// 	data: [(Math.random(100) * 100).toFixed(0), (Math.random(100) * 100).toFixed(0), (Math
-					// 		.random(100) * 100).toFixed(0), (Math.random(100) * 100).toFixed(0), (Math
-					// 		.random(100) * 100).toFixed(0), (Math.random(100) * 100).toFixed(0), (Math
-					// 		.random(100) * 100).toFixed(0)],
-					// 	type: 'bar',
-					// 	barWidth: '20px',
-					// 	label: {
-					// 		show: true,
-					// 		formatter: '{c}%',
-					// 		position: 'top',
-					// 		color: 'rgba(255,228,59,1)',
-					// 		fontSize: 12,
-					// 		textAlign: 'center',
-					// 	},
-					// 	itemStyle: {
-					// 		color: function(pama) {
-					// 			var colors = ['#fac858', '#2aa7ee', '#ee6666', '#91cc75', '#38cafb',
-					// 				'#4caff9', '#4adeca', '#0270f2', '#488cf7'
-					// 			];
-					// 			return new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
-					// 					offset: 0,
-					// 					color: colors[pama.dataIndex % colors.length] + 'ff',
-					// 				},
-					// 				{
-					// 					offset: 1,
-					// 					color: colors[pama.dataIndex % colors.length] + '66',
-					// 				},
-					// 			])
-					// 		},
-					// 		barBorderRadius: 20
-					// 	}
-					// },
-					{
-						name: '光照',
-						type: 'bar',
-						barWidth: '20px',
-						barGap: '60%',
-						itemStyle: {
-							color: '#FF5252aa',
-							borderColor: '#FF5252aa',
-							borderWidth: 1,
-							borderType: 'solid',
-						},
-						label: {
-							show: true,
-							formatter: '{c}' + '%',
-							position: 'top',
-							color: 'rgba(255,228,59,1)',
-							fontSize: 12,
-							textAlign: 'center',
-						},
-						zlevel: 2,
-						data: values,
-					},
-					{
-						name: '光照',
-						type: 'pictorialBar',
-						symbolSize: [20, 10],
-						symbolOffset: [0, -5],
-						symbolPosition: 'end',
-						z: 15,
-						color: '#FF5252',
-						zlevel: 3,
-						data: values,
-					},
-					{
-						name: '光照',
-						type: 'pictorialBar',
-						symbolSize: [20, 10],
-						symbolOffset: [0, 5],
-						symbolPosition: 'start',
-						z: 15,
-						color: '#FF5252',
-						zlevel: 3,
-						data: values,
-					}]
-				};
-			},
-			initgoodschart: function() {
-				var values = [(Math.random(100) * 100).toFixed(0), (Math.random(100) * 100).toFixed(0), (Math
-							.random(100) * 100).toFixed(0), (Math.random(100) * 100).toFixed(0), (Math
-							.random(100) * 100).toFixed(0), (Math.random(100) * 100).toFixed(0), (Math
-							.random(100) * 100).toFixed(0)];
-				return {
-					backgroundColor: '#000000',
-					grid: utils.createChartGaid(null, null, "20px", "20px"),
-					tooltip: {
-						trigger: 'axis',
-						axisPointer: {
-							type: 'shadow',
-						},
-					},
-					xAxis: {
-						axisLine: {
-							show: true,
-							lineStyle: {
-								color: utils.getChartXColor()
-							}
-						},
-						axisLabel: {
-							color: utils.getChartXTextColor()
-						},
-						axisTick: {
-							show: false
-						},
-						splitLine: {
-							show: false
-						},
-						// boundaryGap: false,//
-						data: this.categorys,
-						type: 'category',
-					},
-					yAxis: {
-						axisLabel: {
-							color: utils.getChartYTextColor(),
-						},
-						axisLine: {
-							show: true,
-							lineStyle: {
-								color: utils.getChartXColor()
-							}
-						},
-						splitLine: {
-							lineStyle: {
-								color: utils.getChartYColor(),
-								type: 'dashed'
-							},
-						},
-						name: '',
-					},
-					series: [
-					// 	{
-					// 	name: "含量",
-					// 	data: [(Math.random(100) * 100).toFixed(0), (Math.random(100) * 100).toFixed(0), (Math
-					// 		.random(100) * 100).toFixed(0), (Math.random(100) * 100).toFixed(0), (Math
-					// 		.random(100) * 100).toFixed(0), (Math.random(100) * 100).toFixed(0), (Math
-					// 		.random(100) * 100).toFixed(0)],
-					// 	type: 'bar',
-					// 	barWidth: '20px',
-					// 	label: {
-					// 		show: true,
-					// 		formatter: '{c}%',
-					// 		position: 'top',
-					// 		color: 'rgba(255,228,59,1)',
-					// 		fontSize: 12,
-					// 		textAlign: 'center',
-					// 	},
-					// 	itemStyle: {
-					// 		color: function(pama) {
-					// 			var colors = ['#fac858', '#4adeca', '#0270f2', '#488cf7', '#2aa7ee', '#ee6666', '#91cc75', '#38cafb',
-					// 				'#4caff9'
-					// 			];
-					// 			return new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
-					// 					offset: 0,
-					// 					color: colors[pama.dataIndex % colors.length] + 'ff',
-					// 				},
-					// 				{
-					// 					offset: 1,
-					// 					color: colors[pama.dataIndex % colors.length] + '66',
-					// 				},
-					// 			])
-					// 		},
-					// 		barBorderRadius: 20
-					// 	}
-					// },
-						{
-							name: '光照',
-							type: 'bar',
-							barWidth: '20px',
-							barGap: '60%',
-							itemStyle: {
-								color: '#BAFF7Faa',
-								borderColor: '#BAFF7Faa',
-								borderWidth: 1,
-								borderType: 'solid',
-							},
-							label: {
-								show: true,
-								formatter: '{c}' + '%',
-								position: 'top',
-								color: 'rgba(255,228,59,1)',
-								fontSize: 12,
-								textAlign: 'center',
-							},
-							zlevel: 2,
-							data: values,
-						},
-						{
-							name: '光照',
-							type: 'pictorialBar',
-							symbolSize: [20, 10],
-							symbolOffset: [0, -5],
-							symbolPosition: 'end',
-							z: 15,
-							color: '#BAFF7F',
-							zlevel: 3,
-							data: values,
-						},
-						{
-							name: '光照',
-							type: 'pictorialBar',
-							symbolSize: [20, 10],
-							symbolOffset: [0, 5],
-							symbolPosition: 'start',
-							z: 15,
-							color: '#BAFF7F',
-							zlevel: 3,
-							data: values,
-						}
-					]
-				};
-			},
-			initcostchart: function() {
-				var dates = [];
-				var start = new Date();
-				start.setDate(start.getDate()-30);
-				for(var i=new Date(start.getTime());i.getTime()<new Date().getTime();i.setDate(i.getDate()+1)){
-					dates.push(i.format('MM-dd'));
-				}
-				
-				var series = [];
-				var xData = [];
-				this.categorys.forEach(function (item,index){
-					xData.push(item);
-					series.push({
-						name: item,
-						data: [],
-						type: 'line',
-						stack:'1',
-						// smooth:true,
-						lineStyle: {
-							nomal:{
-								width:1,
-								color: config.colors[index%config.colors.length]
-							}
-						},
-						label: {
-							show: true,
-							formatter: '{c}%',
-							position: 'top',
-							color: 'rgba(255,228,59,1)',
-							fontSize: 12,
-							textAlign: 'center',
-						}
-					});
-					for(var i=new Date(start.getTime());i.getTime()<new Date().getTime();i.setDate(i.getDate()+1)){
-						series[index].data.push((Math.random(100) * 100).toFixed(0));
-					}
-				});
-				return {
-					backgroundColor: '#000000',
-					grid: utils.createChartGaid(null, null, "20px", "40px"),
-					tooltip: {
-						trigger: 'axis',
-						axisPointer: {
-							type: 'shadow',
-						},
-					},
-					legend:{
-						bottom:'0',
-						x:'center',
-						data:xData
-					},
-					xAxis: {
-						axisLine: {
-							show: true,
-							lineStyle: {
-								color: utils.getChartXColor()
-							}
-						},
-						axisLabel: {
-							color: utils.getChartXTextColor()
-						},
-						axisTick: {
-							show: false
-						},
-						splitLine: {
-							show: false
-						},
-						boundaryGap: false,//
-						data: dates,
-						type: 'category',
-					},
-					yAxis: {
-						axisLabel: {
-							color: utils.getChartYTextColor(),
-						},
-						axisLine: {
-							show: true,
-							lineStyle: {
-								color: utils.getChartXColor()
-							}
-						},
-						splitLine: {
-							lineStyle: {
-								color: utils.getChartYColor(),
-								type: 'dashed'
-							},
-						},
-						name: '',
-					},
-					series: series
-				};
-			}
-		}
-	}
+    //开始定时刷新报表数据
+    this.startRefreshChart();
+  },
+  unmounted: function() {
+    if (this.timer) {
+      clearInterval(this.timer);
+    }
+  },
+  methods: {
+    /**
+     * 定时刷新报表数据
+     */
+    startRefreshChart: function() {
+      if (this.timer) {
+        clearInterval(this.timer);
+      }
+      var that = this;
+
+      //获取刷新周期,TODO 配置变动时,此处需自动更新
+      var refreshtime = 60 * 1000;
+      config.getConfig().forEach(function(item, index) {
+        if (item.key == 'refreshtime') {
+          refreshtime = item.value;
+        }
+      });
+
+      this.timer = setInterval(function() {
+        that.swiper.slideNext();
+
+        //---------------
+        var values = [(Math.random(100) * 100).toFixed(0), (Math.random(100) * 100).toFixed(0), (Math
+            .random(100) * 100).toFixed(0), (Math.random(100) * 100).toFixed(0), (Math
+            .random(100) * 100).toFixed(0), (Math.random(100) * 100).toFixed(0), (Math
+            .random(100) * 100).toFixed(0)];
+        that.xuqiuchart.series[0].data = values;
+        that.xuqiuchart.series[1].data = values;
+        that.xuqiuchart.series[2].data = values;
+
+        //---------------
+        var values = [(Math.random(100) * 100).toFixed(0), (Math.random(100) * 100).toFixed(0), (Math
+            .random(100) * 100).toFixed(0), (Math.random(100) * 100).toFixed(0), (Math
+            .random(100) * 100).toFixed(0), (Math.random(100) * 100).toFixed(0), (Math
+            .random(100) * 100).toFixed(0)];
+        that.goodschart.series[0].data = values;
+        that.goodschart.series[1].data = values;
+        that.goodschart.series[2].data = values;
+
+        //---------------
+        var dates = [];
+        var start = new Date();
+        start.setDate(start.getDate()-30);
+        for(var i=new Date(start.getTime());i.getTime()<new Date().getTime();i.setDate(i.getDate()+1)){
+          dates.push(i.format('MM-dd'));
+        }
+
+        var series = [];
+        var xData = [];
+        that.categorys.forEach(function (item,index){
+          xData.push(item);
+          series.push({
+            name: item,
+            data: [],
+            type: 'line',
+            stack:'1',
+            // smooth:true,
+            lineStyle: {
+              nomal:{
+                width:1,
+                color: config.colors[index%config.colors.length]
+              }
+            },
+            label: {
+              show: true,
+              formatter: '{c}%',
+              position: 'top',
+              color: 'rgba(255,228,59,1)',
+              fontSize: 12,
+              textAlign: 'center',
+            }
+          });
+          for(var i=new Date(start.getTime());i.getTime()<new Date().getTime();i.setDate(i.getDate()+1)){
+            series[index].data.push((Math.random(100) * 100).toFixed(0));
+          }
+        });
+        that.costchart.xAxis.data = dates;
+        that.costchart.series = series;
+      }, refreshtime);
+    },
+    initcharts: function() {
+      this.xuqiuchart = this.initxuqiuchart();
+      this.goodschart = this.initgoodschart();
+      this.costchart = this.initcostchart();
+    },
+    initxuqiuchart: function() {
+      var values = [(Math.random(100) * 100).toFixed(0), (Math.random(100) * 100).toFixed(0), (Math
+          .random(100) * 100).toFixed(0), (Math.random(100) * 100).toFixed(0), (Math
+          .random(100) * 100).toFixed(0), (Math.random(100) * 100).toFixed(0), (Math
+          .random(100) * 100).toFixed(0)];
+      return {
+        backgroundColor: '#000000',
+        grid: utils.createChartGaid(null, null, "20px", "20px"),
+        tooltip: {
+          trigger: 'axis',
+          axisPointer: {
+            type: 'shadow',
+          },
+        },
+        xAxis: {
+          axisLine: {
+            show: true,
+            lineStyle: {
+              color: utils.getChartXColor()
+            }
+          },
+          axisLabel: {
+            color: utils.getChartXTextColor()
+          },
+          axisTick: {
+            show: false
+          },
+          splitLine: {
+            show: false
+          },
+          // boundaryGap: false,//
+          data: this.categorys,
+          type: 'category',
+        },
+        yAxis: {
+          axisLabel: {
+            color: utils.getChartYTextColor(),
+          },
+          axisLine: {
+            show: true,
+            lineStyle: {
+              color: utils.getChartXColor()
+            }
+          },
+          splitLine: {
+            lineStyle: {
+              color: utils.getChartYColor(),
+              type: 'dashed'
+            },
+          },
+          name: '',
+        },
+        series: [
+          // 	{
+          // 	name: "含量",
+          // 	data: [(Math.random(100) * 100).toFixed(0), (Math.random(100) * 100).toFixed(0), (Math
+          // 		.random(100) * 100).toFixed(0), (Math.random(100) * 100).toFixed(0), (Math
+          // 		.random(100) * 100).toFixed(0), (Math.random(100) * 100).toFixed(0), (Math
+          // 		.random(100) * 100).toFixed(0)],
+          // 	type: 'bar',
+          // 	barWidth: '20px',
+          // 	label: {
+          // 		show: true,
+          // 		formatter: '{c}%',
+          // 		position: 'top',
+          // 		color: 'rgba(255,228,59,1)',
+          // 		fontSize: 12,
+          // 		textAlign: 'center',
+          // 	},
+          // 	itemStyle: {
+          // 		color: function(pama) {
+          // 			var colors = ['#fac858', '#2aa7ee', '#ee6666', '#91cc75', '#38cafb',
+          // 				'#4caff9', '#4adeca', '#0270f2', '#488cf7'
+          // 			];
+          // 			return new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
+          // 					offset: 0,
+          // 					color: colors[pama.dataIndex % colors.length] + 'ff',
+          // 				},
+          // 				{
+          // 					offset: 1,
+          // 					color: colors[pama.dataIndex % colors.length] + '66',
+          // 				},
+          // 			])
+          // 		},
+          // 		barBorderRadius: 20
+          // 	}
+          // },
+          {
+            name: '光照',
+            type: 'bar',
+            barWidth: '20px',
+            barGap: '60%',
+            itemStyle: {
+              color: '#FF5252aa',
+              borderColor: '#FF5252aa',
+              borderWidth: 1,
+              borderType: 'solid',
+            },
+            label: {
+              show: true,
+              formatter: '{c}' + '%',
+              position: 'top',
+              color: 'rgba(255,228,59,1)',
+              fontSize: 12,
+              textAlign: 'center',
+            },
+            zlevel: 2,
+            data: values,
+          },
+          {
+            name: '光照',
+            type: 'pictorialBar',
+            symbolSize: [20, 10],
+            symbolOffset: [0, -5],
+            symbolPosition: 'end',
+            z: 15,
+            color: '#FF5252',
+            zlevel: 3,
+            data: values,
+          },
+          {
+            name: '光照',
+            type: 'pictorialBar',
+            symbolSize: [20, 10],
+            symbolOffset: [0, 5],
+            symbolPosition: 'start',
+            z: 15,
+            color: '#FF5252',
+            zlevel: 3,
+            data: values,
+          }]
+      };
+    },
+    initgoodschart: function() {
+      var values = [(Math.random(100) * 100).toFixed(0), (Math.random(100) * 100).toFixed(0), (Math
+          .random(100) * 100).toFixed(0), (Math.random(100) * 100).toFixed(0), (Math
+          .random(100) * 100).toFixed(0), (Math.random(100) * 100).toFixed(0), (Math
+          .random(100) * 100).toFixed(0)];
+      return {
+        backgroundColor: '#000000',
+        grid: utils.createChartGaid(null, null, "20px", "20px"),
+        tooltip: {
+          trigger: 'axis',
+          axisPointer: {
+            type: 'shadow',
+          },
+        },
+        xAxis: {
+          axisLine: {
+            show: true,
+            lineStyle: {
+              color: utils.getChartXColor()
+            }
+          },
+          axisLabel: {
+            color: utils.getChartXTextColor()
+          },
+          axisTick: {
+            show: false
+          },
+          splitLine: {
+            show: false
+          },
+          // boundaryGap: false,//
+          data: this.categorys,
+          type: 'category',
+        },
+        yAxis: {
+          axisLabel: {
+            color: utils.getChartYTextColor(),
+          },
+          axisLine: {
+            show: true,
+            lineStyle: {
+              color: utils.getChartXColor()
+            }
+          },
+          splitLine: {
+            lineStyle: {
+              color: utils.getChartYColor(),
+              type: 'dashed'
+            },
+          },
+          name: '',
+        },
+        series: [
+          // 	{
+          // 	name: "含量",
+          // 	data: [(Math.random(100) * 100).toFixed(0), (Math.random(100) * 100).toFixed(0), (Math
+          // 		.random(100) * 100).toFixed(0), (Math.random(100) * 100).toFixed(0), (Math
+          // 		.random(100) * 100).toFixed(0), (Math.random(100) * 100).toFixed(0), (Math
+          // 		.random(100) * 100).toFixed(0)],
+          // 	type: 'bar',
+          // 	barWidth: '20px',
+          // 	label: {
+          // 		show: true,
+          // 		formatter: '{c}%',
+          // 		position: 'top',
+          // 		color: 'rgba(255,228,59,1)',
+          // 		fontSize: 12,
+          // 		textAlign: 'center',
+          // 	},
+          // 	itemStyle: {
+          // 		color: function(pama) {
+          // 			var colors = ['#fac858', '#4adeca', '#0270f2', '#488cf7', '#2aa7ee', '#ee6666', '#91cc75', '#38cafb',
+          // 				'#4caff9'
+          // 			];
+          // 			return new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
+          // 					offset: 0,
+          // 					color: colors[pama.dataIndex % colors.length] + 'ff',
+          // 				},
+          // 				{
+          // 					offset: 1,
+          // 					color: colors[pama.dataIndex % colors.length] + '66',
+          // 				},
+          // 			])
+          // 		},
+          // 		barBorderRadius: 20
+          // 	}
+          // },
+          {
+            name: '光照',
+            type: 'bar',
+            barWidth: '20px',
+            barGap: '60%',
+            itemStyle: {
+              color: '#BAFF7Faa',
+              borderColor: '#BAFF7Faa',
+              borderWidth: 1,
+              borderType: 'solid',
+            },
+            label: {
+              show: true,
+              formatter: '{c}' + '%',
+              position: 'top',
+              color: 'rgba(255,228,59,1)',
+              fontSize: 12,
+              textAlign: 'center',
+            },
+            zlevel: 2,
+            data: values,
+          },
+          {
+            name: '光照',
+            type: 'pictorialBar',
+            symbolSize: [20, 10],
+            symbolOffset: [0, -5],
+            symbolPosition: 'end',
+            z: 15,
+            color: '#BAFF7F',
+            zlevel: 3,
+            data: values,
+          },
+          {
+            name: '光照',
+            type: 'pictorialBar',
+            symbolSize: [20, 10],
+            symbolOffset: [0, 5],
+            symbolPosition: 'start',
+            z: 15,
+            color: '#BAFF7F',
+            zlevel: 3,
+            data: values,
+          }
+        ]
+      };
+    },
+    initcostchart: function() {
+      var dates = [];
+      var start = new Date();
+      start.setDate(start.getDate()-30);
+      for(var i=new Date(start.getTime());i.getTime()<new Date().getTime();i.setDate(i.getDate()+1)){
+        dates.push(i.format('MM-dd'));
+      }
+
+      var series = [];
+      var xData = [];
+      this.categorys.forEach(function (item,index){
+        xData.push(item);
+        series.push({
+          name: item,
+          data: [],
+          type: 'line',
+          stack:'1',
+          // smooth:true,
+          lineStyle: {
+            nomal:{
+              width:1,
+              color: config.colors[index%config.colors.length]
+            }
+          },
+          label: {
+            show: true,
+            formatter: '{c}%',
+            position: 'top',
+            color: 'rgba(255,228,59,1)',
+            fontSize: 12,
+            textAlign: 'center',
+          }
+        });
+        for(var i=new Date(start.getTime());i.getTime()<new Date().getTime();i.setDate(i.getDate()+1)){
+          series[index].data.push((Math.random(100) * 100).toFixed(0));
+        }
+      });
+      return {
+        backgroundColor: '#000000',
+        grid: utils.createChartGaid(null, null, "20px", "40px"),
+        tooltip: {
+          trigger: 'axis',
+          axisPointer: {
+            type: 'shadow',
+          },
+        },
+        legend:{
+          bottom:'0',
+          x:'center',
+          data:xData
+        },
+        xAxis: {
+          axisLine: {
+            show: true,
+            lineStyle: {
+              color: utils.getChartXColor()
+            }
+          },
+          axisLabel: {
+            color: utils.getChartXTextColor()
+          },
+          axisTick: {
+            show: false
+          },
+          splitLine: {
+            show: false
+          },
+          boundaryGap: false,//
+          data: dates,
+          type: 'category',
+        },
+        yAxis: {
+          axisLabel: {
+            color: utils.getChartYTextColor(),
+          },
+          axisLine: {
+            show: true,
+            lineStyle: {
+              color: utils.getChartXColor()
+            }
+          },
+          splitLine: {
+            lineStyle: {
+              color: utils.getChartYColor(),
+              type: 'dashed'
+            },
+          },
+          name: '',
+        },
+        series: series
+      };
+    }
+  }
+}
 </script>
 
 <style scoped="scoped">
-	.chart {
-		padding: 10px;
-		overflow: hidden;
-	}
+.chart {
+  padding: 10px;
+  overflow: hidden;
+}
+
+.itemtitle {
+  background: linear-gradient(to right, #40a55f, #000, #000);
+  height: 35px;
+  line-height: 35px;
+  padding-left: 10px;
+}
+
+.name_border {
+  width: 100%;
+  height: 1px;
+  margin: 5px auto;
+  background: linear-gradient(90deg, rgba(0, 0, 0, 0), #40a55f, #40a55f, #40a55f, #40a55f, rgba(0, 0, 0, 0));
+}
+
+.name_v_border {
+  width: 1px;
+  height: 70px;
+  background: linear-gradient(0deg, rgba(0, 0, 0, 0), #40a55f, #40a55f, rgba(0, 0, 0, 0));
+}
+
+
+.newitem {
+  height: 110px;
+  border-bottom: 1px dotted rgba(255, 255, 255, 0.5);
+  font-size: 14px;
+  line-height: 20px;
+  color: #999;
+  cursor: pointer;
+}
 
-	.itemtitle {
-		background: linear-gradient(to right, #40a55f, #000, #000);
-		height: 35px;
-		line-height: 35px;
-		padding-left: 10px;
-	}
+.newitem .title {
+  font-size: 16px;
+  line-height: 35px;
+  height: 35px;
+  text-align: left;
+  color: #FF5722;
+}
 
-	.name_border {
-		width: 100%;
-		height: 1px;
-		margin: 5px auto;
-		background: linear-gradient(90deg, rgba(0, 0, 0, 0), #40a55f, #40a55f, #40a55f, #40a55f, rgba(0, 0, 0, 0));
-	}
+.newitem .desc {
+  height: 40px;
+  overflow: hidden;
+  text-overflow: ellipsis;
+  display: -webkit-box;
+  -webkit-box-orient: vertical;
+  -webkit-line-clamp: 2;
+  /* // 显示的行 */
+}
 
-	.name_v_border {
-		width: 1px;
-		height: 70px;
-		background: linear-gradient(0deg, rgba(0, 0, 0, 0), #40a55f, #40a55f, rgba(0, 0, 0, 0));
-	}
-	
-	
-	.newitem {
-		height: 110px;
-		border-bottom: 1px dotted rgba(255, 255, 255, 0.5);
-		font-size: 14px;
-		line-height: 20px;
-		color: #999;
-		cursor: pointer;
-	}
-	
-	.newitem .title {
-		font-size: 16px;
-		line-height: 35px;
-		height: 35px;
-		text-align: left;
-		color: #FF5722;
-	}
-	
-	.newitem .desc {
-		height: 40px;
-		overflow: hidden;
-		text-overflow: ellipsis;
-		display: -webkit-box;
-		-webkit-box-orient: vertical;
-		-webkit-line-clamp: 2;
-		/* // 显示的行 */
-	}
-	
-	.newitem:hover {
-		color: #fac858aa;
-	}
+.newitem:hover {
+  color: #fac858aa;
+}
 </style>

+ 94 - 29
display_model_for_smartagriculture/src/pages/welcome.vue

@@ -1,36 +1,101 @@
 <template>
-	<div class="welcome">
-		<div style="width:50%;margin: 0 auto;color:green" :style="{marginTop:marginTop+'px'}">
-			<el-progress :percentage="100" status="exception" :show-text="false" :stroke-width="20" :format="format" :indeterminate="true" color="green" />
-		</div>
-	</div>
+  <div class="welcome">
+    <div class="progress-container">
+      <el-progress
+          class="custom-progress"
+          :percentage="100"
+          status="exception"
+          :show-text="false"
+          :stroke-width="16"
+          :format="format"
+          :indeterminate="true"
+          color="transparent"
+      />
+      <div class="light-particles">
+        <div class="light-particle"></div>
+        <div class="light-particle"></div>
+        <div class="light-particle"></div>
+        <div class="light-particle"></div>
+      </div>
+    </div>
+  </div>
 </template>
 
 <script>
-	import $ from 'jquery'
-	export default {
-		data(){
-			return {
-				marginTop:$(window).height()/2
-			}
-		},
-		mounted:function(){
-			var that = this;
-			setTimeout(function(){
-				that.$emit("loaddingend","")
-			},1000);
-		}
-	}
+import $ from 'jquery'
+import {format} from "echarts";
+
+export default {
+  computed: {
+    format() {
+      return format
+    }
+  },
+  data() {
+    return {
+      marginTop: $(window).height() / 2
+    }
+  },
+  mounted() {
+    var that = this;
+    setTimeout(function () {
+      that.$emit("loaddingend", "")
+    }, 1000);
+  }
+}
 </script>
 
-<style >
-	.welcome{
-		position:fixed;
-		left: 0;
-		top:0;
-		width:100%;
-		height:100%;
-		background: #000000;
-    color:green;
-	}
+<style>
+.welcome {
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  height: 100vh;
+  background-color: #0a0a0a; /* 背景色 */
+}
+
+.progress-container {
+  position: relative; /* 相对定位 */
+  width: 300px;
+  text-align: center;
+  background-color: #212121; /* 容器背景色 */
+  border-radius: 20px; /* 容器圆角 */
+  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1); /* 容器阴影 */
+  padding: 40px; /* 内边距 */
+}
+
+.custom-progress .el-progress-bar__inner {
+  border-radius: 20px; /* 进度条圆角 */
+  background: linear-gradient(to right, #53a9ff, #68e9ff); /* 渐变背景 */
+  box-shadow: 0 0 20px rgba(0, 0, 0, 0.2); /* 进度条阴影 */
+  transition: width 0.5s ease-in-out; /* 添加过渡效果 */
+  position: relative; /* 相对定位 */
+}
+
+.light-particles {
+  position: absolute; /* 绝对定位 */
+  top: -20px; /* 距离进度条顶部一点点 */
+  left: 0;
+  width: 100%;
+  height: calc(100% + 20px); /* 光粒容器高度比进度条高度多一点,使得光粒漂浮在进度条之上 */
+  overflow: hidden;
+}
+
+.light-particle {
+  position: absolute; /* 绝对定位 */
+  width: 5px;
+  height: 5px;
+  background-color: rgba(255, 255, 255, 0.5); /* 光粒颜色 */
+  border-radius: 50%; /* 光粒圆角 */
+  animation: moveParticle 3s infinite; /* 光粒运动动画 */
+}
+
+@keyframes moveParticle {
+  0% {
+    transform: translate(0, 0);
+  }
+  100% {
+    transform: translate(200%, 200%);
+  }
+}
 </style>