liujie преди 5 години
родител
ревизия
c933e1a251
променени са 35 файла, в които са добавени 114 реда и са изтрити 26459 реда
  1. 3 3
      bigdata2/config/index.js
  2. BIN
      bigdata2/dist.zip
  3. 35 130
      bigdata2/src/components/Index.vue
  4. 0 263
      bigdata2/src/components/Login.vue
  5. 0 554
      bigdata2/src/components/home/Home01.vue
  6. 0 549
      bigdata2/src/components/home/Home02.vue
  7. 0 1370
      bigdata2/src/components/home/MapView.vue
  8. 0 431
      bigdata2/src/components/home/chart.js
  9. 8 45
      bigdata2/src/main.js
  10. 0 139
      bigdata2/src/pages/afterSale/AllotPeople.vue
  11. 0 18
      bigdata2/src/pages/afterSale/MRecords.vue
  12. 0 18
      bigdata2/src/pages/afterSale/ProgressInquiry.vue
  13. 0 368
      bigdata2/src/pages/afterSale/SaleAfterdetail.vue
  14. 0 476
      bigdata2/src/pages/afterSale/SaleAppli.vue
  15. 0 268
      bigdata2/src/pages/equipmanger/EquipDistribute.vue
  16. 0 426
      bigdata2/src/pages/equipmanger/EquipList.vue
  17. 0 199
      bigdata2/src/pages/equipmanger/UserList.vue
  18. 0 422
      bigdata2/src/pages/forecasting/tccb/TcDataDetail.vue
  19. 0 283
      bigdata2/src/pages/forecasting/tccb/TcDataPhotos.vue
  20. 0 641
      bigdata2/src/pages/forecasting/tccb/Tccb.vue
  21. 0 714
      bigdata2/src/pages/fourMoodBase/baseManage.vue
  22. 0 1283
      bigdata2/src/pages/fourMoodBase/baseShow.vue
  23. 0 91
      bigdata2/src/pages/hjjc/environmentMonitor/Data24.vue
  24. 0 872
      bigdata2/src/pages/hjjc/environmentMonitor/EnvironmentMonitor.vue
  25. 0 381
      bigdata2/src/pages/hjjc/environmentMonitor/HistoryData.vue
  26. 0 18
      bigdata2/src/pages/systemmanger/AgentDistribute.vue
  27. 0 18
      bigdata2/src/pages/systemmanger/CbdDistinguish.vue
  28. 0 170
      bigdata2/src/pages/systemmanger/DayRecord.vue
  29. 0 314
      bigdata2/src/pages/systemmanger/Role.vue
  30. 0 617
      bigdata2/src/pages/systemmanger/UserGroupManger.vue
  31. 0 952
      bigdata2/src/pages/systemmanger/UserManger.vue
  32. 0 363
      bigdata2/src/pages/systemmanger/Warning.vue
  33. 0 13586
      bigdata2/src/pages/systemmanger/citydata.js
  34. 68 430
      bigdata2/src/router/index.js
  35. 0 47
      bigdata2/src/util/http.js

+ 3 - 3
bigdata2/config/index.js

@@ -11,11 +11,11 @@ module.exports = {
     assetsPublicPath: '/',
     proxyTable: {
       '/api': {
-        target: 'http://192.168.1.8:8001/',
+        target: 'http://192.168.1.8:8000/',
         // target: 'http://192.168.1.120:8001/',
         changeOrigin: true,
         pathRewrite: {
-          '^/api': '/api'   //重写接口
+          '^/api': ''   //重写接口
         }
       },
       '/ChinaSciencesGroup': {
@@ -48,7 +48,7 @@ module.exports = {
       },
     },
     // Various Dev Server settings
-    host: '192.168.1.10', // can be overwritten by process.env.HOST
+    host: '192.168.1.7', // can be overwritten by process.env.HOST
     port: 8000, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
     autoOpenBrowser: false,
     errorOverlay: true,

BIN
bigdata2/dist.zip


+ 35 - 130
bigdata2/src/components/Index.vue

@@ -1,13 +1,16 @@
 <template>
 	<el-container style="height: 100%">
 		<el-header>
-			
 			<div class="navbarBtn">
 				<!-- 用户 -->
 				<div class="userinfo">
-					<img src="@/assets/images/12.jpg" class="userheadImg" alt="">
-					<el-dropdown trigger="click"  @command="dropdownHandle" placement="top">
-						<span class="el-dropdown-link" style="cursor: pointer;color:#fff;">
+					<img src="@/assets/images/12.jpg" class="userheadImg" alt="" />
+					<el-dropdown
+						trigger="click"
+						@command="dropdownHandle"
+						placement="top"
+					>
+						<span class="el-dropdown-link" style="cursor: pointer; color: #fff">
 							{{ username }}
 							<i class="el-icon-arrow-down el-icon--right"></i>
 						</span>
@@ -20,18 +23,21 @@
 				</div>
 				<!-- 标题 -->
 				<div class="caption">
-					<div class="tit">农业植保监测系统  智慧农业信息化</div>
-					<div>Agricultural plant protection monitoring system intelligent agricultural informatization</div>
+					<div class="tit">农业植保监测系统 智慧农业信息化</div>
+					<div>
+						Agricultural plant protection monitoring system intelligent
+						agricultural informatization
+					</div>
 				</div>
 			</div>
 		</el-header>
-
 		<!-- 修改密码对话框 -->
 		<el-dialog
 			title="重置密码"
 			:visible.sync="resetPassDialogVisible"
 			width="500px"
-			@close="resetPassDialogClosed">
+			@close="resetPassDialogClosed"
+		>
 			<el-form
 				ref="resetPassFormRef"
 				:model="resetPassForm"
@@ -60,42 +66,22 @@
 			<!-- 菜单 -->
 			<el-aside width="200px">
 				<el-menu
-					:default-openeds="menuOpeneds"
-					:default-active="$route.path"
+					default-active="xycb"
 					:collapse-transition="false"
 					class="el-menu-vertical-demo"
 					unique-opened
 					:router="isRouter"
+					 text-color="#333"
 					active-text-color="#fff"
 				>
 					<el-menu-item
-						:index="selHome()"
+						:index="item.menu"
 						v-for="item in menuList1"
 						:key="item.pur_id"
 					>
-						<i class="iconfont icon-shouye"></i>
+						<i :class="iconObj[item.pur_id]"></i>
 						<span slot="title">{{ item.purview_name }}</span>
 					</el-menu-item>
-					<el-submenu
-						:index="item.pur_id.toString()"
-						v-for="item in menuList2"
-						:key="item.pur_id"
-					>
-						<template slot="title">
-							<i :class="iconObj[item.pur_id]"></i>
-							<span>{{ item.purview_name }}</span>
-						</template>
-						<el-menu-item
-							:index="menuIndex(subItem.menu)"
-							v-for="subItem in item.children"
-							:key="subItem.pur_id"
-							@click="saveNavState('/index/' + subItem.menu)"
-						>
-							<template slot="title">
-								<span>{{ subItem.purview_name }}</span>
-							</template>
-						</el-menu-item>
-					</el-submenu>
 				</el-menu>
 			</el-aside>
 			<el-container>
@@ -130,9 +116,6 @@ export default {
 			}
 		}
 		return {
-			// refresh: true, //控制整个页面刷新
-			isCollapse: true,
-			widthHover: '0px',
 			isRouter: true,
 			// 被激活导航地址
 			// activePath:this.$store.state.activePath,
@@ -142,36 +125,9 @@ export default {
 				22: 'iconfont icon-shebei',
 				25: 'iconfont icon-jidi',
 				28: 'iconfont icon-xitong',
-				36: 'iconfont icon-cebaoguanli',
-				40: 'iconfont icon-huanjingjiance',
-				42: 'iconfont icon-jiankong',
-				44: 'iconfont icon-fangzhi',
-				46: 'iconfont icon-nongchangguanli',
-				48: 'iconfont icon-nongshiguanli',
-				58: 'iconfont icon-suyuan',
-				124: 'iconfont icon-zhuanjia',
-				129: 'iconfont icon-shouhou'
 			},
-			homeList: [
-				{
-					img: require('@/assets/images/home/1.jpg'),
-					name: '首页一',
-					url: '/index/home'
-				},
-				{
-					img: require('@/assets/images/home/2.jpg'),
-					name: '首页二',
-					url: '/index/mapView'
-				},
-				{
-					img: require('@/assets/images/home/3.jpg'),
-					name: '首页三',
-					url: '/index/home02'
-				}
-			],
+
 			menuList1: [], //首页菜单
-			menuList2: [], //出首页的其他菜单
-			// 被激活导航地址
 			// activePath:'',
 			username: '',
 			userHeadImg: '',
@@ -188,7 +144,6 @@ export default {
 				newPass: [{ validator: validateNewPass, trigger: 'blur' }],
 				checkNewPass: [{ validator: validateCheckPass, trigger: 'blur' }]
 			},
-			menuOpeneds: []
 		}
 	},
 	created: function () {
@@ -212,7 +167,6 @@ export default {
 				newVal == '/index/home02' ||
 				newVal == '/index/mapView'
 			) {
-				this.menuOpeneds = []
 			}
 		}
 	},
@@ -228,61 +182,24 @@ export default {
 		this.getNavList()
 	},
 	methods: {
-		dropdownHandle(command){
-			if(command == 'editPwd'){
+		dropdownHandle(command) {
+			if (command == 'editPwd') {
 				this.changePass()
-			}else if(command == 'outSys'){
+			} else if (command == 'outSys') {
 				this.outSys()
-			}else{
+			} else {
 				this.$router.push({ path: command })
 			}
 		},
 		getNavList() {
 			this.$axios({
-				method: 'POST',
-				url: '/api/api_gateway?method=user.login.user_login_info'
+				method: 'GET',
+				url: '/api/home'
 			}).then((res) => {
-				if (res.data.message == '') {
-					let navList = res.data.data.children
-					navList.forEach((item) => {
-						if (item.children) {
-							this.menuList2.push(item)
-						} else {
-							this.menuList1.push(item)
-						}
-					})
-					let firstPage = '' //左侧菜单第一项
-					if (this.menuList1.length > 0) {
-						firstPage = this.menuList1[0].menu
-					} else {
-						firstPage = this.menuList2[0].children[0].menu
-					}
-					this.$EventBus.$emit('firstPage', firstPage) //第一个页面
-
-					let userType = res.data.data.myuser_type //用户类型
-					let userName = res.data.data.username //用户名
-					localStorage.setItem(
-						'lastEnter',
-						this.formatTime(res.data.data.user_login_time * 1000)
-					)
-					window.sessionStorage.setItem('myuser_type', userType)
-					this.$EventBus.$emit('userName', userName) //事件总线
-				}
+				let navList = res.data
+				this.menuList1 = navList
 			})
 		},
-		changeHome(index) {
-			this.changeHomedialogVisible = false
-			var url = this.homeList[index].url
-			sessionStorage.setItem('selHome', url) //保存选择的首页路由
-			this.$router.push({ path: url })
-		},
-		changeHomeDialogClosed(done) {
-			// this.$confirm('确认关闭?')
-			// .then(_ => {
-			//     done();
-			// })
-			// .catch(_ => {});
-		},
 		dropdownHandle(command) {
 			if (command == 'editPwd') {
 				this.changePass()
@@ -336,10 +253,7 @@ export default {
 				})
 			})
 		},
-		collapseFun() {
-			this.isCollapse = !this.isCollapse
-			return this.isCollapse
-		},
+	
 		menuIndex(menu) {
 			if (menu == 'bFourSituations') {
 				return ''
@@ -389,14 +303,6 @@ export default {
 			})
 			window.open(href, '_blank')
 		},
-		selHome() {
-			let selHome = sessionStorage.getItem('selHome')
-			if (selHome) {
-				return selHome
-			} else {
-				return '/index/home'
-			}
-		},
 		goBD(path) {
 			const { href } = this.$router.resolve({
 				path: path
@@ -443,12 +349,12 @@ export default {
 	height: 189px !important;
 	background: url(../../static/images/headBj.png) no-repeat center;
 	background-size: 100% 100%;
-	.navbarBtn{
+	.navbarBtn {
 		color: #fff;
-		.userinfo{
+		.userinfo {
 			text-align: right;
 			margin-top: 10px;
-			.userheadImg{
+			.userheadImg {
 				width: 35px;
 				height: 35px;
 				border-radius: 50%;
@@ -456,22 +362,21 @@ export default {
 				margin-right: 6px;
 			}
 		}
-		.caption{
+		.caption {
 			margin-top: 7px;
 			text-align: center;
 			font-size: 16px;
-			letter-spacing: .5px;
-			.tit{
+			letter-spacing: 0.5px;
+			.tit {
 				font-size: 20px;
 				line-height: 46px;
 				font-weight: 700;
 				letter-spacing: 7px;
 			}
 		}
-		
 	}
 }
-/deep/.el-dropdown-menu__item{
+/deep/.el-dropdown-menu__item {
 	padding: 0 10px;
 }
 .el-popper.newsDropdown {

+ 0 - 263
bigdata2/src/components/Login.vue

@@ -1,263 +0,0 @@
-<template>
-	<div class="login_container">
-		<div class="login_box">
-			<div class="tit-box">
-				<div class="tit-con">
-					<p class="txt">
-						欢迎来到
-						<span class="arrow">
-							<i class="el-icon-arrow-right"></i>
-						</span>
-					</p>
-					<p class="tit">智慧农业大数据平台</p>
-				</div>
-			</div>
-			<div class="f-box">
-				<ul class="loginItems">
-					<li>
-						<i class="iconfont icon-yonghu1"></i>
-						<input
-							type="text"
-							@keyup="fillPass()"
-							id="username"
-							v-model="username"
-							placeholder="请输入用户名"
-						/>
-					</li>
-					<li>
-						<i class="iconfont icon-mima1"></i>
-						<input
-							type="password"
-							id="password"
-							v-model="pass"
-							placeholder="请输入密码"
-						/>
-					</li>
-					<li>
-						<div class="pass">
-							<input type="checkbox" id="brand" v-model="cState" />
-							<label for="brand">
-								<span>
-									<i class="el-icon-check"></i>
-								</span>
-								记住密码
-							</label>
-							<a>忘记密码?</a>
-						</div>
-					</li>
-					<li>
-						<button class="logon-btn" @click="submit()">登录</button>
-					</li>
-				</ul>
-			</div>
-		</div>
-	</div>
-</template>
-
-<script>
-export default {
-	data() {
-		return {
-			username: '',
-			pass: '',
-			cState: true
-		}
-	},
-	methods: {
-		submit() {
-			if (this.username == '' || this.pass == '') {
-				this.$message.error('请输入用户名和密码!')
-				return
-			}
-			this.$axios({
-				method: 'POST',
-				url: '/api/api_gateway?method=user.login.login_user',
-				data: this.qs.stringify({
-					username: this.username,
-					password: this.pass
-				})
-			}).then((res) => {
-				if (res.data.message == '') {
-					if (this.cState == true) {
-						//是否记住密码
-						localStorage.setItem('username', this.username)
-						localStorage.setItem('password', this.pass)
-					} else {
-						localStorage.removeItem(username, password)
-					}
-					localStorage.setItem('isLogin', true)
-					let selHome = sessionStorage.getItem('selHome')
-					if (selHome) {
-						this.$router.push(selHome) //登录后默认选择首页
-					} else {
-						this.$router.push('/index/home')
-					}
-				} else {
-					this.$message.error(res.data.message)
-				}
-			})
-		},
-		fillPass() {
-			let username = localStorage.getItem('username')
-			if (username == this.username) {
-				this.pass = localStorage.getItem('password')
-			}
-		}
-	}
-}
-</script>
-
-<style lang='less' scoped>
-.login_container {
-	height: 100%;
-	background: url(../../static/images/login/1.gif) no-repeat center;
-	background-size: 100% 100%;
-	.login_box {
-		width: 900px;
-		height: 450px;
-		position: absolute;
-		left: 50%;
-		top: 50%;
-		transform: translate(-50%, -50%);
-		display: flex;
-		.tit-box {
-			position: relative;
-			flex: 1;
-			background: rgba(0, 0, 0, 0.6);
-			color: #fff;
-			letter-spacing: 5px;
-			.tit-con {
-				display: block;
-				padding: 180px 50px;
-				.txt {
-					font-size: 24px;
-					padding-bottom: 15px;
-					border-bottom: 1px solid #fff;
-					position: relative;
-					.arrow {
-						position: absolute;
-						top: 4px;
-						margin-left: 10px;
-						background: #fff;
-						width: 25px;
-						height: 25px;
-						border-radius: 50%;
-						i {
-							color: #000;
-							font-size: 18px;
-							position: absolute;
-							left: 4px;
-							top: 4px;
-						}
-						i:before {
-							font-weight: 800;
-						}
-					}
-				}
-				.tit {
-					font-size: 32px;
-					padding-top: 10px;
-				}
-			}
-		}
-		.f-box {
-			flex: 1;
-			background: #fff;
-			.loginItems {
-				padding: 80px 50px 0 50px;
-				li {
-					width: 100%;
-					margin-bottom: 45px;
-					position: relative;
-					i.iconfont {
-						position: absolute;
-						font-size: 22px;
-						left: 0;
-						top: 5px;
-						color: #b5b5b5;
-					}
-				}
-				input::-webkit-input-placeholder {
-					/* WebKit browsers 适配谷歌 */
-					color: #b5b5b5;
-				}
-				input:-moz-placeholder {
-					/* Mozilla Firefox 4 to 18 适配火狐 */
-					color: #b5b5b5;
-				}
-				input::-moz-placeholder {
-					/* Mozilla Firefox 19+ 适配火狐 */
-					color: #b5b5b5;
-				}
-				input:-ms-input-placeholder {
-					/* Internet Explorer 10+  适配ie*/
-					color: #b5b5b5;
-				}
-				input[type='text'],
-				input[type='password'] {
-					border: none;
-					padding: 10px 20px 10px 30px;
-					box-sizing: border-box;
-					border-bottom: 1px solid #b5b5b5;
-					width: 100%;
-					font-size: 15px;
-					outline: none;
-					box-shadow: 0 0 0px 1000px white inset !important;
-					-webkit-box-shadow: 0 0 0px 1000px white inset !important;
-				}
-				input[type='checkbox'] {
-					display: none;
-				}
-				input[type='checkbox'] + label span {
-					display: inline-block;
-					width: 16px;
-					height: 16px;
-					border-radius: 3px;
-					border: 1px solid #b5b5b5;
-					float: left;
-					margin-right: 10px;
-					i {
-						display: none;
-					}
-				}
-				input[type='checkbox']:checked + label span {
-					background: #2f3945;
-					i {
-						display: block;
-						font-size: 15px;
-						color: #fff;
-					}
-					i:before {
-						font-weight: 800;
-					}
-				}
-				.pass {
-					display: flex;
-					justify-content: space-between;
-					font-size: 14px;
-					label {
-						color: #b5b5b5;
-					}
-					a {
-						color: red;
-					}
-				}
-				button {
-					width: 100%;
-					border: none;
-					background: #3d4c5a;
-					border-radius: 30px;
-					color: #fff;
-					line-height: 40px;
-					height: 40px;
-					cursor: pointer;
-					outline: none;
-				}
-				button:hover {
-					background: #4b647b;
-				}
-			}
-		}
-	}
-}
-</style>

+ 0 - 554
bigdata2/src/components/home/Home01.vue

@@ -1,554 +0,0 @@
-<template>
-	<div>
-		<el-breadcrumb separator-class="el-icon-arrow-right">
-			<el-breadcrumb-item>首页</el-breadcrumb-item>
-		</el-breadcrumb>
-		<div class="row row01">
-			<el-card class="box-card row01-left">
-				<div class="info">
-					<span class="cbg" :style="{backgroundImage:'url('+cbg+')'}"></span>
-					<div class="info-top">
-						<p class="p1">{{userinfo.name}},欢迎登陆本系统!</p>
-						<p class="p2">上次登陆时间 : {{userinfo.lastEnter}}</p>
-					</div>
-					<div class="info-bottom">
-						<div class="bot-left">
-							<div class="tem">
-								<span>{{userinfo.at}}</span>℃
-							</div>
-							<div class="wea">
-								<p>{{userinfo.type}}</p>
-								<p>{{userinfo.city}}</p>
-							</div>
-						</div>
-						<div class="bot-right">
-							<p>{{userinfo.week}}</p>
-							<p>{{userinfo.time}}</p>
-						</div>
-					</div>
-				</div>
-				<div class="notice">
-					<div class="tit">
-						<i :style="{backgroundImage:'url('+titBg01+')'}"></i>通知公告
-					</div>
-					<ul>
-						<li>
-							<div>春季气候偏暖 病虫害发生气象风险高</div>
-							<span>2020-05-06</span>
-						</li>
-						<li>
-							<div>我国科学家找到攻克小麦赤霉病“金钥匙”</div>
-							<span>2020-05-06</span>
-						</li>
-						<li>
-							<div>山东农大攻克小麦赤霉病 取得关键突破</div>
-							<span>2020-05-06</span>
-						</li>
-						<li>
-							<div>今年江南梅雨季启幕偏早 防范农业不利影响</div>
-							<span>2020-05-06</span>
-						</li>
-						<li>
-							<div>东部小麦产区本周需抢晴打药防治赤霉病</div>
-							<span>2020-05-06</span>
-						</li>
-					</ul>
-				</div>
-			</el-card>
-			<el-card class="box-card row01-right">
-				<div class="tit">
-					<i :style="{backgroundImage:'url('+titBg02+')'}"></i>空气温湿度
-					<el-cascader
-						v-model="equip_id"
-						:options="cascaderEquip"
-						size="mini"
-						:props="{ expandTrigger: 'hover' ,label:'type_name',value:'id'}"
-						@change="handleChange"
-					></el-cascader>
-				</div>
-
-				<div id="chart01" ref="chart01Ref"></div>
-			</el-card>
-		</div>
-		<div class="row row02">
-			<el-card class="box-card row02-left">
-				<div class="tit">
-					<i :style="{backgroundImage:'url('+titBg03+')'}"></i>设备统计
-				</div>
-				<div class="con">
-					<div class="box" v-for="item in equipList " :key="item.device_id">
-						<div class="box-inner">
-							<span
-								:class="{'state':true,'on':item.device_status==1,'off':item.device_status==0}"
-							>{{item.device_status==1?'在线':'离线'}}</span>
-							<p class="eq-id">{{item.device_id}}</p>
-							<div class="infos">
-								<p>
-									<i class="iconfont icon-biaoqian"></i>
-									设备类型:{{item.device_type_id+'' | equipType}}
-								</p>
-								<p>
-									<i class="iconfont icon-biaoqian"></i>
-									设备名称:{{item.device_name}}
-								</p>
-								<p>
-									<i class="iconfont icon-biaoqian"></i>
-									位置:河南省郑州市金水区
-								</p>
-							</div>
-							<div class="date">
-								<span>{{item.uptime*1000 | formatTime}}</span>
-								<a href="#" @click="dataDetails(item.device_id,item.d_id,item.device_type_id,item.device_model)">详情 ></a>
-							</div>
-						</div>
-					</div>
-				</div>
-			</el-card>
-			<el-card class="box-card row02-right">
-				<div class="tit">
-					<i :style="{backgroundImage:'url('+titBg04+')'}"></i>设备占比
-				</div>
-				<div id="chart02" ref="chart02Ref"></div>
-			</el-card>
-		</div>
-	</div>
-</template>
-<script>
-import echarts from 'echarts'
-import { home1Line, home1Pie } from './chart.js'
-export default {
-	data() {
-		return {
-			titBg01: require('@/assets/images/home/home01/tit01.png'),
-			titBg02: require('@/assets/images/home/home01/tit02.png'),
-			titBg03: require('@/assets/images/home/home01/tit03.png'),
-			titBg04: require('@/assets/images/home/home01/tit04.png'),
-			cbg: require('@/assets/images/home/home01/cbg.png'),
-			myChart01: '',
-			myChart02: null,
-			userName: '',
-			equipList: [],
-			equip_id: '',
-			userinfo:{
-				name:'',
-				lastEnter:'',
-				at:'',
-				city:'',
-				type:'',
-				week:'',
-				time:'',
-			},
-			cascaderEquip: [
-				// {
-				// 	value: 'zujian',
-				// 	label: '组件',
-				// 	children: [
-				// 		{
-				// 			value: 'basic',
-				// 			label: 'Basic'
-				// 		},
-				// 		{
-				// 			value: 'form',
-				// 			label: 'Form'
-				// 		},
-				// 		{
-				// 			value: 'data',
-				// 			label: 'Data'
-				// 		},
-				// 		{
-				// 			value: 'notice',
-				// 			label: 'Notice'
-				// 		},
-				// 		{
-				// 			value: 'navigation',
-				// 			label: 'Navigation'
-				// 		},
-				// 		{
-				// 			value: 'others',
-				// 			label: 'Others'
-				// 		}
-				// 	]
-				// },
-				// {
-				// 	value: 'ziyuan',
-				// 	label: '资源',
-				// 	children: [
-				// 		{
-				// 			value: 'axure',
-				// 			label: 'Axure Components'
-				// 		},
-				// 		{
-				// 			value: 'sketch',
-				// 			label: 'Sketch Templates'
-				// 		},
-				// 		{
-				// 			value: 'jiaohu',
-				// 			label: '组件交互文档'
-				// 		}
-				// 	]
-				// }
-			]
-		}
-	},
-	mounted() {
-		this.userinfo.lastEnter =  localStorage.getItem('lastEnter');
-		this.userinfo.name =  localStorage.getItem('username');
-		this.getcity();
-		this.chartsInit()
-		this.getPieData()
-		this.getEquipList()
-		this.getCascaderEquip()
-	},
-	destroyed() {
-		window.onresize = null
-	},
-	methods: {
-		chartsInit() {
-			// 折线图初始化
-			this.myChart01 = echarts.init(this.$refs.chart01Ref)
-			//饼状图初始化
-			this.myChart02 = echarts.init(this.$refs.chart02Ref)
-
-			window.addEventListener('resize', () => {
-				this.myChart01.resize()
-				this.myChart02.resize()
-			})
-		},
-		getEquipList() {
-			this.$EventBus.$on('userName', (data) => {
-				this.userName = data
-			})
-			this.$axios({
-				method: 'POST',
-				url: '/api/api_gateway?method=home.homes.equip_list',
-				data: this.qs.stringify({
-					'user ': this.userName
-				})
-			}).then((res) => {
-				this.equipList = res.data.data
-				// this.equip_id = this.equipList[0].device_id
-				// this.getLineOption()
-			})
-		},
-		getPieData() {
-			this.$axios({
-				method: 'POST',
-				url: '/api/api_gateway?method=home.homes.equip_total'
-			}).then((res) => {
-				let data = res.data.data
-				if (data) {
-					var scd = data.scd_num || 0;
-					var qxz = data.qxz_num || 0;
-					var cbd = data.cbd_num || 0;
-					var bzy = data.bzy_num || 0;
-					let pieOption = home1Pie(
-						bzy,
-						cbd,
-						qxz,
-						scd
-					)
-					this.myChart02.setOption(pieOption)
-				}
-			})
-		},
-		getCascaderEquip() {
-			this.$axios({
-				method: 'POST',
-				url: '/api/api_gateway?method=home.homes.equip_broken_line'
-			}).then((res) => {
-				if (res.data.message=='') {
-					this.cascaderEquip = res.data.data.data
-					this.equip_id = this.cascaderEquip[0].children.length&&this.cascaderEquip[0].children[0].id
-					this.getLineOption()
-				}
-			})
-		},
-		getLineOption() {
-			this.$axios({
-				method: 'POST',
-				url: '/api/api_gateway?method=home.homes.equip_tp_line',
-				data: this.qs.stringify({
-					equip_id: this.equip_id
-				})
-			}).then((res) => {
-				let data = res.data.data
-				let option = {
-					time: [],
-					ah: [],
-					at: []
-				}
-				data.forEach((item) => {
-					option.time.push(this.formatTime(item.addtime))
-					option.ah.push(item.ah)
-					option.at.push(item.at)
-				})
-				this.myChart01.setOption(home1Line(option))
-			})
-		},
-		handleChange() {
-			this.equip_id = this.equip_id[1]
-			this.getLineOption()
-		},
-		// 数据详情
-		dataDetails(e_id, d_id,type,device_model) {
-			if(type == 2){  //杀虫灯
-				this.$router.push(`/index/scdDetail/${e_id}/${d_id}`)
-			}else if(type == 3){  //测报
-				this.$router.push(`/index/cbdDataDetails/${e_id}/${d_id}`)
-			}else if(type == 4){  //性诱
-				this.$router.push({path:`/index/xycbDataDetail/${e_id}/${d_id}`,query:{device_model:device_model}})
-			}else if(type == 5){  //气象站
-				this.$router.push(`/index/historyData/${e_id}`)
-			}else if(type == 6){  //监控
-				this.$router.push({path:`/index/monitor`,query:{id:`${e_id}`,jktype:0}})
-			}else if(type == 7){  //孢子
-				this.$router.push(`/index/dataDetail/${e_id}/${d_id}`)
-			}else if(type == 9){  //糖醋
-				this.$router.push(`/index/tcDataDetail/${e_id}/${d_id}`)
-			}
-		},
-		getcity(){
-			this.$axios({
-				method: 'GET',
-				url: '/v4',
-			}).then((res) => {
-				var txt = res.data.substring(18,res.data.length-1);
-				var city = eval('('+txt+')');
-				this.userinfo.city = city.cname;
-				var area = city.cname.split('省')[1];
-				this.getWeather(area);
-			})
-		},
-		getWeather(area){
-			this.$axios({
-				method: 'GET',
-				url: '/v5',
-				params:{
-					city:area
-				}
-			}).then((res) => {
-				console.log(res)
-				var data = res.data.data
-				this.userinfo.at = data.forecast[0].high.substring(2);
-				this.userinfo.type = data.forecast[0].type;
-				this.userinfo.week = data.forecast[0].date.substring(data.forecast[0].date.length-3);
-				var myDate = new Date;
-				var year = myDate.getFullYear(); //获取当前年
-				var mon = myDate.getMonth() + 1; //获取当前月
-				var date = myDate.getDate(); //获取当前日
-				this.userinfo.time = year+'年'+mon+'月'+date+'日';
-			})
-		}
-	}
-}
-</script>
-<style lang="less" scoped>
-.row {
-	display: flex;
-	.tit {
-		font-size: 18px;
-		font-weight: 800;
-		margin-bottom: 10px;
-		display: flex;
-		align-items: center;
-		i {
-			display: inline-block;
-			width: 16px;
-			height: 20px;
-			margin-right: 10px;
-			background-size: 100%;
-			background-position: center;
-			background-repeat: no-repeat;
-		}
-	}
-}
-.row01-right,
-.row02-left {
-	flex: 3;
-	margin: 5px;
-}
-.row01-left,
-.row02-right {
-	flex: 1.2;
-	margin: 5px;
-
-}
-.row01-left {
-	.info {
-		.cbg {
-			width: 80px;
-			height: 60px;
-			position: absolute;
-			background-size: 100% 100%;
-			right: 10px;
-			top: 10px;
-		}
-		position: relative;
-		width: 100%;
-		background-color: #34d496;
-		background-image: linear-gradient(#2ed399, #a5de39);
-		border-radius: 6px;
-		padding: 20px 20px;
-		box-sizing: border-box;
-		color: #fff;
-		margin-bottom: 20px;
-		.info-top {
-			.p1 {
-				font-size: 18px;
-			}
-			.p2 {
-				font-size: 14px;
-				line-height: 28px;
-			}
-			margin-bottom: 50px;
-		}
-		.info-bottom {
-			display: flex;
-			justify-content: space-between;
-			.bot-left {
-				display: flex;
-				.tem {
-					font-size: 18px;
-					span {
-						font-size: 40px;
-						margin-right: 5px;
-					}
-					margin-right: 15px;
-				}
-				.wea {
-					font-size: 14px;
-				}
-			}
-			.bot-right {
-				font-size: 14px;
-				text-align: right;
-			}
-		}
-	}
-	.notice {
-		li {
-			display: flex;
-			justify-content: space-between;
-			line-height: 28px;
-			div {
-				font-size: 14px;
-				width: 70%;
-				overflow: hidden;
-				text-overflow: ellipsis;
-				white-space: nowrap;
-			}
-			span {
-				color: #888;
-				flex: 1;
-				text-align: right;
-			}
-		}
-	}
-}
-.row01-right {
-	position: relative;
-	#chart01 {
-		width: 100%;
-		height: 350px;
-	}
-	.el-cascader {
-		margin-left: 20px;
-		width: 220px;
-	}
-}
-.row02-left {
-	.con {
-		// background:#f4f4f4;
-		min-height: 320px;
-		display: flex;
-		flex-wrap: wrap;
-		.box {
-			width: 25%;
-			padding: 5px;
-			box-sizing: border-box;
-			.box-inner {
-				box-shadow: 0 0 5px 3px rgba(0, 0, 0, 0.08);
-				background: #fff;
-				border-radius: 4px;
-				padding: 10px;
-				position: relative;
-				.eq-id {
-					font-size: 16px;
-					color: #11ce94;
-					font-weight: 600;
-					margin-bottom: 10px;
-				}
-				.infos {
-					color: #777;
-					line-height: 26px;
-					font-size: 13px;
-					i {
-						color: #ccc;
-						margin-right: 15px;
-					}
-				}
-				.date {
-					margin-top: 10px;
-					span {
-						font-size: 12px;
-						color: #999;
-					}
-					a {
-						font-size: 12px;
-						color: #999;
-						float: right;
-					}
-					a:hover {
-						color: #11ce94;
-					}
-				}
-				.state {
-					position: absolute;
-					display: inline-block;
-					right: 0;
-					top: 0;
-					color: #fff;
-					width: 46px;
-					height: 26px;
-					line-height: 26px;
-					text-align: center;
-					font-size: 12px;
-					border-top-right-radius: 4px;
-					&:before {
-						content: '';
-						position: absolute;
-						right: 26px;
-						width: 0;
-						height: 0;
-						border-width: 26px 20px;
-						border-style: solid;
-						border-radius: 4px;
-					}
-				}
-				.on {
-					background: #0ed094;
-					&:before {
-						border-color: #0ed094 transparent transparent transparent;
-					}
-				}
-				.off {
-					background: #fc595a;
-					&:before {
-						border-color: #fc595a transparent transparent transparent;
-					}
-				}
-			}
-		}
-	}
-}
-.row02-right {
-	position: relative;
-	min-height:360px;
-	#chart02 {
-		position: absolute;
-		top: 70px;
-		bottom: 10px;
-		width: 100%;
-	}
-}
-</style>

+ 0 - 549
bigdata2/src/components/home/Home02.vue

@@ -1,549 +0,0 @@
-<template>
-  <div class="wrap">
-    <el-breadcrumb separator-class="el-icon-arrow-right">
-      <el-breadcrumb-item>首页</el-breadcrumb-item>
-    </el-breadcrumb>
-    <div class="wrap01">
-      <div class="wrapL">
-        <div class="wrapLT">
-          <el-card class="box-card left">
-            <div class="info">
-              <span class="cbg" :style="{backgroundImage:'url('+cbg+')'}"></span>
-              <div class="info-top">
-                <p class="p1">admin,欢迎登陆本系统!</p>
-                <p class="p2">上次登陆时间 : 2020年5月20日 13:00:00</p>
-              </div>
-              <div class="info-bottom">
-                <div class="bot-left">
-                  <div class="tem">
-                    <span>28</span>℃
-                  </div>
-                  <div class="wea">
-                    <p>小雨转阴</p>
-                    <p>河南省 郑州市</p>
-                  </div>
-                </div>
-                <div class="bot-right">
-                  <p>星期日</p>
-                  <p>2020/06/04</p>
-                </div>
-              </div>
-              <i class="botBg" :style="{backgroundImage:'url('+botBg+')'}"></i>
-            </div>
-          </el-card>
-          <el-card class="box-card right">
-            <div class="tit">实时监控</div>
-            <div class="con">
-              <div class="item" v-for="(item,index) in realTimeData" :key="index">
-                <div class="eName">
-                  <span>
-                    <i
-                      :class="{dot:true,dot01:item.type==1,dot02:item.type==2,dot03:item.type==3,}"
-                    ></i>太阳能测报灯
-                  </span>
-                  <span>ID:{{item.id}}</span>
-                  <a href="#" :style="{backgroundImage:'url('+more+')'}"></a>
-                </div>
-                <ul class="state">
-                  <li v-for="(s,i) in item.status" :key="i">
-                    <span>
-                      <i class="iconfont icon-thermometer_icon"></i>
-                      {{i}}
-                    </span> :
-                    <span>{{s}}</span>
-                  </li>
-                </ul>
-              </div>
-            </div>
-          </el-card>
-        </div>
-        <div class="mapCon">
-          <el-card class="box-card card01">
-            <baidu-map
-              class="bm-view"
-              :center="center"
-              @ready="handler"
-              :scroll-wheel-zoom="true"
-              :zoom="zoom"
-            >
-              <bm-navigation anchor="BMAP_AN  CHOR_TOP_LEFT"></bm-navigation>
-              <div v-for="(equipItem,index) in equips" :key="index">
-                <bm-marker
-                  :position="{lng:equipItem.lng,lat:equipItem.lat}"
-                  :icon="{url:icons[equipItem.type], size: {width: 33, height: 40}}"
-                  @click="equipMarkerClick(equipItem)"
-                ></bm-marker>
-              </div>
-              <!-- 设备窗体信息 -->
-              <bm-info-window :position="currEquip.position" autoPan :show="equipShow">
-                <div class="equipInfoWindowTitle">{{currEquip.name}}</div>
-                <div class="equipInfoWindow">
-                  <span>设备ID:</span>12345678789879567
-                </div>
-                <div class="equipInfoWindow">
-                  <span>设备名称:</span>无
-                </div>
-                <div class="equipInfoWindow">
-                  <span>设备位置:</span>南河南,郑州,金水区
-                </div>
-                <div class="equipInfoWindow">
-                  <span>上报时间:</span>2020-12-23 12:00:00
-                </div>
-              </bm-info-window>
-            </baidu-map>
-          </el-card>
-          <div class="legend">
-            <el-card class="box-card card02">
-              <ul>
-                <li v-for="(item,key) in icons" :key="key">
-                  <span>
-                    <img :src="item" />
-                  </span>
-                  <span>{{key | equipType}}</span>
-                </li>
-              </ul>
-            </el-card>
-          </div>
-        </div>
-      </div>
-      <div class="wrapR">
-        <el-card class="box-card top">
-          <div class="tit">设备占比</div>
-          <div id="chart" ref="chartRef"></div>
-        </el-card>
-        <el-card class="box-card bot">
-          <div class="tit">农业资讯</div>
-          <ul>
-            <li v-for="(item,index) in newsList" :key="index">
-              <img :src="item.img" alt />
-              <div class="info">
-                <p>{{item.tit}}</p>
-                <div>
-                  <span>{{item.date}}</span>
-                  <a href="#">详情>></a>
-                </div>
-              </div>
-            </li>
-          </ul>
-        </el-card>
-      </div>
-    </div>
-  </div>
-</template>
-
-<script>
-import echarts from 'echarts';
-import { option03 } from './chart.js';
-export default {
-  data() {
-    return {
-      cbg: require('@/assets/images/home/home02/cbg.png'),
-      botBg: require('@/assets/images/home/home02/botBg.png'),
-      more: require('@/assets/images/home/home02/more.png'),
-      center: { lng: 0, lat: 0 },
-      zoom: 3,
-      currEquip: {
-        name: '',
-        position: {}
-      },
-      equipShow: false,
-      realTimeData: [
-        {
-          type: 1,
-          id: 45646541654,
-          status: {
-            '环境温度(℃)': 25,
-            '环境湿度(%)': 20,
-            雨控状态: '正常',
-            温控状态: '正常'
-          }
-        },
-        {
-          type: 2,
-          id: 45646541654,
-          status: {
-            '环境温度(℃)': 25,
-            '环境湿度(%)': 20,
-            电击次数: 24,
-            '定时(h)': 4
-          }
-        },
-        {
-          type: 3,
-          id: 45646541654,
-          status: {
-            '环境温度(℃)': 25,
-            '环境湿度(%)': 20,
-            电压: 20.425,
-            摄像头状态: '正常'
-          }
-        }
-      ],
-      icons: {
-        '2': require('@/assets/images/home/home02/scd.png'),
-        '3': require('@/assets/images/home/home02/cbd.png'),
-        '4': require('@/assets/images/home/home02/xyq.png'),
-        '5': require('@/assets/images/home/home02/qxz.png'),
-        '6': require('@/assets/images/home/home02/jk.png'),
-        '7': require('@/assets/images/home/home02/bzy.png')
-      },
-      equips: [
-        {
-          equipName: '杀虫灯',
-          lat: '39.815',
-          lng: '116.404',
-          type: 2
-        },
-        {
-          equipName: '测报灯',
-          lat: '39.215',
-          lng: '116.504',
-          type: 3
-        },
-        {
-          equipName: '性诱设备',
-          lat: '39.215',
-          lng: '116.504',
-          type: 4
-        },
-        {
-          equipName: '环境监测',
-          lat: '38.215',
-          lng: '116.504',
-          type: 5
-        },
-        {
-          equipName: '监控',
-          lat: '39.115',
-          lng: '113.104',
-          type: 6
-        },
-        {
-          equipName: '孢子仪',
-          lat: '39.115',
-          lng: '111.104',
-          type: 7
-        },
-        {
-          equipName: '气象',
-          lat: '38.214',
-          lng: '116.501',
-          type: 5
-        },
-        {
-          equipName: '监控',
-          lat: '39.194',
-          lng: '113.981',
-          type: 6
-        },
-        {
-          equipName: '孢子仪',
-          lat: '39.581',
-          lng: '111.28',
-          type: 7
-        }
-      ],
-      newsList: [
-        {
-          img: require('@/assets/images/home/home02/1.jpg'),
-          tit: '三部门联合发布农村厕所粪污无害化处',
-          date: '2020-05-10'
-        },
-        {
-          img: require('@/assets/images/home/home02/1.jpg'),
-          tit: '三部门联合发布农村厕所粪污无害化处',
-          date: '2020-05-10'
-        },
-        {
-          img: require('@/assets/images/home/home02/1.jpg'),
-          tit: '三部门联合发布农村厕所粪污无害化处',
-          date: '2020-05-10'
-        }
-      ]
-    };
-  },
-  mounted() {
-    this.chartsInit();
-  },
-  destroyed() {
-    window.onresize = null;
-  },
-  methods: {
-    chartsInit() {
-      let myChart = echarts.init(this.$refs.chartRef);
-      myChart.setOption(option03);
-      window.addEventListener('resize', function() {
-        myChart.resize();
-      });
-    },
-    handler({ BMap, map }) {
-      this.BMap = BMap;
-      this.map = map;
-      var view = map.getViewport(eval(this.equips));
-      this.zoom = view.zoom;
-      this.center = view.center;
-    },
-    equipMarkerClick(item) {
-      this.equipShow = true;
-      this.currEquip.name = item.equipName;
-      this.currEquip.position = { lng: item.lng, lat: item.lat };
-    }
-  }
-};
-</script>
-<style lang='less' scoped>
-.wrap {
-  height: 100%;
-  .wrap01 {
-    display: flex;
-    height: calc(100% - 70px);
-    .tit {
-      font-size: 20px;
-      font-weight: 800;
-      padding-left: 20px;
-      border-left: 5px solid #17bb89;
-      margin-left: -20px;
-      margin-bottom: 15px;
-    }
-    .wrapL {
-      flex: 3;
-      .wrapLT {
-        display: flex;
-        .left {
-          flex: 1.8;
-          /deep/.el-card__body {
-            padding: 0;
-          }
-          .info {
-            .cbg {
-              width: 80px;
-              height: 60px;
-              position: absolute;
-              background-size: 100% 100%;
-              right: 10px;
-              top: 10px;
-            }
-            position: relative;
-            width: 100%;
-            height: 265px;
-            background-color: #34d496;
-            background-image: linear-gradient(#2ed399, #a5de39);
-            border-radius: 6px;
-            padding: 20px 20px 70px 20px;
-            box-sizing: border-box;
-            color: #fff;
-            .info-top {
-              .p1 {
-                font-size: 18px;
-              }
-              .p2 {
-                font-size: 14px;
-                line-height: 28px;
-              }
-              margin-bottom: 40px;
-            }
-            .info-bottom {
-              display: flex;
-              justify-content: space-between;
-              align-items: center;
-              .bot-left {
-                display: flex;
-                align-items: center;
-                .tem {
-                  font-size: 18px;
-                  span {
-                    font-size: 40px;
-                    margin-right: 5px;
-                  }
-                  margin-right: 15px;
-                }
-                .wea {
-                  font-size: 14px;
-                }
-              }
-              .bot-right {
-                font-size: 14px;
-                text-align: right;
-              }
-            }
-            .botBg {
-              position: absolute;
-              background-size: 100% 100%;
-              width: 100%;
-              height: 60px;
-              left: 0;
-              bottom: 0;
-            }
-          }
-        }
-        .right {
-          flex: 3;
-          .con {
-            .item {
-              margin: 10px 0;
-              .eName {
-                margin-bottom: 10px;
-                span {
-                  font-size: 15px;
-                  margin-right: 13px;
-                  color: #666;
-                  font-weight: 600;
-                  .dot {
-                    display: inline-block;
-                    width: 10px;
-                    height: 10px;
-                    border-radius: 100%;
-                    margin-right: 10px;
-                  }
-                  .dot01 {
-                    background: #ffbf00;
-                  }
-                  .dot02 {
-                    background: #00b9fc;
-                  }
-                  .dot03 {
-                    background: #fe5400;
-                  }
-                }
-                a {
-                  float: right;
-                  width: 20px;
-                  height: 20px;
-                }
-              }
-              ul.state {
-                i {
-                  color: #8addc3;
-                  font-size: 18px;
-                  margin-right: 2px;
-                }
-                display: flex;
-                font-size: 13px;
-                color: #666;
-                margin-bottom: 10px;
-                li {
-                  text-align: left;
-                  flex: 1;
-                }
-              }
-            }
-          }
-        }
-      }
-      .mapCon {
-        /deep/.BMap_cpyCtrl {
-          display: none;
-        }
-        position: relative;
-        height: calc(100% - 287px);
-        .card01 {
-          height: 100%;
-        }
-        .card01 /deep/.el-card__body {
-          padding: 0;
-          height: 100%;
-        }
-        .bm-view {
-          height: 100%;
-          width: 100%;
-          // 设备窗体标题
-          .equipInfoWindowTitle {
-            border-bottom: 2px solid #35a478;
-            line-height: 33px;
-            margin-bottom: 5px;
-          }
-          .equipInfoWindow {
-            color: #585858;
-            font-size: 14px;
-            line-height: 22px;
-            span {
-              color: #333;
-            }
-          }
-        }
-        .legend {
-          /deep/.el-card__body {
-            padding: 5px 10px;
-          }
-          position: absolute;
-          right: 10px;
-          top: 10px;
-          font-size: 14px;
-          li {
-            padding: 5px 0;
-            display: flex;
-            align-items: center;
-          }
-          img {
-            width: 20px;
-            height: auto;
-            margin-right: 5px;
-          }
-        }
-      }
-    }
-    .wrapR {
-      flex: 1.2;
-      flex-direction: column;
-      display: flex;
-      .top {
-        flex: 1;
-        position: relative;
-        #chart {
-          position: absolute;
-          top: 40px;
-          bottom: 20px;
-          width: 100%;
-        }
-      }
-      .bot {
-        flex: 1.2;
-        .box-card {
-          height: 100%;
-        }
-        /deep/.el-card__body {
-          height: 100%;
-          box-sizing: border-box;
-        }
-        ul {
-          height: calc(100% - 41px);
-          overflow: auto;
-        }
-        li {
-          padding: 15px 0;
-          display: flex;
-          border-bottom: 1px solid #dee3e7;
-          img {
-            width: 150px;
-          }
-          .info {
-            padding-left: 20px;
-            flex: 1;
-            display: flex;
-            flex-direction: column;
-            justify-content: space-around;
-            p {
-              width: 90%;
-              overflow: hidden;
-              white-space: nowrap;
-              text-overflow: ellipsis;
-              font-size: 16px;
-            }
-            div {
-              display: flex;
-              justify-content: space-between;
-              font-size: 14px;
-              a {
-                color: #888;
-              }
-            }
-          }
-        }
-      }
-    }
-    .box-card {
-      margin: 5px;
-    }
-  }
-}
-</style>

Файловите разлики са ограничени, защото са твърде много
+ 0 - 1370
bigdata2/src/components/home/MapView.vue


+ 0 - 431
bigdata2/src/components/home/chart.js

@@ -1,431 +0,0 @@
-function home1Line(data){
-  return {
-    tooltip: {
-      trigger: "axis",
-      axisPointer: {
-        lineStyle: {
-          color: "#666"
-        }
-      },
-      formatter(params) {
-        var returnData = '';
-        var time = '';
-        for (let g in params) {
-            time = params[g].axisValue;
-            if(params[g].seriesIndex == 0){
-              returnData += params[g].seriesName + ':' + params[g].value + '%<br/>';
-            }
-            if(params[g].seriesIndex == 1){
-              returnData += params[g].seriesName + ':' + params[g].value + '°C<br/>';
-            }
-        }
-        return time + '<br/>' + returnData;
-      }
-    },
-    legend: {
-      top: "10",
-      textStyle: {
-        color: "#666",
-        fontSize: "12"
-      }
-    },
-    grid: {
-      left: "10",
-      top: "80",
-      right: "20",
-      bottom: "10",
-      containLabel: true
-    },
-    xAxis: [{
-        type: "category",
-        boundaryGap: false,
-        axisLabel: {
-          textStyle: {
-            color: "#666",
-            fontSize: 12
-          }
-        },
-        axisLine: {
-          lineStyle: {
-            color: "#afb2c5"
-          }
-        },
-        splitLine: {
-          show: true,
-          lineStyle: {
-            color: '#afb2c5'
-          }
-        },
-        data: data.time
-      },
-      {
-        axisPointer: {
-          show: false
-        },
-        axisLine: {
-          show: false
-        },
-        position: "bottom",
-        offset: 0
-      }
-    ],
-    yAxis: [{
-      type: "value",
-      axisTick: {
-        show: false
-      },
-      axisLine: {
-        lineStyle: {
-          color: "#afb2c5"
-        }
-      },
-      axisLabel: {
-        textStyle: {
-          color: "#666",
-          fontSize: 12
-        }
-      },
-      splitLine: {
-        show: false
-      }
-    }],
-    series: [{
-        name: "空气湿度",
-        type: "line",
-        smooth: true,
-        symbol: "circle", //标记的 图形
-        symbolSize: 5,
-        showSymbol: true,
-        lineStyle: {
-          normal: {
-            color: "#42d3ff",
-            width: 4
-          }
-        },
-        areaStyle: {
-          normal: {
-            color: {
-              type: 'linear',
-              x: 0,
-              y: 0,
-              x2: 0,
-              y2: 1,
-              colorStops: [{
-                offset: 0,
-                color: '#a7caff' // 0% 处的颜色
-              }, {
-                offset: 0.8,
-                color: '#e3e8fe' // 100% 处的颜色
-              }],
-              global: false // 缺省为 false
-            },
-            shadowColor: "rgba(0, 0, 0, 0.1)"
-          }
-        },
-        itemStyle: {
-          normal: {
-            color: "#62e2ff",
-            borderColor: "#62e2ff",
-            borderWidth: 4
-          }
-        },
-        data: data.ah
-      },
-      {
-        name: "空气温度",
-        type: "line",
-        smooth: true,
-        symbol: "circle",
-        symbolSize: 5,
-        showSymbol: true,
-        lineStyle: {
-          normal: {
-            color: "#fd0001",
-            width: 3
-          }
-        },
-        itemStyle: {
-          normal: {
-            color: "#fd0001",
-            borderColor: "#fd0001",
-            borderWidth: 4
-          }
-        },
-        data: data.at
-      }
-    ]
-  };
-}
-function home1Pie(bzy, cbd, qxz, scd) {
-  var data = [];
-  var colorList = [];
-  if(bzy>0){
-    data.push({
-      "name": "孢子仪",
-      "value": bzy
-    })
-    colorList.push('#00d0ae');
-  }
-  if(cbd>0){
-    data.push({
-      "name": "虫情测报",
-      "value": cbd
-    })
-    colorList.push('#d70252');
-  }
-  if(qxz>0){
-    data.push({
-      "name": "环境监测",
-      "value": qxz
-    })
-    colorList.push('#ffa300');
-  }
-  if(scd>0){
-    data.push({
-      "name": "杀虫灯",
-      "value": scd
-    })
-    colorList.push('#1e75ff');
-  }
-  let total = bzy + cbd + qxz + scd
-  return {
-    "animation": true,
-    "title": {
-      "text": `${total}台`,
-      "x": "center",
-      "y": "center",
-      "textStyle": {
-        "color": "#1e74fd",
-        "fontSize": 20,
-        "fontWeight": "normal",
-        "align": "center",
-        "width": "100px"
-      },
-    },
-    grid:{
-      // x: '57%', 
-      // y: '17%', 
-      // width: '38%', 
-      // height: '38%'
-    }
-    ,
-    "legend": {
-      "width": "90%",
-      "left": "center",
-      "textStyle": {
-        "color": "#666",
-        "fontSize": 12
-      },
-      "icon": "circle",
-      "right": "0",
-      "bottom": "0",
-      "padding": [5, 10],
-      "itemGap": 10,
-      // "data": ["气象监测", "孢子仪设备", "杀虫灯设备", "测报设备"]
-      "data": ["杀虫灯设备", "测报设备"]
-  },
-  "series": [{
-      "type": "pie",
-      "center": ["50%", "50%"],
-      "radius": ["60%", "70%"],
-      "color": colorList,
-      "startAngle": 135,
-      "labelLine": {
-        "normal": {
-          "length": 25
-        }
-      },
-      "label": {
-        "normal": {
-          "formatter": "{b|{b}\n}{per|{d}%}",
-          "backgroundColor": "rgba(255, 147, 38, 0)",
-          "borderColor": "transparent",
-          "borderRadius": 4,
-          "rich": {
-            "b": {
-              // "color": "red",
-              "fontSize": 18,
-              "lineHeight": 33
-            },
-          
-            "per": {
-              // "color": "#FDF44E",
-              "fontSize": 18,
-              "padding": [5, 6],
-              "borderRadius": 2
-            }
-          },
-          "textStyle": {
-            "fontSize": 20
-          }
-        }
-      },
-      "emphasis": {
-        "label": {
-          "show": true,
-          "formatter": "{b|{b}\n}{per|{c}台} ",
-          "backgroundColor": "rgba(255, 147, 38, 0)",
-          "borderColor": "transparent",
-          "borderRadius": 4,
-          "rich": {
-            "a": {
-              "color": "#999",
-              "lineHeight": 22,
-              "align": "center"
-            },
-        
-            "b": {
-              // "color": "red",
-              "fontSize": 18,
-              "lineHeight": 33
-            },
-          
-            "per": {
-              // "color": "#FDF44E",
-              "fontSize": 18,
-              "padding": [5, 6],
-              "borderRadius": 2
-            }
-          }
-        }
-      },
-      "data": data
-    }]
-  };
-}
-const option03 = {
-  "animation": true,
-  "title": {
-    "text": '24台',
-    "x": "center",
-    "y": "center",
-    "textStyle": {
-      "color": "#1e74fd",
-      "fontSize": 20,
-      "fontWeight": "normal",
-      "align": "center",
-      "width": "100px"
-    },
-  },
-  "legend": {
-    "width": "90%",
-    "left": "center",
-    "textStyle": {
-      "color": "#666",
-      "fontSize": 12
-    },
-    "icon": "circle",
-    "right": "0",
-    "bottom": "0",
-    "padding": [5, 10],
-    "itemGap": 10,
-    "data": ["气象监测", "孢子仪设备", "杀虫灯设备", "测报设备"]
-  },
-  "series": [{
-    "type": "pie",
-    "center": ["50%", "50%"],
-    "radius": ["60%", "70%"],
-    "color": ["#00d0ae", "#d70252", "#ffa300", "#1e75ff"],
-    "startAngle": 135,
-    "labelLine": {
-      "normal": {
-        "length": 25
-      }
-    },
-    "label": {
-      "normal": {
-        "formatter": "{c}台",
-        "backgroundColor": "rgba(255, 147, 38, 0)",
-        "borderColor": "transparent",
-        "borderRadius": 4,
-        "rich": {
-          "a": {
-            "color": "#999",
-            "lineHeight": 22,
-            "align": "center"
-          },
-          "hr": {
-            "borderColor": "#aaa",
-            "width": "100%",
-            "borderWidth": 1,
-            "height": 0
-          },
-          "b": {
-            "color": "#b3e5ff",
-            "fontSize": 16,
-            "lineHeight": 33
-          },
-          "c": {
-            "fontSize": 90,
-            "color": "red"
-          },
-          "per": {
-            "color": "#FDF44E",
-            "fontSize": 14,
-            "padding": [5, 8],
-            "borderRadius": 2
-          }
-        },
-        "textStyle": {
-          "fontSize": 20
-        }
-      }
-    },
-    "emphasis": {
-      "label": {
-        "show": true,
-        "formatter": "{b|{b}:}  {per|{d}%}  ",
-        "backgroundColor": "rgba(255, 147, 38, 0)",
-        "borderColor": "transparent",
-        "borderRadius": 4,
-        "rich": {
-          "a": {
-            "color": "#999",
-            "lineHeight": 22,
-            "align": "center"
-          },
-          "hr": {
-            "borderColor": "#aaa",
-            "width": "100%",
-            "borderWidth": 1,
-            "height": 0
-          },
-          "b": {
-            "color": "#fff",
-            "fontSize": 18,
-            "lineHeight": 33
-          },
-          "c": {
-            "fontSize": 14,
-            "color": "#eee"
-          },
-          "per": {
-            "color": "#FDF44E",
-            "fontSize": 25,
-            "padding": [5, 6],
-            "borderRadius": 2
-          }
-        }
-      }
-    },
-    "data": [{
-      "name": "气象监测",
-      "value": 3
-    }, {
-      "name": "孢子仪设备",
-      "value": 7
-    }, {
-      "name": "杀虫灯设备",
-      "value": 4
-    }, {
-      "name": "测报设备",
-      "value": 10
-    }]
-  }]
-}
-// option01和option02是Home页面的echarts数据
-export {
-  home1Line,
-  home1Pie,
-  option03
-}

+ 8 - 45
bigdata2/src/main.js

@@ -2,7 +2,6 @@ import Vue from 'vue'
 import App from './App'
 import router from './router'
 import axios from 'axios'
-import './util/http.js'
 Vue.prototype.$axios = axios //全局注册,使用方法为:this.$axios
 import qs from 'qs'
 Vue.prototype.qs = qs //全局注册,使用方法为:this.qs
@@ -11,7 +10,6 @@ Vue.prototype.$EventBus = new Vue() //中央时间总线
 
 Vue.config.productionTip = false //是阻止显示生产模式的消息
 
-Vue.prototype.jsonUrl = 'http://94.191.119.50:8999'; //地图三级下钻页面使用-韩有波
 
 
 // import VueRouter from "vue-router";
@@ -21,6 +19,14 @@ Vue.prototype.jsonUrl = 'http://94.191.119.50:8999'; //地图三级下钻页面
 //   return originalPush.call(this, location).catch(err => err)
 // }
 
+// axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded;charset=UTF-8';
+// axios.defaults.timeout = 30000;
+// axios.defaults.baseURL =process.env.API_HOST  //韩佑波
+// // axios.defaults.baseURL = 'http://47.104.218.216:8000' //曹世祥
+// axios.defaults.withCredentials = true //axios请求时携带session
+// axios.defaults.crossDomain = true
+
+
 import 'babel-polyfill' //兼容IE11
 require("babel-polyfill")
 
@@ -100,49 +106,6 @@ Vue.filter('equipType', function (i) {
   }
 })
 
-function checkLoginRequire(type, isLogin, next) {
-  if (type == false) {
-    next();
-  } else {
-    if (isLogin) {
-      next();
-    } else {
-      next('/login')
-    }
-  }
-}
-router.beforeEach((to, from, next) => {
-  let isLogin = JSON.parse(localStorage.getItem('isLogin'));
-  console.log(isLogin)
-  if (to.path === '/login') {
-    if (isLogin) {
-      next('/index/home') //登录后默认跳转到首页
-    } else {
-      next()
-    }
-  } else {
-    let type = to.meta.login_require; //是否需要登录,为了解决扫码在手机上看
-    axios({
-      method: 'POST',
-      url: '/api/api_gateway?method=user.login.users_check'
-    }).then(res => {
-      if (res.data.data) { //登录状态
-        console.log('check_success');
-        localStorage.setItem("isLogin", true)
-        checkLoginRequire(type, isLogin, next)
-      } else { //session过期 
-        console.log('check_false');
-        localStorage.setItem("isLogin", false)
-        next('/login');
-      }
-    }, err => {
-      console.log('check_error');
-      localStorage.setItem("isLogin", false);
-      next('/login');
-    })
-  }
-})
-
 /* eslint-disable no-new */
 new Vue({
   el: '#app',

+ 0 - 139
bigdata2/src/pages/afterSale/AllotPeople.vue

@@ -1,139 +0,0 @@
-<template>
-	<div>
-		<el-breadcrumb separator-class="el-icon-arrow-right">
-			<el-breadcrumb-item>售后管理</el-breadcrumb-item>
-			<el-breadcrumb-item to="/index/saleAppli">售后列表</el-breadcrumb-item>
-			<el-breadcrumb-item to="/index/saleAfterDetail">售后详情</el-breadcrumb-item>
-			<el-breadcrumb-item>人员分配</el-breadcrumb-item>
-		</el-breadcrumb>
-		<div class="check-btns">
-			<el-input placeholder="请输入售后人员姓名" size="mini" suffix-icon="el-icon-search" v-model="name"></el-input>
-			<el-button type="primary" size="mini" @click="allotSubmVisible">确定</el-button>
-		</div>
-		<el-row :gutter="10">
-			<el-col :xs="24" :sm="24" :md="12" :lg="6" :xl="6" v-for="(item,index) in peoList" :key="index">
-				<el-card class="box-card">
-					<img src="@/assets/images/12.jpg" />
-					<p>姓名 : {{item.name}}</p>
-					<p>联系电话 : {{item.tel}}</p>
-					<template v-if="item.isAllot">
-						<span class="active btn" @click="allotPeople(index,item.isAllot)">
-							<i :style="{backgroundImage:'url('+checkedIcon+')'}"></i>
-							分配
-						</span>
-					</template>
-					<template v-else>
-						<span class="btn" @click="allotPeople(index,item.isAllot)">分配</span>
-					</template>
-				</el-card>
-			</el-col>
-		</el-row>
-		<el-pagination
-			background
-			layout="prev, pager, next"
-			:total="totalNum"
-			:current-page="page"
-			@current-change="changePage"
-		></el-pagination>
-	</div>
-</template>
-
-<script>
-export default {
-	data() {
-		return {
-			peoList: [
-				{ imgUrl: '', name: '赵先超', tel: '18511111111', isAllot: false },
-				{ imgUrl: '', name: '赵先超', tel: '18511111111', isAllot: false },
-				{ imgUrl: '', name: '赵先超', tel: '18511111111', isAllot: false },
-				{ imgUrl: '', name: '赵先超', tel: '18511111111', isAllot: false },
-				{ imgUrl: '', name: '赵先超', tel: '18511111111', isAllot: false },
-				{ imgUrl: '', name: '赵先超', tel: '18511111111', isAllot: false },
-				{ imgUrl: '', name: '赵先超', tel: '18511111111', isAllot: true },
-				{ imgUrl: '', name: '赵先超', tel: '18511111111', isAllot: false }
-			],
-			name: '',
-			checkedIcon: require('@/assets/images/saleAfter/checked.png'),
-			totalNum: 0,
-			page: 1
-		}
-	},
-	methods: {
-		allotSubmVisible() {
-			this.$confirm(`确定分配么?`, '提示', {
-				confirmButtonText: '确定',
-				cancelButtonText: '取消',
-				type: 'warning'
-			})
-				.then(() => {
-					this.$message({
-						type: 'success',
-						message: '分配成功!'
-					})
-				})
-				.catch(() => {
-					this.$message({
-						type: 'info',
-						message: '已取消分配'
-					})
-				})
-		},
-		allotPeople(index, isAllot) {
-			this.peoList.forEach((item) => {
-				item.isAllot = false
-			})
-			this.peoList[index].isAllot = !this.peoList[index].isAllot
-		},
-		changePage() {}
-	}
-}
-</script>
-
-<style lang='less' scoped>
-.check-btns {
-	display: flex;
-	margin-bottom: 20px;
-	justify-content: space-between;
-	.el-input {
-		width: 200px;
-	}
-}
-.box-card {
-	text-align: center;
-	img {
-		width: 70px;
-		height: 70px;
-		border-radius: 50%;
-		margin-bottom: 10px;
-	}
-	p {
-		font-size: 14px;
-		box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
-		line-height: 30px;
-		margin-bottom: 10px;
-	}
-	.btn {
-		margin-top: 15px;
-		display: inline-block;
-		color: #fff;
-		background: #bbbfbe;
-		width: 150px;
-		height: 30px;
-		line-height: 30px;
-		border-radius: 20px;
-		font-size: 13px;
-		cursor: pointer;
-		i {
-			width: 17px;
-			height: 14px;
-			display: inline-block;
-			background-repeat: no-repeat;
-			background-size: 100% auto;
-			vertical-align: middle;
-		}
-	}
-	.active {
-		background: #17bb89;
-	}
-}
-</style>

+ 0 - 18
bigdata2/src/pages/afterSale/MRecords.vue

@@ -1,18 +0,0 @@
-<template>
-   <div>
-        <el-breadcrumb separator-class="el-icon-arrow-right">
-            <el-breadcrumb-item>售后服务</el-breadcrumb-item>
-            <el-breadcrumb-item>维修记录</el-breadcrumb-item>
-        </el-breadcrumb>
-   </div>
-</template>
-
-<script>
-   export default {
-
-   }
-</script>
-
-<style lang='less' scoped>
-
-</style>

+ 0 - 18
bigdata2/src/pages/afterSale/ProgressInquiry.vue

@@ -1,18 +0,0 @@
-<template>
-   <div>
-        <el-breadcrumb separator-class="el-icon-arrow-right">
-            <el-breadcrumb-item>售后服务</el-breadcrumb-item>
-            <el-breadcrumb-item>进度查询</el-breadcrumb-item>
-        </el-breadcrumb>
-   </div>
-</template>
-
-<script>
-   export default {
-
-   }
-</script>
-
-<style lang='less' scoped>
-
-</style>

+ 0 - 368
bigdata2/src/pages/afterSale/SaleAfterdetail.vue

@@ -1,368 +0,0 @@
-<template>
-	<div>
-		<el-breadcrumb separator-class="el-icon-arrow-right">
-			<el-breadcrumb-item>售后管理</el-breadcrumb-item>
-			<el-breadcrumb-item to="/index/saleAppli">售后列表</el-breadcrumb-item>
-			<el-breadcrumb-item>售后详情</el-breadcrumb-item>
-		</el-breadcrumb>
-		<div class="detailInfo">
-			<img src="@/assets/images/saleAfter/1.png" class="tag" />
-			<h3>
-				工单号 : 4564646465465
-				<span>取消申请</span>
-			</h3>
-			<div class="info">
-				<span>设备信息 : 测报灯4564654645646</span>
-				<span>联系电话 : 12654645646</span>
-				<span>申请日期 : 2020-05-06</span>
-				<span>期望维修日期 : 2020-08-06</span>
-				<span>地址 : 河南省郑州市瀚海北金</span>
-			</div>
-			<div class="desc">故障描述 : 灯管不亮灯管不亮灯管不亮灯管不亮灯管不亮灯管不亮</div>
-		</div>
-		<div class="items" v-if="flag">
-			<div
-				v-for="(item,index) in items"
-				:key="index"
-				:style="{color:item.color,width:index==items.length-1?'150px':''}"
-				class="item"
-			>
-				<div class="point" :style="{borderColor:item.color}">
-					<i class="el-icon-check" :style="{color:item.color}"></i>
-				</div>
-				<div
-					v-if="index+1 != items.length"
-					class="line"
-					:style="{background:lineColor(item.color,index)}"
-				></div>
-				<div class="item-right">
-					<div class="content">{{item.content}}</div>
-					<template v-if="item.color">
-						<div class="person">{{item.person}}</div>
-						<div class="time">{{item.time}}</div>
-					</template>
-					<template v-else>
-						<span class="btn" @click="checkState(index)">{{item.btn}}</span>
-					</template>
-				</div>
-			</div>
-		</div>
-		<h3 class="title">负责人员信息</h3>
-		<div class="leadPerson">
-			<div>
-				<span>
-					<i>1</i>
-					申请人 : {{appli.name}}
-				</span>
-				<span>联系电话 : {{appli.tel}}</span>
-				<span>申请日期 : {{appli.date}}</span>
-			</div>
-			<div>
-				<span>
-					<i>2</i>
-					管理员 : {{admin.name}}
-				</span>
-				<span>联系电话 : {{admin.tel}}</span>
-				<span>分配日期 : {{admin.date}}</span>
-			</div>
-			<div>
-				<span>
-					<i>3</i>
-					售后员 : {{saleAfter.name}}
-				</span>
-				<span>联系电话 : {{saleAfter.tel}}</span>
-				<span>到达日期 : {{saleAfter.date}}</span>
-			</div>
-		</div>
-		<h3 class="title">
-			备注
-			<i @click="modifyRemark" class="el-icon-edit-outline"></i>
-		</h3>
-		<div class="remark">
-			<img src="@/assets/images/12.jpg" />
-			<div class="tex">
-				<span>售后人员备注 :</span>完成售后完成售后完成售后完成售后完成售后完成完成售后完成售后完成售后完成售后完成售后完成售后完成售后完成售后完成售后完成售后完成售后完成售后完成售后完成售后完成售后完成售后完成售后完成售后完成售后完成售后
-			</div>
-		</div>
-		<el-dialog
-			title="修改备注"
-			:visible.sync="remarkDialogVisible"
-			width="30%"
-			@close="remarkDialogClosed"
-		>
-			<el-form></el-form>
-		</el-dialog>
-	</div>
-</template>
-
-<script>
-export default {
-	data() {
-		return {
-			items: [
-				{
-					content: '提出申请',
-					person: '李小明',
-					time: '2020-03-26 12:30',
-					color: '#57dabb'
-				},
-				{
-					content: '管理员分配',
-					person: '管理员',
-					time: '2020-03-26 13:30',
-					btn: '分配'
-				},
-				{
-					content: '到达售后点',
-					person: '陈璐',
-					time: '2020-03-26 18:30',
-					btn: '到达'
-				},
-				{
-					content: '完成售后',
-					person: '成雪',
-					time: '2020-03-27 13:30',
-					btn: '完成'
-				}
-			],
-			appli: {
-				name: '小王',
-				tel: 12165464654,
-				date: '2020-05-01'
-			},
-			admin: {
-				name: '管理员1',
-				tel: 12165464654,
-				date: '2020-05-01'
-			},
-			saleAfter: {
-				name: '小陈',
-				tel: 12165464654,
-				date: '2020-05-01'
-			},
-			flag: true,
-			remarkDialogVisible: false
-		}
-	},
-	methods: {
-		lineColor(color, index) {
-			let i
-			this.items.forEach((item, j) => {
-				if (item.color) {
-					i = j
-				}
-			})
-			if (color && i != index) {
-				return color
-			}
-		},
-		checkState(index) {
-			if (index == 1) {
-				this.$router.push('/index/saleAllotPeople')
-			} else {
-				this.$confirm(`确定${this.items[index].content}?`, '提示', {
-					confirmButtonText: '确定',
-					cancelButtonText: '取消',
-					type: 'warning'
-				})
-					.then(() => {
-						this.flag = false
-						Object.assign(this.items[index], { color: '#57dabb' })
-						this.flag = true
-						this.$message({
-							type: 'success',
-							message: '确认成功!'
-						})
-					})
-					.catch(() => {
-						this.$message({
-							type: 'info',
-							message: '已取消确认'
-						})
-					})
-			}
-		},
-		modifyRemark() {
-			// this.remarkDialogVisible=true
-			this.$prompt('请输入备注信息', '修改备注信息', {
-				confirmButtonText: '确定',
-				cancelButtonText: '取消'
-			})
-				.then(({ value }) => {
-					this.$message({
-						type: 'success',
-						message: '你的备注信息是: ' + value
-					})
-				})
-				.catch(() => {
-					this.$message({
-						type: 'info',
-						message: '取消修改'
-					})
-				})
-		},
-		remarkDialogClosed() {}
-	}
-}
-</script>
-
-<style lang='less' scoped>
-.detailInfo {
-	.tag {
-		position: absolute;
-		top: -8px;
-		left: -10px;
-	}
-	color: #fff;
-	background: #57dabb;
-	border-radius: 6px;
-	padding: 30px 30px 20px 90px;
-	position: relative;
-	h3 {
-		margin: 0;
-		padding: 0;
-		span {
-			background: #fff;
-			color: #57dabb;
-			font-size: 12px;
-			border-radius: 20px;
-			padding: 3px 10px;
-			cursor: pointer;
-			margin-left: 10px;
-		}
-	}
-	.info {
-		line-height: 50px;
-		display: flex;
-		font-size: 15px;
-		span {
-			margin-right: 30px;
-		}
-	}
-	.desc {
-		font-size: 15px;
-	}
-}
-.items {
-	margin: 30px 0;
-	display: flex;
-	flex-wrap: nowrap;
-	padding: 10px 100px 80px 100px;
-	box-shadow: 0 0 2px 2px rgba(154, 154, 154, 0.1);
-	border-radius: 6px;
-	.item {
-		width: 33%;
-		font-size: 13px;
-		color: #666;
-		display: flex;
-		justify-content: flex-start;
-		align-items: center;
-		position: relative;
-		height: 86px;
-		.point {
-			display: inline-block;
-			width: 40px;
-			height: 40px;
-			box-sizing: border-box;
-			border-width: 3px;
-			border-color: #d5d5d5;
-			background: #fff;
-			border-style: solid;
-			border-radius: 50px;
-			position: absolute;
-			i {
-				color: #d5d5d5;
-				font-size: 26px;
-				left: 50%;
-				top: 50%;
-				transform: translate(-50%, -50%);
-				position: absolute;
-				font-weight: 600;
-			}
-		}
-		.line {
-			width: 100%;
-			height: 3px;
-			background: #e4e7ed;
-		}
-		.item-right {
-			text-align: center;
-			position: absolute;
-			transform: translateX(-50%);
-			left: 20px;
-			top: 80px;
-			min-height: 62px;
-			display: flex;
-			flex-direction: column;
-			justify-content: space-between;
-			.content {
-				margin-bottom: 8px;
-			}
-			.person,
-			.time {
-				color: #666;
-			}
-			.btn {
-				background: #57dabb;
-				color: #fff;
-				font-size: 14px;
-				padding: 3px 10px;
-				border-radius: 40px;
-				cursor: pointer;
-			}
-		}
-	}
-}
-.title {
-	color: #606060;
-	i {
-		color: #56d9b9;
-		margin-left: 5px;
-	}
-}
-.leadPerson {
-	box-shadow: 0 0 2px 2px rgba(154, 154, 154, 0.1);
-	border-radius: 6px;
-	padding: 20px 30px;
-	& > div {
-		display: flex;
-		justify-content: flex-start;
-		padding: 10px 0;
-		color: #666;
-		span {
-			i {
-				color: #fff;
-				width: 20px;
-				height: 20px;
-				display: inline-block;
-				background: #58d9bb;
-				border-radius: 50%;
-				font-size: 12px;
-				text-align: center;
-				line-height: 20px;
-				font-style: normal;
-				margin-right: 20px;
-			}
-			font-size: 14px;
-			width: 320px;
-			text-align: left;
-		}
-	}
-}
-.remark {
-	display: flex;
-	img {
-		width: 260px;
-		margin-right: 20px;
-	}
-	.tex {
-		flex: 1;
-		font-size: 14px;
-		line-height: 30px;
-		span {
-			font-size: 15px;
-			font-weight: 600;
-		}
-	}
-}
-</style>

+ 0 - 476
bigdata2/src/pages/afterSale/SaleAppli.vue

@@ -1,476 +0,0 @@
-<template>
-	<div>
-		<el-breadcrumb separator-class="el-icon-arrow-right">
-			<el-breadcrumb-item>售后管理</el-breadcrumb-item>
-			<el-breadcrumb-item>售后列表</el-breadcrumb-item>
-		</el-breadcrumb>
-		<template v-if="dataList.length>0">
-			<div class="check-btns">
-				<div class="search-box">
-					<el-input
-						placeholder="请输入内容"
-						size="mini"
-						clearable
-						v-model="searchVal"
-						suffix-icon="el-icon-search"
-						class="input-with-select"
-						@change="searchEquipList()"
-					>
-						<el-select v-model="selectItem" class="select02" slot="prepend" @change="selClear()">
-							<el-option label="工单号" value="1"></el-option>
-							<el-option label="设备ID" value="2"></el-option>
-						</el-select>
-					</el-input>
-					<el-select
-						v-model="status"
-						class="select01"
-						clearable
-						size="mini"
-						placeholder="请选择售后状态"
-						@change="statusSelect()"
-					>
-						<el-option label="进行中" value="1"></el-option>
-						<el-option label="已完成" value="0"></el-option>
-					</el-select>
-				</div>
-				<el-button type="primary" size="mini" @click="saleAddVisible=true">新增</el-button>
-			</div>
-			<el-row :gutter="10">
-				<el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12" v-for="item in 8" :key="item">
-					<el-card class="box-card boxCard">
-						<div class="saleCard">
-							<div class="baseImg">
-								<img src="@/assets/images/fourMoodBase/1.jpg" alt />
-							</div>
-							<div class="baseInfo">
-								<h2>工单号 : 000000000478</h2>
-								<div class="baseInfoDetails">
-									<i class="iconfont icon-biaoqian"></i>
-									<div class="caption">设备ID:48646156456456</div>
-								</div>
-								<div class="baseInfoDetails">
-									<i class="iconfont icon-diannao"></i>
-									<div class="caption">联系人:小王</div>
-								</div>
-								<div class="baseInfoDetails">
-									<i class="iconfont icon-shijian"></i>
-									<div class="caption">联系电话 :15847514269</div>
-								</div>
-								<div class="baseInfoDetails">
-									<i class="iconfont icon-shijian"></i>
-									<div class="caption">状态 :待分配</div>
-								</div>
-								<div class="baseInfoDetails">
-									<i class="iconfont icon-dizhi"></i>
-									<div class="caption">地址 :河南省这方年广州稍后会闪电发货搜狐海山</div>
-								</div>
-								<div class="baseInfoDetails">
-									<i class="iconfont icon-shijian"></i>
-									<div class="caption">申请日期 :2020-05-10</div>
-								</div>
-							</div>
-						</div>
-						<div class="tagBox">
-							<template v-if="item==1">
-								<img src="@/assets/images/saleAfter/bzy.png" alt />
-							</template>
-							<template v-else-if="item==2">
-								<img src="@/assets/images/saleAfter/qxz.png" alt />
-							</template>
-							<template v-else-if="item==3">
-								<img src="@/assets/images/saleAfter/cbd.png" alt />
-							</template>
-							<template v-else-if="item==4">
-								<img src="@/assets/images/saleAfter/jk.png" alt />
-							</template>
-							<template v-else-if="item==5">
-								<img src="@/assets/images/saleAfter/xy.png" alt />
-							</template>
-							<template v-else-if="item==6">
-								<img src="@/assets/images/saleAfter/scd.png" alt />
-							</template>
-							<template v-else>
-								<img src="@/assets/images/saleAfter/scd.png" alt />
-							</template>
-						</div>
-						<div class="arrowBox" @click="saleAfterDetail">
-							<template v-if="item==1">
-								<img src="@/assets/images/saleAfter/bzy1.png" alt />
-							</template>
-							<template v-else-if="item==2">
-								<img src="@/assets/images/saleAfter/qxz1.png" alt />
-							</template>
-							<template v-else-if="item==3">
-								<img src="@/assets/images/saleAfter/cbd1.png" alt />
-							</template>
-							<template v-else-if="item==4">
-								<img src="@/assets/images/saleAfter/jk1.png" alt />
-							</template>
-							<template v-else-if="item==5">
-								<img src="@/assets/images/saleAfter/xy1.png" alt />
-							</template>
-							<template v-else-if="item==6">
-								<img src="@/assets/images/saleAfter/scd1.png" alt />
-							</template>
-							<template v-else>
-								<img src="@/assets/images/saleAfter/scd1.png" alt />
-							</template>
-						</div>
-					</el-card>
-				</el-col>
-			</el-row>
-			<el-pagination
-				background
-				layout="prev, pager, next"
-				:total="totalNum"
-				:current-page="page"
-				@current-change="changePage"
-			></el-pagination>
-		</template>
-		<template v-else>
-			<div class="kong">
-				<img src="@/assets/images/saleAfter/kong.png" />
-				<div>
-					<el-button @click="saleAddVisible=true" type="primary" round>去申请</el-button>
-				</div>
-			</div>
-		</template>
-		<!-- vueCropper 剪裁图片实现-->
-		<el-dialog title="图片剪裁" :visible.sync="cropperVisible" width="400px">
-			<div class="cropper-content">
-				<div style="width:100%;height:300px">
-					<vue-cropper
-						ref="cropper"
-						:img="option.img"
-						:output-size="option.size"
-						:output-type="option.outputType"
-						:info="true"
-						:full="option.full"
-						:fixed="option.fixed"
-						:fixed-number="option.fixedNumber"
-						:can-move="option.canMove"
-						:can-move-box="option.canMoveBox"
-						:fixed-box="option.fixedBox"
-						:original="option.original"
-						:auto-crop="option.autoCrop"
-						:auto-crop-width="option.autoCropWidth"
-						:auto-crop-height="option.autoCropHeight"
-						:center-box="option.centerBox"
-						@real-time="realTime"
-						:high="option.high"
-						@img-load="imgLoad"
-						mode="cover"
-						:max-img-size="option.max"
-						@crop-moving="cropMoving"
-					></vue-cropper>
-				</div>
-			</div>
-			<div slot="footer" class="dialog-footer">
-				<el-button @click="cropperVisible = false">取 消</el-button>
-				<el-button type="primary" @click="cropperFinish" :loading="loading">确认</el-button>
-			</div>
-		</el-dialog>
-		<!-- 售后新增 -->
-		<el-dialog title="申请售后" :visible.sync="saleAddVisible" width="30%" @close="saleAfterDialogClosed">
-			<el-form
-				ref="addsaleAfterFormRef"
-				:model="saleAfterForm"
-				label-width="120px"
-				:rules="saleAfterFormRules"
-			>
-				<el-form-item label="设备类型 : " prop="equipType">
-					<el-select v-model="saleAfterForm.equipType" placeholder="请选择设备类型" style="width: 100%;">
-						<el-option
-							v-for="item in equipType"
-							:label="item.label"
-							:value="item.value"
-							:key="item.value"
-						></el-option>
-					</el-select>
-				</el-form-item>
-				<el-form-item label="设备ID : " prop="equipID">
-					<el-select v-model="saleAfterForm.equipID" placeholder="请选择设备ID" style="width: 100%;">
-						<el-option v-for="item in equipID" :label="item" :value="item" :key="item"></el-option>
-					</el-select>
-				</el-form-item>
-				<el-form-item label="故障描述 : " prop="desc">
-					<el-input type="textarea" v-model="saleAfterForm.desc"></el-input>
-				</el-form-item>
-				<el-form-item label="故障图片 : " prop="img">
-					<el-upload
-						class="avatar-uploader"
-						action
-						:auto-upload="false"
-						:show-file-list="false"
-						:on-change="changeUpload"
-					>
-						<img v-if="saleAfterForm.imageUrl" :src="saleAfterForm.imageUrl" class="avatar" />
-						<i v-else class="el-icon-plus avatar-uploader-icon"></i>
-					</el-upload>
-				</el-form-item>
-				<el-form-item label="维修地址 : " prop="addr">
-					<el-input v-model="saleAfterForm.addr"></el-input>
-				</el-form-item>
-				<el-form-item label="联系人 : " prop="contacts">
-					<el-input v-model="saleAfterForm.contacts"></el-input>
-				</el-form-item>
-				<el-form-item label="联系电话 : " prop="phone">
-					<el-input v-model="saleAfterForm.phone"></el-input>
-				</el-form-item>
-				<el-form-item label="期望维修日期 : " prop="date">
-					<el-form-item prop="date">
-						<el-date-picker
-							type="date"
-							placeholder="选择日期"
-							v-model="saleAfterForm.date"
-							style="width: 100%;"
-						></el-date-picker>
-					</el-form-item>
-				</el-form-item>
-			</el-form>
-			<span slot="footer" class="dialog-footer">
-				<el-button @click="saleAddVisible= false">取 消</el-button>
-				<el-button type="primary" @click="addSaleAfterSubm">确认</el-button>
-			</span>
-		</el-dialog>
-	</div>
-</template>
-
-<script>
-export default {
-	data() {
-		return {
-			dataList: [
-				{ order: 454646 },
-				{ order: 454646 },
-				{ order: 454646 },
-				{ order: 454646 },
-				{ order: 454646 },
-				{ order: 454646 },
-				{ order: 454646 },
-				{ order: 454646 }
-			],
-			searchVal: '',
-			selectItem: '1',
-			status: '',
-			saleAddVisible: false,
-			saleAfterList: [],
-			totalNum: 0,
-			page: 1,
-			saleAfterForm: {
-				equipType: '',
-				equipID: '',
-				desc: '',
-				imageUrl: '',
-				addr: '',
-				contacts: '',
-				phone: '',
-				date: ''
-			},
-			equipType: [
-				{ label: '测报灯', value: 1 },
-				{ label: '杀虫灯', value: 2 },
-				{ label: '孢子仪', value: 3 },
-				{ label: '气象站', value: 4 },
-				{ label: '监控', value: 5 }
-			],
-			equipID: [1465456456, 45454646646, 4564646464646],
-			saleAfterFormRules: {
-				equipType: [
-					{ required: true, message: '请选择设备类型', trigger: 'change' }
-				],
-				equipID: [
-					{ required: true, message: '请选择设备ID', trigger: 'change' }
-				],
-				desc: [{ required: true, message: '请填写故障描述', trigger: 'blur' }],
-				addr: [{ required: true, message: '请填写维修地址', trigger: 'blur' }],
-				contacts: [
-					{ required: true, message: '请填写联系人', trigger: 'blur' }
-				],
-				phone: [{ required: true, message: '请填写联系电话', trigger: 'blur' }],
-				date: [{ required: true, message: '请选择日期', trigger: 'blur' }]
-			},
-			cropperVisible: false,
-			fileinfo: {},
-			loading: false,
-			// 裁剪组件的基础配置option
-			option: {
-				img: null,
-				size: 1,
-				full: false,
-				outputType: 'png',
-				canMove: true,
-				fixed: true,
-				fixedNumber: [16, 9],
-				fixedBox: false,
-				original: false,
-				canMoveBox: true,
-				autoCrop: true,
-				// 只有自动截图开启 宽度高度才生效
-				autoCropWidth: 160,
-				autoCropHeight: 150,
-				centerBox: false,
-				high: true,
-				max: 99999
-			}
-		}
-	},
-	methods: {
-		// 搜索组合数据
-		searchEquipList() {
-			if (this.selectItem == 1) {
-				this.f_id = this.searchVal
-			} else if (this.selectItem == 2) {
-				this.ename = this.searchVal
-			}
-			this.$emit('fun2', { f_id: this.f_id, ename: this.ename })
-		},
-		selClear() {},
-		statusSelect() {},
-		//改变page
-		changePage(val) {
-			this.page = val
-		},
-		saleAfterDialogClosed() {},
-		changeUpload(file, fileList) {
-			const isLt5M = file.size / 1024 / 1024 < 5
-			if (!isLt5M) {
-				this.$message.error('上传文件大小不能超过 5MB!')
-				return false
-			}
-			// let reader = new FileReader()
-			// reader.onload = (e) => {
-			// 	let data
-			// 	if (typeof e.target.result === 'object') {
-			// 		// 把Array Buffer转化为blob 如果是base64不需要
-			// 		data = window.URL.createObjectURL(new Blob([e.target.result]))
-			// 		console.log(data)
-			// 	} else {
-			// 		data = e.target.result
-			// 	}
-			// 	this.option.img = data
-			// }
-			// // 转化为base64
-			// // 转化为blob
-			// // console.log(reader)
-			// // reader.readAsDataURL(file)
-			// this.cropperVisible = true
-			// reader.readAsArrayBuffer(file.raw)
-			// 上传成功后将图片地址赋值给裁剪框显示图片
-			this.$nextTick(() => {
-				this.option.img = URL.createObjectURL(file.raw)
-				this.cropperVisible = true
-			})
-		},
-		cropperFinish() {
-			// 获取截图的base64 数据
-			this.$refs.cropper.getCropData((data) => {
-				this.saleAfterForm.imageUrl = data
-				this.cropperVisible = false
-			})
-		},
-		imgLoad(msg) {
-			console.log('imgLoad')
-			console.log(msg)
-		},
-		// 实时预览函数
-		realTime(data) {
-			console.log(data)
-		},
-		cropMoving(data) {
-			console.log(99899)
-			console.log(data, '截图框当前坐标')
-		},
-		addSaleAfterSubm() {},
-		saleAfterDetail() {
-			this.$router.push('/index/saleAfterDetail')
-		}
-	}
-}
-</script>
-
-<style lang='less' scoped>
-.check-btns {
-	display: flex;
-	justify-content: space-between;
-	margin-bottom: 20px;
-	.search-box {
-		text-align: left;
-		.el-input {
-			width: 400px;
-		}
-		.select01 {
-			width: 200px;
-		}
-		/deep/.select02 {
-			width: 86px;
-		}
-		.input-with-select {
-			width: 260px;
-		}
-	}
-}
-
-.boxCard {
-	position: relative;
-	.saleCard {
-		display: flex;
-		.baseImg {
-			flex: 1;
-			overflow: hidden;
-			height: 200px;
-			img {
-				width: 100%;
-				height: auto;
-			}
-		}
-		.baseInfo {
-			flex: 1 1 auto;
-			max-width: calc(100% - 50%);
-			padding-left: 15px;
-			h2 {
-				font-size: 16px;
-				margin: 0;
-				white-space: nowrap;
-				overflow: hidden;
-				text-overflow: ellipsis;
-				width: 80%;
-			}
-			.baseInfoDetails {
-				display: flex;
-				line-height: 28px;
-				font-size: 14px;
-				i {
-					font-size: 14px;
-					margin-right: 10px;
-					color: #9e9e9e;
-				}
-				.caption {
-					min-width: 68px;
-					text-align: left;
-					color: #525252;
-				}
-			}
-		}
-	}
-	.tagBox {
-		position: absolute;
-		right: 20px;
-		top: 0;
-		cursor: pointer;
-		img {
-			width: 35px;
-		}
-	}
-	.arrowBox {
-		position: absolute;
-		right: 20px;
-		bottom: 20px;
-	}
-}
-.kong {
-	padding-top:12%;
-	text-align: center;
-	img{margin-bottom:20px;}
-}
-</style>

+ 0 - 268
bigdata2/src/pages/equipmanger/EquipDistribute.vue

@@ -1,268 +0,0 @@
-<template>
-	<div>
-		<el-breadcrumb separator-class="el-icon-arrow-right">
-			<el-breadcrumb-item>设备管理</el-breadcrumb-item>
-			<el-breadcrumb-item>分配设备</el-breadcrumb-item>
-		</el-breadcrumb>
-		<div class="search-box">
-			<div class="filter-box">
-				<el-select size="small" v-model="type" @change="equipCheck()" clearable placeholder="请选择设备类型">
-					<el-option label="杀虫灯" value="2"></el-option>
-					<el-option label="测报灯" value="3"></el-option>
-					<el-option label="智能性诱" value="4"></el-option>
-					<el-option label="气象站" value="5"></el-option>
-					<el-option label="监控设备" value="6"></el-option>
-					<el-option label="孢子仪" value="7"></el-option>
-					<el-option label="性诱设备" value="8"></el-option>
-					<el-option label="糖醋测报" value="9"></el-option>
-				</el-select>
-				<el-input size="small" clearable placeholder="请输入设备ID" @change="equipCheck()" v-model="equipId">
-					<i slot="suffix" class="el-input__icon el-icon-search"></i>
-				</el-input>
-				<el-date-picker
-					size="small"
-					v-model="timeRange"
-					@change="DateChange"
-					type="daterange"
-					range-separator="至"
-					start-placeholder="开始日期"
-					end-placeholder="结束日期"
-				></el-date-picker>
-			</div>
-			<el-button type="primary" @click="distSubm" size="mini">确定分配</el-button>
-		</div>
-		<el-row :gutter="10">
-			<el-col :xs="24" :sm="24" :md="12" :lg="6" :xl="4" v-for="(item,index) in dataList" :key="index">
-				<el-card :class="['box-card', item.checked?'selected':'']">
-					<el-checkbox v-model="item.checked" @change="checkboxChange($event,item.d_id)"></el-checkbox>
-					<div class="img-box">
-						<template v-if="item.device_type_id==2">
-							<img src="@/assets/images/equipdistribute/scdIconOn.png" />
-						</template>
-						<template v-if="item.device_type_id==3">
-							<img src="@/assets/images/equipdistribute/cbdIconOn.png" />
-						</template>
-						<template v-if="item.device_type_id==4">
-							<img src="@/assets/images/equipdistribute/znxyOn.png" />
-						</template>
-						<template v-if="item.device_type_id==5">
-							<img src="@/assets/images/equipdistribute/hjjcIconOn.png" />
-						</template>
-						<template v-if="item.device_type_id==6">
-							<img src="@/assets/images/equipdistribute/jkIconOn.png" />
-						</template>
-						<template v-if="item.device_type_id==7">
-							<img src="@/assets/images/equipdistribute/bzyIconOn.png" />
-						</template>
-						<template v-if="item.device_type_id==8">
-							<img src="@/assets/images/equipdistribute/xyOn.png" />
-						</template>
-						<template v-if="item.device_type_id==9">
-							<img src="@/assets/images/equipdistribute/tccbOn.png" />
-						</template>
-						<p>{{item.device_id}}</p>
-					</div>
-					<div class="detail">
-						<p>
-							设备名称
-							<span>{{item.device_name || "无"}}</span>
-						</p>
-						<p>
-							设备类型
-							<span>{{item.device_type_id+'' | equipType}}</span>
-						</p>
-						<p>
-							设备添加时间
-							<span>{{item.creat_time*1000 | formatTime}}</span>
-						</p>
-						<p>
-							设备地址
-							<span>{{item.device_location}}</span>
-						</p>
-					</div>
-				</el-card>
-			</el-col>
-		</el-row>
-		 <!-- 暂无数据 -->
-		<div class="expertDiagnosis_referral_units_not" v-if="dataList.length<=0 ">
-			<img
-				src="@/assets/images/expertDiagnosis/zanwu.png"
-				alt
-				class="expertDiagnosis_referral_units_notImg"
-			/>
-		</div>
-		<div class="userTip">*注:以上所选设备分配给用户:{{this.$route.query.username}}</div>
-		<el-pagination
-			v-if="dataList.length>0"
-			background
-			:page-size="12"
-			layout="prev, pager, next"
-			:current-page="page"
-			:total="totalNum"
-			@current-change="changePage"
-		></el-pagination>
-	</div>
-</template>
-
-<script>
-export default {
-	data() {
-		return {
-			uid: this.$route.params.id,
-			timeRange: '',
-			equipId: '',
-			begin: '',
-			end: '',
-			type: '',
-			dataList: [],
-			own_device: [],
-			device_ids: [], //选中的所有设备ID
-			page: 1,
-			totalNum: 0,
-			equipID: []
-		}
-	},
-	mounted() {
-		this.getList()
-	},
-	methods: {
-		getList() {
-			this.$axios({
-				method: 'POST',
-				url: '/api/api_gateway?method=device.device_manage.user_device_info',
-				data: this.qs.stringify({
-					owner_uid: this.uid,
-					page_size: 12,
-					device_id: this.equipId,
-					device_type_id: this.type,
-					start_time: this.begin,
-					end_time: this.end,
-					page: this.page
-				})
-			}).then((res) => {
-				if (res.data.message == '') {
-					let data = res.data.data.data
-					this.dataList = data.map((item) => {
-						item.checked = item.device_user != 0 //device_user=0代表待分配
-						return item
-					})
-					this.own_device = res.data.data.own_device
-					this.totalNum = res.data.data.counts
-				}
-			})
-		},
-		DateChange(val) {
-			if (this.timeRange) {
-				this.begin = parseInt(new Date(this.timeRange[0]).getTime() / 1000)
-				this.end = parseInt(new Date(this.timeRange[1]).getTime() / 1000)
-				this.page = 1
-				this.getList()
-			} else {
-				this.begin = ''
-				this.end = ''
-				this.getList()
-			}
-		},
-		changePage(val) {
-			this.page = val
-			this.getList()
-		},
-		distSubm() {
-			this.dataList.forEach((item) => {
-				if (item.checked == true) {
-					this.device_ids.push(item.d_id)
-				}
-			})
-			this.device_ids = this.device_ids.concat(this.own_device)
-			this.device_ids = [...new Set(this.device_ids)] //数组去重
-			this.$axios({
-				method: 'POST',
-				url: '/api/api_gateway?method=device.device_manage.allot_device',
-				data: this.qs.stringify({
-					device_ids: this.device_ids.join(','),
-					uid: this.uid
-				})
-			}).then((res) => {
-				if (res.data.message == '') {
-					this.$message.success('分配设备成功!')
-					this.$router.go(-1)
-				}
-			})
-		},
-		equipCheck() {
-			this.page = 1
-			this.getList()
-		},
-		checkboxChange(event, d_id) {
-			console.log(event)
-			console.log(d_id)
-			console.log(this.own_device)
-			for (let i in this.own_device) {
-				if (!event && d_id == this.own_device[i]) {
-					//取消勾选并且是用户已拥有的设备
-					this.own_device.splice(i, 1)
-					console.log(123)
-				}
-			}
-		}
-	}
-}
-</script>
-
-<style lang='less' scoped>
-.search-box {
-	display: flex;
-	justify-content: flex-left;
-	justify-content: space-between;
-	margin-bottom: 10px;
-	.filter-box > div {
-		margin-right: 15px;
-	}
-	.el-input {
-		width: 200px;
-	}
-	.el-date-editor--daterange {
-		width: 222px;
-	}
-}
-.el-card.selected {
-	border: 1px solid #14a478;
-}
-.el-card {
-	box-sizing: border-box;
-	.img-box {
-		text-align: center;
-		border-bottom: 1px solid #eee;
-		padding: 15px 0;
-		img {
-			height: 45px;
-		}
-		p {
-			font-size: 14px;
-			font-weight: 800;
-			margin-top: 10px;
-		}
-	}
-	.detail {
-		border-bottom: 1px solid #eee;
-		padding: 10px 0;
-		p {
-			display: flex;
-			justify-content: space-between;
-			font-size: 13px;
-			line-height: 34px;
-			color: #666;
-			padding: 0 0px;
-		}
-	}
-}
-.userTip{
-	text-align: left;
-	font-size:14px;
-}
-// 暂无数据
-.expertDiagnosis_referral_units_not {
-	width: 272px;
-	margin: 0 auto;
-}
-</style>

+ 0 - 426
bigdata2/src/pages/equipmanger/EquipList.vue

@@ -1,426 +0,0 @@
-<template>
-	<div>
-		<el-breadcrumb separator-class="el-icon-arrow-right">
-			<el-breadcrumb-item>设备管理</el-breadcrumb-item>
-			<el-breadcrumb-item>设备列表</el-breadcrumb-item>
-		</el-breadcrumb>
-		<div class="search-box">
-			<div class="filter-box">
-				<el-select
-					size="small"
-					v-model="queryInfo.device_type_id"
-					clearable
-					placeholder="请选择设备类型"
-					@change="searchChange()"
-				>
-					<el-option label="杀虫灯" value="2"></el-option>
-					<el-option label="测报灯" value="3"></el-option>
-					<el-option label="智能性诱" value="4"></el-option>
-					<el-option label="环境监测" value="5"></el-option>
-					<el-option label="监控设备" value="6"></el-option>
-					<el-option label="孢子仪" value="7"></el-option>
-					<el-option label="性诱设备" value="8"></el-option>
-					<el-option label="糖醋测报" value="9"></el-option>
-				</el-select>
-				<el-input
-					size="small"
-					clearable
-					@change="searchChange()"
-					placeholder="请输入设备ID"
-					v-model="queryInfo.f_id"
-				>
-					<i slot="suffix" class="el-input__icon el-icon-search"></i>
-				</el-input>
-			</div>
-			<el-date-picker
-				size="small"
-				@change="DateChange()"
-				v-model="timeRange"
-				type="daterange"
-				range-separator="至"
-				start-placeholder="开始日期"
-				end-placeholder="结束日期"
-			></el-date-picker>
-		</div>
-		<el-row :gutter="10">
-			<el-col :xs="24" :sm="24" :md="12" :lg="6" :xl="4" v-for="item in dataList" :key="item.id">
-				<el-card class="box-card pad0">
-					<div class="img-box">
-						<template v-if="item.device_type_id=='2'">
-							<img src="@/assets/images/equipdistribute/scdIconOn.png" />
-							<p>杀虫灯</p>
-						</template>
-						<template v-if="item.device_type_id=='3'">
-							<img src="@/assets/images/equipdistribute/cbdIconOn.png" />
-							<p>测报灯</p>
-						</template>
-						<template v-if="item.device_type_id=='4'">
-							<img src="@/assets/images/equipdistribute/znxyOn.png" />
-							<p>智能性诱</p>
-						</template>
-						<template v-if="item.device_type_id=='5'">
-							<img src="@/assets/images/equipdistribute/hjjcIconOn.png" />
-							<p>环境监测</p>
-						</template>
-						<template v-if="item.device_type_id=='6'">
-							<img src="@/assets/images/equipdistribute/jkIconOn.png" />
-							<p>监控设备</p>
-						</template>
-						<template v-if="item.device_type_id=='7'">
-							<img src="@/assets/images/equipdistribute/bzyIconOn.png" />
-							<p>孢子仪</p>
-						</template>
-						<template v-if="item.device_type_id=='8'">
-							<img src="@/assets/images/equipdistribute/xyOn.png" />
-							<p>性诱设备</p>
-						</template>
-						<template v-if="item.device_type_id==9">
-							<img src="@/assets/images/equipdistribute/tccbOn.png" />
-							<p>糖醋测报</p>
-						</template>
-					</div>
-					<div class="detail">
-						<p>
-							设备ID
-							<span>{{item.device_id}}</span>
-						</p>
-						<p>
-							适配用户
-							<span>{{item.device_user || '无'}}</span>
-						</p>
-						<p>
-							设备名称
-							<span>{{item.device_name || "无"}}</span>
-						</p>
-						<p>
-							位置
-							<span>{{item.device_location || "无"}}</span>
-						</p>
-						<p>
-							设备添加时间
-							<span>{{item.creat_time*1000 | formatTime}}</span>
-						</p>
-					</div>
-					<div class="bottom">
-						<span @click="modifyName(item.device_id)">
-							<i class="el-icon-edit-outline"></i> 修改名称
-						</span>
-						<span @click="addPosition(item.device_id,item.lng,item.lat)">
-							<i class="el-icon-location-outline"></i> 添加位置
-						</span>
-					</div>
-				</el-card>
-			</el-col>
-		</el-row>
-		<!-- 暂无数据 -->
-		<div class="expertDiagnosis_referral_units_not" v-if="dataList.length<=0 ">
-			<img
-				src="@/assets/images/expertDiagnosis/zanwu.png"
-				alt
-				class="expertDiagnosis_referral_units_notImg"
-			/>
-		</div>
-		<el-pagination
-			v-if="dataList.length>0 "
-			background
-			layout="prev, pager, next"
-			:page-size="12"
-			:total="totalNum"
-			@current-change="changePage"
-		></el-pagination>
-		<!-- 添加定位弹框 -->
-		<el-dialog
-			class="map_dialog"
-			title="添加定位"
-			v-if="addLocationDialogVisible"
-			:visible.sync="addLocationDialogVisible"
-			width="800px"
-			@closed="addLocationDialogClosed"
-		>
-			<el-form :inline="true" :model="locationForm" class="demo-form-inline" size="mini">
-				<el-form-item label="经度">
-					<el-input v-model="locationForm.lng"></el-input>
-				</el-form-item>
-				<el-form-item label="维度">
-					<el-input v-model="locationForm.lat"></el-input>
-				</el-form-item>
-				<el-form-item>
-					<el-button type="primary" size="mini" @click="locationSearch">定位</el-button>
-				</el-form-item>
-			</el-form>
-			<baidu-map
-				class="Bmap"
-				:center="center"
-				:zoom="mapZoom"
-				:scroll-wheel-zoom="true"
-				@ready="handlerBMap"
-				@click="locationPoint"
-			>
-				<bm-marker :position="point" :dragging="true"></bm-marker>
-			</baidu-map>
-			<span slot="footer" class="dialog-footer">
-				<el-button @click="addLocationDialogVisible = false">取 消</el-button>
-				<el-button type="primary" @click="addLocationSubm">确 定</el-button>
-			</span>
-		</el-dialog>
-	</div>
-</template>
-
-<script>
-export default {
-	data() {
-		return {
-			timeRange: '',
-			queryInfo: {
-				f_id: '',
-				page: 1,
-				device_type_id: null,
-				start_time: '',
-				end_time: ''
-			},
-			dataList: [],
-			totalNum: 0,
-			locationForm: {
-				lat: '',
-				lng: ''
-			},
-			device_id: '',
-			mapZoom: 6,
-			point: { lng: '', lat: '' },
-			center: { lng: '', lat: '' },
-			addLocationDialogVisible: false
-		}
-	},
-	mounted() {
-		this.getList()
-	},
-	beforeMount() {},
-	methods: {
-		//获取设备列表
-		getList() {
-			this.$axios({
-				method: 'POST',
-				url: '/api/api_gateway?method=device.device_manage.device_info',
-				data: this.qs.stringify({
-					device_id: this.queryInfo.f_id,
-					page: this.queryInfo.page,
-					page_size: 12,
-					device_type_id: this.queryInfo.device_type_id,
-					start_time: this.queryInfo.start_time,
-					end_time: this.queryInfo.end_time
-				})
-			}).then((res) => {
-				if (res.data.message == '') {
-					this.dataList = res.data.data.data
-					this.totalNum = res.data.data.counts
-				}
-			})
-		},
-		searchChange() {
-			this.queryInfo.page = 1
-			this.getList()
-		},
-		DateChange(val) {
-			this.queryInfo.page = 1
-			if (this.timeRange) {
-				this.queryInfo.start_time = parseInt(
-					new Date(this.timeRange[0]).getTime() / 1000
-				)
-				this.queryInfo.end_time = parseInt(
-					new Date(this.timeRange[1]).getTime() / 1000
-				)
-				this.getList()
-			} else {
-				this.queryInfo.start_time = ''
-				this.queryInfo.end_time = ''
-				this.getList()
-			}
-		},
-		//在地图中点击定位
-		locationPoint(e) {
-			let { point } = e
-			this.point = point
-			this.locationForm = point
-			this.map.clearOverlays()
-			this.map.addOverlay(new BMap.Marker(this.point))
-		},
-		// 修改设备名称
-		modifyName(id) {
-			this.$prompt('', '修改名字', {
-				confirmButtonText: '确定',
-				cancelButtonText: '取消'
-			})
-				.then(({ value }) => {
-					if (value) {
-						this.$axios({
-							method: 'POST',
-							url: '/api/api_gateway?method=forecast.worm_lamp.revise_device',
-							data: this.qs.stringify({
-								device_id: id,
-								device_name: value
-							})
-						}).then((res) => {
-							if (res.data.message == '') {
-								this.getList()
-								this.$message({
-									type: 'success',
-									message: '修改成功'
-								})
-							}
-						})
-					} else {
-						this.$message({
-							type: 'info',
-							message: '内容不能为空'
-						})
-					}
-				})
-				.catch(() => {
-					this.$message({
-						type: 'info',
-						message: '取消输入'
-					})
-				})
-		},
-		//通过经纬度搜索定位
-		locationSearch() {
-			if (this.locationForm.lat && this.locationForm.lng) {
-				this.point = this.locationForm
-				this.map.clearOverlays()
-				this.map.addOverlay(new BMap.Marker(this.point))
-			}
-		},
-		handlerBMap({ BMap, map }) {
-			this.BMap = BMap
-			this.map = map
-			let point = new BMap.Point(this.point.lng, this.point.lat)
-			map.centerAndZoom(point, 15)
-		},
-		//点击“添加定位”按钮
-		addPosition(device_id, lng, lat) {
-			this.device_id = device_id
-			this.point = { lng, lat }
-			this.addLocationDialogVisible = true
-		},
-		changePage(val) {
-			console.log(val)
-			this.queryInfo.page = val
-			this.getList()
-		},
-		//关闭定位弹框时调用
-		addLocationDialogClosed() {
-			this.locationForm = { lat: '', lng: '' }
-			this.point = { lng: '', lat: '' }
-			this.center = { lng: 113.271429, lat: 23.135336 }
-
-			//   this.map.clearOverlays();
-			this.map = null
-			this.BMap = null
-		},
-		//选择定位点后,提交
-		addLocationSubm() {
-			console.log(this.point)
-			this.$axios({
-				method: 'POST',
-				url: '/api/api_gateway?method=forecast.worm_lamp.revise_device',
-				data: this.qs.stringify({
-					device_id: this.device_id,
-					lat: this.point.lat,
-					lng: this.point.lng
-				})
-			}).then((res) => {
-				if (res.data.message == '') {
-					this.getList()
-					this.$message({
-						type: 'success',
-						message: '定位成功'
-					})
-				}else{
-                  	this.$message({
-						type: 'error',
-						message: '定位失败'
-					})  
-                }
-			})
-			this.addLocationDialogVisible = false
-		}
-	}
-}
-</script>
-
-<style lang='less' scoped>
-.search-box {
-	display: flex;
-	justify-content: flex-left;
-	justify-content: space-between;
-	margin-bottom: 10px;
-	.filter-box > div {
-		margin-right: 15px;
-	}
-	.el-input {
-		width: 200px;
-	}
-	.el-date-editor--daterange {
-		width: 222px;
-	}
-}
-.el-card.selected {
-	border: 1px solid #14a478;
-}
-.el-card {
-	.img-box {
-		text-align: center;
-		border-bottom: 1px solid #e1e1e1;
-		padding: 20px 0;
-		img {
-			height: 55px;
-		}
-		p {
-			font-size: 14px;
-			font-weight: 800;
-			margin-top: 10px;
-		}
-	}
-	.detail {
-		border-bottom: 1px solid #e1e1e1;
-		padding: 10px 0;
-		padding: 0 20px;
-		p {
-			display: flex;
-			justify-content: space-between;
-			font-size: 13px;
-			line-height: 34px;
-			color: #666;
-		}
-	}
-	.bottom {
-		display: flex;
-		font-size: 13px;
-		color: #666;
-		line-height: 50px;
-		span {
-			flex: 1;
-			text-align: center;
-			cursor: pointer;
-			i {
-				font-size: 16px;
-			}
-		}
-		span:first-child {
-			border-right: 1px solid #e1e1e1;
-		}
-	}
-}
-.Bmap {
-	width: 100%;
-	height: 400px;
-}
-.map_dialog /deep/ .el-dialog__body {
-	padding: 20px 20px 0 20px;
-}
-// 暂无数据
-.expertDiagnosis_referral_units_not {
-	width: 272px;
-	margin: 0 auto;
-}
-</style>

+ 0 - 199
bigdata2/src/pages/equipmanger/UserList.vue

@@ -1,199 +0,0 @@
-<template>
-   <div>
-        <el-breadcrumb separator-class="el-icon-arrow-right">
-            <el-breadcrumb-item>设备管理</el-breadcrumb-item>
-            <el-breadcrumb-item>分配设备</el-breadcrumb-item>
-        </el-breadcrumb>
-        <div class="search-box">
-            <el-input
-                size="small"
-                placeholder="请输入用户名"
-                @change="changeUser"
-                clearable
-                v-model="username">
-                <i slot="prefix" class="el-input__icon el-icon-search"></i>
-            </el-input>
-            <el-date-picker
-                size="small"
-                @change="DateChange()"
-                v-model="timeRange"
-                type="daterange"
-                range-separator="至"
-                start-placeholder="开始日期"
-                end-placeholder="结束日期">
-            </el-date-picker>
-        </div>
-        <el-row :gutter="10">
-            <el-col :xs="24" :sm="24" :md="12" :lg="6" :xl="4" v-for="item in userList" :key="item.id">
-                <el-card class="box-card">
-                    <div class="img-box">
-                        <img v-if="item.state==1" src="@/assets/images/equipdistribute/user.png" >
-                        <img v-if="item.state==4" src="@/assets/images/equipdistribute/user_dis.png" >
-                        <p>{{item.username}}</p>
-                    </div>
-                    <div class="detail">
-                        <p>用户角色  <span>{{item.role_name}}</span></p>
-                        <p>用户类型  <span>{{item.user_type | user_type}}</span></p>
-						<p>
-							用户所属
-							<span>{{item.regiest_source_name || '--'}}</span>
-						</p>
-                        <p>用户手机号  <span>{{item.mobile}}</span></p>
-                        <p>是否可用  <span>{{item.state==1?'可用':'禁用'}}</span></p>
-                        <p>创建时间  <span>{{item.addtime*1000 | formatTime}}</span></p>
-                     </div>
-                    <div class="btn">
-                        <a v-if="item.user_type != 3" @click="distribute(item.uid,item.username)">分配设备</a>
-                    </div>
-                </el-card>
-            </el-col>
-      </el-row>
-      <!-- 暂无数据 -->
-		<div class="expertDiagnosis_referral_units_not" v-if="userList.length<=0 ">
-			<img
-				src="@/assets/images/expertDiagnosis/zanwu.png"
-				alt
-				class="expertDiagnosis_referral_units_notImg"
-			/>
-		</div>
-        <el-pagination
-        v-if="userList.length>0"
-        background
-        :page-size="12"
-        layout="prev, pager, next"
-        :current-page="page"
-        :total="totalNum"
-        @current-change="changePage">
-       </el-pagination>
-
-   </div>
-</template>
-
-<script>
-   export default {
-    data(){
-        return {
-        timeRange:'',
-        page:1,
-        username:'',
-        userList:[],
-        totalNum:0,
-        start_time:'',
-        end_time:'',
-        timeRange:''
-        }
-    },
-    mounted(){
-        this.getList()
-    },
-    methods:{
-       getList(){
-           this.$axios({
-                method:"POST",
-                url:"/api/api_gateway?method=user.login.users_info",
-                data:this.qs.stringify({
-                    page:this.page,
-                    page_size:12,
-                    username:this.username,
-                    start_time:this.start_time,
-				    end_time:this.end_time 
-                })
-           }).then((res)=>{
-                if(res.data.message==''){
-                    this.userList=res.data.data.data;
-                    this.totalNum=res.data.data.count;
-                }
-           })
-       },
-       distribute(id,username){
-            this.$router.push({path:"/index/equipdis/"+id,query:{username:username}});
-       },
-       changePage(val){
-            this.page=val;
-            this.getList();
-       },
-       changeUser(){
-           this.page=1;
-           this.getList();
-       },
-       DateChange(val) {
-			this.page = 1
-			if (this.timeRange) {
-				this.start_time = parseInt(
-					new Date(this.timeRange[0]).getTime() / 1000
-				)
-				this.end_time = parseInt(
-					new Date(this.timeRange[1]).getTime() / 1000
-				)
-				this.getList()
-			} else {
-				this.start_time = ''
-				this.end_time = ''
-				this.getList()
-			}
-		},
-    },
-    filters:{
-        "role":function(value){
-            if(value=="user"){
-                return "用户"
-            }else if(value=="superuser"){
-                return "管理员"
-            }else if(value=="agency"){
-                return "代理商"
-            }
-        },
-        'user_type':function(value){
-            switch(value){
-                case 1:
-                    return '超级管理员';
-                    break;
-                case 2:
-                    return '经销商';
-                    break;
-                case 3:
-                    return '农林政府单位';
-                    break;
-                case 4:
-                    return '普通用户';
-                    break;
-            }
-        }
-    }
-   }
-</script>
-
-<style lang='less' scoped>
-.search-box{
-    display:flex;
-    justify-content: space-between;
-    margin-bottom:10px;
-    .el-input{width:200px;}
-    .el-date-editor--daterange{width:222px;}
-    }
-.el-card{
-    .img-box{
-        text-align: center;
-        border-bottom:1px solid #ddd;
-        padding:15px 0;
-        p{font-size:14px;font-weight:800;margin-top:10px;}
-    }
-    .detail{
-        border-bottom:1px solid #ddd;
-        padding:10px 0;
-        p{display:flex;justify-content: space-between;font-size:13px;line-height:34px;color:#666;padding:0 0px}
-    }
-    .btn{
-        text-align: center;
-        padding:20px 0 5px 0;
-        height: 30px;
-        a{background:#14a478;color:#fff;border-radius:30px;font-size:14px;padding:5px 15px;cursor:pointer}
-    }
-
-}
-// 暂无数据
-.expertDiagnosis_referral_units_not {
-	width: 272px;
-	margin: 0 auto;
-}
-</style>

+ 0 - 422
bigdata2/src/pages/forecasting/tccb/TcDataDetail.vue

@@ -1,422 +0,0 @@
-<template>
-	<div>
-		<el-breadcrumb separator-class="el-icon-arrow-right">
-			<el-breadcrumb-item>测报系统</el-breadcrumb-item>
-			<el-breadcrumb-item :to="{ path: '/index/tccb' }">糖醋测报</el-breadcrumb-item>
-			<el-breadcrumb-item>数据详情</el-breadcrumb-item>
-		</el-breadcrumb>
-		<div class="equipInfo">
-			<div class="detail">
-				<i></i>
-				<span>设备ID:{{4456}}</span>
-				<span>设备名称:无</span>
-				<span>位置:黑龙江省,鸡西市,鸡东县</span>
-				<span>已培养时间(h):0</span>
-			</div>
-			<div class="time-check">
-				<el-button type="primary" size="mini" @click="equipBtnControl('status')">刷新</el-button>
-			</div>
-		</div>
-		<el-card class="box-card">
-			<div class="statusBox">
-				<div class="equipStatus">
-					<div class="equipIcon">
-						<img src="@/assets/images/forecasting/cbd/staticIcon1.png" alt />
-					</div>
-					<div class="equipParams">
-						<strong>{{equipStatus.device_status==1?"在线":"离线"}}</strong>
-						<p>在线状态</p>
-					</div>
-				</div>
-				<div class="equipStatus">
-					<div class="equipIcon">
-						<img src="@/assets/images/forecasting/cbd/staticIcon2.png" alt />
-					</div>
-					<div class="equipParams">
-						<strong>{{equipStatus.device_name}}</strong>
-						<p>设备名称</p>
-					</div>
-				</div>
-				<div class="equipStatus">
-					<div class="equipIcon">
-						<img src="@/assets/images/forecasting/cbd/staticIcon3.png" alt />
-					</div>
-					<div class="equipParams">
-						<strong>糖醋测报</strong>
-						<p>设备类型</p>
-					</div>
-				</div>
-				<div class="equipStatus">
-					<div class="equipIcon">
-						<img src="@/assets/images/forecasting/cbd/staticIcon4.png" alt />
-					</div>
-					<div class="equipParams">
-						<strong>{{equipStatus.batstatus==0?"正常":"电量过低"}}</strong>
-						<p>电池状态</p>
-					</div>
-				</div>
-				<div class="equipStatus">
-					<div class="equipIcon">
-						<img src="@/assets/images/forecasting/cbd/staticIcon5.png" alt />
-					</div>
-					<div class="equipParams">
-						<strong>{{equipStatus.vbat}}</strong>
-						<p>电压(V)</p>
-					</div>
-				</div>
-				<div class="equipStatus">
-					<div class="equipIcon">
-						<img src="@/assets/images/forecasting/cbd/staticIcon6.png" alt />
-					</div>
-					<div class="equipParams">
-						<strong>{{equipStatus.ah}}</strong>
-						<p>环境湿度(RH)</p>
-					</div>
-				</div>
-				<div class="equipStatus">
-					<div class="equipIcon">
-						<img src="@/assets/images/forecasting/cbd/staticIcon7.png" alt />
-					</div>
-					<div class="equipParams">
-						<strong>{{equipStatus.at}}</strong>
-						<p>环境温度(℃)</p>
-					</div>
-				</div>
-				<div class="equipStatus">
-					<div class="equipIcon">
-						<img src="@/assets/images/forecasting/cbd/staticIcon8.png" alt />
-					</div>
-					<div class="equipParams">
-						<strong>{{equipStatus.csq}}</strong>
-						<p>信号强度</p>
-					</div>
-				</div>
-				<div class="equipStatus">
-					<div class="equipIcon">
-						<img src="@/assets/images/forecasting/cbd/staticIcon9.png" alt />
-					</div>
-					<div class="equipParams">
-						<strong>{{equipStatus.dver}}</strong>
-						<p>设备版本</p>
-					</div>
-				</div>
-			</div>
-		</el-card>
-		<div style="margin-top:10px">
-			<SearchBar @fun="getDisplayType">
-				<div slot="search-common">
-					<DateSearch @dateChange="dateChange"></DateSearch>
-				</div>
-			</SearchBar>
-		</div>
-		<template v-if="displayType==1">
-			<el-card class="box-card">
-				<div class="charts">
-					<highcharts :options="option1"></highcharts>
-				</div>
-			</el-card>
-		</template>
-		<template v-if="displayType==2">
-			<el-card class="box-card">
-				<el-table :data="tableData" stripe style="width: 100%">
-					<el-table-column
-						v-for="(item,index) in tableHeadTxt"
-						:key="index"
-						:prop="item[1]"
-						:label="item[0]"
-						:show-overflow-tooltip="true"
-					>
-						<template slot-scope="scope">{{scope.row[scope.column.property]}}</template>
-					</el-table-column>
-				</el-table>
-				<el-pagination
-					background
-					layout="prev, pager, next"
-					:total="total"
-					:current-page="queryInfo.page"
-					@current-change="changePage"
-				></el-pagination>
-			</el-card>
-		</template>
-	</div>
-</template>
-
-<script>
-import DateSearch from '@/components/DateSearch'
-import SearchBar from '@/components/SearchBar'
-export default {
-	data() {
-		return {
-			equipStatus: {},
-			displayType: 1,
-			total: 0,
-			queryInfo: {
-				begin: '',
-				end: '',
-				e_id: this.$route.params.e_id,
-				d_id: this.$route.params.d_id,
-				page: 1
-			},
-			option1: {},
-			tableHeadTxt: [
-				['环境温度(℃)', 'at'],
-				['环境湿度(RH)', 'ah'],
-				['信号强度', 'csq'],
-				['电池状态', 'batstatus'],
-				['电压(V)', 'vbat'],
-				['设备版本', 'dver'],
-				['上报时间', 'addtime']
-			],
-			// 表格数据
-			tableData: []
-		}
-	},
-	mounted() {
-		this.getChartDataList()
-		this.getHisDataList()
-		this.getStatus()
-	},
-	methods: {
-		//获取折线数据
-		getChartDataList() {
-			this.$axios({
-				method: 'POST',
-				url: '/api/api_gateway?method=forecast.worm_lamp.device_polyline_data',
-				data: this.qs.stringify({
-					device_type_id: 9,
-					device_id: '300151',
-					start_time: this.queryInfo.begin,
-					end_time: this.queryInfo.end
-				})
-			}).then((res) => {
-				if (res.data.message == '') {
-					var ChartData = [
-						{
-							name: '温度(°C)',
-							dat: []
-						},
-						{
-							name: '湿度(RH)',
-							dat: []
-						},
-						{
-							name: '信号强度',
-							dat: []
-						}
-					]
-					var data = res.data.data
-					for (let item of data) {
-						ChartData[0].dat.unshift([
-							item.addtime * 1000 + 8 * 3600000,
-							item.temperature
-						])
-						ChartData[1].dat.unshift([
-							item.addtime * 1000 + 8 * 3600000,
-							item.humidity
-						])
-						ChartData[2].dat.unshift([
-							item.addtime * 1000 + 8 * 3600000,
-							item.others
-						])
-					}
-					this.option1 = {
-						chart: {
-							zoomType: 'x'
-						},
-						title: {
-							text: '历史数据',
-							align: 'left'
-						},
-						subtitle: {
-							text: ''
-						},
-						xAxis: {
-							crosshair: true, //十字基准线
-							type: 'datetime',
-							dateTimeLabelFormats: {
-								//根据时间间距X轴自动显示哪种格式
-								millisecond: '%H:%M:%S.%L',
-								second: '%H:%M:%S',
-								minute: '%H:%M',
-								hour: '%H:%M',
-								day: '%m-%d',
-								week: '%m-%d',
-								month: '%Y-%m',
-								year: '%Y'
-							}
-						},
-						yAxis: {
-							title: {
-								text: ''
-							}
-						},
-						legend: {
-							// layout: 'vertical',
-							align: 'right',
-							verticalAlign: 'top'
-						},
-						plotOptions: {
-							series: {
-								label: {
-									connectorAllowed: false
-								},
-								pointStart: 2010 //该参数定义了数据点的起点
-							}
-						},
-						series: [
-							{
-								name: ChartData[0].name,
-								data: ChartData[0].dat
-							},
-							{
-								name: ChartData[1].name,
-								data: ChartData[1].dat
-							},
-							{
-								name: ChartData[2].name,
-								data: ChartData[2].dat
-							}
-						],
-						colors: ['#00e29d', '#6cbbff', '#ff3f3f'],
-						credits: {
-							//去掉默认的highcharts.com
-							enabled: false
-						},
-						tooltip: {
-							// crosshairs: true,
-							shared: true, //折线共享
-							headerFormat: '<b>{point.x:%Y-%m-%e %H:%M:%S}</b><br>'
-						},
-						responsive: {
-							rules: [
-								{
-									condition: {
-										maxWidth: 500
-									},
-									chartOptions: {
-										legend: {
-											layout: 'horizontal',
-											align: 'center',
-											verticalAlign: 'bottom'
-										}
-									}
-								}
-							]
-						}
-					}
-				}
-			})
-		},
-		//获取表格数据
-		getHisDataList() {
-			this.$axios({
-				method: 'POST',
-				url: '/api/api_gateway?method=forecast.worm_lamp.device_history_data',
-				data: this.qs.stringify({
-					device_type_id: 9,
-					device_id: '300151',
-					start_time: this.queryInfo.begin,
-					end_time: this.queryInfo.end,
-					page: this.queryInfo.page
-				})
-			}).then((res) => {
-				if (res.data.message == '') {
-					this.total = res.data.data.counts
-					var data = res.data.data.data
-					if (data.length > 0) {
-						this.tableData = []
-						for (var i = 0; i < data.length; i++) {
-							var dht = data[i].d_h_t
-							dht.ah = dht.ah
-							dht.at = dht.at
-							dht.csq = dht.csq
-							dht.batstatus = dht.bat_sta == 0 ? '正常' : '电量过低'
-							dht.vbat = dht.vbat
-							dht.dver = dht.dver
-							dht.addtime = this.formatTime(dht.addtime * 1000)
-							this.tableData.push(dht)
-						}
-					}
-				}
-			})
-		},
-		//获取设备最新状态
-		getStatus() {
-			this.$axios({
-				method: 'POST',
-				url: '/api/api_gateway?method=forecast.worm_lamp.tccb_device',
-				data: this.qs.stringify({
-					device_id: '300151'
-				})
-			}).then((res) => {
-				if (res.data.message == '') {
-					var data = res.data.data[0]
-					this.equipStatus = data
-				}
-			})
-		},
-
-		dateChange(data) {
-			console.log(data)
-			this.queryInfo.page = 1
-			this.queryInfo.begin = data.begin
-			this.queryInfo.end = data.end
-			this.getChartDataList()
-			this.getHisDataList()
-		},
-		getDisplayType(data) {
-			console.log(data)
-			this.displayType = data
-		},
-		changePage(val) {
-			this.queryInfo.page = val
-		},
-		equipBtnControl(cmd) {
-			this.$axios({
-				method: 'POST',
-				url:
-					'/api/api_gateway?method=forecast.send_control.tccbd_device_control',
-				data: this.qs.stringify({
-					cmd,
-					device_type_id: 9,
-					d_id: this.queryInfo.d_id
-				})
-			}).then((res) => {
-				if (res.data.message == '') {
-					this.$message.success('指令下发成功!')
-				}
-			})
-		}
-	},
-	components: {
-		DateSearch,
-		SearchBar
-	}
-}
-</script>
-
-<style lang='less' scoped>
-.equipInfo {
-	display: flex;
-	margin-bottom: 10px;
-	justify-content: space-between;
-	.detail {
-		font-size: 14px;
-		color: #666;
-		span {
-			margin-right: 20px;
-		}
-	}
-}
-.statusBox {
-	display: flex;
-	justify-content: space-between;
-	text-align: center;
-	strong {
-		font-size: 15px;
-	}
-}
-.charts {
-	height: 400px;
-}
-</style>

+ 0 - 283
bigdata2/src/pages/forecasting/tccb/TcDataPhotos.vue

@@ -1,283 +0,0 @@
-<template>
-	<div>
-		<el-breadcrumb separator-class="el-icon-arrow-right">
-			<el-breadcrumb-item>测报系统</el-breadcrumb-item>
-			<el-breadcrumb-item :to="{ path: '/index/tccb' }">糖醋测报</el-breadcrumb-item>
-			<el-breadcrumb-item>查看图片</el-breadcrumb-item>
-		</el-breadcrumb>
-		<div class="check-btns">
-			<div class="type-check">
-				<el-button type="primary" size="mini" @click="equipStatusCheck('0')">拍照</el-button>
-				<el-button type="primary" size="mini" @click="equipStatusCheck('1')">刷新</el-button>
-				<template v-if="userType==1">
-					<el-button v-if="delBtnState" type="primary" size="mini" @click="equipStatusCheck('2')">批量删除</el-button>
-					<el-button v-if="!delBtnState" type="primary" size="mini" @click="equipStatusCheck('3')">删除</el-button>
-					<el-button v-if="!delBtnState" size="mini" @click="equipStatusCheck('4')">取消</el-button>
-					<el-button type="primary" size="mini" @click="equipStatusCheck('5')">一键删除</el-button>
-				</template>
-			</div>
-			<div class="search-box">
-				<el-date-picker
-					size="mini"
-					v-model="timeRange"
-					type="daterange"
-					range-separator="至"
-					clearable
-					start-placeholder="开始日期"
-					end-placeholder="结束日期"
-					@change="DateChange"
-				></el-date-picker>
-			</div>
-		</div>
-		<el-row :gutter="30" v-viewer v-if="photoList.length>0">
-			<el-col :xs="24" :sm="24" :md="12" :lg="8" :xl="6" v-for="item in photoList" :key="item.addr">
-				<div class="photoItem">
-					<div class="photoInfo" v-if="userType==1">
-						<i class="iconfont icon-shanchu" v-show="delBtnState" @click="delectImg(item.addr)"></i>
-						<el-checkbox v-show="!delBtnState" v-model="item.checked"></el-checkbox>
-					</div>
-					<div class="photoImg">
-						<img :src="'/api/'+item.addr" />
-					</div>
-					<div class="photoCtrl">
-						<div>
-							<span>{{item.addtime*1000 | formatTime}}</span>
-						</div>
-					</div>
-				</div>
-			</el-col>
-		</el-row>
-		<!-- 暂无数据 -->
-		<div style="text-align:center" v-else>
-			<img src="@/assets/images/expertDiagnosis/zanwu.png" alt />
-		</div>
-		<el-pagination
-			v-if="photoList.length>0"
-			background
-			layout="prev, pager, next"
-			:total="totalNum"
-			@current-change="changePage"
-		></el-pagination>
-	</div>
-</template>
-<script>
-export default {
-	data() {
-		return {
-			totalNum: 0,
-			timeRange: [],
-			delBtnState: true,
-			id: this.$route.params.id,
-			photoList: [],
-			queryInfo: {
-				begin: '',
-				end: '',
-				page: 1
-			},
-			addrlist: [], //删除图片的地址数组
-			photoDescDialogVisible: false
-		}
-	},
-	mounted() {
-		this.getPhoteList()
-	},
-	computed: {
-		userType: function () {
-			//获取用户类型
-			return window.sessionStorage.getItem('myuser_type')
-		}
-	},
-	methods: {
-		equipStatusCheck(flag) {
-			this.active = flag
-			if (flag == 0) {
-				//拍照
-				this.equipBtnControl('takephoto')
-			}
-			if (flag == 1) {
-				//刷新
-				this.getPhoteList()
-			}
-			if (flag == 2) {
-				this.delBtnState = false
-			}
-			if (flag == 3) {
-				this.addrlist = this.photoList
-					.filter((item) => {
-						return item.checked == true
-					})
-					.map((item) => {
-						return item.addr
-					})
-				if (this.addrlist.length == 0) {
-					this.$message.warning('请选择要删除的设备!')
-				} else {
-					this.delImgFun(this.addrlist)
-				}
-			}
-			if (flag == 4) {
-				this.photoList.map((item) => {
-					item.checked = false
-				})
-				this.delBtnState = true
-			}
-			if (flag == 5) {
-				this.delImgFun('')
-			}
-		},
-		equipBtnControl(cmd) {
-			this.$axios({
-				method: 'POST',
-				url:
-					'/api/api_gateway?method=forecast.send_control.admin_device_control',
-				data: this.qs.stringify({
-					cmd,
-					device_type_id: 9,
-					d_id: this.$route.query.d_id
-				})
-			}).then((res) => {
-				if (res.data.message == '') {
-					this.$message.success('指令下发成功!')
-				}
-			})
-		},
-		getPhoteList() {
-			this.$axios({
-				method: 'POST',
-				url: '/api/api_gateway?method=forecast.forecast_system.equip_photo',
-				data: this.qs.stringify({
-					device_id: this.id,
-					ret: 'list',
-					page: this.queryInfo.page,
-					time_begin: this.queryInfo.begin,
-					time_end: this.queryInfo.end
-				})
-			}).then((res) => {
-				if (res.data.message == '') {
-					let data = res.data.data.data
-					this.photoList = data.map((item) => {
-						item.checked = false
-						return item
-					})
-					this.totalNum = res.data.data.num
-					this.$message.success('请求最新图片成功!')
-				}
-			})
-		},
-		//改变page
-		changePage(val) {
-			this.queryInfo.page = val
-			this.getPhoteList()
-		},
-		DateChange() {
-			this.queryInfo.page = 1
-			if (this.timeRange) {
-				this.queryInfo.begin = parseInt(
-					new Date(this.timeRange[0]).getTime() / 1000
-				)
-				this.queryInfo.end = parseInt(
-					new Date(this.timeRange[1]).getTime() / 1000
-				)
-			} else {
-				this.queryInfo.begin = ''
-				this.queryInfo.end = ''
-			}
-			this.getPhoteList()
-		},
-		delImgFun(addrlist) {
-			this.$confirm('此操作将永久删除该设备图片, 是否继续?', '提示', {
-				confirmButtonText: '确定',
-				cancelButtonText: '取消',
-				type: 'warning'
-			})
-				.then(() => {
-					this.$axios({
-						method: 'POST',
-						url:
-							'/api/api_gateway?method=forecast.forecast_system.equip_photo_del',
-						data: this.qs.stringify({
-							device_id: this.id,
-							addrlist: JSON.stringify(addrlist)
-						})
-					}).then((res) => {
-						if (res.data.message == '') {
-							this.$message({
-								type: 'success',
-								message: '删除成功!'
-							})
-							this.getPhoteList()
-						}
-					})
-				})
-				.catch(() => {
-					this.$message({
-						type: 'info',
-						message: '已取消删除'
-					})
-				})
-		},
-		delectImg(addr) {
-			this.delImgFun([addr])
-		}
-	}
-}
-</script>
-
-<style lang='less' scoped>
-.check-btns {
-	display: flex;
-	justify-content: space-between;
-	margin-bottom: 20px;
-	align-items: center;
-	.el-select {
-		width: 90px;
-	}
-}
-
-.photoItem {
-	position: relative;
-	border-radius: 10px;
-	overflow: hidden;
-	.photoInfo {
-		position: absolute;
-		top: 10px;
-		right: 10px;
-		span {
-			color: #fff;
-		}
-		i {
-			cursor: pointer;
-			color: red;
-			display: none;
-		}
-	}
-	.photoImg {
-		height: 250px;
-		cursor: pointer;
-		img {
-			width: 100%;
-			height: 100%;
-		}
-	}
-	.photoCtrl {
-		background-color: #fff;
-		text-align: center;
-		line-height: 50px;
-		font-size: 14px;
-		color: #666;
-		display: flex;
-		justify-content: center;
-		position: relative;
-		cursor: pointer;
-		.el-checkbox {
-			position: absolute;
-			right: 10px;
-		}
-	}
-}
-.photoItem:hover {
-	.photoInfo i {
-		display: block;
-	}
-}
-</style>

+ 0 - 641
bigdata2/src/pages/forecasting/tccb/Tccb.vue

@@ -1,641 +0,0 @@
-<template>
-	<div>
-		<el-breadcrumb separator-class="el-icon-arrow-right">
-			<el-breadcrumb-item>测报系统</el-breadcrumb-item>
-			<el-breadcrumb-item>糖醋测报</el-breadcrumb-item>
-		</el-breadcrumb>
-		<search-bar @fun="getDisplayType" @fun2="getIDName" @fun3="getIsOnline">
-		</search-bar>
-		<template v-if="displayType==1">
-			<el-row :gutter="10">
-				<el-col :xs="24" :sm="24" :md="12" :lg="8" :xl="6" v-for="item in equipList" :key="item.imei">
-					<el-card class="box-card">
-						<equip-item :is_online="item.device_status">
-							<span
-								slot="set"
-								v-show="userType==1"
-								class="superOperate el-icon-setting"
-								@click="equipOperation(item.d_id)"
-							></span>
-							<span slot="title">糖醋测报</span>
-							<div slot="content" class="content">
-								<p>
-									<i class="iconfont icon-yonghu"></i>
-									设备ID:{{item.device_id}}
-								</p>
-								<p>
-									<i class="iconfont icon-biaoqian"></i>
-									设备名称:{{item.device_name==""?"无":item.device_name}}
-								</p>
-								<p>
-									<i class="iconfont icon-diannao"></i>在线状态:
-									<span
-										:class="{red:item.device_status==0,green:item.device_status==1}"
-									>{{item.device_status==0?"离线":"在线"}}</span>
-								</p>
-								<p>
-									<i class="iconfont icon-shijian"></i>
-									最新上报时间 : {{item.status_time*1000 | formatTime}}
-								</p>
-								<p>
-									<i class="iconfont icon-dizhi"></i>
-									地址 : {{item.address || "无"}}
-								</p>
-								<p class="btns">
-									<i class="iconfont icon-yemiancaozuo"></i>
-									<el-button size="mini" type="info" @click="viewPhotoDialog(item.device_id,item.d_id)">查看图片</el-button>
-									<el-button size="mini" type="warning" @click="EquipControl(item.d_id)">设备控制</el-button>
-									<el-button size="mini" type="success" @click="lookSIMCode(item.d_id)">SIM卡</el-button>
-									<el-button size="mini" type="danger" @click="dataDetails(item.device_id,item.d_id)">数据详情</el-button>
-								</p>
-							</div>
-						</equip-item>
-					</el-card>
-				</el-col>
-			</el-row>
-		</template>
-		<template v-if="displayType==2">
-			<el-card class="box-card">
-				<el-table :data="equipList" stripe style="width: 100%">
-					<el-table-column prop="device_id" label="设备ID" width="180">
-						<template slot-scope="scope">{{scope.row.device_id.slice(-8)}}</template>
-					</el-table-column>
-					<el-table-column prop="device_name" label="设备名称" width="180">
-						<template slot-scope="scope">{{scope.row.device_name==""?"无":scope.row.device_name}}</template>
-					</el-table-column>
-					<el-table-column prop="device_status" label="在线状态">
-						<template slot-scope="scope">
-							<p style="color:#17bb89" v-if="scope.row.device_status==1">在线</p>
-							<p style="color:#eb6765" v-if="scope.row.device_status==0">离线</p>
-						</template>
-					</el-table-column>
-					<el-table-column prop="dver_num" label="设备版本"></el-table-column>
-					<el-table-column prop="status_time" label="最新上报时间">
-						<template slot-scope="scope">{{scope.row.status_time*1000 | formatTime}}</template>
-					</el-table-column>
-					<el-table-column label="操作" width="400">
-						<template slot-scope="scope">
-							<el-button size="mini" type="info" @click="viewPhotoDialog(scope.row.device_id,scope.row.d_id)">查看图片</el-button>
-							<el-button size="mini" type="warning" @click="EquipControl(scope.row.d_id)">设备控制</el-button>
-							<el-button size="mini" type="success" @click="lookSIMCode(scope.row.d_id)">SIM卡查询</el-button>
-							<el-button
-								size="mini"
-								type="danger"
-								@click="dataDetails(scope.row.device_id,scope.row.d_id)"
-							>数据详情</el-button>
-						</template>
-					</el-table-column>
-				</el-table>
-			</el-card>
-		</template>
-		<el-pagination
-			background
-			:page-size="8"
-			layout="prev, pager, next"
-			:total="totalNum"
-			:current-page="queryInfo.page"
-			@current-change="changePage"
-		></el-pagination>
-		<!-- 设备控制对话框 -->
-		<el-dialog
-			title="设备控制"
-			:visible.sync="equipControlDialogVisible"
-			@close="resetEquipControlDialogClosed"
-			width="600px"
-		>
-			<div class="handAddForm">
-				<el-form
-					ref="equipContrlRef"
-					:model="equipContrlForm"
-					label-position="right"
-					label-width="180px"
-				>
-					<el-form-item label="数据上传时间间隔(分钟):" prop="datt">
-						<div class="sliderParent">
-							<div class="block">
-								<el-slider v-model="equipContrlForm.datt" show-input :min="5" :max="60"></el-slider>
-							</div>
-						</div>
-					</el-form-item>
-					<el-form-item label="收集时间(分钟):" prop="collt">
-						<div class="sliderParent">
-							<div class="block">
-								<el-slider v-model="equipContrlForm.collt" show-input :min="1" :max="60"></el-slider>
-							</div>
-						</div>
-					</el-form-item>
-					<el-form-item label="糖醋液挥发时间(分钟):" prop="htim">
-						<div class="sliderParent">
-							<div class="block">
-								<el-slider v-model="equipContrlForm.htim" show-input :min="1" :max="60"></el-slider>
-							</div>
-						</div>
-					</el-form-item>
-					<el-form-item label="加液排水轮询时间(天):" prop="jp">
-						<div class="sliderParent">
-							<div class="block">
-								<el-slider v-model="equipContrlForm.jp" show-input :min="1" :max="7"></el-slider>
-							</div>
-						</div>
-					</el-form-item>
-					<el-form-item label="水泵打开(秒):" prop="pump_sec">
-						<div class="sliderParent">
-							<div class="block">
-								<el-slider v-model="equipContrlForm.pump_sec" show-input :min="10" :max="300"></el-slider>
-							</div>
-						</div>
-					</el-form-item>
-					<el-form-item label="电磁阀打开(秒):" prop="shake_sec">
-						<div class="sliderParent">
-							<div class="block">
-								<el-slider v-model="equipContrlForm.shake_sec" show-input :min="10" :max="300"></el-slider>
-							</div>
-						</div>
-					</el-form-item>
-					<el-form-item label="定时开始时间:" prop="st">
-						<el-time-select
-							placeholder="起始时间"
-							v-model="equipContrlForm.st"
-							:picker-options="{
-								start: '00:00',
-								step: '01:00',
-								end: '24:00'
-								}"
-						></el-time-select>
-					</el-form-item>
-					<el-form-item label="定时结束时间:" prop="et">
-						<el-time-select
-							placeholder="结束时间"
-							v-model="equipContrlForm.et"
-							:picker-options="{
-								start: '00:00',
-								step: '01:00',
-								end: '24:00',
-								minTime: equipContrlForm.st
-								}"
-						></el-time-select>
-					</el-form-item>
-					<el-form-item>
-						<el-button type="primary" @click="equipBtnControl('takephoto')" size="mini">拍照</el-button>
-						<el-button type="primary" @click="equipBtnControl('reboot')" size="mini">重启</el-button>
-						<el-button type="primary" @click="equipBtnControl('paramconf')" size="mini">获取最新配置</el-button>
-					</el-form-item>
-					<el-form-item class="handAddFormBtn">
-						<el-button type="primary" size="mini" @click="equipControlSubm()">确定</el-button>
-						<el-button size="mini" @click="equipControlDialogVisible = false">取消</el-button>
-					</el-form-item>
-				</el-form>
-			</div>
-		</el-dialog>
-		<!-- 管理员操作弹框 -->
-		<el-dialog title="信息" :visible.sync="operationDialogVisible" width="300px">
-			<el-row>
-				<el-button type="primary" size="mini" @click="equipBtnControl('takephoto')">拍照</el-button>
-				<el-button type="primary" size="mini" @click="equipBtnControl('update')">升级</el-button>
-				<el-button type="primary" size="mini" @click="equipBtnControl('reboot')">重启</el-button>
-				<el-button type="primary" size="mini" @click="equipBtnControl('boot1')">禁用</el-button>
-			</el-row>
-		</el-dialog>
-		<!-- SIM卡对话框 -->
-		<el-dialog title="SIM卡" :visible.sync="simCodeVisible" width="30%">
-			<div class="simCodeBox">
-				<div>
-					<span class="simCodeTitle">ICCID:</span>
-					<div>{{sim.iccid}}</div>
-				</div>
-				<div>
-					<span class="simCodeTitle">状态:</span>
-					<div>{{sim.account_status | simStatus}}</div>
-				</div>
-				<div>
-					<span class="simCodeTitle">套餐:</span>
-					<div>
-						<el-progress :show-text="false" :percentage="100"></el-progress>
-					</div>
-					<span>{{sim.data_plan}}</span>
-				</div>
-				<div>
-					<span class="simCodeTitle">已用流量:</span>
-					<div>
-						<template v-if="!isNaN(data_usage_Per)">
-							<el-progress :show-text="false" :percentage="data_usage_Per"></el-progress>
-						</template>
-					</div>
-					<span>{{sim.data_usage}}MB</span>
-				</div>
-				<div>
-					<span class="simCodeTitle">剩余流量:</span>
-					<div>
-						<template v-if="!isNaN(data_balance_per)">
-							<el-progress :show-text="false" :percentage="data_balance_per"></el-progress>
-						</template>
-					</div>
-					<span>{{sim.data_balance}}MB</span>
-				</div>
-				<div>
-					<span class="simCodeTitle">到期时间:</span>
-					<div>{{sim.expiry_date*1000 | formatTime}}</div>
-				</div>
-				<div class="operateBtn">
-					<el-button size="mini" @click="simCodeVisible=false">关闭</el-button>
-				</div>
-			</div>
-		</el-dialog>
-	</div>
-</template>
-<script>
-import SearchBar from '@/components/SearchBar'
-import EquipItem from '@/components/EquipItem'
-export default {
-	data() {
-		return {
-			//图表和表格切换
-			displayType: '1',
-			//设备列表
-			equipList: [],
-			role: 'admin',
-			dverGather: [
-				{ label: '全部', value: '' },
-				{ label: '版本1', value: '1' },
-				{ label: '版本2', value: '2' },
-				{ label: '版本3', value: '3' },
-				{ label: '版本4', value: '4' },
-				{ label: '版本5', value: '5' }
-			],
-			userList: [
-				{ label: '用户1', value: '用户1' },
-				{ label: '用户2', value: '用户2' }
-			],
-			d_id: '',
-			device_id: '',
-			equipContrlForm: {
-				datt: null,
-				collt: null,
-				htim: null,
-				jp: null,
-				pump_sec: null,
-				shake_sec: null,
-				st: '',
-				et: ''
-			},
-			//参数
-			queryInfo: {
-				page: 1,
-				is_online: null,
-				dver: null,
-				selectUser: '',
-				f_id: '',
-				ename: ''
-			},
-			totalNum: 0,
-			//设备控制对话框
-			equipControlDialogVisible: false,
-			operationDialogVisible: false,
-			simCodeVisible: false,
-			sim: {
-				iccid: '',
-				account_status: 0, //卡状态 0-7 未知 测试期 沉默期 使用中 停机 停机保号 预销号 销号
-				data_plan: 0, //套餐大小
-				data_usage: 0, //当月用量
-				data_balance: 0, //剩余流量
-				expiry_date: 0 //到期日期
-			}
-		}
-	},
-	mounted() {
-		this.getEquipList()
-	},
-	computed: {
-		userType: function () {
-			//获取用户类型
-			return window.sessionStorage.getItem('myuser_type')
-		},
-		data_usage_Per: function () {
-			let aa = Number(this.sim.data_usage / this.sim.data_plan) * 100
-			return aa
-		},
-		data_balance_per: function () {
-			let aa = Number(this.sim.data_balance / this.sim.data_plan) * 100
-			return aa
-		}
-	},
-	methods: {
-		getIsOnline(data) {
-			this.queryInfo.is_online = data
-			this.queryInfo.page = 1
-			this.getEquipList()
-		},
-		getIDName(data) {
-			this.queryInfo.f_id = data.f_id
-			this.queryInfo.ename = data.ename
-			this.queryInfo.page = 1
-			this.getEquipList()
-		},
-		getDisplayType(data) {
-			this.displayType = data
-		},
-		//获取设备列表
-		getEquipList() {
-			this.$axios({
-				method: 'POST',
-				url: '/api/api_gateway?method=forecast.worm_lamp.lamp_list',
-				data: this.qs.stringify({
-					device_type_id: 9,
-					page_size: 8,
-					page: this.queryInfo.page,
-					device_status: this.queryInfo.is_online,
-					device_name: this.queryInfo.ename,
-					device_id: this.queryInfo.f_id,
-					dver_num: this.queryInfo.dver
-				})
-			}).then((res) => {
-				if (res.data.message == '') {
-					this.equipList = res.data.data.data
-					this.totalNum = res.data.data.counts
-				}
-			})
-		},
-		//改变page
-		changePage(val) {
-			this.queryInfo.page = val
-			this.getEquipList()
-		},
-		// 数据详情
-		dataDetails(e_id, d_id) {
-			this.device_id = e_id
-			this.$router.push(`/index/tcDataDetail/${e_id}/${d_id}`)
-		},
-		// 查看图片
-		viewPhotoDialog(id,d_id) {
-			this.device_id = id
-			this.$router.push({path:`/index/tcDataPhotos/${id}`,query: {d_id:d_id}})
-		},
-		//设备控制
-		EquipControl(d_id) {
-			this.d_id = d_id
-			this.$axios({
-				method: 'POST',
-				url:
-					'/api/api_gateway?method=forecast.send_control.device_control_info',
-				data: this.qs.stringify({ d_id, get_type: 1 })
-			}).then((res) => {
-				console.log(res.data)
-				if (Object.keys(res.data.data).length > 0) {
-					let data = res.data.data
-					console.log(res.data.data)
-					data.st =
-						String(data.st).length == 1
-							? '0' + data.st + ':00'
-							: data.st + ':00'
-					data.et =
-						String(data.et).length == 1
-							? '0' + data.et + ':00'
-							: data.et + ':00'
-					this.equipContrlForm = data
-					console.log(data)
-				}
-				this.equipControlDialogVisible = true
-			})
-		},
-		//设备控制提交
-		equipControlSubm() {
-			// console.log(this.equipContrlForm.st)
-			let st = this.equipContrlForm.st.slice(0, 2)
-			let et = this.equipContrlForm.et.slice(0, 2)
-			st = st.indexOf('0') == 0 ? st.slice(1) : st
-			et = et.indexOf('0') == 0 ? et.slice(1) : et
-			this.$axios({
-				method: 'POST',
-				url:
-					'/api/api_gateway?method=forecast.send_control.tccbd_device_control',
-				data: this.qs.stringify({
-					device_type_id: 9,
-					d_id: this.d_id,
-					cmd: 'set',
-					datt: this.equipContrlForm.datt,
-					collt: this.equipContrlForm.collt,
-					htim: this.equipContrlForm.htim,
-					jp: this.equipContrlForm.jp,
-					pump_sec: this.equipContrlForm.pump_sec,
-					shake_sec: this.equipContrlForm.shake_sec,
-					st: st,
-					et: et
-				})
-			}).then((res) => {
-				if (res.data.message == '') {
-					this.$message.success('设备控制修改成功')
-				} else {
-					this.$message.error('设备控制修改失败')
-				}
-				this.equipControlDialogVisible = false
-			})
-		},
-		resetEquipControlDialogClosed() {
-			this.equipContrlForm = {}
-		},
-		//SIM卡
-		lookSIMCode(d_id) {
-			this.$axios({
-				method: 'POST',
-				url: '/api/api_gateway?method=forecast.send_control.device_sim',
-				data: this.qs.stringify({
-					d_id: d_id
-				})
-			}).then((res) => {
-				if (res.data.message == '') {
-					this.sim.iccid = res.data.data[0].iccid
-					this.$axios({
-						method: 'POST',
-						url: '/api/api_gateway?method=forecast.send_control.sim_query',
-						data: this.qs.stringify({
-							iccid: this.sim.iccid
-						})
-					}).then((res) => {
-						if (res.data.message == '') {
-							let data = eval('(' + res.data.data.data + ')')
-							let cardInfo = data.data.card_list[0]
-							this.sim = cardInfo
-						}
-						this.simCodeVisible = true
-					})
-				}
-			})
-		},
-		equipOperation(d_id) {
-			this.d_id = d_id
-			this.operationDialogVisible = true
-		},
-		equipBtnControl(cmd) {
-			this.$axios({
-				method: 'POST',
-				url:
-					'/api/api_gateway?method=forecast.send_control.tccbd_device_control',
-				data: this.qs.stringify({
-					cmd,
-					device_type_id: 9,
-					d_id: this.d_id
-				})
-			}).then((res) => {
-				if (res.data.message == '') {
-					this.$message.success('指令下发成功!')
-				}
-			})
-		}
-	},
-	filters: {
-		simStatus(val) {
-			switch (val) {
-				case 0:
-					return '未知'
-				case 1:
-					return '测试期'
-				case 2:
-					return '沉默期'
-				case 3:
-					return '使用中'
-				case 4:
-					return '停机'
-				case 5:
-					return '停机保号'
-				case 6:
-					return '预销号'
-				case 7:
-					return '销号'
-			}
-		}
-	},
-	components: {
-		SearchBar,
-		EquipItem
-	}
-}
-</script>
-<style lang="less" scoped>
-.handAddForm {
-	/deep/.el-form-item {
-		margin-bottom: 8px;
-	}
-	.handAddFormBtn {
-		text-align: right;
-	}
-}
-.sliderParent {
-	display: flex;
-	.block {
-		flex: 1;
-		margin-right: 10px;
-		/deep/.el-slider__runway,
-		/deep/.el-slider__bar {
-			height: 10px;
-		}
-	}
-	> span {
-		width: 40px;
-	}
-}
-.swi-box {
-	text-align: center;
-	padding: 10px 0;
-	label {
-		color: #333;
-		margin-right: 8px;
-		font-size: 14px;
-	}
-	i.el-icon-edit {
-		margin-right: 8px;
-	}
-}
-
-.real-time {
-	display: flex;
-	justify-content: left;
-	align-items: center;
-	padding: 20px 0;
-	.left {
-		margin-right: 10px;
-		.icon-box {
-			border-radius: 50%;
-			width: 46px;
-			height: 46px;
-			padding: 5px;
-			box-sizing: border-box;
-			margin-bottom: 3px;
-			img {
-				width: 100%;
-				height: auto;
-			}
-		}
-		.aisle {
-			text-align: center;
-			font-size: 14px;
-			color: #666;
-		}
-	}
-	.right {
-		color: #333;
-		.num {
-			font-weight: 600;
-			font-size: 20px;
-			margin-bottom: 3px;
-		}
-		.unit {
-			font-size: 14px;
-			color: #666;
-		}
-	}
-}
-.checkData {
-	text-align: right;
-	font-size: 14px;
-	span {
-		cursor: pointer;
-	}
-}
-.simCodeBox {
-	> div {
-		line-height: 40px;
-		display: flex;
-		align-content: center;
-		.simCodeTitle {
-			width: 100px;
-			text-align: right;
-			font-size: 14px;
-			color: #333;
-		}
-		> div {
-			flex: 1;
-			.el-progress {
-				margin-top: 17px;
-			}
-		}
-		span {
-			width: 85px;
-			font-size: 12px;
-			padding-left: 3px;
-			color: #909090;
-		}
-		.el-input {
-			width: 60%;
-		}
-	}
-	.operateBtn {
-		display: block;
-		text-align: right;
-	}
-}
-.red {
-	color: rgb(235, 103, 101);
-}
-.green {
-	color: rgb(23, 187, 137);
-}
-.el-date-editor--time-select {
-	width: 100% !important;
-}
-.el-form .line {
-	text-align: center;
-}
-.el-select {
-	width: 100%;
-}
-</style>

+ 0 - 714
bigdata2/src/pages/fourMoodBase/baseManage.vue

@@ -1,714 +0,0 @@
-<template>
-	<div>
-		<el-breadcrumb separator-class="el-icon-arrow-right">
-			<el-breadcrumb-item>基地管理</el-breadcrumb-item>
-		</el-breadcrumb>
-		<SearchBar>
-			<div slot="type-check">
-				<el-input
-					placeholder="请输入内容"
-					size="mini"
-					suffix-icon="el-icon-search"
-					v-model="search"
-					@change="searchBase"
-					clearable
-				></el-input>
-			</div>
-			<div slot="search-common">
-				<el-button type="primary" size="mini" @click="addBase('新增基地')"
-					>新增</el-button
-				>
-			</div>
-		</SearchBar>
-		<el-row :gutter="20">
-			<el-col
-				:xs="24"
-				:sm="24"
-				:md="12"
-				:lg="12"
-				:xl="8"
-				class="col-item"
-				v-for="(item, index) in baseList"
-				:key="index"
-			>
-				<el-card class="box-card boxCard">
-					<div class="baseCard">
-						<div class="baseImg">
-							<img :src="'/api/' + item.base_img" />
-						</div>
-						<div class="addBaseInfo">
-							<h2>{{ item.base_name }}</h2>
-							<div class="addBaseInfoDetails">
-								<i class="iconfont icon-yonghu11"></i>
-								<div class="caption">负责人 :</div>
-								<div>{{ item.base_charge }}</div>
-							</div>
-							<div class="addBaseInfoDetails">
-								<i class="iconfont icon-dianhua2"></i>
-								<div class="caption">电&nbsp;&nbsp;&nbsp;&nbsp;话 :</div>
-								<div>{{ item.base_phone }}</div>
-							</div>
-							<div class="addBaseInfoDetails">
-								<i class="iconfont icon-mianji"></i>
-								<div class="caption">面&nbsp;&nbsp;&nbsp;&nbsp;积 :</div>
-								<div >{{ item.base_area }}</div>
-							</div>
-							<div class="addBaseInfoDetails" >
-								<i class="iconfont icon-dingwei"></i>
-								<div class="caption">地&nbsp;&nbsp;&nbsp;&nbsp;址 :</div>
-								<div class="addr">{{ item.address || '未定位' }}</div>
-							</div>
-						</div>
-					</div>
-					<div class="baseEditBox" @click="editBase(item.id, '修改基地')">
-						<img src="@/assets/images/fourMoodBase/baseEditIcon.png" alt />
-					</div>
-					<div class="baseBtn">
-						<span class="detailBtn" @click="detailBase(item.id)">详情</span>
-						<span class="delBtn" @click="delBase(item.id)">删除</span>
-					</div>
-				</el-card>
-			</el-col>
-		</el-row>
-		<!-- 暂无数据 -->
-		<div class="expertDiagnosis_referral_units_not" v-if="baseList.length <= 0">
-			<img
-				src="@/assets/images/expertDiagnosis/zanwu.png"
-				alt
-				class="expertDiagnosis_referral_units_notImg"
-			/>
-		</div>
-		<el-pagination
-			v-if="baseList.length > 0"
-			background
-			:page-size="6"
-			layout="prev, pager, next"
-			:current-page="page"
-			:total="totalNum"
-			@current-change="changePage"
-		></el-pagination>
-		<!-- 基地新增/修改 -->
-		<el-dialog
-			:title="title"
-			:visible.sync="baseAddVisible"
-			width="30%"
-			@close="addBaseDialogClosed"
-		>
-			<el-form
-				ref="addBaseFormRef"
-				:model="addBaseInfo"
-				label-width="90px"
-				:rules="addUserFormRules"
-			>
-				<el-form-item label="基地名称 : " prop="baseName">
-					<el-input v-model="addBaseInfo.baseName"></el-input>
-				</el-form-item>
-				<el-form-item label="基地图片 : " prop="imgSrc">
-					<el-upload
-						class="avatar-uploader"
-						action
-						:auto-upload="false"
-						:show-file-list="false"
-						:on-change="changeUpload"
-					>
-						<img
-							v-if="addBaseInfo.imgSrc"
-							:src="addBaseInfo.imgSrc"
-							class="avatar"
-						/>
-						<i v-else class="el-icon-plus avatar-uploader-icon"></i>
-					</el-upload>
-				</el-form-item>
-				<el-form-item label="负责人 : " prop="principal">
-					<el-input v-model="addBaseInfo.principal"></el-input>
-				</el-form-item>
-				<el-form-item label="联系电话 : " prop="phone">
-					<el-input v-model="addBaseInfo.phone"></el-input>
-				</el-form-item>
-				<el-form-item label="面积(亩) : " prop="area">
-					<el-input v-model="addBaseInfo.area"></el-input>
-				</el-form-item>
-				<el-form-item label="绑定设备 : " prop="bindEquip">
-					<el-cascader
-						:key="addBaseInfo.cascaderKey"
-						style="width: 100%"
-						:options="addBaseInfo.cascaderEquipArr"
-						v-model="addBaseInfo.bindEquip"
-						:props="{ multiple: true, label: 'type_name', value: 'type_name' }"
-						clearable
-					></el-cascader>
-				</el-form-item>
-				<el-form-item label="基地描述 : " prop="baseIntro">
-					<el-input type="textarea" v-model="addBaseInfo.baseIntro"></el-input>
-				</el-form-item>
-				<el-form-item label="基地地址 : " prop="address" class="addressItem">
-					<el-input
-						type="text"
-						v-model="addBaseInfo.address"
-						disabled
-						placeholder="请定位"
-					></el-input>
-					<el-button type="primary" size="mini" @click="goLocation"
-						>基地定位</el-button
-					>
-				</el-form-item>
-			</el-form>
-			<span slot="footer" class="dialog-footer">
-				<el-button @click="baseAddVisible = false">取 消</el-button>
-				<el-button type="primary" @click="addBaseSubm">确认</el-button>
-			</span>
-		</el-dialog>
-		<!-- vueCropper 剪裁图片实现-->
-		<el-dialog title="图片剪裁" :visible.sync="cropperVisible" append-to-body>
-			<div class="cropper-content">
-				<div style="width: 100%; height: 500px">
-					<vueCropper
-						ref="cropper"
-						:img="option.img"
-						autoCrop
-						centerBox
-						fixed
-						:fixedNumber="option.fixedNumber"
-						:outputSize="option.size"
-						:outputType="option.outputType"
-					></vueCropper>
-				</div>
-			</div>
-			<div slot="footer" class="dialog-footer">
-				<el-button @click="cropperVisible = false">取 消</el-button>
-				<el-button type="primary" @click="finish">确认</el-button>
-			</div>
-		</el-dialog>
-		<!-- 添加定位弹框 -->
-		<el-dialog
-			class="map_dialog"
-			title="添加定位"
-			v-if="addLocationDialogVisible"
-			:visible.sync="addLocationDialogVisible"
-			width="800px"
-			@closed="addLocationDialogClosed"
-		>
-			<el-form
-				:inline="true"
-				:model="locationForm"
-				class="demo-form-inline"
-				size="mini"
-			>
-				<el-form-item label="经度">
-					<el-input v-model="locationForm.lng"></el-input>
-				</el-form-item>
-				<el-form-item label="维度">
-					<el-input v-model="locationForm.lat"></el-input>
-				</el-form-item>
-				<el-form-item>
-					<el-button type="primary" size="mini" @click="locationSearch"
-						>定位</el-button
-					>
-				</el-form-item>
-			</el-form>
-			<baidu-map
-				class="Bmap"
-				:center="center"
-				:zoom="mapZoom"
-				:scroll-wheel-zoom="true"
-				@ready="handlerBMap"
-				@click="locationPoint"
-			></baidu-map>
-			<span slot="footer" class="dialog-footer">
-				<el-button @click="addLocationDialogVisible = false">取 消</el-button>
-				<el-button type="primary" @click="addLocationSubm">确 定</el-button>
-			</span>
-		</el-dialog>
-	</div>
-</template>
-<script>
-import SearchBar from '@/components/SearchBar'
-export default {
-	data() {
-		return {
-			dialogTxt: '',
-			search: '',
-			page: 1,
-			flag: null, //编辑基地提交为1,添加基地为2
-			totalNum: null,
-			baseAddVisible: false,
-			cropperVisible: false,
-			title: '',
-			addBaseInfo: {
-				baseName: '',
-				imgSrc: '',
-				principal: '',
-				phone: '',
-				area: '',
-				cascaderKey: 0, //绑定key值,key值改变,cascader就重新渲染
-				cascaderEquipArr: [],
-				bindEquip: [],
-				baseIntro: '',
-				address: '',
-				lng: '',
-				lat: '',
-				base_id: ''
-			},
-			addUserFormRules: {
-				baseName: [
-					{ required: true, message: '请输入基地名称', trigger: 'blur' }
-				],
-				imgSrc: [
-					{ required: true, message: '请选择基地图片', trigger: 'change' }
-				],
-				principal: [
-					{ required: true, message: '请输入负责人', trigger: 'blur' }
-				],
-				phone: [{ required: true, message: '请输入联系电话', trigger: 'blur' }],
-				area: [
-					{ required: true, message: '请输入基地面积', trigger: 'change' }
-				],
-				cascaderEquipArr: [
-					{ required: true, message: '请选择基地设备', trigger: 'change' }
-				],
-				address: [
-					{ required: true, message: '请选择基地地址', trigger: 'change' }
-				]
-			},
-			// 裁剪组件的基础配置option
-			option: {
-				img:
-					'https://qn-qn-kibey-../../assets-cdn.app-echo.com/goodboy-weixin.PNG', // 裁剪图片的地址
-				info: true, // 裁剪框的大小信息
-				outputSize: 0.8, // 裁剪生成图片的质量
-				outputType: 'jpeg', // 裁剪生成图片的格式
-				// canScale: false, // 图片是否允许滚轮缩放
-				// autoCrop: true, // 是否默认生成截图框
-				// autoCropWidth: 300, // 默认生成截图框宽度
-				// autoCropHeight: 200, // 默认生成截图框高度
-				// fixedBox: true, // 固定截图框大小 不允许改变
-				fixed: true, // 是否开启截图框宽高固定比例
-				fixedNumber: [10, 7], // 截图框的宽高比例
-				full: true, // 是否输出原图比例的截图
-				canMoveBox: false, // 截图框能否拖动
-				original: false, // 上传图片按照原始比例渲染
-				centerBox: false, // 截图框是否被限制在图片里面
-				infoTrue: true // true 为展示真实输出图片宽高 false 展示看到的截图框宽高
-			},
-			baseList: [],
-			//添加基地定位
-			addLocationDialogVisible: false,
-			locationForm: {
-				lng: '',
-				lat: ''
-			},
-			center: { lng: 113.271429, lat: 23.135336 },
-			mapZoom: 6
-		}
-	},
-	components: {
-		SearchBar
-	},
-	created() {
-		this.getBaseList()
-	},
-	methods: {
-		getBaseList() {
-			this.$axios({
-				method: 'POST',
-				url: '/api/api_gateway?method=base.bases.base_list',
-				data: this.qs.stringify({
-					ret: 'list',
-					page_size: 6,
-					search: this.search,
-					page: this.page
-				})
-			}).then((res) => {
-				if (res.data.message == '') {
-					let data = res.data.data.data
-					this.baseList = []
-					data.map((item) => {
-						let lat = item.lat
-						let lng = item.lng
-						this.$axios({
-							//根据经纬度转换地址
-							methos: 'GET',
-							url: `/v3/?ak=nroAiX0Lf6ppNEGt2dBLtDkOldGCPFwF&output=json&coordtype=wgs84ll&location=${lat},${lng}`
-						}).then((res) => {
-							if (res.data.status == 0) {
-								let addressComponent = res.data.result.addressComponent
-								item.address =
-									addressComponent.province +
-									addressComponent.city +
-									addressComponent.district
-							} else {
-								item.address = ''
-							}
-							this.baseList.push(item)
-						})
-					})
-					this.totalNum = res.data.data.page_size
-				}
-			})
-		},
-		searchBase() {
-			this.page = 1
-			this.getBaseList()
-		},
-		//获取所有未绑定设备+自己已绑定的设备
-		getEquipList(id) {
-			this.$axios({
-				method: 'POST',
-				url: '/api/api_gateway?method=base.bases.base_equip',
-				data: this.qs.stringify({
-					base_id: id
-				})
-			}).then((res) => {
-				let data = res.data.data.data
-				this.addBaseInfo.cascaderEquipArr = data
-			})
-		},
-		changePage(val) {
-			this.page = val
-			this.getBaseList()
-		},
-		addBaseDialogClosed() {
-			this.$refs.addBaseFormRef.resetFields()
-			this.addBaseInfo.cascaderKey++
-			this.addBaseInfo.baseName = ''
-			this.addBaseInfo.principal = ''
-			this.addBaseInfo.phone = ''
-			this.addBaseInfo.area = ''
-			this.addBaseInfo.imgSrc = ''
-			this.addBaseInfo.cascaderEquipArr = []
-			this.addBaseInfo.bindEquip = []
-			this.addBaseInfo.baseIntro = ''
-			this.addBaseInfo.address = ''
-			this.addBaseInfo.lat = ''
-			this.addBaseInfo.lng = ''
-		},
-		//添加/删除基地
-		addBaseSubm() {
-			this.$refs.addBaseFormRef.validate((valid) => {
-				if (valid) {
-					let arr = this.addBaseInfo.bindEquip.map((item) => {
-						return item[1]
-					})
-					if (this.flag == 1) {
-						let ret = 'modify'
-						//编辑
-						this.baseFun(ret, arr, '修改成功')
-					} else if (this.flag == 2) {
-						let ret = 'add'
-						//添加
-						this.baseFun(ret, arr, '添加成功')
-					}
-				} else {
-					return false
-				}
-			})
-			this.getEquipList()
-		},
-		baseFun(ret, arr, txt) {
-			this.$axios({
-				method: 'POST',
-				url: '/api/api_gateway?method=base.bases.base_list',
-				data: this.qs.stringify({
-					ret: ret,
-					base_id: this.addBaseInfo.base_id,
-					base_name: this.addBaseInfo.baseName,
-					base_charge: this.addBaseInfo.principal,
-					base_phone: this.addBaseInfo.phone,
-					base_area: this.addBaseInfo.area,
-					base_img: this.addBaseInfo.imgSrc.slice(5), //去掉/api/
-					base_equip: arr.join('#'),
-					base_describe: this.addBaseInfo.baseIntro,
-					lng: this.addBaseInfo.lng,
-					lat: this.addBaseInfo.lat
-				})
-			}).then((res) => {
-				if (res.data.message == '') {
-					this.baseAddVisible = false
-					this.getBaseList()
-					this.$message.success(txt)
-				}
-			})
-		},
-		// 上传按钮   限制图片大小
-		changeUpload(file, fileList) {
-			const isLt5M = file.size / 1024 / 1024 < 5
-			if (!isLt5M) {
-				this.$message.error('上传文件大小不能超过 5MB!')
-				return false
-			}
-			// 上传成功后将图片地址赋值给裁剪框显示图片
-			this.$nextTick(() => {
-				this.option.img = URL.createObjectURL(file.raw)
-				this.cropperVisible = true
-			})
-		},
-		// 点击裁剪,这一步是可以拿到处理后的地址
-		finish() {
-			// 获取截图的base64 数据
-			this.$refs.cropper.getCropBlob((data) => {
-				var form = new FormData()
-				let resFile = this.blobToFile(data, 'filename.jpg')
-				form.append('img_file', resFile)
-				this.cropperVisible = false
-				this.$axios({
-					method: 'POST',
-					url: '/api/api_gateway?method=base.bases.base_photo',
-					data: form
-				}).then((res) => {
-					if (res.data.message == '') {
-						this.addBaseInfo.imgSrc = `/api/${res.data.data.src}`
-					}
-				})
-			})
-		},
-		// base64 转 Blob
-		// dataURLtoBlob(dataURI) {
-		// 	var mimeString = dataURI.split(',')[0].split(':')[1].split(';')[0] // mime类型
-		// 	var byteString = atob(dataURI.split(',')[1]) //base64 解码
-		// 	var arrayBuffer = new ArrayBuffer(byteString.length) //创建缓冲数组
-		// 	var intArray = new Uint8Array(arrayBuffer) //创建视图
-
-		// 	for (var i = 0; i < byteString.length; i++) {
-		// 		intArray[i] = byteString.charCodeAt(i)
-		// 	}
-		// 	return new Blob([intArray], { type: mimeString })
-		// },
-		//转成blob
-		blobToFile(Blob, fileName) {
-			Blob.lastModifiedDate = new Date()
-			Blob.name = fileName
-			return Blob
-		},
-		dataURLtoFile(dataurl, filename) {
-			//将base64转换为文件
-			var arr = dataurl.split(','),
-				mime = arr[0].match(/:(.*?);/)[1],
-				bstr = atob(arr[1]),
-				n = bstr.length,
-				u8arr = new Uint8Array(n)
-			while (n--) {
-				u8arr[n] = bstr.charCodeAt(n)
-			}
-			if (!!window.ActiveXObject || 'ActiveXObject' in window) {
-				// ie浏览器
-				return new Blob([u8arr.buffer], { type: mime })
-			} else {
-				//主流浏览器
-				return new File([u8arr], filename, { type: mime })
-			}
-		},
-		goLocation() {
-			this.addLocationDialogVisible = true
-		},
-		addLocationDialogClosed() {},
-		locationSearch() {},
-		handlerBMap({ BMap, map }) {
-			this.BMap = BMap
-			this.map = map
-		},
-		//在地图中点击定位
-		locationPoint(e) {
-			let { point } = e
-			this.locationForm = point
-			this.map.clearOverlays()
-			this.map.addOverlay(new BMap.Marker(point))
-		},
-		addLocationSubm() {
-			this.addBaseInfo.address = `lng:${this.locationForm.lng},lat:${this.locationForm.lat}`
-			this.addBaseInfo.lng = this.locationForm.lng
-			this.addBaseInfo.lat = this.locationForm.lat
-			this.addLocationDialogVisible = false
-		},
-		editBase(id, title) {
-			this.title = title
-			this.flag = 1
-			this.addBaseInfo.base_id = id
-			this.$axios({
-				method: 'POST',
-				url: '/api/api_gateway?method=base.bases.base_list',
-				data: this.qs.stringify({
-					ret: 'details',
-					base_id: id
-				})
-			}).then((res) => {
-				let item = res.data.data[0]
-				this.addBaseInfo.baseName = item.base_name
-				this.addBaseInfo.principal = item.base_charge
-				this.addBaseInfo.phone = item.base_phone
-				this.addBaseInfo.area = item.base_area
-				this.addBaseInfo.imgSrc = `/api/${item.base_img}`
-				this.addBaseInfo.bindEquip = item.base_equip
-				this.addBaseInfo.baseIntro = item.base_describe
-				this.addBaseInfo.address = `lng:${item.lng},lat:${item.lat}`
-				this.addBaseInfo.lat = item.lat
-				this.addBaseInfo.lng = item.lng
-				this.getEquipList(id) //获取所有未绑定和已绑定的设备
-				this.dialogTxt = '编辑基地'
-				this.baseAddVisible = true
-			})
-		},
-		addBase(title) {
-			this.title = title
-			this.flag = 2
-			this.getEquipList('')
-			this.baseAddVisible = true
-			this.dialogTxt = '新建基地'
-		},
-		delBase(id) {
-			console.log(id)
-			this.$confirm(`确定删除基地么?`, '提示', {
-				confirmButtonText: '确定',
-				cancelButtonText: '取消',
-				type: 'warning'
-			})
-				.then(() => {
-					this.$axios({
-						method: 'POST',
-						url: '/api/api_gateway?method=base.bases.base_list',
-						data: this.qs.stringify({
-							ret: 'del',
-							base_id: id
-						})
-					}).then((res) => {
-						this.getBaseList()
-						this.$message({
-							type: 'success',
-							message: '删除成功!'
-						})
-					})
-				})
-				.catch(() => {
-					this.$message({
-						type: 'info',
-						message: '已取消删除'
-					})
-				})
-		},
-		detailBase(id) {
-			this.$router.push({ path: '/index/baseShow', query: { id: id } })
-		}
-	}
-}
-</script>
-<style lang="less" scoped>
-.boxCard {
-	position: relative;
-	.baseCard {
-		display: flex;
-		.baseImg {
-			flex: 1;
-			overflow: hidden;
-			height: 160px;
-			img {
-				width: 100%;
-				height: auto;
-			}
-		}
-		.addBaseInfo {
-			flex: 1;
-			padding-left: 15px;
-			h2 {
-				font-size: 16px;
-				margin-bottom: 10px;
-				white-space: nowrap;
-				overflow: hidden;
-				text-overflow: ellipsis;
-				width: 80%;
-			}
-			.addBaseInfoDetails {
-				display: flex;
-				padding-bottom: 10px;
-				color: #525252;
-				line-height: 18px;
-				font-size: 14px;
-				i {
-					font-size: 14px;
-				}
-				.caption {
-					margin-left: 5px;
-					width: 70px;
-					flex-grow: 0;
-					flex-shrink: 0;
-					text-align: left;
-				}
-				.addr {
-					flex-grow: 1;
-					text-overflow: -o-ellipsis-lastline;
-					overflow: hidden;
-					text-overflow: ellipsis;
-					display: -webkit-box;
-					-webkit-line-clamp: 2;
-					line-clamp: 2;
-					-webkit-box-orient: vertical;
-					min-height:40px;
-				}
-			}
-		}
-	}
-	.baseEditBox {
-		position: absolute;
-		right: 20px;
-		top: 0;
-		cursor: pointer;
-		img {
-			width: 35px;
-		}
-	}
-	.baseBtn {
-		position: absolute;
-		right: 20px;
-		bottom: 10px;
-		line-height: 22px;
-		span {
-			display: inline-block;
-
-			width: 60px;
-			border-radius: 20px;
-			color: #666;
-			text-align: center;
-			cursor: pointer;
-		}
-		.delBtn {
-			background: #ddd;
-		}
-		.detailBtn {
-			background: #14a478;
-			color: #fff;
-			margin-right: 10px;
-		}
-	}
-}
-.avatar-uploader {
-	/deep/.el-upload {
-		.el-upload-dragge {
-			width: 100%;
-			height: 100%;
-		}
-	}
-}
-.col-item {
-	height: 223px;
-}
-.cropper {
-	width: auto;
-	height: 300px;
-}
-.addressItem {
-	/deep/.el-form-item__content {
-		display: flex;
-		.el-input {
-			flex: 1;
-			margin-right: 15px;
-		}
-	}
-}
-.Bmap {
-	width: 100%;
-	height: 400px;
-}
-// 暂无数据
-.expertDiagnosis_referral_units_not {
-	width: 272px;
-	margin: 0 auto;
-}
-</style>

Файловите разлики са ограничени, защото са твърде много
+ 0 - 1283
bigdata2/src/pages/fourMoodBase/baseShow.vue


+ 0 - 91
bigdata2/src/pages/hjjc/environmentMonitor/Data24.vue

@@ -1,91 +0,0 @@
-<template>
-	<div>
-		<el-breadcrumb separator-class="el-icon-arrow-right">
-			<el-breadcrumb-item>环境监测系统</el-breadcrumb-item>
-			<el-breadcrumb-item :to="{ path: '/index/envi' }">环境监测</el-breadcrumb-item>
-			<el-breadcrumb-item>24小时数据</el-breadcrumb-item>
-		</el-breadcrumb>
-		<el-card class="box-card">
-			<el-table :data="data24" stripe style="width: 100%">
-				<el-table-column prop="e" label="传感器通道"></el-table-column>
-				<el-table-column prop="name" label="通道名称"></el-table-column>
-				<el-table-column prop="min" label="最小值"></el-table-column>
-				<el-table-column prop="mintime" label="最小时间">
-					<template v-if="scope.row.mintime" slot-scope="scope">{{scope.row.mintime*1000 | formatTime}}</template>
-				</el-table-column>
-				<el-table-column prop="max" label="最大值"></el-table-column>
-				<el-table-column prop="maxtime" label="最大时间">
-               <template v-if="scope.row.maxtime" slot-scope="scope">{{scope.row.maxtime*1000 | formatTime}}</template>
-            </el-table-column>
-			</el-table>
-			<el-pagination background layout="prev, pager, next" :total="0"></el-pagination>
-		</el-card>
-	</div>
-</template>
-
-<script>
-export default {
-	data() {
-		return {
-			//24小时数据
-			data24: [],
-			id: this.$route.params.id
-		}
-	},
-	mounted() {
-		this.get24List(this.id)
-	},
-	methods: {
-		// 24小时数据
-		get24List(id) {
-			this.$axios({
-				method: 'POST',
-				url: '/api/api_gateway?method=weather.weather.qxz_day_data',
-				data: this.qs.stringify({ device_id: id })
-			}).then((res) => {
-				let arr = new Array()
-				let conf = res.data.data.conf
-				let data = res.data.data.data
-				if (conf && data && data.length > 0) {
-					for (let i = 1; i < 31; i++) {
-						for (let i1 in conf) {
-							if (i == i1.slice(1)) {
-								let obj = {}
-								if (conf[i1]) {
-									obj.e = i1
-									let arr1 = conf[i1].split('#')
-									obj.name = `${arr1[0]}(${arr1[1]})`
-									if (data) {
-										for (let item of data) {
-											if (item.ekey == i1) {
-												obj.min = item.min
-												obj.mintime = item.mintime
-												obj.max = item.max
-												obj.maxtime = item.maxtime
-											}
-										}
-										arr.push({
-											e: obj.e,
-											name: obj.name,
-											min: obj.min,
-											mintime:obj.mintime,
-											max: obj.max,
-											maxtime:obj.maxtime
-										})
-									}
-								}
-							}
-						}
-					}
-					this.data24 = arr
-				} else {
-					this.data24 = []
-				}
-			})
-		}
-	}
-}
-</script>
-
-<style lang='less' scoped>
-</style>

+ 0 - 872
bigdata2/src/pages/hjjc/environmentMonitor/EnvironmentMonitor.vue

@@ -1,872 +0,0 @@
-<template>
-	<div>
-		<el-breadcrumb separator-class="el-icon-arrow-right">
-			<el-breadcrumb-item>环境监测系统</el-breadcrumb-item>
-			<el-breadcrumb-item>环境监测</el-breadcrumb-item>
-		</el-breadcrumb>
-		<SearchBar @fun="getDisplayType" @fun2="getIDName" @fun3="getIsOnline">
-			<div slot="search-box"></div>
-		</SearchBar>
-		<template v-if="displayType==1">
-			<el-row :gutter="10">
-				<el-col
-					:xs="24"
-					:sm="24"
-					:md="12"
-					:lg="8"
-					:xl="6"
-					v-for="item in equipList"
-					:key="item.equip_id"
-				>
-					<el-card class="box-card">
-						<equip-item :is_online="Number(item.is_online)">
-							<span slot="title">环境监测</span>
-							<div slot="content" class="content">
-								<p>
-									<i class="iconfont icon-yonghu"></i>
-									设备ID:{{item.equip_id}}
-								</p>
-								<p>
-									<i class="iconfont icon-yonghu"></i>
-									设备ID:{{item.equip_name}}
-								</p>
-								<p>
-									<i class="iconfont icon-biaoqian"></i>
-									电压:{{item.volt}}
-								</p>
-								<p>
-									<i class="iconfont icon-diannao"></i>
-									信号强度:{{item.rssi}}
-								</p>
-								<p>
-									<i class="iconfont icon-shijian"></i>
-									最新上报时间 : {{item.uptime*1000 | formatTime}}
-								</p>
-								<p>
-									<i class="iconfont icon-dizhi"></i>
-									地址 : {{item.address}}
-								</p>
-								<p class="btns-right">
-									<el-button size="mini" type="info" @click="showStateDialog(item.equip_id)">实时状态</el-button>
-									<el-button size="mini" type="warning" @click="goHistoryData(item.equip_id)">历史数据</el-button>
-								</p>
-							</div>
-						</equip-item>
-					</el-card>
-				</el-col>
-			</el-row>
-		</template>
-		<template v-if="displayType==2">
-			<el-card class="box-card">
-				<el-table :data="equipList" stripe style="width: 100%">
-					<el-table-column prop="equip_id" label="设备ID" width="180"></el-table-column>
-					<el-table-column prop="equip_id" label="电压" width="180"></el-table-column>
-					<el-table-column prop="equip_id" label="信号强度"></el-table-column>
-					<el-table-column prop="uptime" label="最新上报时间">
-						<template slot-scope="scope">{{scope.row.uptime*1000 | formatTime}}</template>
-					</el-table-column>
-					<el-table-column prop="equip_id" label="地址"></el-table-column>
-					<el-table-column label="操作" width="400">
-						<template slot-scope="scope">
-							<el-button size="mini" type="info" @click="showStateDialog(scope.row.equip_id)">实时状态</el-button>
-							<el-button size="mini" type="warning" @click="goHistoryData(scope.row.equip_id)">历史数据</el-button>
-						</template>
-					</el-table-column>
-				</el-table>
-			</el-card>
-		</template>
-		<el-pagination
-			background
-			layout="prev, pager, next"
-			:total="totalNum"
-			@current-change="changePage"
-		></el-pagination>
-		<!-- 实时状态对话框 -->
-		<el-dialog title="实时状态" :visible.sync="stateDialogVisible" width="40%">
-			<el-row :gutter="20">
-				<el-col
-					:xs="24"
-					:sm="12"
-					:md="12"
-					:lg="8"
-					:xl="6"
-					v-for="(item,index) in reaTimeStatusList"
-					:key="index"
-				>
-					<div class="real-time">
-						<div class="left">
-							<div
-								:class="['icon-box','bg1']"
-								:style="{'background':bgColor[Math.floor(Math.random()*bgColor.length)]}"
-							>
-								<img :src="'/static/images/hjjc/dev/icon_'+item.icon+'.png'" />
-							</div>
-							<p class="aisle">{{item.e}}</p>
-						</div>
-						<div class="right">
-							<p class="num">{{item.num}}</p>
-							<p class="unit">
-								{{item.name}}
-								<span>{{item.unit | unitFormat}}</span>
-							</p>
-						</div>
-					</div>
-				</el-col>
-			</el-row>
-			<div class="checkData">
-				<span @click="check24Data()">查看24小时数据 >></span>
-			</div>
-		</el-dialog>
-		<!-- 手动控制对话框 -->
-		<el-dialog title="手动控制" :visible.sync="handControlDialogVisible" width="30%">
-			<template v-if="handControlSwitch.length">
-				<el-row :gutter="10">
-					<el-col
-						:xs="24"
-						:sm="24"
-						:md="12"
-						:lg="12"
-						:xl="8"
-						v-for="(item,index) in handControlSwitch"
-						:key="index"
-					>
-						<div class="swi-box">
-							<label @click="handControlModifyName(index)">
-								<i class="el-icon-edit"></i>
-								{{item.name}}
-							</label>
-							<el-switch
-								v-model="item.status"
-								active-color="#17BB89"
-								@change="handControlSwitchChange($event,index)"
-							></el-switch>
-						</div>
-					</el-col>
-				</el-row>
-			</template>
-			<template v-else>
-				<div style="text-align:center">
-					<img src="../../../assets/images/hjjc/nodata.png" />
-				</div>
-			</template>
-		</el-dialog>
-		<!-- 阈值控制对话框 -->
-		<el-dialog title="阈值控制" :visible.sync="thresholdDialogVisible" width="40%">
-			<template v-if="thresholdList.length>0">
-				<el-table :data="thresholdList" stripe style="width: 100%">
-					<el-table-column prop="name" label="名称"></el-table-column>
-					<el-table-column prop="e" label="通道号"></el-table-column>
-					<el-table-column prop="upper" label="最大值"></el-table-column>
-					<el-table-column prop="lower" label="最小值"></el-table-column>
-					<el-table-column label="状态" width="100">
-						<template slot-scope="scope">
-							<el-switch
-								v-model="scope.row.status"
-								:disabled="scope.row.isDisabled"
-								active-color="#17BB89"
-							></el-switch>
-						</template>
-					</el-table-column>
-					<el-table-column label="操作" width="100">
-						T
-						<template slot-scope="scope">
-							<el-button
-								type="primary"
-								icon="el-icon-edit"
-								size="mini"
-								@click="showThresholdEditDialog(scope.row)"
-							></el-button>
-						</template>
-					</el-table-column>
-				</el-table>
-			</template>
-			<template v-else>
-				<div style="text-align:center">
-					<img src="../../../assets/images/hjjc/nodata.png" />
-				</div>
-			</template>
-		</el-dialog>
-		<!-- 设置阈值信息弹框 -->
-		<el-dialog title="阈值设置" :visible.sync="thresholdSetDialogVisible" width="30%">
-			<el-form label-width="62px" :model="thresholdSetData">
-				<el-form-item label="最大值">
-					<el-input v-model="thresholdSetData.upper"></el-input>
-				</el-form-item>
-				<el-form-item label="最小值">
-					<el-input v-model="thresholdSetData.lower"></el-input>
-				</el-form-item>
-				<el-form-item label="规则">
-					<el-radio-group v-model="thresholdSetData.method">
-						<el-radio label="1">程序一</el-radio>
-						<el-radio label="0">程序二</el-radio>
-					</el-radio-group>
-					<p v-if="thresholdSetData.method=='1'">
-						低于下限
-						<span class="red">关闭</span> , 高于上限
-						<span class="red">开启</span>
-					</p>
-					<p v-if="thresholdSetData.method=='0'">
-						低于下限
-						<span class="red">开启</span> , 高于上限
-						<span class="red">关闭</span>
-					</p>
-				</el-form-item>
-			</el-form>
-			<span slot="footer" class="dialog-footer">
-				<el-button @click="thresholdSetDialogVisible = false">取 消</el-button>
-				<el-button type="primary" @click="thresholdSetSubm()">确 定</el-button>
-			</span>
-		</el-dialog>
-		<!-- 定时控制对话框 -->
-		<el-dialog title="定时控制" :visible.sync="timeControlDialogVisible" width="40%">
-			<template v-if="timeControlList.length>0">
-				<el-table :data="timeControlList" stripe style="width: 100%">
-					<el-table-column prop="name" label="开关"></el-table-column>
-					<el-table-column prop="StartTime" label="起始时间"></el-table-column>
-					<el-table-column prop="Duration" label="工作时长"></el-table-column>
-					<el-table-column label="状态" width="100">
-						<template slot-scope="scope">
-							<el-switch
-								v-model="scope.row.status"
-								:disabled="scope.row.isDisabled"
-								active-color="#17BB89"
-							></el-switch>
-						</template>
-					</el-table-column>
-					<el-table-column label="操作" width="100">
-						<template slot-scope="scope">
-							<el-button
-								type="primary"
-								icon="el-icon-edit"
-								size="mini"
-								@click="showTimeControlEditDialog(scope.row)"
-							></el-button>
-						</template>
-					</el-table-column>
-				</el-table>
-			</template>
-			<template v-else>
-				<div style="text-align:center">
-					<img src="../../../assets/images/hjjc/nodata.png" />
-				</div>
-			</template>
-		</el-dialog>
-		<!-- 定时控制设置对话框 -->
-		<el-dialog title="定时设置" :visible.sync="timeControlSetDialogVisible" width="28%">
-			<el-form
-				label-width="100px"
-				:model="timeControlSet"
-				:rules="timeControlSetRules"
-				ref="timeControlSetRef"
-				class="demo-dynamic"
-			>
-				<el-form-item label="起始时间" prop="StartTime">
-					<el-input v-model="timeControlSet.StartTime" placeholder="请输入起始时间"></el-input>
-					<span>时间范围(0-23)</span>
-				</el-form-item>
-				<el-form-item label="工作时长" prop="Duration">
-					<el-input v-model="timeControlSet.Duration" placeholder="请输入工作时长"></el-input>
-					<span>时间范围(1-24)</span>
-				</el-form-item>
-			</el-form>
-			<span slot="footer" class="dialog-footer">
-				<el-button @click="timeControlSetDialogVisible = false">取 消</el-button>
-				<el-button type="primary" @click="timeControlSetSubm('timeControlSetRef')">确 定</el-button>
-			</span>
-		</el-dialog>
-	</div>
-</template>
-<script>
-import SearchBar from '@/components/SearchBar'
-import EquipItem from '@/components/EquipItem'
-export default {
-	data() {
-		return {
-			displayType: 1,
-			itemId: '', //当前点开的弹框设备ID
-			//设备列表
-			equipList: [],
-			selectItem: '1', //1设备号,2用户名
-			searchVal: '',
-			//参数
-			queryInfo: {
-				is_online: '',
-				page: 1,
-				f_id: '',
-				ename: ''
-			},
-			//总设备数
-			totalNum: 0,
-			//实时状态对话框
-			stateDialogVisible: false,
-			//手动控制对话框
-			handControlDialogVisible: false,
-			//手动控制开关
-			value: false,
-			//手动控制数据
-			handControlSwitch: [],
-			//阈值控制对话框
-			thresholdDialogVisible: false,
-			//阈值设置对话框
-			thresholdSetDialogVisible: false,
-			//定时控制对话框
-			timeControlDialogVisible: false,
-			//定时控制设置对话框
-			timeControlSetDialogVisible: false,
-			//阈值数据
-			thresholdList: [],
-			//阈值设置数据
-			thresholdSetData: {
-				upper: '',
-				lower: '',
-				method: '',
-				JK: '',
-				eKey: '',
-				equip_id: ''
-			},
-			// 实时状态数据
-			reaTimeStatusList: [],
-			//定时控制
-			timeControlList: [],
-			//定时控制设置
-			timeControlSet: {
-				JK: '',
-				StartTime: 0,
-				Duration: 0
-			},
-			// 实时状态背景色
-			bgColor: ['#61b2f0', '#e86a84', '#50c05d', '#f3b00f', '#b97ec0'],
-			timeControlSetRules: {
-				StartTime: [
-					{ required: true, message: '请输入起始时间', trigger: 'blur' },
-					{ type: 'number', message: '格式不正确', trigger: 'blur' },
-					{ min: 0, max: 23, message: '大小在0-23之间', trigger: 'blur' }
-				],
-				Duration: [
-					{
-						type: 'number',
-						required: true,
-						message: '请输入工作时长',
-						trigger: 'blur'
-					},
-					{ min: 1, max: 24, message: '大小在1-24之间', trigger: 'blur' }
-				]
-			}
-		}
-	},
-	mounted() {
-		this.getEquipList()
-	},
-	methods: {
-		getIsOnline(data) {
-			this.queryInfo.is_online = data
-			this.queryInfo.page = 1
-			this.getEquipList()
-		},
-		getIDName(data) {
-			this.queryInfo.f_id = data.f_id
-			this.queryInfo.ename = data.ename
-			this.queryInfo.page = 1
-			this.getEquipList()
-		},
-		getDisplayType(data) {
-			this.displayType = data
-		},
-		//获取设备列表
-		getEquipList() {
-			this.$axios({
-				method: 'POST',
-				url: '/api/api_gateway?method=weather.weather.qxz_page',
-				data: this.qs.stringify({
-					page: this.queryInfo.page,
-					device_id: this.queryInfo.f_id,
-					device_name: this.queryInfo.ename,
-					device_status: this.queryInfo.is_online
-				})
-			})
-				.then((res) => {
-					if (res.data) {
-						this.equipList = []
-						let data = res.data.data.ids
-						data.forEach((item) => {
-							let lat = item.lat
-							let lng = item.lng
-							this.$axios({
-								methos: 'GET',
-								url: `/v3/?ak=nroAiX0Lf6ppNEGt2dBLtDkOldGCPFwF&output=json&coordtype=wgs84ll&location=${lat},${lng}`
-							}).then((res) => {
-								if (res.data.status == 0) {
-									let addressComponent = res.data.result.addressComponent
-									item.address =
-										addressComponent.province +
-										addressComponent.city +
-										addressComponent.district
-								}
-								this.equipList.push(item)
-							})
-						})
-						// console.log(this.equipList)
-						this.totalNum = Number(res.data.data.nums)
-					}
-				})
-				.catch(() => {
-					this.$message.error('获取数据失败!')
-				})
-		},
-		//改变page
-		changePage(val) {
-			this.queryInfo.page = val
-			this.getEquipList()
-		},
-		//获取手动控制开关数据
-		handControlSwitchList(id) {
-			this.$axios({
-				method: 'POST',
-				url: '/vip/qxz_status',
-				data: this.qs.stringify({ e_id: id })
-			})
-				.then((res) => {
-					if (
-						res.data.qxz_switch &&
-						eval('(' + res.data.qxz_switch + ')').length > 0
-					) {
-						let qxz_switch = eval('(' + res.data.qxz_switch + ')')
-						let arr = new Array()
-						for (let item1 of qxz_switch) {
-							let obj = {}
-							if (
-								res.data.switch_name &&
-								eval('(' + res.data.switch_name + ')').length > 0
-							) {
-								let switch_name = eval('(' + res.data.switch_name + ')')
-								for (let item2 of switch_name) {
-									if (item1.JK == item2.JK) {
-										if (item2.name) {
-											obj.name = item2.name
-										} else {
-											obj.name = `开关${Number(item1.JK) + 1}`
-										}
-										obj.status = item1.status
-									}
-								}
-							} else {
-								obj.name = `开关${Number(item1.JK) + 1}`
-								obj.status = item1.status
-							}
-							arr.push({
-								name: obj.name,
-								status: obj.status
-							})
-						}
-						this.handControlSwitch = arr
-					} else {
-						this.handControlSwitch = []
-					}
-				})
-				.catch(() => {
-					this.$message.error('获取数据失败!')
-				})
-		},
-		//获取实时状态列表
-		getReaTimeStatusList(id) {
-			this.$axios({
-				method: 'POST',
-				url: '/api/api_gateway?method=weather.weather.qxz_status',
-				data: this.qs.stringify({ device_id: id })
-			})
-				.then((res) => {
-					if (res.data.data) {
-						let arr = new Array()
-						let conf = res.data.data.conf
-						let dat = res.data.data.dat
-						for (let i1 in conf) {
-							if (conf[i1]) {
-								let arr2 = conf[i1].split('#')
-								let obj = {}
-								obj.e = '通道' + i1.slice(1)
-								obj.name = arr2[0]
-								obj.unit = arr2[1]
-								for (let i2 in dat) {
-									if (i1 == i2) {
-										let arr3 = dat[i2].split('#')
-										obj.num = arr3[0]
-										obj.icon = arr3[1]
-										arr.push(obj)
-									}
-								}
-							}
-						}
-						this.reaTimeStatusList = arr
-					}
-				})
-				.catch(() => {
-					this.$message.error('获取数据失败!')
-				})
-		},
-		//修改设备名称
-		modifyName() {
-			this.$prompt('', '修改名字', {
-				confirmButtonText: '确定',
-				cancelButtonText: '取消'
-			})
-				.then(({ value }) => {
-					if (value) {
-						this.$message({
-							type: 'success',
-							message: '修改成功'
-						})
-					} else {
-						this.$message({
-							type: 'info',
-							message: '内容不能为空'
-						})
-					}
-				})
-				.catch(() => {
-					this.$message({
-						type: 'info',
-						message: '取消输入'
-					})
-				})
-		},
-		// 实时状态弹框
-		showStateDialog(id) {
-			this.stateDialogVisible = true
-			this.itemId = id
-			this.getReaTimeStatusList(id)
-		},
-		// 手动控制弹框
-		showHandControlDialog(id) {
-			this.handControlDialogVisible = true
-			this.itemId = id
-			this.handControlSwitchList(id)
-		},
-		//阈值控制
-		showThresholdDialog(id) {
-			this.thresholdDialogVisible = true
-			this.itemId = id
-			this.$axios({
-				method: 'POST',
-				url: 'qxz_status',
-				data: this.qs.stringify({ e_id: id })
-			}).then((res) => {
-				if (
-					res.data.auto_list &&
-					eval('(' + res.data.auto_list + ')').length > 0
-				) {
-					//排除""和"[]"
-					let arr = eval('(' + res.data.auto_list + ')') //阈值数据
-					let qxz_switch = eval('(' + res.data.qxz_switch + ')') //开关数据,为了获取开关状态
-					let dat = res.data.dat
-					this.thresholdList = []
-					for (let item of arr) {
-						let obj = {}
-						if (item.Jk != 255) {
-							//排除JK=255
-							let ek = `e${Number(item.eKey) + 1}`
-							if (dat[ek]) {
-								//在dat里找dat[ek],如果没有值,排除
-								if (item.upper == 32767 || item.lower == 32767) {
-									obj.upper = '--'
-									obj.lower = '--'
-									obj.isDisabled = true //阈值禁用
-								} else {
-									obj.upper = item.upper
-									obj.lower = item.lower
-									obj.isDisabled = false //阈值开启
-								}
-
-								obj.e = `通道${ek}`
-								obj.method = item.method //规则,0为程序二,1为程序一
-								obj.JK = item.JK
-								obj.eKey = item.eKey
-
-								for (let item3 of qxz_switch) {
-									if (item3.JK == item.JK) {
-										obj.status = item3.status == 0 ? false : true //开关状态
-										if (
-											res.data.switch_name &&
-											eval('(' + res.data.switch_name + ')').length > 0
-										) {
-											let switch_name = eval('(' + res.data.switch_name + ')') //重命名的按钮数据
-											for (let item2 of switch_name) {
-												if (item2.JK == item.JK) {
-													// console.log(item2.JK);
-													obj.name = item2.name //开关重命名
-													this.thresholdList.push(obj) //阈值控制数据
-												}
-											}
-										} else {
-											obj.name = `开关${item3.JK}`
-											this.thresholdList.push(obj) //阈值控制数据
-										}
-									}
-								}
-							}
-						}
-					}
-				} else {
-					this.thresholdList = []
-				}
-				console.log(this.thresholdList)
-			})
-		},
-		//阈值设置
-		showThresholdEditDialog(data) {
-			this.thresholdSetData.upper = data.upper
-			this.thresholdSetData.lower = data.lower
-			this.thresholdSetData.method = data.method.toString()
-			this.thresholdSetData.JK = data.JK
-			this.thresholdSetData.eKey = data.eKey
-			this.thresholdSetDialogVisible = true
-		},
-		//阈值设置提交
-		thresholdSetSubm() {
-			this.$axios({
-				method: 'POST',
-				url: '/qxz_value_mqtt',
-				data: this.qs.stringify({
-					JK: this.thresholdSetData.JK,
-					eKey: this.thresholdSetData.eKey,
-					upper: this.thresholdSetData.upper,
-					lower: this.thresholdSetData.lower,
-					method: this.thresholdSetData.method,
-					equip_id: this.itemId
-				})
-			}).then((res) => {
-				this.$message({
-					message: '提交成功!',
-					type: 'success'
-				})
-				this.thresholdSetDialogVisible = false
-			})
-		},
-		//定时控制
-		showTimeControlDialog(id) {
-			this.itemId = id
-			this.timeControlDialogVisible = true
-			this.$axios({
-				method: 'POST',
-				url: '/qxz_status',
-				data: this.qs.stringify({ e_id: id })
-			}).then((res) => {
-				if (
-					res.data.timing_list &&
-					eval('(' + res.data.timing_list + ')').length > 0
-				) {
-					let timing_list = eval('(' + res.data.timing_list + ')')
-					let qxz_switch = eval('(' + res.data.qxz_switch + ')')
-					this.timeControlList = []
-					for (let item of timing_list) {
-						let obj = {}
-						for (let item2 of qxz_switch) {
-							if (item.StartTime == 32767 || item.Duration == 32767) {
-								obj.StartTime = '--'
-								obj.Duration = '--'
-								obj.isDisabled = true
-							} else {
-								obj.StartTime = item.StartTime
-								obj.Duration = item.Duration
-								obj.isDisabled = false
-							}
-							obj.status = item2.status
-							obj.JK = item.JK
-							if (
-								res.data.switch_name &&
-								eval('(' + res.data.switch_name + ')').length > 0
-							) {
-								//判断是否有重命名
-								let switch_name = eval('(' + res.data.switch_name + ')')
-								for (let item3 of switch_name) {
-									if (item3.JK == item2.JK && item3.JK == item.JK) {
-										obj.name = item3.name
-										this.timeControlList.push(obj)
-									}
-								}
-							} else {
-								if (item.JK == item2.JK) {
-									obj.name = `开关${item.JK}`
-									this.timeControlList.push(obj)
-								}
-							}
-						}
-					}
-				} else {
-					this.timeControlList = []
-				}
-			})
-		},
-		//定时设置
-		showTimeControlEditDialog(data) {
-			this.timeControlSetDialogVisible = true
-			this.timeControlSet.JK = data.JK
-			this.timeControlSet.StartTime = data.StartTime
-			this.timeControlSet.Duration = data.Duration
-		},
-		//定时设置提交
-		timeControlSetSubm(ref) {
-			//表单验证
-			this.$refs[ref].validate((valid) => {
-				if (valid) {
-					this.$axios({
-						method: 'POST',
-						url: '/qxz_timing_mqtt',
-						data: this.qs.stringify({
-							JK: this.timeControlSet.JK,
-							StartTime: this.timeControlSet.StartTime,
-							Duration: this.timeControlSet.Duration,
-							equip_id: this.itemId
-						})
-					}).then((res) => {
-						this.$message({
-							message: '提交成功!',
-							type: 'success'
-						})
-						this.timeControlSetDialogVisible = false
-					})
-				} else {
-					console.log('error submit!!')
-					return false
-				}
-			})
-		},
-		//跳转到历史数据页面
-		goHistoryData(id) {
-			this.itemId = id
-			this.$router.push(`/index/historyData/${id}`)
-		},
-		//手动控制自定义名称
-		handControlModifyName(index) {
-			this.$prompt('', '自定义名称', {
-				confirmButtonText: '确定',
-				cancelButtonText: '取消'
-			})
-				.then(({ value }) => {
-					this.$axios({
-						method: 'POST',
-						url: '/qxz_switch_name',
-						data: this.qs.stringify({
-							imei: this.itemId,
-							way: index,
-							sw_name: value
-						})
-					}).then(() => {
-						this.$message({
-							type: 'success',
-							message: '自定义名称是: ' + value
-						})
-						this.handControlSwitch[index].name = value
-					})
-				})
-				.catch(() => {
-					this.$message({
-						type: 'info',
-						message: '取消输入'
-					})
-				})
-		},
-		//手动控制修改swicth
-		handControlSwitchChange(val, index) {
-			let id = this.itemId
-			this.$axios({
-				method: 'POST',
-				url: '/qxz_switch',
-				data: this.qs.stringify({
-					imei: id,
-					req: 'set',
-					way: index,
-					switch: val ? '1' : '0'
-				})
-			})
-		},
-		//查看24小时数据
-		check24Data(id) {
-			this.$router.push(`/index/data24/${this.itemId}`)
-		}
-	},
-	components: {
-		SearchBar,
-		EquipItem
-	},
-	filters: {
-		unitFormat(value) {
-			return `(${value})`
-		}
-	}
-}
-</script>
-<style lang="less" scoped>
-.swi-box {
-	text-align: center;
-	padding: 10px 0;
-	label {
-		color: #333;
-		margin-right: 8px;
-		font-size: 14px;
-	}
-	i.el-icon-edit {
-		margin-right: 8px;
-	}
-}
-.search-box {
-	text-align: right;
-	.el-input {
-		width: 300px;
-	}
-	margin-bottom: 10px;
-}
-.real-time {
-	display: flex;
-	justify-content: left;
-	align-items: center;
-	padding: 20px 0;
-	.left {
-		margin-right: 10px;
-		.icon-box {
-			border-radius: 50%;
-			width: 46px;
-			height: 46px;
-			padding: 5px;
-			box-sizing: border-box;
-			margin-bottom: 3px;
-			img {
-				width: 100%;
-				height: auto;
-			}
-		}
-		.aisle {
-			text-align: center;
-			font-size: 14px;
-			color: #666;
-		}
-	}
-	.right {
-		color: #333;
-		.num {
-			font-weight: 600;
-			font-size: 20px;
-			margin-bottom: 3px;
-		}
-		.unit {
-			font-size: 14px;
-			color: #666;
-		}
-	}
-}
-.checkData {
-	text-align: right;
-	font-size: 14px;
-	span {
-		cursor: pointer;
-	}
-}
-.demo-dynamic .el-input {
-	margin-right: 10px;
-	width: 270px;
-	vertical-align: top;
-}
-.red {
-	color: red;
-	padding: 0 2px;
-}
-</style>

+ 0 - 381
bigdata2/src/pages/hjjc/environmentMonitor/HistoryData.vue

@@ -1,381 +0,0 @@
-<template>
-	<div>
-		<el-breadcrumb separator-class="el-icon-arrow-right">
-			<el-breadcrumb-item>环境监测系统</el-breadcrumb-item>
-			<el-breadcrumb-item :to="{ path: '/index/envi' }">环境监测</el-breadcrumb-item>
-			<el-breadcrumb-item>历史数据</el-breadcrumb-item>
-		</el-breadcrumb>
-		<div class="check-btns">
-			<div class="type-check">
-				<el-button :type="0==display?'primary':'default'" size="mini" @click="displayCheck(0)">表格</el-button>
-				<el-button :type="1==display?'primary':'default'" size="mini" @click="displayCheck(1)">图表</el-button>
-			</div>
-			<DateSearch @dateChange="dateChange"></DateSearch>
-		</div>
-		<el-card class="box-card" v-if="showControl">
-			<el-table :data="hisData" stripe style="width: 100%">
-				<el-table-column
-					v-for="(item,index) in tableHead"
-					:key="index"
-					:width="item.property=='date'?'160px':''"
-					:label="item.label"
-					:prop="item.property"
-				>
-					<template slot-scope="scope">{{scope.row[scope.column.property]}}</template>
-				</el-table-column>
-			</el-table>
-			<el-pagination
-				background
-				layout="prev, pager, next"
-				:total="total"
-				:current-page="queryInfo.page"
-				@current-change="changePage"
-			></el-pagination>
-		</el-card>
-		<div v-if="!showControl">
-			<div v-if="isEchartData">
-				<el-row :gutter="10">
-					<el-col
-						:xs="24"
-						:sm="24"
-						:md="12"
-						:lg="8"
-						:xl="6"
-						v-for="(item,index) in echartOptions"
-						:key="index"
-					>
-						<el-card class="box-card">
-							<highcharts :options="item"></highcharts>
-							<!-- <chart ref="chart1" :options="item" :auto-resize="true"></chart> -->
-						</el-card>
-					</el-col>
-				</el-row>
-			</div>
-			<div v-else>
-				<el-card class="box-card">
-					<p style="text-align:center">暂无数据!</p>
-				</el-card>
-			</div>
-		</div>
-	</div>
-</template>
-
-<script>
-import DateSearch from '@/components/DateSearch'
-export default {
-	data() {
-		return {
-			//总数据条数
-			total: 0,
-			queryInfo: {
-				begin: '',
-				end: '',
-				device_id: this.$route.params.id,
-				page: 1
-			},
-			//图表实时否有数据
-			isEchartData: true,
-			//表格和图表按钮样式切换参数
-			display: '0', //0代表表格、1代表图表
-			// 表格和图表显示切换控制
-			showControl: true,
-			//echarts图表参数
-			echartOptions: [],
-			// 动态表头
-			tableHead: [],
-			// 表格数据
-			hisData: []
-		}
-	},
-	methods: {
-		//获取历史数据
-		getHisDataList() {
-			this.$axios({
-				method: 'POST',
-				url: '/api/api_gateway?method=weather.weather.qxz_detail',
-				data: this.qs.stringify({
-					 start_time:this.queryInfo.begin,
-					 end_time:this.queryInfo.end,
-					 page:this.queryInfo.page,
-					 device_id:this.queryInfo.device_id
-				})
-			}).then((res) => {
-				this.total = Number(res.data.data.nums)
-				if (res.data.data.nums > 0) {
-					let arr1 = [{ label: '日期', property: 'date' }]
-					let arr2 = []
-					let conf = res.data.data.conf
-					let data = res.data.data.data
-					for (let i in conf) {
-						let obj = {}
-						if (conf[i]) {
-							let arr = conf[i].split('#')
-							obj.label = `${arr[0]}(${arr[1]})`
-							obj.property = i
-							arr1.push(obj)
-						}
-					}
-					this.tableHead = arr1
-					for (let item of data) {
-						let obj = {}
-						obj.date = this.formatTime(item.time * 1000)
-						for (let i1 in item.dat) {
-							if (item.dat[i1]) {
-								obj[i1] = item.dat[i1].split('#')[0]
-							}
-						}
-						arr2.push(obj)
-					}
-					this.hisData = arr2
-				}else{
-					this.hisData = []
-				}
-			})
-		},
-		//获取图表历史数据
-		getEchartsHisDataList() {
-			this.$axios({
-				method: 'POST',
-				url: '/api/api_gateway?method=weather.weather.qxz_data_chart',
-				data: this.qs.stringify({
-					begin: this.queryInfo.begin,
-					end: this.queryInfo.end,
-					device_id: this.queryInfo.device_id
-				})
-			})
-				.then((res) => {
-					this.echartsFn(res.data.data)
-				})
-				.catch((err) => {
-					console.log(err)
-				})
-		},
-		echartsFn(data) {
-			let conf = data.conf
-			let eData = data.data
-			let ChartData = []
-			if (conf && eData && eData.length > 0) {
-				this.isEchartData = true
-				for (let i in conf) {
-					if (conf[i]) {
-						//判断是否有值
-						ChartData.push({
-							name: i,
-							tit: conf[i].split('#')[0],
-							unit: conf[i].split('#')[1],
-							dat: []
-						})
-					}
-				}
-				for (let m of eData) {
-					//m是对象
-					for (let n in m.dat) {
-						//dat是对象 n是key
-						for (let j of ChartData) {
-							//j是对象
-							if (j.name == n) {
-								j.dat.push([
-									m.time * 1000 + 8 * 3600000,
-									Number(m.dat[n].split('#')[0])
-								])
-							}
-						}
-					}
-				}
-			}else{
-				this.isEchartData = false
-			}
-			console.log(ChartData)
-			this.echartOptions = ChartData.map((item) => {
-				return this.OptionFn(item)
-			})
-			console.log(this.echartOptions)
-		},
-		OptionFn(item) {
-			return {
-				title: {
-					text: item.tit,
-					align: 'left'
-				},
-				subtitle: {
-					text: ''
-				},
-				xAxis: {
-					crosshair: true, //十字基准线
-					type: 'datetime',
-					dateTimeLabelFormats: {
-						//根据时间间距X轴自动显示哪种格式
-						millisecond: '%H:%M:%S.%L',
-						second: '%H:%M:%S',
-						minute: '%H:%M',
-						hour: '%H:%M',
-						day: '%m-%d',
-						week: '%m-%d',
-						month: '%Y-%m',
-						year: '%Y'
-					}
-				},
-				yAxis: {
-					title: { text: '' }
-				},
-				legend: {
-					// layout: 'vertical',
-					align: 'right',
-					verticalAlign: 'top'
-				},
-				plotOptions: {
-					series: {
-						label: {
-							connectorAllowed: false
-						},
-						pointStart: 2010 //该参数定义了数据点的起点
-					}
-				},
-				series: [
-					{
-						name: item.name,
-						data: item.dat
-					}
-				],
-				colors: ['#00e29d', '#6cbbff', '#ff3f3f'],
-				credits: {
-					//去掉默认的highcharts.com
-					enabled: false
-				},
-				tooltip: {
-					// crosshairs: true,
-					shared: true, //折线共享
-					headerFormat: '<b>{point.x:%Y-%m-%e %H:%M:%S}</b><br>',
-					pointFormatter:function(){
-						return item.tit+":"+this.y+item.unit
-					}
-				},
-				responsive: {
-					rules: [
-						{
-							condition: {
-								maxWidth: 500
-							},
-							chartOptions: {
-								legend: {
-									layout: 'horizontal',
-									align: 'center',
-									verticalAlign: 'bottom'
-								}
-							}
-						}
-					]
-				}
-			}
-		},
-		optionEchart(title, legend, time, seriesData) {
-			return {
-				color: ['#17BB89'],
-				title: {
-					text: title
-				},
-				tooltip: {
-					trigger: 'axis'
-				},
-				legend: {
-					data: legend.data
-				},
-				grid: {
-					left: '0',
-					right: '0',
-					bottom: '0',
-					height: '80%',
-					containLabel: true
-				},
-				xAxis: {
-					type: 'category',
-					axisTick: {
-						show: false //x轴分割线
-					},
-					axisLabel: {
-						color: '#C1C1C1'
-					},
-					axisLine: {
-						lineStyle: {
-							color: '#C1C1C1',
-							type: 'dashed'
-						}
-					},
-					data: time
-				},
-				yAxis: {
-					type: 'value',
-					axisTick: {
-						show: false
-					},
-					axisLine: {
-						show: false
-					},
-					splitLine: {
-						show: true,
-						lineStyle: {
-							color: '#C1C1C1',
-							type: 'dashed'
-						}
-					},
-					axisLabel: {
-						color: '#C1C1C1'
-					}
-				},
-				series: [
-					{
-						name: legend.data[0],
-						data: seriesData.data,
-						type: 'line'
-					}
-				]
-			}
-		},
-		//表格和图表切换
-		displayCheck(a) {
-			this.display = a
-			if (a == 0) {
-				this.showControl = true
-				this.getHisDataList()
-			} else if (a == 1) {
-				this.showControl = false
-				this.getEchartsHisDataList() //渲染echarts
-			}
-		},
-		//改变page
-		changePage(val) {
-			this.queryInfo.page = val
-			this.getHisDataList()
-		},
-		dateChange(data) {
-			this.queryInfo.page = 1
-			this.queryInfo.begin = data.begin
-			this.queryInfo.end = data.end
-			if (this.display == 0) {
-				this.getHisDataList()
-			} else if (this.display == 1) {
-				this.getEchartsHisDataList()
-			}
-		}
-	},
-	components: {
-		DateSearch
-	}
-}
-</script>
-
-<style lang='less' scoped>
-.check-btns {
-	display: flex;
-	justify-content: space-between;
-	margin-bottom: 15px;
-}
-.echarts {
-	width: 100%;
-	height: 300px;
-}
-//时间段选择框的宽度
-.el-date-editor--daterange.el-input__inner {
-	width: 220px;
-}
-</style>

+ 0 - 18
bigdata2/src/pages/systemmanger/AgentDistribute.vue

@@ -1,18 +0,0 @@
-<template>
-   <div>
-        <el-breadcrumb separator-class="el-icon-arrow-right">
-            <el-breadcrumb-item>系统管理</el-breadcrumb-item>
-            <el-breadcrumb-item>代理商分配</el-breadcrumb-item>
-        </el-breadcrumb>
-   </div>
-</template>
-
-<script>
-   export default {
-
-   }
-</script>
-
-<style lang='less' scoped>
-
-</style>

+ 0 - 18
bigdata2/src/pages/systemmanger/CbdDistinguish.vue

@@ -1,18 +0,0 @@
-<template>
-   <div>
-       <el-breadcrumb separator-class="el-icon-arrow-right">
-            <el-breadcrumb-item>系统管理</el-breadcrumb-item>
-            <el-breadcrumb-item>测报灯识别</el-breadcrumb-item>
-        </el-breadcrumb>
-   </div>
-</template>
-
-<script>
-   export default {
-
-   }
-</script>
-
-<style lang='less' scoped>
-
-</style>

+ 0 - 170
bigdata2/src/pages/systemmanger/DayRecord.vue

@@ -1,170 +0,0 @@
-<template>
-	<div>
-		<el-breadcrumb separator-class="el-icon-arrow-right">
-			<el-breadcrumb-item>系统管理</el-breadcrumb-item>
-			<el-breadcrumb-item>日志管理</el-breadcrumb-item>
-		</el-breadcrumb>
-		<div class="searchBox">
-			<el-input placeholder="请输入用户名" size="mini" suffix-icon="el-icon-search" v-model="userName"></el-input>
-			<el-date-picker
-				size="mini"
-				v-model="timeRange"
-				type="daterange"
-				range-separator="至"
-				start-placeholder="开始日期"
-				end-placeholder="结束日期"
-				@change="DateChange"
-			></el-date-picker>
-		</div>
-		<el-card class="box-card">
-			<el-table :data="tableData" stripe style="width: 100%" empty-text="暂无数据">
-				<el-table-column prop="log_time" label="时间"></el-table-column>
-				<el-table-column prop="log_user" label="用户"></el-table-column>
-				<el-table-column prop="log_ip" label="用户IP"></el-table-column>
-				<el-table-column prop="log_desc" label="操作记录"></el-table-column>
-			</el-table>
-			<el-pagination
-				background
-				layout="prev, pager, next"
-				:total="nums"
-				:current-page="page"
-				@current-change="changePage"
-			></el-pagination>
-		</el-card>
-	</div>
-</template>
-
-<script>
-import '@/plugin/flexible.js'
-export default {
-	data() {
-		return {
-			timeRange: '',
-			userName: '',
-			page: 1,
-			// totalNum: 20,
-			tableData: [],
-			fullHeight: document.documentElement.clientHeight, //自适应高度
-			nums: 1,
-			Str: '', //转换后的开始时间
-			end: '' //转换后的结束时间
-		}
-	},
-	watch: {
-		fullHeight(val) {
-			//监控浏览器高度变化
-			if (!this.timer) {
-				this.fullHeight = val
-				this.timer = true
-				let that = this
-				setTimeout(function () {
-					//防止过度调用监测事件,导致卡顿
-					that.timer = false
-				}, 400)
-			}
-		}
-	},
-	methods: {
-		//动态获取浏览器高度
-		get_boderHeight() {
-			const that = this
-			window.onresize = () => {
-				return (() => {
-					window.fullHeight = document.documentElement.clientHeight
-					that.fullHeight = window.fullHeight - 128
-					console.log(that.fullHeight)
-				})()
-			}
-		},
-		// 时间筛选请求数据
-		DateChange() {
-			// 开始时间
-			let date = new Date(this.timeRange[0])
-			let Str =
-				date.getFullYear() +
-				'-' +
-				(date.getMonth() + 1) +
-				'-' +
-				date.getDate() +
-				' ' +
-				date.getHours() +
-				':' +
-				date.getMinutes() +
-				':' +
-				date.getSeconds()
-			Str = Str.replace(' 0:0:0', '')
-			this.Str = Str
-
-			// 结束时间
-			let dateA = new Date(this.timeRange[1])
-			let end =
-				dateA.getFullYear() +
-				'-' +
-				(dateA.getMonth() + 1) +
-				'-' +
-				dateA.getDate() +
-				' ' +
-				dateA.getHours() +
-				':' +
-				dateA.getMinutes() +
-				':' +
-				dateA.getSeconds()
-			end = end.replace(' 0:0:0', '')
-			this.end = end
-
-			this.listData(1, this.userName, Str, end)
-		},
-
-		// 点击下一页请求数据
-		changePage(e) {
-			var Str = this.Str
-			var end = this.end
-			this.listData(e, this.userName, Str, end)
-		},
-
-		//列表数据请求
-		listData(page, uname, time_begin, time_end) {
-			let that = this
-			let postData = that.qs.stringify({
-				page: page, //页数
-				uname: uname, //用户名
-				time_begin: time_begin, //开始时间
-				time_end: time_end //结束时间
-			})
-			that
-				.$axios({
-					method: 'post',
-					url:
-						'api/api_gateway?method=pest.warning_record.log_list',
-					data: postData
-				})
-				.then((res) => {
-					console.log(res.data.data)
-					var data = res.data.data
-					that.tableData = data.data
-					var num = data.nums
-					that.nums = num
-				})
-				.catch((err) => {
-					console.log(err)
-				})
-		}
-	},
-	created() {},
-	mounted() {
-		this.get_boderHeight() //自适应
-		this.listData(this.page, '', '', '') //列表数据请求
-	}
-}
-</script>
-
-<style lang='less' scoped>
-.searchBox {
-	display: flex;
-	margin-bottom: 20px;
-	.el-input {
-		width: 222px;
-		margin-right: 20px;
-	}
-}
-</style>

+ 0 - 314
bigdata2/src/pages/systemmanger/Role.vue

@@ -1,314 +0,0 @@
-<template>
-   <div>
-      <el-breadcrumb separator-class="el-icon-arrow-right">
-         <el-breadcrumb-item>系统管理</el-breadcrumb-item>
-         <el-breadcrumb-item>角色管理</el-breadcrumb-item>
-      </el-breadcrumb> 
-       <el-card>
-         <!-- 添加角色按钮 -->
-         <el-row>
-            <el-col>
-               <el-button type="primary" @click="AddRoleDialogVisible=true">添加角色</el-button>
-            </el-col>
-         </el-row>
-              <!-- 角色列表 -->
-         <el-table :data="roleList" border stripe>
-         <!-- 索引列 -->
-         <el-table-column type="index" label="#"></el-table-column>
-         <el-table-column label="角色名称" prop="role_name"></el-table-column>
-         <el-table-column label="角色描述" prop="role_message"></el-table-column>
-         <el-table-column label="操作" width="300px">
-            <template slot-scope="scope">
-               <el-button type="primary" icon="el-icon-edit" size="mini" @click="showEditDialog(scope.row)">编辑</el-button>
-               <el-button type="danger" icon="el-icon-delete" size="mini" @click="removeRoleById(scope.row)">删除</el-button>
-               <el-button
-               type="warning"
-               icon="el-icon-setting"
-               size="mini"
-               @click="showSetRightDialog(scope.row)"
-               >分配权限</el-button>
-            </template>
-         </el-table-column>
-         </el-table>
-       </el-card>
-      <!-- 添加角色对话框 -->
-      <el-dialog title="添加角色" :visible.sync="AddRoleDialogVisible" width="40%" @close="addRoleDialogClosed">
-         <el-form
-         :model="addRoleForm"
-         ref="addRoleFormRef"
-         :rules="addRoleFormRules"
-         label-width="100px"
-         >
-         <el-form-item label="角色名称" prop="roleName">
-            <el-input v-model="addRoleForm.roleName"></el-input>
-         </el-form-item>
-         <el-form-item label="角色描述" prop="roleDesc">
-            <el-input v-model="addRoleForm.roleDesc"></el-input>
-         </el-form-item>
-         </el-form>
-         <span slot="footer" class="dialog-footer">
-         <el-button @click="AddRoleDialogVisible = false">取 消</el-button>
-         <el-button type="primary" @click="addRoles">确 定</el-button>
-         </span>
-      </el-dialog>
-      <!-- 编辑角色对话框 -->
-      <el-dialog title="编辑角色" :visible.sync="editRoleDialogVisible" width="40%" @close="editRoleDialogClosed">
-         <el-form
-         :model="editRoleForm"
-         ref="editRoleFormRef"
-         :rules="editRoleFormRules"
-         label-width="100px"
-         >
-         <el-form-item label="角色名称" prop="roleName">
-            <el-input v-model="editRoleForm.roleName"></el-input>
-         </el-form-item>
-         <el-form-item label="角色描述" prop="roleDesc">
-            <el-input v-model="editRoleForm.roleDesc"></el-input>
-         </el-form-item>
-         </el-form>
-         <span slot="footer" class="dialog-footer">
-         <el-button @click="editRoleDialogVisible = false">取 消</el-button>
-         <el-button type="primary" @click="editRoles">确 定</el-button>
-         </span>
-      </el-dialog>
-      <!-- 分配权限 -->
-      <el-dialog
-         title="分配权限"
-         :visible.sync="setRightDialogVisible"
-         width="50%"
-         @close="setRightDialogClosed"
-      >
-         <el-tree
-         :data="rightsList"
-         :props="treeProps"
-         ref="treeRef"
-         show-checkbox
-         node-key="pur_id"
-         default-expand-all
-         :default-checked-keys="defKeys"
-         ></el-tree>
-         <span slot="footer" class="dialog-footer">
-         <el-button @click="setRightDialogVisible = false">取 消</el-button>
-         <el-button type="primary" @click="allotRights">确 定</el-button>
-         </span>
-      </el-dialog>
-   </div>
-</template>
-
-<script>
-   export default {
-      data(){
-         return {
-            AddRoleDialogVisible:false,
-            editRoleDialogVisible:false,
-            setRightDialogVisible:false,
-            roleList:[],
-            rightsList:[],
-            // 当前即将分配权限的Id
-            roleId:'',
-            //  树形控件的属性绑定对象
-            treeProps: {
-               label: 'purview_name',
-               children: 'children'
-            },
-            //  默认选中节点ID值
-            defKeys: [],
-            // 添加角色表单
-            addRoleForm: {
-               roleName:'',
-               roleDesc:''
-            },
-            // 添加角色表单验证
-            addRoleFormRules: {
-               roleName: [
-                  { required: true, message: '请输入角色名称', trigger: 'blur' }
-               ],
-               roleDesc: [
-                  { required: true, message: '请输入角色描述', trigger: 'blur' }
-               ]
-            },
-            // 编辑角色信息
-            editId:'',
-            editRoleForm: {
-               roleName:'',
-               roleDesc:''
-            },
-            editRoleFormRules: {
-               roleName: [
-                  { required: true, message: '请输入角色名称', trigger: 'blur' }
-               ],
-               roleDesc: [
-                  { required: true, message: '请输入角色描述', trigger: 'blur' }
-               ]
-            },
-         }
-      },
-      created(){
-         this.getRoleList();
-      },
-      methods:{
-         getRoleList(){
-            this.$axios({
-               method:'POST',
-               url:'/api/api_gateway?method=user.perms.role_list'
-            }).then(res=>{
-               if(res.data.message==""){
-                  this.roleList=res.data.data;
-               }
-            })
-         },
-         showEditDialog(row){
-            this.editId=row.role_id;
-            this.$axios({
-               method:'POST',
-               url:'/api/api_gateway?method=user.perms.role_list',
-               data:this.qs.stringify({
-                  role_id:row.role_id,
-               })
-            }).then(res=>{
-               if(res.data.message==""){
-                  this.editRoleForm.roleName = res.data.data[0].role_name;
-                  this.editRoleForm.roleDesc = res.data.data[0].role_message;
-               }else{
-                  this.$message.error('查询角色信息失败!')
-               }
-            })
-            this.editRoleDialogVisible = true
-         },
-         removeRoleById(row){
-            this.$confirm('此操作将永久删除该角色, 是否继续?', '提示', {
-                  confirmButtonText: '确定',
-                  cancelButtonText: '取消',
-                  type: 'warning'
-               }).then(() => {
-                  this.$axios({
-                     method:'POST',
-                     url:'/api/api_gateway?method=user.perms.add_role',
-                     data:this.qs.stringify({
-                        make_type:4,
-                        role_id:row.role_id,
-                        role_name:row.role_name
-                     })
-                  }).then(res=>{
-                     if(res.data.message==""){
-                        this.$message.success('删除角色成功!')
-                        this.getRoleList();
-                     }else{
-                        this.$message.error(res.data.message)
-                     }
-                  })
-               }).catch(() => {
-                  this.$message({
-                     type: 'info',
-                     message: '已取消删除'
-                  });          
-            });
-         },
-         showSetRightDialog(role){
-            this.roleId=role.role_id;
-            this.$axios({
-               method:'POST',
-               url:'/api/api_gateway?method=user.perms.all_pur_list',
-            }).then(res=>{
-               if(res.data.message==""){
-                  this.rightsList=res.data.data;
-               }else{
-                  this.$message.error('获取权限列表失败!')
-               }
-            })
-            this.defKeys = [];
-            this.getLeafkeys(role,this.defKeys);
-            this.setRightDialogVisible=true;
-         },
-         getLeafkeys(node,arr){
-            if(!node.children){
-               return arr.push(node.pur_id) 
-            }
-            node.children.forEach(item=>this.getLeafkeys(item,arr))
-         },
-         setRightDialogClosed(){
-            this.rightsList=[];
-         },
-         addRoleDialogClosed(){
-            this.$refs.addRoleFormRef.resetFields();
-         },
-         editRoleDialogClosed(){
-            this.$refs.editRoleFormRef.resetFields();
-         },
-         // 添加角色
-         addRoles(){
-            this.$refs.addRoleFormRef.validate(valid=>{
-               if(!valid) return
-               this.$axios({
-                  method:'POST',
-                  url:'/api/api_gateway?method=user.perms.add_role',
-                  data:this.qs.stringify({
-                     role_name:this.addRoleForm.roleName,
-                     role_message :this.addRoleForm.roleDesc,
-                     make_type:1 
-                  })
-               }).then(res=>{
-                  if(res.data.message==""){
-                     this.$message.success('添加角色成功!')
-                  }else{
-                     this.$message.error('添加角色失败!')
-                  }
-                  this.AddRoleDialogVisible=false;
-                  this.getRoleList()
-                  })
-               })
-         },
-         editRoles(){
-            this.$refs.editRoleFormRef.validate(valid=>{
-               if(!valid){
-                  return false;
-               }
-            })
-            this.$axios({
-               method:'POST',
-               url:'/api/api_gateway?method=user.perms.add_role',
-               data:this.qs.stringify({
-                  role_name:this.editRoleForm.roleName,
-                  role_message :this.editRoleForm.roleDesc,
-                  role_id:this.editId,
-                  make_type:3 
-               })
-            }).then(res=>{
-               if(res.data.message==""){
-                  this.$message.success('编辑角色成功!')
-               }else{
-                  this.$message.error('编辑角色失败!')
-               }
-                this.editRoleDialogVisible=false;
-                this.getRoleList()
-            })
-         },
-         allotRights(){
-            // 获得当前选中的Id
-            const keys = [
-               ...this.$refs.treeRef.getCheckedKeys(),
-               ...this.$refs.treeRef.getHalfCheckedKeys()
-               ]
-            const idStr = keys.join(',');
-            this.$axios({
-               method:'POST',
-               url:'/api/api_gateway?method=user.perms.allot_perm',
-               data:this.qs.stringify({
-                  role_id:this.roleId,
-                  pur_id:idStr
-               })
-            }).then(res=>{
-               if(res.data.message==""){
-                  this.$message.success('分配权限成功!')
-                  this. getRoleList()  
-               }
-               this.setRightDialogVisible=false;  
-            })
-         }
-      }
-   }
-</script>
-
-<style lang='less' scoped>
-
-</style>

+ 0 - 617
bigdata2/src/pages/systemmanger/UserGroupManger.vue

@@ -1,617 +0,0 @@
-<template>
-	<div>
-		<el-breadcrumb separator-class="el-icon-arrow-right">
-			<el-breadcrumb-item>系统管理</el-breadcrumb-item>
-			<el-breadcrumb-item>用户组管理</el-breadcrumb-item>
-		</el-breadcrumb>
-		<div class="search-box">
-			<div class="filter-box">
-				<el-input size="small" placeholder="请输入用户组名称" v-model="userGroupName" clearable @change="searchData()">
-					<i slot="suffix" class="el-input__icon el-icon-search"></i>
-				</el-input>
-				<el-date-picker
-					size="small"
-					v-model="timeRange"
-					type="daterange"
-					range-separator="至"
-					start-placeholder="开始日期"
-					end-placeholder="结束日期"
-					@change="dateData"
-				></el-date-picker>
-			</div>
-			<el-button type="primary" size="mini" @click="addUserGroup()">新增用户组</el-button>
-		</div>
-		<el-row :gutter="10">
-			<el-col :xs="24" :sm="24" :md="12" :lg="6" :xl="4" v-for="item in userGroupList" :key="item.id">
-				<el-card class="box-card pad0">
-					<div class="img-box">
-						<span class="logo-box">
-							<template v-if="item.logo">
-								<img :src="require('@/assets/images/equipdistribute/scdIconOn.png')" />
-							</template>
-						</span>
-						<p>{{item.role_describe}}</p>
-					</div>
-					<div class="detail">
-						<p>
-							创建时间
-							<span>{{item.role_cre_time | formatTime}}</span>
-						</p>
-						<p>
-							首页主题
-							<span>{{item.role_header}}</span>
-						</p>
-					</div>
-					<div class="bottom">
-						<span @click="viewDetail(item.role_describe)">
-							<i class="el-icon-document"></i> 查看详情
-						</span>
-						<span @click="edit(item.role_describe)">
-							<i class="el-icon-edit-outline"></i> 编辑
-						</span>
-					</div>
-				</el-card>
-			</el-col>
-		</el-row>
-		<!-- 暂无数据 -->
-		<div class="expertDiagnosis_referral_units_not" v-if="userGroupList.length<=0">
-			<img
-				src="@/assets/images/expertDiagnosis/zanwu.png"
-				alt
-				class="expertDiagnosis_referral_units_notImg"
-			/>
-		</div>
-		<el-pagination
-			v-if="userGroupList.length>0"
-			:current-page="page"
-			background
-			layout="prev, pager, next"
-			:total="totalNum"
-			@current-change="changePage"
-		></el-pagination>
-		<!-- 详情对话框 -->
-		<el-dialog title="详情" :visible.sync="detailDialogVisible" class="detailDialog" width="30%">
-			<p>
-				<span>用户组名称 :</span>
-				<span>{{userDetail.role_cre_user}}</span>
-			</p>
-			<p>
-				<span>创建时间 :</span>
-				<span>{{userDetail.role_cre_time | formatTime}}</span>
-			</p>
-			<p>
-				<span>首页主题 :</span>
-				<span>{{userDetail.role_header}}</span>
-			</p>
-			<p>
-				<span>首页logo :</span>
-				<span>
-					<img :src=" '/api' + userDetail.role_logo" />
-				</span>
-			</p>
-			<p>
-				<span>首页footer :</span>
-				<span>{{userDetail.role_footer}}</span>
-			</p>
-		</el-dialog>
-		<!-- 编辑对话框 -->
-		<el-dialog title="编辑" :visible.sync="editDialogVisible" class="editDialog" width="30%">
-			<el-form ref="form" :model="userDetail" label-width="80px">
-				<el-form-item label="首页logo : ">
-					<el-upload
-						class="upload-demo"
-						ref="upload"
-						:http-request="ImgUploadSectionFile"
-						:with-credentials="true"
-						:auto-upload="true"
-						accept=".png, .jpg, .gif, .svg"
-						action
-						:on-change="handleChange"
-						list-type="picture"
-						:file-list="fileList"
-						:limit="1"
-						multiple
-					>
-						<img v-if="userDetail.role_logo" :src="userDetail.role_logo" class="avatar" />
-						<i v-else class="el-icon-plus avatar-uploader-icon"></i>
-					</el-upload>
-				</el-form-item>
-				<el-form-item label="主题 : ">
-					<el-input v-model="userDetail.role_header"></el-input>
-				</el-form-item>
-				<el-form-item label="版权 : ">
-					<el-input type="textarea" :rows="2" v-model="userDetail.role_footer"></el-input>
-				</el-form-item>
-			</el-form>
-			<span slot="footer" class="dialog-footer">
-				<el-button @click="editDialogVisible= false">取 消</el-button>
-				<el-button type="primary" @click="editDialogVisible= false, addr()">保 存</el-button>
-			</span>
-		</el-dialog>
-		<!-- 新增用户组 -->
-		<el-dialog title="新增用户组" :visible.sync="addUserGroupDialogVisible" class="editDialog" width="25%">
-			<el-form ref="form" :model="adduserGroupForm" label-width="100px">
-				<el-form-item label="用户组名称">
-					<el-input v-model="adduserGroupForm.userGroupName"></el-input>
-				</el-form-item>
-			</el-form>
-			<span slot="footer" class="dialog-footer">
-				<el-button @click="addUserGroupDialogVisible = false">取 消</el-button>
-				<el-button type="primary" @click="addUserGroupDialogVisible = false, listAddr()">确 定</el-button>
-			</span>
-		</el-dialog>
-	</div>
-</template>
-
-<script>
-export default {
-	data() {
-		return {
-			userGroupName: '',
-			timeRange: '',
-			fullHeight: document.documentElement.clientHeight, //自适应高度
-			userGroupList: [],
-			userDetail: {},
-			detailDialogVisible: false,
-			editDialogVisible: false,
-			addUserGroupDialogVisible: false,
-			totalNum: 0,
-			adduserGroupForm: {
-				userGroupName: ''
-			},
-			fileList: [],
-			imageSrc: '', //后端返回的图片链接
-			Str: '', //转换后的开始时间
-			end: '', //转换后的结束时间
-			page:1,
-		}
-	},
-	watch: {
-		fullHeight(val) {
-			//监控浏览器高度变化
-			if (!this.timer) {
-				this.fullHeight = val
-				this.timer = true
-				let that = this
-				setTimeout(function () {
-					//防止过度调用监测事件,导致卡顿
-					that.timer = false
-				}, 400)
-			}
-		},
-
-		// 编辑弹框监测
-		editDialogVisible(val) {
-			if (val == true) {
-				//显示
-				console.log('显示')
-			} else if (val == false) {
-				// 关闭
-				this.$refs.upload.clearFiles() //清空
-			}
-		},
-
-		// 新增用户组监测
-		addUserGroupDialogVisible(val) {
-			if (val == false) {
-				this.adduserGroupForm.userGroupName = ''
-			}
-		},
-	},
-	methods: {
-		//动态获取浏览器高度
-		get_boderHeight() {
-			const that = this
-			window.onresize = () => {
-				return (() => {
-					window.fullHeight = document.documentElement.clientHeight
-					that.fullHeight = window.fullHeight - 128
-					console.log(that.fullHeight)
-				})()
-			}
-		},
-
-		// 查看详情
-		viewDetail(name) {
-			let that = this
-			let postData = that.qs.stringify({
-				role: name, //名称
-				req: 'details', //详情数据回显
-				img_file: '', //首页图片
-				role_footer: '', //版权
-				role_header: '', //主题
-				role_logo: '' //首页图片链接
-			})
-			that
-				.$axios({
-					method: 'post',
-					url:
-						'api/api_gateway?method=pest.warning_record.rolemanage_img',
-					data: postData
-				})
-				.then((res) => {
-					if (res.data.data.nums !== 0) {
-						this.userDetail = res.data.data
-						that.detailDialogVisible = true
-					}
-				})
-				.catch((err) => {
-					console.log(err)
-				})
-		},
-
-		//编辑
-		edit(name) {
-			let that = this
-			let postData = that.qs.stringify({
-				role: name, //名称
-				req: 'details', //详情数据回显
-				img_file: '', //首页图片
-				role_footer: '', //版权
-				role_header: '', //主题
-				role_logo: '' //首页图片链接
-			})
-			that
-				.$axios({
-					method: 'post',
-					url:
-						'api/api_gateway?method=pest.warning_record.rolemanage_img',
-					data: postData
-				})
-				.then((res) => {
-					if (res.data.data.nums !== 0) {
-						this.userDetail = res.data.data
-						that.editDialogVisible = true
-					}
-				})
-				.catch((err) => {
-					console.log(err)
-				})
-		},
-
-		// 新增用户组
-		addUserGroup() {
-			this.addUserGroupDialogVisible = true
-		},
-		//新增用户组确定按钮
-		listAddr() {
-			let that = this
-			let postData = that.qs.stringify({
-				add_role: that.adduserGroupForm.userGroupName, //角色描述
-				page: this.page
-			})
-			that
-				.$axios({
-					method: 'post',
-					url:
-						'api/api_gateway?method=pest.warning_record.rolemanage_view',
-					data: postData
-				})
-				.then((res) => {
-					if (res.data.data.data == 200) {
-						that.$message({
-							message: '添加新用户组成功',
-							type: 'success',
-							duration: 1500
-						})
-						var timeoutId = setTimeout(function () {
-							that.listData(1, '') //列表数据请求
-						}, 1500)
-					} else if (res.data.data.data == 201) {
-						that.$message.error({
-							message: '该用户组名称已存在',
-							duration: 1500
-						})
-					}
-				})
-				.catch((err) => {
-					console.log(err)
-				})
-		},
-
-		// 上传图片
-		handleChange(file, fileList) {
-			this.userDetail.logo = URL.createObjectURL(file.raw)
-		},
-		beforeAvatarUpload(file) {
-			const isJPG = file.type === 'image/jpg'
-			const isLt2M = file.size / 1024 / 1024 < 2
-			if (!isLt2M) {
-				this.$message.error('上传头像图片大小不能超过 2MB!')
-			}
-			return isJPG && isLt2M
-		},
-		// 上传过图片编辑保存
-		ImgUploadSectionFile(param) {
-			let that = this
-			let formData = new FormData()
-			formData.append('img_file', param.file) //首页图片
-			formData.append('role', that.userDetail.role_describe) //角色描述
-			formData.append('req', 'img') //上传图片
-			that
-				.$axios({
-					method: 'post',
-					url:
-						'api/api_gateway?method=pest.warning_record.rolemanage_img',
-					data: formData
-				})
-				.then((res) => {
-					if (res.data.data.src !== '0') {
-						that.imageSrc = res.data.data.src
-					} else {
-						that.$message.error({
-							message: '上传图片失败,请重试',
-							duration: 1500
-						})
-					}
-				})
-				.catch((err) => {
-					console.log(err)
-				})
-		},
-		// 编辑保存
-		addr() {
-			this.upDataList() //上传数据
-		},
-		// 在没有上传图片的情况下编辑上传数据
-		upDataList() {
-			let that = this
-			let postData = that.qs.stringify({
-				req: 'add', //用户组信息保存
-				img_file: '', //首页图片
-				role_footer: that.userDetail.role_footer, //版权
-				role_header: that.userDetail.role_header, //主题
-				role_logo: that.imageSrc, //首页图片链接
-				role: that.userDetail.role_describe //角色描述
-			})
-			that
-				.$axios({
-					method: 'post',
-					url:
-						'api/api_gateway?method=pest.warning_record.rolemanage_img',
-					data: postData
-				})
-				.then((res) => {
-					if (res.data.data.data == 200) {
-						that.$message({
-							message: '编辑成功',
-							type: 'success',
-							duration: 1500
-						})
-						that.listData(1, '') //列表数据请求
-					} else if (res.data.data.data == 400) {
-						that.$message.error({
-							message: '编辑失败,请重试',
-							duration: 1500
-						})
-					}
-				})
-				.catch((err) => {
-					console.log(err)
-				})
-		},
-
-		// 分页
-		changePage(e) {
-			this.listData(e, '')
-		},
-
-		// 列表数据请求
-		listData(page,add_role) {
-			let that = this
-			let postData = that.qs.stringify({
-				page: page, //页码
-				add_role: add_role //角色描述
-			})
-			that
-				.$axios({
-					method: 'post',
-					url:
-						'api/api_gateway?method=pest.warning_record.rolemanage_view',
-					data: postData
-				})
-				.then((res) => {	
-					var data = res.data.data
-					that.userGroupList = data.data
-					var nums = data.nums
-					that.totalNum = nums
-				})
-				.catch((err) => {
-					console.log(err)
-				})
-		},
-
-		//搜索用户组名称
-		searchData() {
-			let that = this
-			console.log(that.timeRange)
-			let postData = that.qs.stringify({
-				page: this.page, //页数
-				role: that.userGroupName, //名称
-				time_begin: that.Str, //开始时间
-				time_end: that.end //结束时间
-			})
-			that
-				.$axios({
-					method: 'post',
-					url:'api/api_gateway?method=pest.warning_record.rolemanage_search',
-					data: postData
-				})
-				.then((res) => {
-					var data = res.data.data.data
-					that.userGroupList = data
-					var nums = res.data.data.nums
-					that.totalNum = nums
-				})
-				.catch((err) => {
-					console.log(err)
-				})
-		},
-
-		// 时间筛选
-		dateData() {
-			let that = this
-			// 开始时间
-			let date = new Date(that.timeRange[0])
-			let Str =
-				date.getFullYear() +
-				'-' +
-				(date.getMonth() + 1) +
-				'-' +
-				date.getDate() +
-				' ' +
-				date.getHours() +
-				':' +
-				date.getMinutes() +
-				':' +
-				date.getSeconds()
-			Str = Str.replace(' 0:0:0', '')
-			that.Str = Str
-
-			// 结束时间
-			let dateA = new Date(that.timeRange[1])
-			let end =
-				dateA.getFullYear() +
-				'-' +
-				(dateA.getMonth() + 1) +
-				'-' +
-				dateA.getDate() +
-				' ' +
-				dateA.getHours() +
-				':' +
-				dateA.getMinutes() +
-				':' +
-				dateA.getSeconds()
-			end = end.replace(' 0:0:0', '')
-			that.end = end
-
-			let postData = that.qs.stringify({
-				page: this.page, //页数
-				role: that.userGroupName, //名称
-				time_begin: Str, //开始时间
-				time_end: end //结束时间
-			})
-			that
-				.$axios({
-					method: 'post',
-					url:
-						'api/api_gateway?method=pest.warning_record.rolemanage_search',
-					data: postData
-				})
-				.then((res) => {
-					var data = res.data.data.data
-					that.userGroupList = data
-					var nums = res.data.data.nums
-					that.totalNum = nums
-				})
-				.catch((err) => {
-					console.log(err)
-				})
-		}
-	},
-	created() {},
-	mounted() {
-		this.get_boderHeight() //自适应
-		this.listData(this.page,'') //列表数据请求
-	}
-}
-</script>
-
-<style lang='less' scoped>
-.search-box {
-	display: flex;
-	justify-content: flex-left;
-	justify-content: space-between;
-	margin-bottom: 10px;
-	.filter-box > div {
-		margin-right: 15px;
-	}
-	.el-input {
-		width: 200px;
-	}
-	.el-date-editor--daterange {
-		width: 222px;
-	}
-}
-.el-card {
-	.img-box {
-		text-align: center;
-		border-bottom: 1px solid #e1e1e1;
-		padding: 15px 0;
-		.logo-box {
-			display: inline-block;
-			width: 60px;
-			height: 60px;
-			overflow: hidden;
-			border-radius: 100%;
-			background: #ddd;
-			img {
-				width: 100%;
-				height: auto;
-			}
-		}
-		p {
-			font-size: 14px;
-			font-weight: 800;
-			width: 70%;
-			overflow: hidden;
-			text-overflow: ellipsis;
-			white-space: nowrap;
-			margin: 10px auto 0;
-		}
-	}
-	.detail {
-		border-bottom: 1px solid #e1e1e1;
-		padding: 10px 0;
-		padding: 0 20px;
-		p {
-			display: flex;
-			justify-content: space-between;
-			font-size: 13px;
-			line-height: 34px;
-			color: #666;
-			padding: 0 0px;
-		}
-	}
-	.bottom {
-		display: flex;
-		font-size: 13px;
-		color: #666;
-		line-height: 50px;
-		span {
-			flex: 1;
-			text-align: center;
-			cursor: pointer;
-			i {
-				font-size: 16px;
-			}
-		}
-		span:first-child {
-			border-right: 1px solid #e1e1e1;
-		}
-	}
-}
-.detailDialog {
-	p {
-		display: flex;
-		padding: 10px 0;
-		span:nth-child(1) {
-			width: 100px;
-			margin-right: 10px;
-			text-align: right;
-		}
-		span:nth-child(2) {
-			flex: 1;
-			text-align: left;
-		}
-	}
-}
-
-//暂无数据
-.expertDiagnosis_referral_units_not {
-	width: 272px;
-	margin: 150px auto;
-	.expertDiagnosis_referral_units_notImg {
-	}
-}
-</style>

+ 0 - 952
bigdata2/src/pages/systemmanger/UserManger.vue

@@ -1,952 +0,0 @@
-<template>
-	<div>
-		<el-breadcrumb separator-class="el-icon-arrow-right">
-			<el-breadcrumb-item>系统管理</el-breadcrumb-item>
-			<el-breadcrumb-item>用户管理</el-breadcrumb-item>
-		</el-breadcrumb>
-		<div class="search-box">
-			<div class="filter-box">
-				<el-select
-					size="small"
-					v-model="role"
-					placeholder="请选择角色类型"
-					clearable
-					@change="checkList()"
-				>
-					<el-option
-						v-for="item in roleList"
-						:label="item.role_name"
-						:value="item.role_id"
-						:key="item.role_id"
-					></el-option>
-				</el-select>
-				<el-select
-					size="small"
-					v-model="userTypeCheck"
-					placeholder="请选择用户类型"
-					clearable
-					@change="checkList()"
-				>
-					<el-option label="超级管理员" :value="1"></el-option>
-					<el-option label="经销商" :value="2"></el-option>
-					<el-option label="农林政府单位" :value="3"></el-option>
-					<el-option label="普通用户" :value="4"></el-option>
-				</el-select>
-				<el-input
-					size="small"
-					placeholder="请输入用户名"
-					@change="checkList()"
-					clearable
-					v-model="username"
-				>
-					<i slot="suffix" class="el-input__icon el-icon-search"></i>
-				</el-input>
-			</div>
-			<el-button type="primary" size="mini" @click="addUser()"
-				>添加新用户</el-button
-			>
-		</div>
-		<el-row :gutter="10">
-			<el-col
-				:xs="24"
-				:sm="24"
-				:md="12"
-				:lg="6"
-				:xl="6"
-				v-for="item in userList"
-				:key="item.uid"
-			>
-				<el-card class="box-card pad0">
-					<div class="img-box">
-						<img
-							v-if="item.state == 1"
-							src="@/assets/images/systemManger/user.png"
-						/>
-						<img
-							v-if="item.state == 4"
-							src="@/assets/images/systemManger/user_dis.png"
-						/>
-						<p>{{ item.username }}</p>
-						<div>
-							<el-button type="text" @click="login(item.uid, item.username)"
-								>一键登录</el-button
-							>
-						</div>
-					</div>
-					<div class="detail">
-						<p>
-							创建时间
-							<span>{{ (item.addtime * 1000) | formatTime }}</span>
-						</p>
-						<p>
-							用户角色
-							<span>{{ item.role_name }}</span>
-						</p>
-						<p>
-							用户所属
-							<span>{{ item.regiest_source_name || '--' }}</span>
-						</p>
-						<p>
-							用户类型
-							<span>{{ item.user_type | formatUserType }}</span>
-						</p>
-						<p>
-							用户手机号
-							<span>{{ item.mobile }}</span>
-						</p>
-						<p>
-							上次登录
-							<span>{{ (item.login_time * 1000) | formatTime }}</span>
-						</p>
-						<p>
-							用户到期时间
-							<span>{{ (item.expire_time * 1000) | formatTime }}</span>
-						</p>
-					</div>
-					<div class="btn">
-						<a @click="recharge(item.uid)">
-							<i class="iconfont icon-chongzhi"></i>充值
-						</a>
-						<a @click="edit(item)">
-							<i class="iconfont icon-iconfontedit"></i>编辑
-						</a>
-						<template v-if="item.state == 1">
-							<a @click="forbidUse(item.uid, 4, '确认禁用该用户?')">
-								<i class="iconfont icon-jinyong"></i>禁用
-							</a>
-						</template>
-						<template v-else>
-							<a @click="forbidUse(item.uid, 1, '确认恢复该用户?')">
-								<i class="iconfont icon-jinyong"></i>恢复
-							</a>
-						</template>
-						<a @click="resetPassword(item.uid, item.username)">
-							<i class="iconfont icon-mima"></i>密码
-						</a>
-					</div>
-				</el-card>
-			</el-col>
-		</el-row>
-		<!-- 暂无数据 -->
-		<div class="expertDiagnosis_referral_units_not" v-if="userList.length <= 0">
-			<img
-				src="@/assets/images/expertDiagnosis/zanwu.png"
-				alt
-				class="expertDiagnosis_referral_units_notImg"
-			/>
-		</div>
-		<el-pagination
-			v-if="userList.length > 0"
-			background
-			:page-size="8"
-			layout="prev, pager, next"
-			:current-page="page"
-			:total="totalNum"
-			@current-change="changePage"
-		></el-pagination>
-		<!-- 重置密码 -->
-		<el-dialog
-			title="重置密码"
-			:visible.sync="resetPassDialogVisible"
-			width="30%"
-			@close="resetPassDialogClosed"
-		>
-			<el-form
-				ref="resetPassFormRef"
-				:model="resetPassForm"
-				label-width="110px"
-				:rules="resetPassFormRules"
-			>
-				<el-form-item label="用户名 : " prop="username">
-					<el-input
-						type="text"
-						disabled
-						v-model="resetPassForm.username"
-					></el-input>
-				</el-form-item>
-				<el-form-item v-if="userType != 1" label="原始密码 : " prop="oldPass">
-					<el-input type="password" v-model="resetPassForm.oldPass"></el-input>
-				</el-form-item>
-				<el-form-item label="新密码 : " prop="pass">
-					<el-input type="password" v-model="resetPassForm.pass"></el-input>
-				</el-form-item>
-				<el-form-item label="确认新密码 : " prop="checkPass">
-					<el-input
-						type="password"
-						v-model="resetPassForm.checkPass"
-					></el-input>
-				</el-form-item>
-			</el-form>
-			<span slot="footer" class="dialog-footer">
-				<el-button @click="resetPassDialogVisible = false">取 消</el-button>
-				<el-button type="primary" @click="resetPassSubm">确认</el-button>
-			</span>
-		</el-dialog>
-		<!-- 添加新用户 -->
-		<el-dialog
-			title="添加新用户"
-			:visible.sync="addUserDialogVisible"
-			width="30%"
-			@close="addUserDialogClosed"
-		>
-			<el-form
-				ref="addUserFormRef"
-				:model="addUserForm"
-				label-width="80px"
-				:rules="addUserFormRules"
-			>
-				<el-form-item label="用户名 : " prop="username">
-					<el-input v-model="addUserForm.username"></el-input>
-				</el-form-item>
-				<el-form-item label="电话 : " prop="mobile">
-					<el-input v-model="addUserForm.mobile"></el-input>
-				</el-form-item>
-				<el-form-item label="密码  : " prop="pass">
-					<el-input v-model="addUserForm.pass"></el-input>
-				</el-form-item>
-				<el-form-item label="角色类型 : ">
-					<el-select
-						style="width: 100%"
-						size="small"
-						v-model="addUserForm.role_id"
-						placeholder="请选择角色类型"
-					>
-						<el-option
-							v-for="item in roleList"
-							:label="item.role_name"
-							:value="item.role_id"
-							:key="item.role_id"
-						></el-option>
-					</el-select>
-				</el-form-item>
-				<el-form-item label="用户组 : " prop="user_group_id">
-					<el-select
-						style="width: 100%"
-						clearable
-						v-model="addUserForm.user_group_id"
-						placeholder="请选择用户组"
-					>
-						<el-option
-							v-for="(item, index) in userGroupList"
-							:label="item.role_describe"
-							:value="item.id"
-							:key="index"
-						></el-option>
-					</el-select>
-				</el-form-item>
-				<el-form-item label="用户类型 : " prop="user_type" v-if="userType == 1">
-					<el-select
-						style="width: 100%"
-						clearable
-						v-model="addUserForm.user_type"
-						@change="userTypeChange"
-						placeholder="请选择角色类型"
-					>
-						<el-option label="超级管理员" :value="1"></el-option>
-						<el-option label="经销商" :value="2"></el-option>
-						<el-option label="农林政府单位" :value="3"></el-option>
-						<el-option label="普通用户" :value="4"></el-option>
-					</el-select>
-				</el-form-item>
-				<el-form-item label="用户类型 : " prop="user_type" v-if="userType != 1">
-					<el-select
-						style="width: 100%"
-						clearable
-						v-model="addUserForm.user_type"
-						@change="userTypeChange"
-						placeholder="请选择角色类型"
-					>
-						<el-option label="普通用户" :value="4"></el-option>
-					</el-select>
-				</el-form-item>
-				<el-form-item label="省/市/区 : " v-show="editIsShow" prop="pcd">
-					<el-select
-						style="width: 100%"
-						clearable
-						v-model="addUserForm.pcd"
-						placeholder="请选择省、市、县"
-						@change="pcdChange"
-					>
-						<el-option label="省" value="1"></el-option>
-						<el-option label="市" value="2"></el-option>
-						<el-option label="县" value="3"></el-option>
-					</el-select>
-				</el-form-item>
-				<el-form-item label="省/市/区 : " v-show="editIsShow" prop="user_area">
-					<el-select
-						style="width: 100%"
-						clearable
-						v-model="addUserForm.user_area"
-						placeholder="请选择省、市、县"
-						@change="pcdChange"
-					>
-						<el-option
-							:label="item"
-							:value="item"
-							v-for="item in areaList"
-							:key="item"
-						></el-option>
-					</el-select>
-				</el-form-item>
-			</el-form>
-			<span slot="footer" class="dialog-footer">
-				<el-button @click="addUserDialogVisible = false">取 消</el-button>
-				<el-button type="primary" @click="addUserSubm">确认</el-button>
-			</span>
-		</el-dialog>
-		<!-- 用户编辑 -->
-		<el-dialog
-			title="用户信息编辑"
-			:visible.sync="editUserDialogVisible"
-			width="500px"
-			@close="editUserDialogClosed"
-		>
-			<el-form
-				ref="editUserFormRef"
-				:model="editUserForm"
-				label-width="80px"
-				:rules="editUserFormRules"
-			>
-				<el-form-item label="用户名 : ">
-					<el-input v-model="editUserForm.username" disabled></el-input>
-				</el-form-item>
-				<el-form-item label="电话 : " prop="mobile">
-					<el-input v-model="editUserForm.mobile"></el-input>
-				</el-form-item>
-				<el-form-item label="角色类型 : " prop="role_id">
-					<el-select
-						style="width: 100%"
-						clearable
-						v-model="editUserForm.role_id"
-						placeholder="请选择角色类型"
-					>
-						<el-option
-							v-for="item in roleList"
-							:label="item.role_name"
-							:value="item.role_id"
-							:key="item.role_id"
-						></el-option>
-					</el-select>
-				</el-form-item>
-				<el-form-item label="用户组 : " prop="user_group_id">
-					<el-select
-						style="width: 100%"
-						clearable
-						v-model="editUserForm.user_group_id"
-						placeholder="请选择用户组"
-					>
-						<el-option
-							v-for="(item, index) in userGroupList"
-							:label="item.role_describe"
-							:value="item.id"
-							:key="index"
-						></el-option>
-					</el-select>
-				</el-form-item>
-				<el-form-item label="用户类型 : " prop="user_type" v-if="userType == 1">
-					<el-select
-						disabled
-						style="width: 100%"
-						clearable
-						v-model="editUserForm.user_type"
-						@change="userTypeChange"
-						placeholder="请选择角色类型"
-					>
-						<el-option label="超级管理员" :value="1"></el-option>
-						<el-option label="经销商" :value="2"></el-option>
-						<el-option label="农林政府单位" :value="3"></el-option>
-						<el-option label="普通用户" :value="4"></el-option>
-					</el-select>
-				</el-form-item>
-				<el-form-item label="用户类型 : " prop="user_type" v-if="userType != 1">
-					<el-select
-						disabled
-						style="width: 100%"
-						clearable
-						v-model="editUserForm.user_type"
-						@change="userTypeChange"
-						placeholder="请选择角色类型"
-					>
-						<el-option label="普通用户" :value="4"></el-option>
-					</el-select>
-				</el-form-item>
-				<el-form-item
-					label="省/市/区 : "
-					v-show="editIsShow || editUserForm.user_type == 3"
-					prop="pcd"
-				>
-					<el-select
-						style="width: 100%"
-						clearable
-						v-model="editUserForm.pcd"
-						placeholder="请选择省、市、县"
-						@change="pcdChange"
-					>
-						<el-option label="省" value="1"></el-option>
-						<el-option label="市" value="2"></el-option>
-						<el-option label="县" value="3"></el-option>
-					</el-select>
-				</el-form-item>
-				<el-form-item
-					label="省/市/区 : "
-					v-show="editIsShow || editUserForm.user_type == 3"
-					prop="user_area"
-				>
-					<el-select
-						style="width: 100%"
-						clearable
-						v-model="editUserForm.user_area"
-						placeholder="请选择省、市、县"
-						@change="pcdChange"
-					>
-						<el-option
-							:label="item"
-							:value="item"
-							v-for="item in areaList"
-							:key="item"
-						></el-option>
-					</el-select>
-				</el-form-item>
-			</el-form>
-			<span slot="footer" class="dialog-footer">
-				<el-button @click="editUserDialogVisible = false">取 消</el-button>
-				<el-button type="primary" @click="editUserSubm">确认</el-button>
-			</span>
-		</el-dialog>
-	</div>
-</template>
-
-<script>
-import cityData from './citydata'
-export default {
-	inject: ['reload'],
-	data() {
-		var checkMobile = (rule, value, callback) => {
-			const regMobile = /^1\d{10}$/
-			if (regMobile.test(value)) {
-				callback()
-			} else {
-				// 返回一个错误提示
-				callback(new Error('请输入合法的手机号码'))
-			}
-		}
-		var validatePass = (rule, value, callback) => {
-			if (value === '') {
-				callback(new Error('请输入新密码'))
-			} else {
-				if (this.resetPassForm.checkPass !== '') {
-					this.$refs.resetPassFormRef.validateField('checkPass')
-				}
-				callback()
-			}
-		}
-		var validatePass2 = (rule, value, callback) => {
-			if (value === '') {
-				callback(new Error('请再次输入密码'))
-			} else if (value !== this.resetPassForm.pass) {
-				callback(new Error('两次输入密码不一致!'))
-			} else {
-				callback()
-			}
-		}
-		return {
-			role: '', //筛选项 角色类型
-			userTypeCheck: '', //筛选项 用户类型
-			username: '', //筛选项
-			roleList: [],
-			page: 1,
-			userList: [],
-			userGroupList: [],
-			totalNum: 0,
-			//省市县
-			areaList: [],
-			resetPassDialogVisible: false,
-			addUserDialogVisible: false,
-			editUserDialogVisible: false,
-			resetPassForm: {
-				username: '',
-				uid: '',
-				oldPass: '',
-				pass: '',
-				checkPass: ''
-			},
-			addUserForm: {
-				username: '',
-				mobile: '',
-				pass: '',
-				role_id: '',
-				user_type: '',
-				pcd: '',
-				user_area: '',
-				user_group_id: '' //用户组id
-			},
-			cityData,
-			editUserForm: {},
-			//控制省/市/区显示
-			editIsShow: false,
-			//编辑用户规则
-			editUserFormRules: {
-				user_phone: [{ validator: checkMobile, trigger: 'blur' }]
-			},
-			//添加用户规则
-			addUserFormRules: {
-				username: [
-					{ required: true, message: '请填写用户名', trigger: 'blur' }
-				],
-				user_phone: [
-					{ required: true, validator: checkMobile, trigger: 'blur' }
-				],
-				pass: [{ required: true, message: '请填写用户密码', trigger: 'blur' }]
-			},
-			//重置密码格规则
-			resetPassFormRules: {
-				oldPass: [{ required: true, message: '请填原始密码', trigger: 'blur' }],
-				pass: [
-					{ validator: validatePass, trigger: 'blur' },
-					{ required: true, message: '请填写新密码', trigger: 'blur' }
-				],
-				checkPass: [
-					{ validator: validatePass2, trigger: 'blur' },
-					{ required: true, message: '请确认新密码', trigger: 'blur' }
-				]
-			}
-		}
-	},
-	computed: {
-		//获取用户类型
-		userType: function () {
-			return window.sessionStorage.getItem('myuser_type')
-		}
-	},
-	created() {
-		this.getRoleList()
-	},
-	mounted() {
-		this.getList()
-		this.getUserGroup() //获取用户组
-	},
-	methods: {
-		getRoleList() {
-			this.$axios({
-				method: 'POST',
-				url: '/api/api_gateway?method=user.perms.role_list'
-			}).then((res) => {
-				if (res.data.message == '') {
-					this.roleList = res.data.data.map((item) => {
-						return {
-							role_id: item.role_id,
-							role_name: item.role_name
-						}
-					})
-				}
-			})
-		},
-		getList() {
-			this.$axios({
-				method: 'POST',
-				url: '/api/api_gateway?method=user.login.users_info',
-				data: this.qs.stringify({
-					role_id: this.role,
-					page_size: 8,
-					user_type: this.userTypeCheck,
-					page: this.page,
-					username: this.username
-				})
-			}).then((res) => {
-				if (res.data.message == '') {
-					this.userList = res.data.data.data
-					this.totalNum = res.data.data.count
-				}
-			})
-		},
-		getUserGroup() {
-			this.$axios({
-				method: 'POST',
-				url: '/api/api_gateway?method=pest.warning_record.rolemanage_view',
-				data: this.qs.stringify({
-					add_role: 'all'
-				})
-			}).then((res) => {
-				if (res.data.message == '') {
-					this.userGroupList = res.data.data.data
-				}
-			})
-		},
-		recharge(id) {
-			this.$confirm('是否向该用户充值一年费用?', '信息', {
-				confirmButtonText: '确定',
-				cancelButtonText: '取消',
-				type: 'warning'
-			})
-				.then(() => {
-					this.$axios({
-						method: 'POST',
-						url: '/api/api_gateway?method=user.login.user_add_package_time',
-						data: this.qs.stringify({
-							uid: id
-						})
-					}).then((res) => {
-						if (res.data.message == '') {
-							this.$message({
-								type: 'success',
-								message: '充值成功!'
-							})
-							this.getList()
-						} else {
-							this.$message({
-								type: 'error',
-								message: '充值失败!'
-							})
-						}
-					})
-				})
-				.catch(() => {
-					this.$message({
-						type: 'info',
-						message: '充值取消!'
-					})
-				})
-		},
-		// 编辑用户信息
-		edit(role) {
-			this.editUserForm = role
-			if (role.role_id == 0) {
-				//把0转换成""
-				this.editUserForm.role_id = ''
-			}
-			this.editUserDialogVisible = true
-		},
-		login(uid, username) {
-			//一键登录
-			this.$confirm('一键登录将登录此用户,是否继续?', '提示', {
-				confirmButtonText: '确定',
-				cancelButtonText: '取消',
-				type: 'warning'
-			})
-				.then(() => {
-					this.$axios({
-						method: 'POST',
-						url: '/api/api_gateway?method=user.login.auto_login',
-						data: this.qs.stringify({
-							uid
-						})
-					}).then((res) => {
-						if (res.data.message == '') {
-							this.$message({
-								type: 'success',
-								message: '操作成功!'
-							})
-							localStorage.setItem('username', username) //修改当前登录的用户名
-							this.reload() //整体刷新
-							this.$EventBus.$on('firstPage', (data) => {  //默认显示菜单第一项 
-								this.$router.push(`${data}`)
-							})
-						} else {
-							this.$message({
-								type: 'warning',
-								message: res.data.message
-							})
-						}
-					})
-				})
-				.catch(() => {
-					this.$message({
-						type: 'info',
-						message: '取消一键登录!'
-					})
-				})
-		},
-		//用户禁用
-		forbidUse(id, state, txt) {
-			this.$confirm(txt, '提示', {
-				confirmButtonText: '确定',
-				cancelButtonText: '取消',
-				type: 'warning'
-			})
-				.then(() => {
-					this.$axios({
-						method: 'POST',
-						url: '/api/api_gateway?method=user.login.users_statu_updata',
-						data: this.qs.stringify({
-							uid: id,
-							state: state
-						})
-					}).then((res) => {
-						if (res.data.message == '') {
-							this.$message({
-								type: 'success',
-								message: '操作成功!'
-							})
-							this.getList()
-						}
-					})
-				})
-				.catch(() => {
-					this.$message({
-						type: 'info',
-						message: '禁用取消!'
-					})
-				})
-		},
-		//密码重置
-		resetPassword(id, name) {
-			// this.resetPassForm.uid = id
-			// this.resetPassForm.username = name
-			// this.resetPassDialogVisible = true
-			this.$confirm('是否重置密码 ? 重置后的密码为 yf_123456', '提示', {
-				confirmButtonText: '确定',
-				cancelButtonText: '取消',
-				type: 'warning'
-			})
-				.then(() => {
-					this.$axios({
-						method: 'POST',
-						url: '/api/api_gateway?method=user.login.admin_changepwd',
-						data: this.qs.stringify({
-							uid: id
-						})
-					}).then((res) => {
-						if (res.data.message == '') {
-							this.$message({
-								type: 'success',
-								message: '操作成功!'
-							})
-							this.getList()
-						} else {
-							this.$message({
-								type: 'warning',
-								message: res.data.message
-							})
-						}
-					})
-				})
-				.catch(() => {
-					this.$message({
-						type: 'info',
-						message: '取消重置密码!'
-					})
-				})
-		},
-		resetPassSubm() {
-			//暂时不用
-			this.$refs.resetPassFormRef.validate((valid) => {
-				if (!valid) return
-				this.$axios({
-					method: 'POST',
-					url: '/api/api_gateway?method=user.login.changepwd',
-					data: this.qs.stringify({
-						uid: this.resetPassForm.uid,
-						old_password: this.resetPassForm.oldPass,
-						new_password: this.resetPassForm.pass,
-						confirm_password: this.resetPassForm.checkPass
-					})
-				}).then((res) => {
-					if (res.data.data) {
-						this.$message.success('修改密码成功')
-						this.resetPassDialogVisible = false
-					} else {
-						this.$message.error(res.data.message)
-					}
-				})
-			})
-		},
-		//监听重置密码对话框的关闭事件
-		resetPassDialogClosed() {
-			this.$refs.resetPassFormRef.resetFields()
-		},
-		changePage(value) {
-			this.page = value
-			this.getList()
-		},
-		//添加用户
-		addUser() {
-			this.addUserDialogVisible = true
-		},
-		//监听用户类型改变
-		userTypeChange(val) {
-			if (val == 3) {
-				this.editIsShow = true
-			} else {
-				this.editIsShow = false
-			}
-		},
-		//监听省/市/区
-		pcdChange(val) {
-			let addr_type = ''
-			switch (val) {
-				case '1':
-					addr_type = 'province'
-					break
-				case '2':
-					addr_type = 'city'
-					break
-				case '3':
-					addr_type = 'district'
-					break
-			}
-			this.$axios({
-				method: 'POST',
-				url: '/api/api_gateway?method=device.device_manage.device_addr',
-				data: this.qs.stringify({
-					addr_type
-				})
-			}).then((res) => {
-				if (res.data.message == '') {
-					this.areaList = res.data.data
-					this.editUserForm.user_area = ''
-				}
-			})
-		},
-		//添加用户提交
-		addUserSubm() {
-			this.$refs.addUserFormRef.validate((valid) => {
-				if (!valid) return
-				this.$axios({
-					method: 'POST',
-					url: '/api/api_gateway?method=user.login.regiest',
-					data: this.qs.stringify({
-						username: this.addUserForm.username,
-						mobile: this.addUserForm.mobile,
-						password: this.addUserForm.pass,
-						role_id: this.addUserForm.role_id,
-						user_type: this.addUserForm.user_type,
-						pcd: this.addUserForm.pcd,
-						user_area: this.addUserForm.user_area,
-						user_group_id: this.addUserForm.user_group_id
-					})
-				}).then((res) => {
-					if (res.data.message == '') {
-						this.$message.success('添加用户成功!')
-						this.addUserDialogVisible = false
-						this.getList()
-					} else {
-						this.$message.error(res.data.message)
-					}
-				})
-			})
-		},
-		addUserDialogClosed() {
-			this.$refs.addUserFormRef.resetFields()
-		},
-		//修改用户信息提交
-		editUserSubm() {
-			this.$refs.editUserFormRef.validate((valid) => {
-				if (!valid) return
-				this.$axios({
-					method: 'POST',
-					url: '/api/api_gateway?method=user.login.users_info_updata',
-					data: this.qs.stringify({
-						uid: this.editUserForm.uid,
-						// username: this.editUserForm.username,
-						mobile: this.editUserForm.mobile,
-						role_id: this.editUserForm.role_id,
-						user_type: this.editUserForm.user_type,
-						pcd: this.editUserForm.pcd,
-						user_area: this.editUserForm.user_area,
-						user_group_id: this.editUserForm.user_group_id
-					})
-				}).then((res) => {
-					if (res.data.message == '') {
-						this.editUserDialogVisible = false
-						this.getList()
-					}
-				})
-			})
-		},
-		editUserDialogClosed() {
-			this.$refs.editUserFormRef.resetFields()
-			this.areaList = [] //清空省/市/区
-			this.editIsShow = false
-		},
-		checkList() {
-			this.page = 1
-			this.getList()
-		}
-	},
-	filters: {
-		formatUserType(value) {
-			switch (value) {
-				case 1:
-					return '超级管理员'
-					break
-				case 2:
-					return '经销商'
-					break
-				case 3:
-					return '农林政府单位'
-					break
-				case 4:
-					return '普通用户'
-					break
-			}
-		}
-	}
-}
-</script>
-
-<style lang='less' scoped>
-.search-box {
-	display: flex;
-	justify-content: space-between;
-	margin-bottom: 10px;
-	.filter-box > div {
-		margin-right: 15px;
-	}
-	.el-input {
-		width: 200px;
-	}
-	.el-date-editor--daterange {
-		width: 222px;
-	}
-}
-.el-card {
-	.img-box {
-		text-align: center;
-		border-bottom: 1px solid #e1e1e1;
-		padding: 15px 0;
-		p {
-			font-size: 14px;
-			font-weight: 800;
-			margin-top: 10px;
-		}
-	}
-	.detail {
-		border-bottom: 1px solid #e1e1e1;
-		padding: 10px 0;
-		padding: 0 20px;
-		p {
-			display: flex;
-			justify-content: space-between;
-			font-size: 13px;
-			line-height: 34px;
-			color: #666;
-			padding: 0 0px;
-		}
-	}
-	.btn {
-		text-align: center;
-		padding: 20px 10px;
-		display: flex;
-		justify-content: space-around;
-		a {
-			flex: 1;
-			margin: 0 8px;
-			border: 1px solid #17bb89;
-			color: #17bb89;
-			border-radius: 4px;
-			font-size: 12px;
-			padding: 5px 5px;
-			cursor: pointer;
-			i {
-				font-size: 12px;
-				margin-right: 2px;
-			}
-		}
-	}
-}
-// 暂无数据
-.expertDiagnosis_referral_units_not {
-	width: 272px;
-	margin: 0 auto;
-}
-</style>

+ 0 - 363
bigdata2/src/pages/systemmanger/Warning.vue

@@ -1,363 +0,0 @@
-
-<template>
-	<div>
-		<el-breadcrumb separator-class="el-icon-arrow-right">
-			<el-breadcrumb-item>系统管理</el-breadcrumb-item>
-			<el-breadcrumb-item>预警</el-breadcrumb-item>
-		</el-breadcrumb>
-
-		<!-- 主内容 -->
-		<div class="systemmanger_Warning_main" :style="'height:' + fullHeight + 'px'">
-			<!-- 搜索、筛选 -->
-			<div class="systemmanger_Warning_main_searchBox">
-				<!-- 搜索 -->
-				<div class="systemmanger_Warning_units_search">
-					<el-input size="mini" placeholder="请输入设备ID" v-model="input1" class="input-with-select">
-						<el-button slot="append" icon="el-icon-search" @click="searchData()"></el-button>
-					</el-input>
-				</div>
-
-				<!-- 下拉框1 -->
-				<div class="systemmanger_Warning_units_pullDown1">
-					<el-dropdown @command="handleCommand1">
-						<el-button size="mini" type="primary">
-							{{this.dropdownData1}}
-							<i class="el-icon-arrow-down el-icon--right"></i>
-						</el-button>
-						<el-dropdown-menu slot="dropdown">
-							<el-dropdown-item command>全部</el-dropdown-item>
-							<el-dropdown-item command="offline">offline</el-dropdown-item>
-							<el-dropdown-item command="rtu">rtu</el-dropdown-item>
-							<el-dropdown-item command="down_motor">down_motor</el-dropdown-item>
-							<el-dropdown-item command="up_motor">up_motor</el-dropdown-item>
-							<el-dropdown-item command="turn_motor">turn_motor</el-dropdown-item>
-						</el-dropdown-menu>
-					</el-dropdown>
-				</div>
-
-				<!-- 下拉框2 -->
-				<div class="systemmanger_Warning_units_pullDown2">
-					<el-dropdown @command="handleCommand2">
-						<el-button size="mini" type="primary">
-							{{this.dropdownData2}}
-							<i class="el-icon-arrow-down el-icon--right"></i>
-						</el-button>
-						<el-dropdown-menu slot="dropdown">
-							<el-dropdown-item command>请选择</el-dropdown-item>
-							<el-dropdown-item command="offline">离线次数查看</el-dropdown-item>
-							<el-dropdown-item command="relink">重连次数查看</el-dropdown-item>
-							<el-dropdown-item command="cbdoffline">测报灯离线次数查看</el-dropdown-item>
-							<el-dropdown-item command="cbdrelink">测报灯重连次数查看</el-dropdown-item>
-							<el-dropdown-item command="qxofflin">气象站离线次数查看</el-dropdown-item>
-							<el-dropdown-item command="qxzrelink">气象站重连次数查看</el-dropdown-item>
-							<el-dropdown-item command="scdoffline">杀虫灯离线次数查看</el-dropdown-item>
-							<el-dropdown-item command="xyoffline">性诱离线次数查看</el-dropdown-item>
-						</el-dropdown-menu>
-					</el-dropdown>
-				</div>
-			</div>
-
-			<!-- 列表内容 -->
-			<div class="systemmanger_Warning_main_ul">
-				<el-table :data="tableData" stripe style="width: 100%" empty-text="暂无数据">
-					<el-table-column :prop="this.val1" :label="this.nameData1" width="650px"></el-table-column>
-					<el-table-column :prop="this.val2" :label="this.nameData2" width="650px"></el-table-column>
-					<el-table-column :prop="this.val3" :label="this.nameData3"></el-table-column>
-				</el-table>
-
-				<!-- 分页 -->
-				<el-pagination
-					background
-					@current-change="pageData($event)"
-					layout="prev, pager, next"
-					:total="this.nums"
-					:current-page="page"
-					:page-size="5"
-				></el-pagination>
-			</div>
-		</div>
-	</div>
-</template>
-
-<script>
-import '@/plugin/flexible.js'
-export default {
-	data() {
-		return {
-			input1: '', //搜索
-			fullHeight: document.documentElement.clientHeight, //自适应高度
-			dropdownData1: '请选择类型', //下拉框1
-			dropdownData2: '请选择', //下拉框1
-			// 表格测试数据
-			tableData: [],
-			nums: 0, //分页总数
-			nameData1: '设备ID',
-			nameData2: '预警描述',
-			nameData3: '预警时间',
-			val1: 'equip_id',
-			val2: 'alarm_desc',
-			val3: 'alarm_time',
-			req: '', //重连离线
-			type: '', //类型
-			page: 1,
-		}
-	},
-	watch: {
-		fullHeight(val) {
-			//监控浏览器高度变化
-			if (!this.timer) {
-				this.fullHeight = val
-				this.timer = true
-				let that = this
-				setTimeout(function () {
-					//防止过度调用监测事件,导致卡顿
-					that.timer = false
-				}, 400)
-			}
-		}
-	},
-	methods: {
-		//动态获取浏览器高度
-		get_boderHeight() {
-			const that = this
-			window.onresize = () => {
-				return (() => {
-					window.fullHeight = document.documentElement.clientHeight
-					that.fullHeight = window.fullHeight - 128
-					console.log(that.fullHeight)
-				})()
-			}
-		},
-
-		//下拉框1
-		handleCommand1(command) {
-			this.dropdownData2 = '请选择'
-			if (command == '') {
-				this.dropdownData1 = '全部'
-			} else {
-				this.dropdownData1 = command
-			}
-			this.onOffLineData('', '', '', '', command, 1)
-		},
-		//下拉框2
-		handleCommand2(command) {
-			this.dropdownData1 = '请选择类型'
-			if (command == '') {
-				this.dropdownData2 = '请选择'
-			} else if (command == 'offline') {
-				this.dropdownData2 = '离线次数查看'
-				this.onOffLineData(command, '设备ID', '设备类型', '离线次数', '', 1)
-			} else if (command == 'relink') {
-				this.dropdownData2 = '重连次数查看'
-				this.onOffLineData(command, '设备ID', '设备类型', '重连次数', '', 1)
-			} else if (command == 'cbdoffline') {
-				this.dropdownData2 = '测报灯离线次数查看'
-				this.onOffLineData(command, '设备ID', '设备类型', '离线次数', '', 1)
-			} else if (command == 'cbdrelink') {
-				this.dropdownData2 = '测报灯重连次数查看'
-				this.onOffLineData(command, '设备ID', '设备类型', '重连次数', '', 1)
-			} else if (command == 'qxofflin') {
-				this.dropdownData2 = '气象站离线次数查看'
-				this.onOffLineData(command, '设备ID', '设备类型', '离线次数', '', 1)
-			} else if (command == 'qxzrelink') {
-				this.dropdownData2 = '气象站重连次数查看'
-				this.onOffLineData(command, '设备ID', '设备类型', '重连次数', '', 1)
-			} else if (command == 'scdoffline') {
-				this.dropdownData2 = '杀虫灯离线次数查看'
-				this.onOffLineData(command, '设备ID', '设备类型', '离线次数', '', 1)
-			} else if (command == 'xyoffline') {
-				this.dropdownData2 = '性诱离线次数查看'
-				this.onOffLineData(command, '设备ID', '设备类型', '离线次数', '', 1)
-			}
-		},
-
-		//分页点击
-		pageData(e) {
-			let that = this
-			var val = that.val2
-			if (val == 'alarm_desc') {
-				//类型
-				that.onOffLineData('', '', '', '', that.type, e, that.input1)
-			} else if (val == 'etype') {
-				//离线重连
-				that.onOffLineData(
-					that.req,
-					that.nameData1,
-					that.nameData2,
-					that.nameData3,
-					'',
-					e,
-					that.input1
-				)
-			}
-		},
-
-		// 请求预警列表数据
-		listData(req) {
-			let that = this
-			let postData = that.qs.stringify({
-				req: req, //
-				page: that.page, //
-				equip_id: '', //
-				equip_type: '' //
-			})
-			that
-				.$axios({
-					method: 'post',
-					url:
-						'api/api_gateway?method=pest.warning_record.equip_warning_list',
-					data: postData
-				})
-				.then((res) => {
-					if (res.data.data.nums == 0) {
-					} else {
-						that.tableData = res.data.data.data
-					}
-					console.log(res.data.data)
-					var num = res.data.data.nums
-					that.nums = num
-				})
-				.catch((err) => {
-					console.log(err)
-				})
-		},
-
-		//请求预警列表重连离线次数筛选
-		onOffLineData(req, name1, name2, name3, type, page, inpt) {
-			let that = this
-			let postData = that.qs.stringify({
-				req: req, //
-				page: page, //
-				equip_id: inpt, //
-				equip_type: type //
-			})
-			if (req !== '') {
-				that.req = req
-			}
-			if (type != '') {
-				that.type = type
-			}
-			that
-				.$axios({
-					method: 'post',
-					url:
-						'api/api_gateway?method=pest.warning_record.equip_warning_list',
-					data: postData
-				})
-				.then((res) => {
-					if (res.data.data.nums == 0) {
-						if (name1 && name2 && name3) {
-							that.nameData1 = name1
-							that.nameData2 = name2
-							that.nameData3 = name3
-							// 值
-							that.val1 = 'equip_id'
-							that.val2 = 'etype'
-							that.val3 = 'nums'
-						} else {
-							that.nameData1 = '设备ID'
-							that.nameData2 = '预警描述'
-							that.nameData3 = '预警时间'
-							// 值
-							that.val1 = 'equip_id'
-							that.val2 = 'alarm_desc'
-							that.val3 = 'alarm_time'
-						}
-						that.tableData = res.data.data.data
-					} else {
-						if (name1 && name2 && name3) {
-							that.nameData1 = name1
-							that.nameData2 = name2
-							that.nameData3 = name3
-							// 值
-							that.val1 = 'equip_id'
-							that.val2 = 'etype'
-							that.val3 = 'nums'
-							var data = res.data.data.data
-							var redata = []
-							for (var i = 0; i < data.length; i++) {
-								var dataA = data[i]
-								if (data[i].etype == 2) {
-									dataA['etype'] = '杀虫灯'
-								} else if (data[i].etype == 3) {
-									dataA['etype'] = '测报灯'
-								} else if (data[i].etype == 5) {
-									dataA['etype'] = '气象站'
-								} else if (data[i].etype == 8) {
-									dataA['etype'] = '性诱器'
-								}
-								redata.push(dataA)
-							}
-						} else {
-							that.nameData1 = '设备ID'
-							that.nameData2 = '预警描述'
-							that.nameData3 = '预警时间'
-							// 值
-							that.val1 = 'equip_id'
-							that.val2 = 'alarm_desc'
-							that.val3 = 'alarm_time'
-						}
-						that.tableData = res.data.data.data
-					}
-					var num = res.data.data.nums
-					that.nums = num
-				})
-				.catch((err) => {
-					console.log(err)
-				})
-		},
-
-		//搜索筛选数据请求
-		searchData() {
-			let that = this
-			if (that.req !== '') {
-				//重连离线
-				that.onOffLineData(
-					that.req,
-					that.nameData1,
-					that.nameData2,
-					that.nameData3,
-					'',
-					that.page,
-					that.input1
-				)
-			} else if (that.type !== '') {
-				//类型
-				that.onOffLineData('', '', '', '', that.type, that.page, that.input1)
-			}
-		}
-	},
-	created() {},
-	mounted() {
-		this.get_boderHeight() //自适应
-		this.listData('') //请求预警列表数据
-	}
-}
-</script>
-
-<style lang='less' scoped>
-// 主内容
-.systemmanger_Warning_main {
-	// border: 1px solid #000;
-
-	// 搜索、筛选
-	.systemmanger_Warning_main_searchBox {
-		// border: 1px solid #000;
-		display: flex;
-		.systemmanger_Warning_units_search,
-		.systemmanger_Warning_units_pullDown1,
-		.systemmanger_Warning_units_pullDown2 {
-			margin: 0 0 0 15px;
-		}
-	}
-
-	// 列表内容
-	.systemmanger_Warning_main_ul {
-		border: 1px solid #fff;
-		margin: 25px 0 0 0;
-		border-radius: 15px;
-		box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12), 0 0 6px rgba(0, 0, 0, 0.04);
-		padding: 15px;
-	}
-}
-</style>

Файловите разлики са ограничени, защото са твърде много
+ 0 - 13586
bigdata2/src/pages/systemmanger/citydata.js


+ 68 - 430
bigdata2/src/router/index.js

@@ -8,32 +8,11 @@ Router.prototype.push = function push(location) {
   return originalPush.call(this, location).catch(err => err)
 }
 
-const Login = () => import('@/components/Login')
 const Index = () => import('@/components/Index')
 
-// --------------------------------------首页模块 --------------------------------------------------
-const Home01 = () => import( /* webpackChunkName: "shouye" */ '@/components/home/Home01')
-const Home02 = () => import( /* webpackChunkName: "shouye" */ '@/components/home/Home02')
-const MapView = () => import( /* webpackChunkName: "shouye" */ '@/components/home/MapView')
-
 // --------------------------------------个人中心 --------------------------------------------------
 const PersonMsg = () => import( /* webpackChunkName: "shouye" */ '@/pages/personage/personMsg')
 
-// --------------------------------------数据展示模块--------------------------------------------------
-const BfourSituations = () => import('@/Pages/bigdata/fourSituations/FourSituations')
-const BequipDistribute = () => import('@/Pages/bigdata/equipDistributeMap/EquipDistributeMap')
-const Bcbd = () => import('@/Pages/bigdata/bcbd/Bcbd')
-const Bqxz = () => import('@/Pages/bigdata/bqxz/Bqxz')
-const Bsy = () => import('@/Pages/bigdata/sy/Sy')
-const Bbzy = () => import('@/Pages/bigdata/bzy/Bzy')
-const Bhome = () => import('@/Pages/bigdata/home/index')
-
-
-// --------------------------------------环境监测模块--------------------------------------------------
-const EnvironmentMonitor = () => import( /* webpackChunkName: "qxz" */ '@/Pages/hjjc/environmentMonitor/EnvironmentMonitor')
-const HistoryData = () => import( /* webpackChunkName: "qxz" */ '@/Pages/hjjc/environmentMonitor/HistoryData')
-const Data24 = () => import( /* webpackChunkName: "qxz" */ '@/Pages/hjjc/environmentMonitor/Data24')
-
 
 // --------------------------------------测报模块---------------------------测报灯-----------------------
 const Cbd = () => import( /* webpackChunkName: "qxz" */ '@/Pages/forecasting/cbd/Cbd')
@@ -54,423 +33,82 @@ const Xycb = () => import( /* webpackChunkName: "xycb" */ '@/Pages/forecasting/x
 const xycbDataPhotos = () => import( /* webpackChunkName: "xycb" */ '@/Pages/forecasting/xycb/XycbDataPhotos')
 const xycbDataDetail = () => import( /* webpackChunkName: "xycb" */ '@/Pages/forecasting/xycb/XycbDataDetail')
 
-// --------------------------------------测报模块---------------------------糖醋测报-----------------------
-const Tccb = () => import( /* webpackChunkName: "tccb" */ '@/Pages/forecasting/tccb/Tccb')
-const TcDataDetail = () => import( /* webpackChunkName: "tccb" */ '@/Pages/forecasting/tccb/TcDataDetail')
-const TcDataPhotos = () => import( /* webpackChunkName: "tccb" */ '@/Pages/forecasting/tccb/TcDataPhotos')
-
-
-//---------------------------------------监控模块---------------------------监控-------------------------
-const Monitor = () => import( /* webpackChunkName: "monitor" */ '@/Pages/monitor/monitorSystem/Monitor')
-const PhotoView = () => import( /* webpackChunkName: "monitor" */ '@/Pages/monitor/monitorSystem/PhotoView')
 
 //---------------------------------------防治模块---------------------------杀虫灯-------------------------
 const Scd = () => import( /* webpackChunkName: "scd" */ '@/Pages/cure/scd/scd')
 const ScdDetail = () => import( /* webpackChunkName: "scd" */ '@/Pages/cure/scd/scdDetail')
 
-//---------------------------------------设备管理----------------------------------------------------
-const EquipDistribute = () => import( /* webpackChunkName: "equipmanger" */ '@/Pages/equipmanger/EquipDistribute')
-const EquipList = () => import( /* webpackChunkName: "equipmanger" */ '@/Pages/equipmanger/EquipList')
-const UserList = () => import( /* webpackChunkName: "equipmanger" */ '@/Pages/equipmanger/UserList')
-//---------------------------------------系统管理----------------------------------------------------
-const UserManger = () => import('@/Pages/systemmanger/UserManger')
-const UserGroupManger = () => import('@/Pages/systemmanger/UserGroupManger')
-const Role = () => import('@/Pages/systemmanger/Role')
-const AgentDistribute = () => import('@/Pages/systemmanger/AgentDistribute')
-const CbdDistinguish = () => import('@/Pages/systemmanger/CbdDistinguish')
-const DayRecord = () => import('@/Pages/systemmanger/DayRecord')
-const Warning = () => import('@/Pages/systemmanger/Warning')
-
-//---------------------------------------溯源模块------------------------------农场管理----------------------
-const FarmUserManger = () => import('@/Pages/symanger/farm/User')
-const FarmFieldsManger = () => import('@/Pages/symanger/farm/Fields')
-const FarmBaseManger = () => import( /* webpackChunkName: "syFarmBase" */ '@/Pages/symanger/farm/Base')
-const FarmAddBase = () => import( /* webpackChunkName: "syFarmBase" */ '@/Pages/symanger/farm/AddBase')
-const FarmEditBase = () => import( /* webpackChunkName: "syFarmBase" */ '@/Pages/symanger/farm/EditBase')
-
-//---------------------------------------溯源模块------------------------------溯源信息----------------------
-const ResultInfoList = () => import( /* webpackChunkName: "resultInfo" */ '@/Pages/symanger/resultInfo/resultInfoList')
-const ResultInfoEdit = () => import( /* webpackChunkName: "resultInfo" */ '@/Pages/symanger/resultInfo/resultInfoEdit')
-const TracebackDetail = () => import( /* webpackChunkName: "resultInfo" */ '@/Pages/symanger/resultInfo/tracebackDetail')
-const TracebackDetailApp = () => import( /* webpackChunkName: "resultInfo" */ '@/Pages/symanger/resultInfo/tracebackDetailApp')
-
-//---------------------------------------溯源模块------------------------------农事管理----------------------
-const FarmThingPlant = () => import('@/Pages/symanger/farmThing/plant')
-const FarmThingspray = () => import('@/Pages/symanger/farmThing/spray')
-const FarmThingApplyFertilizer = () => import('@/Pages/symanger/farmThing/applyFertilizer')
-const FarmThingWatering = () => import('@/Pages/symanger/farmThing/watering')
-const FarmThingHarvest = () => import('@/Pages/symanger/farmThing/harvest')
-const FarmThingMore = () => import('@/Pages/symanger/farmThing/more')
-const FarmThingStockIn = () => import('@/Pages/symanger/farmThing/stockIn')
-const FarmThingStockOut = () => import('@/Pages/symanger/farmThing/stockOut')
-const FarmThingStock = () => import('@/Pages/symanger/farmThing/stock')
-const FarmThingSale = () => import('@/Pages/symanger/farmThing/sale')
-const FarmThingTransport = () => import('@/Pages/symanger/farmThing/transport')
-//---------------------------------------四情基地管理----------------------------------------------------
-const FourMoodBase = () => import('@/Pages/fourMoodBase/BaseManage')
-const BaseShow = () => import('@/Pages/fourMoodBase/BaseShow')
-//---------------------------------------专家诊断----------------------------------------------------
-import ExpertAnswers from '@/pages/expertDiagnosis/expertAnswers/ExpertAnswers'
-import ExpertDatabase from '@/pages/expertDiagnosis/expertDatabase/ExpertDatabase'
-import ExpertIntr from '@/pages/expertDiagnosis/expertIntr/ExpertIntr'
-import PicRec from '@/pages/expertDiagnosis/picRec/PicRec'
-import expertAudit from '@/pages/expertDiagnosis/expertAudit/expertAudit'
-import expertWriteBack from '@/pages/expertDiagnosis/expertWriteBack/expertWriteBack'
-//---------------------------------------售后服务----------------------------------------------------
-import SaleAppli from '@/pages/afterSale/SaleAppli'
-import SaleAfterDetail from '@/pages/afterSale/SaleAfterdetail'
-import SaleAllotPeople from '@/pages/afterSale/AllotPeople'
-import ProgressInquiry from '@/pages/afterSale/ProgressInquiry'
-import MRecords from '@/pages/afterSale/MRecords'
-
-
 Vue.use(Router)
 
 export default new Router({
   routes: [{
-      path: '',
-      redirect: '/login'
-    },
-    {
-      path: '/login',
-      component: Login
-    },
-    // -----------------大数据展示------------------------ 
-    {
-      path: '/bFourSituations',
-      component: BfourSituations
-    },
-    {
-      path: '/equipDistribute',
-      component: BequipDistribute
-    },
-    {
-      path: '/bCbd',
-      component: Bcbd,
-    },
-    {
-      path: '/bQxz',
-      component: Bqxz
-    },
-    {
-      path: '/bSy',
-      component: Bsy
-    },
-    {
-      path: '/bBzy',
-      component: Bbzy
-    },
-    {
-      path: '/bHome',
-      component: Bhome
-    },
-    {
-      path: '/index',
-      component: Index,
-      children: [{
-          path: '',
-          redirect: (window.sessionStorage.getItem('activePath') || '/index/home')
-        }, {
-          path: 'home',
-          component: Home01
-        },
-        {
-          path: 'home02',
-          component: Home02
-        },
-        {
-          path: 'mapView',
-          component: MapView
-        },
-        {
-          path: 'personMsg',
-          component: PersonMsg
-        },
-        // -----------------环境监测模块------------------------
-        {
-          path: 'envi',
-          component: EnvironmentMonitor
-        },
-        {
-          path: 'historyData/:id',
-          component: HistoryData
-        },
-        {
-          path: 'data24/:id',
-          component: Data24
-        },
-        // -----------------测报模块------------测报灯------------
-        {
-          path: 'cbd',
-          component: Cbd
-        },
-        {
-          path: 'cbdDataDetails/:e_id/:d_id',
-          component: CbdDataDetails
-        },
-        {
-          path: 'cbdDataPhotos/:id',
-          component: cbdDataPhotos
-        },
-        {
-          path: 'cbdhistorydata',
-          component: CbdHistoryData
-        },
-        {
-          path: 'pestsStats/:id',
-          component: PestsStats
-        },
-        {
-          path: 'messageWarn/:id',
-          component: MessageWarn
-        },
-        //------------------测报模块-------------监控-------------
-        {
-          path: 'monitor',
-          component: Monitor,
-        },
-        {
-          path: 'photoView/:id',
-          component: PhotoView
-        },
-        //------------------测报模块-------------孢子仪-------------
-        {
-          path: 'bzy',
-          component: Bzy
-        },
-        {
-          path: 'bzyPhotos/:id',
-          component: BzyPhotos
-        },
-        {
-          path: 'dataDetail/:e_id/:d_id',
-          component: DataDetail
-        },
-        //------------------测报模块-------------性诱测报-------------
-        {
-          path: 'xycb',
-          component: Xycb
-        },
-        {
-          path: 'xycbDataPhotos/:id',
-          component: xycbDataPhotos
-        },
-        {
-          path: 'xycbDataDetail/:e_id/:d_id',
-          component: xycbDataDetail
-        },
-        //------------------测报模块-------------糖醋测报-------------
-        {
-          path: 'tccb',
-          component: Tccb
-        },
-        {
-          path: 'tcDataPhotos/:id',
-          component: TcDataPhotos
-        },
-        {
-          path: 'tcDataDetail/:e_id/:d_id',
-          component: TcDataDetail
-        },
-        //------------------防治模块-------------杀虫灯-------------
-        {
-          path: 'scd',
-          component: Scd
-        },
-        {
-          path: 'scdDetail/:e_id/:d_id',
-          component: ScdDetail
-        },
-        //------------------设备管理--------------------------
-        {
-          path: 'equipdis/:id',
-          component: EquipDistribute
-        },
-        {
-          path: 'equipList',
-          component: EquipList
-        },
-        {
-          path: 'userList',
-          component: UserList
-        },
-        //------------------系统管理--------------------------
-        {
-          path: 'userManger',
-          component: UserManger,
-          meta: {
-            login_require: false,
-          }
-        },
-        {
-          path: 'userGroupManger',
-          component: UserGroupManger
-        },
-        {
-          path: 'role',
-          component: Role
-        },
-        {
-          path: 'agentDistribute',
-          component: AgentDistribute
-        },
-        {
-          path: 'cbdDistinguish',
-          component: CbdDistinguish
-        },
-        {
-          path: 'dayRecord',
-          component: DayRecord
-        },
-        {
-          path: 'warning',
-          component: Warning
-        },
-        //-------------------溯源模块-----------农场管理----------
-        {
-          path: 'farmUserManger',
-          component: FarmUserManger
-        },
-        {
-          path: 'farmFieldsManger',
-          component: FarmFieldsManger
-        },
-        {
-          path: 'farmBaseManger',
-          component: FarmBaseManger
-        },
-        {
-          path: 'farmAddBase',
-          component: FarmAddBase
-        },
-        {
-          path: 'farmEditBase',
-          component: FarmEditBase
-        },
-        //-------------------溯源模块-----------溯源信息----------
-        {
-          path: 'resultInfoList',
-          component: ResultInfoList
-        },
-        {
-          path: 'resultInfoEdit',
-          component: ResultInfoEdit
-        },
-        //-------------------溯源模块-----------农事管理----------
-        {
-          path: 'farmThingPlant',
-          component: FarmThingPlant
-        },
-        {
-          path: 'farmThingspray',
-          component: FarmThingspray
-        },
-        {
-          path: 'farmThingApplyFerti',
-          component: FarmThingApplyFertilizer
-        },
-        {
-          path: 'farmThingWatering',
-          component: FarmThingWatering
-        },
-        {
-          path: 'farmThingHarvest',
-          component: FarmThingHarvest
-        },
-        {
-          path: 'farmThingMore',
-          component: FarmThingMore
-        },
-        {
-          path: 'farmThingStockIn',
-          component: FarmThingStockIn
-        },
-        {
-          path: 'farmThingStockOut',
-          component: FarmThingStockOut
-        },
-        {
-          path: 'farmThingStock',
-          component: FarmThingStock
-        },
-        {
-          path: 'farmThingSale',
-          component: FarmThingSale
-        },
-        {
-          path: 'farmThingTransport',
-          component: FarmThingTransport
-        },
-        //-------------------四情基地管理---------------------
-        {
-          path: 'fourMoodBase',
-          component: FourMoodBase
-        },
-        {
-          path: 'baseShow',
-          component: BaseShow
-        },
-        //-------------------专家诊断---------------------
-        {
-          path: 'expertAnswers',
-          component: ExpertAnswers
-        },
-        {
-          path: 'expertDatabase',
-          component: ExpertDatabase
-        },
-        {
-          path: 'expertIntr',
-          component: ExpertIntr
-        },
-        {
-          path: 'picRec',
-          component: PicRec
-        },
-        {
-          path: 'expertAudit',
-          component: expertAudit
-        },
-        {
-          path: 'expertWriteBack',
-          component: expertWriteBack
-        },
-        //-------------------专家诊断---------------------
-        //-------------------售后管理---------------------
-        {
-          path: 'saleAppli',
-          component: SaleAppli
-        },
-        {
-          path: 'saleAfterDetail',
-          component: SaleAfterDetail
-        },
-        {
-          path: 'saleAllotPeople',
-          component: SaleAllotPeople
-        },
-        {
-          path: 'progressInquiry',
-          component: ProgressInquiry
-        },
-        {
-          path: 'mRecords',
-          component: MRecords
-        },
-      ]
-    },
-    //-------------------溯源模块-----------溯源中心----------
-    {
-      path: '/tracebackDetail/:backcode',
-      component: TracebackDetail,
-    },
-    {
-      path: '/tracebackDetailApp/:backcode',
-      component: TracebackDetailApp,
-      meta: {
-        login_require: false,
-      }
-    },
-  ],
+    path: '/index',
+    component: Index,
+    children: [{
+        path: 'personMsg',
+        component: PersonMsg
+      },
+      // -----------------测报模块------------测报灯------------
+      {
+        path: 'cbd',
+        component: Cbd
+      },
+      {
+        path: 'cbdDataDetails/:e_id/:d_id',
+        component: CbdDataDetails
+      },
+      {
+        path: 'cbdDataPhotos/:id',
+        component: cbdDataPhotos
+      },
+      {
+        path: 'cbdhistorydata',
+        component: CbdHistoryData
+      },
+      {
+        path: 'pestsStats/:id',
+        component: PestsStats
+      },
+      {
+        path: 'messageWarn/:id',
+        component: MessageWarn
+      },
+      //------------------测报模块-------------孢子仪-------------
+      {
+        path: 'bzy',
+        component: Bzy
+      },
+      {
+        path: 'bzyPhotos/:id',
+        component: BzyPhotos
+      },
+      {
+        path: 'dataDetail/:e_id/:d_id',
+        component: DataDetail
+      },
+      //------------------测报模块-------------性诱测报-------------
+      {
+        path: 'xycb',
+        component: Xycb
+      },
+      {
+        path: 'xycbDataPhotos/:id',
+        component: xycbDataPhotos
+      },
+      {
+        path: 'xycbDataDetail/:e_id/:d_id',
+        component: xycbDataDetail
+      },
+      //------------------防治模块-------------杀虫灯-------------
+      {
+        path: 'scd',
+        component: Scd
+      },
+      {
+        path: 'scdDetail/:e_id/:d_id',
+        component: ScdDetail
+      },
+    ]
+  }, ],
   // mode:'history'
 })

Файловите разлики са ограничени, защото са твърде много
+ 0 - 47
bigdata2/src/util/http.js