浏览代码

项目删减

yf_zd 5 年之前
父节点
当前提交
f0f47c7d07
共有 100 个文件被更改,包括 155 次插入68239 次删除
  1. 3 3
      config/index.js
  2. 1 1
      index.html
  3. 0 82
      src/components/DateSearch/index.vue
  4. 0 39
      src/components/EquipItem/index.vue
  5. 148 321
      src/components/Index.vue
  6. 0 129
      src/components/SearchBar/index.vue
  7. 0 121
      src/components/editor/Editor.vue
  8. 0 523
      src/components/home/Home01.vue
  9. 0 549
      src/components/home/Home02.vue
  10. 0 1371
      src/components/home/MapView.vue
  11. 0 431
      src/components/home/chart.js
  12. 2 2
      src/main.js
  13. 0 139
      src/pages/afterSale/AllotPeople.vue
  14. 0 18
      src/pages/afterSale/MRecords.vue
  15. 0 18
      src/pages/afterSale/ProgressInquiry.vue
  16. 0 368
      src/pages/afterSale/SaleAfterdetail.vue
  17. 0 476
      src/pages/afterSale/SaleAppli.vue
  18. 0 1799
      src/pages/bigdata/bcbd/Bcbd.vue
  19. 0 401
      src/pages/bigdata/bcbd/chart.js
  20. 0 899
      src/pages/bigdata/bqxz/Bqxz.vue
  21. 0 350
      src/pages/bigdata/bqxz/charts.js
  22. 0 712
      src/pages/bigdata/bzy/Bzy.vue
  23. 0 332
      src/pages/bigdata/bzy/chart.js
  24. 0 6
      src/pages/bigdata/bzy/jquery-2.0.2.min.js
  25. 0 688
      src/pages/bigdata/equipDistributeMap/EquipDistributeMap.vue
  26. 0 381
      src/pages/bigdata/equipDistributeMap/china-main-city-map.js
  27. 0 400
      src/pages/bigdata/equipDistributeMap/coord.js
  28. 0 1092
      src/pages/bigdata/fourSituations/FourSituations.vue
  29. 0 392
      src/pages/bigdata/fourSituations/chart.js
  30. 0 268
      src/pages/bigdata/home/index.vue
  31. 0 984
      src/pages/bigdata/sy/Sy.vue
  32. 0 170
      src/pages/bigdata/sy/chart.js
  33. 0 897
      src/pages/cure/scd/scd.vue
  34. 0 509
      src/pages/cure/scd/scdDetail.vue
  35. 0 268
      src/pages/equipmanger/EquipDistribute.vue
  36. 0 458
      src/pages/equipmanger/EquipList.vue
  37. 0 199
      src/pages/equipmanger/UserList.vue
  38. 0 502
      src/pages/expertDiagnosis/expertAnswers/ExpertAnswers.vue
  39. 0 702
      src/pages/expertDiagnosis/expertAudit/expertAudit.vue
  40. 0 910
      src/pages/expertDiagnosis/expertDatabase/ExpertDatabase copy.vue
  41. 0 1520
      src/pages/expertDiagnosis/expertDatabase/ExpertDatabase.vue
  42. 0 687
      src/pages/expertDiagnosis/expertIntr/ExpertIntr.vue
  43. 0 519
      src/pages/expertDiagnosis/expertWriteBack/expertWriteBack.vue
  44. 0 812
      src/pages/expertDiagnosis/picRec/PicRec.vue
  45. 0 344
      src/pages/expertDiagnosis/posts/PostDetail.vue
  46. 0 450
      src/pages/expertDiagnosis/posts/PostList.vue
  47. 0 1004
      src/pages/forecasting/bzy/Bzy.vue
  48. 0 366
      src/pages/forecasting/bzy/BzyPhotos.vue
  49. 0 429
      src/pages/forecasting/bzy/DataDetail.vue
  50. 0 829
      src/pages/forecasting/cbd/Cbd.vue
  51. 0 908
      src/pages/forecasting/cbd/DataDetails.vue
  52. 0 647
      src/pages/forecasting/cbd/MessageWarn.vue
  53. 0 1460
      src/pages/forecasting/cbd/PestsStats copy.vue
  54. 0 1085
      src/pages/forecasting/cbd/PestsStats.vue
  55. 0 1170
      src/pages/forecasting/cbd/cbdDataPhotos.vue
  56. 0 436
      src/pages/forecasting/tccb/TcDataDetail.vue
  57. 0 329
      src/pages/forecasting/tccb/TcDataPhotos.vue
  58. 0 641
      src/pages/forecasting/tccb/Tccb.vue
  59. 0 336
      src/pages/forecasting/xycb/XycbDataPhotos.vue
  60. 0 911
      src/pages/forecasting/xycb/xycb.vue
  61. 0 643
      src/pages/forecasting/xycb/xycbDataDetail.vue
  62. 0 760
      src/pages/fourMoodBase/baseManage.vue
  63. 0 1404
      src/pages/fourMoodBase/baseShow.vue
  64. 0 91
      src/pages/hjjc/environmentMonitor/Data24.vue
  65. 0 1067
      src/pages/hjjc/environmentMonitor/EnvironmentMonitor.vue
  66. 0 381
      src/pages/hjjc/environmentMonitor/HistoryData.vue
  67. 0 558
      src/pages/monitor/monitorSystem/Monitor.vue
  68. 0 117
      src/pages/monitor/monitorSystem/PhotoView.vue
  69. 0 13586
      src/pages/personage/citydata.js
  70. 0 296
      src/pages/personage/personMsg.vue
  71. 0 3
      src/pages/symanger/resultInfo/resultInfoList.vue
  72. 0 18
      src/pages/systemmanger/AgentDistribute.vue
  73. 0 18
      src/pages/systemmanger/CbdDistinguish.vue
  74. 0 170
      src/pages/systemmanger/DayRecord.vue
  75. 0 314
      src/pages/systemmanger/Role.vue
  76. 0 755
      src/pages/systemmanger/UserGroupManger.vue
  77. 0 953
      src/pages/systemmanger/UserManger.vue
  78. 0 363
      src/pages/systemmanger/Warning.vue
  79. 0 13586
      src/pages/systemmanger/citydata.js
  80. 1 363
      src/router/index.js
  81. 二进制
      static/images/cure/scd/stateIcon/1.png
  82. 二进制
      static/images/cure/scd/stateIcon/10.png
  83. 二进制
      static/images/cure/scd/stateIcon/11.png
  84. 二进制
      static/images/cure/scd/stateIcon/12.png
  85. 二进制
      static/images/cure/scd/stateIcon/2.png
  86. 二进制
      static/images/cure/scd/stateIcon/3.png
  87. 二进制
      static/images/cure/scd/stateIcon/4.png
  88. 二进制
      static/images/cure/scd/stateIcon/5.png
  89. 二进制
      static/images/cure/scd/stateIcon/6.png
  90. 二进制
      static/images/cure/scd/stateIcon/7.png
  91. 二进制
      static/images/cure/scd/stateIcon/8.png
  92. 二进制
      static/images/cure/scd/stateIcon/9.png
  93. 二进制
      static/images/expertDiagnosis/ku/1.png
  94. 二进制
      static/images/expertDiagnosis/ku/2.png
  95. 二进制
      static/images/expertDiagnosis/ku/3.png
  96. 二进制
      static/images/expertDiagnosis/qiyu/1.png
  97. 二进制
      static/images/expertDiagnosis/qiyu/2.png
  98. 二进制
      static/images/expertDiagnosis/qiyu/3.png
  99. 二进制
      static/images/expertDiagnosis/qiyu/4.png
  100. 0 0
      static/images/expertDiagnosis/qiyu/5.png

+ 3 - 3
config/index.js

@@ -11,8 +11,8 @@ module.exports = {
     assetsPublicPath: '/',
     proxyTable: {
       '/api': {
-        // target: 'http://192.168.1.120:8001/',
-        target: 'http://192.168.1.8:8000/',
+        target: 'http://192.168.1.120:8001/',
+        // target: 'http://192.168.1.8:8000/',
         changeOrigin: true,
         pathRewrite: {
           '^/api': '/api'   //重写接口
@@ -48,7 +48,7 @@ module.exports = {
       // },
     },
     // Various Dev Server settings
-    host: '192.168.1.5', // can be overwritten by process.env.HOST
+    host: '192.168.1.12', // 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,

+ 1 - 1
index.html

@@ -7,7 +7,7 @@
     <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
     <title></title>
   </head>
-  <body class="custom-ffffff">
+  <body class="">
     <div id="app"></div>
     <!-- built files will be auto injected -->
   </body>

+ 0 - 82
src/components/DateSearch/index.vue

@@ -1,82 +0,0 @@
-<template>
-	<div>
-		<el-button
-			:type="btnSelected == '1'?'primary':'default'"
-			size="mini"
-			@click="timeBtnClick(1)"
-		>24小时</el-button>
-		<el-button :type="btnSelected == '2'?'primary':'default'" size="mini" @click="timeBtnClick(2)">近一月</el-button>
-		<el-button :type="btnSelected == '3'?'primary':'default'" size="mini" @click="timeBtnClick(3)">近半年</el-button>
-		<el-button :type="btnSelected == '4'?'primary':'default'" size="mini" @click="timeBtnClick(4)">近一年</el-button>
-		<el-date-picker
-			size="mini"
-			v-model="timeRange"
-			type="daterange"
-			range-separator="至"
-			start-placeholder="开始日期"
-			end-placeholder="结束日期"
-			@change="DateChange"
-		></el-date-picker>
-	</div>
-</template>
-
-<script>
-export default {
-	data() {
-		return {
-			btnSelected: '2',
-			queryInfo: {
-				begin: '',
-				end: ''
-			},
-			timeRange: ''
-		}
-	},
-	mounted(){
-		this.timeBtnClick(2)
-	},
-	methods: {
-		//筛选时间
-		timeBtnClick(i) {
-			this.btnSelected = i
-			this.timeRange = ''
-			if (i == 1) {
-				this.queryInfo.begin = parseInt((Date.now() - 24 * 3600000) / 1000)
-				this.queryInfo.end = parseInt(Date.now() / 1000)
-			} else if (i == 2) {
-				this.queryInfo.begin = parseInt((Date.now() - 24 * 3600000 * 30) / 1000)
-				this.queryInfo.end = parseInt(Date.now() / 1000)
-			} else if (i == 3) {
-				this.queryInfo.begin = parseInt(
-					(Date.now() - 24 * 3600000 * 30 * 6) / 1000
-				)
-				this.queryInfo.end = parseInt(Date.now() / 1000)
-			} else if (i == 4) {
-				this.queryInfo.begin = parseInt(
-					(Date.now() - 24 * 3600000 * 30 * 12) / 1000
-				)
-				this.queryInfo.end = parseInt(Date.now() / 1000)
-            }
-			this.$emit('dateChange',this.queryInfo)
-		},
-		DateChange() {
-			this.btnSelected = null
-			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.$emit('dateChange',this.queryInfo)
-		}
-	}
-}
-</script>
-
-<style lang='less' scoped>
-</style>

+ 0 - 39
src/components/EquipItem/index.vue

@@ -1,39 +0,0 @@
-<template>
-   <div class="equipItem">
-      <slot name='set'></slot> 
-      <div :class="{'titleOn':is_online==1,'titleOff':is_online==0}"><slot name="title"></slot></div> 
-      <slot name="content"></slot>
-   </div>
-</template>
-
-<script>
-    export default {
-        data(){
-            return {
-            }
-        },
-        props:{
-            is_online:{
-                type:Number,
-                },
-        },
-    }
-</script>
-
-<style lang='less' scoped>
-.equipItem {
-   position: relative;
-   .titleOn{font-size:16px;font-weight:800;color:#555;border-left:5px solid #17bb89;padding-left:20px;margin-left:-20px;}
-   .titleOff{font-size:16px;font-weight:800;color:#555;border-left:5px solid rgb(235, 103, 101);padding-left:20px;margin-left:-20px;}
-   .content{
-        margin-top:15px;
-        color:#777;
-        font-size:14px;
-        line-height:35px;
-        i.iconfont{color:#ccc;margin-right:15px;display:inline-block;line-height:34px}
-        .el-icon-edit{color:#17bb89;padding-left:5px;cursor:pointer;}
-        .btns-right{text-align:right}
-    }
-   .superOperate{position:absolute;top:0;right:0;color:#17bb89;cursor:pointer;font-size:20px;}
-}
-</style>

+ 148 - 321
src/components/Index.vue

@@ -1,155 +1,20 @@
 <template>
 	<el-container style="height: 100%">
 		<el-header>
-			<div class="sys-name">
-				<img src="../assets/images/logo.png" @click="collapseFun" />
-				智慧农业大数据平台
-			</div>
 			<div class="navbarBtn">
-				<!-- 轮播消息 -->
-				<!-- <div class="messageFrame">
-					<el-carousel
-						height="50px"
-						:interval="5000"
-						direction="vertical"
-						:autoplay="true"
-					>
-						<el-carousel-item v-for="item in 3" :key="item">
-							<div class="medium">
-								<i
-									style="font-size: 23px; float: left"
-									class="iconfont icon-xinxi1"
-								></i
-								>:太阳能气象站监测终端指标预警太阳能气象站监测终端指标预警太阳能气象站监测终端指标预警
-							</div>
-						</el-carousel-item>
-					</el-carousel>
-				</div> -->
-				<div class="userInfoBtns">
-					<!-- 更换首页 -->
-					<div class="iconFont">
-						<i
-							@click="changeHomedialogVisible = true"
-							class="iconfont icon-BAI-wuzi"
-						></i>
-					</div>
-					<!-- 更换皮肤 -->
-					<!-- <div class="iconFont">
-						<el-dropdown
-							@command="handleCommand"
-							placement="bottom"
-							trigger="click"
-						>
-							<span class="el-dropdown-link">
-								<i class="iconfont icon-zhuti_tiaosepan_o"></i>
-							</span>
-							<el-dropdown-menu slot="dropdown">
-								<el-dropdown-item command="ffffff">深色</el-dropdown-item>
-								<el-dropdown-item command>浅色</el-dropdown-item>
-							</el-dropdown-menu>
-						</el-dropdown>
-					</div> -->
-					<!-- 铃铛 -->
-					<!-- <div class="iconFont">
-						<el-dropdown
-							@command="handleCommand"
-							placement="bottom-end"
-							trigger="click"
-						>
-							<span class="el-dropdown-link">
-								<el-badge is-dot class="item">
-									<i class="iconfont icon-icon_huabanfuben"></i>
-								</el-badge>
-							</span>
-							<el-dropdown-menu slot="dropdown" class="newsDropdown">
-								<h5>2016 新的系统通知</h5>
-								<div>
-									<ul>
-										<li class="news">
-											<div class="txtContent">
-												<a href
-													>太阳能气象站监测终端指标预警太阳能气象站监测终端指标预警太阳能气象站监测终端指标预警</a
-												>
-											</div>
-											<el-badge value="new" class="item"></el-badge>
-										</li>
-										<li class="news">
-											<div class="txtContent">
-												<a href>太阳能气象站监测终端指标预警太阳指标预警</a>
-											</div>
-											<el-badge value="new" class="item"></el-badge>
-										</li>
-										<li class="news">
-											<div class="txtContent">
-												<a href>终端指标预警</a>
-											</div>
-											<el-badge value="new" class="item"></el-badge>
-										</li>
-										<li class="news">
-											<div class="txtContent">
-												<a href>太阳能气象站监测</a>
-											</div>
-											<el-badge value="new" class="item"></el-badge>
-										</li>
-										<li class="news">
-											<div class="txtContent">
-												<a href>太阳能气象站监测终端指标预警太阳能</a>
-											</div>
-											<el-badge value="new" class="item"></el-badge>
-										</li>
-										<li class="news">
-											<div class="txtContent">
-												<a href style="color: #2489c5">查看全部系统通知</a>
-											</div>
-										</li>
-									</ul>
-								</div>
-							</el-dropdown-menu>
-						</el-dropdown>
-					</div> -->
-					<!-- 用户 -->
+				<!-- 用户 -->
+				<div class="userinfo">
+					<img :src="userphoto" class="userheadImg" alt="" />{{ username }}
+				</div>
+				<!-- 标题 -->
+				<div class="caption">
+					<div class="tit">农产品溯源系统  助力绿色农业发展  为您的健康保驾护航</div>
 					<div>
-						<el-dropdown trigger="click" @command="dropdownHandle">
-							<span class="el-dropdown-link" style="cursor: pointer">
-								{{ username }}
-								<i class="el-icon-arrow-down el-icon--right"></i>
-							</span>
-							<el-dropdown-menu slot="dropdown">
-								<el-dropdown-item command="personMsg"
-									>个人中心</el-dropdown-item
-								>
-								<el-dropdown-item command="editPwd">修改密码</el-dropdown-item>
-								<el-dropdown-item command="outSys">退出</el-dropdown-item>
-							</el-dropdown-menu>
-						</el-dropdown>
+						Agricultural products traceability system to help the development of green agriculture for your health escort
 					</div>
 				</div>
 			</div>
 		</el-header>
-		<!-- 更换首页HTML -->
-		<el-dialog
-			title="更换首页"
-			:visible.sync="changeHomedialogVisible"
-			width="30%"
-			@close="changeHomeDialogClosed"
-		>
-			<el-row :gutter="20">
-				<el-col :span="12" v-for="(item, index) in homeList" :key="index">
-					<div class="grid-content changeHomeItem" @click="changeHome(index)">
-						<div>
-							<img :src="item.img" />
-						</div>
-						<div class="tit">{{ item.name }}</div>
-					</div>
-				</el-col>
-			</el-row>
-			<span slot="footer" class="dialog-footer">
-				<el-button @click="changeHomedialogVisible = false">取 消</el-button>
-				<el-button type="primary" @click="changeHomedialogVisible = false"
-					>确 定</el-button
-				>
-			</span>
-		</el-dialog>
 		<!-- 修改密码对话框 -->
 		<el-dialog
 			title="重置密码"
@@ -183,25 +48,6 @@
 		</el-dialog>
 		<el-container style="overflow: auto">
 			<!-- 菜单 -->
-			<el-aside :width="isCollapse ? '0px' : '200px'" class="sysAside">
-				<el-menu
-					default-active="2"
-					class="el-menu-vertical-demo"
-					:router="isRouter"
-					:collapse-transition="true"
-					active-text-color="rgb(57, 249, 190)"
-				>
-					<el-submenu index="11">
-						<template slot="title">
-							<i class="iconfont icon-shujuzhanshi"></i>
-							<span>数据展示</span>
-						</template>
-						<el-menu-item index="" @click="goBD('/bHome')"
-							>投屏入口</el-menu-item
-						>
-					</el-submenu>
-				</el-menu>
-			</el-aside>
 			<el-aside width="200px">
 				<el-menu
 					:default-openeds="menuOpeneds"
@@ -212,17 +58,9 @@
 					:router="isRouter"
 					active-text-color="rgb(57, 249, 190)"
 				>
-					<el-menu-item
-						:index="selHome()"
-						v-for="item in menuList1"
-						:key="item.pur_id"
-					>
-						<i class="iconfont icon-shouye"></i>
-						<span slot="title">{{ item.purview_name }}</span>
-					</el-menu-item>
 					<el-submenu
 						:index="item.pur_id.toString()"
-						v-for="item in menuList2"
+						v-for="item in menuList1"
 						:key="item.pur_id"
 					>
 						<template slot="title">
@@ -244,10 +82,7 @@
 			</el-aside>
 			<el-container>
 				<el-main>
-					<keep-alive>
-						<router-view v-if="this.$route.meta.keepAlive"></router-view>
-					</keep-alive>
-					<router-view v-if="!this.$route.meta.keepAlive"></router-view>
+					<router-view></router-view>
 				</el-main>
 			</el-container>
 		</el-container>
@@ -277,9 +112,6 @@ export default {
 			}
 		}
 		return {
-			// refresh: true, //控制整个页面刷新
-			isCollapse: true,
-			widthHover: '0px',
 			isRouter: true,
 			// 被激活导航地址
 			// activePath:this.$store.state.activePath,
@@ -299,28 +131,102 @@ export default {
 				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: [], //出首页的其他菜单
-			// 被激活导航地址
+			menuOpeneds:['/index/farmBaseManger'],
+			menuList1: [{
+				menu: "",
+				parent_perm_id: 0,
+				pur_id: 46,
+				purview_name: "农场管理",
+				children:[
+					{
+						menu: "farmBaseManger",
+						parent_perm_id: 46,
+						pur_id: 80,
+						purview_name: "基地列表",
+					},
+					{
+						menu: "farmFieldsManger",
+						parent_perm_id: 46,
+						pur_id: 47,
+						purview_name: "地块管理",
+					}
+				]
+			},
+			{
+				menu: "",
+				parent_perm_id: 0,
+				pur_id: 48,
+				purview_name: "农事管理",
+				children:[
+					{
+						menu: "farmThingPlant",
+						parent_perm_id: 48,
+						pur_id: 49,
+						purview_name: "种植",
+					},
+					{
+						menu: "farmThingApplyFerti",
+						parent_perm_id: 48,
+						pur_id: 50,
+						purview_name: "施肥",
+					},
+					{
+						menu: "farmThingspray",
+						parent_perm_id: 48,
+						pur_id: 51,
+						purview_name: "喷药",
+					},
+					{
+						menu: "farmThingWatering",
+						parent_perm_id: 48,
+						pur_id: 52,
+						purview_name: "灌溉",
+					},
+					{
+						menu: "farmThingMore",
+						parent_perm_id: 48,
+						pur_id: 57,
+						purview_name: "更多",
+					},
+					{
+						menu: "farmThingHarvest",
+						parent_perm_id: 48,
+						pur_id: 53,
+						purview_name: "采收",
+					},
+					{
+						menu: "farmThingSale",
+						parent_perm_id: 48,
+						pur_id: 141,
+						purview_name: "销售",
+					},
+					{
+						menu: "farmThingTransport",
+						parent_perm_id: 48,
+						pur_id: 142,
+						purview_name: "运输",
+					}
+					
+				]
+			},
+			{
+				menu: "",
+				parent_perm_id: 0,
+				pur_id: 58,
+				purview_name: "溯源系统",
+				children:[
+					{
+						menu: "resultInfoList",
+						parent_perm_id: 58,
+						pur_id: 59,
+						purview_name: "溯源信息",
+					},
+				]
+			}], //首页菜单
 			// activePath:'',
 			username: '',
+			userphoto:'',
+			userHeadImg: '',
 			resetPassDialogVisible: false,
 			resetPassForm: {
 				oldPass: '',
@@ -334,44 +240,17 @@ export default {
 				newPass: [{ validator: validateNewPass, trigger: 'blur' }],
 				checkNewPass: [{ validator: validateCheckPass, trigger: 'blur' }]
 			},
-			menuOpeneds: []
 		}
 	},
 	created: function () {
-		// this.username = localStorage.getItem('username')
-		// this.getNavList()
-		// this.activePath=window.sessionStorage.getItem('activePath')
-		// document.body.className = window.sessionStorage.getItem('bodyCalss')
+		this.getuserinfo()
+		// this.$router.push('xycb')
 	},
 	computed: {
-		activePath: function () {
-			return this.$store.state.activePath
-		},
-		homePath: function () {
-			return this.$store.state.homePath
-		}
 	},
 	watch: {
-		'$route.path': function (newVal) {
-			if (
-				newVal == '/index/home' ||
-				newVal == '/index/home02' ||
-				newVal == '/index/mapView'
-			) {
-				this.menuOpeneds = []
-			}
-		}
 	},
 	mounted() {
-		// this.$EventBus.$on('refresh', (data) => {
-		// 	console.log('bus')
-		// 	this.refresh = false
-		// 	this.$nextTick( ()=> {
-		// 		this.refresh = true
-		// 	})
-		// })
-		this.username = localStorage.getItem('username')
-		this.getNavList()
 	},
 	methods: {
 		dropdownHandle(command) {
@@ -383,50 +262,23 @@ export default {
 				this.$router.push({ path: command })
 			}
 		},
-		getNavList() {
+		getuserinfo() {
 			this.$axios({
-				method: 'POST',
-				url: '/api/api_gateway?method=user.login.user_login_info'
+				method: 'post',
+				url: '/api/userinfo_'
 			}).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.username = res.data.username
+				this.userphoto = res.data.userphoto
 			})
 		},
-		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(_ => {});
+		getNavList() {
+			this.$axios({
+				method: 'GET',
+				url: '/api/home'
+			}).then((res) => {
+				let navList = res.data
+				this.menuList1 = navList
+			})
 		},
 		dropdownHandle(command) {
 			if (command == 'editPwd') {
@@ -481,10 +333,7 @@ export default {
 				})
 			})
 		},
-		collapseFun() {
-			this.isCollapse = !this.isCollapse
-			return this.isCollapse
-		},
+	
 		menuIndex(menu) {
 			if (menu == 'bFourSituations') {
 				return ''
@@ -534,14 +383,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
@@ -585,54 +426,38 @@ export default {
 	}
 }
 .el-header {
-	display: flex;
-	align-items: center;
-	justify-content: space-between;
+	height: 189px !important;
+	background: url(../assets/images/headBj.jpg) no-repeat center;
+	background-size: 100% 100%;
 	.navbarBtn {
-		display: flex;
-		justify-content: space-between;
-		align-items: center;
-		.messageFrame {
-			width: 300px;
-			.medium {
-				font-size: 14px;
-				margin: 1.2em 0;
-				white-space: nowrap;
-				overflow: hidden;
-				text-overflow: ellipsis;
+		color: #fff;
+		.userinfo {
+			text-align: right;
+			margin-top: 10px;
+			.userheadImg {
+				width: 35px;
+				height: 35px;
+				border-radius: 50%;
+				vertical-align: middle;
+				margin-right: 6px;
 			}
 		}
-		.userInfoBtns {
-			display: flex;
-			align-items: center;
-			justify-content: flex-end;
-			min-width: 200px;
-			.iconFont {
-				i {
-					font-size: 26px;
-					cursor: pointer;
-					margin-right:10px;
-				}
-			}
-			.item,
-			.item:hover {
-				animation: ringing 3s linear 5;
+		.caption {
+			margin-top: 7px;
+			text-align: center;
+			font-size: 16px;
+			letter-spacing: 0.5px;
+			.tit {
+				font-size: 20px;
+				line-height: 46px;
+				font-weight: 700;
+				letter-spacing: 7px;
 			}
 		}
 	}
-
-	.sys-name {
-		display: flex;
-		font-size: 20px;
-		font-weight: 600;
-		align-items: center;
-		line-height: 60px;
-		img {
-			height: 26px;
-			margin-right: 10px;
-			cursor: pointer;
-		}
-	}
+}
+/deep/.el-dropdown-menu__item {
+	padding: 0 10px;
 }
 .el-popper.newsDropdown {
 	padding: 0;
@@ -708,6 +533,8 @@ export default {
 	.el-menu {
 		border: none;
 	}
+	.iconfont {font-size:18px;margin-right:10px;}
+	.icon-chouchongbug{font-size:22px;}
 }
 .changeHomeItem {
 	text-align: center;

+ 0 - 129
src/components/SearchBar/index.vue

@@ -1,129 +0,0 @@
-<template>
-	<div class="check-btns">
-		<div class="type-check">
-			<slot name="type-check">
-				<el-button
-					:type="btnState == '1' ? 'primary' : 'default'"
-					size="mini"
-					@click="checkType(1)"
-					>图表</el-button
-				>
-				<el-button
-					:type="btnState == '2' ? 'primary' : 'default'"
-					size="mini"
-					@click="checkType(2)"
-					>列表</el-button
-				>
-			</slot>
-		</div>
-		<div class="search-box">
-			<slot name="search-common">
-				<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"
-						placeholder="请选择"
-						@change="selClear()"
-					>
-						<el-option label="设备ID" value="1"></el-option>
-						<el-option label="设备名" value="2"></el-option>
-					</el-select>
-				</el-input>
-				<el-select
-					v-model="is_online"
-					class="select01"
-					clearable
-					size="mini"
-					placeholder="请选择在线状态"
-					@change="isOnlineSelect()"
-				>
-					<el-option label="全部" value></el-option>
-					<el-option label="在线" value="1"></el-option>
-					<el-option label="离线" value="0"></el-option>
-				</el-select>
-			</slot>
-			<slot name="search-box"></slot>
-		</div>
-	</div>
-</template>
-
-<script>
-export default {
-	data() {
-		return {
-			selectItem: '1', //1设备号,2用户名
-			searchVal: '',
-			f_id: '',
-			ename: '',
-			is_online: null,
-			btnState:this.displayType
-		}
-	},
-	props:{
-		displayType:{
-			type:String
-		}
-	},
-	methods: {
-		checkType(i) {
-			this.btnState = i
-			this.$emit('fun', this.btnState)
-		},
-		// 搜索组合数据
-		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() {
-			if (this.searchVal) {
-				this.searchVal = ''
-				this.f_id = ''
-				this.ename = ''
-				this.$emit('fun2', { f_id: this.f_id, ename: this.ename })
-			}
-		},
-		isOnlineSelect() {
-			this.$emit('fun3', this.is_online)
-		}
-	}
-}
-</script>
-
-<style lang='less' scoped>
-.check-btns {
-	display: flex;
-	justify-content: space-between;
-	margin-bottom: 20px;
-	align-items: center;
-	.search-box {
-		text-align: right;
-		.el-input {
-			width: 400px;
-			vertical-align: middle;
-		}
-		.select01 {
-			width: 200px;
-			vertical-align: middle;
-		}
-		/deep/.select02 {
-			width: 86px;
-		}
-		.input-with-select {
-			width: 260px;
-		}
-	}
-}
-</style>

+ 0 - 121
src/components/editor/Editor.vue

@@ -1,121 +0,0 @@
-<template>
-	<div class="tinymce">
-		<editor
-			id="tinymce"
-			v-model="obj.sunHtml"
-			@input="inp()"
-			:init="init"
-		></editor>
-	</div>
-</template>
-
-<script>
-import axios from 'axios' // 因为上传图片地址是本地服务器  所以我们需要引入axios当然你也可以用原生ajax或fetch来发请求
-import tinymce from 'tinymce/tinymce' // 引入我们下载的tinymce包
-import '../../../static/tinymce/themes/modern/theme' //引入theme文件,必须要引入的
-import Editor from '@tinymce/tinymce-vue' // 必须要引官方给我们的配置vue包
-// 下方import引入都是文本编辑器中的配置项,这个根据个人需求去引入
-import '../../../static/tinymce/plugins/image'
-import '../../../static/tinymce/plugins/link'
-import '../../../static/tinymce/plugins/code'
-import '../../../static/tinymce/plugins/table'
-import '../../../static/tinymce/plugins/lists'
-import '../../../static/tinymce/plugins/contextmenu'
-import '../../../static/tinymce/plugins/wordcount'
-import '../../../static/tinymce/plugins/colorpicker'
-import '../../../static/tinymce/plugins/textcolor'
-export default {
-	name: 'tinymce',
-	// 因为我是在项目中使用的  所以这个时候我是采用了组件传值一系列方法来使用的
-	// 当然你可以直接就使用v-model来绑定  (data中直接定义上方的v-model双向绑定值即可)
-	props: {
-		// 父组件传递过来的值
-		tinymceHtml: {
-			// 类型我们给其定义为String类型
-			type: String
-		}
-	},
-	watch: {
-		// 我们需要定义一个监听器
-		tinymceHtml: {
-			deep: true, // 深度监听  可加可不加当你传递的是一个对象时,我们需要将深度监听加上
-			handler(newVal, oldVal) {
-				// 我在这里直接让v-model的值等于this.tinymceHtml父组件传递过来的值了,
-				// 当然你等于newVal也可以 这个时候我们就实现了sunHtml双绑值同步于父组件传递的tinymceHtml值
-				this.obj.sunHtml = this.tinymceHtml
-			}
-		}
-	},
-	data() {
-		return {
-			// 定义v-model双向绑定值,然后让其默认等于父组件传递过来的值
-			obj: { sunHtml: this.tinymceHtml, imgSrc: '' }, //通过接口返给的路径}
-			picUrl: '/api', // 上传到服务器后读取前缀路径(用于拼接显示使用的)
-			// tinymce配置项 着重将下方两个路径换掉就可以了
-			init: {
-				language_url: '/static/tinymce/zh_CN.js', // 配置中文的路径
-				language: 'zh_CN',
-				skin_url: '/static/tinymce/skins/lightgray', // 配置项的路径
-				height: 300,
-				plugins:
-					'link lists image code table colorpicker textcolor wordcount contextmenu',
-				toolbar:
-					'bold italic underline strikethrough | fontsizeselect | forecolor backcolor | alignleft aligncenter alignright alignjustify | bullist numlist | outdent indent blockquote | undo redo | link unlink image code | removeformat',
-				branding: false,
-				// 图片读取前缀路径
-				images_upload_base_path: this.picUrl,
-				// 图片本地上传方法  点击上传后执行的事件
-				images_upload_handler: (blobInfo, success, failure) => {
-					this.handleImgUpload(blobInfo, success, failure)
-				}
-			}
-		}
-	},
-	created() {
-		// 可写可不写  都行
-		this.obj.sunHtml = this.tinymceHtml
-	},
-	mounted() {
-		// 初始化tinymce
-		tinymce.init({})
-	},
-	methods: {
-		//子组件向父组件传值事件
-		inp() {
-			this.$emit('inp', this.obj)
-		},
-		// 上传本地 图片执行事件
-		handleImgUpload(blobInfo, success, failure) {
-			let formdata = new FormData()
-			// append 方法中的第一个参数就是 我们要上传文件 在后台接收的文件名
-			// 这个值要根据后台来定义
-			// 第二个参数是我们上传的文件
-			formdata.append('img_file', blobInfo.blob())
-			console.log(blobInfo.blob())
-			// axios 定义上传方法
-			axios({
-				method: 'post', // post方法
-				url: '/api/api_gateway?method=pest.pests.pests_img', // 请求上传图片服务器的路径
-				// headers: {
-				// // 配置headers请求头
-				//   Authorization: localStorage.getItem('logintoken'), // token认证,看后台
-				//   'Content-Type': 'application/x-www-form-urlencoded', // 采用表单上传的方式,看后台如何接受
-				// },
-				data: formdata // 请求数据formdata
-			}).then((res) => {
-				if (res.data.message != '') {
-					// 上传失败执行此方法,将失败信息填入参数中
-					failure('HTTP Error: ' + res.msg)
-					return
-				}
-				this.obj.imgSrc = res.data.data.src
-				// 上传成功之后,将对应完整的图片路径拼接在success的参数中,回显图片的地址
-				success(this.$host + res.data.data.src)
-			})
-		}
-	},
-	components: { Editor }
-}
-</script>
-<style></style>
-

+ 0 - 523
src/components/home/Home01.vue

@@ -1,523 +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,
-			equipList: [],
-			equip_id: '',
-			userinfo: {
-				name: '',
-				lastEnter: '',
-				at: '',
-				city: '',
-				type: '',
-				week: '',
-				time: ''
-			},
-			cascaderEquip: []
-		}
-	},
-	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
-	},
-	computed: {
-		username() {
-			return localStorage.getItem('username')
-		}
-	},
-	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.$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*1000))
-					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: 'POST',
-				url: '/api/api_gateway?method=home.homes.city_addr'
-			}).then((res) => {
-				if (res.data.message == '') {
-					var data = res.data.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
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 - 1371
src/components/home/MapView.vue


+ 0 - 431
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
-}

+ 2 - 2
src/main.js

@@ -50,8 +50,8 @@ import 'viewerjs/dist/viewer.css'
 // 样式
 import './assets/icon/iconfont.css'
 import './plugin/elementUi';
-import './assets/css/theme/ffffff/index.css' //皮肤一
-// import '../theme/index.css'  //皮肤一
+// import './assets/css/theme/ffffff/index.css' //皮肤一
+import '../theme/index.css'  //皮肤一
 
 //导入全局样式
 import './assets/css/global.css'

+ 0 - 139
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
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
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
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
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 - 1799
src/pages/bigdata/bcbd/Bcbd.vue


+ 0 - 401
src/pages/bigdata/bcbd/chart.js

@@ -1,401 +0,0 @@
-const option01 = {
-    tooltip: {
-      trigger: "axis",
-      axisPointer: {
-        lineStyle: {
-          color: "#dddc6b"
-        }
-      }
-    },
-    legend: {
-      top: "0%",
-      textStyle: {
-        color: "#fff",
-        fontSize: "12"
-      }
-    },
-    grid: {
-      left: "10",
-      top: "30",
-      right: "20",
-      bottom: "10",
-      containLabel: true
-    },
-
-    xAxis: [
-      {
-        type: "category",
-        boundaryGap: false,
-        axisLabel: {
-          textStyle: {
-            color: "#fff",
-            fontSize: 12
-          }
-        },
-        axisLine: {
-          lineStyle: {
-            color: "#fff"
-          }
-        },
-        data: [
-          "05-06",
-          "05-07",
-          "05-08",
-          "05-09",
-          "05-10",
-          "05-11",
-          "05-12",
-          "05-13",
-          "05-14",
-        ]
-      },
-      {
-        axisPointer: { show: false },
-        axisLine: { show: false },
-        position: "bottom",
-        offset: 0
-      }
-    ],
-
-    yAxis: [
-      {
-        type: "value",
-        axisTick: { show: false },
-        axisLine: {
-          lineStyle: {
-            color: "#fff"
-          }
-        },
-        axisLabel: {
-          textStyle: {
-            color: "#fff",
-            fontSize: 12
-          }
-        },
-        splitLine: {
-          show:false
-        }
-      }
-    ],
-    series: [
-      {
-        name: "环境湿度",
-        type: "line",
-        smooth: true,
-        symbol: "circle",  //标记的 图形
-        symbolSize: 5,
-        showSymbol: true,
-        lineStyle: {
-          normal: {
-            color: "#39b6e6",
-            width: 2
-          }
-        },
-        areaStyle: {
-          normal: {
-            color: {
-              type: 'linear',
-              x: 0,
-              y: 0,
-              x2: 0,
-              y2: 1,
-              colorStops: [{
-                      offset: 0, color: 'rgba(61, 196, 241, 1)' // 0% 处的颜色
-                  }, {
-                      offset: 0.8, color: 'rgba(61, 196, 241, 0.2)' // 100% 处的颜色
-                  }],
-                  global: false // 缺省为 false
-              },
-            shadowColor: "rgba(0, 0, 0, 0.1)"
-          }
-        },
-        itemStyle: {
-          normal: {
-            color: "#39b6e6",
-            borderColor: "#39b6e6",
-            borderWidth: 2
-          }
-        },
-        data: [
-          30,
-          40,
-          30,
-          40,
-          30,
-          40,
-          30,
-          60,
-          20,
-        ]
-      },
-      {
-        name: "环境温度",
-        type: "line",
-        smooth: true,
-        symbol: "circle",
-        symbolSize: 5,
-        showSymbol: true,
-        lineStyle: {
-          normal: {
-            color: "#c71881",
-            width: 2
-          }
-        },
-        itemStyle: {
-          normal: {
-            color: "#c71881",
-            borderColor: "#c71881",
-            borderWidth: 2
-          }
-        },
-        data: [
-          50,
-          30,
-          50,
-          60,
-          10,
-          50,
-          30,
-          50,
-          60,
-        ]
-      }
-    ]
-};
-
-const   option02 = {
-  color: ["#2f89cf"],
-//   color: ["#fd2f56"],
-  tooltip: {
-    trigger: "axis",
-    axisPointer: {
-      // 坐标轴指示器,坐标轴触发有效
-      type: "shadow" // 默认为直线,可选为:'line' | 'shadow'
-    }
-  },
-  grid: {
-    left: "10",
-    top: "10",
-    right: "10",
-    bottom: "5",
-    containLabel: true
-  },
-  xAxis: [
-    {
-      type: "category",
-      data: [
-        "05-01",
-        "05-02",
-        "05-03",
-        "05-04",
-        "05-05",
-        "05-06",
-        "05-07",
-        "05-08",
-        "05-09",
-        "05-10"
-      ],
-      axisTick: {
-        alignWithLabel: true
-      },
-      axisLabel: {
-        textStyle: {
-          color: "rgba(255,255,255,.6)",
-          fontSize: "12"
-        }
-      },
-      axisLine: {
-        show: false
-      }
-    }
-  ],
-  yAxis: [
-    {
-      type: "value",
-      axisLabel: {
-        textStyle: {
-          color: "rgba(255,255,255,.6)",
-          fontSize: "12"
-        }
-      },
-      axisLine: {
-        lineStyle: {
-          color: "rgba(255,255,255,.1)"
-          // width: 1,
-          // type: "solid"
-        }
-      },
-      splitLine: {
-        lineStyle: {
-          color: "rgba(255,255,255,.1)"
-        }
-      }
-    }
-  ],
-  series: [
-    {
-      name: "加热仓温度",
-      type: "bar",
-      barWidth: "12",
-      data: [200, 300, 300, 900, 1500, 1200, 600,200,400,800],
-      itemStyle: {
-        normal: {
-            barBorderRadius: 30,
-            color: {
-              type: 'linear',
-              x: 0,
-              y: 0,
-              x2: 0,
-              y2: 1,
-              colorStops: [{
-                    //   offset: 0, color: '#3fedcc' // 0% 处的颜色
-                      offset: 0, color: '#ff2a56' // 0% 处的颜色
-                  }, {
-                    //   offset: 1, color: '#086ce6' // 100% 处的颜色
-                      offset: 1, color: '#f77a42' // 100% 处的颜色
-                  }],
-                  global: false // 缺省为 false
-              },
-        },
-      },
-    }
-  ]
-};
-const option03 = {
-    "animation": true,
-    "title": {
-        "text": '24台',
-        "x": "center",
-        "y": "center",
-        "textStyle": {
-            "color": "#1e74fd",
-            // "fontSize": 20,
-            "fontSize": 15,
-            "fontWeight": "normal",
-            "align": "center",
-            "width": "100px"
-        },
-    },
-    "legend": {
-        "width": "90%",
-        "left": "center",
-        "textStyle": {
-            "color": "#666",
-            // "fontSize": 12
-            "fontSize": 10
-        },
-        "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
-                    "fontSize": 15
-                }
-            }
-        },
-        "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,
-                        "fontSize": 16,
-                        "lineHeight": 33
-                    },
-                    "c": {
-                        // "fontSize": 14,
-                        "fontSize": 13,
-                        "color": "#eee"
-                    },
-                    "per": {
-                        "color": "#FDF44E",
-                        // "fontSize": 25,
-                        "fontSize": 20,
-                        "padding": [5, 6],
-                        "borderRadius": 2
-                    }
-                }
-            }
-        },
-        "data": [{
-            "name": "苍蝇",
-            "value": 3
-        }, {
-            "name": "七星瓢虫",
-            "value": 7
-        }, {
-            "name": "草地贪夜蛾",
-            "value": 4
-        }, {
-            "name": "稻飞虱",
-            "value": 10
-        }]
-    }]
-} 
-
-export {option01,option02,option03}

+ 0 - 899
src/pages/bigdata/bqxz/Bqxz.vue

@@ -1,899 +0,0 @@
-<template>
-	<div class="wrap" :style="{ backgroundImage: 'url(' + bodyBg + ')' }">
-		<div
-			class="header"
-			:style="{ backgroundImage: 'url(' + headerBg + ')' }"
-		></div>
-		<div class="content">
-			<div class="left">
-				<div class="lTop">
-					<div class="tit" :style="{ backgroundImage: 'url(' + titBg + ')' }">
-						设备信息
-					</div>
-					<div class="con">
-						<ul>
-							<li>
-								<span
-									class="name"
-									:style="{
-										background:
-											'url(' + icons['id'] + ') no-repeat left center/15px'
-									}"
-									>设备ID :</span
-								>
-								<span class="val">
-									<select
-										id="checkQxz"
-										@change="selId()"
-										v-model="e_id"
-										:style="{
-											background:
-												'url(' + selectBg + ') no-repeat right center / 10px'
-										}"
-									>
-										<option :value="item" v-for="item in ids" :key="item">
-											{{ item }}
-										</option>
-									</select>
-								</span>
-							</li>
-							<li v-for="(item, key) in equipInfo" :key="key">
-								<span
-									class="name"
-									:style="{
-										background:
-											'url(' + icons[key] + ') no-repeat left center/15px'
-									}"
-									>{{ key }} :</span
-								>
-								<span class="val">{{ item || '无' }}</span>
-							</li>
-						</ul>
-					</div>
-				</div>
-				<div class="lMiddle">
-					<div class="tit" :style="{ backgroundImage: 'url(' + titBg + ')' }">
-						实时数据
-					</div>
-					<div class="con">
-						<ul>
-							<li
-								:style="{
-									background: 'url(' + itemBg + ') no-repeat center/contain'
-								}"
-								v-for="(item, index) in reaTimeStatusList"
-								:key="index"
-							>
-								<div>{{ item.num }}</div>
-								<p>{{ item.name }}</p>
-							</li>
-						</ul>
-					</div>
-				</div>
-				<div class="lBottom">
-					<div class="tit" :style="{ backgroundImage: 'url(' + titBg + ')' }">
-						设备状态
-					</div>
-					<div class="chart01" ref="chart01Ref"></div>
-				</div>
-			</div>
-			<div class="center">
-				<div class="info">
-					<ul>
-						<li>
-							<p class="all">
-								<span>{{ all_num }}</span
-								>台
-							</p>
-							<div>总设备</div>
-						</li>
-						<li>
-							<p class="on">
-								<span>{{ on_num }}</span
-								>台
-							</p>
-							<div>在线设备</div>
-						</li>
-						<li>
-							<p class="off">
-								<span>{{ off_num }}</span
-								>台
-							</p>
-							<div>离线设备</div>
-						</li>
-					</ul>
-				</div>
-				<div class="chart04" ref="chart04Ref"></div>
-				<div
-					class="map map1"
-					:style="{ backgroundImage: 'url(' + map1 + ')' }"
-				></div>
-				<div
-					class="map map2"
-					:style="{ backgroundImage: 'url(' + map2 + ')' }"
-				></div>
-				<div
-					class="map map3"
-					:style="{ backgroundImage: 'url(' + map3 + ')' }"
-				></div>
-			</div>
-			<div class="right">
-				<div class="rTop">
-					<div class="tit" :style="{ backgroundImage: 'url(' + titBg + ')' }">
-						要素展示
-					</div>
-					<div class="chart02" ref="chart02Ref"></div>
-				</div>
-				<div class="rMiddle">
-					<div class="tit" :style="{ backgroundImage: 'url(' + titBg + ')' }">
-						数据详情
-					</div>
-					<div class="swiper-container" ref="charBarRef">
-						<div class="swiper-wrapper">
-							<div
-								class="swiper-slide"
-								v-for="(item, index) in qxzData"
-								:key="index"
-							>
-								<div
-									class="item"
-									:style="{
-										backgroundImage:
-											qxzCheckNum == index
-												? 'url(' + qxzBtnBgOn + ')'
-												: 'url(' + qxzBtnBg + ')'
-									}"
-								>
-									{{ item.tex }}
-								</div>
-							</div>
-						</div>
-					</div>
-					<div class="chart03" ref="chart03Ref"></div>
-				</div>
-				<div class="rbottom">
-					<div class="tit" :style="{ backgroundImage: 'url(' + titBg + ')' }">
-						24小时数据
-					</div>
-					<div class="con">
-						<div class="swiper-container" ref="Data24Ref">
-							<div class="swiper-wrapper">
-								<div
-									class="swiper-slide"
-									v-for="i in data24List"
-									:key="i.eName"
-								>
-									<p class="e_tit">{{ i.eName }}</p>
-									<div class="items">
-										<div :style="{ backgroundImage: 'url(' + e_bg + ')' }">
-											<div class="val">
-												<p class="p1">{{ i.max }}</p>
-												<p class="p2">最大值</p>
-											</div>
-											<div class="time">
-												<p class="p3">最大时间</p>
-												<p class="p4">{{ (i.maxtime * 1000) | formatTime }}</p>
-											</div>
-										</div>
-										<div :style="{ backgroundImage: 'url(' + e_bg + ')' }">
-											<div class="val">
-												<p class="p1">{{ i.min }}</p>
-												<p class="p2">最小值</p>
-											</div>
-											<div class="time">
-												<p class="p3">最小时间</p>
-												<p class="p4">{{ (i.mintime * 1000) | formatTime }}</p>
-											</div>
-										</div>
-									</div>
-								</div>
-							</div>
-						</div>
-					</div>
-				</div>
-			</div>
-		</div>
-	</div>
-</template>
-
-<script>
-import echarts from 'echarts'
-import { funPie, hisLine, hisBar } from './charts'
-import '@/plugin/flexible.js'
-import { qxz } from 'static/js/qxz.js'
-import Swiper from 'swiper'
-import 'swiper/dist/css/swiper.min.css'
-export default {
-	data() {
-		return {
-			bodyBg: require('@/assets/images/bigdata/qxz/bg.jpg'),
-			headerBg: require('@/assets/images/bigdata/qxz/1.png'),
-			titBg: require('@/assets/images/bigdata/qxz/tit_bg.png'),
-			selectBg: require('@/assets/images/bigdata/qxz/sanjiao.png'),
-			itemBg: require('@/assets/images/bigdata/qxz/3.png'),
-			qxzBtnBg: require('@/assets/images/bigdata/qxz/btn_bg.png'),
-			qxzBtnBgOn: require('@/assets/images/bigdata/qxz/btn_active_bg.png'),
-			e_bg: require('@/assets/images/bigdata/qxz/e_bg.png'),
-			onIcon: 'image://' + require('@/assets/images/bigdata/qxz/on.png'),
-			offIcon: 'image://' + require('@/assets/images/bigdata/qxz/off.png'),
-			map1: require('@/assets/images/bigdata/qxz/map1.png'),
-			map2: require('@/assets/images/bigdata/qxz/map2.png'),
-			map3: require('@/assets/images/bigdata/qxz/map3.png'),
-			e_id: '',
-			ids: [],
-			equipInfo: {
-				设备名称: '',
-				设备定位: '河南省 郑州市 金水区',
-				最新上报时间: '2020-05-06 12:00:00'
-			},
-			reaTimeStatusList: [], //实时数据
-			icons: {
-				id: require('@/assets/images/bigdata/qxz/4.png'),
-				设备名称: require('@/assets/images/bigdata/qxz/6.png'),
-				设备定位: require('@/assets/images/bigdata/qxz/5.png'),
-				最新上报时间: require('@/assets/images/bigdata/qxz/7.png')
-			},
-			qxz_on: [],
-			qxz_off: [],
-			on_num: 0,
-			off_num: 0,
-			all_num: 0,
-			qxzCheckNum: 0,
-			qxzBtn: ['风速', '风向', '大气温度', '大气湿度'],
-			qxzData: [],
-			myChart01: '',
-			myChart02: '',
-			myChart03: '',
-			data24List: []
-		}
-	},
-	mounted() {
-		this.chartInit()
-		this.getEquipList()
-		this.swiper24Data()
-	},
-	methods: {
-		chartInit() {
-			this.myChart01 = echarts.init(this.$refs.chart01Ref)
-			this.myChart02 = echarts.init(this.$refs.chart02Ref)
-			this.myChart03 = echarts.init(this.$refs.chart03Ref)
-			this.myChart04 = echarts.init(this.$refs.chart04Ref)
-			window.addEventListener('resize', () => {
-				this.myChart01.resize()
-				this.myChart02.resize()
-				this.myChart03.resize()
-				this.myChart04.resize()
-			})
-		},
-		mapChart() {
-			this.$axios({
-				method: 'GET',
-				url: `${this.jsonUrl}/static/map/100000.json`
-			}).then((res) => {
-				let geoJson = res.data
-				this.countryAddressNum(geoJson) //显示全国地图
-			})
-		},
-		countryAddressNum(geoJson) {
-			echarts.registerMap('china', geoJson)
-			this.myChart04.setOption(
-				{
-					grid: {
-						left: '0',
-						right: '0',
-						top: '0%',
-						bottom: '0%',
-						containLabel: true,
-						show: false
-					},
-					legend: {
-						orient: 'vertical',
-						id: 1,
-						y: 'bottom',
-						x: 'right',
-						itemWidth: 16,
-						itemHeight: 20,
-						data: [
-							{
-								name: '在线设备',
-								icon: this.onIcon
-							},
-							{
-								name: '离线设备',
-								icon: this.offIcon
-							}
-						],
-						textStyle: {
-							color: '#fff'
-						}
-					},
-					geo: {
-						map: 'china', //对应registerMap注册名字
-						label: {
-							show: false,
-							color: '#fff'
-						},
-						roam: false, //是否开启鼠标缩放和平移漫游,设置成 'scale' 或者 'move',设置成 true 为都开启
-						zlevel: 0,
-						zoom: 1, // 当前视角的缩放比例
-						// scaleLimit: {
-						// 	min: 0.5,
-						// 	max: 2
-						// },
-						layoutCenter: ['50%', '50%'],
-						layoutSize: '100%',
-						itemStyle: {
-							normal: {
-								areaColor: 'rgba(43, 196, 243, 0.42)',
-								borderColor: 'rgba(43, 196, 243, 1)',
-								borderWidth: 1
-							}
-						},
-						emphasis: {
-							//高亮状态下的多边形和标签样式。
-							label: {
-								show: true, //高亮状态下字体是否显示
-								color: '#AAE0FC' //高亮状态下字体颜色
-							},
-							itemStyle: {
-								areaColor: '#2B91B7'
-							}
-						}
-					},
-					series: [
-						{
-							name: '在线设备',
-							type: 'scatter',
-							coordinateSystem: 'geo',
-							data: this.qxz_on,
-							symbol: this.onIcon,
-							symbolSize: [16, 20]
-						},
-						{
-							name: '离线设备',
-							type: 'scatter',
-							coordinateSystem: 'geo',
-							data: this.qxz_off,
-							symbol: this.offIcon,
-							symbolSize: [16, 20]
-						}
-					]
-				},
-				true
-			)
-		},
-		getEquipList() {
-			//获取气象站设备ID集合
-			this.$axios({
-				method: 'POST',
-				url: '/api/api_gateway?method=weather.weather.qxz_page'
-			})
-				.then((res) => {
-					if (res.data) {
-						let data = res.data.data.ids
-						data.forEach((item) => {
-							this.ids.push(item.equip_id)
-							if (item.is_online == 1) {
-								this.qxz_on.push({ value: [item.lng, item.lat] })
-							} else {
-								this.qxz_off.push({ value: [item.lng, item.lat] })
-							}
-						})
-						this.mapChart()
-						this.e_id = this.ids[0] //页面初始化的设备id
-						this.getEquipInfo(this.e_id) //获取气象站信息
-						this.data24(this.e_id) //获取24小时数据
-					}
-				})
-				.catch(() => {
-					this.$message.error('获取数据失败!')
-				})
-		},
-		getEquipInfo(id) {
-			this.$axios({
-				method: 'POST',
-				url: '/api/api_gateway?method=weather.weather.qxz_display',
-				data: this.qs.stringify({
-					device_id: id
-				})
-			}).then((res) => {
-				let arr = new Array()
-				let conf = res.data.data.conf
-				let dat = res.data.data.dat
-				let e_info = res.data.data.sta
-				let hisData = res.data.data.data2
-				this.on_num = res.data.data.on
-				this.off_num = res.data.data.off
-				this.all_num = res.data.data.all
-				//历史数据
-				let charArr = []
-				let category = []
-				for (let item of hisData) {
-					for (let item2 in item.dat) {
-						if (item.dat[item2]) {
-							let arr = item.dat[item2].split('#')
-							if (category.indexOf(item2) == -1) {
-								category.push(item2)
-								let obj = {
-									tex: qxz[arr[1]][1],
-									unit: qxz[arr[1]][2],
-									val: [arr[0]],
-									time: [this.formatTime(item.time * 1000, 'yyyy-MM-dd hh:mm')]
-								}
-								charArr.push(obj)
-							} else {
-								charArr[category.indexOf(item2)].val.push(arr[0])
-								charArr[category.indexOf(item2)].time.push(
-									this.formatTime(item.time * 1000, 'yyyy-MM-dd hh:mm')
-								)
-							}
-						}
-					}
-				}
-				this.qxzData = charArr //用于环境温湿度和数据详情
-				//数据详情柱状图
-				this.myChart03.setOption(hisBar(this.qxzData[0])) //默认显示第一条数据
-				this.$nextTick(() => {
-					this.swiperInit()
-				})
-				//环境温湿度折线图
-				this.myChart02.setOption(hisLine(this.qxzData.slice(0, 2))) //一打开页面就显示
-				this.chartLine() //循环展示
-
-				//设备信息
-				this.equipInfo['设备名称'] = e_info.equip_name
-				this.equipInfo['最新上报时间'] = this.formatTime(e_info.uptime * 1000)
-				let lat = e_info.lat
-				let lng = e_info.lng
-				this.$jsonp(
-					`http://api.map.baidu.com/reverse_geocoding/v3/?renderReverse&output=json&coordtype=wgs84ll`,
-					{
-						ak: 'nroAiX0Lf6ppNEGt2dBLtDkOldGCPFwF',
-						location: `${lat},${lng}`
-					}
-				).then((res) => {
-					let addressComponent = res.result && res.result.addressComponent
-					if (addressComponent) {
-						this.equipInfo['设备定位'] =
-							addressComponent.province +
-							addressComponent.city +
-							addressComponent.district
-					}
-				})
-				//设备状态饼状图
-				this.myChart01.setOption(funPie(this.on_num, this.off_num)) //饼状图
-				//实时状态
-				for (let i1 in conf) {
-					if (conf[i1]) {
-						let arr2 = conf[i1].split('#')
-						let obj = {}
-						obj.name = `${arr2[0]}(${arr2[1]})`
-						for (let i2 in dat) {
-							if (i1 == i2) {
-								let arr3 = dat[i2].split('#')
-								obj.num = arr3[0]
-								arr.push(obj)
-							}
-						}
-					}
-				}
-				this.reaTimeStatusList = arr
-			})
-		},
-		selId() {
-			//切换设备ID
-			this.getEquipInfo(this.e_id)
-			//24小时数据
-			this.data24(this.e_id)
-		},
-		swiperInit() {
-			let _this = this
-			var mySwiper = new Swiper(this.$refs.charBarRef, {
-				direction: 'horizontal',
-				slidesPerView: 5,
-				speed: 3000,
-				autoplay: true,
-				onClick: function (swiper) {
-					_this.qxzCheckNum = swiper.clickedIndex
-					_this.myChart03.setOption(hisBar(_this.qxzData[swiper.clickedIndex]))
-				},
-				onSlideChangeStart: function (swiper) {
-					// console.log(swiper)
-					_this.qxzCheckNum = swiper.activeIndex
-					_this.myChart03.setOption(hisBar(_this.qxzData[swiper.activeIndex]))
-				}
-			})
-			this.$refs.charBarRef.onmouseover = function () {
-				mySwiper.stopAutoplay()
-			}
-			this.$refs.charBarRef.onmouseout = function () {
-				mySwiper.startAutoplay()
-			}
-			this.$refs.chart03Ref.onmouseover = function () {
-				mySwiper.stopAutoplay()
-			}
-			this.$refs.chart03Ref.onmouseout = function () {
-				mySwiper.startAutoplay()
-			}
-		},
-		chartLine() {
-			var i = 0
-			setInterval(() => {
-				if (i + 2 < this.qxzData.length) {
-					this.qxzData.slice(i, i + 2)
-					this.myChart02.setOption(hisLine(this.qxzData.slice(i, i + 2)))
-					i++
-				} else {
-					i = 0
-				}
-			}, 3000)
-		},
-		data24(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 data = res.data.data.data
-				let arr = []
-				for (let item of data) {
-					let obj = {
-						max: item.max,
-						min: item.min,
-						maxtime: item.maxtime,
-						mintime: item.mintime,
-						eName: `${item.enum[1]}(${item.enum[2]})`
-					}
-					arr.push(obj)
-				}
-				this.data24List = arr
-				this.$nextTick(() => {
-					this.swiper24Data()
-				})
-			})
-		},
-		swiper24Data() {
-			var mySwiper = new Swiper(this.$refs.Data24Ref, {
-				direction: 'vertical',
-				slidesPerView: 2,
-				speed: 3000,
-				autoplay: true,
-				loop: true
-			})
-			this.$refs.Data24Ref.onmouseover = function () {
-				mySwiper.stopAutoplay()
-			}
-			this.$refs.Data24Ref.onmouseout = function () {
-				mySwiper.startAutoplay()
-			}
-		}
-	}
-}
-</script>
-
-<style lang='less' scoped>
-body {
-	overflow: hidden;
-}
-.wrap {
-	width: 100%;
-	height: 100%;
-	background-repeat: no-repeat;
-	background-size: 100% 100%;
-	background-position: center;
-	overflow: hidden;
-	.header {
-		width: 100vw;
-		height: 12vh;
-		background-size: 100% auto;
-		background-position: center top;
-		background-repeat: no-repeat;
-		position: relative;
-	}
-	.content {
-		position: relative;
-		height: 86vh;
-		.tit {
-			font-size: 0.2rem;
-			font-weight: 700;
-			letter-spacing: 0.05rem;
-			padding-left: 10px;
-			color: #fff;
-			line-height: 2.8vh;
-			background-repeat: no-repeat;
-			background-size: 100% 100%;
-		}
-		> div {
-			position: absolute;
-		}
-		.left {
-			width: 22vw;
-			left: 1vw;
-			height: 100%;
-			.lTop {
-				width: 100%;
-				height: 17vh;
-				color: #fff;
-				.con {
-					padding: 0.11rem 0;
-					font-size: 0.19rem;
-
-					li {
-						line-height: 0.4rem;
-						.name {
-							padding-left: 30px;
-						}
-						.val {
-							color: #f7b72f;
-							/*清除ie的默认选择框样式清除,隐藏下拉箭头*/
-							select::-ms-expand {
-								display: none;
-							}
-							select {
-								background: none;
-								color: #f7b72f;
-								border: none;
-								font-size: 0.19rem;
-								outline: none;
-								width: 150px;
-								/*很关键:将默认的select选择框样式清除*/
-								appearance: none;
-								-moz-appearance: none;
-								-webkit-appearance: none;
-								option {
-									background: #000;
-									border: none;
-									outline: none;
-								}
-							}
-						}
-					}
-				}
-			}
-			.lMiddle {
-				::-webkit-scrollbar {
-					width: 4px;
-					height: 10px;
-				}
-				/*滑动轨道*/
-				::-webkit-scrollbar-track {
-					border-radius: 0px;
-					background: none;
-				}
-				/*滑块*/
-				::-webkit-scrollbar-thumb {
-					border-radius: 5px;
-					-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.2);
-					background-color: #2b8099;
-				}
-				/*滑块效果*/
-				::-webkit-scrollbar-thumb:hover {
-					border-radius: 5px;
-					-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.2);
-					background-color: rgba(85, 85, 85, 0.4);
-				}
-				width: 100%;
-				height: 37vh;
-				margin-top: 2vh;
-				.con {
-					height: calc(100% - 2.8vh);
-					overflow: auto;
-
-					padding-top: 10px;
-					box-sizing: border-box;
-					ul {
-						height: 100%;
-						display: flex;
-						justify-content: flex-start;
-						flex-wrap: wrap;
-						align-content: flex-start;
-						li {
-							width: 25%;
-							margin-bottom: 0.1rem;
-							text-align: center;
-							div {
-								font-size: 0.25rem;
-								color: #01ffff;
-								line-height: 0.7rem;
-							}
-							p {
-								color: #fff;
-								font-size: 0.15rem;
-								padding: 0.1rem 0;
-							}
-						}
-					}
-				}
-			}
-			.lBottom {
-				width: 100%;
-				height: 28vh;
-				margin-top: 2vh;
-				.chart01 {
-					height: calc(100% - 2.8vh);
-				}
-			}
-		}
-		.center {
-			width: 52vw;
-			left: 24vw;
-			height: 100%;
-			.info {
-				width: 50%;
-				position: absolute;
-				left: 50%;
-				transform: translateX(-50%);
-				ul {
-					display: flex;
-					text-align: center;
-					justify-content: space-between;
-					color: #fff;
-					li p {
-						font-size: 0.25rem;
-					}
-					li div {
-						font-size: 0.24rem;
-					}
-					li p span {
-						font-size: 0.5rem;
-						padding: 05px;
-						font-weight: 800;
-					}
-					.all {
-						color: #ff9c58;
-					}
-					.on {
-						color: #00dc73;
-					}
-					.off {
-						color: #ff5656;
-					}
-				}
-			}
-			.chart04 {
-				position: absolute;
-				left: 0;
-				right: 0;
-				top: 0;
-				bottom: 0;
-				z-index: 5;
-			}
-			.map {
-				position: absolute;
-				left: 50%;
-				top: 50%;
-				transform: translate(-50%, -50%);
-				background-repeat: no-repeat;
-				background-position: center;
-			}
-			.map1 {
-				opacity: 0.3;
-				width: 40vw;
-				height: 40vw;
-			}
-			.map2 {
-				opacity: 0.6;
-				width: 45vw;
-				height: 45vw;
-				animation: rotate 15s linear infinite;
-				z-index: 2;
-			}
-			@keyframes rotate {
-				from {
-					transform: translate(-50%, -50%) rotate(0deg);
-				}
-				to {
-					transform: translate(-50%, -50%) rotate(360deg);
-				}
-			}
-			.map3 {
-				opacity: 0.3;
-				width: 42vw;
-				height: 42vw;
-				animation: rotate1 15s linear infinite;
-			}
-			@keyframes rotate1 {
-				from {
-					transform: translate(-50%, -50%) rotate(0deg);
-				}
-				to {
-					transform: translate(-50%, -50%) rotate(-360deg);
-				}
-			}
-		}
-		.right {
-			width: 22vw;
-			right: 1vw;
-			height: 100%;
-			.rTop {
-				width: 100%;
-				height: 25vh;
-				.chart02 {
-					height: calc(100% - 2.8vh);
-				}
-			}
-			.rMiddle {
-				width: 100%;
-				height: 30vh;
-				.swiper-container {
-					width: 100%;
-					padding: 2vh 0;
-				}
-				.swiper-container .swiper-slide {
-					color: #fff;
-				}
-				.swiper-container .swiper-slide .item {
-					background-repeat: no-repeat;
-					background-size: 100% 100%;
-					font-size: 0.16rem;
-					line-height: 2.3vh;
-					text-align: center;
-					color: #fff;
-					cursor: pointer;
-					margin: 0 2px;
-				}
-
-				.chart03 {
-					height: calc(100% - 8.1vh);
-				}
-			}
-			.rbottom {
-				margin-top: 2vh;
-				width: 100%;
-				height: 29vh;
-				.con {
-					height: calc(100% - 2.8vh);
-					.swiper-container {
-						height: 100%;
-					}
-					.e_tit {
-						font-size: 0.221rem;
-						color: #01fffd;
-						line-height: 0.5rem;
-					}
-					.items {
-						height: 9vh;
-						display: flex;
-						> div {
-							flex: 1;
-							background-repeat: no-repeat;
-							background-position: center;
-							background-size: auto 100%;
-							position: relative;
-							color: #fff;
-							text-align: center;
-							.val {
-								position: absolute;
-								left: 50%;
-								transform: translateX(-50%);
-								margin-left: -0.08rem;
-								top: 0.35rem;
-								.p1 {
-									font-size: 0.3rem;
-								}
-								.p2 {
-									font-size: 0.1rem;
-									color: #01ffff;
-								}
-							}
-							.time {
-								position: absolute;
-								right: -0.2rem;
-								top: -0.1rem;
-								.p3 {
-									color: #01fffd;
-								}
-								.p4 {
-									width: 1rem;
-								}
-							}
-						}
-					}
-				}
-			}
-		}
-	}
-}
-</style>

+ 0 - 350
src/pages/bigdata/bqxz/charts.js

@@ -1,350 +0,0 @@
-let color = ['#f39801', '#01ffff']
-let imgSrc = require('@/assets/images/bigdata/qxz/8.png')
-
-function _pie3() {
-    let dataArr = [];
-    for (var i = 0; i < 100; i++) {
-        if (i % 2 === 0) {
-            dataArr.push({
-                name: (i + 1).toString(),
-                value: 25,
-                itemStyle: {
-                    normal: {
-                        color: "rgb(1,255,255)",
-                        borderWidth: 0,
-                        borderColor: "rgba(0,0,0,0)"
-                    }
-                }
-            })
-        } else {
-            dataArr.push({
-                name: (i + 1).toString(),
-                value: 20,
-                itemStyle: {
-                    normal: {
-                        color: "rgba(0,0,0,0)",
-                        borderWidth: 0,
-                        borderColor: "rgba(0,0,0,0)"
-                    }
-                }
-            })
-        }
-    }
-    return dataArr
-}
-
-function funPie(on, off) {
-    return {
-        color: color,
-        graphic: {
-            elements: [{
-                type: "image",
-                z: 3,
-                style: {
-                    image: imgSrc,
-                    width: 45,
-                    height: 45
-                },
-                left: 'center',
-                top: "40%",
-                position: [100, 100]
-            }]
-        },
-        tooltip: {
-            trigger: 'item'
-        },
-        series: [{
-            type: 'pie',
-            zlevel: 4,
-            silent: true,
-            radius: ['84%', '83%'],
-            label: {
-                normal: {
-                    show: false
-                },
-            },
-            labelLine: {
-                normal: {
-                    show: false,
-                }
-            },
-            data: _pie3()
-        }, {
-            type: 'pie',
-            roseType: 'radius',
-            radius: ['40%', '60%'],
-            data: [{
-                value: off,
-                name: '离线设备'
-            }, {
-                value: on,
-                name: '在线设备'
-            }],
-            label: {
-                normal: {
-                    formatter: '{font|{b}}\n{val|{c}台}',
-                    lineHeight: 30,
-                    rich: {
-                        font: {
-                            fontSize: 16,
-                            color: '#01ffff'
-                        },
-                        val: {
-                            fontSize: 20,
-                            color: '#fff'
-                        }
-                    }
-                },
-            },
-            labelLine: {
-                lineStyle: {
-                    color: '#01ffff',
-                    length: 25,
-                    length2: 120,
-                    type: 'dashed'
-                }
-            },
-            emphasis: {
-                itemStyle: {
-                    shadowBlur: 10,
-                    shadowOffsetX: 0,
-                    shadowColor: 'rgba(0,0,0,0.5)'
-                }
-            }
-        }]
-    };
-}
-
-function hisLine(data) {
-    // console.log(data)
-    return {
-        tooltip: {
-            trigger: 'axis'
-        },
-        legend: {
-            top: "10",
-            icon: 'circle',
-            textStyle: {
-                color: "#fff",
-                fontSize: "12"
-            }
-        },
-        grid: {
-            left: "10",
-            top: "50",
-            right: "20",
-            bottom: "10",
-            containLabel: true
-        },
-        xAxis: {
-            type: 'category',
-            boundaryGap: false, //坐标轴两边留白
-            data: data[0].time,
-            axisLabel: { //坐标轴刻度标签的相关设置。
-                // interval: 2, //设置为 1,表示『隔一个标签显示一个标签』
-                textStyle: {
-                    color: '#69c3f5',
-                    fontStyle: 'normal',
-                    fontFamily: '微软雅黑',
-                    fontSize: 12,
-                },
-            },
-            axisTick: { //坐标轴刻度相关设置。
-                show: false,
-            },
-            axisLine: { //坐标轴轴线相关设置
-                lineStyle: {
-                    show: false,
-                    color: '#0e3461'
-                }
-            },
-        },
-        yAxis: [{
-            type: 'value',
-            splitNumber: 5,
-            axisLabel: {
-                textStyle: {
-                    color: '#69c3f5',
-                    fontStyle: 'normal',
-                    fontFamily: '微软雅黑',
-                    fontSize: 12,
-                }
-            },
-            axisLine: {
-                show: false
-            },
-            axisTick: {
-                show: false
-            },
-            splitLine: {
-                show: true,
-                lineStyle: {
-                    color: '#0e3461',
-                    opacity: 0.8
-                }
-            }
-
-        }],
-        series: [{
-                name: data[0].tex,
-                type: 'line',
-                symbol: 'circle',
-                itemStyle: {
-                    normal: {
-                        color: '#fe6c00',
-                        borderColor: '#fe6c00',
-                        borderWidth: 2,
-
-                        borderType: 'solid'
-                    }
-                },
-                lineStyle: {
-                    normal: {
-                        width: 0,
-                    }
-                },
-                areaStyle: {
-                    color: {
-                        type: 'linear',
-                        x: 0,
-                        y: 0,
-                        x2: 0,
-                        y2: 1,
-                        colorStops: [{
-                            offset: 0,
-                            color: 'rgba(171, 120, 31, 1)' // 0% 处的颜色
-                        }, {
-                            offset: 1,
-                            color: 'rgba(171, 120, 31, 0.5)' // 100% 处的颜色
-                        }],
-                        global: false, // 缺省为 false
-                    },
-                },
-                data: data[0].val
-            },
-            {
-                name: data[1].tex,
-                type: 'line',
-                symbol: 'circle',
-                itemStyle: {
-                    normal: {
-                        color: '#01b7f8',
-                        borderColor: '#01b7f8',
-                        borderWidth: 2,
-                        borderType: 'solid'
-                    }
-                },
-                lineStyle: {
-                    normal: {
-                        width: 0,
-                    }
-                },
-                areaStyle: {
-                    color: {
-                        type: 'linear',
-                        x: 0,
-                        y: 0,
-                        x2: 0,
-                        y2: 1,
-                        colorStops: [{
-                            offset: 0,
-                            color: 'rgba(61, 196, 241, 1)' // 0% 处的颜色
-                        }, {
-                            offset: 0.8,
-                            color: 'rgba(61, 196, 241, 0.2)' // 100% 处的颜色
-                        }],
-                        global: false // 缺省为 false
-                    },
-                },
-                data: data[1].val
-            }
-        ]
-    };
-}
-function hisBar(data) {
-    return {
-        color: ["#2f89cf"],
-        tooltip: {
-            trigger: "axis",
-            axisPointer: {
-                // 坐标轴指示器,坐标轴触发有效
-                type: "shadow" // 默认为直线,可选为:'line' | 'shadow'
-            }
-        },
-        grid: {
-            left: "10",
-            top: "10",
-            right: "10",
-            bottom: "5",
-            containLabel: true
-        },
-        xAxis: [{
-            type: "category",
-            data: data.time,
-            axisTick: {
-                alignWithLabel: true
-            },
-            axisLabel: {
-                textStyle: {
-                    color: "rgba(255,255,255,.6)",
-                    fontSize: "12"
-                }
-            },
-            axisLine: {
-                show: false
-            }
-        }],
-        yAxis: [{
-            type: "value",
-            axisLabel: {
-                textStyle: {
-                    color: "rgba(255,255,255,.6)",
-                    fontSize: "12"
-                }
-            },
-            axisLine: {
-                lineStyle: {
-                    color: "rgba(255,255,255,.1)"
-                    // width: 1,
-                    // type: "solid"
-                }
-            },
-            splitLine: {
-                lineStyle: {
-                    color: "rgba(255,255,255,.1)"
-                }
-            }
-        }],
-        series: [{
-            name: data.tex,
-            type: "line",
-            barWidth: "12",
-            data: data.val,
-            itemStyle: {
-                normal: {
-                    barBorderRadius: 30,
-                    color: {
-                        type: 'linear',
-                        x: 0,
-                        y: 0,
-                        x2: 0,
-                        y2: 1,
-                        colorStops: [{
-                            offset: 0,
-                            color: '#ff2758' // 0% 处的颜色
-                        }, {
-                            offset: 1,
-                            color: '#f87b41' // 100% 处的颜色
-                        }],
-                        global: false // 缺省为 false
-                    },
-                },
-            },
-        }]
-    }
-}
-export {
-    funPie,
-    hisLine,
-    hisBar,
-}

+ 0 - 712
src/pages/bigdata/bzy/Bzy.vue

@@ -1,712 +0,0 @@
-<template>
-	<div class="wrap" :style="{ backgroundImage: 'url(' + bodyBg + ')' }">
-		<div
-			class="header"
-			:style="{ backgroundImage: 'url(' + headerBg + ')' }"
-		></div>
-		<div class="content">
-			<div class="left">
-				<div class="lTop">
-					<div class="tit" :style="{ backgroundImage: 'url(' + titBg + ')' }">
-						设备信息
-					</div>
-					<div class="con">
-						<ul>
-							<li>
-								<span
-									class="name"
-									:style="{
-										background:
-											'url(' + icons['id'] + ') no-repeat left center/15px'
-									}"
-									>设备ID :</span
-								>
-								<span class="val">
-									<select
-										id="checkQxz"
-										@change="selId()"
-										v-model="e_id"
-										:style="{
-											background:
-												'url(' + selectBg + ') no-repeat right center / 10px'
-										}"
-									>
-										<option :value="item" v-for="item in ids" :key="item">
-											{{ item }}
-										</option>
-									</select>
-								</span>
-							</li>
-							<li v-for="(item, key) in equipInfo" :key="key">
-								<span
-									class="name"
-									:style="{
-										background:
-											'url(' + icons[key] + ') no-repeat left center/15px'
-									}"
-									>{{ key }} :</span
-								>
-								<span class="val">{{ item || '无' }}</span>
-							</li>
-						</ul>
-					</div>
-				</div>
-				<div class="lMiddle">
-					<div class="tit" :style="{ backgroundImage: 'url(' + titBg + ')' }">
-						设备状态
-					</div>
-					<div class="con">
-						<div class="chart03" ref="chart03Ref"></div>
-						<div class="chart04" ref="chart04Ref"></div>
-					</div>
-				</div>
-				<div class="lBottom">
-					<div class="tit" :style="{ backgroundImage: 'url(' + titBg + ')' }">
-						状态信息
-					</div>
-					<div class="con">
-						<div
-							class="item"
-							v-for="(item, index) in bzyStatusFormat"
-							:key="index"
-						>
-							<p class="hd">{{ item.name }}</p>
-							<p
-								class="status"
-								:style="{ backgroundImage: 'url(' + bzyStatusBg + ')' }"
-							>
-								{{ item.state }}
-							</p>
-						</div>
-					</div>
-				</div>
-			</div>
-			<div class="center">
-				<div class="chart05" ref="chart05Ref"></div>
-				<div class="cBottom">
-					<div class="tit" :style="{ backgroundImage: 'url(' + titBg + ')' }">
-						孢子图片
-					</div>
-					<div class="swiper-container" ref="swiperRef">
-						<div class="swiper-wrapper">
-							<div
-								class="swiper-slide"
-								v-for="item in imgs"
-								:key="item.addtime"
-							>
-								<div>
-									<img :src="item.addr" />
-								</div>
-							</div>
-						</div>
-						<div class="swiper-button-prev"></div>
-						<div class="swiper-button-next"></div>
-					</div>
-				</div>
-			</div>
-			<div class="right">
-				<div class="rTop">
-					<div class="tit" :style="{ backgroundImage: 'url(' + titBg + ')' }">
-						环境温湿度
-					</div>
-					<div class="chart01" ref="chart01Ref"></div>
-				</div>
-				<div class="rMiddle">
-					<div class="tit" :style="{ backgroundImage: 'url(' + titBg + ')' }">
-						设备数据
-					</div>
-					<div class="con">
-						<div class="item" v-for="(item, index) in bzyState" :key="index">
-							<div
-								class="item-con"
-								:style="{ backgroundImage: 'url(' + bzyBg + ')' }"
-							>
-								<p class="state-val">
-									<span>{{ item.state }}</span>
-									{{ item.unit }}
-								</p>
-								<p class="state-tit">{{ item.name }}</p>
-							</div>
-						</div>
-					</div>
-				</div>
-				<div class="rBottom">
-					<div class="tit" :style="{ backgroundImage: 'url(' + titBg + ')' }">
-						保温仓温度
-					</div>
-					<div class="chart02" ref="chart02Ref"></div>
-				</div>
-			</div>
-		</div>
-	</div>
-</template>
-
-<script>
-import echarts from 'echarts'
-import '@/plugin/flexible.js'
-import Swiper from 'swiper'
-import 'swiper/dist/css/swiper.min.css'
-import { chartLine, chartBar, gauge } from './chart.js'
-export default {
-	data() {
-		return {
-			e_id: '',
-			d_id: '',
-			bodyBg: require('@/assets/images/bigdata/bzy/bg.jpg'),
-			headerBg: require('@/assets/images/bigdata/bzy/1.png'),
-			titBg: require('@/assets/images/bigdata/bzy/tit_bg.png'),
-			titBg2: require('@/assets/images/bigdata/bzy/tit_bg2.png'),
-			selectBg: require('@/assets/images/bigdata/bzy/sanjiao.png'),
-			bzyStatusBg: require('@/assets/images/bigdata/bzy/state_bg.png'),
-			bzyBg: require('@/assets/images/bigdata/bzy/bzyBg.png'),
-			onIcon: 'image://' + require('@/assets/images/bigdata/qxz/on.png'),
-			offIcon: 'image://' + require('@/assets/images/bigdata/qxz/off.png'),
-			ids: [],
-			d_ids: [],
-			equipInfo: {
-				设备名称: '',
-				设备定位: '',
-				最新上报时间: ''
-			},
-			isOnline: '',
-			icons: {
-				id: require('@/assets/images/bigdata/bzy/4.png'),
-				设备名称: require('@/assets/images/bigdata/bzy/6.png'),
-				设备定位: require('@/assets/images/bigdata/bzy/5.png'),
-				最新上报时间: require('@/assets/images/bigdata/bzy/7.png')
-			},
-			bzyStatusFormat: [],
-			bzyState: [],
-			imgs: [],
-			bzy_on: [],
-			bzy_off: [],
-			onLine: null,
-			offLine: null,
-			bzyData: {},
-			myChart01: '',
-			myChart02: '',
-			myChart03: '',
-			myChart04: ''
-		}
-	},
-	mounted() {
-		this.swiperInit()
-		this.getEquipList()
-	},
-	computed: {
-		onLinePer() {
-			return (this.onLine / (this.onLine + this.offLine)).toFixed(2)
-		},
-		offLinePer() {
-			return (this.offLine / (this.onLine + this.offLine)).toFixed(2)
-		}
-	},
-	watch: {
-		e_id: function(newVal){
-			var index = this.ids.indexOf(newVal)
-			this.d_id = this.d_ids[index]  //获取选中设备的d_id
-			this.getChartData(this.d_id)
-		}
-	},
-	methods: {
-		getEquipList() {
-			//获取孢子仪设备ID集合
-			this.$axios({
-				method: 'POST',
-				url: '/api/api_gateway?method=forecast.worm_lamp.lamp_list',
-				data: this.qs.stringify({
-					device_type_id: 7,
-					page_size: 9999
-				})
-			})
-				.then((res) => {
-					if (res.data) {
-						let data = res.data.data.data
-						data.forEach((item) => {
-							this.ids.push(item.device_id)
-							this.d_ids.push(item.d_id)
-							if (item.is_online == 1) {
-								this.bzy_on.push({ value: [item.lng, item.lat] })
-							} else {
-								this.bzy_off.push({ value: [item.lng, item.lat] })
-							}
-						})
-						this.onLine = this.bzy_on.length
-						this.offLine = this.bzy_off.length
-						//在线设备离线设备台数
-						this.chartsInit()
-						//地图
-						this.mapChart()
-						this.e_id = this.ids[0] //页面初始化的设备id
-						this.d_id = this.d_ids[0] //页面初始化的设备id
-						this.getEquipInfo(this.e_id)
-						// this.getChartData(this.d_id)
-						this.getDetailData(this.e_id)
-						this.getPhoto(this.e_id)
-					}
-				})
-				.catch(() => {
-					this.$message.error('获取数据失败!')
-				})
-		},
-		getEquipInfo(id) {
-			this.$axios({
-				method: 'POST',
-				url: '/api/api_gateway?method=forecast.worm_lamp.lamp_list',
-				data: this.qs.stringify({
-					device_type_id: 7,
-					device_id: id
-				})
-			}).then((res) => {
-				let data = res.data.data.data[0]
-				this.equipInfo['设备名称'] = data.device_name
-				this.equipInfo['设备定位'] = data.address
-				this.equipInfo['最新上报时间'] = this.formatTime(data.status_time)
-				this.isOnline = data.device_status
-			})
-		},
-		getPhoto(id) {
-			this.$axios({
-				method: 'POST',
-				url: '/api/api_gateway?method=forecast.forecast_system.equip_photo',
-				data: this.qs.stringify({
-					device_id: id,
-					ret: 'screen'
-				})
-			}).then((res) => {
-				if (res.data.message == '') {
-					this.imgs = res.data.data.data
-				}
-			})
-		},
-		selId() {
-			//切换设备ID
-			this.getEquipInfo(this.e_id)
-			this.getDetailData(this.e_id)
-			this.getPhoto(this.e_id)
-		},
-		chartsInit() {
-			this.myChart01 = echarts.init(this.$refs.chart01Ref)
-			this.myChart02 = echarts.init(this.$refs.chart02Ref)
-			this.myChart03 = echarts.init(this.$refs.chart03Ref)
-			this.myChart03.setOption(
-				gauge(this.onLine, this.onLinePer, '#1E85E6', '#38F0C8', '在线设备')
-			)
-			this.myChart04 = echarts.init(this.$refs.chart04Ref)
-			this.myChart04.setOption(
-				gauge(this.offLine, this.offLinePer, '#ffa813', '#ffd825', '离线设备')
-			)
-			window.addEventListener('resize', () => {
-				this.myChart01.resize()
-				this.myChart02.resize()
-				this.myChart03.resize()
-				this.myChart04.resize()
-			})
-		},
-		getChartData(d_id) {
-			this.$axios({
-				method: 'POST',
-				url: '/api/api_gateway?method=forecast.worm_lamp.device_polyline_data',
-				data: this.qs.stringify({
-					device_type_id: 7,
-					d_id:d_id
-				})
-			}).then((res) => {
-				let data = res.data.data
-				let obj = {
-					time: [],
-					temperature: [],
-					humidity: [],
-					set_temp: [],
-					pre_temp: []
-				}
-				data.forEach((item) => {
-					obj.time.push(this.formatTime(item.addtime * 1000))
-					obj.temperature.push(item.temperature)
-					obj.humidity.push(item.humidity)
-					obj.set_temp.push(item.set_temp)
-					obj.pre_temp.push(item.others)
-				})
-				this.myChart01.setOption(chartLine(obj))
-				this.myChart02.setOption(chartBar(obj))
-			})
-		},
-		getDetailData(id) {
-			this.$axios({
-				method: 'POST',
-				url: '/api/api_gateway?method=forecast.worm_lamp.device_history_data',
-				data: this.qs.stringify({
-					device_type_id: 7,
-					device_id: id,
-					page_size: 1
-				})
-			}).then((res) => {
-				let data = res.data.data.data[0].d_h_t
-				this.bzyStatusFormat = []
-				this.bzyState = []
-				this.bzyStatusFormat.push(
-					{ name: '在线状态', state: this.isOnline == 1 ? '在线' : '离线' },
-					{ name: '设备开关', state: data.on_off == 1 ? '开启' : '关闭' },
-					{ name: '电池状态', state: data.bat_sta == 1 ? '电量过低' : '正常' },
-					{ name: '摄像头状态', state: data.usb_sta == 1 ? '异常' : '正常' },
-					{ name: '雨控状态', state: data.rps == 1 ? '雨控' : '正常' }
-				)
-				this.bzyState.push(
-					{ name: '环境温度', state: data.at, unit: '℃' },
-					{ name: '环境湿度', state: data.ah, unit: '%' },
-					{ name: '保温仓设定温度', state: data.set_temp, unit: '℃' },
-					{ name: '保温仓当前温度', state: data.pre_temp, unit: '℃' },
-					{ name: '电压', state: data.v_bat, unit: 'V' },
-					{ name: '海拔高度', state: data.alti, unit: '' },
-					{ name: '信号强度', state: data.csq, unit: '' },
-					{ name: '设备版本', state: data.dver },
-					{ name: '已培养时间', state: data.staytime, unit: 'min' }
-				)
-			})
-		},
-		swiperInit() {
-			var mySwiper = new Swiper('.swiper-container', {
-				slidesPerView: 4,
-				navigation: {
-					nextEl: '.swiper-button-next',
-					prevEl: '.swiper-button-prev'
-				}
-			})
-		},
-		mapChart() {
-			this.$axios({
-				method: 'GET',
-				url: `${this.jsonUrl}/static/map/100000.json`
-			}).then((res) => {
-				let geoJson = res.data
-				this.countryAddressNum(geoJson) //显示全国地图
-			})
-		},
-		countryAddressNum(geoJson) {
-			let myChart05 = echarts.init(this.$refs.chart05Ref)
-			window.addEventListener('resize', function () {
-				myChart05.resize()
-			})
-			echarts.registerMap('china', geoJson)
-			myChart05.setOption(
-				{
-					grid: {
-						left: '0',
-						right: '0',
-						top: '0%',
-						bottom: '0%',
-						containLabel: true,
-						show: false
-					},
-					legend: {
-						orient: 'horizontal',
-						id: 1,
-						align: 'auto',
-						itemWidth: 16,
-						itemHeight: 20,
-						data: [
-							{
-								name: '在线设备',
-								icon: this.onIcon
-							},
-							{
-								name: '离线设备',
-								icon: this.offIcon
-							}
-						],
-						textStyle: {
-							color: '#fff'
-						}
-					},
-					geo: {
-						map: 'china', //对应registerMap注册名字
-						label: {
-							show: false,
-							color: '#fff'
-						},
-						roam: true, //是否开启鼠标缩放和平移漫游,设置成 'scale' 或者 'move',设置成 true 为都开启
-						zlevel: 0,
-						zoom: 1, // 当前视角的缩放比例
-						scaleLimit: {
-							min: 0.5,
-							max: 2
-						},
-						layoutCenter: ['50%', '50%'],
-						layoutSize: '100%',
-						itemStyle: {
-							normal: {
-								areaColor: 'rgba(43, 196, 243, 0)',
-								borderColor: 'rgba(43, 196, 243, 1)',
-								borderWidth: 1
-							}
-						},
-						emphasis: {
-							//高亮状态下的多边形和标签样式。
-							label: {
-								show: true, //高亮状态下字体是否显示
-								color: '#AAE0FC' //高亮状态下字体颜色
-							},
-							itemStyle: {
-								areaColor: '#2B91B7'
-							}
-						}
-					},
-					series: [
-						{
-							name: '在线设备',
-							type: 'scatter',
-							coordinateSystem: 'geo',
-							data: this.bzy_on,
-							symbol: this.onIcon,
-							symbolSize: [20, 23]
-						},
-						{
-							name: '离线设备',
-							type: 'scatter',
-							coordinateSystem: 'geo',
-							data: this.bzy_off,
-							symbol: this.offIcon,
-							symbolSize: [20, 23]
-						}
-					]
-				},
-				true
-			)
-		}
-	}
-}
-</script>
-
-<style lang='less' scoped>
-body {
-	overflow: hidden;
-}
-.wrap {
-	width: 100%;
-	height: 100%;
-	background-repeat: no-repeat;
-	background-size: 100% 100%;
-	background-position: center;
-	overflow: hidden;
-	.header {
-		width: 100vw;
-		height: 12vh;
-		background-size: 100% auto;
-		background-position: center top;
-		background-repeat: no-repeat;
-		position: relative;
-	}
-	.content {
-		position: relative;
-		height: 86vh;
-		.tit {
-			font-size: 0.2rem;
-			font-weight: 700;
-			letter-spacing: 0.05rem;
-			padding-left: 15px;
-			color: #01e2ff;
-			line-height: 4.2vh;
-			background-repeat: no-repeat;
-			background-size: 100% 100%;
-			background-position: center;
-		}
-		> div {
-			position: absolute;
-		}
-		.con {
-			width: 100%;
-			margin-top: 0.2vh;
-			height: calc(100% - 4vh);
-		}
-		.left {
-			width: 22vw;
-			left: 1vw;
-			height: 100%;
-			.lTop {
-				width: 100%;
-				height: 17vh;
-				color: #fff;
-				.con {
-					padding: 0.11rem 0;
-					font-size: 0.19rem;
-					li {
-						line-height: 0.4rem;
-						.name {
-							padding-left: 30px;
-						}
-						.val {
-							color: #f7b72f;
-							/*清除ie的默认选择框样式清除,隐藏下拉箭头*/
-							select::-ms-expand {
-								display: none;
-							}
-							select {
-								background: none;
-								color: #f7b72f;
-								border: none;
-								font-size: 0.19rem;
-								outline: none;
-								width: 180px;
-								/*很关键:将默认的select选择框样式清除*/
-								appearance: none;
-								-moz-appearance: none;
-								-webkit-appearance: none;
-								option {
-									background: #000;
-									border: none;
-									outline: none;
-								}
-							}
-						}
-					}
-				}
-			}
-			.lMiddle {
-				width: 100%;
-				height: 30vh;
-				margin-top: 2vh;
-				.con {
-					display: flex;
-					> div {
-						flex: 1;
-						& /deep/div {
-							width: 100% !important;
-						}
-					}
-				}
-			}
-			.lBottom {
-				width: 100%;
-				height: 35vh;
-				margin-top: 2vh;
-				.con {
-					display: flex;
-					flex-wrap: wrap;
-					justify-content: flex-left;
-					color: #9bdaf9;
-					.item {
-						width: 33%;
-						padding: 0.4rem 0.2rem 0;
-						box-sizing: border-box;
-						text-align: center;
-						.hd {
-							font-size: 0.18rem;
-							padding-bottom: 0.05rem;
-						}
-						.status {
-							height: 0.86rem;
-							line-height: 0.5rem;
-							background-size: 100% 100%;
-							background-position: center top;
-							background-repeat: no-repeat;
-							font-size: 0.15rem;
-							color: #39ffe4;
-						}
-					}
-				}
-			}
-		}
-		.center {
-			width: 52vw;
-			right: 24vw;
-			height: 100%;
-			.chart05 {
-				width: 100%;
-				height: 66vh;
-			}
-			.cBottom {
-				position: absolute;
-				left: 0;
-				right: 0;
-				margin: auto;
-				bottom: 0;
-				width: 80%;
-				height: 20vh;
-				color: #fff;
-				.swiper-container {
-					height: calc(100% - 6.2vh);
-					margin-top: 2vh;
-					.swiper-slide {
-						flex-grow: 0;
-						flex-basis: 25%;
-						div {
-							margin: 0 10px;
-							border: 2px solid #2e97f3;
-							height: 100%;
-							box-sizing: border-box;
-							img {
-								width: 100%;
-								height: 100%;
-							}
-						}
-					}
-				}
-			}
-		}
-		.right {
-			width: 22vw;
-			right: 1vw;
-			height: 100%;
-			.rTop {
-				width: 100%;
-				height: 25vh;
-				.chart01 {
-					width: 100%;
-					height: calc(100% - 4vh);
-				}
-			}
-			.rMiddle {
-				width: 100%;
-				height: 32vh;
-				.con {
-					display: flex;
-					color: #fff;
-					flex-wrap: wrap;
-					justify-content: space-around;
-					.item {
-						width: 33.3%;
-						padding: 0 1vw;
-						box-sizing: border-box;
-						padding-bottom: 2.1vh;
-						.item-con {
-							position: relative;
-							background-size: 100% 100%;
-							background-position: center top;
-							background-repeat: no-repeat;
-							height: 7.4vh;
-							.state-val {
-								font-size: 0.13rem;
-								position: absolute;
-								top: 3vh;
-								left: 50%;
-								transform: translateX(-50%);
-								display: flex;
-								align-items: flex-end;
-								span {
-									font-size: 0.25rem;
-									margin: 0 2px;
-								}
-							}
-							.state-tit {
-								font-size: 0.1rem;
-								text-align: center;
-								position: relative;
-								top: 90%;
-							}
-						}
-					}
-				}
-			}
-			.rBottom {
-				width: 100%;
-				height: 27vh;
-				margin-top: 2vh;
-				.chart02 {
-					width: 100%;
-					height: calc(100% - 4.2vh);
-				}
-			}
-		}
-	}
-}
-</style>

+ 0 - 332
src/pages/bigdata/bzy/chart.js

@@ -1,332 +0,0 @@
-import echarts from 'echarts'
-
-function chartLine(data) {
-  return {
-    tooltip: {
-      trigger: "axis",
-      axisPointer: {
-        lineStyle: {
-          color: "#dddc6b"
-        }
-      }
-    },
-    legend: {
-      top: "20",
-      textStyle: {
-        color: "#fff",
-        fontSize: "12"
-      }
-    },
-    grid: {
-      left: "20",
-      top: "50",
-      right: "20",
-      bottom: "10",
-      containLabel: true
-    },
-    xAxis: [{
-        type: "category",
-        boundaryGap: false,
-        axisLabel: {
-          textStyle: {
-            color: "#fff",
-            fontSize: 12
-          }
-        },
-        axisLine: {
-          lineStyle: {
-            color: "#fff"
-          }
-        },
-        data: data.time
-      },
-      {
-        axisPointer: {
-          show: false
-        },
-        axisLine: {
-          show: false
-        },
-        position: "bottom",
-        offset: 0
-      }
-    ],
-    yAxis: [{
-      type: "value",
-      axisTick: {
-        show: false
-      },
-      axisLine: {
-        lineStyle: {
-          color: "#fff"
-        }
-      },
-      axisLabel: {
-        textStyle: {
-          color: "#fff",
-          fontSize: 12
-        }
-      },
-      splitLine: {
-        show: false
-      }
-    }],
-    series: [{
-        name: "环境湿度",
-        type: "line",
-        smooth: true,
-        symbol: "circle", //标记的 图形
-        symbolSize: 5,
-        showSymbol: true,
-        lineStyle: {
-          normal: {
-            color: "#39b6e6",
-            width: 2
-          }
-        },
-        areaStyle: {
-          normal: {
-            color: {
-              type: 'linear',
-              x: 0,
-              y: 0,
-              x2: 0,
-              y2: 1,
-              colorStops: [{
-                offset: 0,
-                color: 'rgba(61, 196, 241, 1)' // 0% 处的颜色
-              }, {
-                offset: 0.8,
-                color: 'rgba(61, 196, 241, 0.2)' // 100% 处的颜色
-              }],
-              global: false // 缺省为 false
-            },
-            shadowColor: "rgba(0, 0, 0, 0.1)"
-          }
-        },
-        itemStyle: {
-          normal: {
-            color: "#39b6e6",
-            borderColor: "#39b6e6",
-            borderWidth: 2
-          }
-        },
-        data: data.humidity
-      },
-      {
-        name: "环境温度",
-        type: "line",
-        smooth: true,
-        symbol: "circle",
-        symbolSize: 5,
-        showSymbol: true,
-        lineStyle: {
-          normal: {
-            color: "#c71881",
-            width: 2
-          }
-        },
-        itemStyle: {
-          normal: {
-            color: "#c71881",
-            borderColor: "#c71881",
-            borderWidth: 2
-          }
-        },
-        data: data.temperature
-      }
-    ]
-  };
-}
-
-function chartBar(data) {
-  return {
-    color: ['RGB(1,255,152)', 'RGB(244,191,70)'],
-    tooltip: {
-      trigger: 'axis',
-      axisPointer: {
-        type: 'shadow'
-      }
-    },
-    animation: false,
-    "grid": {
-      "top": "67",
-      "left": "10",
-      "bottom": "0",
-      "right": "10",
-      "containLabel": true
-    },
-    "legend": {
-      "show": true,
-      top: 15,
-      textStyle: {
-        color: "RGB(193,223,255)"
-      }
-    },
-    "xAxis": [{
-      "type": "category",
-      "data": data.time,
-      "axisTick": {
-        "alignWithLabel": true
-      },
-      "nameTextStyle": {
-        "color": "#fff"
-      },
-      "axisLine": {
-        "lineStyle": {
-          "color": "RGB(47,68,114)"
-        }
-      },
-      "axisLabel": {
-        "textStyle": {
-          "color": "#bfe2f8"
-        },
-        margin: 20
-      }
-    }],
-    "yAxis": [{
-      "type": "value",
-      "axisLabel": {
-        "textStyle": {
-          "color": "#bfe2f8"
-        },
-        "formatter": "{value}"
-      },
-      "splitLine": {
-        "show": false,
-      },
-      "axisLine": {
-        "show": true,
-        "lineStyle": {
-          "color": "RGB(47,68,114)"
-        }
-      }
-    }],
-    "series": [{
-        name: '保温仓当前温度',
-        type: 'line',
-        itemStyle: {
-          normal: {
-            color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
-              offset: 0,
-              color: '#00b8f6' // 0% 处的颜色
-            }, {
-              offset: 1,
-              color: '#006aec' // 100% 处的颜色
-            }], false)
-          }
-        },
-        "data": data.pre_temp
-      },
-      {
-        name: '保温仓设定温度',
-        type: 'line',
-        itemStyle: {
-          normal: {
-            color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
-              offset: 0,
-              color: '#d4b407' // 0% 处的颜色
-            }, {
-              offset: 1,
-              color: '#da9700' // 100% 处的颜色
-            }], false)
-          }
-        },
-
-        "data": data.set_temp
-      }
-    ]
-  };
-}
-
-function gauge(num, per, color01, color02, title) {
-  // var value = 40
-  // var colorRegionRate = (value / 100).toFixed(2)
-  return {
-    title: {
-      text: title,
-      x: 'center',
-      top: 26,
-      textStyle: {
-        fontWeight: 'normal',
-        fontSize: 16,
-        color: '#9ad9fa'
-      },
-    },
-    series: [{
-      type: 'gauge',
-      radius: '80%',
-      center: ['50%', '60%'],
-      splitNumber: 0, //刻度数量
-      startAngle: 225,
-      endAngle: -45,
-      axisLine: {
-        show: true,
-        lineStyle: {
-          width: 15,
-          color: [
-            // 有数值的部分
-            [per, new echarts.graphic.LinearGradient(0, 0, 1, 0, [{
-                offset: 0,
-                color: color01 // 0% 处的颜色
-              },
-              {
-                offset: 1,
-                color: color02 // 100% 处的颜色
-              }
-            ])],
-            // 底色
-            [
-              1, '#00323C'
-            ]
-          ],
-        },
-        radius: 8,
-      },
-      title: {
-        x: 'center',
-        top: 50,
-        textStyle: {
-          fontWeight: 'normal',
-          fontSize: 30,
-          color: color02
-        },
-      },
-      //分隔线样式。
-      splitLine: {
-        show: false,
-      },
-      axisLabel: {
-        show: false
-      },
-      axisTick: {
-        show: false
-      },
-      pointer: {
-        show: false,
-      },
-      //仪表盘详情,用于显示数据。
-      detail: {
-        show: true,
-        offsetCenter: [0, '0%'],
-        color: color02,
-        size: 20,
-        textStyle: {
-          fontSize: 20
-        },
-        formatter: function (params) {
-          return params + '台'
-        },
-      },
-      data: [{
-        value: num,
-        name: per * 100 + '%'
-      }]
-    }]
-  };
-}
-export {
-  chartLine,
-  chartBar,
-  gauge
-}

文件差异内容过多而无法显示
+ 0 - 6
src/pages/bigdata/bzy/jquery-2.0.2.min.js


+ 0 - 688
src/pages/bigdata/equipDistributeMap/EquipDistributeMap.vue

@@ -1,688 +0,0 @@
-<template>
-	<div class="wrap" :style="{ backgroundImage: 'url(' + bodyBg + ')' }">
-		<div
-			class="header"
-			:style="{ backgroundImage: 'url(' + headerBg + ')' }"
-		></div>
-		<div ref="mapChart" class="chart"></div>
-		<div class="equipInfo">
-			<ul>
-				<li>
-					<p><span class="dot dotT"></span>设备总数(台)</p>
-					<div>
-						<span v-for="(i, index) in equipTotal.toString()" :key="index">{{
-							i
-						}}</span>
-					</div>
-				</li>
-				<li v-for="item in eTypeNum" :key="item.type">
-					<p>
-						<span
-							:class="{
-								dot: true,
-								dot01: item.type == 2,
-								dot02: item.type == 3,
-								dot03: item.type == 4,
-								dot04: item.type == 5,
-								dot05: item.type == 6,
-								dot06: item.type == 7
-							}"
-						></span>
-						{{ item.type | equipType }}
-					</p>
-					<div>
-						<span v-for="(i, index) in item.num.toString()" :key="index">{{
-							i
-						}}</span>
-					</div>
-				</li>
-			</ul>
-		</div>
-		<div class="checkBtn">
-			<ul>
-				<li
-					v-for="(item, index) in checkBtn"
-					:class="{ active: activeBtn == index }"
-					:key="index"
-					@click="checkClick(index, item.name)"
-					:style="{ backgroundImage: checkBtnBg(index) }"
-				>
-					<div>
-						<span :style="{ backgroundImage: 'url(' + item.bg1 + ')' }"></span>
-						<p>{{ item.name }}</p>
-					</div>
-				</li>
-			</ul>
-		</div>
-		<div
-			class="backBtn"
-			@click="goBack()"
-			:style="{ backgroundImage: backBtnBg }"
-		></div>
-	</div>
-</template>
-
-<script>
-import '@/plugin/flexible.js'
-import echarts from 'echarts'
-import { cityMap } from './china-main-city-map.js'
-import { coord } from './coord.js'
-export default {
-	data() {
-		return {
-			address: '', //展示地图的区域,默认是全国
-			device_type: '', //设备类型,默认是全部
-			bodyBg: require('@/assets/images/bigdata/equipDistributeMap/bg.png'),
-			headerBg: require('@/assets/images/bigdata/equipDistributeMap/head_bg.png'),
-			chinaId: 100000, //默认是全国地图的代号
-			myChart: {}, //地图初化对象
-			mapStack: [], //记录 父级ID、Name
-			parentId: 100000,
-			parentName: 'china',
-			EquipNum: [],
-			equipInfo: [],
-			dialogVisible: false,
-			eTypeNum: [],
-			checkBtn: [
-				{
-					name: '全部设备',
-					bg1: require('@/assets/images/bigdata/equipDistributeMap/all.png'),
-					bg2: require('@/assets/images/bigdata/equipDistributeMap/all_active.png')
-				},
-				{
-					name: '杀虫灯',
-					bg1: require('@/assets/images/bigdata/equipDistributeMap/scd.png'),
-					bg2: require('@/assets/images/bigdata/equipDistributeMap/scd_active.png')
-				},
-				{
-					name: '虫情测报',
-					bg1: require('@/assets/images/bigdata/equipDistributeMap/cbd.png'),
-					bg2: require('@/assets/images/bigdata/equipDistributeMap/cbd_active.png')
-				},
-				{
-					name: '孢子仪',
-					bg1: require('@/assets/images/bigdata/equipDistributeMap/bzy.png'),
-					bg2: require('@/assets/images/bigdata/equipDistributeMap/bzy_active.png')
-				},
-				{
-					name: '监控',
-					bg1: require('@/assets/images/bigdata/equipDistributeMap/jk.png'),
-					bg2: require('@/assets/images/bigdata/equipDistributeMap/jk_active.png')
-				},
-				{
-					name: '性诱设备',
-					bg1: require('@/assets/images/bigdata/equipDistributeMap/xy.png'),
-					bg2: require('@/assets/images/bigdata/equipDistributeMap/xy_active.png')
-				},
-				{
-					name: '环境监测',
-					bg1: require('@/assets/images/bigdata/equipDistributeMap/qxz.png'),
-					bg2: require('@/assets/images/bigdata/equipDistributeMap/qxz_active.png')
-				}
-			],
-			activeBtn: 0,
-			checkBtnBg01:
-				'url(' +
-				require('@/assets/images/bigdata/equipDistributeMap/btnbg01.png') +
-				')',
-			checkBtnBg02:
-				'url(' +
-				require('@/assets/images/bigdata/equipDistributeMap/btnbg02.png') +
-				')',
-			backBtnBg:
-				'url(' +
-				require('@/assets/images/bigdata/equipDistributeMap/back.png') +
-				')',
-			geoJson: {},
-			equipTotal: 0 //总设备数
-		}
-	},
-	mounted() {
-		this.chartsInit()
-		this.equipNum()
-	},
-	filters: {
-		equipType(value) {
-			switch (value) {
-				case 2:
-					return '杀虫灯(台)'
-					break
-				case 3:
-					return '虫情测报(台)'
-					break
-				case 7:
-					return '孢子仪(台)'
-					break
-				case 6:
-					return '监控(台)'
-					break
-				case 4:
-					return '性诱设备(台)'
-					break
-				case 5:
-					return '环境监测(台)'
-					break
-				case 9:
-					return '糖醋测报(台)'
-					break
-			}
-		}
-	},
-	destroyed() {
-		window.onresize = null
-	},
-	computed: {},
-	methods: {
-		chartsInit() {
-			// 基于准备好的dom,初始化echarts实例
-			this.myChart = echarts.init(this.$refs.mapChart)
-			this.mapChart()
-			window.addEventListener('resize', () => {
-				this.myChart.resize()
-			})
-		},
-		equipNum() {
-			//左侧获取左侧设备数量
-			this.$axios({
-				method: 'POST',
-				url: '/api/api_gateway?method=device.device_manage.device_counts',
-				data: this.qs.stringify({ adress: this.address })
-			}).then((res) => {
-				let data = res.data.data.data
-				this.equipTotal = res.data.data.counts
-				let arr = []
-				data.forEach((item) => {
-					let obj = { num: item.device_type_count, type: item.device_type_id }
-					arr.push(obj)
-				})
-				this.eTypeNum = arr
-			})
-		},
-		countryAddressNum() {
-			//全国地图
-			this.$axios({
-				method: 'POST',
-				url:
-					'/api/api_gateway?method=device.device_manage.device_address_count',
-				data: this.qs.stringify({
-					adress: this.address,
-					device_type_id: this.device_type
-				})
-			}).then((res) => {
-				let data = res.data.data
-				this.EquipNum = []
-				data &&
-					data.forEach((item) => {
-						this.EquipNum.push({
-							//全国
-							name: item.province,
-							num: item.device_type_count,
-							value: coord[item.province]
-						})
-					})
-				this.registerAndsetOption('china', this.geoJson, this.EquipNum, false)
-			})
-		},
-		provinceAddressNum(flag) {
-			//二级三级地图
-			this.$axios({
-				method: 'POST',
-				url:
-					'/api/api_gateway?method=device.device_manage.device_address_count',
-				data: this.qs.stringify({
-					adress: this.address,
-					device_type_id: this.device_type
-				})
-			}).then((res) => {
-				this.equipInfo = [] //各省设备
-				let data = res.data.data
-				data &&
-					data.forEach((item) => {
-						this.equipInfo.push({
-							//二级三级地图
-							type: item.device_type_id,
-							device_status: item.device_status,
-							user: item.owner_name,
-							equipId: item.device_id,
-							value: item.value
-						})
-					})
-				this.registerAndsetOption(
-					this.address,
-					this.geoJson,
-					this.equipInfo,
-					flag
-				)
-				this.parentId = this.chinaId
-				this.parentName = this.address
-			})
-		},
-		mapChart() {
-			this.$axios({
-				method: 'GET',
-				url: `${this.jsonUrl}/static/map/${this.chinaId}.json`
-			}).then((res) => {
-				this.geoJson = res.data
-				this.countryAddressNum() //显示全国地图
-			})
-			this.myChart.on('click', (param) => {
-				// console.log(param);
-				if (
-					param.seriesType &&
-					param.seriesType == 'effectScatter' &&
-					param.data.type
-				) {
-					//二级和三级地图点击散点时,不下钻,弹框显示设备信息
-					// console.log('id : '+param.data.equipId+";"+'type : '+param.data.type);
-					// this.dialogVisible=true;
-				} else {
-					//一级地图点击散点时,下钻
-					if (cityMap[param.name]) {
-						//有下级地图,下钻到下一级
-						this.address = param.name
-						this.equipNum()
-						this.chinaId = cityMap[param.name] //找到对应的json文件名
-						this.$axios({
-							method: 'GET',
-							url: `${this.jsonUrl}/static/map/${this.chinaId}.json`
-						}).then((res) => {
-							this.geoJson = res.data
-							this.provinceAddressNum(true)
-						})
-					} else {
-						//没有下级地图,回到一级china地图,并将mapStack清空
-						this.address = ''
-						this.equipNum()
-						this.chinaId = 100000 //由计算属性获取使geoJson数据为全国的
-						this.$axios({
-							method: 'GET',
-							url: `${this.jsonUrl}/static/map/${this.chinaId}.json`
-						}).then((res) => {
-							this.geoJson = res.data
-							this.countryAddressNum()
-							this.mapStack = []
-							this.parentId = 100000 //china地图
-							this.parentName = 'china'
-						})
-					}
-				}
-			})
-		},
-		registerAndsetOption(name, geoJson, pointData, flag) {
-			echarts.registerMap(name, geoJson) //注册可用的地图,geoJson为GeoJson 格式的数据
-			this.myChart.setOption(
-				{
-					grid: {
-						left: '0',
-						right: '0',
-						top: '0%',
-						bottom: '0%',
-						containLabel: true,
-						show: false
-					},
-					title: {
-						text: name,
-						textStyle: {
-							color: '#fff',
-							fontSize: 22
-						},
-						padding: 10,
-						left: '46%'
-						// textAlign :'right'
-					},
-					tooltip: {
-						show: true,
-						trigger: 'item',
-						formatter: function (params) {
-							// console.log(params);
-							if (params.data.type) {
-								let status = params.data.device_status == 1 ? '在线' : '离线'
-								var str =
-									params.data.equipName +
-									'<br/><hr/>' +
-									'IMEI : ' +
-									params.data.equipId +
-									'<br/>在线状态 : ' +
-									status +
-									'<br/>设备用户 : ' +
-									params.data.user +
-									'<br/>位置 : ' +
-									params.data.name1 +
-									' , ' +
-									params.data.name2
-								return str
-							} else {
-								return params.data.name + ':' + params.data.num
-							}
-						}
-					},
-					geo: {
-						map: name, //对应registerMap注册名字
-						label: {
-							show: false,
-							color: '#fff'
-						},
-						roam: true, //是否开启鼠标缩放和平移漫游,设置成 'scale' 或者 'move',设置成 true 为都开启
-						zlevel: 0,
-						zoom: 1, // 当前视角的缩放比例
-						scaleLimit: {
-							min: 0.5,
-							max: 2
-						},
-						layoutCenter: ['50%', '50%'],
-						layoutSize: '100%',
-						itemStyle: {
-							normal: {
-								areaColor: 'rgba(43, 196, 243, 0.42)',
-								borderColor: 'rgba(43, 196, 243, 1)',
-								borderWidth: 1
-							}
-						},
-						emphasis: {
-							//高亮状态下的多边形和标签样式。
-							label: {
-								show: true, //高亮状态下字体是否显示
-								color: '#AAE0FC' //高亮状态下字体颜色
-							},
-							itemStyle: {
-								areaColor: '#2B91B7'
-							}
-						}
-					},
-					series: [
-						{
-							type: 'effectScatter',
-							map: name,
-							coordinateSystem: 'geo',
-							zlevel: 1,
-							rippleEffect: {
-								brushType: 'stroke'
-							},
-							label: {
-								show: true,
-								color: '#fff',
-								fontSize: 14,
-								position: 'right',
-								formatter: function (a) {
-									if (a.data.type) {
-										return a.data.equipId.toString().slice(-6)
-									} else {
-										return a.data.name + ' (' + a.data.num + ')'
-									}
-								}
-							},
-							itemStyle: {
-								color: function (params) {
-									// console.log(params);
-									if (params.data.type) {
-										if (params.data.type == 2) {
-											return '#feff00'
-										} else if (params.data.type == 3) {
-											return '#4dd67e'
-										} else if (params.data.type == 4) {
-											return '#07d4ff'
-										} else if (params.data.type == 5) {
-											return '#fd3b55'
-										} else if (params.data.type == 6) {
-											return '#b608f1'
-										} else if (params.data.type == 7) {
-											return '#1c97c1'
-										}
-									} else {
-										return 'yellow'
-									}
-								}
-							},
-							showEffectOn: 'render', //配置何时显示特效,'render' 绘制完成后显示特效。
-							rippleEffect: {
-								period: 15, //动画的周期,秒数。
-								scale: 4, //动画中波纹的最大缩放比例。
-								brushType: 'fill' //波纹的绘制方式,可选 'stroke' 和 'fill'
-							},
-							// symbolSize: 12, //标记的大小,
-							data: pointData
-						},
-						// {
-						// 	name: 'AQI',
-						// 	type: 'heatmap',
-						// 	coordinateSystem: 'geo',
-						// 	data: [
-						// 		['116.405285', '39.904989', 800],
-						// 		['117.190182', '39.125596', 600]
-						// 	]
-						// }
-					],
-					visualMap: {
-						show: true,
-						color: ['#ff4601', '#fffc00', '#87cffa'],
-						min: 200,
-						text: ['高', '低'],
-						textStyle: {
-							color: '#fff'
-						},
-						max: 50,
-						left: '20%'
-					}
-				},
-				true
-			)
-			if (flag) {
-				this.mapStack.push({
-					//往mapStack里添加parentId,parentName,返回上一级使用
-					mapId: this.parentId,
-					mapName: this.parentName
-				})
-			}
-		},
-		checkClick(index, name) {
-			this.activeBtn = index
-			switch (name) {
-				case '全部设备':
-					this.device_type = ''
-					break
-				case '杀虫灯':
-					this.device_type = 2
-					break
-				case '虫情测报':
-					this.device_type = 3
-					break
-				case '孢子仪':
-					this.device_type = 7
-					break
-				case '监控':
-					this.device_type = 6
-					break
-				case '性诱设备':
-					this.device_type = 4
-					break
-				case '环境监测':
-					this.device_type = 5
-					break
-			}
-			if (this.address == '') {
-				this.countryAddressNum()
-			} else {
-				this.provinceAddressNum(false)
-			}
-		},
-		checkBtnBg(index) {
-			if (index == this.activeBtn) {
-				return this.checkBtnBg01
-			} else if (this.activeBtn - index == 1) {
-				return ''
-			} else if (index == this.checkBtn.length - 1) {
-				return ''
-			} else {
-				return this.checkBtnBg02
-			}
-		},
-		goBack() {
-			if (this.mapStack.length != 0) {
-				//如果有上级目录则执行
-				let map = this.mapStack.pop()
-				this.chinaId = map.mapId
-				this.address = map.mapName
-				this.$axios({
-					method: 'GET',
-					url: `${this.jsonUrl}/static/map/${this.chinaId}.json`
-				}).then((res) => {
-					this.geoJson = res.data
-					if (map.mapName == 'china') {
-						this.address = ''
-						this.equipNum()
-						this.registerAndsetOption(
-							map.mapName,
-							this.geoJson,
-							this.EquipNum,
-							false
-						)
-					} else {
-						this.equipNum()
-						this.provinceAddressNum(false)
-						// this.registerAndsetOption(map.mapName, this.geoJson,this.equipInfo,false)
-					}
-					//返回上一级后,父级的ID、Name随之改变
-					this.parentId = map.mapId
-					this.parentName = map.mapName
-				})
-			}
-		}
-	}
-}
-</script>
-<style lang='less' scoped>
-body {
-	overflow: hidden;
-}
-.wrap {
-	width: 100%;
-	height: 100%;
-	position: relative;
-	background-size: 100% 100%;
-	background-repeat: no-repeat;
-	overflow: hidden;
-	.header {
-		width: 100vw;
-		height: 10vh;
-		background-size: 100% 100%;
-		background-position: center top;
-		background-repeat: no-repeat;
-		position: relative;
-	}
-	.chart {
-		width: 100%;
-		height: 80vh;
-	}
-	.equipInfo {
-		position: absolute;
-		left: 2vw;
-		top: 10vh;
-		color: #fff;
-		li {
-			padding: 0.15rem 0;
-			p {
-				font-size: 0.24rem;
-				margin-bottom: 0.1rem;
-				span.dot {
-					width: 0.12rem;
-					height: 0.12rem;
-					border-radius: 100%;
-					margin-right: 0.1rem;
-					display: inline-block;
-				}
-				span.dot01 {
-					background-image: radial-gradient(circle, #feff00, #fdfd89);
-					box-shadow: 0 0 8px 4px rgba(253, 253, 137, 0.6);
-				}
-				span.dot02 {
-					background-image: radial-gradient(circle, #4dd67e, #9cffbf);
-					box-shadow: 0 0 8px 4px rgba(156, 255, 191, 0.6);
-				}
-				span.dot03 {
-					background-image: radial-gradient(circle, #07d4ff, #88eaff);
-					box-shadow: 0 0 8px 4px rgba(136, 234, 255, 0.6);
-				}
-				span.dot04 {
-					background-image: radial-gradient(circle, #fd3b55, #ff7a8c);
-					box-shadow: 0 0 8px 4px rgba(255, 122, 140, 0.6);
-				}
-				span.dot05 {
-					background-image: radial-gradient(circle, #b608f1, #d762ff);
-					box-shadow: 0 0 8px 4px rgba(215, 98, 255, 0.6);
-				}
-				span.dot06 {
-					background-image: radial-gradient(circle, #1c97c1, #4ac5ef);
-					box-shadow: 0 0 8px 4px rgba(74, 197, 239, 0.6);
-				}
-				span.dotT {
-					background-image: radial-gradient(circle, #fbc65e, #ff9600);
-					box-shadow: 0 0 8px 4px rgba(250, 169, 19, 0.6);
-				}
-			}
-			div > span {
-				display: inline-block;
-				font-size: 0.23rem;
-				line-height: 0.46rem;
-				padding: 0 0.07rem;
-				margin: 0 0.025rem;
-				border: 1px solid #3e5b85;
-				background: rgba(47, 54, 70, 0.3);
-			}
-		}
-	}
-	.checkBtn {
-		position: absolute;
-		bottom: 5vh;
-		width: 50vw;
-		left: 0;
-		right: 0;
-		margin: auto;
-		color: #b0cce1;
-		border: 1px solid #406288;
-		background: rgba(64, 98, 136, 0.5);
-		border-radius: 6px;
-		padding: 10px;
-		ul {
-			display: flex;
-			justify-content: space-between;
-			li {
-				flex: 1;
-				cursor: pointer;
-				background-repeat: no-repeat;
-				background-position: right center;
-				padding: 15px 10px;
-				& > div {
-					text-align: center;
-					span {
-						width: 100%;
-						height: 38px;
-						display: inline-block;
-						background-repeat: no-repeat;
-						background-size: auto 100%;
-						background-position: center;
-						margin-bottom: 10px;
-					}
-					p {
-						font-size: 0.24rem;
-					}
-				}
-			}
-			li.active {
-				background-position: center;
-				background-size: 100% 100%;
-				color: #fff;
-			}
-		}
-	}
-	.backBtn {
-		position: absolute;
-		right: 10vw;
-		top: 15vh;
-		width: 1.6rem;
-		height: 0.5rem;
-		background-size: 100% auto;
-		background-repeat: no-repeat;
-		cursor: pointer;
-	}
-}
-</style>

+ 0 - 381
src/pages/bigdata/equipDistributeMap/china-main-city-map.js

@@ -1,381 +0,0 @@
-const cityMap = {
-	"安徽": "340000",
-	"澳门": '820000',
-	"北京": '110000',
-	"重庆":'500000',
-	"福建": '350000',
-	"甘肃": '620000',
-	"广东": '440000',
-	"广西": "450000",
-	"贵州": '520000',
-	"海南": '460000',
-	"河北": '130000',
-	"黑龙江": '230000',
-	"河南": '410000',
-	"湖北": '420000',
-	"湖南": '430000',
-	"江苏": '320000',
-	"江西": '360000',
-	"吉林": '220000',
-	"辽宁": '210000',
-	"内蒙古": '150000',
-	"宁夏": '640000',
-	"青海": '630000',
-	"山东": '370000',
-	"上海": '310000',
-	"山西": '140000',
-	"四川": '510000',
-	"台湾": '710000',
-	"天津": '120000',
-	"新疆": '650000',
-	"陕西": '610000',
-	"西藏": '540000',
-	"云南": '530000',
-	"浙江": '330000',
-	"香港": '810000',
-    "北京市": "110100",
-    "天津市": "120100",
-    "上海市": "310100",
-    "重庆市": "500100",
-    "崇明县": "310200",            
-    "湖北省直辖县市": "429000",       
-    "铜仁市": "522200",            
-    "毕节市": "522400",            
-    "石家庄市": "130100",
-    "唐山市": "130200",
-    "秦皇岛市": "130300",
-    "邯郸市": "130400",
-    "邢台市": "130500",
-    "保定市": "130600",
-    "张家口市": "130700",
-    "承德市": "130800",
-    "沧州市": "130900",
-    "廊坊市": "131000",
-    "衡水市": "131100",
-    "太原市": "140100",
-    "大同市": "140200",
-    "阳泉市": "140300",
-    "长治市": "140400",
-    "晋城市": "140500",
-    "朔州市": "140600",
-    "晋中市": "140700",
-    "运城市": "140800",
-    "忻州市": "140900",
-    "临汾市": "141000",
-    "吕梁市": "141100",
-    "呼和浩特市": "150100",
-    "包头市": "150200",
-    "乌海市": "150300",
-    "赤峰市": "150400",
-    "通辽市": "150500",
-    "鄂尔多斯市": "150600",
-    "呼伦贝尔市": "150700",
-    "巴彦淖尔市": "150800",
-    "乌兰察布市": "150900",
-    "兴安盟": "152200",
-    "锡林郭勒盟": "152500",
-    "阿拉善盟": "152900",
-    "沈阳市": "210100",
-    "大连市": "210200",
-    "鞍山市": "210300",
-    "抚顺市": "210400",
-    "本溪市": "210500",
-    "丹东市": "210600",
-    "锦州市": "210700",
-    "营口市": "210800",
-    "阜新市": "210900",
-    "辽阳市": "211000",
-    "盘锦市": "211100",
-    "铁岭市": "211200",
-    "朝阳市": "211300",
-    "葫芦岛市": "211400",
-    "长春市": "220100",
-    "吉林市": "220200",
-    "四平市": "220300",
-    "辽源市": "220400",
-    "通化市": "220500",
-    "白山市": "220600",
-    "松原市": "220700",
-    "白城市": "220800",
-    "延边朝鲜族自治州": "222400",
-    "哈尔滨市": "230100",
-    "齐齐哈尔市": "230200",
-    "鸡西市": "230300",
-    "鹤岗市": "230400",
-    "双鸭山市": "230500",
-    "大庆市": "230600",
-    "伊春市": "230700",
-    "佳木斯市": "230800",
-    "七台河市": "230900",
-    "牡丹江市": "231000",
-    "黑河市": "231100",
-    "绥化市": "231200",
-    "大兴安岭地区": "232700",
-    "南京市": "320100",
-    "无锡市": "320200",
-    "徐州市": "320300",
-    "常州市": "320400",
-    "苏州市": "320500",
-    "南通市": "320600",
-    "连云港市": "320700",
-    "淮安市": "320800",
-    "盐城市": "320900",
-    "扬州市": "321000",
-    "镇江市": "321100",
-    "泰州市": "321200",
-    "宿迁市": "321300",
-    "杭州市": "330100",
-    "宁波市": "330200",
-    "温州市": "330300",
-    "嘉兴市": "330400",
-    "湖州市": "330500",
-    "绍兴市": "330600",
-    "金华市": "330700",
-    "衢州市": "330800",
-    "舟山市": "330900",
-    "台州市": "331000",
-    "丽水市": "331100",
-    "合肥市": "340100",
-    "芜湖市": "340200",
-    "蚌埠市": "340300",
-    "淮南市": "340400",
-    "马鞍山市": "340500",
-    "淮北市": "340600",
-    "铜陵市": "340700",
-    "安庆市": "340800",
-    "黄山市": "341000",
-    "滁州市": "341100",
-    "阜阳市": "341200",
-    "宿州市": "341300",
-    "六安市": "341500",
-    "亳州市": "341600",
-    "池州市": "341700",
-    "宣城市": "341800",
-    "福州市": "350100",
-    "厦门市": "350200",
-    "莆田市": "350300",
-    "三明市": "350400",
-    "泉州市": "350500",
-    "漳州市": "350600",
-    "南平市": "350700",
-    "龙岩市": "350800",
-    "宁德市": "350900",
-    "南昌市": "360100",
-    "景德镇市": "360200",
-    "萍乡市": "360300",
-    "九江市": "360400",
-    "新余市": "360500",
-    "鹰潭市": "360600",
-    "赣州市": "360700",
-    "吉安市": "360800",
-    "宜春市": "360900",
-    "抚州市": "361000",
-    "上饶市": "361100",
-    "济南市": "370100",
-    "青岛市": "370200",
-    "淄博市": "370300",
-    "枣庄市": "370400",
-    "东营市": "370500",
-    "烟台市": "370600",
-    "潍坊市": "370700",
-    "济宁市": "370800",
-    "泰安市": "370900",
-    "威海市": "371000",
-    "日照市": "371100",
-    "莱芜市": "371200",
-    "临沂市": "371300",
-    "德州市": "371400",
-    "聊城市": "371500",
-    "滨州市": "371600",
-    "菏泽市": "371700",
-    "郑州市": "410100",
-    "开封市": "410200",
-    "洛阳市": "410300",
-    "平顶山市": "410400",
-    "安阳市": "410500",
-    "鹤壁市": "410600",
-    "新乡市": "410700",
-    "焦作市": "410800",
-    "濮阳市": "410900",
-    "许昌市": "411000",
-    "漯河市": "411100",
-    "三门峡市": "411200",
-    "南阳市": "411300",
-    "商丘市": "411400",
-    "信阳市": "411500",
-    "周口市": "411600",
-    "驻马店市": "411700",
-    "省直辖县级行政区划": "469000",
-    "武汉市": "420100",
-    "黄石市": "420200",
-    "十堰市": "420300",
-    "宜昌市": "420500",
-    "襄阳市": "420600",
-    "鄂州市": "420700",
-    "荆门市": "420800",
-    "孝感市": "420900",
-    "荆州市": "421000",
-    "黄冈市": "421100",
-    "咸宁市": "421200",
-    "随州市": "421300",
-    "恩施土家族苗族自治州": "422800",
-    "长沙市": "430100",
-    "株洲市": "430200",
-    "湘潭市": "430300",
-    "衡阳市": "430400",
-    "邵阳市": "430500",
-    "岳阳市": "430600",
-    "常德市": "430700",
-    "张家界市": "430800",
-    "益阳市": "430900",
-    "郴州市": "431000",
-    "永州市": "431100",
-    "怀化市": "431200",
-    "娄底市": "431300",
-    "湘西土家族苗族自治州": "433100",
-    "广州市": "440100",
-    "韶关市": "440200",
-    "深圳市": "440300",
-    "珠海市": "440400",
-    "汕头市": "440500",
-    "佛山市": "440600",
-    "江门市": "440700",
-    "湛江市": "440800",
-    "茂名市": "440900",
-    "肇庆市": "441200",
-    "惠州市": "441300",
-    "梅州市": "441400",
-    "汕尾市": "441500",
-    "河源市": "441600",
-    "阳江市": "441700",
-    "清远市": "441800",
-    "东莞市": "441900",
-    "中山市": "442000",
-    "潮州市": "445100",
-    "揭阳市": "445200",
-    "云浮市": "445300",
-    "南宁市": "450100",
-    "柳州市": "450200",
-    "桂林市": "450300",
-    "梧州市": "450400",
-    "北海市": "450500",
-    "防城港市": "450600",
-    "钦州市": "450700",
-    "贵港市": "450800",
-    "玉林市": "450900",
-    "百色市": "451000",
-    "贺州市": "451100",
-    "河池市": "451200",
-    "来宾市": "451300",
-    "崇左市": "451400",
-    "海口市": "460100",
-    "三亚市": "460200",
-    "三沙市": "460300",
-    "成都市": "510100",
-    "自贡市": "510300",
-    "攀枝花市": "510400",
-    "泸州市": "510500",
-    "德阳市": "510600",
-    "绵阳市": "510700",
-    "广元市": "510800",
-    "遂宁市": "510900",
-    "内江市": "511000",
-    "乐山市": "511100",
-    "南充市": "511300",
-    "眉山市": "511400",
-    "宜宾市": "511500",
-    "广安市": "511600",
-    "达州市": "511700",
-    "雅安市": "511800",
-    "巴中市": "511900",
-    "资阳市": "512000",
-    "阿坝藏族羌族自治州": "513200",
-    "甘孜藏族自治州": "513300",
-    "凉山彝族自治州": "513400",
-    "贵阳市": "520100",
-    "六盘水市": "520200",
-    "遵义市": "520300",
-    "安顺市": "520400",
-    "黔西南布依族苗族自治州": "522300",
-    "黔东南苗族侗族自治州": "522600",
-    "黔南布依族苗族自治州": "522700",
-    "昆明市": "530100",
-    "曲靖市": "530300",
-    "玉溪市": "530400",
-    "保山市": "530500",
-    "昭通市": "530600",
-    "丽江市": "530700",
-    "普洱市": "530800",
-    "临沧市": "530900",
-    "楚雄彝族自治州": "532300",
-    "红河哈尼族彝族自治州": "532500",
-    "文山壮族苗族自治州": "532600",
-    "西双版纳傣族自治州": "532800",
-    "大理白族自治州": "532900",
-    "德宏傣族景颇族自治州": "533100",
-    "怒江傈僳族自治州": "533300",
-    "迪庆藏族自治州": "533400",
-    "拉萨市": "540100",
-    "昌都地区": "542100",
-    "山南地区": "542200",
-    "日喀则地区": "542300",
-    "那曲地区": "542400",
-    "阿里地区": "542500",
-    "林芝地区": "542600",
-    "西安市": "610100",
-    "铜川市": "610200",
-    "宝鸡市": "610300",
-    "咸阳市": "610400",
-    "渭南市": "610500",
-    "延安市": "610600",
-    "汉中市": "610700",
-    "榆林市": "610800",
-    "安康市": "610900",
-    "商洛市": "611000",
-    "兰州市": "620100",
-    "嘉峪关市": "620200",
-    "金昌市": "620300",
-    "白银市": "620400",
-    "天水市": "620500",
-    "武威市": "620600",
-    "张掖市": "620700",
-    "平凉市": "620800",
-    "酒泉市": "620900",
-    "庆阳市": "621000",
-    "定西市": "621100",
-    "陇南市": "621200",
-    "临夏回族自治州": "622900",
-    "甘南藏族自治州": "623000",
-    "西宁市": "630100",
-    "海东地区": "632100",
-    "海北藏族自治州": "632200",
-    "黄南藏族自治州": "632300",
-    "海南藏族自治州": "632500",
-    "果洛藏族自治州": "632600",
-    "玉树藏族自治州": "632700",
-    "海西蒙古族藏族自治州": "632800",
-    "银川市": "640100",
-    "石嘴山市": "640200",
-    "吴忠市": "640300",
-    "固原市": "640400",
-    "中卫市": "640500",
-    "乌鲁木齐市": "650100",
-    "克拉玛依市": "650200",
-    "吐鲁番地区": "652100",
-    "哈密地区": "652200",
-    "昌吉回族自治州": "652300",
-    "博尔塔拉蒙古自治州": "652700",
-    "巴音郭楞蒙古自治州": "652800",
-    "阿克苏地区": "652900",
-    "克孜勒苏柯尔克孜自治州": "653000",
-    "喀什地区": "653100",
-    "和田地区": "653200",
-    "伊犁哈萨克自治州": "654000",
-    "塔城地区": "654200",
-    "阿勒泰地区": "654300",
-    "自治区直辖县级行政区划": "659000",
-    "台湾省": "710000",
-    "香港特别行政区": "810100",
-    "澳门特别行政区": "820000"
-}
-export {cityMap}

+ 0 - 400
src/pages/bigdata/equipDistributeMap/coord.js

@@ -1,400 +0,0 @@
-const coord={
-    "北京市": [116.395645,39.929986],
-    "天津市": [117.210813,39.14393],
-    "上海市": [121.487899,31.249162],
-    "重庆市": [106.530635,29.544606],
-    "香港特别行政区": [114.186124,22.293586],
-    "澳门特别行政区": [113.557519,22.204118],
-    "台湾省": [120.961454,23.80406],
-    //新疆维吾尔自治区
-    "新疆维吾尔自治区":[85.529005,41.994449],
-    "克拉玛依市": [84.88118,45.594331],
-    "乌鲁木齐市": [87.564988,43.84038],
-    "巴音郭楞蒙古自治州": [86.121688,41.771362],
-    "伊犁哈萨克自治州": [81.297854,43.922248],
-    "吐鲁番地区": [89.181595,42.96047],
-    "阿勒泰地区": [88.137915,47.839744],
-    "哈密地区": [93.528355,42.858596],
-    "博尔塔拉蒙古自治州": [82.052436,44.913651],
-    "阿克苏地区": [80.269846,41.171731],
-    "克孜勒苏柯尔克孜自治州": [76.137564,39.750346],
-    "昌吉回族自治州": [87.296038,44.007058],
-    "喀什地区": [75.992973,39.470627],
-    "和田地区": [79.930239,37.116774 ],
-    "塔城地区": [82.974881,46.758684],
-    "省直辖行政单位": [85.564988,40.84038],
-    //广西壮族自治区
-    "广西壮族自治区":[109.077545,23.89242],
-    "崇左市": [107.357322, 22.415455],
-    "柳州市": [109.422402, 24.329053],
-    "百色市": [106.631821, 23.901512],
-    "南宁市": [108.297234,22.806493 ],
-    "梧州市": [111.305472, 23.485395],
-    "北海市": [109.122628, 21.472718],
-    "桂林市": [110.26092, 25.262901],
-    "河池市": [108.069948, 24.699521],
-    "贵港市": [109.613708, 23.103373],
-    "钦州市": [108.638798, 21.97335],
-    "来宾市": [109.231817, 23.741166],
-    "防城港市": [108.351791, 21.617398],
-    "贺州市": [111.552594, 24.411054],
-    "玉林市": [110.151676, 22.643974],
-    // 西藏自治区
-    "西藏自治区":[88.546162,31.198749],
-    "山南地区": [91.750644, 29.229027],
-    "那曲地区": [92.067018, 31.48068],
-    "阿里地区": [81.107669, 30.404557],
-    "拉萨市": [91.111891, 29.662557],
-    "昌都地区": [97.185582, 31.140576],
-    "林芝地区": [94.349985, 29.666941],
-    "日喀则地区": [88.891486, 29.269023],
-    //宁夏回族自治区
-    "宁夏回族自治区":[106.207567,37.48031],
-    "银川市": [106.206479, 38.502621],
-    "吴忠市": [106.208254, 37.993561],
-    "中卫市": [105.196754, 37.521124],
-    "石嘴山市": [106.379337, 39.020223],
-    "固原市": [106.285268, 36.021523],
-    // 内蒙古自治区
-    "内蒙古自治区":[117.503507,44.65333],
-    "乌海市": [106.831999,39.683177],
-    "鄂尔多斯市": [109.993706,39.81649],
-    "兴安盟": [122.048167,46.083757],
-    "锡林郭勒盟": [116.02734,43.939705],
-    "巴彦淖尔市": [107.423807,40.76918],
-    "赤峰市": [118.930761,42.297112],
-    "乌兰察布市": [113.112846,41.022363],
-    "呼伦贝尔市": [119.760822,49.201636],
-    "通辽市": [122.260363,43.633756],
-    "阿拉善盟": [105.695683,38.843075],
-    "包头市": [109.846239,40.647119],
-    "呼和浩特市": [111.660351, 40.828319],
-    //四川省
-    "四川省":[102.78567,30.818421],
-    "遂宁市": [105.564888,30.557491],
-    "雅安市": [103.009356,29.999716],
-    "巴中市": [106.757916,31.869189],
-    "攀枝花市": [101.722423,26.587571],
-    "自贡市": [104.776071,29.359157],
-    "凉山彝族自治州": [102.259591,27.892393],
-    "广元市": [105.819687,32.44104],
-    "广安市": [106.63572,30.463984],
-    "宜宾市": [104.633019,28.769675],
-    "达州市": [107.494973,31.214199],
-    "南充市": [106.105554,30.800965],
-    "成都市": [104.067923,30.679943],
-    "内江市": [105.073056,29.599462],
-    "资阳市": [104.633019,28.769675],
-    "阿坝藏族羌族自治州": [102.228565,31.905763],
-    "甘孜藏族自治州": [101.969232,30.055144],
-    "绵阳市": [104.705519,31.504701],
-    "乐山市": [103.760824,29.600958],
-    "泸州市": [105.44397,28.89593],
-    "德阳市": [104.402398,31.13114],
-    "眉山市": [103.84143,30.061115],
-    //陕西省
-    "陕西省":[108.452037,34.062789],
-    "安康市": [109.038045,32.70437],
-    "咸阳市": [108.707509,34.345373],
-    "渭南市": [109.483933,34.502358],
-    "汉中市": [107.045478,33.081569],
-    "延安市": [109.50051,36.60332],
-    "榆林市": [109.745926,38.279439],
-    "西安市": [108.953098,34.2778],
-    "铜川市": [108.968067,34.908368],
-    "宝鸡市": [107.170645,34.364081],
-    "商洛市": [109.934208,33.873907],
-    // 河南省
-    "河南省":[113.824048,34.124015],
-    "焦作市": [113.211836,35.234608],
-    "南阳市": [112.542842,33.01142],
-    "三门峡市": [111.181262,34.78332],
-    "平顶山市": [113.300849,33.745301],
-    "驻马店市": [114.049154,32.983158],
-    "新乡市": [113.91269,35.307258],
-    "许昌市": [113.835312,34.02674],
-    "洛阳市": [112.447525,34.657368],
-    "开封市": [114.351642,34.801854],
-    "安阳市": [114.351807,36.110267],
-    "周口市": [114.654102,33.623741],
-    "信阳市": [114.085491,32.128582],
-    "郑州市": [113.649644,34.75661],
-    "濮阳市": [115.026627,35.753298],
-    "商丘市": [115.641886,34.438589],
-    "漯河市": [114.046061,33.576279],
-    "鹤壁市": [114.29777,35.755426],
-    //浙江省
-    "浙江省":[120.079129,29.314198],
-    "丽水市": [119.929576,28.4563],
-    "衢州市": [118.875842,28.95691],
-    "台州市": [121.440613,28.668283],
-    "宁波市": [121.579006,29.885259],
-    "杭州市": [120.219375,30.259244],
-    "金华市": [119.652576,29.102899],
-    "温州市": [120.690635,28.002838],
-    "绍兴市": [120.592467,30.002365],
-    "嘉兴市": [120.760428,30.773992],
-    "湖州市": [120.137243,30.877925],
-    "舟山市": [122.169872,30.03601],
-    // 海南省
-    "海南省":[109.673688,19.16679],
-    "海口市": [110.330802,20.022071],
-    "三亚市": [109.522771,18.257776],
-    "省直辖县级行政单位": [109.9267865,19.1399235],
-    // 山西省
-    "山西省":[112.028542,37.705527],
-    "运城市": [111.006854,35.038859],
-    "忻州市": [112.727939,38.461031],
-    "晋城市": [112.867333,35.499834],
-    "临汾市": [111.538788,36.099745],
-    "阳泉市": [113.569238,37.869529],
-    "长治市": [113.120292,36.201664],
-    "吕梁市": [111.143157,37.527316],
-    "太原市": [112.550864,37.890277],
-    "大同市": [113.290509,40.113744],
-    "朔州市": [112.479928,39.337672],
-    "晋中市": [112.738514,37.693362],
-    // 广东省
-    "广东省":[113.205969,23.78045],
-    "韶关市": [113.594461,24.80296],
-    "惠州市": [114.410658,23.11354],
-    "揭阳市": [116.379501,23.547999],
-    "云浮市": [112.050946,22.937976],
-    "深圳市": [114.025974,22.546054],
-    "潮州市": [116.630076,23.661812],
-    "清远市": [113.040773,23.698469],
-    "梅州市": [116.126403,24.304571],
-    "广州市": [113.30765,23.120049],
-    "东莞市": [113.763434,23.043024],
-    "江门市": [113.078125,22.575117],
-    "肇庆市": [112.479653,23.078663],
-    "茂名市": [110.931245,21.668226],
-    "阳江市": [111.97701,21.871517],
-    "汕尾市": [115.372924,22.778731],
-    "河源市": [114.713721,23.757251],
-    "中山市": [113.42206,22.545178],
-    "佛山市": [113.134026,23.035095],
-    "汕头市": [116.72865,23.383908],
-    "湛江市": [110.365067,21.257463],
-    "珠海市": [113.562447,22.256915],
-    // 云南省
-    "云南省":[101.431699,24.590567],
-    "怒江傈僳族自治州": [98.859932,25.860677],
-    "迪庆藏族自治州": [99.713682,27.831029],
-    "昭通市": [103.725021,27.340633],
-    "西双版纳傣族自治州": [100.803038,22.009433],
-    "玉溪市": [102.545068,24.370447],
-    "临沧市": [100.092613,23.887806],
-    "大理白族自治州": [100.223675,25.5969],
-    "丽江市": [100.229628,26.875351],
-    "楚雄彝族自治州": [101.529382,25.066356],
-    "红河哈尼族彝族自治州": [103.384065,23.367718],
-    "文山壮族苗族自治州": [104.089112,23.401781],
-    "昆明市": [102.714601,25.049153],
-    "曲靖市": [103.782539,25.520758],
-    "保山市": [99.177996,25.120489],
-    "思茅市": [100.980058,22.788778],
-    "德宏傣族景颇族自治州": [98.589434,24.44124],
-    // 贵州省
-    "贵州省":[106.80371,27.120609],
-    "贵阳市": [106.709177,26.629907],
-    "黔西南布依族苗族自治州": [104.900558,25.095148],
-    "铜仁地区": [109.196161,27.726271],
-    "黔东南苗族侗族自治州": [107.985353,26.583992],
-    "遵义市": [106.93126,27.699961],
-    "毕节地区": [105.300492,27.302612],
-    "黔南布依族苗族自治州": [107.523205,26.264536],
-    "六盘水市": [104.852087,26.591866],
-    "安顺市": [105.92827,26.228595],
-    // 辽宁省
-    "辽宁省":[123.508455,41.628101],
-    "鞍山市": [123.007763,41.118744],
-    "本溪市": [123.778062,41.325838],
-    "营口市": [122.233391,40.668651],
-    "大连市": [121.593478,38.94871],
-    "铁岭市": [123.85485,42.299757],
-    "朝阳市": [120.446163,41.571828],
-    "抚顺市": [123.92982,41.877304],
-    "盘锦市": [122.073228,41.141248],
-    "丹东市": [124.338543,40.129023],
-    "葫芦岛市": [120.860758,40.74303],
-    "锦州市": [121.147749,41.130879],
-    "沈阳市": [123.432791,41.808645],
-    "辽阳市": [123.172451,41.273339],
-    "阜新市": [121.660822,42.01925],
-    // 河北省
-    "河北省":[115.340056,38.808025],
-    "廊坊市": [116.703602,39.518611],
-    "衡水市": [115.686229,37.746929],
-    "秦皇岛市": [119.604368,39.945462],
-    "承德市": [117.933822,40.992521],
-    "沧州市": [116.863806,38.297615],
-    "张家口市": [114.893782,40.811188],
-    "石家庄市": [114.522082,38.048958],
-    "保定市": [115.49481,38.886565],
-    "唐山市": [118.183451,39.650531],
-    "邢台市": [114.520487,37.069531],
-    "邯郸市": [114.482694,36.609308],
-    // 青海省
-    "青海省":[95.838921,35.990452],
-    "海南藏族自治州": [100.624066,36.284364],
-    "海西蒙古族藏族自治州": [97.342625,37.373799],
-    "海东地区": [102.085207,36.51761],
-    "果洛藏族自治州": [100.223723,34.480485],
-    "西宁市": [101.767921,36.640739],
-    "海北藏族自治州": [100.879802,36.960654],
-    "黄南藏族自治州": [102.0076,35.522852],
-    "玉树藏族自治州": [97.013316,33.00624],
-    // 湖南省
-    "湖南省":[111.734185,27.907989],
-    "邵阳市": [111.461525,27.236811],
-    "张家界市": [110.48162,29.124889],
-    "益阳市": [112.366547,28.588088],
-    "怀化市": [109.986959,27.557483],
-    "湘西土家族苗族自治州": [109.745746,28.317951],
-    "郴州市": [113.037704,25.782264],
-    "衡阳市": [112.583819,26.898164],
-    "永州市": [111.614648,26.435972],
-    "株洲市": [113.131695,27.827433],
-    "岳阳市": [113.146196,29.378007],
-    "长沙市": [112.979353,28.213478],
-    "湘潭市": [112.935556,27.835095],
-    "常德市": [111.653718,29.012149],
-    "娄底市": [111.996396,27.741073],
-    // 江苏省
-    "江苏省":[119.313872,33.623478],
-    "镇江市": [119.455835,32.204409],
-    "常州市": [119.981861,31.771397],
-    "南通市": [120.873801,32.014665],
-    "泰州市": [119.919606,32.476053],
-    "南京市": [118.778074,32.057236],
-    "苏州市": [120.619907,31.317987],
-    "盐城市": [120.148872,33.379862],
-    "宿迁市": [118.296893,33.95205],
-    "无锡市": [120.305456,31.570037],
-    "连云港市": [119.173872,34.601549],
-    "徐州市": [117.188107,34.271553],
-    "淮安市": [119.030186,33.606513],
-    "扬州市": [119.427778,32.408505],
-    // 山东省
-    "山东省":[118.062856,36.348474],
-    "潍坊市": [119.142634,36.716115],
-    "日照市": [119.50718,35.420225],
-    "济宁市": [116.600798,35.402122],
-    "聊城市": [115.986869,36.455829],
-    "德州市": [116.328161,37.460826],
-    "临沂市": [118.340768,35.072409],
-    "枣庄市": [117.279305,34.807883],
-    "莱芜市": [117.684667,36.233654],
-    "烟台市": [121.309555,37.536562],
-    "淄博市": [118.059134,36.804685],
-    "滨州市": [117.968292,37.405314],
-    "泰安市": [117.089415,36.188078],
-    "荷泽市": [115.46336,35.26244],
-    "济南市": [117.024967,36.682785],
-    "威海市": [122.093958,37.528787],
-    "青岛市": [120.384428,36.105215],
-    "东营市": [118.583926,37.487121],
-    // 安徽省
-    "安徽省":[117.032607,31.945119],
-    "宣城市": [118.752096,30.951642],
-    "阜阳市": [115.820932,32.901211],
-    "亳州市": [115.787928,33.871211],
-    "蚌埠市": [117.35708,32.929499],
-    "黄山市": [118.29357,29.734435],
-    "六安市": [116.505253,31.755558],
-    "池州市": [117.494477,30.660019],
-    "滁州市": [118.32457,32.317351],
-    "淮南市": [117.018639,32.642812],
-    "铜陵市": [117.819429,30.94093],
-    "合肥市": [117.282699,31.866942],
-    "芜湖市": [118.384108,31.36602],
-    "马鞍山市": [118.515882,31.688528],
-    "安庆市": [117.058739,30.537898],
-    "淮北市": [116.791447,33.960023],
-    "宿州市": [116.988692,33.636772],
-    "巢湖市": [117.88049,31.608733],
-    //黑龙江省
-    "黑龙江省":[128.733288,46.759018],
-    "双鸭山市": [131.171402,46.655102],
-    "绥化市": [126.989095,46.646064],
-    "大兴安岭地区": [124.196104,51.991789],
-    "佳木斯市": [130.284735,46.81378],
-    "黑河市": [127.50083,50.25069],
-    "哈尔滨市": [126.657717,45.773225],
-    "大庆市": [125.02184,46.596709],
-    "七台河市": [131.019048,45.775005],
-    "伊春市": [128.910766,47.734685],
-    "牡丹江市": [129.608035,44.588521],
-    "鸡西市": [130.941767,45.32154|13],
-    "齐齐哈尔市": [123.987289,47.3477],
-    "鹤岗市": [130.292472,47.338666],
-    // 福建省
-    "福建省":[117.915677,25.995524],
-    "三明市": [117.642194,26.270835],
-    "厦门市": [118.103886,24.489231],
-    "龙岩市": [117.017997,25.078685],
-    "莆田市": [119.077731,25.44845],
-    "南平市": [118.181883,26.643626],
-    "宁德市": [119.542082,26.656527],
-    "泉州市": [118.600362,24.901652],
-    "漳州市": [117.676205,24.517065],
-    "福州市": [119.330221,26.047125],
-    // 甘肃省
-    "甘肃省":[104.522445,34.845883],
-    "定西市": [104.626638,35.586056],
-    "嘉峪关市": [98.281635,39.802397],
-    "庆阳市": [107.644227,35.726801],
-    "酒泉市": [98.508415,39.741474],
-    "临夏回族自治州": [103.215249,35.598514],
-    "金昌市": [102.208126,38.516072],
-    "张掖市": [100.459892,38.93932],
-    "白银市": [104.171241,36.546682],
-    "陇南市": [104.934573,33.39448],
-    "天水市": [105.736932,34.584319],
-    "兰州市": [103.823305,36.064226],
-    "武威市": [102.640147,37.933172],
-    "平凉市": [106.688911,35.55011],
-    "甘南藏族自治州": [102.917442,34.992211],
-    // 湖北省
-    "湖北省":[112.102131,31.125718],
-    "鄂州市": [114.895594,30.384439],
-    "武汉市": [114.3162,30.581084],
-    "荆门市": [112.21733,31.042611],
-    "恩施土家族苗族自治州": [109.517433,30.308978],
-    "随州市": [113.379358,31.717858],
-    "湖北省直辖行政单位": [110.487231,31.595768],
-    "孝感市": [113.935734,30.927955],
-    "襄樊市": [112.176326,32.094934],
-    "黄冈市": [114.906618,30.446109],
-    "荆州市": [112.241866,30.332591],
-    "十堰市": [110.801229,32.636994],
-    "宜昌市": [111.310981,30.732758],
-    "黄石市": [115.050683,30.216127],
-    "咸宁市": [114.300061,29.880657],
-    // 吉林省
-    "吉林省":[112.102131,31.125718],
-    "长春市": [125.313642,43.898338],
-    "通化市": [125.94265,41.736397],
-    "吉林市": [126.564544,43.871988],
-    "白山市": [126.435798,41.945859],
-    "松原市": [124.832995,45.136049],
-    "延边朝鲜族自治州": [129.485902,42.896414],
-    "辽源市": [125.133686,42.923303],
-    "白城市": [122.840777,45.621086],
-    "四平市": [124.391382,43.175525],
-    // 江西省
-    "江西省":[115.340056,27.777155],
-    "抚州市": [116.360919,27.954545],
-    "九江市": [115.999848,29.71964],
-    "宜春市": [114.400039,27.81113],
-    "上饶市": [117.955464,28.457623],
-    "赣州市": [114.935909,25.845296],
-    "南昌市": [115.893528,28.689578],
-    "吉安市": [114.992039,27.113848],
-    "景德镇市": [117.186523,29.303563],
-    "萍乡市": [113.859917,27.639544],
-    "新余市": [114.947117,27.822322],
-    "鹰潭市": [117.03545,28.24131]
-}
-export {coord}

文件差异内容过多而无法显示
+ 0 - 1092
src/pages/bigdata/fourSituations/FourSituations.vue


+ 0 - 392
src/pages/bigdata/fourSituations/chart.js

@@ -1,392 +0,0 @@
-const option01 = {
-  tooltip: {
-    trigger: "axis",
-    axisPointer: {
-      lineStyle: {
-        color: "#dddc6b"
-      }
-    }
-  },
-  legend: {
-    top: "0%",
-    textStyle: {
-      color: "#fff",
-      fontSize: "12"
-    }
-  },
-  grid: {
-    left: "10",
-    top: "30",
-    right: "20",
-    bottom: "10",
-    containLabel: true
-  },
-  xAxis: [{
-      type: "category",
-      boundaryGap: false,
-      axisLabel: {
-        textStyle: {
-          color: "#fff",
-          fontSize: 12
-        }
-      },
-      axisLine: {
-        lineStyle: {
-          color: "#fff"
-        }
-      },
-      data: [
-        "05-06",
-        "05-07",
-        "05-08",
-        "05-09",
-        "05-10",
-        "05-11",
-        "05-12",
-        "05-13",
-        "05-14",
-      ]
-    },
-    {
-      axisPointer: {
-        show: false
-      },
-      axisLine: {
-        show: false
-      },
-      position: "bottom",
-      offset: 0
-    }
-  ],
-  yAxis: [{
-    type: "value",
-    axisTick: {
-      show: false
-    },
-    axisLine: {
-      lineStyle: {
-        color: "#fff"
-      }
-    },
-    axisLabel: {
-      textStyle: {
-        color: "#fff",
-        fontSize: 12
-      }
-    },
-    splitLine: {
-      show: false
-    }
-  }],
-  series: [{
-      name: "保温仓设定温度",
-      type: "line",
-      smooth: true,
-      symbol: "circle", //标记的 图形
-      symbolSize: 5,
-      showSymbol: true,
-      lineStyle: {
-        normal: {
-          color: "#39b6e6",
-          width: 2
-        }
-      },
-      areaStyle: {
-        normal: {
-          color: {
-            type: 'linear',
-            x: 0,
-            y: 0,
-            x2: 0,
-            y2: 1,
-            colorStops: [{
-              offset: 0,
-              color: 'rgba(61, 196, 241, 1)' // 0% 处的颜色
-            }, {
-              offset: 0.8,
-              color: 'rgba(61, 196, 241, 0.2)' // 100% 处的颜色
-            }],
-            global: false // 缺省为 false
-          },
-          shadowColor: "rgba(0, 0, 0, 0.1)"
-        }
-      },
-      itemStyle: {
-        normal: {
-          color: "#39b6e6",
-          borderColor: "#39b6e6",
-          borderWidth: 2
-        }
-      },
-      data: [
-        30,
-        40,
-        30,
-        40,
-        30,
-        40,
-        30,
-        60,
-        20,
-      ]
-    },
-    {
-      name: "保温仓当前温度",
-      type: "line",
-      smooth: true,
-      symbol: "circle",
-      symbolSize: 5,
-      showSymbol: true,
-      lineStyle: {
-        normal: {
-          color: "#c71881",
-          width: 2
-        }
-      },
-      itemStyle: {
-        normal: {
-          color: "#c71881",
-          borderColor: "#c71881",
-          borderWidth: 2
-        }
-      },
-      data: [
-        50,
-        30,
-        50,
-        60,
-        10,
-        50,
-        30,
-        50,
-        60,
-      ]
-    }
-  ]
-};
-
-function bzyLine(data) {
-  return {
-    tooltip: {
-      trigger: "axis",
-      axisPointer: {
-        lineStyle: {
-          color: "#dddc6b"
-        }
-      }
-    },
-    legend: {
-      top: "0%",
-      textStyle: {
-        color: "#fff",
-        fontSize: "12"
-      }
-    },
-    grid: {
-      left: "10",
-      top: "30",
-      right: "20",
-      bottom: "10",
-      containLabel: true
-    },
-    xAxis: [{
-        type: "category",
-        boundaryGap: false,
-        axisLabel: {
-          textStyle: {
-            color: "#fff",
-            fontSize: 12
-          }
-        },
-        axisLine: {
-          lineStyle: {
-            color: "#fff"
-          }
-        },
-        data: data.time
-      },
-      {
-        axisPointer: {
-          show: false
-        },
-        axisLine: {
-          show: false
-        },
-        position: "bottom",
-        offset: 0
-      }
-    ],
-    yAxis: [{
-      type: "value",
-      axisTick: {
-        show: false
-      },
-      axisLine: {
-        lineStyle: {
-          color: "#fff"
-        }
-      },
-      axisLabel: {
-        textStyle: {
-          color: "#fff",
-          fontSize: 12
-        }
-      },
-      splitLine: {
-        show: false
-      }
-    }],
-    series: [{
-        name: "保温仓设定温度",
-        type: "line",
-        smooth: true,
-        symbol: "circle", //标记的 图形
-        symbolSize: 5,
-        showSymbol: true,
-        lineStyle: {
-          normal: {
-            color: "#39b6e6",
-            width: 2
-          }
-        },
-        areaStyle: {
-          normal: {
-            color: {
-              type: 'linear',
-              x: 0,
-              y: 0,
-              x2: 0,
-              y2: 1,
-              colorStops: [{
-                offset: 0,
-                color: 'rgba(61, 196, 241, 1)' // 0% 处的颜色
-              }, {
-                offset: 0.8,
-                color: 'rgba(61, 196, 241, 0.2)' // 100% 处的颜色
-              }],
-              global: false // 缺省为 false
-            },
-            shadowColor: "rgba(0, 0, 0, 0.1)"
-          }
-        },
-        itemStyle: {
-          normal: {
-            color: "#39b6e6",
-            borderColor: "#39b6e6",
-            borderWidth: 2
-          }
-        },
-        data: data.set_temp
-      },
-      {
-        name: "保温仓当前温度",
-        type: "line",
-        smooth: true,
-        symbol: "circle",
-        symbolSize: 5,
-        showSymbol: true,
-        lineStyle: {
-          normal: {
-            color: "#c71881",
-            width: 2
-          }
-        },
-        itemStyle: {
-          normal: {
-            color: "#c71881",
-            borderColor: "#c71881",
-            borderWidth: 2
-          }
-        },
-        data: data.pre_temp
-      }
-    ]
-  };
-}
-
-function qxzHisBar(data) {
-  return {
-    color: ["#2f89cf"],
-    tooltip: {
-      trigger: "axis",
-      axisPointer: {
-        // 坐标轴指示器,坐标轴触发有效
-        type: "shadow" // 默认为直线,可选为:'line' | 'shadow'
-      }
-    },
-    grid: {
-      left: "10",
-      top: "10",
-      right: "10",
-      bottom: "5",
-      containLabel: true
-    },
-    xAxis: [{
-      type: "category",
-      data: data.time,
-      axisTick: {
-        alignWithLabel: true
-      },
-      axisLabel: {
-        textStyle: {
-          color: "rgba(255,255,255,.6)",
-          fontSize: "12"
-        }
-      },
-      axisLine: {
-        show: false
-      }
-    }],
-    yAxis: [{
-      type: "value",
-      axisLabel: {
-        textStyle: {
-          color: "rgba(255,255,255,.6)",
-          fontSize: "12"
-        }
-      },
-      axisLine: {
-        lineStyle: {
-          color: "rgba(255,255,255,.1)"
-          // width: 1,
-          // type: "solid"
-        }
-      },
-      splitLine: {
-        lineStyle: {
-          color: "rgba(255,255,255,.1)"
-        }
-      }
-    }],
-    series: [{
-      name: data.tex,
-      type: "line",
-      barWidth: "12",
-      data: data.val,
-      itemStyle: {
-        normal: {
-          barBorderRadius: 30,
-          color: {
-            type: 'linear',
-            x: 0,
-            y: 0,
-            x2: 0,
-            y2: 1,
-            colorStops: [{
-              offset: 0,
-              color: '#3fedcc' // 0% 处的颜色
-            }, {
-              offset: 1,
-              color: '#086ce6' // 100% 处的颜色
-            }],
-            global: false // 缺省为 false
-          },
-        },
-      },
-    }]
-  };
-}
-export {
-  bzyLine,
-  qxzHisBar
-}

+ 0 - 268
src/pages/bigdata/home/index.vue

@@ -1,268 +0,0 @@
-<template>
-	<div class="wrap" :style="{backgroundImage:'url('+bodyBg+')'}">
-		<div id="certify">
-			<div class="swiper-container">
-				<div class="swiper-wrapper">
-					<div
-						class="swiper-slide"
-						v-for="(item,index) in lists"
-						@click="goPage(item.type)"
-						:key="index"
-						:style="{backgroundImage:'url('+item.imgUrl+')'}"
-					></div>
-				</div>
-			</div>
-			<div class="swiper-button-prev" :style="{backgroundImage:'url('+btnBg+')'}"></div>
-			<div class="swiper-button-next" :style="{backgroundImage:'url('+btnBg+')'}"></div>
-			<div class="swiper-pagination"></div>
-		</div>
-		<div class="btn-box">
-			<ul>
-				<li
-					:class="{'active':aIndex==index}"
-					@click="switchTo(index)"
-					v-for="(item,index) in lists"
-					:key="index"
-				>{{item.name}}</li>
-			</ul>
-		</div>
-	</div>
-</template>
-
-<script>
-import Swiper from 'swiper'
-import 'swiper/dist/css/swiper.min.css'
-export default {
-	data() {
-		return {
-			bodyBg: require('@/assets/images/bigdata/home/bg.jpg'),
-			btnBg: require('@/assets/images/bigdata/home/button_icon.png'),
-			certifySwiper: '',
-			aIndex: 0,
-			lists: [
-				{
-					type: '/bCbd',
-					name: '虫情测报系统',
-					imgUrl: require('@/assets/images/bigdata/home/cbd.png')
-				},
-				// {
-				// 	type: '/jk',
-				// 	name: '监控系统',
-				// 	imgUrl: require('@/assets/images/bigdata/home/jk.png')
-				// },
-				{
-					type: '/bBzy',
-					name: '孢子仪系统',
-					imgUrl: require('@/assets/images/bigdata/home/bzy.png')
-				},
-				{
-					type: '/bQxz',
-					name: '气象监测系统',
-					imgUrl: require('@/assets/images/bigdata/home/qxz.png')
-				},
-				// {
-				// 	type: '/farm',
-				// 	name: '农场管理系统',
-				// 	imgUrl: require('@/assets/images/bigdata/home/farm.png')
-				// },
-				{
-					type: '/bSy',
-					name: '溯源系统',
-					imgUrl: require('@/assets/images/bigdata/home/sy.png')
-				},
-				{
-					type: '/equipDistribute',
-					name: '设备分布展示',
-					imgUrl: require('@/assets/images/bigdata/home/distribute.png')
-				},
-				{
-					type: '/bFourSituations',
-					name: '设备综合展示',
-					imgUrl: require('@/assets/images/bigdata/home/fourSituations.png')
-				}
-			]
-		}
-	},
-	mounted() {
-		this.swiperInit()
-	},
-	methods: {
-		switchTo(i) {
-			this.aIndex = i
-			this.certifySwiper.slideTo(i+5, 1000, false)
-		},
-		swiperInit() {
-			let _this = this
-			this.certifySwiper = new Swiper('#certify .swiper-container', {
-				watchSlidesProgress: true,
-				slidesPerView: 'auto',
-				centeredSlides: true,
-				loop: true,
-				loopedSlides: 5,
-				autoplay: 3000,
-				prevButton: '.swiper-button-prev',
-				nextButton: '.swiper-button-next',
-				pagination: '.swiper-pagination',
-				paginationClickable :true,
-				//paginationClickable :true,
-				onProgress: function(swiper, progress) {
-					for (var i = 0; i < swiper.slides.length; i++) {
-						var slide = swiper.slides.eq(i);
-						var slideProgress = swiper.slides[i].progress;
-						var modify = 1;
-						if (Math.abs(slideProgress) > 1) {
-							modify = (Math.abs(slideProgress) - 1) * 0.3 + 1;
-						}
-						var translate = slideProgress * modify * 260 + 'px';
-						var scale = 1 - Math.abs(slideProgress) / 5;
-						var zIndex = 999 - Math.abs(Math.round(10 * slideProgress));
-						slide.transform('translateX(' + translate + ') scale(' + scale + ')');
-						slide.css('zIndex', zIndex);
-						slide.css('opacity', 1);
-						if (Math.abs(slideProgress) > 3) {
-							slide.css('opacity', 0);
-						}
-					}
-				},
-				onSetTransition: function(swiper, transition) {
-					for (var i = 0; i < swiper.slides.length; i++) {
-						var slide = swiper.slides.eq(i)
-						slide.transition(transition);
-					}
-
-				},
-				//处理分页器bug
-				onSlideChangeStart: function(swiper) {
-					if (swiper.activeIndex == 4) {
-						swiper.bullets.eq(9).addClass('swiper-pagination-bullet-active');
-						console.log(swiper.bullets.length);
-					}
-				},
-				//使右边菜单跟着动
-				onSlideChangeEnd: function(swiper){
-					_this.aIndex = swiper.realIndex //切换结束时,告诉我现在是第几个slide
-				}
-			})
-		},
-		goPage(type) {
-			const { href } = this.$router.resolve({
-				path: type
-			})
-			window.open(href, '_blank')
-		}
-	}
-}
-</script>
-
-<style lang='less' scoped>
-body {
-	overflow: hidden;
-}
-.wrap {
-	width: 100%;
-	height: 100%;
-	background-repeat: no-repeat;
-	background-size: 100% 100%;
-	background-position: center;
-	overflow: hidden;
-	#certify {
-		position: relative;
-		width: 1200px;
-		margin: 0 auto;
-		margin-top: 150px;
-	}
-
-	#certify .swiper-container {
-		padding-bottom: 60px;
-	}
-
-	#certify .swiper-slide {
-		width: 500px;
-		height: 488px;
-		background-size: 75% 100%;
-		background-position: center center;
-		background-repeat: no-repeat;
-	}
-	#certify .swiper-slide img {
-		display: block;
-	}
-	#certify .swiper-slide p {
-		line-height: 98px;
-		padding-top: 0;
-		text-align: center;
-		color: #636363;
-		font-size: 1.1em;
-		margin: 0;
-	}
-
-	#certify /deep/.swiper-pagination {
-		width: 100%;
-		bottom: 20px;
-	}
-
-	#certify /deep/.swiper-pagination-bullets .swiper-pagination-bullet {
-		outline: none;
-		margin: 0 5px;
-		border: 2px solid #fff;
-		background-color: transparent;
-		width: 10px;
-		height: 10px;
-		opacity: 1;
-	}
-
-	#certify /deep/.swiper-pagination-bullets .swiper-pagination-bullet-active {
-		border: 2px solid #00aadc;
-		background-color: transparent;
-	}
-
-	#certify .swiper-button-prev {
-		left: -30px;
-		width: 45px;
-		height: 46px;
-		background-repeat: no-repeat;
-		background-position: 0 0;
-		background-size: 100%;
-		outline: none;
-	}
-
-	#certify .swiper-button-prev:hover {
-		background-position: 0 -46px;
-		background-size: 100%;
-	}
-
-	#certify .swiper-button-next {
-		right: -30px;
-		width: 45px;
-		height: 46px;
-		background-repeat: no-repeat;
-		background-position: 0 -93px;
-		background-size: 100%;
-		outline: none;
-	}
-
-	#certify .swiper-button-next:hover {
-		background-position: 0 -139px;
-		background-size: 100%;
-	}
-	.btn-box {
-		position: absolute;
-		right: 0;
-		color: #fff;
-		top: 50%;
-		transform: translateY(-50%);
-		line-height: 36px;
-		font-size: 15px;
-		font-weight: 600;
-		text-align: left;
-		li {
-			padding: 0 30px;
-			cursor: pointer;
-		}
-		li.active {
-			background: rgba(255, 255, 255, 0.3);
-			border-top-left-radius: 30px;
-			border-bottom-left-radius: 30px;
-		}
-	}
-}
-</style>

+ 0 - 984
src/pages/bigdata/sy/Sy.vue

@@ -1,984 +0,0 @@
-<template>
-	<div class="wrap" :style="{ backgroundImage: 'url(' + bodyBg + ')' }">
-		<div
-			class="header"
-			:style="{ backgroundImage: 'url(' + headerBg + ')' }"
-		></div>
-		<div class="content">
-			<div class="left">
-				<div class="lOne">
-					<div class="tit" :style="{ backgroundImage: 'url(' + titBg + ')' }">
-						基地信息
-					</div>
-					<div class="con">
-						<ul>
-							<li :style="{ backgroundImage: 'url(' + icon.name + ')' }">
-								<span>基地名称 :</span>
-								<select v-model="baseInfo.id" @change="selectBase">
-									<option
-										v-for="(item, index) in baseList"
-										:key="index"
-										:value="item.id"
-									>
-										{{ item.farmname }}
-									</option>
-								</select>
-							</li>
-							<li :style="{ backgroundImage: 'url(' + icon.addr + ')' }">
-								<span>基地地址 : {{ baseInfo.addr }}</span>
-							</li>
-							<li :style="{ backgroundImage: 'url(' + icon.area + ')' }">
-								<span>基地面积 : {{ baseInfo.farmarea }}亩</span>
-							</li>
-						</ul>
-					</div>
-				</div>
-				<div class="lTwo">
-					<div class="tit" :style="{ backgroundImage: 'url(' + titBg + ')' }">
-						基地概况
-					</div>
-					<div class="con">
-						<ul>
-							<li v-for="(item, i) in nums" :key="i">
-								<div
-									:style="{ backgroundImage: 'url(' + circleBg + ')' }"
-									:class="{
-										col: true,
-										col01: i == 'fieldNum',
-										col02: i == 'plantsType',
-										col03: i == 'farmerNum',
-										col04: i == 'fieldNum2'
-									}"
-								>
-									<img class="light" :src="light" />
-									<span>{{ item.num }}</span>
-									{{ item.unit }}
-								</div>
-								<p>{{ i | baseTit }}</p>
-							</li>
-						</ul>
-					</div>
-				</div>
-				<div class="lThree">
-					<div class="tit" :style="{ backgroundImage: 'url(' + titBg + ')' }">
-						追溯流程
-					</div>
-					<div class="con">
-						<div :style="{ backgroundImage: 'url(' + process + ')' }"></div>
-					</div>
-				</div>
-				<div class="lFour">
-					<div class="tit" :style="{ backgroundImage: 'url(' + titBg + ')' }">
-						产量对比
-					</div>
-					<div class="con">
-						<div class="chart01" ref="chart01Ref"></div>
-					</div>
-				</div>
-			</div>
-			<div class="center">
-				<div class="tit" :style="{ backgroundImage: 'url(' + titBg2 + ')' }">
-					综合展示
-				</div>
-				<div class="chart03" ref="chart03Ref"></div>
-				<div class="infoBox">
-					<ul>
-						<li :style="{ backgroundImage: 'url(' + btnBg + ')' }">
-							产品身份认证信息
-						</li>
-						<li :style="{ backgroundImage: 'url(' + btnBg + ')' }">
-							监测报告及认证证书
-						</li>
-						<li :style="{ backgroundImage: 'url(' + btnBg + ')' }">
-							产品地位置信息
-						</li>
-						<li :style="{ backgroundImage: 'url(' + btnBg + ')' }">
-							产地实时溯源直播
-						</li>
-						<li :style="{ backgroundImage: 'url(' + btnBg + ')' }">
-							产地实时环境监测
-						</li>
-						<li :style="{ backgroundImage: 'url(' + btnBg + ')' }">
-							种植加工全程追溯
-						</li>
-					</ul>
-				</div>
-			</div>
-			<div class="right">
-				<div class="rOne">
-					<div class="tit" :style="{ backgroundImage: 'url(' + titBg + ')' }">
-						作业次数
-					</div>
-					<div class="con">
-						<div class="selTwo">
-							<div class="selBox">
-								<span>作物产品 :</span>
-								<select class="selCode" v-model="backcode" @change="selPlant">
-									<option
-										v-for="item in palntList"
-										:key="item.backcode"
-										:value="item.backcode"
-									>
-										{{ item.land + '——' + item.batch }}
-									</option>
-								</select>
-							</div>
-						</div>
-						<div class="chart02" ref="chart02Ref"></div>
-					</div>
-				</div>
-				<div class="rTwo">
-					<div class="tit" :style="{ backgroundImage: 'url(' + titBg + ')' }">
-						溯源信息
-					</div>
-					<div class="con">
-						<div class="swiper-container" ref="swiperRef">
-							<div class="swiper-wrapper">
-								<div
-									class="swiper-slide"
-									v-for="(item, index) in syInfo"
-									:key="item.uptime"
-								>
-									<i :style="{ backgroundColor: dotColors[index % 4] }"></i>
-									<span>{{ (item.uptime * 1000) | formatTime }}</span>
-									<div class="info">
-										<p>
-											农事作业:
-											{{ item.type | formatType }}
-										</p>
-										<p v-if="item.type == 1">
-											产品名称:
-											{{ item.plantname }}
-										</p>
-										<p v-if="item.type == 2">
-											肥料名称:
-											{{ item.itemname }}
-										</p>
-										<p v-if="item.type == 2">
-											施肥用量:
-											{{ item.manureuse }}kg
-										</p>
-										<p v-if="item.type == 3">
-											灌溉面积:
-											{{ item.area }}亩
-										</p>
-										<p v-if="item.type == 4">
-											药品名称:
-											{{ item.mediname }}
-										</p>
-										<p v-if="item.type == 5">
-											操作事项:
-											{{ item.jobname }}
-										</p>
-										<p v-if="item.type != 1">
-											操作人:
-											{{ item.user }}
-										</p>
-									</div>
-								</div>
-							</div>
-						</div>
-					</div>
-				</div>
-			</div>
-		</div>
-	</div>
-</template>
-
-<script>
-import echarts from 'echarts'
-import '@/plugin/flexible.js'
-import Swiper from 'swiper'
-import 'swiper/dist/css/swiper.min.css'
-import { option01, optionFun } from './chart'
-export default {
-	data() {
-		return {
-			bodyBg: require('@/assets/images/bigdata/sy/bg.jpg'),
-			headerBg: require('@/assets/images/bigdata/sy/1.png'),
-			titBg: require('@/assets/images/bigdata/sy/tit_bg.png'),
-			titBg2: require('@/assets/images/bigdata/sy/tit_bg2.png'),
-			circleBg: require('@/assets/images/bigdata/sy/circle_bg.png'),
-			light: require('@/assets/images/bigdata/sy/circle_l.png'),
-			process: require('@/assets/images/bigdata/sy/process.png'),
-			selectBg: require('@/assets/images/bigdata/sy/sanjiao.png'),
-			btnBg: require('@/assets/images/bigdata/sy/22.png'),
-			baseList: [], //所有基地
-			baseInfo: {
-				id: '',
-				addr: '',
-				farmarea: ''
-			},
-			palntList: [],
-			backcode: '',
-			icon: {
-				name: require('@/assets/images/bigdata/sy/2.png'),
-				addr: require('@/assets/images/bigdata/sy/3.png'),
-				area: require('@/assets/images/bigdata/sy/4.png')
-			},
-			nums: {
-				fieldNum: {
-					num: 10,
-					unit: '个'
-				},
-				plantsType: {
-					num: 10,
-					unit: '种'
-				},
-				farmerNum: {
-					num: 20,
-					unit: '人'
-				},
-				fieldNum2: {
-					num: 10,
-					unit: '个'
-				}
-			},
-			syInfo: [],
-			dotColors: ['#47b7ff', '#26ed5f', '#b6dfff', '#d4368b'],
-			myChart01: {},
-			myChart02: {},
-			linesData: {
-				saddr: { name: '', fromCoord: [] },
-				eaddr: []
-			}
-		}
-	},
-	filters: {
-		baseTit: function (value) {
-			switch (value) {
-				case 'fieldNum':
-					return '地块数量'
-					break
-				case 'plantsType':
-					return '作物种类'
-					break
-				case 'farmerNum':
-					return '工人数量'
-					break
-				case 'fieldNum2':
-					return '地块数量'
-					break
-			}
-		},
-		formatType(value) {
-			switch (value) {
-				case '1':
-					return '种植'
-					break
-				case '2':
-					return '施肥'
-					break
-				case '3':
-					return '灌溉'
-					break
-				case '4':
-					return '喷药'
-					break
-				case '5':
-					return ' 更多'
-					break
-			}
-		}
-	},
-	mounted() {
-		this.chartInit()
-		this.getBaseList()
-	},
-	methods: {
-		getBaseList() {
-			this.$axios({
-				method: 'POST',
-				url: '/api/api_gateway?method=ascend.ascend_manage.base_info'
-			}).then((res) => {
-				if (res.data.message == '') {
-					this.baseList = res.data.data.data
-					this.baseInfo.id = this.baseList[0].id
-					this.baseInfo.farmarea = this.baseList[0].farmarea
-					this.baseInfo.addr = this.baseList[0].farmaddr
-					this.selectBase()
-				}
-			})
-		},
-		//切换农场
-		selectBase() {
-			let obj = this.baseList.filter((item) => {
-				return item.id == this.baseInfo.id
-			})
-			this.baseInfo.addr = obj[0].farmaddr
-			this.baseInfo.farmarea = obj[0].farmarea
-			this.getBaseInfo()
-			this.getProducts()
-			this.getMapTrans()
-		},
-		selPlant() {
-			this.jobTimes()
-			this.allJobs()
-		},
-		//作业次数
-		jobTimes() {
-			this.$axios({
-				method: 'POST',
-				url: '/api/api_gateway?method=ascend.ascend_manage.contrast_job',
-				data: this.qs.stringify({ backcode: this.backcode })
-			}).then((res) => {
-				if (res.data.message == '') {
-					let { irri, job, manure, medi } = res.data.data
-					let arrName = ['施肥', '喷药', '灌溉', '其他']
-					let arrValue = [manure, medi, irri, job]
-					let option = optionFun(arrName, arrValue)
-					this.myChart02.setOption(option)
-				}
-			})
-		},
-		//溯源信息
-		allJobs() {
-			this.$axios({
-				method: 'POST',
-				url: '/api/api_gateway?method=ascend.ascend_manage.all_ascend',
-				data: this.qs.stringify({ backcode: this.backcode })
-			}).then((res) => {
-				if (res.data.message == '') {
-					let data = res.data.data.data
-					let arr = data.irrigate
-						.concat(data.job)
-						.concat(data.manura)
-						.concat(data.medi)
-						.concat(data.plant)
-					arr.sort((a, b) => {
-						return a.uptime - b.uptime
-					})
-					this.syInfo = arr
-					this.$nextTick(() => {
-						this.swiperInit()
-					})
-				}
-			})
-		},
-		//产量对比
-		getProducts() {
-			this.$axios({
-				method: 'POST',
-				url: '/api/api_gateway?method=ascend.ascend_manage.contrast_land',
-				data: this.qs.stringify({ id: this.baseInfo.id })
-			}).then((res) => {
-				if (res.data.message == '') {
-					let { pick } = res.data.data
-					let xAxis = []
-					let series = []
-					pick.forEach((item) => {
-						xAxis.push(item.land)
-						series.push(item.picktotal)
-					})
-					option01.xAxis[0].data = xAxis
-					option01.series[0].data = series
-					this.myChart01.setOption(option01)
-				}
-			})
-		},
-		//作业次数和溯源信息
-		getBaseInfo() {
-			this.$axios({
-				method: 'POST',
-				url: '/api/api_gateway?method=ascend.ascend_manage.display_land',
-				data: this.qs.stringify({ id: this.baseInfo.id })
-			}).then((res) => {
-				if (res.data.message == '') {
-					let { plant } = res.data.data
-					this.palntList = plant
-					plant[0] && (this.backcode = plant[0].backcode)
-					this.selPlant()
-				}
-			})
-		},
-		getMapTrans() {
-			this.$axios({
-				method: 'POST',
-				url: '/api/api_gateway?method=ascend.ascend_manage.ascend_map',
-				data: this.qs.stringify({ id: this.baseInfo.id })
-			}).then((res) => {
-				if (res.data.message == '') {
-					let { farmname, start_addr, trans_list } = res.data.data
-					this.linesData.saddr.fromCoord = start_addr.split(';')[0].split(',') //基地坐标集合的第一个坐标
-					this.linesData.saddr.name = farmname
-					this.linesData.eaddr = trans_list.map((item) => {
-						item.name = item.province
-						item.value = item.total
-						item.toCoord = item.eaddr.split(',')
-						return item
-					})
-					this.mapChart()
-				}
-			})
-		},
-		chartInit() {
-			this.myChart01 = echarts.init(this.$refs.chart01Ref)
-			this.myChart02 = echarts.init(this.$refs.chart02Ref)
-			window.addEventListener('resize', () => {
-				this.myChart01.resize()
-				this.myChart02.resize()
-			})
-		},
-		swiperInit() {
-			var mySwiper = new Swiper('.swiper-container', {
-				direction: 'vertical',
-				loop: true,
-				speed: 2000,
-				slidesPerView: 4,
-				autoplay: true
-			})
-			this.$refs.swiperRef.onmouseover = function () {
-				mySwiper.stopAutoplay()
-			}
-			this.$refs.swiperRef.onmouseout = function () {
-				mySwiper.startAutoplay()
-			}
-		},
-		mapChart() {
-			this.$axios({
-				method: 'GET',
-				url: `${this.jsonUrl}/static/map/100000.json`
-			}).then((res) => {
-				let geoJson = res.data
-				this.chainMap(geoJson) //显示全国地图
-			})
-		},
-		chainMap(geoJson) {
-			let myChart03 = echarts.init(this.$refs.chart03Ref)
-			window.addEventListener('resize', function () {
-				myChart03.resize()
-			})
-			echarts.registerMap('china', geoJson)
-			myChart03.setOption(
-				{
-					grid: {
-						left: '0',
-						right: '0',
-						top: '0%',
-						bottom: '0%',
-						containLabel: true,
-						show: false
-					},
-					tooltip: {
-						trigger: 'item',
-						borderColor: '#FFFFCC',
-						showDelay: 0,
-						hideDelay: 0,
-						enterable: true,
-						transitionDuration: 0,
-						extraCssText: 'z-index:100',
-						formatter: function (params, ticket, callback) {
-							if (params.seriesType == 'effectScatter') {
-								return (
-									'目的地:' +
-									params.data.name +
-									'<br/>' +
-									'运输量:' +
-									params.data.value[2] +
-									'kg'
-								)
-							} else if (params.seriesType == 'lines') {
-								return (
-									params.data.fromName +
-									'>' +
-									params.data.toName +
-									'<br />' +
-									'运输量:' +
-									params.data.value +
-									'kg'
-								)
-							} else {
-								return params.name
-							}
-						}
-					},
-					legend: {
-						orient: 'vertical',
-						id: 1,
-						y: 'bottom',
-						x: 'right',
-						itemWidth: 16,
-						itemHeight: 20,
-						data: [
-							{
-								name: '在线设备',
-								icon: this.onIcon
-							},
-							{
-								name: '离线设备',
-								icon: this.offIcon
-							}
-						],
-						textStyle: {
-							color: '#fff'
-						}
-					},
-					visualMap: {
-						//图例值控制
-						min: 0,
-						max: 500,
-						calculable: true,
-						show: true,
-						color: ['#f44336', '#fc9700', '#ffde00', '#ffde00', '#00eaff'],
-						textStyle: {
-							color: '#fff'
-						}
-					},
-					geo: {
-						map: 'china', //对应registerMap注册名字
-						label: {
-							show: false,
-							color: '#fff'
-						},
-						roam: true, //是否开启鼠标缩放和平移漫游,设置成 'scale' 或者 'move',设置成 true 为都开启
-						zlevel: 0,
-						zoom: 1, // 当前视角的缩放比例
-						scaleLimit: {
-							min: 0.5,
-							max: 2
-						},
-						layoutCenter: ['50%', '50%'],
-						layoutSize: '100%',
-						itemStyle: {
-							normal: {
-								areaColor: 'rgba(43, 196, 243, 0.42)',
-								borderColor: 'rgba(43, 196, 243, 1)',
-								borderWidth: 1
-							}
-						},
-						emphasis: {
-							//高亮状态下的多边形和标签样式。
-							label: {
-								show: true, //高亮状态下字体是否显示
-								color: '#AAE0FC' //高亮状态下字体颜色
-							},
-							itemStyle: {
-								areaColor: '#2B91B7'
-							}
-						}
-					},
-					series: [
-						{
-							type: 'lines',
-							zlevel: 2,
-							symbolSize: 10,
-							effect: {
-								show: true,
-								period: 6,
-								trailLength: 0,
-								symbol: 'arrow',
-								symbolSize: 5
-							},
-							lineStyle: {
-								normal: {
-									width: 1, //尾迹线条宽度
-									opacity: 1, //尾迹线条透明度
-									curveness: 0.3 //尾迹线条曲直度
-								}
-							},
-							data: this.convertData(this.linesData)
-						},
-						{
-							name: 333,
-							type: 'effectScatter',
-							coordinateSystem: 'geo',
-							zlevel: 2,
-							rippleEffect: {
-								brushType: 'stroke'
-							},
-							label: {
-								normal: {
-									show: true,
-									position: 'right',
-									formatter: '{b}'
-								}
-							},
-							symbolSize: function (val) {
-								return 8
-							},
-							itemStyle: {
-								normal: {
-									show: false,
-									color: '#000'
-								},
-								emphasis: {
-									areaColor: '#2B91B7'
-								}
-							},
-							data: this.linesData.eaddr.map(function (dataItem) {
-								return {
-									name: dataItem.name,
-									value: dataItem.toCoord.concat([dataItem.value])
-								}
-							})
-						},
-						//被攻击点
-						{
-							type: 'scatter',
-							coordinateSystem: 'geo',
-							zlevel: 2,
-							rippleEffect: {
-								//涟漪特效
-								period: 4, //动画时间,值越小速度越快
-								brushType: 'stroke', //波纹绘制方式 stroke, fill
-								scale: 4 //波纹圆环最大限制,值越大波纹越大
-							},
-							label: {
-								normal: {
-									show: true,
-									position: 'right', //显示位置
-									offset: [5, 0], //偏移设置
-									formatter: '{b}',
-									fontSize: 14,
-									textStyle: {
-										color: '#ff0'
-									}
-								},
-								emphasis: {
-									show: true,
-									color: '#f60'
-								}
-							},
-							symbol: 'pin',
-							symbolSize: 50,
-							itemStyle: {
-								color: 'rgb(128, 128, 128)'
-							},
-							data: [
-								{
-									name: this.linesData.saddr.name,
-									value: this.linesData.saddr.fromCoord
-								}
-							]
-						}
-					]
-				},
-				true
-			)
-		},
-		convertData(data) {
-			var res = []
-			let { saddr, eaddr } = data
-			for (var i = 0; i < eaddr.length; i++) {
-				var dataItem = eaddr[i]
-				res.push({
-					fromName: saddr.name,
-					toName: dataItem.name,
-					coords: [saddr.fromCoord, dataItem.toCoord],
-					value: dataItem.value
-				})
-			}
-			return res
-		}
-	}
-}
-</script>
-
-<style lang='less' scoped>
-@font-face {
-	font-family: electronicFont;
-	src: url('/static/font/DS-DIGIT.ttf');
-}
-body {
-	overflow: hidden;
-}
-.wrap {
-	width: 100%;
-	height: 100%;
-	background-repeat: no-repeat;
-	background-size: 100% 100%;
-	background-position: center;
-	overflow: hidden;
-	.header {
-		width: 100vw;
-		height: 12vh;
-		background-size: 100% auto;
-		background-position: center top;
-		background-repeat: no-repeat;
-		position: relative;
-	}
-	.content {
-		position: relative;
-		height: 86vh;
-		.tit {
-			font-size: 0.2rem;
-			font-weight: 700;
-			letter-spacing: 0.05rem;
-			padding-left: 15px;
-			color: #fff;
-			line-height: 4vh;
-			background-repeat: no-repeat;
-			background-size: 100% auto;
-			background-position: left bottom;
-		}
-		> div {
-			position: absolute;
-		}
-		.con {
-			background: #111a53;
-			width: 100%;
-			margin-top: 0.2vh;
-			height: calc(100% - 4.2vh);
-		}
-		.left {
-			width: 23vw;
-			left: 1vw;
-			height: 100%;
-			.lOne {
-				width: 100%;
-				height: 17vh;
-				margin-bottom: 1vh;
-				color: #fff;
-				ul {
-					padding: 2vh;
-				}
-				select {
-					background: transparent;
-					color: #b6dfff;
-					border: none;
-					outline: none;
-					font-size: 0.2rem;
-					font-weight: 800;
-					option {
-						background: #000;
-						border: none;
-						outline: none;
-					}
-				}
-				ul li {
-					background-repeat: no-repeat;
-					background-position: left center;
-					padding-left: 30px;
-					line-height: 3.2vh;
-					font-size: 0.2rem;
-					font-weight: 800;
-					span {
-						color: #b6dfff;
-					}
-				}
-			}
-			.lTwo {
-				width: 100%;
-				height: 17vh;
-				margin-bottom: 1vh;
-				color: #fff;
-				.con {
-					ul {
-						display: flex;
-						justify-content: space-between;
-						li {
-							flex: 1;
-							padding: 0.1rem 0.1rem;
-							text-align: center;
-							& > div {
-								position: relative;
-								background-repeat: no-repeat;
-								height: 10vh;
-								line-height: 10vh;
-								width: 100%;
-								background-size: 100% auto;
-								background-position: center;
-								font-size: 0.2rem;
-								span {
-									font-family: electronicFont;
-									font-size: 0.4rem;
-									font-weight: 800;
-								}
-								img.light {
-									position: absolute;
-									width: 89%;
-									height: auto;
-									left: 50%;
-									top: 50%;
-									animation: rotate 5s linear infinite;
-								}
-								@keyframes rotate {
-									from {
-										transform: translate(-50%, -50%) rotate(0deg);
-									}
-									to {
-										transform: translate(-50%, -50%) rotate(360deg);
-									}
-								}
-							}
-							& > p {
-								font-size: 0.18rem;
-								font-weight: 800;
-								color: #b6dfff;
-							}
-						}
-						.col01 {
-							color: #38abda;
-						}
-						.col02 {
-							color: #f8c81c;
-						}
-						.col03 {
-							color: #24ed5f;
-						}
-						.col04 {
-							color: #d5358d;
-						}
-					}
-				}
-			}
-			.lThree {
-				width: 100%;
-				height: 26vh;
-				margin-bottom: 1vh;
-				color: #fff;
-				.con {
-					padding: 0.2rem;
-					box-sizing: border-box;
-				}
-				.con > div {
-					height: 100%;
-					background-repeat: no-repeat;
-					background-size: 100% auto;
-				}
-			}
-			.lFour {
-				width: 100%;
-				height: 23vh;
-				color: #fff;
-				.chart01 {
-					width: 100%;
-					height: 100%;
-				}
-			}
-		}
-		.center {
-			width: 50vw;
-			left: 25vw;
-			height: 100%;
-			.tit {
-				background-size: 100% auto;
-			}
-			.chart03 {
-				height: calc(100% - 10vh);
-			}
-			.infoBox {
-				position: absolute;
-				bottom: 0;
-				ul {
-					padding: 0 1.5rem;
-					display: flex;
-					color: #2271ce;
-					font-size: 0.2rem;
-					flex-wrap: wrap;
-					justify-content: space-between;
-					li {
-						width: 30%;
-						background-repeat: no-repeat;
-						text-align: center;
-						background-size: 100% auto;
-						line-height: 0.5rem;
-						margin-bottom: 10px;
-					}
-				}
-			}
-		}
-		.right {
-			width: 23vw;
-			right: 1vw;
-			height: 100%;
-			.rOne {
-				height: 36vh;
-				.chart02 {
-					height: calc(100% - 0.3rem);
-				}
-				.selTwo {
-					display: flex;
-				}
-				.selBox {
-					flex: 1;
-					display: inline-block;
-					text-align: right;
-					margin-top: 10px;
-					span {
-						color: #b6dfff;
-						font-size: 0.18rem;
-						font-weight: 800;
-					}
-					.selCode {
-						// appearance: none;
-						// -moz-appearance: none;
-						// -webkit-appearance: none;
-						outline: none;
-						border: 1px solid #46c4f6;
-						color: #fff;
-						padding: 2px 10px;
-						background-color: transparent;
-						width: 75%;
-						line-height: 0.3rem;
-						option {
-							background: #000;
-							border: none;
-							outline: none;
-						}
-					}
-				}
-			}
-			.rTwo {
-				height: 50vh;
-				.con {
-					select {
-						appearance: none;
-						-moz-appearance: none;
-						-webkit-appearance: none;
-						outline: none;
-						border: none;
-						color: #46b8fe;
-						padding: 0 10px;
-						background-color: transparent;
-						width: 20%;
-						line-height: 0.5rem;
-						height: 0.5rem;
-						background-repeat: no-repeat;
-						background-position: right center;
-						option {
-							background: #000;
-							border: none;
-							outline: none;
-						}
-					}
-					.swiper-container {
-						height: 100%;
-						.swiper-slide {
-							padding: 0 0.4rem;
-							color: #b6dfff;
-							display: flex;
-							align-items: center;
-							position: relative;
-							&:before {
-								content: '';
-								position: absolute;
-								width: 1px;
-								top: 0;
-								bottom: 0;
-								left: 0.465rem;
-								z-index: -1;
-								background: #47b8fe;
-							}
-							i {
-								width: 0.13rem;
-								height: 0.13rem;
-								border-radius: 50%;
-							}
-							span {
-								margin-left: 0.2rem;
-								font-size: 0.15rem;
-							}
-							.info {
-								padding: 0 0.5rem;
-								font-size: 0.16rem;
-								line-height: 0.3rem;
-							}
-						}
-					}
-				}
-			}
-		}
-	}
-}
-</style>

+ 0 - 170
src/pages/bigdata/sy/chart.js

@@ -1,170 +0,0 @@
-const option01 = {
-    color: ["#2f89cf"],
-    tooltip: {
-        trigger: "axis",
-        axisPointer: {
-            // 坐标轴指示器,坐标轴触发有效
-            type: "shadow" // 默认为直线,可选为:'line' | 'shadow'
-        }
-    },
-    grid: {
-        left: "10",
-        top: "30",
-        right: "10",
-        bottom: "5",
-        containLabel: true
-    },
-    xAxis: [{
-        type: "category",
-        data: [],
-        axisTick: {
-            alignWithLabel: true
-        },
-        axisLabel: {
-            textStyle: {
-                color: "rgba(255,255,255,.6)",
-                fontSize: "12"
-            }
-        },
-        axisLine: {
-            show: false
-        }
-    }],
-    yAxis: [{
-        type: "value",
-        name: 'kg',
-        nameTextStyle: {
-            color: "rgba(255,255,255,.6)"
-        },
-        axisLabel: {
-            textStyle: {
-                color: "rgba(255,255,255,.6)",
-                fontSize: "12"
-            }
-        },
-        axisLine: {
-            lineStyle: {
-                color: "rgba(255,255,255,.1)"
-                // width: 1,
-                // type: "solid"
-            }
-        },
-        splitLine: {
-            lineStyle: {
-                color: "rgba(255,255,255,.1)"
-            }
-        }
-    }],
-    series: [{
-        name: "产量",
-        type: "bar",
-        barWidth: "12",
-        data: [],
-        itemStyle: {
-            normal: {
-                barBorderRadius: 30,
-                color: {
-                    type: 'linear',
-                    x: 0,
-                    y: 0,
-                    x2: 0,
-                    y2: 1,
-                    colorStops: [{
-                        offset: 0,
-                        color: '#3bedcb' // 0% 处的颜色
-                    }, {
-                        offset: 1,
-                        color: '#086ce6' // 100% 处的颜色
-                    }],
-                    global: false // 缺省为 false
-                },
-            },
-        },
-    }]
-};
-let colors = ['#f21c1c', '#f85d00', '#fd8b0e', '#fcbe2b']
-
-function optionFun(arrName,arrValue) {
-    console.log(arrName)
-    console.log(arrValue)
-    return {
-        yAxis: [{
-            type: 'category',
-            inverse: true,
-            axisLine: {
-                show: false //坐标线
-            },
-            axisTick: {
-                show: false //小横线
-            },
-            axisLabel: {
-                color: '#49b0db',
-                fontSize: 13
-            },
-            data: arrName
-        }, {
-            type: 'category',
-            inverse: true,
-            axisTick: 'none',
-            axisLine: 'none',
-            show: true,
-            axisLabel: {
-                textStyle: {
-                    fontSize: '13'
-                },
-            },
-            data: arrValue.map((value, index) => {
-                return {
-                    value,
-                    textStyle: {
-                        color: colors[index]
-                    }
-                }
-            })
-        }],
-        xAxis: {
-            show: false,
-        },
-        tooltip: {
-            trigger: 'axis',
-            axisPointer: {
-                type: 'none'
-            },
-            formatter: function (params) {
-                return params[0].name + ' : ' + params[0].value
-            }
-        },
-        grid: {
-            top: '40',
-            right: '50',
-            left: '80',
-            bottom: '40' //图表尺寸大小
-        },
-        series: [{
-            type: 'bar',
-            barWidth: '10px',
-            showBackground: true,
-            backgroundStyle: {
-                color: 'rgba(26, 34, 96, 1)',
-                barBorderRadius: [30, 30, 30, 30] //圆角大小
-            },
-            itemStyle: {
-                normal: {
-                    color: (params) => {
-                        return colors[params.dataIndex]
-                    }, //每个数据的颜色
-                    barBorderRadius: [30, 30, 30, 30], //圆角大小
-                    shadowBlur: 10,
-                    shadowColor: 'rgba(0, 103, 255, 0.2)',
-                    shadowOffsetX: -5,
-                    shadowOffsetY: 5,
-                },
-            },
-            data:arrValue
-        }]
-    }
-}
-export {
-    option01,
-    optionFun
-}

+ 0 - 897
src/pages/cure/scd/scd.vue

@@ -1,897 +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">
-						<span
-							:class="['on-stauts', item.device_status == 1 ? 'on' : 'off']"
-						></span>
-						<div
-							class="superOperate"
-							v-show="userType == 1"
-							@click="
-								equipOperation(item.d_id, item.device_id, item.device_name)
-							"
-						>
-							<i class="el-icon-setting"></i>
-						</div>
-						<img src="@/assets/images/cure/scd/scdIconOn.png" />
-						<!-- <p class="equip">设备ID : {{ item.device_id }}</p> -->
-						<p class="item_info listData">设备ID : {{ item.device_id }}</p>
-						<div class="item_info listData">
-							<p>设备名称 : {{ item.device_name }}</p>
-							<p>最新上报时间 : {{ (item.status_time * 1000) | formatTime }}</p>
-							<p>地址 : {{ item.address || '无' }}</p>
-						</div>
-						<div class="btns">
-							<el-button
-								size="mini"
-								type="info"
-								@click="equipStateSet(item.device_id, item.device_status)"
-								>设备状态</el-button
-							>
-							<el-button
-								size="mini"
-								type="warning"
-								@click="
-									EquipControl(item.d_id, item.device_id, item.device_name)
-								"
-								>设备控制</el-button
-							>
-							<el-button size="mini" type="success" @click="simSet(item.d_id)"
-								>SIM卡状态</el-button
-							>
-							<el-button
-								size="mini"
-								type="danger"
-								@click="dataDetails(item.device_id, item.d_id)"
-								>数据详情</el-button
-							>
-						</div>
-					</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 }}</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="
-									equipStateSet(scope.row.device_id, scope.row.device_status)
-								"
-								>设备状态</el-button
-							>
-							<el-button
-								size="mini"
-								type="warning"
-								@click="
-									EquipControl(
-										scope.row.d_id,
-										scope.row.device_id,
-										scope.row.device_name
-									)
-								"
-								>设备控制</el-button
-							>
-							<el-button
-								size="mini"
-								type="success"
-								@click="simSet(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
-			layout="prev, pager, next"
-			:total="totalNum"
-			:current-page="queryInfo.page"
-			@current-change="changePage"
-		></el-pagination>
-		<!-- 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 }}MB</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>
-		<!-- 设备控制对话框 -->
-		<el-dialog
-			title="设备控制"
-			:visible.sync="equipControlDialogVisible"
-			@close="equipControlDialogClosed"
-			width="35%"
-		>
-			<div class="handAddForm">
-				<el-form
-					ref="equipContrlRef"
-					:model="equipContrlForm"
-					label-position="right"
-					label-width="150px"
-				>
-					<el-form-item label="设备编号:">
-						<el-input
-							style="width: 217px"
-							disabled
-							v-model="equipInfo.device_id"
-						></el-input>
-					</el-form-item>
-					<el-form-item label="设备名称:" v-if="equipInfo.device_name">
-						<el-input
-							style="width: 217px"
-							disabled
-							v-model="equipInfo.device_name"
-						></el-input>
-					</el-form-item>
-					<el-form-item label="设备开关:" prop="ds">
-						<el-select v-model="equipContrlForm.ds">
-							<el-option label="开机" :value="1"></el-option>
-							<el-option label="关机" :value="0"></el-option>
-						</el-select>
-					</el-form-item>
-					<el-form-item label="定时模式:" prop="timctrl">
-						<el-select v-model="equipContrlForm.timctrl" placeholder="定时模式">
-							<el-option label="光控" :value="0"></el-option>
-							<el-option label="时控" :value="1"></el-option>
-						</el-select>
-					</el-form-item>
-					<el-form-item
-						v-if="equipContrlForm.timctrl == 1"
-						label="开始结束时间:"
-					>
-						<el-row :gutter="10">
-							<el-col :span="10">
-								<el-time-select
-									placeholder="起始时间"
-									v-model="equipContrlForm.st"
-									default-value="00:00"
-									:picker-options="{
-										start: '00:00',
-										step: '01:00',
-										end: '24:00'
-									}"
-								></el-time-select>
-							</el-col>
-							<el-col class="line" :span="2">-</el-col>
-
-							<el-col :span="10">
-								<el-time-select
-									placeholder="结束时间"
-									v-model="equipContrlForm.et"
-									default-value="00:00"
-									:picker-options="{
-										start: '00:00',
-										step: '01:00',
-										end: '24:00'
-									}"
-								></el-time-select>
-							</el-col>
-						</el-row>
-					</el-form-item>
-					<el-form-item
-						v-if="equipContrlForm.timctrl != 1"
-						label="定时时长(h):"
-						prop="tt"
-					>
-						<el-select v-model="equipContrlForm.tt" placeholder="定时时长">
-							<el-option label="常亮" :value="0"></el-option>
-							<el-option :label="1" :value="1"></el-option>
-							<el-option :label="2" :value="2"></el-option>
-							<el-option :label="3" :value="3"></el-option>
-							<el-option :label="4" :value="4"></el-option>
-							<el-option :label="5" :value="5"></el-option>
-							<el-option :label="6" :value="6"></el-option>
-							<el-option :label="7" :value="7"></el-option>
-						</el-select>
-					</el-form-item>
-					<el-form-item label="上传时间间隔(min):" prop="dattim">
-						<div class="sliderParent">
-							<div class="block">
-								<el-slider
-									:min="10"
-									:step="10"
-									:max="120"
-									v-model="equipContrlForm.dattim"
-									show-input
-								></el-slider>
-							</div>
-						</div>
-					</el-form-item>
-					<el-form-item label="自清虫定时(min):" prop="clt">
-						<div class="sliderParent">
-							<div class="block">
-								<el-slider
-									:min="10"
-									:max="120"
-									v-model="equipContrlForm.clt"
-									show-input
-								></el-slider>
-							</div>
-						</div>
-					</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="equipStateDialogVisible"
-			width="35%"
-		>
-			<el-row :gutter="20">
-				<el-col
-					:xs="24"
-					:sm="24"
-					:md="12"
-					:lg="8"
-					:xl="6"
-					v-for="(item, index) in equipStateList"
-					:key="index"
-				>
-					<div class="real-time">
-						<div class="left">
-							<div class>
-								<img
-									:src="
-										'/static/images/cure/scd/stateIcon/' + (index + 1) + '.png'
-									"
-								/>
-							</div>
-						</div>
-						<div class="right">
-							<p class="num">
-								<strong>{{ item.val }}</strong>
-							</p>
-							<p class="unit">{{ item.title }}</p>
-						</div>
-					</div>
-				</el-col>
-			</el-row>
-		</el-dialog>
-		<!-- 管理员操作对话框 -->
-		<el-dialog
-			title="管理员操作"
-			:visible.sync="operarionDialogVisible"
-			width="260px"
-		>
-			<div class="item">
-				<span>设备编号 : </span><span>{{ equipInfo.device_id }}</span>
-			</div>
-			<div class="item" v-if="equipInfo.device_name">
-				<span>设备名称 : </span><span>{{ equipInfo.device_name }}</span>
-			</div>
-			<div class="adminOperate">
-				<el-button
-					type="primary"
-					size="mini"
-					round
-					@click="equipBtnControl('update')"
-					>升 级</el-button
-				>
-				<el-button
-					type="primary"
-					size="mini"
-					round
-					@click="equipBtnControl('reboot')"
-					>重 启</el-button
-				>
-			</div>
-			<div class="adminOperate"></div>
-		</el-dialog>
-	</div>
-</template>
-<script>
-import SearchBar from '@/components/SearchBar'
-export default {
-	data() {
-		return {
-			//图表和表格切换
-			displayType: '1',
-			//在线状态按钮切换
-			equipStatus: '0',
-			//设备列表
-			equipList: [],
-			equipStateList: [
-				{
-					title: '设备开关',
-					val: ''
-				},
-				{
-					title: '工作状态',
-					val: ''
-				},
-				{
-					title: '定时时长(h)',
-					val: ''
-				},
-				{
-					title: '清虫间隔(min)',
-					val: ''
-				},
-				{
-					title: '灯管状态',
-					val: ''
-				},
-				{
-					title: '在线状态',
-					val: ''
-				},
-				{
-					title: '雨控状态',
-					val: ''
-				}
-			],
-			//参数
-			currImei: '',
-			d_id: '',
-			selectItem: '1', //1设备号,2用户名
-			searchVal: '',
-			// sim卡
-			sim: {
-				iccid: '',
-				account_status: 0, //卡状态 0-7 未知 测试期 沉默期 使用中 停机 停机保号 预销号 销号
-				data_plan: 0, //套餐大小
-				data_usage: 0, //当月用量
-				data_balance: 0, //剩余流量
-				expiry_date: 0 //到期日期
-			},
-			equipInfo: {
-				//设备控制回显
-				device_id: '',
-				device_name: ''
-			},
-			equipContrlForm: {
-				st: '',
-				et: '',
-				ds: '',
-				ts: '',
-				tt: '',
-				dattim: 10,
-				clt: 10,
-				timctrl: ''
-			},
-			//参数
-			queryInfo: {
-				page: 1,
-				is_online: null,
-				dver: '',
-				f_id: '',
-				ename: ''
-			},
-			totalNum: 0,
-			//SIM卡对话框
-			simCodeVisible: false,
-			//设备控制对话框
-			equipControlDialogVisible: false,
-			//编辑阈值信息对话框
-			equipStateDialogVisible: false,
-			//管理员设置
-			operarionDialogVisible: false
-		}
-	},
-	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: 2,
-					page_size: 8,
-					page: this.queryInfo.page,
-					device_status: this.queryInfo.is_online,
-					device_name: this.queryInfo.ename,
-					device_id: this.queryInfo.f_id
-				})
-			}).then((res) => {
-				if (res.data.message == '') {
-					this.equipList = res.data.data.data
-					this.totalNum = res.data.data.counts
-				}
-			})
-		},
-		simSet(d_id) {
-			this.$axios({
-				method: 'POST',
-				url: '/api/api_gateway?method=forecast.send_control.device_sim',
-				data: this.qs.stringify({
-					d_id: d_id,
-					type: 'sim'
-				})
-			}).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
-					})
-				} else {
-					this.$message.error(res.data.message)
-				}
-			})
-		},
-		equipOperation(d_id, device_id, device_name) {
-			this.d_id = d_id
-			this.equipInfo = { device_id, device_name }
-			this.operarionDialogVisible = true
-		},
-		//改变page
-		changePage(val) {
-			this.queryInfo.page = val
-			this.getEquipList()
-		},
-		// 数据详情
-		dataDetails(e_id, d_id) {
-			this.currImei = e_id
-			this.$router.push(`/index/scdDetail/${e_id}/${d_id}`)
-		},
-		//sim卡状态
-		handleClick(tab, event) {
-			console.log(tab, event)
-		},
-		// 设备状态弹框
-		equipStateSet(id, device_status) {
-			this.currImei = id
-			this.$axios({
-				method: 'POST',
-				url: '/api/api_gateway?method=forecast.worm_lamp.device_history_data',
-				data: this.qs.stringify({
-					device_type_id: 2,
-					page_size: 1,
-					device_id: id,
-					page: 1
-				})
-			}).then((res) => {
-				if (res.data.message == '') {
-					let data = res.data.data.data[0].d_h_t
-					this.equipStateList[5].val = device_status == 0 ? '离线' : '在线'
-					for (let item in data) {
-						if (item == 'ds') {
-							this.equipStateList[0].val = data[item] == 0 ? '关机' : '开机'
-						} else if (item == 'ws') {
-							switch (data[item]) {
-								case 0:
-									this.equipStateList[1].val = '待机'
-									break
-								case 1:
-									this.equipStateList[1].val = '工作'
-									break
-								case 2:
-									this.equipStateList[1].val = '充电'
-									break
-							}
-						} else if (item == 'tt') {
-							this.equipStateList[2].val = data[item] == 0 ? '常亮' : data[item]
-						} else if (item == 'clt') {
-							this.equipStateList[3].val = data[item] / 60
-						} else if (item == 'tbs') {
-							this.equipStateList[4].val = data[item] == 0 ? '正常' : '保护'
-						} else if (item == 'rps') {
-							this.equipStateList[6].val = data[item] == 0 ? '正常' : '保护'
-						}
-					}
-				}
-			})
-			this.equipStateDialogVisible = true
-		},
-		//设备控制
-		EquipControl(d_id, device_id, device_name) {
-			this.d_id = d_id
-			this.equipInfo = { device_id, device_name }
-			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) => {
-				if (Object.keys(res.data.data).length > 0) {
-					let data = res.data.data
-					data.st =
-						data.st && data.st < 10 ? '0' + data.st + ':00' : data.st + ':00'
-					data.et =
-						data.et && data.et < 10 ? '0' + data.et + ':00' : data.et + ':00'
-					this.equipContrlForm = data
-				}
-				this.equipControlDialogVisible = true
-			})
-		},
-		equipControlSubm() {
-			let obj = this.equipContrlForm
-			obj.st =
-				obj.st && obj.st.slice(0, 2).charAt(0) != '0'
-					? obj.st.slice(0, 2)
-					: obj.st.slice(1, 2)
-			obj.et =
-				obj.et && obj.et.slice(0, 2).charAt(0) != '0'
-					? obj.et.slice(0, 2)
-					: obj.et.slice(1, 2)
-			this.$axios({
-				method: 'POST',
-				url: '/api/api_gateway?method=forecast.send_control.device_control',
-				data: this.qs.stringify({
-					device_type_id: 2,
-					d_id: this.d_id,
-					config: JSON.stringify(obj)
-				})
-			}).then((res) => {
-				if (res.data.message=='') {
-					this.$message.success('设备控制修改成功')
-				} else {
-					his.$message.error('设备控制修改失败')
-				}
-				this.equipControlDialogVisible = false
-			})
-		},
-		equipControlDialogClosed() {
-			this.$refs.equipContrlRef.resetFields()
-			this.equipContrlForm = {}
-		},
-		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: 2,
-					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
-	}
-}
-</script>
-<style lang="less" scoped>
-.el-card {
-	position: relative;
-	text-align: center;
-	color: #555;
-	font-size: 13px;
-	.superOperate {
-		position: absolute;
-		right: 10px;
-		top: 10px;
-		cursor: pointer;
-		i {
-			font-size: 18px;
-			color: #35a478;
-		}
-	}
-	.on-stauts {
-		position: absolute;
-		width: 10px;
-		height: 10px;
-		border-radius: 50%;
-		left: 15px;
-		top: 15px;
-	}
-	.on-stauts.on {
-		background: linear-gradient(#3fd79a, #9add4f);
-		box-shadow: 0 0 5px 3px rgba(106, 255, 44, 0.6);
-	}
-	.on-stauts.off {
-		background: linear-gradient(#fe2b62, #f67c49);
-		box-shadow: 0 0 5px 3px rgba(255, 44, 44, 0.6);
-	}
-	.item_info {
-		font-size: 14px;
-		line-height: 32px;
-		color: #888;
-	}
-	.equip {
-		font-weight: bolder;
-		color: #333;
-		font-size: 16px;
-		line-height: 30px;
-		margin-bottom: 10px;
-	}
-	.btns {
-		display: flex;
-		justify-content: space-between;
-		flex-wrap: nowrap;
-		padding-top: 10px;
-	}
-}
-.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;
-	}
-}
-.handAddForm {
-	width: 85%;
-	/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;
-	}
-}
-.adminOperate {
-	text-align: center;
-	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;
-}
-/deep/.el-date-editor--time-select {
-	width: 100% !important;
-}
-/deep/.line {
-	text-align: center;
-}
-.item {
-	margin-bottom: 10px;
-}
-
-.listData {
-	text-align: left;
-}
-</style>

+ 0 - 509
src/pages/cure/scd/scdDetail.vue

@@ -1,509 +0,0 @@
-<template>
-	<div>
-		<el-breadcrumb separator-class="el-icon-arrow-right">
-			<el-breadcrumb-item>防治系统</el-breadcrumb-item>
-			<el-breadcrumb-item :to="{ path: '/index/scd' }"
-				>杀虫灯</el-breadcrumb-item
-			>
-			<el-breadcrumb-item>害虫统计</el-breadcrumb-item>
-		</el-breadcrumb>
-		<el-button type="success" size="small" @click="goBackPage()"
-			><i class="el-icon--left el-icon-d-arrow-left"></i>返回</el-button
-		>
-		<div class="equipInfo">
-			<div class="equipMsg">
-				<span>设备ID:{{ id }}</span>
-				<span>设备名称:{{ equipStatus.equip_name || '无' }}</span>
-				<span>位置:{{ equipStatus.lng }}</span>
-			</div>
-			<DateSearch @dateChange="dateChange"></DateSearch>
-		</div>
-		<div class="ctrl-check">
-			<el-button type="primary" size="mini" @click="refresh">刷新</el-button>
-		</div>
-		<!-- 统计图 -->
-		<div v-if="viewSwitch">
-			<div>
-				<el-row :gutter="10">
-					<el-col :md="24" :lg="14">
-						<el-card class="box-card">
-							<div class="charts">
-								<highcharts :options="options"></highcharts>
-							</div>
-						</el-card>
-					</el-col>
-					<el-col :md="24" :lg="10">
-						<el-card class="box-card">
-							<div class="pie">
-								<highcharts :options="options2"></highcharts>
-							</div>
-						</el-card>
-					</el-col>
-				</el-row>
-				<div class="dataTableSearch">
-					<div>
-						<el-button type="primary" size="mini">导出</el-button>
-					</div>
-				</div>
-			</div>
-			<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]"
-						:width="setWidth(item)"
-					>
-						<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>
-	</div>
-</template>
-
-<script>
-import DateSearch from '@/components/DateSearch'
-export default {
-	data() {
-		return {
-			id: this.$route.params.e_id,
-			lineTime: '',
-			dataTime: '',
-			options: {},
-			worms: [
-				{
-					value: 1,
-					label: '蛾子'
-				},
-				{
-					value: 2,
-					label: '蚊子'
-				}
-			],
-			options2: {},
-			// 状态信息
-			equipStatus: {},
-			// 统计图表信息
-			equipChartData: [],
-			//总数据条数
-			total: 0,
-			// 动态表头
-			tableHeadTxt: [
-				['设备开关', 'ds'],
-				['工作状态', 'ws'],
-				['灯管状态', 'tbs'],
-				['雨控状态', 'rps'],
-				['温控状态', 'tps'],
-				['倾倒状态', 'dps'],
-				['定时(h)', 'tt'],
-				['电击次数', 'ct'],
-				['温度(°C)', 'at'],
-				['湿度(%)', 'ah'],
-				['充电电压(v)', 'cv'],
-				['电池电压(v)', 'bv'],
-				['上报时间', 'addtime']
-			],
-			// 表格数据
-			tableData: [],
-			timeRange: '',
-			queryInfo: {
-				begin: '',
-				end: '',
-				e_id: this.$route.params.e_id,
-				d_id: this.$route.params.d_id,
-				page: 1
-			},
-			viewSwitch: 1,
-			viewSwitch2: 1,
-			//图表实时否有数据
-			isEchartData: true,
-			//表格和图表按钮样式切换参数
-			display: '0', //0代表表格、1代表图表
-			displayView: true,
-			// 表格和图表显示切换控制
-			showControl: true,
-			//echarts图表参数
-			echartOptions: [],
-			// 动态表头
-			tableHead: [],
-			// 表格数据
-			hisData: []
-		}
-	},
-	methods: {
-		//获取折线数据
-		getChartDataList() {
-			this.$axios({
-				method: 'POST',
-				url: '/api/api_gateway?method=forecast.worm_lamp.device_polyline_data',
-				data: this.qs.stringify({
-					device_type_id: 2,
-					d_id: this.queryInfo.d_id,
-					start_time: this.queryInfo.begin,
-					end_time: this.queryInfo.end
-				})
-			}).then((res) => {
-				if (res.data.message == '') {
-					var ChartData = [
-						{
-							name: '温度(°C)',
-							dat: []
-						},
-						{
-							name: '湿度(%)',
-							dat: []
-						},
-						{
-							name: '击虫次数',
-							dat: []
-						}
-					]
-					var data = res.data.data
-					this.options = {}
-					this.options2 = {}
-					if (data.length > 0) {
-						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.options = {
-							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
-								}
-							],
-							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'
-											}
-										}
-									}
-								]
-							}
-						}
-						this.options2 = {
-							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[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: 2,
-					device_id: this.queryInfo.e_id,
-					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
-					this.tableData = []
-					if (data.length > 0) {
-						for (var i = 0; i < data.length; i++) {
-							var dht = data[i].d_h_t
-							dht.addtime = this.formatTime(dht.addtime * 1000)
-							dht.ds = dht.ds == 0 ? '关' : '开'
-							dht.rps = dht.rps == 0 ? '正常' : '雨控'
-							dht.tps = dht.tps == 0 ? '正常' : '保护'
-							dht.tbs = dht.tbs == 0 ? '正常' : '保护'
-							dht.dps = dht.dps == 0 ? '正常' : '保护'
-							dht.cv=dht.cv/1000
-							dht.bv=dht.bv/1000
-							switch (dht.ws) {
-								case 0:
-									dht.ws = '待机'
-									break
-								case 1:
-									dht.ws = '工作'
-									break
-								case 2:
-									dht.ws = '充电'
-									break
-							}
-							this.tableData.push(dht)
-						}
-					}
-				}
-			})
-		},
-		dateChange(data) {
-			this.queryInfo.page = 1
-			this.queryInfo.begin = data.begin
-			this.queryInfo.end = data.end
-			this.getHisDataList()
-			this.getChartDataList()
-		},
-		//改变page
-		changePage(val) {
-			this.queryInfo.page = val
-			this.getHisDataList()
-		},
-		setWidth(item) {
-			if (item[1] == 'addtime') {
-				return 180 + 'px'
-			}
-		},
-		refresh() {
-			this.$axios({
-				method: 'POST',
-				url: '/api/api_gateway?method=forecast.send_control.get_device_config',
-				data: this.qs.stringify({
-					device_type_id: 2,
-					d_id: this.queryInfo.d_id,
-					control_type: 'data'
-				})
-			}).then((res) => {
-				if (res.data.message==''){
-					this.$message.success('刷新成功')
-				} else {
-					this.$message.err('刷新失败')
-				}
-			})
-		},
-		//返回上一页
-		goBackPage() {
-			this.$router.go(-1)
-		}
-	},
-	components: {
-		DateSearch
-	}
-}
-</script>
-
-<style lang='less' scoped>
-.box-card {
-	position: relative;
-}
-.equipInfo {
-	.equipMsg {
-		font-size: 14px;
-		color: #3d3d3d;
-		span {
-			margin-left: 5px;
-		}
-	}
-	display: flex;
-	justify-content: space-between;
-	margin-top:10px;
-	margin-bottom: 8px;
-}
-
-.time-check {
-	display: flex;
-	justify-content: space-between;
-	.el-input__inner {
-		margin-left: 10px;
-		width: 222px;
-	}
-	.viewSwitch {
-		margin-left: 10px;
-	}
-}
-
-.chartsSelect {
-	text-align: right;
-	position: absolute;
-	z-index: 999;
-	left: 0;
-	right: 21px;
-}
-.charts,
-.pie {
-	height: 423px;
-}
-.equipStatus {
-	display: flex;
-	justify-content: center;
-	margin: 10px 0;
-	.equipIcon {
-		margin-right: 14%;
-	}
-	.equipParams {
-		min-width: 80px;
-		line-height: 27px;
-		p {
-			color: #a6a6a6;
-		}
-	}
-}
-
-.dataTableSearch {
-	display: flex;
-	justify-content: space-between;
-	margin: 20px 0;
-	.el-input__inner {
-		width: 222px;
-	}
-}
-
-.echarts {
-	width: 100%;
-	height: 300px;
-}
-.ctrl-check {
-	margin-bottom: 20px;
-}
-</style>

+ 0 - 268
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 - 458
src/pages/equipmanger/EquipList.vue

@@ -1,458 +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, item.device_name)">
-							<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 clearable v-model="locationForm.lng"></el-input>
-				</el-form-item>
-				<el-form-item label="维度">
-					<el-input clearable 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-item label="">
-					<el-input
-						placeholder="请输入地区检索"
-						v-model="addr"
-						clearable
-						@change="addrChange()"
-					></el-input>
-				</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,
-			addr: '',
-			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))
-		},
-		addrChange() {
-			let local = new this.BMap.LocalSearch(this.map, {
-				renderOptions: { map: this.map, panel: 'r-result' }
-			})
-			local.search(this.addr)
-		},
-		// 修改设备名称
-		modifyName(id, device_name) {
-			let value = device_name
-			this.$prompt('', '修改名字', {
-				confirmButtonText: '确定',
-				cancelButtonText: '取消',
-				inputPlaceholder: device_name
-			})
-				.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
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 - 502
src/pages/expertDiagnosis/expertAnswers/ExpertAnswers.vue

@@ -1,502 +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 style="display: flex; justify-content: space-between;">
-			<!-- 专家解答 -->
-			<!-- <div class="expertDiagnosis_answer_main" :style="'height:' + fullHeight + 'px'"> -->
-			<div class="expertDiagnosis_answer_main">
-				<!-- 标题 -->
-				<div class="expertDiagnosis_answer_main_tlt">专家解答</div>
-
-				<!-- 专家解答 -->
-				<ul class="expertDiagnosis_answer_main_ul" v-if="answerShow">
-					<li
-						class="expertDiagnosis_answer_main_li"
-						v-for="(item, index) in this.redataList"
-						:key="index"
-					>
-						<!-- 图片 -->
-						<div class="expertDiagnosis_answer_main_li_imgBox" id="viewerDom" v-viewer>
-							<!-- <img
-								src="@/assets/images/expertDiagnosis/expertAudit/1.jpg"
-								alt
-								class="expertDiagnosis_answer_main_li_imgBox_image"
-							/>-->
-							<img
-								:src="'api/' + item.img_urls"
-								alt
-								@error="errImg"
-								class="expertDiagnosis_answer_main_li_imgBox_image"
-							/>
-						</div>
-
-						<!-- 详细内容 -->
-						<div class="expertDiagnosis_answer_main_li_details">
-							<!-- 问题 -->
-							<div class="expertDiagnosis_answer_main_li_detailsBox">
-								<div class="expertDiagnosis_answer_main_li_detailsBox_issueBox">
-									Q:
-									<span class="expertDiagnosis_answer_main_li_detailsBox_issueBox_tlt">{{item.content}}</span>
-								</div>
-								<div class="expertDiagnosis_answer_main_li_detailsBox_issueBox_time">{{item.adtime}}</div>
-							</div>
-
-							<!-- 回答 -->
-							<div class="expertDiagnosis_answer_main_li_detailsBox_revertBox">
-								A:
-								<span
-									class="expertDiagnosis_answer_main_li_detailsBox_issueBox_tlt"
-								>{{item.idea == null ? '暂无回复' : item.idea}}</span>
-							</div>
-						</div>
-					</li>
-				</ul>
-
-				<!-- 暂无数据 -->
-				<div class="expertDiagnosis_referral_units_not" v-else>
-					<img
-						src="@/assets/images/expertDiagnosis/zanwu.png"
-						alt
-						class="expertDiagnosis_referral_units_notImg"
-					/>
-				</div>
-
-				<!-- 分页 -->
-				<el-pagination
-					v-if="answerShow"
-					background
-					@current-change="pageData($event)"
-					layout="prev, pager, next"
-					:total="this.nums"
-					:page-size="5"
-					:current-page.sync="page"
-				></el-pagination>
-			</div>
-
-			<!-- 我要提问 -->
-			<el-form ref="form" :model="form" style="width: 610px">
-				<div class="expertDiagnosis_question_main">
-					<!-- 标题 -->
-					<div class="expertDiagnosis_question_main_tlt">我要提问</div>
-
-					<!-- 问题描述 -->
-					<el-form-item label="问题描述:">
-						<div class="expertDiagnosis_question_main_description">
-							<el-input
-								type="textarea"
-								placeholder
-								v-model="form.textarea"
-								maxlength="299"
-								show-word-limit
-								:autosize="{ minRows: 10, maxRows: 20}"
-								style="width: 410px"
-							></el-input>
-						</div>
-					</el-form-item>
-
-					<!-- 上传图片 -->
-					<el-form-item label="上传图片:">
-						<div class="expertDiagnosis_question_main_upImage">
-							<el-upload
-								class="upload-demo"
-								ref="upload"
-								:http-request="ImgUploadSectionFile"
-								:with-credentials="true"
-								:auto-upload="false"
-								accept=".png, .jpg, .gif, .svg"
-								action
-								:on-change="handleChange"
-								list-type="list"
-								:file-list="fileList"
-								multiple
-							>
-								<img v-if="imageUrl" :src="imageUrl" class="avatar" />
-								<i v-else class="el-icon-plus avatar-uploader-icon"></i>
-							</el-upload>
-						</div>
-					</el-form-item>
-
-					<!-- 提交 -->
-					<el-form-item class="expertDiagnosis_question_main_btnBox">
-						<el-button type="primary" @click="onSubmit">提交</el-button>
-						<el-button>取消</el-button>
-					</el-form-item>
-				</div>
-			</el-form>
-		</div>
-	</div>
-</template>
-
-<script>
-//自适应
-import '@/plugin/flexible.js'
-export default {
-	data() {
-		return {
-			fullHeight: document.documentElement.clientHeight,
-			imageUrl: '',
-			form: {
-				textarea: '' //问题描述
-			},
-			//表单验证
-			rules: {
-				// 表单验证
-				file: [{ required: true, message: '请上传图片' }]
-			},
-			formData: new FormData(),
-			fileList: [],
-			redataList: [], //专家解答列表数据
-			nums: 0, //总条数
-			imgUrl: '', //上传返回的图片路径
-			answerShow: true, //专家解答展示
-			page: 1
-		}
-	},
-	watch: {
-		fullHeight(val) {
-			//监控浏览器高度变化
-			if (!this.timer) {
-				this.fullHeight = val
-				this.timer = true
-				let that = this
-				setTimeout(function () {
-					//防止过度调用监测事件,导致卡顿
-					that.timer = false
-				}, 400)
-			}
-		},
-	},
-	mounted() {
-		this.get_boderHeight() //自适应
-		this.axiosList() //专家解答列表数据请求
-	},
-	methods: {
-		// 列表图片加载失败
-		errImg(e) {
-			e.target.src = require('@/assets/images/expertDiagnosis/ku/noData.jpg')
-		},
-
-		//分页点击
-		pageData(e) {
-			let that = this
-			let postData = that.qs.stringify({
-				page: e
-			})
-			that
-				.$axios({
-					method: 'post',
-					url:
-						'api/api_gateway?method=pest.pests.pests_answers_list',
-					data: postData
-				})
-				.then((res) => {
-					this.redataList = []
-					var data = res.data.data.data
-					var num = parseInt(res.data.data.nums)
-					this.nums = num
-					var redataList = this.redataList
-					for (let i = 0; i < data.length; i++) {
-						var time = data[i].adtime
-						var date = new Date(parseInt(time) * 1000)
-							.toLocaleString()
-							.replace(/:\d{1,2}$/, ' ')
-						var dataA = data[i]
-						dataA['adtime'] = date
-						redataList.push(dataA)
-					}
-				})
-				.catch((err) => {
-					console.log(err)
-				})
-		},
-		//动态获取浏览器高度
-		get_boderHeight() {
-			const that = this
-			window.onresize = () => {
-				return (() => {
-					window.fullHeight = document.documentElement.clientHeight
-					that.fullHeight = window.fullHeight - 128
-					// console.log(that.fullHeight)
-				})()
-			}
-		},
-
-		//图片上传
-		ImgUploadSectionFile(param) {
-			this.formData.append('img_file', param.file)
-			this.$axios({
-				method: 'post',
-				url: 'api/api_gateway?method=pest.pests.pests_img',
-				data: this.formData
-			})
-				.then((res) => {
-					console.log(res.data.data.src)
-					this.imgUrl = res.data.data.src
-					let postData = this.qs.stringify({
-						img_urls: this.imgUrl,
-						content: this.form.textarea
-					})
-					this.$axios({
-						method: 'post',
-						url:
-							'api/api_gateway?method=pest.pests.pests_answers',
-						data: postData
-					})
-						.then((res) => {
-							if (res.data.data.code == 200) {
-								this.$message({
-									message: '发布成功',
-									type: 'success',
-									duration: 1500
-								})
-							} else if (res.data.data.code == 400) {
-								this.$message({
-									message: '发布失败',
-									type: 'success',
-									duration: 1500
-								})
-							}
-							this.imageUrl = false
-							this.$refs.upload.clearFiles() //清空
-							this.redataList = []
-							this.page = 1
-							this.axiosList()
-							this.form.textarea = ''
-						})
-						.catch((err) => {
-							console.log(err)
-						})
-				})
-				.catch((err) => {
-					console.log(err)
-				})
-		},
-		handleChange(file, fileList) {
-			var arr = []
-			var list
-			for (var i = 0; i < fileList.length; i++) {
-				list = fileList[i]
-			}
-			this.imageUrl = URL.createObjectURL(list.raw)
-			arr.push(list)
-			this.fileList = arr
-		},
-
-		//提交
-		onSubmit() {
-			let that = this
-			if (that.form.textarea == '') {
-				this.$message({
-					message: '问题描述不能为空!',
-					type: 'warning',
-					duration: 1500
-				})
-			} else if (that.form.textarea !== '') {
-				that.$refs.upload.submit()
-			}
-		},
-
-		//专家解答列表数据请求
-		axiosList() {
-			let that = this
-			let postData = that.qs.stringify({
-				page: that.page
-			})
-			that
-				.$axios({
-					method: 'post',
-					url:
-						'api/api_gateway?method=pest.pests.pests_answers_list',
-					data: postData
-				})
-				.then((res) => {
-					var nums = res.data.data.nums
-					if (nums !== 0) {
-						var data = res.data.data.data
-						var num = parseInt(res.data.data.nums)
-						this.nums = num
-						var redataList = this.redataList
-						for (let i = 0; i < data.length; i++) {
-							var time = data[i].adtime
-							var date = new Date(parseInt(time) * 1000)
-								.toLocaleString()
-								.replace(/:\d{1,2}$/, ' ')
-							var dataA = data[i]
-							dataA['adtime'] = date
-							redataList.push(dataA)
-						}
-						console.log(redataList)
-					} else if (nums == 0) {
-						that.answerShow = false
-					}
-				})
-				.catch((err) => {
-					console.log(err)
-				})
-		},
-
-		// 图片放大
-		magnifyPhoto() {
-			//具体需要哪些配置可参照下表
-			const ViewerDom = document.querySelector('#viewerDom')
-			this.viewer = new Viewer(ViewerDom, {
-				initialViewIndex: 0,
-				button: true, //右上角关闭按钮
-				navbar: 2,
-				title: 0,
-				toolbar: 0,
-				keyboard: false,
-				ready: function (e) {
-					console.log(e.type)
-				},
-				show: function (e) {
-					console.log(e.type)
-				},
-				shown: function (e) {
-					console.log(e.type)
-				},
-				hide: function (e) {
-					console.log(e.type)
-				},
-				hidden: function (e) {
-					console.log(e.type)
-				},
-				view: function (e) {
-					console.log(e.type)
-				},
-				viewed: function (e) {
-					console.log(e.type)
-				},
-				zoom: function (e) {
-					console.log(e.type)
-				},
-				zoomed: function (e) {
-					console.log(e.type)
-				}
-			})
-		}
-	}
-}
-</script>
-
-<style lang='less' scoped>
-// 专家解答
-.expertDiagnosis_answer_main {
-	border-radius: 15px;
-	background: #fff;
-	width: 60%;
-	height: 100%;
-	.expertDiagnosis_answer_main_tlt {
-		border-left: 6px solid #17bb88;
-		padding: 0 0 0 20px;
-		font-size: 18px;
-		font-weight: 550;
-		margin: 15px 0 0 0;
-	}
-	//列表数据
-	.expertDiagnosis_answer_main_ul {
-		.expertDiagnosis_answer_main_li {
-			width: 95%;
-			margin: 25px auto;
-			display: flex;
-			// 图片
-			.expertDiagnosis_answer_main_li_imgBox {
-				width: 100px;
-				.expertDiagnosis_answer_main_li_imgBox_image {
-					width: 100px;
-					height: 100px;
-				}
-			}
-			// 详细内容
-			.expertDiagnosis_answer_main_li_details {
-				width: 85%;
-				margin: 0 auto;
-				.expertDiagnosis_answer_main_li_detailsBox {
-					display: flex;
-					justify-content: space-between;
-					margin: 25px 0 0 0;
-
-					.expertDiagnosis_answer_main_li_detailsBox_issueBox {
-						color: #000;
-						font-size: 15px;
-						font-weight: 550;
-						width: 670px;
-					}
-				}
-
-				.expertDiagnosis_answer_main_li_detailsBox_revertBox {
-					color: #808080;
-					font-size: 14px;
-					font-weight: 550;
-					margin: 10px 0 0 0;
-					.expertDiagnosis_answer_main_li_detailsBox_issueBox_tlt {
-					}
-					.expertDiagnosis_answer_main_li_detailsBox_issueBox_time {
-						color: #b1b1b1;
-					}
-				}
-			}
-		}
-	}
-}
-
-// 我要提问
-.expertDiagnosis_question_main {
-	border-radius: 15px;
-	background: #fff;
-	border: 1px solid #fff;
-	.expertDiagnosis_question_main_tlt {
-		border-left: 6px solid #17bb88;
-		padding: 0 0 0 20px;
-		font-size: 18px;
-		font-weight: 550;
-		margin: 15px 0 0 0;
-	}
-
-	// 问题描述
-	.expertDiagnosis_question_main_description {
-		width: 90%;
-		margin: 15px auto;
-		display: flex;
-		.expertDiagnosis_question_main_description_tlt {
-			width: 19%;
-			font-size: 14px;
-		}
-	}
-
-	// 上传图片
-	.expertDiagnosis_question_main_upImage {
-		width: 90%;
-		margin: 15px auto;
-		display: flex;
-		.expertDiagnosis_question_main_upImage_tlt {
-			width: 19%;
-			font-size: 14px;
-		}
-	}
-}
-// 修改elementui样式
-.custom-ffffff .el-form-item {
-	margin: 0 auto;
-	width: 90%;
-}
-.custom-ffffff .el-form-item {
-	display: flex;
-}
-.expertDiagnosis_question_main_btnBox {
-	width: 183px !important;
-	// margin: 300px 0 155px 410px !important;
-	margin: 140px 0 155px 410px !important;
-}
-
-// 暂无数据
-.expertDiagnosis_referral_units_not {
-	width: 272px;
-	margin: 0 auto;
-	.expertDiagnosis_referral_units_notImg {
-	}
-}
-</style>

+ 0 - 702
src/pages/expertDiagnosis/expertAudit/expertAudit.vue

@@ -1,702 +0,0 @@
-<!--  -->
-<template>
-	<div class>
-		<el-breadcrumb separator-class="el-icon-arrow-right">
-			<el-breadcrumb-item>专家诊断</el-breadcrumb-item>
-			<el-breadcrumb-item>用户补充审核</el-breadcrumb-item>
-		</el-breadcrumb>
-		<!-- 补充审核 -->
-		<div>
-			<!-- <div class="expertDiagnosis_referral_mainBtn_Box" :style="'height:' + fullHeight + 'px'"> -->
-			<div class="expertDiagnosis_referral_mainBtn_Box">
-				<!-- 标题 -->
-				<div class="expertDiagnosis_recognition_main_tlt">
-					<div style="line-height: 36px">用户补充审核</div>
-
-					<div style="display: flex; margin: 0 55px 0 0">
-						<!-- 审核筛选 -->
-						<el-dropdown trigger="click" @command="handleCommand">
-							<span class="el-dropdown-link">
-								{{this.dropdownData}}
-								<i class="el-icon-arrow-down el-icon--right"></i>
-							</span>
-							<el-dropdown-menu slot="dropdown">
-								<el-dropdown-item command="未审核">未审核</el-dropdown-item>
-								<el-dropdown-item command="审核通过">审核通过</el-dropdown-item>
-							</el-dropdown-menu>
-						</el-dropdown>
-
-						<!-- 搜索 -->
-						<div class="expertDiagnosis_library_units_search">
-							<el-input placeholder="输入需要搜索的用户名" v-model="input1" class="input-with-select">
-								<el-button slot="append" icon="el-icon-search" @click="searchData()"></el-button>
-							</el-input>
-						</div>
-					</div>
-				</div>
-
-				<!-- 内容 -->
-				<ul class="expertDiagnosis_recognition_main_ul" v-if="this.supplementArr.length">
-					<li
-						class="expertDiagnosis_recognition_main_li"
-						v-for="(item, index) in this.supplementArr"
-						:key="index"
-					>
-						<!-- 头像以及详情描述 -->
-						<div class="expertDiagnosis_recognition_mainLi_box">
-							<div class>
-								<img
-									:src="$host+item.user_img"
-									alt
-									@error="errImg"
-									class="expertDiagnosis_recognition_mainLi_box_img"
-								/>
-							</div>
-
-							<div class="expertDiagnosis_recognition_mainLi_box1">
-								<div class="expertDiagnosis_recognition_mainLi_box1_name">
-									{{item.user}}
-									<span class="expertDiagnosis_recognition_mainLi_box_time">{{item.upltime}}</span>
-								</div>
-
-								<div class="expertDiagnosis_recognition_mainLi_box_details">
-									<span class="expertDiagnosis_recognition_mainLi_box_detailsTxt">补充内容:</span>
-									{{item.content}}
-								</div>
-							</div>
-						</div>
-
-						<!-- 操作按钮 -->
-						<div class="expertDiagnosis_recognition_mainLi_btn">
-							<el-button
-								size="mini"
-								style="background: #17bb88;color: #fff"
-								@click="examine(item.pestbank_id)"
-							>查看原文</el-button>
-							<el-button
-								v-if="item.review==0"
-								size="mini"
-								style="background: #ef7752;color: #fff; padding-right: 20px; padding-left: 20px"
-								@click="reject(item.id)"
-							>驳回</el-button>
-							<el-button
-								v-if="item.review==0"
-								size="mini"
-								style="background: #07a6ea;color: #fff; padding-right: 20px; padding-left: 20px"
-								@click="pass(item.id)"
-							>通过</el-button>
-						</div>
-					</li>
-				</ul>
-
-				<!-- 暂无数据 -->
-				<div class="expertDiagnosis_referral_units_not" v-else>
-					<img
-						src="@/assets/images/expertDiagnosis/zanwu.png"
-						alt
-						class="expertDiagnosis_referral_units_notImg"
-					/>
-				</div>
-
-				<!-- 分页 -->
-				<el-pagination
-					background
-					@current-change="pageData($event)"
-					layout="prev, pager, next"
-					:total="this.nums"
-					:page-size="5"
-					:current-page="page"
-					v-if="this.supplementArr.length>0"
-				></el-pagination>
-
-				<!-- 弹框 -->
-				<el-dialog title="病虫害档案" :visible.sync="dialogFormVisible">
-					<ul class="expertDiagnosis_recognition_main_popUp">
-						<li class="expertDiagnosis_recognition_main_popUp_li">
-							<div class="expertDiagnosis_recognition_main_popUp_li_name">害虫名称:</div>
-							<div class="expertDiagnosis_recognition_main_popUp_li_nameVal">{{this.upPopData.name}}</div>
-						</li>
-
-						<li class="expertDiagnosis_recognition_main_popUp_li">
-							<div class="expertDiagnosis_recognition_main_popUp_li_img">害虫图片:</div>
-							<div class id="viewerDom" v-viewer>
-								<img
-									:src="this.upPopData.img_urls"
-									alt
-									@error="errImg"
-									class="expertDiagnosis_recognition_main_popUp_li_imgVal"
-								/>
-							</div>
-						</li>
-
-						<li class="expertDiagnosis_recognition_main_popUp_li">
-							<div class="expertDiagnosis_recognition_main_popUp_li_details">详细信息:</div>
-							<div
-								class="expertDiagnosis_recognition_main_popUp_li_detailsVal"
-							>{{this.upPopData.prevention}}</div>
-						</li>
-					</ul>
-				</el-dialog>
-
-				<!-- 审核时的弹框 -->
-				<el-dialog title="提示" :visible.sync="dialogVisible" width="30%">
-					<span>{{this.txtVal}}</span>
-					<span slot="footer" class="dialog-footer">
-						<el-button @click="dialogVisible = false">取 消</el-button>
-						<el-button type="primary" @click="dialogVisible = false, addr()">确 定</el-button>
-					</span>
-				</el-dialog>
-			</div>
-		</div>
-	</div>
-</template>
-
-<script>
-import '@/plugin/flexible.js'
-export default {
-	components: {},
-	data() {
-		//这里存放数据
-		return {
-			fullHeight: document.documentElement.clientHeight, //自适应高度
-			dialogFormVisible: false, //弹框是否显示
-			supplementArr: [], //用户补充列表
-			input1: '', //搜索
-			dropdownData: '请选择', //下拉框
-			nums: 0, //总数
-			dialogVisible: false, //审核时弹出的弹框
-			codeVal: '', //区别
-			idVal: '', //数据id
-			txtVal: '', //弹框文字提示
-			detailsShow: true, //补充审核显示
-			upPopData: {}, //弹框数据
-			page: 1,
-			review:''
-		}
-	},
-	//监听属性 类似于data概念
-	computed: {},
-	//监控data中的数据变化
-	watch: {
-		fullHeight(val) {
-			//监控浏览器高度变化
-			if (!this.timer) {
-				this.fullHeight = val
-				this.timer = true
-				let that = this
-				setTimeout(function () {
-					//防止过度调用监测事件,导致卡顿
-					that.timer = false
-				}, 400)
-			}
-		},
-	},
-	//方法集合
-	methods: {
-		// 列表图片加载失败
-		errImg(e) {
-			e.target.src = require('@/assets/images/expertDiagnosis/ku/noData.jpg')
-		},
-
-		//动态获取浏览器高度
-		get_boderHeight() {
-			const that = this
-			window.onresize = () => {
-				return (() => {
-					window.fullHeight = document.documentElement.clientHeight
-					that.fullHeight = window.fullHeight - 128
-					// console.log(that.fullHeight)
-				})()
-			}
-		},
-
-		//分页点击
-		pageData(e) {
-			var that = this
-			this.page = e
-			var num = 2
-			var show = that.detailsShow
-			this.supplementArr = [] //用户补充列表
-			let postData = this.qs.stringify({
-				page: e,
-				code: that.codeVal,
-				ret: num,
-				review:this.review,
-				user: this.input1
-			})
-			this.$axios({
-				method: 'post',
-				url: 'api/api_gateway?method=pest.pests.pests_idea_review',
-				data: postData
-			})
-				.then((res) => {
-					if (res.data.data.nums !== 0) {
-						var data = res.data.data.data
-						var num = parseInt(res.data.data.nums)
-						this.nums = num
-						console.log(num)
-						var supplementArr = that.supplementArr //用户补充
-
-						for (let i = 0; i < data.length; i++) {
-							var time = data[i].adtime
-							var date = new Date(parseInt(time) * 1000)
-								.toLocaleString()
-								.replace(/:\d{1,2}$/, ' ')
-							var dataA = data[i]
-							// 判断是否存在补充数据
-							if (data[i].content) {
-								dataA['upltime'] = date
-								supplementArr.push(dataA)
-							}
-						}
-					} else if (res.data.data.nums == 0) {
-						that.supplementArr = []
-					}
-				})
-				.catch((err) => {
-					console.log(err)
-				})
-		},
-
-		//查看按钮
-		examine(id) {
-			let that = this
-			this.dialogFormVisible = true
-			let postData = that.qs.stringify({
-				pest_id: id
-			})
-			that
-				.$axios({
-					method: 'post',
-					url: 'api/api_gateway?method=pest.pests.pests_info',
-					data: postData
-				})
-				.then((res) => {
-					that.upPopData = res.data.data
-					console.log(res.data.data)
-				})
-				.catch((err) => {
-					console.log(err)
-				})
-		},
-
-		//获取用户补充、意见反馈的列表数据
-		axiosList(num) {
-			let that = this
-			that.codeVal = '5'
-			let podatData = that.qs.stringify({
-				page: that.page,
-				code: '5',
-				ret: num
-			})
-			that
-				.$axios({
-					method: 'post',
-					url: 'api/api_gateway?method=pest.pests.pests_idea_review',
-					data: podatData
-				})
-				.then((res) => {
-					console.log(res.data.data)
-					if (res.data.data.nums !== 0) {
-						var data = res.data.data.data
-						var num = parseInt(res.data.data.nums)
-						this.nums = num
-						console.log(this.nums)
-						var supplementArr = that.supplementArr //用户补充
-
-						for (let i = 0; i < data.length; i++) {
-							var time = data[i].adtime
-							var date = new Date(parseInt(time) * 1000)
-								.toLocaleString()
-								.replace(/:\d{1,2}$/, ' ')
-							var dataA = data[i]
-							// 判断是否存在补充数据
-							if (data[i].content) {
-								dataA['upltime'] = date
-								supplementArr.push(dataA)
-							}
-						}
-					} else if (res.data.data.nums == 0) {
-						that.detailsShow = false
-					}
-				})
-				.catch((err) => {
-					console.log(err)
-				})
-		},
-
-		// 下拉框点击事件
-		handleCommand(command) {
-			let that = this
-			that.dropdownData = command
-			that.supplementArr = []
-			that.axiosListA(command) //审核页面数据请求
-		},
-		//审核页面数据请求
-		axiosListA(command) {
-			let that = this
-			console.log(command)
-			if (command == '审核通过') {
-				this.review = '1'
-			} else if (command == '未审核') {
-				this.review = '0'
-			}else{
-				this.review = ''
-			}
-			that.codeVal = '3'
-			that.page = 1;
-			let postData = that.qs.stringify({
-				code: '3', //区分审核和未审核
-				review: this.review,
-				page: that.page
-			})
-			that
-				.$axios({
-					method: 'post',
-					url: 'api/api_gateway?method=pest.pests.pests_idea_review',
-					data: postData
-				})
-				.then((res) => {
-					console.log(res.data.data)
-					if (res.data.data.nums !== 0) {
-						var data = res.data.data.data
-						var num = parseInt(res.data.data.nums)
-						this.nums = num
-						console.log(this.nums)
-						var supplementArr = that.supplementArr //用户补充
-
-						for (let i = 0; i < data.length; i++) {
-							var time = data[i].adtime
-							var date = new Date(parseInt(time) * 1000)
-								.toLocaleString()
-								.replace(/:\d{1,2}$/, ' ')
-							var dataA = data[i]
-							// 判断是否存在补充数据
-							if (data[i].content) {
-								dataA['upltime'] = date
-								supplementArr.push(dataA)
-							}
-						}
-						that.detailsShow = true
-					} else if (res.data.data.nums == 0) {
-						that.detailsShow = false
-					}
-				})
-				.catch((err) => {
-					console.log(err)
-				})
-		},
-
-		// 用户补充搜索
-		searchData() {
-			let that = this
-			var data = that.dropdownData
-			var name = this.input1
-			if (data == '请选择') {
-				this.review = ''
-			} else if (data == '未审核') {
-				this.review = '0'
-			} else if (data == '审核通过') {
-				this.review = '1'
-			}
-			that.codeVal = '4'
-			that.page = 1
-			let postData = that.qs.stringify({
-				code: '4', //用户进行筛选
-				review: this.review,
-				page: that.page,
-				user: name
-			})
-			that
-				.$axios({
-					method: 'post',
-					url: 'api/api_gateway?method=pest.pests.pests_idea_review',
-					data: postData
-				})
-				.then((res) => {
-					if (res.data.data.nums > 0) {
-						var data = res.data.data.data
-						var num = parseInt(res.data.data.nums)
-						this.nums = num
-						var supplementArr = [] //用户补充
-
-						for (let i = 0; i < data.length; i++) {
-							var time = data[i].adtime
-							var date = new Date(parseInt(time) * 1000)
-								.toLocaleString()
-								.replace(/:\d{1,2}$/, ' ')
-							var dataA = data[i]
-							// 判断是否存在补充数据
-							if (data[i].content) {
-								dataA['upltime'] = date
-								supplementArr.push(dataA)
-							}
-							if(i == data.length-1){
-								this.supplementArr = supplementArr
-							}
-						}
-					} else {
-						this.supplementArr = []
-					}
-				})
-				.catch((err) => {
-					console.log(err)
-				})
-		},
-
-		//驳回
-		reject(id) {
-			let that = this
-			// var data = that.dropdownData
-			that.dialogVisible = true
-			that.codeVal = '2'
-			that.idVal = id
-			that.txtVal = '是否进行审核驳回操作?'
-		},
-		//通过
-		pass(id) {
-			let that = this
-			that.codeVal = '1'
-			that.dialogVisible = true
-			that.idVal = id
-			that.txtVal = '是否进行审核通过操作?'
-		},
-
-		//弹框确定事件
-		addr() {
-			let that = this
-			var id = that.idVal
-			let postData = that.qs.stringify({
-				code: that.codeVal,
-				id: id
-			})
-			that
-				.$axios({
-					method: 'post',
-					url: 'api/api_gateway?method=pest.pests.pests_idea_review',
-					data: postData
-				})
-				.then((res) => {
-					if (res.data.data.codes == 200) {
-						if (that.codeVal == '1') {
-							//审核通过
-							this.$message({
-								message: '审核通过成功',
-								type: 'success',
-								duration: 1500
-							})
-							if(that.review!=''){
-								that.codeVal = 3
-							}else{
-								that.codeVal = 5
-							}
-							that.page = 1
-							that.pageData(1)
-						} else if (that.codeVal == '2') {
-							//审核驳回
-							this.$message({
-								message: '审核驳回成功',
-								type: 'success',
-								duration: 1500
-							})
-							if(that.review!=''){
-								that.codeVal = 3
-							}else{
-								that.codeVal = 5
-							}
-							that.page = 1
-							that.pageData(1)
-						}
-					} else if (res.data.data.codes == 400) {
-						if (that.codeVal == '1') {
-							//审核通过
-							this.$message.error({
-								message: '审核通过失败',
-								duration: 1500
-							})
-						} else if (that.codeVal == '2') {
-							//审核驳回
-							this.$message.error({
-								message: '审核驳回失败',
-								duration: 1500
-							})
-						}
-					}
-				})
-				.catch((err) => {
-					console.log(err)
-				})
-		},
-
-		// 图片放大
-		magnifyPhoto() {
-			//具体需要哪些配置可参照下表
-			const ViewerDom = document.querySelector('#viewerDom')
-			this.viewer = new Viewer(ViewerDom, {
-				initialViewIndex: 0,
-				button: true, //右上角关闭按钮
-				navbar: 2,
-				title: 0,
-				toolbar: 0,
-				keyboard: false,
-				ready: function (e) {
-					console.log(e.type)
-				},
-				show: function (e) {
-					console.log(e.type)
-				},
-				shown: function (e) {
-					console.log(e.type)
-				},
-				hide: function (e) {
-					console.log(e.type)
-				},
-				hidden: function (e) {
-					console.log(e.type)
-				},
-				view: function (e) {
-					console.log(e.type)
-				},
-				viewed: function (e) {
-					console.log(e.type)
-				},
-				zoom: function (e) {
-					console.log(e.type)
-				},
-				zoomed: function (e) {
-					console.log(e.type)
-				}
-			})
-		}
-	},
-	//生命周期 - 创建完成(可以访问当前this实例)
-	created() {},
-	//生命周期 - 挂载完成(可以访问DOM元素)
-	mounted() {
-		this.get_boderHeight() //自适应
-		this.axiosList(2) //获取用户补充、意见反馈的列表数据
-	}
-}
-</script>
-<style lang='less' scoped>
-// 切换按钮
-.primary {
-	background: #13a479 !important;
-	color: #fff !important;
-}
-
-.expertDiagnosis_referral_mainBtn_Box {
-	border-radius: 15px;
-	background: white;
-	border: 1px solid #fff;
-	height: 100%;
-	.expertDiagnosis_recognition_main_tlt {
-		border-left: 6px solid #17bb88;
-		padding: 0 0 0 20px;
-		font-size: 18px;
-		font-weight: 550;
-		margin: 15px 0 0 0;
-		display: flex;
-		justify-content: space-between;
-		.el-dropdown {
-			margin: 10px 40px 0 0;
-		}
-	}
-	// 内容
-	.expertDiagnosis_recognition_main_ul {
-		width: 97%;
-		margin: 25px auto;
-		.expertDiagnosis_recognition_main_li {
-			margin: 25px 0 60px 0;
-
-			// 头像及详情描述
-			.expertDiagnosis_recognition_mainLi_box {
-				display: flex;
-				.expertDiagnosis_recognition_mainLi_box_img {
-					width: 65px;
-					height: 65px;
-					border-radius: 50px;
-				}
-				.expertDiagnosis_recognition_mainLi_box1 {
-					margin: 0 0 0 15px;
-					line-height: 30px;
-					.expertDiagnosis_recognition_mainLi_box1_name {
-						font-size: 16px;
-						font-weight: 550;
-						.expertDiagnosis_recognition_mainLi_box_time {
-							color: #b1b1b1;
-							font-size: 13px;
-							font-weight: 500;
-							margin: 0 0 0 20px;
-						}
-					}
-
-					.expertDiagnosis_recognition_mainLi_box_details {
-						color: #9a9a9a;
-						font-size: 15px;
-						font-weight: 550;
-						line-height: 22px;
-						.expertDiagnosis_recognition_mainLi_box_detailsTxt {
-						}
-					}
-				}
-			}
-		}
-
-		// 操作按钮
-		.expertDiagnosis_recognition_mainLi_btn {
-			float: right;
-			margin: 10px 41px 0 0;
-		}
-	}
-
-	// 弹框
-	.expertDiagnosis_recognition_main_popUp {
-		.expertDiagnosis_recognition_main_popUp_li {
-			display: flex;
-			margin: 0 0 30px 0;
-			// 害虫名称
-			.expertDiagnosis_recognition_main_popUp_li_name {
-				color: #000;
-				font-size: 16px;
-				font-weight: 550;
-			}
-			.expertDiagnosis_recognition_main_popUp_li_nameVal {
-				font-weight: 550;
-			}
-			// 害虫图片
-			.expertDiagnosis_recognition_main_popUp_li_img {
-				font-size: 16px;
-				font-weight: 550;
-				color: #000;
-			}
-			.expertDiagnosis_recognition_main_popUp_li_imgVal {
-				width: 160px;
-				height: 160px;
-				border-radius: 10px;
-			}
-			// 详细信息
-			.expertDiagnosis_recognition_main_popUp_li_details {
-				// width: 188px;
-				width: 80px;
-				font-size: 16px;
-				font-weight: 550;
-				color: #000;
-			}
-			.expertDiagnosis_recognition_main_popUp_li_detailsVal {
-				line-height: 30px;
-				font-weight: 550;
-				width: 800px;
-			}
-		}
-	}
-}
-
-//暂无数据
-.expertDiagnosis_referral_units_not {
-	width: 272px;
-	margin: 0 auto;
-	.expertDiagnosis_referral_units_notImg {
-	}
-}
-</style>

+ 0 - 910
src/pages/expertDiagnosis/expertDatabase/ExpertDatabase copy.vue

@@ -1,910 +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="expertDiagnosis_library">
-			<!-- 病虫害数据列表 -->
-			<div style="width: 70%">
-				<div class="expertDiagnosis_library_mainBtn_Box">
-					<div
-						v-for="(item, index) in this.navigationList"
-						:key="index"
-						:class="[displayType === index ? 'primary' : '']"
-						size="mini"
-						@click="checkType(index)"
-						class="expertDiagnosis_library_mainBtn"
-					>
-						<!-- 左 -->
-						<div class="expertDiagnosis_library_mainBtnBox">
-							<img :src="item.img" class="expertDiagnosis_library_mainBtn_img" />
-							<div class="expertDiagnosis_library_mainBtn_centreBox">
-								<div class="expertDiagnosis_library_mainBtn_centreBox_tlt">{{item.title}}</div>
-								<div class="expertDiagnosis_library_mainBtn_centreBox_introduce">{{item.details}}</div>
-							</div>
-						</div>
-
-						<!-- 右 -->
-						<div class="expertDiagnosis_library_mainBtn_right">
-							<div class="expertDiagnosis_library_mainBtn_rightNum">
-								{{item.num}}
-								<span class="expertDiagnosis_library_mainBtn_rightNum_unit">{{item.unit}}</span>
-							</div>
-						</div>
-					</div>
-				</div>
-
-				<!-- 列表虫害数据 -->
-				<div v-show="displayType == '0'" class="expertDiagnosis_library_mainBtn_box">
-					<div class="expertDiagnosis_library_units">
-						<div class="expertDiagnosis_library_units_tlt">
-							<div class>
-								<img
-									src="@/assets/images/expertDiagnosis/ku/4.png"
-									alt
-									class="expertDiagnosis_library_units_img"
-								/>
-								<span class="expertDiagnosis_library_units_tltTxt">虫害数据</span>
-							</div>
-						</div>
-					</div>
-
-					<!-- 列表数据 -->
-					<ul class="expertDiagnosis_library_units_ul" v-if="insectShow">
-						<li
-							class="expertDiagnosis_library_units_li"
-							v-for="(item, index) in this.redataList"
-							:key="index"
-							@click="showData(item.id)"
-						>
-							<!-- 图片 -->
-							<div class="expertDiagnosis_library_units_liImgBox">
-								<img :src=" 'https://images.weserv.nl/?url=' + item.img_urls" @error="errImg" alt class="expertDiagnosis_library_units_liImg" />
-								<!-- <el-image></el-image> -->
-							</div>
-
-							<!-- 名称 -->
-							<div class="expertDiagnosis_library_units_liRight_H1">{{item.name}}</div>
-
-							<!-- 图标 -->
-							<div class="expertDiagnosis_library_units_liImgBox2">
-								<img
-									src="@/assets/images/expertDiagnosis/ku/3.png"
-									alt
-									class="expertDiagnosis_library_units_liImg2"
-								/>
-							</div>
-						</li>
-					</ul>
-
-					<!-- 暂无数据 -->
-					<div class="expertDiagnosis_referral_units_not" v-else>
-						<img
-							src="@/assets/images/expertDiagnosis/zanwu.png"
-							alt
-							class="expertDiagnosis_referral_units_notImg"
-						/>
-					</div>
-
-					<!-- 分页 -->
-					<el-pagination
-						v-if="insectShow"
-						background
-						@current-change="pageData($event)"
-						layout="prev, pager, next"
-						:total="this.nums"
-						:current-page.sync="page"
-						:page-size="12"
-					></el-pagination>
-				</div>
-
-				<!-- 列表病害数据 -->
-				<div v-show="displayType == '1'" class="expertDiagnosis_library_mainBtn_box">
-					<div class="expertDiagnosis_library_units">
-						<div class="expertDiagnosis_library_units_tlt">
-							<div class>
-								<img
-									src="@/assets/images/expertDiagnosis/ku/5.png"
-									alt
-									class="expertDiagnosis_library_units_img"
-								/>
-								<span class="expertDiagnosis_library_units_tltTxt">病害数据</span>
-							</div>
-						</div>
-					</div>
-
-					<!-- 列表数据 -->
-					<ul class="expertDiagnosis_library_units_ul" v-if="plantShow">
-						<li
-							class="expertDiagnosis_library_units_li"
-							v-for="(item, index) in this.redataList"
-							:key="index"
-							@click="showData(item.id)"
-						>
-							<!-- 图片 -->
-							<div class="expertDiagnosis_library_units_liImgBox">
-								<img :src=" 'https://images.weserv.nl/?url=' + item.img_urls" alt class="expertDiagnosis_library_units_liImg" />
-							</div>
-
-							<!-- 名称 -->
-							<div class="expertDiagnosis_library_units_liRight_H1">{{item.name}}</div>
-
-							<!-- 图标 -->
-							<div class="expertDiagnosis_library_units_liImgBox2">
-								<img
-									src="@/assets/images/expertDiagnosis/ku/3.png"
-									alt
-									class="expertDiagnosis_library_units_liImg2"
-								/>
-							</div>
-						</li>
-					</ul>
-
-					<!-- 暂无数据 -->
-					<div class="expertDiagnosis_referral_units_not" v-else>
-						<img
-							src="@/assets/images/expertDiagnosis/zanwu.png"
-							alt
-							class="expertDiagnosis_referral_units_notImg"
-						/>
-					</div>
-
-					<!-- 分页 -->
-					<el-pagination
-						v-if="plantShow"
-						background
-						@current-change="pageData($event)"
-						layout="prev, pager, next"
-						:total="this.nums"
-						:page-size="12"
-					></el-pagination>
-				</div>
-			</div>
-
-			<!-- 搜索 -->
-			<div class="expertDiagnosis_library_main_right" v-loading="loading">
-				<!-- 搜索 -->
-				<div style="border-bottom: 1px solid #efefef">
-					<div class="expertDiagnosis_library_main_right_searchBox">
-						<div class="expertDiagnosis_library_main_right_searchBox_tlt">搜索排名</div>
-
-						<div class="expertDiagnosis_library_units_search">
-							<el-input placeholder="搜索关键字" v-model="input1" class="input-with-select">
-								<el-button slot="append" icon="el-icon-search" @click="searchData()"></el-button>
-							</el-input>
-						</div>
-					</div>
-				</div>
-
-				<!-- 排名 -->
-				<ul class="expertDiagnosis_library_main_right_ul" v-if="searchShow">
-					<li
-						class="expertDiagnosis_library_main_right_li"
-						v-for="(itemA, index) in this.searchList"
-						:key="index"
-					>
-						<div class style="display: flex; margin: 0 0 0 20px;">
-							<div class="expertDiagnosis_library_main_right_li_num">{{itemA.codes}}</div>
-							<div class="expertDiagnosis_library_main_right_li_imgBox">
-								<img
-									:src="itemA.img_urls"
-									@error="errImg"
-									class="expertDiagnosis_library_main_right_li_imgBox_img"
-								/>
-							</div>
-						</div>
-
-						<div class="expertDiagnosis_library_main_right_li_nameBox">
-							<div class="expertDiagnosis_library_main_right_li_nameBox_name">{{itemA.name}}</div>
-							<div class="expertDiagnosis_library_main_right_li_nameBox_num">编号:{{itemA.search}}</div>
-						</div>
-					</li>
-
-					<li class>
-						<!-- 分页 -->
-						<el-pagination
-							background
-							@current-change="pageDataA($event)"
-							layout="prev, pager, next"
-							:total="this.searchNums"
-							:current-page.sync="pageA"
-							:page-size="3"
-						></el-pagination>
-					</li>
-				</ul>
-
-				<!-- 暂无数据 -->
-				<div class="expertDiagnosis_referral_units_not" v-else>
-					<img
-						src="@/assets/images/expertDiagnosis/zanwu.png"
-						alt
-						class="expertDiagnosis_referral_units_notImg"
-					/>
-				</div>
-
-				<!-- 标签云 -->
-				<div class="expertDiagnosis_library_main_right_label">
-					<svg :width="width" :height="height" @mousemove="listener($event)">
-						<a href="#" v-for="tag in tags" @click="labelData(tag.id)">
-							<text
-								:x="tag.x"
-								:y="tag.y"
-								:font-size="20 * (600/(600-tag.z))"
-								:fill-opacity="((400+tag.z)/600)"
-								fill="#17bb88"
-							>{{tag.text}}</text>
-						</a>
-					</svg>
-				</div>
-			</div>
-		</div>
-
-		<!-- 弹框 -->
-		<el-dialog title="病虫害档案" :visible.sync="dialogFormVisible">
-			<ul class="expertDiagnosis_library_main_popUp">
-				<li class="expertDiagnosis_library_main_popUp_li">
-					<div class="expertDiagnosis_library_main_popUp_li_name">害虫名称:</div>
-					<div class="expertDiagnosis_library_main_popUp_li_nameVal">{{this.popUpData.name}}</div>
-				</li>
-
-				<li class="expertDiagnosis_library_main_popUp_li">
-					<div class="expertDiagnosis_library_main_popUp_li_img">害虫图片:</div>
-					<div class id="viewerDom" v-viewer>
-						<img
-							:src="this.popUpData.img_urls"
-							@error="errImg"
-							alt
-							class="expertDiagnosis_library_main_popUp_li_imgVal"
-						/>
-					</div>
-				</li>
-
-				<li class="expertDiagnosis_library_main_popUp_li">
-					<div class="expertDiagnosis_library_main_popUp_li_details">详细信息:</div>
-					<div class="expertDiagnosis_library_main_popUp_li_detailsVal">{{this.popUpData.prevention}}</div>
-				</li>
-			</ul>
-		</el-dialog>
-	</div>
-</template>
-
-<script>
-import t from '../../../assets/ezuikit'
-export default {
-	data() {
-		return {
-			displayType: 0,
-			navigationList: [
-				{
-					img: './static/images/expertDiagnosis/ku/1.png',
-					title: '虫害数据',
-					details: '由中科感知提供大数据服务与算法支持',
-					unit: '例'
-				},
-				{
-					img: './static/images/expertDiagnosis/ku/2.png',
-					title: '病害数据',
-					details: '由中科感知提供大数据服务与算法支持',
-					unit: '例'
-				}
-			],
-			input1: '', //搜索
-			//标签云
-			width: 460,
-			height: 260,
-			tagsNum: 0,
-			RADIUS: 120,
-			speedX: Math.PI / 360,
-			speedY: Math.PI / 360,
-			tags: [],
-			dialogFormVisible: false,
-			nums: 1, //总数
-			redataList: [], //病害虫害数组
-			searchList: [], //病虫害搜索排行数据
-			searchNums: 0, //搜索总数分页
-			popUpData: {}, //弹框中的数据
-			searchShow: true, //搜索列表显示
-			plantShow: true, //病害数据列表显示
-			insectShow: true, //虫害数据列表显示
-			page: 1,
-			pageA: 1,
-			loading: true
-		}
-	},
-	computed: {
-		CX() {
-			return this.width / 2
-		},
-		CY() {
-			return this.height / 2
-		}
-	},
-	watch: {
-		displayType(val) {
-			this.loading = true
-			if (val == 0) {
-				//虫害数据
-				this.axiosList(2)
-				this.searchData(2, this.pageA, this.input1)
-				this.cloudData()
-				console.log(111)
-			} else if (val == 1) {
-				// 病害数据
-				this.axiosList(1)
-				this.searchData(1, this.pageA, this.input1)
-				this.cloudData()
-				console.log(222)
-			}
-		}
-	},
-	methods: {
-		// 列表图片加载失败
-		errImg(e) {
-			e.target.src = require('@/assets/images/expertDiagnosis/ku/noData.jpg')
-		},
-
-		checkType(i) {
-			this.page = 1
-			this.displayType = i
-		},
-		// 标签云
-		rotateX(speedX) {
-			var cos = Math.cos(speedX)
-			var sin = Math.sin(speedX)
-			for (let tag of this.tags) {
-				var y1 = (tag.y - this.CY) * cos - tag.z * sin + this.CY
-				var z1 = tag.z * cos + (tag.y - this.CY) * sin
-				tag.y = y1
-				tag.z = z1
-			}
-		},
-		rotateY(speedY) {
-			var cos = Math.cos(speedY)
-			var sin = Math.sin(speedY)
-			for (let tag of this.tags) {
-				var x1 = (tag.x - this.CX) * cos - tag.z * sin + this.CX
-				var z1 = tag.z * cos + (tag.x - this.CX) * sin
-				tag.x = x1
-				tag.z = z1
-			}
-		},
-		listener(event) {
-			//响应鼠标移动
-			var x = event.clientX - this.CX
-			var y = event.clientY - this.CY
-			this.speedX =
-				x * 0.0001 > 0
-					? Math.min(this.RADIUS * 0.00002, x * 0.0001)
-					: Math.max(-this.RADIUS * 0.00002, x * 0.0001)
-			this.speedY =
-				y * 0.0001 > 0
-					? Math.min(this.RADIUS * 0.00002, y * 0.0001)
-					: Math.max(-this.RADIUS * 0.00002, y * 0.0001)
-		},
-		labelData(id) {
-			this.showData(id)
-			// this.dialogFormVisible = true
-		},
-		cloudData() {
-			let that = this
-			if (that.displayType == 0) {
-				// 虫害数据
-				var num = 2
-			} else if (that.displayType == 1) {
-				// 病害数据
-				var num = 1
-			}
-			let postData = that.qs.stringify({
-				code: num,
-				page: that.page
-			})
-			that
-				.$axios({
-					method: 'post',
-					url: 'api/api_gateway?method=pest.pests.pests_info',
-					data: postData
-				})
-				.then((res) => {
-					// var num = parseInt(res.data.data.nums)
-					var num = parseInt(res.data.data.data.length)
-					var data = res.data.data.data
-					that.tagsNum = num
-					this.nums = res.data.data.nums
-					// console.log(that.tagsNum)
-					// console.log(typeof that.tagsNum)
-					// //初始化标签位置
-					let tags = []
-					for (let i = 0; i < data.length; i++) {
-						let tag = {}
-						let k = -1 + (2 * (i + 1) - 1) / this.tagsNum
-						let a = Math.acos(k)
-						let b = a * Math.sqrt(this.tagsNum * Math.PI)
-						tag.text = data[i].name
-						tag.x = this.CX + this.RADIUS * Math.sin(a) * Math.cos(b)
-						tag.y = this.CY + this.RADIUS * Math.sin(a) * Math.sin(b)
-						tag.z = this.RADIUS * Math.cos(a)
-						tag.id = data[i].id
-						tags.push(tag)
-					}
-					this.tags = tags
-				})
-				.catch((err) => {
-					console.log(err)
-				})
-		},
-
-		// 病虫害数据列表接口
-		axiosList(num) {
-			let that = this
-			let postData = that.qs.stringify({
-				code: num,
-				page: that.page
-			})
-			that
-				.$axios({
-					method: 'post',
-					url: 'api/api_gateway?method=pest.pests.pests_info',
-					data: postData
-				})
-				.then((res) => {
-					if (res.data.data.nums == 0) {
-						// 判断当前是虫害还是病害
-						if (num == 1) {
-							//病害
-							that.plantShow = false
-						} else if (num == 2) {
-							// 虫害
-							that.insectShow = false
-						}
-						this.loading = false
-					} else if (res.data.data.nums !== 0) {
-						var num = parseInt(res.data.data.nums)
-						that.nums = num
-						that.redataList = res.data.data.data
-						var dat = res.data.data.data
-						for (var i = 0; i < dat.length; i++) {
-							// console.log(dat[i].img_urls)
-						}
-						this.loading = false
-					}
-				})
-				.catch((err) => {
-					console.log(err)
-				})
-		},
-
-		//分页点击
-		pageData(e) {
-			var that = this
-			// 判断当前是意见反馈还是补充审核
-			if (this.displayType == 0) {
-				var num = 2
-			} else if (this.displayType == 1) {
-				var num = 1
-			}
-			this.opinionArr = [] //意见反馈列表
-			this.supplementArr = [] //用户补充列表
-			let postData = this.qs.stringify({
-				page: e,
-				code: num
-			})
-			this.$axios({
-				method: 'post',
-				url: 'api/api_gateway?method=pest.pests.pests_info',
-				data: postData
-			})
-				.then((res) => {
-					var num = parseInt(res.data.data.nums)
-					that.nums = num
-					that.redataList = res.data.data.data
-				})
-				.catch((err) => {
-					console.log(err)
-				})
-		},
-
-		// 病害虫害总条数
-		numsData() {
-			let that = this
-			that
-				.$axios({
-					method: 'post',
-					url: 'api/api_gateway?method=pest.pests.pests_total'
-				})
-				.then((res) => {
-					var list = this.navigationList
-					var num = res.data.data
-					let arr = Object.entries(num)
-					// for (let i = 0; i < list.length; i++) {
-					// 	list[i].num = arr[i][1]
-					// 	console.log(arr[i][1])
-					// }
-					list[0].num = arr[1][1]
-					list[1].num = arr[0][1]
-					this.navigationList = []
-					this.navigationList = list
-				})
-				.catch((err) => {
-					console.log(err)
-				})
-		},
-
-		//病虫害名称搜索接口
-		searchData(code, page, name) {
-			let that = this
-			// code
-			if (that.displayType == 0) {
-				// 虫害数据
-				var code = 2
-			} else if (that.displayType == 1) {
-				// 病害数据
-				var code = 1
-			}
-			if (name !== '') {
-				that.pageA = 1
-			}
-
-			// name
-			var name = that.input1
-			let postData = that.qs.stringify({
-				code: code,
-				page: page,
-				name: name
-			})
-			that
-				.$axios({
-					method: 'post',
-					url: 'api/api_gateway?method=pest.pests.pests_search',
-					data: postData
-				})
-				.then((res) => {
-					if (res.data.data.nums == 0) {
-						that.searchShow = false
-					} else if (res.data.data.nums !== 0) {
-						that.searchShow = true
-						var data = res.data.data.data
-						var num = parseInt(res.data.data.nums)
-						that.searchNums = num
-						that.searchList = data
-					}
-				})
-				.catch((err) => {
-					console.log(err)
-				})
-		},
-
-		//病虫害搜索分页
-		pageDataA(e) {
-			this.searchData('', e, '')
-		},
-
-		//弹框中的数据
-		showData(id) {
-			let that = this
-			if (that.displayType == 0) {
-				var num = 2
-			} else if (that.displayType == 1) {
-				var num = 1
-			}
-			let postData = that.qs.stringify({
-				code: num,
-				page: that.page,
-				pest_id: id
-			})
-			that
-				.$axios({
-					method: 'post',
-					url: 'api/api_gateway?method=pest.pests.pests_info',
-					data: postData
-				})
-				.then((res) => {
-					that.popUpData = res.data.data
-					that.dialogFormVisible = true
-				})
-				.catch((err) => {
-					console.log(err)
-				})
-		},
-
-		// 图片放大
-		magnifyPhoto() {
-			//具体需要哪些配置可参照下表
-			const ViewerDom = document.querySelector('#viewerDom')
-			this.viewer = new Viewer(ViewerDom, {
-				initialViewIndex: 0,
-				button: true, //右上角关闭按钮
-				navbar: 2,
-				title: 0,
-				toolbar: 0,
-				keyboard: false,
-				ready: function (e) {
-					console.log(e.type)
-				},
-				show: function (e) {
-					console.log(e.type)
-				},
-				shown: function (e) {
-					console.log(e.type)
-				},
-				hide: function (e) {
-					console.log(e.type)
-				},
-				hidden: function (e) {
-					console.log(e.type)
-				},
-				view: function (e) {
-					console.log(e.type)
-				},
-				viewed: function (e) {
-					console.log(e.type)
-				},
-				zoom: function (e) {
-					console.log(e.type)
-				},
-				zoomed: function (e) {
-					console.log(e.type)
-				}
-			})
-		}
-	},
-	created() {
-		this.cloudData()
-	},
-	mounted() {
-		//使球开始旋转
-		setInterval(() => {
-			this.rotateX(this.speedX)
-			this.rotateY(this.speedY)
-		}, 17)
-
-		this.axiosList(2) //请求病虫害数据
-		this.numsData() //请求病虫害数据的总条数
-		this.searchData(2, this.pageA, '') //病虫害名称搜索接口
-	}
-}
-</script>
-
-<style lang='less' scoped>
-.expertDiagnosis_library {
-	display: flex;
-}
-
-// 切换
-.expertDiagnosis_library_mainBtn_Box {
-	display: flex;
-	height: 85px;
-	.expertDiagnosis_library_mainBtn {
-		border-radius: 5px;
-		// width: 32%;
-		width: 47%;
-		display: flex;
-		justify-content: space-between;
-		padding: 15px 0 15px 0;
-		background: #fff;
-		margin: 0 25px 0 0;
-
-		.expertDiagnosis_library_mainBtnBox {
-			display: flex;
-			margin: 0 0 0 35px;
-			.expertDiagnosis_library_mainBtn_centreBox {
-				margin: 0 0 0 12px;
-				line-height: 22px;
-
-				.expertDiagnosis_library_mainBtn_centreBox_tlt {
-					font-size: 15px;
-					font-weight: 550;
-				}
-				.expertDiagnosis_library_mainBtn_centreBox_introduce {
-					font-size: 14px;
-					font-weight: 550;
-					color: #adadad;
-				}
-			}
-		}
-
-		.expertDiagnosis_library_mainBtn_right {
-			margin: 0 35px 0 0;
-			.expertDiagnosis_library_mainBtn_rightNum {
-				font-size: 42px;
-				color: #9a9a9a;
-				.expertDiagnosis_library_mainBtn_rightNum_unit {
-					font-size: 15px;
-				}
-			}
-		}
-	}
-}
-
-.primary {
-	box-shadow: 0px 1px 12px 3px #7df1e1,
-		50px 0 48px 34px rgba(255, 255, 255, 0.5);
-}
-
-// 病虫害数据列表-左边
-.expertDiagnosis_library_mainBtn_box {
-	margin: 20px auto;
-	.expertDiagnosis_library_units {
-		.expertDiagnosis_library_units_tlt {
-			display: flex;
-			justify-content: space-between;
-			.expertDiagnosis_library_units_img {
-				width: 18px;
-				height: 19px;
-			}
-			.expertDiagnosis_library_units_tltTxt {
-				color: #6b6b6b;
-				font-size: 17px;
-				font-weight: 550;
-				vertical-align: top;
-				margin-left: 5px;
-			}
-
-			.expertDiagnosis_library_units_search {
-				width: 15%;
-			}
-		}
-	}
-
-	// 数据列表
-	.expertDiagnosis_library_units_ul {
-		display: flex;
-		flex-wrap: wrap;
-		.expertDiagnosis_library_units_li {
-			border: 1px solid #fff;
-			width: 30%;
-			margin: 15px 0 0 25px;
-			display: flex;
-			justify-content: space-between;
-			border-radius: 10px;
-			background: #fff;
-			// 图片
-			.expertDiagnosis_library_units_liImgBox {
-				padding: 10px;
-				.expertDiagnosis_library_units_liImg {
-					width: 80px;
-					height: 80px;
-					border-radius: 50px;
-				}
-			}
-			// 名称
-			.expertDiagnosis_library_units_liRight_H1 {
-				padding: 10px;
-				line-height: 76px;
-				font-size: 14px;
-				font-weight: 550;
-			}
-			//图标
-			.expertDiagnosis_library_units_liImgBox2 {
-				margin: 21px 0 0 0;
-				padding: 10px;
-				.expertDiagnosis_library_units_liImg2 {
-				}
-			}
-		}
-	}
-}
-
-// 搜索-右边
-.expertDiagnosis_library_main_right {
-	border: 1px solid #fff;
-	width: 30%;
-	border-radius: 15px;
-	background: #fff;
-	// 搜索
-	.expertDiagnosis_library_main_right_searchBox {
-		// border: 1px solid #000;
-		display: flex;
-		justify-content: space-between;
-		width: 90%;
-		margin: 15px auto;
-		.expertDiagnosis_library_main_right_searchBox_tlt {
-			// border: 1px solid #000;
-			line-height: 40px;
-			font-size: 18px;
-			font-weight: 550;
-			color: #d0cfcf;
-		}
-		.expertDiagnosis_library_units_search {
-			width: 40%;
-			.input-with-select {
-				height: 30px;
-				color: #d0cfcf;
-			}
-		}
-	}
-
-	// 排名
-	.expertDiagnosis_library_main_right_ul {
-		.expertDiagnosis_library_main_right_li {
-			border-bottom: 1px solid #d0cfcf;
-			padding: 0 0 10px 0;
-			margin: 15px auto;
-			width: 95%;
-			display: flex;
-			justify-content: space-between;
-			.expertDiagnosis_library_main_right_li_num {
-				color: #61cba5;
-				font-size: 20px;
-				font-weight: 550;
-				line-height: 85px;
-				margin: 0 30px 0 0;
-			}
-			.expertDiagnosis_library_main_right_li_imgBox {
-				.expertDiagnosis_library_main_right_li_imgBox_img {
-					width: 100px;
-					height: 90px;
-				}
-			}
-			.expertDiagnosis_library_main_right_li_nameBox {
-				margin: 30px 15px 0 0;
-				.expertDiagnosis_library_main_right_li_nameBox_name {
-					text-align: left;
-					width: 36px;
-					margin-bottom: 5px;
-				}
-
-				.expertDiagnosis_library_main_right_li_nameBox_num {
-					width: 67px;
-				}
-			}
-		}
-	}
-}
-
-// 弹框
-.expertDiagnosis_library_main_popUp {
-	.expertDiagnosis_library_main_popUp_li {
-		display: flex;
-		margin: 0 0 30px 0;
-		// 害虫名称
-		.expertDiagnosis_library_main_popUp_li_name {
-			color: #000;
-			font-size: 16px;
-			font-weight: 550;
-		}
-		.expertDiagnosis_library_main_popUp_li_nameVal {
-			font-weight: 550;
-		}
-		// 害虫图片
-		.expertDiagnosis_library_main_popUp_li_img {
-			font-size: 16px;
-			font-weight: 550;
-			color: #000;
-		}
-		.expertDiagnosis_library_main_popUp_li_imgVal {
-			width: 160px;
-			height: 160px;
-			border-radius: 10px;
-		}
-		// 详细信息
-		.expertDiagnosis_library_main_popUp_li_details {
-			// width: 188px;
-			width: 80px;
-			font-size: 16px;
-			font-weight: 550;
-			color: #000;
-		}
-		.expertDiagnosis_library_main_popUp_li_detailsVal {
-			line-height: 30px;
-			font-weight: 550;
-			width: 800px;
-			text-align: left;
-		}
-	}
-}
-
-// 暂无数据
-.expertDiagnosis_referral_units_not {
-	width: 272px;
-	margin: 0 auto;
-	.expertDiagnosis_referral_units_notImg {
-	}
-}
-
-// 暂无数据列表
-.pagingLi {
-	margin: 0 0 0 0;
-}
-</style>

文件差异内容过多而无法显示
+ 0 - 1520
src/pages/expertDiagnosis/expertDatabase/ExpertDatabase.vue


+ 0 - 687
src/pages/expertDiagnosis/expertIntr/ExpertIntr.vue

@@ -1,687 +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="expertDiagnosis_referral_mainBtn_Box">
-			<div
-				v-for="(item, index) in this.navigationList"
-				:key="index"
-				:class="[displayType === index ? 'primary' : '']"
-				size="mini"
-				@click="checkType(index)"
-				class="expertDiagnosis_referral_mainBtn"
-			>
-				<!-- 左 -->
-				<div class="expertDiagnosis_referral_mainBtnBox">
-					<img :src="item.img" class="expertDiagnosis_referral_mainBtn_img" />
-					<div class="expertDiagnosis_referral_mainBtn_centreBox">
-						<div class="expertDiagnosis_referral_mainBtn_centreBox_tlt">
-							{{ item.title }}
-						</div>
-						<div class="expertDiagnosis_referral_mainBtn_centreBox_introduce">
-							{{ item.details }}
-						</div>
-					</div>
-				</div>
-
-				<!-- 右 -->
-				<div class="expertDiagnosis_referral_mainBtn_right">
-					<div class="expertDiagnosis_referral_mainBtn_rightNum">
-						{{ item.num }}
-						<span class="expertDiagnosis_referral_mainBtn_rightNum_unit">{{
-							item.unit
-						}}</span>
-					</div>
-				</div>
-			</div>
-		</div>
-
-		<!-- 合作单位 -->
-		<div
-			v-show="displayType == '0'"
-			class="expertDiagnosis_referral_mainBtn_box"
-		>
-			<!-- 合作单位 -->
-			<div class="expertDiagnosis_referral_units">
-				<!-- 标题 -->
-				<div class="expertDiagnosis_referral_units_tlt">
-					<div class>
-						<img
-							src="@/assets/images/expertDiagnosis/3.png"
-							alt
-							class="expertDiagnosis_referral_units_img"
-						/>
-						<span class="expertDiagnosis_referral_units_tltTxt">合作单位</span>
-					</div>
-
-					<!-- 搜索 -->
-					<div class="expertDiagnosis_referral_units_search">
-						<el-input
-							placeholder="搜索关键字"
-							v-model="input1"
-							class="input-with-select"
-						>
-							<el-button
-								slot="append"
-								icon="el-icon-search"
-								@click="searchData()"
-							></el-button>
-						</el-input>
-					</div>
-				</div>
-				<!-- 列表 -->
-				<ul class="expertDiagnosis_referral_units_ul" v-if="unitShow">
-					<li
-						class="expertDiagnosis_referral_units_li"
-						v-for="(item, index) in this.dataList"
-						:key="item"
-					>
-						<img
-							src="@/assets/images/expertDiagnosis/qiyu/7.png"
-							alt
-							class="expertDiagnosis_referral_units_liImg"
-						/>
-
-						<!-- 内容 -->
-						<div class="expertDiagnosis_referral_units_liBox">
-							<!-- 左 -->
-							<div class="expertDiagnosis_referral_units_liLeft">
-								<img
-									:src="$host+item.img_urls"
-									alt
-									class="expertDiagnosis_referral_units_liLeft_img"
-								/>
-							</div>
-
-							<!-- 右 -->
-							<div class="expertDiagnosis_referral_units_liRight">
-								<!-- 大标题 -->
-								<div class="expertDiagnosis_referral_units_liRight_H1">
-									{{ item.name }}
-								</div>
-								<!-- 小标题 -->
-								<div class="expertDiagnosis_referral_units_liRight_H2">
-									简介:
-								</div>
-								<!-- 详情 -->
-								<div class="expertDiagnosis_referral_units_liRight_details">
-									{{ item.briefing }}
-								</div>
-							</div>
-						</div>
-					</li>
-				</ul>
-
-				<!-- 暂无数据 -->
-				<div class="expertDiagnosis_referral_units_not" v-else>
-					<img
-						src="@/assets/images/expertDiagnosis/zanwu.png"
-						alt
-						class="expertDiagnosis_referral_units_notImg"
-					/>
-				</div>
-			</div>
-		</div>
-
-		<!-- 合作院校 -->
-		<div
-			v-show="displayType == '1'"
-			class="expertDiagnosis_referral_mainBtn_box"
-		>
-			<!-- 合作院校 -->
-			<div class="expertDiagnosis_referral_units">
-				<!-- 标题 -->
-				<div class="expertDiagnosis_referral_units_tlt">
-					<div class>
-						<img
-							src="@/assets/images/expertDiagnosis/2.png"
-							alt
-							class="expertDiagnosis_referral_units_img"
-						/>
-						<span class="expertDiagnosis_referral_units_tltTxt">合作院校</span>
-					</div>
-
-					<!-- 搜索 -->
-					<div class="expertDiagnosis_referral_units_search">
-						<el-input
-							placeholder="搜索关键字"
-							v-model="input1"
-							class="input-with-select"
-						>
-							<el-button
-								slot="append"
-								icon="el-icon-search"
-								@click="searchData()"
-							></el-button>
-						</el-input>
-					</div>
-				</div>
-				<!-- 列表 -->
-				<ul class="expertDiagnosis_referral_units_ul" v-if="academyShow">
-					<li
-						class="expertDiagnosis_referral_units_li"
-						v-for="(item, index) in this.dataList"
-						:key="item"
-					>
-						<img
-							src="@/assets/images/expertDiagnosis/qiyu/9.png"
-							alt
-							class="expertDiagnosis_referral_units_liImg"
-						/>
-
-						<!-- 内容 -->
-						<div class="expertDiagnosis_referral_units_liBox">
-							<!-- 左 -->
-							<div class="expertDiagnosis_referral_units_liLeft">
-								<img
-									:src="'api/' + item.img_urls"
-									alt
-									class="expertDiagnosis_referral_units_liLeft_img"
-								/>
-							</div>
-
-							<!-- 右 -->
-							<div class="expertDiagnosis_referral_units_liRight">
-								<!-- 大标题 -->
-								<div class="expertDiagnosis_referral_units_liRight_H1">
-									{{ item.name }}
-								</div>
-								<!-- 小标题 -->
-								<div class="expertDiagnosis_referral_units_liRight_H2">
-									简介:
-								</div>
-								<!-- 详情 -->
-								<div class="expertDiagnosis_referral_units_liRight_details">
-									{{ item.briefing }}
-								</div>
-							</div>
-						</div>
-					</li>
-				</ul>
-
-				<!-- 暂无数据 -->
-				<div class="expertDiagnosis_referral_units_not" v-else>
-					<img
-						src="@/assets/images/expertDiagnosis/zanwu.png"
-						alt
-						class="expertDiagnosis_referral_units_notImg"
-					/>
-				</div>
-			</div>
-		</div>
-
-		<!-- 合作专家 -->
-		<div
-			v-show="displayType == '2'"
-			class="expertDiagnosis_referral_mainBtn_box"
-		>
-			<!-- 合作专家 -->
-			<div class="expertDiagnosis_referral_units">
-				<!-- 标题 -->
-				<div class="expertDiagnosis_referral_units_tlt">
-					<div class>
-						<img
-							src="@/assets/images/expertDiagnosis/4.png"
-							alt
-							class="expertDiagnosis_referral_units_img"
-						/>
-						<span class="expertDiagnosis_referral_units_tltTxt">合作专家</span>
-					</div>
-
-					<!-- 搜索 -->
-					<div class="expertDiagnosis_referral_units_search">
-						<el-input
-							placeholder="搜索关键字"
-							v-model="input1"
-							class="input-with-select"
-						>
-							<el-button
-								slot="append"
-								icon="el-icon-search"
-								@click="searchData()"
-							></el-button>
-						</el-input>
-					</div>
-				</div>
-				<!-- 列表 -->
-				<ul class="expertDiagnosis_referral_units_ul" v-if="expertShow">
-					<li
-						class="expertDiagnosis_referral_units_li"
-						v-for="(item, index) in this.dataList"
-						:key="item"
-					>
-						<img
-							src="@/assets/images/expertDiagnosis/qiyu/8.png"
-							alt
-							class="expertDiagnosis_referral_units_liImg"
-						/>
-
-						<!-- 内容 -->
-						<div class="expertDiagnosis_referral_units_liBox">
-							<!-- 左 -->
-							<div class="expertDiagnosis_referral_units_liLeft">
-								<img
-									:src="'api/' + item.img_urls"
-									alt
-									class="expertDiagnosis_referral_units_liLeft_img"
-								/>
-							</div>
-
-							<!-- 右 -->
-							<div class="expertDiagnosis_referral_units_liRight">
-								<!-- 大标题 -->
-								<div class="expertDiagnosis_referral_units_liRight_H1">
-									{{ item.name }}
-								</div>
-								<!-- 小标题 -->
-								<div class="expertDiagnosis_referral_units_liRight_H2">
-									简介:
-								</div>
-								<!-- 详情 -->
-								<div class="expertDiagnosis_referral_units_liRight_details">
-									{{ item.briefing }}
-								</div>
-							</div>
-						</div>
-					</li>
-				</ul>
-
-				<!-- 暂无数据 -->
-				<div class="expertDiagnosis_referral_units_not" v-else>
-					<img
-						src="@/assets/images/expertDiagnosis/zanwu.png"
-						alt
-						class="expertDiagnosis_referral_units_notImg"
-					/>
-				</div>
-			</div>
-		</div>
-
-		<!-- 分页 -->
-		<el-pagination
-			background
-			@current-change="pageData($event)"
-			layout="prev, pager, next"
-			:total="this.nums"
-			:current-page.sync="page"
-			:page-size="10"
-		></el-pagination>
-	</div>
-</template>
-
-<script>
-//自适应
-import '@/plugin/flexible.js'
-
-export default {
-	data() {
-		return {
-			page: 1,
-			nums: 1, //总数
-			displayType: 0,
-			navigationList: [
-				{
-					img: './static/images/expertDiagnosis/qiyu/4.png',
-					title: '合作单位',
-					details: '中国科学院/省级农科院/省级植保站',
-					unit: '所'
-				},
-				{
-					img: './static/images/expertDiagnosis/qiyu/5.png',
-					title: '合作院校',
-					details: '国家重点高校',
-					unit: '所'
-				},
-				{
-					img: './static/images/expertDiagnosis/qiyu/6.png',
-					title: '合作专家',
-					details: '农业相关博士、教授、研究员',
-					unit: '人'
-				}
-			],
-			dataList: [], //列表数据
-			input1: '', //合作单位搜索框
-			unitShow: true, //合作单位数据显示
-			academyShow: true, //合作院校数据显示
-			expertShow: true //合作专家数据显示
-		}
-	},
-	methods: {
-		// 导航点击切换事件
-		checkType(i) {
-			this.displayType = i
-			this.input1 = ''
-			this.listData(i + 1, 1)
-		},
-
-		// 单位、院校、专家、总数接口
-		totality() {
-			this.$axios({
-				url: 'api/api_gateway?method=pest.pests.pests_expert_total',
-				method: 'post'
-			})
-				.then((res) => {
-					var list = this.navigationList
-					var num = res.data.data
-					let arr = Object.entries(num)
-					for (let i = 0; i < list.length; i++) {
-						list[i].num = arr[i][1]
-					}
-					this.navigationList = []
-					this.navigationList = list
-				})
-				.catch((err) => {
-					console.log(err)
-				})
-		},
-
-		// 单位、院校、专家、列表接口
-		listData(num, page) {
-			let postData = this.qs.stringify({
-				code: num,
-				page: page
-			})
-			this.$axios({
-				method: 'post',
-				url: 'api/api_gateway?method=pest.pests.pests_expert',
-				data: postData
-			})
-				.then((res) => {
-					var num = res.data.data.nums
-					var length = res.data.data.length
-					var num = parseInt(res.data.data.nums)
-					this.nums = num
-					if (length !== 0) {
-						this.dataList = res.data.data.data
-					} else if (length == 0) {
-						if (this.displayType == '0') {
-							//合作单位
-							this.unitShow = false
-						} else if (this.displayType == '1') {
-							//合作院校
-							this.academyShow = false
-						} else if (this.displayType == '2') {
-							// 合作专家
-							this.expertShow = false
-						}
-					}
-				})
-				.catch((err) => {
-					console.log(err)
-				})
-		},
-
-		// 搜索
-		searchData() {
-			var code = this.displayType + 1
-			var name = this.input1
-			let postData = this.qs.stringify({
-				code: code,
-				name: name
-			})
-			this.$axios({
-				method: 'post',
-				url: 'api/api_gateway?method=pest.pests.pests_expert_search',
-				data: postData
-			})
-				.then((res) => {
-					console.log(res.data.data)
-					var num = res.data.data.nums
-					if (num !== 0) {
-						this.dataList = res.data.data.data
-					} else if (num == 0) {
-						if (this.displayType == '0') {
-							//合作单位
-							this.unitShow = false
-						} else if (this.displayType == '1') {
-							//合作院校
-							this.academyShow = false
-						} else if (this.displayType == '2') {
-							// 合作专家
-							this.expertShow = false
-						}
-					}
-				})
-				.catch((err) => {
-					console.log(err)
-				})
-		},
-
-		//分页点击
-		pageData(e) {
-			var that = this
-			// 判断当前是意见反馈还是补充审核
-			var num = this.displayType + 1
-			this.input1 = ''
-			this.listData(num, e)
-		}
-	},
-	mounted() {
-		this.totality() //单位、院校、专家总数据接口
-		this.listData(1, 1) //单位、院校、专家、列表接口
-	}
-}
-</script>
-
-<style>
-/* .avatar-uploader .el-upload {
-	border: 1px dashed #d9d9d9;
-	border-radius: 6px;
-	cursor: pointer;
-	position: relative;
-	overflow: hidden;
-}
-.avatar-uploader .el-upload:hover {
-	border-color: #409eff;
-}
-.avatar-uploader-icon {
-	font-size: 28px;
-	color: #8c939d;
-	width: 178px;
-	height: 178px;
-	line-height: 178px;
-	text-align: center;
-}
-.avatar {
-	width: 178px;
-	height: 178px;
-	display: block;
-} */
-</style>
-
-
-
-
-
-<style lang='less' scoped>
-.expertDiagnosis_referral_mainBtn_Box {
-	display: flex;
-	justify-content: space-around;
-
-	height: 85px;
-	.expertDiagnosis_referral_mainBtn {
-		// border: 1px solid #000;
-		border-radius: 5px;
-		// width: 32%;
-		// width: 430px;
-		width: 500px;
-		display: flex;
-		justify-content: space-between;
-		padding: 15px 0 15px 0;
-		background: #fff;
-
-		.expertDiagnosis_referral_mainBtnBox {
-			display: flex;
-			margin: 0 0 0 35px;
-			// border: 1px solid #000;
-
-			.expertDiagnosis_referral_mainBtn_img {
-				width: 51px;
-				height: 55px;
-			}
-
-			.expertDiagnosis_referral_mainBtn_centreBox {
-				margin: 0 0 0 12px;
-				// border: 1px solid #000;
-				line-height: 22px;
-
-				.expertDiagnosis_referral_mainBtn_centreBox_tlt {
-					font-size: 15px;
-					font-weight: 550;
-				}
-				.expertDiagnosis_referral_mainBtn_centreBox_introduce {
-					font-size: 14px;
-					font-weight: 550;
-					color: #adadad;
-				}
-			}
-		}
-
-		.expertDiagnosis_referral_mainBtn_right {
-			margin: 0 35px 0 0;
-			// border: 1px solid #000;
-			.expertDiagnosis_referral_mainBtn_rightNum {
-				font-size: 42px;
-				color: #9a9a9a;
-				.expertDiagnosis_referral_mainBtn_rightNum_unit {
-					font-size: 15px;
-				}
-			}
-		}
-	}
-}
-
-// 测试上传
-.avatar-uploader .el-upload {
-	border: 1px dashed #d9d9d9;
-	border-radius: 6px;
-	cursor: pointer;
-	position: relative;
-	overflow: hidden;
-}
-.avatar-uploader .el-upload:hover {
-	border-color: #409eff;
-}
-.avatar-uploader-icon {
-	font-size: 28px;
-	color: #8c939d;
-	width: 178px;
-	height: 178px;
-	line-height: 178px;
-	text-align: center;
-}
-.avatar {
-	width: 178px;
-	height: 178px;
-	display: block;
-}
-// 测试上传
-
-.primary {
-	// box-shadow: -3px 8px 21px -6px #7df1e1,
-	// 	50px 0 48px 34px rgba(255, 255, 255, 0.5);
-	box-shadow: 0px 1px 12px 3px #7df1e1,
-		50px 0 48px 34px rgba(255, 255, 255, 0.5);
-}
-
-.expertDiagnosis_referral_mainBtn_box {
-	width: 100%;
-	margin: 20px auto;
-
-	//合作单位
-	.expertDiagnosis_referral_units {
-		.expertDiagnosis_referral_units_tlt {
-			display: flex;
-			justify-content: space-between;
-			.expertDiagnosis_referral_units_img {
-				width: 18px;
-				height: 19px;
-			}
-			.expertDiagnosis_referral_units_tltTxt {
-				color: #6b6b6b;
-				font-size: 17px;
-				font-weight: 550;
-				vertical-align: top;
-				margin-left: 5px;
-			}
-
-			.expertDiagnosis_referral_units_search {
-				width: 15%;
-			}
-		}
-		//列表
-		.expertDiagnosis_referral_units_ul {
-			// border: 1px solid #000;
-			width: 100%;
-			margin: 20px 0 0 0;
-			display: flex;
-			flex-wrap: wrap;
-
-			.expertDiagnosis_referral_units_li {
-				// border: 1px solid rgb(221, 37, 37);
-				width: 30%;
-				position: relative;
-				// border: 1px solid rgb(19, 143, 143);
-				border-radius: 10px;
-				background: #fff;
-				margin: 15px 0 0 40px;
-				// 图片
-				.expertDiagnosis_referral_units_liImg {
-					position: absolute;
-					left: -9px;
-					top: -7px;
-				}
-				// 内容
-				.expertDiagnosis_referral_units_liBox {
-					width: 80%;
-					height: 140px;
-					margin: 39px 0 39px 47px;
-					// border: 1px solid #000;
-					display: flex;
-					// 左
-					.expertDiagnosis_referral_units_liLeft {
-						width: 35%;
-
-						.expertDiagnosis_referral_units_liLeft_img {
-							height: 100%;
-							border: 1px solid rgb(192, 192, 192);
-						}
-					}
-					// 右
-					.expertDiagnosis_referral_units_liRight {
-						// border: 1px solid #0000;
-						width: 60%;
-						margin: 0 0 0 20px;
-						.expertDiagnosis_referral_units_liRight_H1 {
-							border-bottom: 2px solid #fbb53c;
-							// width: 40%;
-							font-size: 18px;
-							font-weight: 550;
-						}
-						.expertDiagnosis_referral_units_liRight_H2 {
-							font-size: 13px;
-							font-weight: 550;
-							line-height: 35px;
-						}
-						.expertDiagnosis_referral_units_liRight_details {
-							color: #a29f9f;
-							line-height: 20px;
-							font-weight: 550;
-						}
-					}
-				}
-			}
-		}
-
-		//暂无数据
-		.expertDiagnosis_referral_units_not {
-			width: 272px;
-			margin: 0 auto;
-			.expertDiagnosis_referral_units_notImg {
-			}
-		}
-	}
-}
-</style>

+ 0 - 519
src/pages/expertDiagnosis/expertWriteBack/expertWriteBack.vue

@@ -1,519 +0,0 @@
-<!--  -->
-<template>
-	<div class>
-		<el-breadcrumb separator-class="el-icon-arrow-right">
-			<el-breadcrumb-item>专家诊断</el-breadcrumb-item>
-			<el-breadcrumb-item>专家回复</el-breadcrumb-item>
-		</el-breadcrumb>
-
-		<!-- 补充审核 -->
-		<div>
-			<!-- <div class="expertDiagnosis_referral_mainBtn_Box" :style="'height:' + fullHeight + 'px'"> -->
-			<div class="expertDiagnosis_referral_mainBtn_Box">
-				<!-- 标题 -->
-				<div class="expertDiagnosis_recognition_main_tlt">
-					<div style="line-height: 36px">专家回复</div>
-				</div>
-
-				<!-- 内容 -->
-				<ul class="expertDiagnosis_recognition_main_ul" v-if="replyShow">
-					<li
-						class="expertDiagnosis_recognition_main_li"
-						v-for="(item, index) in this.supplementArr"
-						:key="index"
-					>
-						<!-- 头像以及详情描述 -->
-						<div class="expertDiagnosis_recognition_mainLi_box">
-							<div class id="viewerDom" v-viewer>
-								<img :src="'api/' + item.img_urls" alt class="expertDiagnosis_recognition_mainLi_box_img" />
-							</div>
-
-							<div class="expertDiagnosis_recognition_mainLi_box1">
-								<div class="expertDiagnosis_recognition_mainLi_box1_name">
-									{{item.user}}
-									<span class="expertDiagnosis_recognition_mainLi_box_time">{{item.adtime}}</span>
-								</div>
-
-								<div class="expertDiagnosis_recognition_mainLi_box_details">
-									<span class="expertDiagnosis_recognition_mainLi_box_detailsTxt">补充内容:</span>
-									{{item.content}}
-								</div>
-							</div>
-						</div>
-
-						<!-- 操作按钮 -->
-						<div class="expertDiagnosis_recognition_mainLi_btn">
-							<el-button size="mini" style="background: #17bb88;color: #fff" @click="examine(item.id)">回复</el-button>
-						</div>
-					</li>
-				</ul>
-
-				<!-- 暂无数据 -->
-				<div class="expertDiagnosis_referral_units_not" v-else>
-					<img
-						src="@/assets/images/expertDiagnosis/zanwu.png"
-						alt
-						class="expertDiagnosis_referral_units_notImg"
-					/>
-				</div>
-
-				<!-- 分页 -->
-				<el-pagination
-					v-if="replyShow"
-					background
-					@current-change="pageData($event)"
-					layout="prev, pager, next"
-					:total="this.nums"
-					:page-size="5"
-					:current-page="page"
-				></el-pagination>
-
-				<!-- 弹框 -->
-				<el-dialog title="病虫害档案" :visible.sync="dialogFormVisible">
-					<el-form :model="form">
-						<el-form-item label="专家回复">
-							<el-input
-								v-model="form.major"
-								type="textarea"
-								show-word-limit
-								:rows="2"
-								auto-complete="off"
-								maxlength="300"
-							></el-input>
-						</el-form-item>
-					</el-form>
-					<div slot="footer" class="dialog-footer">
-						<el-button @click="dialogFormVisible = false">取 消</el-button>
-						<el-button type="primary" @click="dialogFormVisible = false, confirmData()">确 定</el-button>
-					</div>
-				</el-dialog>
-			</div>
-		</div>
-	</div>
-</template>
-
-<script>
-import '@/plugin/flexible.js'
-export default {
-	components: {},
-	data() {
-		//这里存放数据
-		return {
-			fullHeight: document.documentElement.clientHeight, //自适应高度
-			dialogFormVisible: false, //弹框是否显示
-			supplementArr: [], //用户补充列表
-			input1: '', //搜索
-			dropdownData: '请选择', //下拉框
-			nums: 0, //总数
-			dialogVisible: false, //审核时弹出的弹框
-			codeVal: '', //区别
-			idVal: '', //数据id
-			txtVal: '', //弹框文字提示
-			form: {
-				major: '',
-				id: ''
-			},
-			replyShow: true, //回复列表显示
-			page: 1
-		}
-	},
-	//监听属性 类似于data概念
-	computed: {},
-	//监控data中的数据变化
-	watch: {
-		fullHeight(val) {
-			//监控浏览器高度变化
-			if (!this.timer) {
-				this.fullHeight = val
-				this.timer = true
-				let that = this
-				setTimeout(function () {
-					//防止过度调用监测事件,导致卡顿
-					that.timer = false
-				}, 400)
-			}
-		},
-
-		//切换
-		displayType(val) {
-			if (val == 0) {
-				//意见反馈
-				this.opinionArr = [] //意见反馈列表
-				this.supplementArr = [] //用户补充列表
-				this.axiosList(1)
-			} else if (val == 1) {
-				//补充审核
-				this.opinionArr = [] //意见反馈列表
-				this.supplementArr = [] //用户补充列表
-				this.axiosList(2)
-			}
-		},
-
-		// 弹框
-		dialogFormVisible(val) {
-			if (val == false) {
-				this.form.major = ''
-			}
-		}
-	},
-	//方法集合
-	methods: {
-		//动态获取浏览器高度
-		get_boderHeight() {
-			const that = this
-			window.onresize = () => {
-				return (() => {
-					window.fullHeight = document.documentElement.clientHeight
-					that.fullHeight = window.fullHeight - 128
-					// console.log(that.fullHeight)
-				})()
-			}
-		},
-
-		// 导航点击切换事件
-		checkType(i) {
-			this.displayType = i
-		},
-
-		//分页点击
-		pageData(e) {
-			let that = this
-			let podatData = that.qs.stringify({
-				page: e
-			})
-			this.supplementArr = []
-			that
-				.$axios({
-					method: 'post',
-					url: 'api/api_gateway?method=pest.pests.pests_answers_list',
-					data: podatData
-				})
-				.then((res) => {
-					var data = res.data.data.data
-					var num = parseInt(res.data.data.nums)
-					this.nums = num
-					var supplementArr = that.supplementArr //用户补充
-
-					for (let i = 0; i < data.length; i++) {
-						var time = data[i].adtime
-						var date = new Date(parseInt(time) * 1000)
-							.toLocaleString()
-							.replace(/:\d{1,2}$/, ' ')
-						var dataA = data[i]
-						// 判断是否存在补充数据
-						if (data[i].content) {
-							dataA['adtime'] = date
-							supplementArr.push(dataA)
-						}
-					}
-				})
-				.catch((err) => {
-					console.log(err)
-				})
-		},
-
-		//查看按钮
-		examine(id) {
-			let that = this
-			that.dialogFormVisible = true
-			that.form.id = id
-		},
-
-		//回复确定
-		confirmData() {
-			let that = this
-			let postData = that.qs.stringify({
-				pest_answers_id: that.form.id,
-				idea: that.form.major
-			})
-			that
-				.$axios({
-					method: 'post',
-					url: 'api/api_gateway?method=pest.pests.pests_answers_reply',
-					data: postData
-				})
-				.then((res) => {
-					if (res.data.data.code == 200) {
-						this.$message({
-							message: '回复成功',
-							type: 'success',
-							duration: 1500
-						})
-					} else if (res.data.data.code == 400) {
-						this.$message.error({
-							message: '回复失败',
-							duration: 1500
-						})
-					}
-					console.log(res.data)
-				})
-				.catch((err) => {
-					console.log(err)
-				})
-		},
-
-		//获取用户补充、意见反馈的列表数据
-		axiosList(page) {
-			let that = this
-			let podatData = that.qs.stringify({
-				page: page
-			})
-			that
-				.$axios({
-					method: 'post',
-					url: 'api/api_gateway?method=pest.pests.pests_answers_list',
-					data: podatData
-				})
-				.then((res) => {
-					if (res.data.data.nums == 0) {
-						that.replyShow = false
-					} else if (res.data.data.nums !== 0) {
-						;((res.data.data.data.nums == res.data.data.data.nums) ==
-							res.data.data.data.nums) ==
-							0
-						var data = res.data.data.data
-						var num = parseInt(res.data.data.nums)
-						this.nums = num
-						var supplementArr = that.supplementArr //用户补充
-
-						for (let i = 0; i < data.length; i++) {
-							var time = data[i].adtime
-							var date = new Date(parseInt(time) * 1000)
-								.toLocaleString()
-								.replace(/:\d{1,2}$/, ' ')
-							var dataA = data[i]
-							// 判断是否存在补充数据
-							if (data[i].content) {
-								dataA['adtime'] = date
-								supplementArr.push(dataA)
-							}
-						}
-					}
-				})
-				.catch((err) => {
-					console.log(err)
-				})
-		},
-
-		//弹框确定事件
-		addr() {
-			let that = this
-			var id = that.idVal
-			let postData = that.qs.stringify({
-				code: that.codeVal,
-				id: id
-			})
-			that
-				.$axios({
-					method: 'post',
-					url: 'api/api/api_gateway?method=pest.pests.pests_idea_review',
-					data: postData
-				})
-				.then((res) => {
-					if (res.data.data.codes == 200) {
-						if (that.codeVal == '1') {
-							//审核通过
-							this.$message({
-								message: '审核通过成功',
-								type: 'success',
-								duration: 1500
-							})
-						} else if (that.codeVal == '2') {
-							//审核驳回
-							this.$message({
-								message: '审核驳回成功',
-								type: 'success',
-								duration: 1500
-							})
-						}
-					} else if (res.data.data.codes == 400) {
-						if (that.codeVal == '1') {
-							//审核通过
-							this.$message.error({
-								message: '审核通过失败',
-								duration: 1500
-							})
-						} else if (that.codeVal == '2') {
-							//审核驳回
-							this.$message.error({
-								message: '审核驳回失败',
-								duration: 1500
-							})
-						}
-					}
-				})
-				.catch((err) => {
-					console.log(err)
-				})
-		},
-
-		// 图片放大
-		magnifyPhoto() {
-			//具体需要哪些配置可参照下表
-			const ViewerDom = document.querySelector('#viewerDom')
-			this.viewer = new Viewer(ViewerDom, {
-				initialViewIndex: 0,
-				button: true, //右上角关闭按钮
-				navbar: 2,
-				title: 0,
-				toolbar: 0,
-				keyboard: false,
-				ready: function (e) {
-					console.log(e.type)
-				},
-				show: function (e) {
-					console.log(e.type)
-				},
-				shown: function (e) {
-					console.log(e.type)
-				},
-				hide: function (e) {
-					console.log(e.type)
-				},
-				hidden: function (e) {
-					console.log(e.type)
-				},
-				view: function (e) {
-					console.log(e.type)
-				},
-				viewed: function (e) {
-					console.log(e.type)
-				},
-				zoom: function (e) {
-					console.log(e.type)
-				},
-				zoomed: function (e) {
-					console.log(e.type)
-				}
-			})
-		}
-	},
-	//生命周期 - 创建完成(可以访问当前this实例)
-	created() {},
-	//生命周期 - 挂载完成(可以访问DOM元素)
-	mounted() {
-		this.get_boderHeight() //自适应
-		this.axiosList(this.page) //获取用户补充、意见反馈的列表数据
-	}
-}
-</script>
-<style lang='less' scoped>
-// 切换按钮
-.primary {
-	background: #13a479 !important;
-	color: #fff !important;
-}
-
-.expertDiagnosis_referral_mainBtn_Box {
-	border-radius: 15px;
-	background: white;
-	border: 1px solid #fff;
-	height: 100%;
-	.expertDiagnosis_recognition_main_tlt {
-		border-left: 6px solid #17bb88;
-		padding: 0 0 0 20px;
-		font-size: 18px;
-		font-weight: 550;
-		margin: 15px 0 0 0;
-		display: flex;
-		justify-content: space-between;
-		.el-dropdown {
-			margin: 10px 40px 0 0;
-		}
-	}
-	// 内容
-	.expertDiagnosis_recognition_main_ul {
-		width: 97%;
-		margin: 25px auto;
-		.expertDiagnosis_recognition_main_li {
-			margin: 25px 0 60px 0;
-
-			// 头像及详情描述
-			.expertDiagnosis_recognition_mainLi_box {
-				display: flex;
-				.expertDiagnosis_recognition_mainLi_box_img {
-					width: 65px;
-					height: 65px;
-					border-radius: 50px;
-				}
-				.expertDiagnosis_recognition_mainLi_box1 {
-					margin: 0 0 0 15px;
-					line-height: 30px;
-					.expertDiagnosis_recognition_mainLi_box1_name {
-						font-size: 16px;
-						font-weight: 550;
-						.expertDiagnosis_recognition_mainLi_box_time {
-							color: #b1b1b1;
-							font-size: 13px;
-							font-weight: 500;
-							margin: 0 0 0 20px;
-						}
-					}
-
-					.expertDiagnosis_recognition_mainLi_box_details {
-						color: #9a9a9a;
-						font-size: 15px;
-						font-weight: 550;
-						line-height: 22px;
-						.expertDiagnosis_recognition_mainLi_box_detailsTxt {
-						}
-					}
-				}
-			}
-		}
-
-		// 操作按钮
-		.expertDiagnosis_recognition_mainLi_btn {
-			float: right;
-			margin: 10px 41px 0 0;
-		}
-	}
-
-	// 弹框
-	.expertDiagnosis_recognition_main_popUp {
-		.expertDiagnosis_recognition_main_popUp_li {
-			display: flex;
-			margin: 0 0 30px 0;
-			// 害虫名称
-			.expertDiagnosis_recognition_main_popUp_li_name {
-				color: #000;
-				font-size: 16px;
-				font-weight: 550;
-			}
-			.expertDiagnosis_recognition_main_popUp_li_nameVal {
-				font-weight: 550;
-			}
-			// 害虫图片
-			.expertDiagnosis_recognition_main_popUp_li_img {
-				font-size: 16px;
-				font-weight: 550;
-				color: #000;
-			}
-			.expertDiagnosis_recognition_main_popUp_li_imgVal {
-				width: 160px;
-				height: 160px;
-				border-radius: 10px;
-			}
-			// 详细信息
-			.expertDiagnosis_recognition_main_popUp_li_details {
-				width: 188px;
-				font-size: 16px;
-				font-weight: 550;
-				color: #000;
-			}
-			.expertDiagnosis_recognition_main_popUp_li_detailsVal {
-				line-height: 30px;
-				font-weight: 550;
-			}
-		}
-	}
-}
-
-// 暂无数据
-.expertDiagnosis_referral_units_not {
-	width: 272px;
-	margin: 0 auto;
-	.expertDiagnosis_referral_units_notImg {
-	}
-}
-</style>

+ 0 - 812
src/pages/expertDiagnosis/picRec/PicRec.vue

@@ -1,812 +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="expertDiagnosis_recognition_main"
-			:style="'height:' + fullHeight + 'px'"
-			v-loading="loading"
-		> -->
-		<div class="expertDiagnosis_recognition_main" v-loading="loading">
-			<!-- 标题 -->
-			<div class="expertDiagnosis_recognition_main_tlt">病虫害识别</div>
-
-			<!-- 图片上传 -->
-			<div class="expertDiagnosis_recognition_main_uploading">
-				<!-- 标题 -->
-				<div class="expertDiagnosis_recognition_uploading_tlt">图片上传:</div>
-				<!-- 上传 -->
-				<el-upload
-					class="upload-demo"
-					ref="upload"
-					:http-request="ImgUploadSectionFile"
-					:with-credentials="true"
-					:auto-upload="false"
-					accept=".png, .jpg, .gif, .svg"
-					action
-					:on-change="handleChange"
-					list-type="list"
-					:file-list="fileList"
-					multiple
-					:show-file-list="false"
-				>
-					<!-- <el-button slot="trigger" type="primary">选取图片</el-button> -->
-
-					<img
-						v-if="saleAfterForm.imageUrl"
-						:src="saleAfterForm.imageUrl"
-						class="avatar"
-					/>
-					<i v-else class="el-icon-plus avatar-uploader-icon"></i>
-				</el-upload>
-
-				<!-- 按钮 -->
-				<div class="expertDiagnosis_recognition_uploading_Btn" v-show="btnShow">
-					<div>
-						<el-button type="success" size="small" @click="submitUploadPlant"
-							>病害识别</el-button
-						>
-					</div>
-					<div>
-						<el-button type="success" size="small" @click="submitUploadInsect"
-							>虫害识别</el-button
-						>
-					</div>
-				</div>
-			</div>
-
-			<!-- 小百科 -->
-			<div
-				class="expertDiagnosis_recognition_main_cyclopedia"
-				v-show="cyclopediaShow"
-			>
-				<div class="expertDiagnosis_recognition_main_cyclopedia_box">
-					<!-- 标题 -->
-					<div class="expertDiagnosis_recognition_cyclopedia_tlt">小百科:</div>
-
-					<!-- 图片 -->
-					<div
-						class="expertDiagnosis_recognition_cyclopedia_picture"
-						id="viewerDom"
-						v-viewer
-					>
-						<img
-							@error="errImg"
-							:src="this.imgData"
-							class="expertDiagnosis_recognition_cyclopedia_img"
-						/>
-					</div>
-
-					<!-- 科目和名称 -->
-					<div class="expertDiagnosis_recognition_main_courseName">
-						<span class="expertDiagnosis_recognition_main_name">{{
-							this.tltData
-						}}</span>
-						<!-- <span class="expertDiagnosis_recognition_main_course">鳞翅目 天蚕蛾</span> -->
-					</div>
-				</div>
-
-				<!-- 识别后的病虫害详情 -->
-				<ul class="expertDiagnosis_recognition_main_details_ul">
-					<li
-						class="expertDiagnosis_recognition_main_details"
-						v-for="item in this.msg"
-						:key="item"
-					>
-						{{ item }}
-					</li>
-				</ul>
-			</div>
-
-			<!-- 操作 -->
-			<div
-				class="expertDiagnosis_recognition_main_operation"
-				v-show="cyclopediaShow"
-			>
-				<!-- 标题 -->
-				<div class="expertDiagnosis_recognition_operation_tlt">操作:</div>
-
-				<div class="expertDiagnosis_recognition_operation_Btn">
-					<el-button type="primary" @click="addEquipment">意见反馈</el-button>
-					<el-button type="warning" @click="handelEdit()">我要补充</el-button>
-				</div>
-			</div>
-
-			<el-dialog :title="this.dialogStatus" :visible.sync="dialogFormVisible">
-				<el-form :model="form">
-					<el-form-item :label="this.dialogStatus">
-						<el-input
-							v-model="form.major"
-							type="textarea"
-							show-word-limit
-							:rows="2"
-							auto-complete="off"
-							maxlength="300"
-						></el-input>
-					</el-form-item>
-				</el-form>
-				<div slot="footer" class="dialog-footer">
-					<el-button @click="dialogFormVisible = false">取 消</el-button>
-					<el-button
-						type="primary"
-						@click=";(dialogFormVisible = false), confirmData()"
-						>确 定</el-button
-					>
-				</div>
-			</el-dialog>
-
-			<!-- 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>
-		</div>
-
-		<!-- 测试上传专家数据接口 -->
-		<!-- <button @click="zhuanjiaData()">上传</button> -->
-		<!-- 测试上传专家数据接口 -->
-	</div>
-</template>
-
-<script>
-//自适应
-import '@/plugin/flexible.js'
-
-export default {
-	components: {},
-	data() {
-		return {
-			fileList: [],
-			imgData: '', //识别出的图片
-			articleData: '', //识别出的病虫害详情-未处理的
-			msg: '', //识别出的病虫害名称-处理过的
-			tltData: '', //识别出的病虫害名称-未处理的
-			cyclopediaShow: false, //小百科显示
-			fullHeight: document.documentElement.clientHeight,
-			identifying: '', //识别的虫害还是病害标识
-			dialogFormVisible: false, //弹框是否显示
-			//弹框标题
-			dialogStatus: '',
-			form: {
-				major: ''
-			},
-			repositoryData: '', //判断该条数据是否在知识库中ID
-			// 剪裁图片
-			loading: false,
-			cropperVisible: false,
-			// 裁剪组件的基础配置option
-			option: {
-				img: null,
-				size: 1,
-				full: false,
-				outputType: 'png',
-				canMove: true,
-				fixed: true,
-				// fixedNumber: [16, 9],
-				fixedNumber: [7, 6],
-				fixedBox: false,
-				original: false,
-				canMoveBox: true,
-				autoCrop: true,
-				// 只有自动截图开启 宽度高度才生效
-				autoCropWidth: 160,
-				autoCropHeight: 150,
-				centerBox: false,
-				high: true,
-				max: 99999
-			},
-			saleAfterForm: {
-				imageUrl: ''
-			},
-			btnShow: false, //区别病虫害按钮
-			loading: false //加载
-		}
-	},
-	computed: {},
-	watch: {
-		fullHeight(val) {
-			//监控浏览器高度变化
-			if (!this.timer) {
-				this.fullHeight = val
-				this.timer = true
-				let that = this
-				setTimeout(function () {
-					//防止过度调用监测事件,导致卡顿
-					that.timer = false
-				}, 400)
-			}
-		},
-
-		dialogFormVisible(val) {
-			if (val == false) {
-				this.form.major = ''
-			}
-		}
-	},
-	methods: {
-		// 测试上传专家数据接口
-		// zhuanjiaData() {
-		// 	var that = this
-		// 	var postData = that.qs.stringify({
-		// 		code: '3', //专家
-		// 		briefing: '河南省植保植检站研究员,河南省现代农业产业技术体系岗位专家。', //简介
-		// 		name: '于思勤研究员', //名称
-		// 		img_urls: 'big_photo/expert_photo/20200924110017.png', //图片路径
-		// 	})
-		// 	that.$axios({
-		// 		method: 'post',
-		// 		url: 'api/api_gateway?method=pest.pests.pests_expert_add',
-		// 		data: postData,
-		// 	}).then((res) => {
-		// 		console.log(res.data)
-		// 	}).catch((err) => {
-		// 		console.log(err)
-		// 	});
-		// },
-
-
-
-
-
-
-
-
-
-
-		// 列表图片加载失败
-		errImg(e) {
-			e.target.src = require('@/assets/images/expertDiagnosis/ku/noData.jpg')
-		},
-
-		//动态获取浏览器高度
-		get_boderHeight() {
-			const that = this
-			window.onresize = () => {
-				return (() => {
-					window.fullHeight = document.documentElement.clientHeight
-					that.fullHeight = window.fullHeight - 128
-					console.log(that.fullHeight)
-				})()
-			}
-		},
-
-		// 测试上传专家介绍图片数据
-		// ImgUploadSectionFile(param) {
-		// 	let that = this
-		// 	// let formData = new FormData() //formdata格式
-		// 	// formData.append('img_file', param.file)
-		// 	// 判断当前是虫害还是病害 identifying == 1 是虫害 / identifying == 0 是病害
-		// 	if (that.identifying == '0') {
-		// 		//病害
-			
-		// 	} else if (that.identifying == '1') {
-		// 		//虫害
-		// 		let formData = new FormData() //formdata格式
-		// 		formData.append('img_file', param.file)
-		// 		that
-		// 			.$axios({
-		// 				method: 'post',
-		// 				url: 'api/api_gateway?method=pest.pests.pests_expert_img',
-		// 				data: formData
-		// 			})
-		// 			.then((res) => {
-		// 				console.log(res.data)
-		// 			})
-		// 			.catch((err) => {
-		// 				console.log(err)
-		// 			})
-		// 	}
-		// },
-
-		//图片上传
-		ImgUploadSectionFile(param) {
-			let that = this
-			// let formData = new FormData() //formdata格式
-			// formData.append('img_file', param.file)
-			// 判断当前是虫害还是病害 identifying == 1 是虫害 / identifying == 0 是病害
-			if (that.identifying == '0') {
-				//病害
-				let formData = new FormData() //formdata格式
-				formData.append('imageFile', param.file)
-				formData.append('imageType', '2')
-				formData.append('uniqueKey', '84e6eb40f3a616dd14b1fefc75425006')
-				formData.append('username', 'yunfei')
-				formData.append('gis', '118.279643#31.221456')
-				that
-					.$axios({
-						method: 'post',
-						url: 'ChinaSciencesGroup/recognizationSys/api/recognization',
-						data: formData
-					})
-					.then((res) => {
-						if (
-							res.data.msg === '识别失败_!' ||
-							res.data.msg === '' ||
-							res.data.data === null
-						) {
-							that.$message({
-								type: 'error',
-								message: '识别失败!',
-								duration: 1000
-							})
-						} else {
-							// var reData = JSON.parse(res.data.data)
-							var reData = res.data.data
-							that.cyclopediaShow = true
-							that.imgData = reData[0].img_urls //识别出的图片
-							that.articleData = reData[0].prevention //识别出的病虫害详情
-							that.tltData = reData[0].name //识别出的病虫害名称
-
-							// 判断传来的数据中文字详情是否有数据
-							if (reData[0].prevention !== '[防治方法] null') {
-								that.articleData = reData[0].prevention //详情
-								that.apply()
-							} else {
-								that.articleData = '暂无此类病害资料,努力更新中...'
-							}
-
-							//去判断该数据是否在知识库中
-							that.repository()
-						}
-						this.btnShow = false
-						this.loading = false
-						that.$refs.upload.clearFiles() //清空
-					})
-					.catch((err) => {
-						console.log(err)
-					})
-			} else if (that.identifying == '1') {
-				//虫害
-				let formData = new FormData() //formdata格式
-				formData.append('imageFile', param.file)
-				formData.append('imageType', '1')
-				formData.append('uniqueKey', '84e6eb40f3a616dd14b1fefc75425006')
-				formData.append('username', 'yunfei')
-				formData.append('gis', '118.279643#31.221456')
-				that
-					.$axios({
-						method: 'post',
-						url: 'ChinaSciencesGroup/recognizationSys/api/recognization',
-						data: formData
-					})
-					.then((res) => {
-						if (
-							res.data.msg === '识别失败_!' ||
-							res.data.msg === '' ||
-							res.data.data === null
-						) {
-							that.$message({
-								type: 'error',
-								message: '识别失败!',
-								duration: 1000
-							})
-						} else {
-							var reData = res.data.data
-							that.cyclopediaShow = true
-							that.imgData = reData[0].img_urls //识别出的图片
-							that.articleData = reData[0].prevention //识别出的病虫害详情
-							that.tltData = reData[0].name //识别出的病虫害名称
-
-							// 判断传来的数据中文字详情是否有数据
-							if (reData[0].prevention !== '[防治方法] null') {
-								that.articleData = reData[0].prevention //详情
-								that.apply()
-							} else {
-								that.articleData = '暂无此类病害资料,努力更新中...'
-							}
-							this.btnShow = false
-							this.loading = false
-							//去判断该数据是否在知识库中
-							that.repository()
-						}
-
-						that.$refs.upload.clearFiles() //清空
-					})
-					.catch((err) => {
-						console.log(err)
-					})
-
-				// this.$axios({
-				// 	method: 'post',
-				// 	url:
-				// 		'api/api_gateway?method=pest.pests.insect_discern',
-				// 	data: formData,
-				// 	headers: {
-				// 		'Content-Type': 'multipart/form-data'
-				// 	}
-				// })
-				// 	.then((res) => {
-				// 		if (
-				// 			res.data.msg === '识别失败_!' ||
-				// 			res.data.msg === '' ||
-				// 			res.data.data === null
-				// 		) {
-				// 			this.$message({
-				// 				type: 'error',
-				// 				message: '识别失败!',
-				// 				duration: 1000
-				// 			})
-				// 		} else {
-				// 			var reData = JSON.parse(res.data.data)
-				// 			this.cyclopediaShow = true
-				// 			this.imgData = reData.data[0].img_urls //识别出的图片
-				// 			this.articleData = reData.data[0].prevention //识别出的病虫害详情
-				// 			this.tltData = reData.data[0].name //识别出的病虫害名称
-
-				// 			// 判断传来的数据中文字详情是否有数据
-				// 			if (reData.data[0].prevention !== '[防治方法] null') {
-				// 				this.articleData = reData.data[0].prevention //详情
-				// 				this.apply()
-				// 			} else {
-				// 				this.articleData = '暂无此类害虫资料,努力更新中...'
-				// 			}
-				// 			//去判断该数据是否在知识库中
-				// 			this.repository()
-				// 		}
-
-				// 		this.$refs.upload.clearFiles() //清空
-				// 	})
-				// 	.catch((err) => {
-				// 		console.log(err)
-				// 	})
-			}
-		},
-
-		handleChange(file, fileList) {
-			if (!/\.(gif|jpg|jpeg|png|bmp|GIF|JPG|PNG)$/.test(file.raw.name)) {
-				alert('图片类型必须是.gif,jpeg,jpg,png,bmp中的一种')
-				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]))
-				} else {
-					data = e.target.result
-				}
-				this.option.img = data
-			}
-			this.cropperVisible = true
-			reader.readAsArrayBuffer(file.raw)
-			this.fileList = fileList
-		},
-		cropperFinish() {
-			this.$refs.cropper.getCropData((data) => {
-				this.saleAfterForm.imageUrl = data
-				this.cropperVisible = false
-				this.btnShow = true
-			})
-		},
-		imgLoad(msg) {
-			// console.log('imgLoad')
-			// console.log(msg)
-		},
-		// 实时预览函数
-		realTime(data) {
-			// console.log(data)
-		},
-		cropMoving(data) {
-			// console.log(99899)
-			// console.log(data, '截图框当前坐标')
-		},
-
-		//点击触发上传-虫害
-		submitUploadInsect() {
-			this.identifying = '1' //虫害
-			this.loading = true
-			this.$refs.upload.submit()
-		},
-		// 点击触发上传-病害
-		submitUploadPlant() {
-			this.identifying = '0' //病害
-			this.loading = true
-			this.$refs.upload.submit()
-		},
-		// 切割识别出的病虫害详情
-		apply() {
-			let Adata = this.articleData
-			var a = Adata.replace(/]/g, ':')
-			let Bdata = new Array()
-			Bdata = a.split('[')
-			this.msg = Bdata
-			// console.log(this.msg)
-		},
-		//判断该条数据是否在知识库中
-		repository() {
-			var name = this.tltData //病虫害名称
-			let postData = this.qs.stringify({
-				pest_name: name
-			})
-			this.$axios({
-				method: 'post',
-				url: 'api/api_gateway?method=pest.pests.pests_contrast',
-				data: postData
-			})
-				.then((res) => {
-					//判断当前是否有值
-					if (res.data.data.codes == '200') {
-						//有值
-						this.repositoryData = res.data.data.id
-						console.log(res.data.data)
-					} else if (res.data.data.codes == '400') {
-						this.plantInsectData(res.data.data) //病虫害识别保存接口
-					}
-				})
-				.catch((err) => {
-					console.log(err)
-				})
-		},
-		// 病虫害识别保存接口
-		plantInsectData() {
-			var name = this.tltData
-			console.log(name)
-			var code = this.identifying
-			var img_urls = this.imgData
-			var prevention = this.articleData
-			var course = ''
-			let postData = this.qs.stringify({
-				name: name,
-				code: code, //虫害还是病害
-				course: course, //科目
-				img_urls: img_urls, //识别出的病虫害图片
-				prevention: prevention //防止方法
-			})
-			this.$axios({
-				method: 'post',
-				url: 'api/api_gateway?method=pest.pests.pests_save',
-				data: postData
-			})
-				.then((res) => {
-					// this.repository()
-				})
-				.catch((err) => {})
-		},
-
-		//意见反馈
-		addEquipment() {
-			//显示弹框
-			this.dialogFormVisible = true
-			//新增弹框标题
-			this.dialogStatus = '意见反馈'
-		},
-		//我要补充
-		handelEdit() {
-			//显示弹框
-			this.dialogFormVisible = true
-			//编辑弹框标题
-			this.dialogStatus = '我要补充'
-		},
-		//确定事件判断
-		confirmData() {
-			if (this.dialogStatus == '我要补充') {
-				this.supplement()
-			} else if (this.dialogStatus == '意见反馈') {
-				this.feedback()
-			}
-		},
-		//意见反馈接口调用
-		feedback() {
-			var postData = this.qs.stringify({
-				pest_id: this.repositoryData,
-				idea: this.form.major
-			})
-			this.$axios({
-				method: 'post',
-				url: 'api/api_gateway?method=pest.pests.pests_new_idea',
-				data: postData
-			})
-				.then((res) => {
-					if (res.data.data.code == '200') {
-						this.$message({
-							showClose: true,
-							message: '上传成功',
-							type: 'success',
-							duration: 1500
-						})
-					} else {
-						this.$message({
-							showClose: true,
-							message: '上传失败',
-							type: 'error',
-							duration: 1500
-						})
-					}
-				})
-				.catch((err) => {
-					this.$message({
-						showClose: true,
-						message: '上传失败',
-						type: 'error',
-						duration: 1500
-					})
-				})
-		},
-
-		//我要补充接口调用
-		supplement() {
-			var postData = this.qs.stringify({
-				pest_id: this.repositoryData,
-				countent: this.form.major
-			})
-			this.$axios({
-				method: 'post',
-				url: 'api/api_gateway?method=pest.pests.pests_new_data',
-				data: postData
-			})
-				.then((res) => {
-					if (res.data.data.code == '200') {
-						this.$message({
-							showClose: true,
-							message: '上传成功',
-							type: 'success',
-							duration: 1500
-						})
-					} else {
-						this.$message({
-							showClose: true,
-							message: '上传失败',
-							type: 'error',
-							duration: 1500
-						})
-					}
-				})
-				.catch((err) => {
-					this.$message({
-						showClose: true,
-						message: '上传失败',
-						type: 'error',
-						duration: 1500
-					})
-				})
-			console.log(this.form)
-		}
-	},
-	mounted() {
-		this.get_boderHeight()
-	}
-}
-</script>
-
-<style lang='less' scoped>
-.expertDiagnosis_recognition_main {
-	width: 100%;
-	height: 100%;
-	border: 1px solid #fff;
-	border-radius: 15px;
-	background-color: #fff;
-	.expertDiagnosis_recognition_main_tlt {
-		border-left: 6px solid #17bb88;
-		padding: 0 0 0 20px;
-		font-size: 18px;
-		font-weight: 550;
-		margin: 15px 0 0 0;
-	}
-	//图片上传
-	.expertDiagnosis_recognition_main_uploading {
-		display: flex;
-		width: 95%;
-		margin: 20px 0 0 25px;
-		.expertDiagnosis_recognition_uploading_tlt {
-			color: #757575;
-			font-weight: 550;
-			font-size: 15px;
-		}
-		.expertDiagnosis_recognition_uploading_Btn {
-			display: inline-table;
-			margin: 35px 0 0 15px;
-			padding: 30px 0 0 0;
-			button {
-				margin-bottom: 15px;
-			}
-		}
-	}
-
-	//小百科
-	.expertDiagnosis_recognition_main_cyclopedia {
-		width: 95%;
-		margin: 20px 0 0 25px;
-
-		.expertDiagnosis_recognition_main_cyclopedia_box {
-			display: flex;
-			.expertDiagnosis_recognition_cyclopedia_tlt {
-				color: #757575;
-				font-weight: 550;
-				font-size: 15px;
-			}
-			//图片
-			.expertDiagnosis_recognition_cyclopedia_picture {
-				width: 360px;
-				height: 185px;
-				margin: 0 0 0 15px;
-				.expertDiagnosis_recognition_cyclopedia_img {
-					border-radius: 15px;
-					width: 100%;
-					height: 100%;
-				}
-			}
-			//科目和名称
-			.expertDiagnosis_recognition_main_courseName {
-				display: inline-table;
-				margin: 160px 0 0 11px;
-				.expertDiagnosis_recognition_main_name {
-					color: #17bb89;
-					font-size: 18px;
-					font-weight: 550;
-					text-align: left;
-				}
-				.expertDiagnosis_recognition_main_course {
-					font-size: 13px;
-					color: #878787;
-					text-align: right;
-					padding-left: 15px;
-				}
-			}
-		}
-
-		//识别后的病虫害详情
-		.expertDiagnosis_recognition_main_details_ul {
-			margin: 60px 0 0 0;
-			// margin: 96px 0 0 0;
-			.expertDiagnosis_recognition_main_details {
-				margin: 15px 0 25px 75px;
-				width: 92%;
-				text-indent: 20px;
-				line-height: 15px;
-				color: #888888;
-				font-size: 13px;
-			}
-		}
-	}
-
-	// 操作
-	.expertDiagnosis_recognition_main_operation {
-		display: flex;
-		width: 95%;
-		margin: 10px 0 45px 26px;
-		.expertDiagnosis_recognition_operation_tlt {
-			color: #757575;
-			font-weight: 550;
-			font-size: 15px;
-		}
-		.expertDiagnosis_recognition_operation_Btn {
-			margin: 0 0 0 28px;
-		}
-	}
-}
-</style>

+ 0 - 344
src/pages/expertDiagnosis/posts/PostDetail.vue

@@ -1,344 +0,0 @@
-<template>
-	<div>
-		<el-breadcrumb separator-class="el-icon-arrow-right">
-			<el-breadcrumb-item>专家诊断系统</el-breadcrumb-item>
-			<el-breadcrumb-item :to="{ path: '/index/expertPostList' }"
-				>帖子列表</el-breadcrumb-item
-			>
-			<el-breadcrumb-item>帖子详情</el-breadcrumb-item>
-		</el-breadcrumb>
-		<el-card class="box-card">
-			<div slot="header" class="clearfix">
-				<span
-					><i
-						class="tit_icon"
-						:style="{ backgroundImage: 'url(' + icon01 + ')' }"
-					></i
-					>帖子</span
-				>
-				<el-button
-					style="float: right"
-					size="mini"
-					type="primary"
-					@click="answerFun"
-					>我要回答</el-button
-				>
-			</div>
-			<div class="item">
-				<div class="tit">
-					<i
-						class="tit_icon"
-						v-if="obj.heat == 1"
-						:style="{ backgroundImage: 'url(' + icon02 + ')' }"
-					></i
-					>{{ obj.title }}
-				</div>
-				<div class="con" v-html="obj.content"></div>
-				<!-- 判断是否关联识别解决 -->
-				<div class="detail" v-if="obj.pest_id">
-					<div class="img_box">
-						<img :src="pestInfo.img_urls" @error="errImg" />
-					</div>
-					<div class="content">
-						<p>害虫害科目 : {{ pestInfo.course }}</p>
-						<p>病虫害名字 : {{ pestInfo.name }}</p>
-						<p>病虫害区分 : {{ pestInfo.code == 1 ? '病害' : '虫害' }}</p>
-						<p>防治方法 : {{ pestInfo.prevention }}</p>
-					</div>
-				</div>
-			</div>
-			<div class="answer_item" v-for="item in commentList" :key="item.lower">
-				<div class="user_info">
-					<div class="img_box">
-						<template v-if="item.image">
-							<img :src="$host + item.image" @error="errImg" />
-						</template>
-						<template v-else>
-							<img src="@/assets/images/expertDiagnosis/img01.png" />
-						</template>
-					</div>
-					<div class="info">
-						<p class="name">
-							{{ item.username }} <span v-if="item.user_type == 1">置顶</span>
-						</p>
-						<p class="date">{{ (item.uptime * 1000) | formatTime }}</p>
-					</div>
-				</div>
-				<p class="content" v-html="item.content"></p>
-				<!-- 判断是否是当前用户发的评论 默认只可以删除本用户的评论-->
-				<span
-					class="del"
-					v-if="item.username == username"
-					@click="delCommont(item.lower)"
-					>删除</span
-				>
-			</div>
-			<el-pagination
-				background
-				layout="prev, pager, next"
-				:page-size="8"
-				:total="totalNum"
-				:current-page="page"
-				@current-change="changePage"
-			></el-pagination>
-		</el-card>
-		<!-- 我的回答 -->
-		<el-dialog
-			title="我的回答"
-			:visible.sync="answerDialogVisible"
-			@close="AddDialogClosed"
-			width="50%"
-		>
-			<editor :tinymceHtml="answerCon" @inp="inp($event)"></editor>
-			<div style="margin-top: 10px">
-				<el-button type="primary" size="mini" @click="answerSubm()"
-					>发布</el-button
-				>
-				<el-button size="mini" @click="answerDialogVisible = false"
-					>取消</el-button
-				>
-			</div>
-		</el-dialog>
-	</div>
-</template>
-
-<script>
-// 引入tinymce富文本编辑器组件
-import Editor from '@/components/editor/Editor'
-export default {
-	data() {
-		return {
-			icon01: require('@/assets/images/expertDiagnosis/1.png'),
-			icon02: require('@/assets/images/expertDiagnosis/6.png'),
-			answerDialogVisible: false,
-			answerCon: '',
-			page: 1,
-			totalNum: null,
-			obj: JSON.parse(this.$route.query.item), //帖子的详情
-			pestInfo: {}, //识别结果信息,针对识别结果的发帖才会有
-			commentList: [] //评论列表
-		}
-	},
-	computed: {
-		username() {
-			return localStorage.getItem('username')
-		}
-	},
-	mounted() {
-		this.getAnswerList() //帖子回复列表
-		this.getPestInfo() //识别结果
-	},
-	methods: {
-		answerSubm() {
-			this.$axios({
-				method: 'POST',
-				url: '/api/api_gateway?method=pest.pests.pests_new_idea',
-				data: this.qs.stringify({
-					lower: this.obj.lower,
-					content: this.answerCon
-				})
-			}).then((res) => {
-				if (res.data.message == '') {
-					this.answerDialogVisible = false
-					this.getAnswerList() //调用评论列表
-				}
-			})
-		},
-		answerFun() {
-			this.answerDialogVisible = true
-		},
-		inp(el) {
-			this.answerCon = el.sunHtml
-		},
-		changePage(val) {
-			this.page = val
-		},
-		getAnswerList() {
-			this.$axios({
-				method: 'POST',
-				url: '/api/api_gateway?method=pest.pests.pests_answers_list',
-				data: this.qs.stringify({
-					page_size: 5,
-					page: this.page,
-					lower: this.obj.lower
-				})
-			}).then((res) => {
-				if (res.data.message == '') {
-					let data = res.data.data.data
-					this.commentList = data
-					this.totalNum = res.data.data.nums
-				}
-			})
-		},
-		getPestInfo() {
-			if (this.obj.pest_id != null) {
-				this.$axios({
-					method: 'POST',
-					url: '/api/api_gateway?method=pest.pests.pests_info',
-					data: this.qs.stringify({
-						pest_id: this.obj.pest_id
-					})
-				}).then((res) => {
-					if (res.data.message == '') {
-						if (res.data.message == '') {
-							this.pestInfo = res.data.data
-						}
-					}
-				})
-			}
-		},
-		AddDialogClosed() {
-			this.answerCon = ''
-		},
-		// 列表图片加载失败
-		errImg(e) {
-			e.target.src = require('@/assets/images/expertDiagnosis/ku/noData.jpg')
-		},
-		delCommont(lower) {
-			this.$confirm('确定删除这条评论么?', '信息', {
-				confirmButtonText: '确定',
-				cancelButtonText: '取消',
-				type: 'warning'
-			})
-				.then(() => {
-					this.$axios({
-						method: 'POST',
-						url: '/api/api_gateway?method=pest.pests.del_pests_card',
-						data: this.qs.stringify({
-							lower,
-							card: 2 //1 帖子   2  评论
-						})
-					}).then((res) => {
-						if (res.data.message == '') {
-							this.$message({
-								type: 'success',
-								message: '删除成功!'
-							})
-							this.getAnswerList()
-						} else {
-							this.$message({
-								type: 'error',
-								message: '删除失败!'
-							})
-						}
-					})
-				})
-				.catch(() => {
-					this.$message({
-						type: 'info',
-						message: '取消删除!'
-					})
-				})
-		}
-	},
-	components: {
-		Editor
-	}
-}
-</script>
-
-<style lang='less' scoped>
-.tit_icon {
-	display: inline-block;
-	width: 20px;
-	height: 16px;
-	background-size: auto 100%;
-	background-repeat: no-repeat;
-}
-.item {
-	padding: 10px 0;
-	border-bottom: 1px dashed #ddd;
-	.tit {
-		font-size: 16px;
-		color: #333;
-	}
-	.con {
-		font-size: 14px;
-		padding: 10px 0;
-		line-height: 20px;
-		color: #666;
-		/deep/img {
-			width: 80px !important;
-			max-height: 80px !important;
-		}
-	}
-	.detail {
-		display: flex;
-		padding: 20px 0;
-		color: #666;
-		.img_box {
-			width: 200px;
-			img {
-				width: 100%;
-			}
-		}
-		.content {
-			flex: 1;
-			font-size: 12px;
-			padding-left: 20px;
-			line-height: 20px;
-		}
-	}
-}
-.answer_item {
-	padding: 15px 0;
-	border-bottom: 1px solid #eee;
-	&::after {
-		content: '';
-		display: block;
-		clear: both;
-	}
-	.user_info {
-		display: flex;
-		justify-content: flex-start;
-		padding: 10px 0;
-		.img_box {
-			width: 50px;
-			height: 50px;
-			border-radius: 50%;
-			overflow: hidden;
-			img {
-				width: 100%;
-				height: 100%;
-			}
-		}
-		.info {
-			padding-left: 20px;
-			.name {
-				color: #333;
-				font-size: 14px;
-				span {
-					font-size: 12px;
-					background: #20b6fd;
-					color: #fff;
-					padding: 2px 12px;
-					border-radius: 4px;
-					margin-left: 5px;
-				}
-			}
-			.date {
-				font-size: 12px;
-				color: #666;
-				padding: 5px 0;
-			}
-		}
-	}
-	.content {
-		font-size: 14px;
-		line-height: 22px;
-		color: #666;
-		/deep/img {
-			width: 80px !important;
-			max-height: 80px !important;
-		}
-	}
-	.del {
-		color: red;
-		float: right;
-		cursor: pointer;
-	}
-	.del:hover {
-		text-decoration: underline;
-	}
-}
-</style>

+ 0 - 450
src/pages/expertDiagnosis/posts/PostList.vue

@@ -1,450 +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-row :gutter="10">
-			<el-col :xs="24" :sm="24" :md="18" :lg="18" :xl="18">
-				<el-card class="box-card">
-					<div slot="header" class="clearfix">
-						<span
-							><i
-								class="tit_icon"
-								:style="{ backgroundImage: 'url(' + icon01 + ')' }"
-							></i
-							>交流圈</span
-						>
-						<el-button
-							style="float: right"
-							size="mini"
-							type="warning"
-							@click="checkPost"
-							>{{ tit }}</el-button
-						>
-						<el-button
-							@click="postFun"
-							style="float: right; margin-right: 10px"
-							size="mini"
-							type="primary"
-							>我要发帖</el-button
-						>
-					</div>
-					<!-- 帖子 -->
-					<template v-if="postList.length > 0">
-						<div
-							class="item"
-							v-for="item in postList"
-							:key="item.lower"
-							@click="goDetail(item)"
-						>
-							<div class="img-box">
-								<template v-if="item.img_urls">
-									<img :src="$host + item.img_urls"/>
-								</template>
-								<template v-else>
-									<img src="@/assets/images/expertDiagnosis/img01.png" />
-								</template>
-							</div>
-							<div class="txt">
-								<!-- heat   1 精帖 0 普通帖 -->
-								<p class="tit">
-									<i
-										v-if="item.heat == 1"
-										class="tit_icon"
-										:style="{ backgroundImage: 'url(' + icon02 + ')' }"
-									></i
-									>{{ item.title }}
-								</p>
-								<div
-									class="con"
-									v-html="$options.filters.tinymceHtml(item.content)"
-								></div>
-							</div>
-							<div class="date">
-								<span>{{ item.num }}个回答</span> |
-								<span>{{ (item.adtime * 1000) | formatTime }}</span
-								><br />
-								<span
-									v-if="post == 1"
-									class="del"
-									@click.stop="delPost(item.lower)"
-									>删除</span
-								>
-							</div>
-						</div>
-						<el-pagination
-							background
-							layout="prev, pager, next"
-							:page-size="5"
-							:total="totalNum"
-							:current-page="page"
-							@current-change="changePage"
-						></el-pagination>
-					</template>
-					<template v-else>
-						<div style="width: 272px; margin: 0 auto">
-							<img src="@/assets/images/expertDiagnosis/zanwu.png" alt="" />
-						</div>
-					</template>
-				</el-card>
-			</el-col>
-			<el-col :xs="24" :sm="24" :md="6" :lg="6" :xl="6">
-				<el-card class="box-card">
-					<div slot="header" class="clearfix">
-						<span
-							><i
-								class="tit_icon"
-								:style="{ backgroundImage: 'url(' + icon02 + ')' }"
-							></i
-							>精帖</span
-						>
-					</div>
-					<div
-						@click="goDetail(item)"
-						class="topPost_item"
-						v-for="item in topPostList"
-						:key="item.lower"
-					>
-						<div class="img-box">
-							<template v-if="item.img_urls">
-								<img :src="$host + item.img_urls" @error="errImg"/>
-							</template>
-							<template v-else>
-								<img src="@/assets/images/expertDiagnosis/img01.png" />
-							</template>
-						</div>
-						<div class="content">
-							<p class="tit"><i class="el-icon-star-on"></i>{{ item.title }}</p>
-							<p
-								class="con"
-								v-html="$options.filters.tinymceHtml(item.content)"
-							></p>
-							<div class="date">
-								<span><i class="el-icon-chat-dot-round"></i>{{ item.num }}</span
-								><span
-									><i class="el-icon-time"></i
-									>{{ (item.adtime * 1000) | formatTime }}</span
-								>
-							</div>
-						</div>
-					</div>
-				</el-card>
-			</el-col>
-		</el-row>
-		<!-- 我要发帖弹框 -->
-		<el-dialog
-			title="发帖"
-			:visible.sync="postDialogVisible"
-			@close="AddDialogClosed"
-			width="50%"
-		>
-			<el-form
-				ref="postRef"
-				:model="postForm"
-				label-position="right"
-				label-width="80px"
-				:rules="postFormRules"
-			>
-				<el-form-item label="标题:" prop="tit">
-					<el-input v-model="postForm.tit"></el-input>
-				</el-form-item>
-				<el-form-item label="正文:" prop="content">
-					<editor :tinymceHtml="postForm.content" @inp="inp($event)"></editor>
-				</el-form-item>
-				<el-form-item class="handAddFormBtn">
-					<el-button type="primary" size="mini" @click="postSubm()"
-						>发布</el-button
-					>
-					<el-button size="mini" @click="postDialogVisible = false"
-						>取消</el-button
-					>
-				</el-form-item>
-			</el-form>
-		</el-dialog>
-	</div>
-</template>
-
-<script>
-// 引入tinymce富文本编辑器组件
-import Editor from '@/components/editor/Editor'
-export default {
-	data() {
-		return {
-			icon01: require('@/assets/images/expertDiagnosis/1.png'),
-			icon02: require('@/assets/images/expertDiagnosis/6.png'),
-			post: 0, //0代表所有帖子,1代表我的帖子
-			totalNum: null,
-			tit: '我的发帖',
-			page: 1,
-			postList: [],
-			postDialogVisible: false,
-			postForm: {
-				tit: '',
-				content: '',
-				img_urls: ''
-			},
-			topPostList: [], //精帖
-			postFormRules: {
-				tit: [{ required: true, message: '请输入标题', trigger: 'blur' }],
-				content: [
-					{ required: true, message: '请输入发帖内容', trigger: 'blur' }
-				]
-			}
-		}
-	},
-	created() {
-		this.getList('') //全部发帖
-		this.topPost() //精帖排行
-	},
-	filters: {
-		tinymceHtml(value) {
-			let str = value.replace(/<[^>]+>/g, '')
-			return str
-		}
-	},
-	methods: {
-		changePage(val) {
-			this.page = val
-			if (this.post == 0) {
-				this.getList('') //全部发帖
-			} else {
-				this.getList('my') //全部发帖
-			}
-		},
-		checkPost() {
-			this.post = this.post == 1 ? '0' : '1'
-			this.tit = this.tit == '我的发帖' ? '全部帖子' : '我的发帖'
-			if (this.post == 0) {
-				//所有帖子
-				this.getList('')
-			} else {
-				//我的帖子
-				this.getList('my')
-			}
-		},
-		inp(el) {
-			this.postForm.content = el.sunHtml
-			this.postForm.img_urls = el.imgSrc
-		},
-		postFun() {
-			this.postDialogVisible = true
-		},
-		postSubm() {
-			this.$refs.postRef.validate((valid) => {
-				if (!valid) {
-					return false
-				}
-				this.$axios({
-					method: 'POST',
-					url: '/api/api_gateway?method=pest.pests.pests_new_idea',
-					data: this.qs.stringify({
-						title: this.postForm.tit,
-						content: this.postForm.content,
-						img_urls: this.postForm.img_urls
-					})
-				}).then((res) => {
-					if (res.data.message == '') {
-						this.postDialogVisible = false
-						this.getList('') //全部发帖
-					}
-				})
-			})
-		},
-		goDetail(item) {
-			this.$router.push({
-				path: 'expertPostDetail',
-				query: { item: JSON.stringify(item) }
-			})
-		},
-		getList(screen) {
-			this.$axios({
-				method: 'POST',
-				url: '/api/api_gateway?method=pest.pests.pests_answers_list',
-				data: this.qs.stringify({
-					page_size: 5,
-					page: this.page,
-					screen //传screen有值,我的发帖,不传全部发帖
-				})
-			}).then((res) => {
-				if (res.data.message == '') {
-					let data = res.data.data.data
-					this.postList = data
-					this.totalNum = res.data.data.nums
-				}
-			})
-		},
-		// 列表图片加载失败
-		errImg(e) {
-			e.target.src = require('@/assets/images/expertDiagnosis/ku/noData.jpg')
-		},
-		delPost(lower) {
-			this.$confirm('确定删除这个帖子么?', '信息', {
-				confirmButtonText: '确定',
-				cancelButtonText: '取消',
-				type: 'warning'
-			})
-				.then(() => {
-					this.$axios({
-						method: 'POST',
-						url: '/api/api_gateway?method=pest.pests.del_pests_card',
-						data: this.qs.stringify({
-							lower,
-							card: 1 //1 帖子   2  评论
-						})
-					}).then((res) => {
-						if (res.data.message == '') {
-							this.$message({
-								type: 'success',
-								message: '删除成功!'
-							})
-							this.getList('my') //我的发帖
-							this.topPost()
-						} else {
-							this.$message({
-								type: 'error',
-								message: '删除失败!'
-							})
-						}
-					})
-				})
-				.catch(() => {
-					this.$message({
-						type: 'info',
-						message: '取消删除!'
-					})
-				})
-		},
-		topPost() {
-			this.$axios({
-				method: 'POST',
-				url: '/api/api_gateway?method=pest.pests.pests_heat_rank'
-			}).then((res) => {
-				if (res.data.message == '') {
-					this.topPostList = res.data.data.data
-				}
-			})
-		},
-		AddDialogClosed() {
-			this.postForm.tit = ''
-			this.postForm.content = ''
-		}
-	},
-	components: {
-		Editor
-	}
-}
-</script>
-
-<style lang='less' scoped>
-.item {
-	cursor: pointer;
-	padding-bottom: 20px;
-	display: flex;
-	justify-content: space-between;
-	.img-box {
-		width: 150px;
-		height: 120px;
-		overflow: hidden;
-		img {
-			width: 100%;
-			height: 100%;
-		}
-	}
-	.txt {
-		flex: 1;
-		padding: 0 20px;
-		.tit {
-			font-size: 16px;
-			color: #14a478;
-			padding: 5px 0;
-		}
-		.con {
-			font-size: 14px;
-			margin: 5px 0;
-			color: #666;
-			line-height: 20px;
-			height: 60px;
-			overflow: hidden;
-			// /deep/img {
-			// 	width: 50px !important;
-			// 	height: 50px !important;
-			// }
-		}
-	}
-	.date {
-		flex-grow: 0;
-		flex-shrink: 0;
-		padding-top: 5px;
-		font-size: 12px;
-		color: #888;
-		.del {
-			float: right;
-			color: red;
-			padding: 10px 0;
-			cursor: pointer;
-		}
-		.del:hover {
-			text-decoration: underline;
-		}
-	}
-}
-.topPost_item {
-	display: flex;
-	padding: 15px 0;
-	border-bottom: 1px solid #eee;
-	.img-box {
-		width: 30%;
-		img {
-			width: 100%;
-		}
-	}
-	.content {
-		flex: 1;
-		padding-left: 15px;
-		.tit {
-			font-size: 14px;
-			color: #333;
-			i {
-				font-size: 20px;
-				color: #ffd202;
-				margin-right: 10px;
-			}
-		}
-		.con {
-			padding: 5px 0;
-			color: #666;
-			line-height: 20px;
-			text-overflow: -o-ellipsis-lastline;
-			overflow: hidden;
-			text-overflow: ellipsis;
-			display: -webkit-box;
-			-webkit-line-clamp: 2;
-			line-clamp: 2;
-			-webkit-box-orient: vertical;
-			/deep/img {
-				width: 50px !important;
-				height: 50px !important;
-			}
-		}
-		.date {
-			text-align: right;
-			font-size: 12px;
-			color: #888;
-			span {
-				margin-left: 10px;
-				i {
-					margin-right: 2px;
-				}
-			}
-		}
-	}
-}
-.tit_icon {
-	display: inline-block;
-	width: 20px;
-	height: 16px;
-	background-size: auto 100%;
-	background-repeat: no-repeat;
-}
-</style>

文件差异内容过多而无法显示
+ 0 - 1004
src/pages/forecasting/bzy/Bzy.vue


+ 0 - 366
src/pages/forecasting/bzy/BzyPhotos.vue

@@ -1,366 +0,0 @@
-<template>
-	<div>
-		<el-breadcrumb separator-class="el-icon-arrow-right">
-			<el-breadcrumb-item>测报系统</el-breadcrumb-item>
-			<el-breadcrumb-item :to="{ path: '/index/bzy' }"
-				>孢子仪</el-breadcrumb-item
-			>
-			<el-breadcrumb-item>查看图片</el-breadcrumb-item>
-		</el-breadcrumb>
-		<el-button type="success" size="small" @click="goBackPage()"
-			><i class="el-icon--left el-icon-d-arrow-left"></i>返回</el-button
-		>
-		<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">
-						<template v-if="userType == 1">
-							<i
-								class="iconfont icon-shanchu"
-								v-show="delBtnState"
-								@click="delectImg(item.id)"
-							></i>
-							<el-checkbox
-								v-show="!delBtnState"
-								v-model="item.checked"
-							></el-checkbox>
-						</template>
-					</div>
-					<div class="photoImg">
-						<!-- 有的图片放到阿里云,有的放到了服务器 -->
-						<template v-if="item.addr.indexOf('http') != -1">
-							<img :src="item.addr" />
-						</template>
-						<template v-else>
-							<img :src="$host + item.addr" />
-						</template>
-					</div>
-					<div class="date" style="background: #fff">
-						{{ (item.addtime * 1000) | formatTime }}
-					</div>
-					<!-- <div class="photoCtrl">
-						<div @click="viewDes()">
-							<i class="iconfont icon-wendang"></i>
-							查看描述
-						</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,
-			device_id: this.$route.params.id,
-			d_id: this.$route.query.d_id,
-			photoList: [],
-			queryInfo: {
-				begin: '',
-				end: '',
-				page: 1
-			},
-			idList: [], //删除图片的地址数组
-			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.idList = this.photoList
-					.filter((item) => {
-						return item.checked == true
-					})
-					.map((item) => {
-						return item.id
-					})
-				if (this.idList.length == 0) {
-					this.$message.warning('请选择要删除的设备!')
-				} else {
-					this.delImgFun(this.idList)
-				}
-			}
-			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: 7,
-					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.device_id,
-					ret: 'list',
-					page: this.queryInfo.page,
-					page_number: 8,
-					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()
-		},
-		viewDes() {
-			this.$prompt('图片描述', '添加详情', {
-				confirmButtonText: '保存',
-				cancelButtonText: '取消'
-			})
-				.then(({ value }) => {})
-				.catch(() => {
-					this.$message({
-						type: 'info',
-						message: '取消输入'
-					})
-				})
-		},
-		delImgFun(idList) {
-			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.device_id,
-							addrlist: JSON.stringify(idList)
-						})
-					}).then((res) => {
-						if (res.data.message == '') {
-							this.$message({
-								type: 'success',
-								message: '删除成功!'
-							})
-							this.getPhoteList()
-						}
-					})
-				})
-				.catch(() => {
-					this.$message({
-						type: 'info',
-						message: '已取消删除'
-					})
-				})
-		},
-		delectImg(id) {
-			this.delImgFun([id])
-		},
-		//返回上一页
-		goBackPage() {
-			this.$router.go(-1)
-		}
-	}
-}
-</script>
-
-<style lang='less' scoped>
-.check-btns {
-	display: flex;
-	justify-content: space-between;
-	margin-top: 10px;
-	margin-bottom: 20px;
-	align-items: center;
-	.el-select {
-		width: 90px;
-	}
-}
-
-.photoItem {
-	position: relative;
-	border-radius: 10px;
-	overflow: hidden;
-	.photoInfo {
-		position: absolute;
-		top: 10px;
-		left: 10px;
-		right: 10px;
-		display: flex;
-		justify-content: space-between;
-		span {
-			color: #fff;
-		}
-		i {
-			cursor: pointer;
-			color: red;
-			display: none;
-		}
-	}
-	.photoImg {
-		height: 250px;
-		cursor: pointer;
-		img {
-			width: 100%;
-			height: 100%;
-		}
-	}
-	.date {
-		text-align: center;
-		font-size: 14px;
-		padding: 10px 0;
-	}
-	.photoCtrl {
-		background-color: #fff;
-		text-align: center;
-		line-height: 30px;
-		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 - 429
src/pages/forecasting/bzy/DataDetail.vue

@@ -1,429 +0,0 @@
-<template>
-	<div>
-		<el-breadcrumb separator-class="el-icon-arrow-right">
-			<el-breadcrumb-item>测报系统</el-breadcrumb-item>
-			<el-breadcrumb-item :to="{ path: '/index/bzy' }"
-				>孢子仪</el-breadcrumb-item
-			>
-			<el-breadcrumb-item>数据详情</el-breadcrumb-item>
-		</el-breadcrumb>
-		<el-button type="success" size="small" @click="goBackPage()"
-			><i class="el-icon--left el-icon-d-arrow-left"></i>返回</el-button
-		>
-		<div class="equipInfo">
-			<div class="detail">
-				<span>设备ID:{{ id }}</span>
-				<span>设备名称:无</span>
-				<span>位置:黑龙江省,鸡西市,鸡东县</span>
-				<span>已培养时间(h):0</span>
-			</div>
-			<DateSearch @dateChange="dateChange"></DateSearch>
-		</div>
-		<div class="ctrl-check">
-			<el-button type="primary" size="mini" @click="refresh">刷新</el-button>
-		</div>
-		<el-row :gutter="20">
-			<el-col :md="24" :lg="12">
-				<el-card class="box-card">
-					<div class="charts">
-						<highcharts :options="option1"></highcharts>
-					</div>
-				</el-card>
-			</el-col>
-			<el-col :md="24" :lg="12">
-				<el-card class="box-card">
-					<div class="charts">
-						<highcharts :options="option2"></highcharts>
-					</div>
-				</el-card>
-			</el-col>
-		</el-row>
-		<div class="dataTableSearch">
-			<el-button type="primary" size="mini">导出</el-button>
-		</div>
-		<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"
-					:width="setWidth(item)"
-				>
-					<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>
-</template>
-
-<script>
-import DateSearch from '@/components/DateSearch'
-export default {
-	data() {
-		return {
-			id: this.$route.params.e_id,
-			option1: {},
-			option2: {},
-			btnSelected: '',
-			timeRange: '',
-			lineTime: '',
-			tableHeadTxt: [
-				['设备开关', 'on_off'],
-				['环境温度(°C)', 'at'],
-				['环境湿度(%)', 'ah'],
-				['保温仓设定温度(°C)', 'set_temp'],
-				['保温仓当前温度(°C)', 'pre_temp'],
-				['电池状态', 'bat_sta'],
-				['雨控状态', 'rps'],
-				['摄像头状态', 'usb_sta'],
-				['电压(V)', 'v_bat'],
-				['海拔高度', 'alti'],
-				['信号强度', 'csq'],
-				['设备版本', 'dver'],
-				['上报时间', 'addtime']
-			],
-			queryInfo: {
-				begin: '',
-				end: '',
-				e_id: this.$route.params.e_id,
-				d_id: this.$route.params.d_id,
-				page: 1
-			},
-			// 表格数据
-			tableData: [],
-			total: 0
-		}
-	},
-	mounted() {
-		this.getChartDataList()
-		this.getHisDataList()
-	},
-	methods: {
-		//获取折线数据
-		getChartDataList() {
-			this.$axios({
-				method: 'POST',
-				url: '/api/api_gateway?method=forecast.worm_lamp.device_polyline_data',
-				data: this.qs.stringify({
-					device_type_id: 7,
-					d_id: this.queryInfo.d_id,
-					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: '保温仓温度(°C)',
-							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
-							}
-						],
-						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'
-										}
-									}
-								}
-							]
-						}
-					}
-					this.option2 = {
-						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[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: 7,
-					device_id: this.queryInfo.e_id,
-					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.addtime = this.formatTime(dht.addtime * 1000)
-							dht.on_off = dht.on_off == 0 ? '关' : '开'
-							dht.bat_sta = dht.bat_sta == 0 ? '正常' : '电量过低'
-							dht.rps = dht.rps == 0 ? '正常' : '雨控'
-							dht.usb_sta = dht.usb_sta == 0 ? '正常' : '异常' //摄像头状态
-							if (dht.lamp != undefined) {
-								if (dht.ws == 1) {
-									if (stat.lamp == 1) {
-										dht.blbs = '工作中'
-									} else if (dht.lux == 0) {
-										dht.blbs = 'N/A(未检测到传感器)'
-									} else {
-										dht.blbs = '异常'
-									}
-								} else {
-									dht.blbs = '关闭'
-								}
-							} else {
-								dht.blbs = '--'
-							}
-							this.tableData.push(dht)
-						}
-					}
-				}
-			})
-		},
-		dateChange(data) {
-			this.queryInfo.page = 1
-			this.queryInfo.begin = data.begin
-			this.queryInfo.end = data.end
-			this.getHisDataList()
-			this.getChartDataList()
-		},
-		changePage(val) {
-			this.queryInfo.page = val
-			this.getHisDataList()
-		},
-		setWidth(item) {
-			if (item[1] == 'addtime') {
-				return 180 + 'px'
-			}
-		},
-		refresh() {
-			this.$axios({
-				method: 'POST',
-				url: '/api/api_gateway?method=forecast.send_control.get_device_config',
-				data: this.qs.stringify({
-					device_type_id: 7,
-					d_id: this.queryInfo.d_id,
-					control_type: 'data'
-				})
-			}).then((res) => {
-				if (res.data.message=='') {
-					this.$message.success('刷新成功')
-				} else {
-					this.$message.err('刷新失败')
-				}
-			})
-		},
-		//返回上一页
-		goBackPage() {
-			this.$router.go(-1)
-		}
-	},
-	components: {
-		DateSearch
-	}
-}
-</script>
-
-<style lang='less' scoped>
-.equipInfo {
-	display: flex;
-	margin-top:10px;
-	margin-bottom: 8px;
-	justify-content: space-between;
-	.detail {
-		font-size: 14px;
-		color: #666;
-		span {
-			margin-right: 20px;
-		}
-	}
-}
-.dataTableSearch {
-	display: flex;
-	justify-content: space-between;
-	margin: 20px 0;
-}
-.el-input__inner {
-	width: 222px !important;
-}
-.ctrl-check {
-	margin-bottom: 20px;
-}
-</style>

+ 0 - 829
src/pages/forecasting/cbd/Cbd.vue

@@ -1,829 +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"
-			:displayType="displayType"
-			@fun2="getIDName"
-			@fun3="getIsOnline"
-		>
-			<template slot="search-box">
-				<template v-if="role == 'admin'">
-					<el-select
-						v-model="queryInfo.dver"
-						class="select01"
-						clearable
-						size="mini"
-						placeholder="请选择设备版本"
-						@change="searchChange()"
-					>
-						<el-option
-							v-for="item in dverGather"
-							:key="item.value"
-							:label="item.label"
-							:value="item.value"
-						></el-option>
-					</el-select>
-				</template>
-				<!-- <template v-if="role=='admin'">
-					<el-select
-						v-model="queryInfo.selectUser"
-						class="select01"
-						clearable
-						size="mini"
-						filterable
-						placeholder="请选择用户"
-						@change="searchChange()"
-					>
-						<el-option v-for="item in userList" :key="item.value" :label="item.label" :value="item.value"></el-option>
-					</el-select>
-				</template> -->
-			</template>
-		</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
-								v-show="userType == 1"
-								slot="set"
-								class="superOperate el-icon-setting"
-								@click="
-									equipOperation(item.d_id, item.device_id, item.device_name)
-								"
-							></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 class="onlineState">
-									<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, item.device_id, item.device_name)
-										"
-										>设备控制</el-button
-									>
-									<el-button
-										size="mini"
-										type="success"
-										@click="showTimeControlDialog(item.d_id,item.device_id,)"
-										>害虫统计</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 }}</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,
-										scope.row.device_id,
-										scope.row.device_name
-									)
-								"
-								>设备控制</el-button
-							>
-							<el-button
-								size="mini"
-								type="success"
-								@click="showTimeControlDialog(scope.row.d_id,scope.row.device_id)"
-								>害虫统计</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>
-		<!-- 暂无数据 -->
-		<div
-			class="expertDiagnosis_referral_units_not"
-			v-if="equipList.length <= 0 && displayType == 1"
-		>
-			<img
-				src="@/assets/images/expertDiagnosis/zanwu.png"
-				alt
-				class="expertDiagnosis_referral_units_notImg"
-			/>
-		</div>
-		<el-pagination
-			v-if="equipList.length > 0"
-			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="150px"
-				>
-					<el-form-item label="设备编号:">
-						<el-input disabled v-model="equipInfo.device_id"></el-input>
-					</el-form-item>
-					<el-form-item label="设备名称:" v-if="equipInfo.device_name">
-						<el-input disabled v-model="equipInfo.device_name"></el-input>
-					</el-form-item>
-					<el-form-item label="设备开关:" prop="ds">
-						<el-select v-model="equipContrlForm.ds">
-							<el-option label="开机" :value="1"></el-option>
-							<el-option label="关机" :value="0"></el-option>
-						</el-select>
-					</el-form-item>
-					<el-form-item label="工作模式:" prop="ws">
-						<el-select
-							v-model="ws"
-							placeholder="请选择工作模式"
-							@change="wsChange()"
-						>
-							<el-option label="节能" :value="0"></el-option>
-							<el-option label="常规" :value="1"></el-option>
-							<el-option label="加强" :value="2"></el-option>
-						</el-select>
-					</el-form-item>
-					<el-form-item label="定时模式:" prop="ts">
-						<el-select
-							v-model="equipContrlForm.ts"
-							placeholder="请选择定时模式"
-						>
-							<el-option label="光控" :value="0"></el-option>
-							<el-option label="时控" :value="1"></el-option>
-						</el-select>
-					</el-form-item>
-					<el-form-item v-if="equipContrlForm.ts == 1" label="开始结束时间:">
-						<el-col :span="11">
-							<el-time-select
-								placeholder="起始时间"
-								v-model="equipContrlForm.st"
-								:picker-options="{
-									start: '00:00',
-									step: '01:00',
-									end: '24:00'
-								}"
-							></el-time-select>
-						</el-col>
-						<el-col class="line" :span="2">-</el-col>
-						<el-col :span="11">
-							<el-time-select
-								placeholder="结束时间"
-								v-model="equipContrlForm.et"
-								:picker-options="{
-									start: '00:00',
-									step: '01:00',
-									end: '24:00'
-								}"
-							></el-time-select>
-						</el-col>
-					</el-form-item>
-					<el-form-item
-						v-if="equipContrlForm.ts != 1"
-						label="定时时长(h):"
-						prop="tt"
-					>
-						<div class="sliderParent">
-							<div class="block">
-								<el-slider
-									v-model="equipContrlForm.tt"
-									show-input
-									:min="1"
-									:max="10"
-								></el-slider>
-							</div>
-						</div>
-					</el-form-item>
-					<el-form-item label="落虫时间(min):" prop="collt">
-						<div class="sliderParent">
-							<div class="block">
-								<el-slider
-									v-model="equipContrlForm.collt"
-									show-input
-									:min="1"
-									:max="20"
-								></el-slider>
-							</div>
-						</div>
-					</el-form-item>
-					<el-form-item label="加热时间(min):" prop="htim">
-						<div class="sliderParent">
-							<div class="block">
-								<el-slider
-									v-model="equipContrlForm.htim"
-									show-input
-									:min="1"
-									:max="20"
-								></el-slider>
-							</div>
-						</div>
-					</el-form-item>
-					<el-form-item label="加热温度(℃):" prop="hst">
-						<div class="sliderParent">
-							<div class="block">
-								<el-slider
-									v-model="equipContrlForm.hst"
-									show-input
-									:min="75"
-									:max="120"
-								></el-slider>
-							</div>
-						</div>
-					</el-form-item>
-					<el-form-item label="高温保护阈值(℃):" prop="tph">
-						<div class="sliderParent">
-							<div class="block">
-								<el-slider
-									v-model="equipContrlForm.tph"
-									show-input
-									:min="50"
-									:max="70"
-								></el-slider>
-							</div>
-						</div>
-					</el-form-item>
-					<el-form-item label="低温保护阈值(℃):" prop="tpl">
-						<div class="sliderParent">
-							<div class="block">
-								<el-slider
-									v-model="equipContrlForm.tpl"
-									show-input
-									:min="1"
-									:max="10"
-								></el-slider>
-							</div>
-						</div>
-					</el-form-item>
-					<el-form-item label="数据上传间隔(min):" prop="datt">
-						<div class="sliderParent">
-							<div class="block">
-								<el-slider
-									v-model="equipContrlForm.datt"
-									:step="10"
-									show-input
-									:min="10"
-									:max="60"
-								></el-slider>
-							</div>
-						</div>
-					</el-form-item>
-					<el-form-item label="图片分辨率:" prop="imgres">
-						<el-select
-							v-model="equipContrlForm.imgres"
-							placeholder="请选择图片分辨率"
-						>
-							<el-option label="高" :value="0"></el-option>
-							<el-option label="中" :value="1"></el-option>
-							<el-option label="低" :value="2"></el-option>
-						</el-select>
-					</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="360px"
-		>
-			<div class="item">
-				<span>设备编号 : </span><span>{{ equipInfo.device_id }}</span>
-			</div>
-			<div class="item" v-if="equipInfo.device_name">
-				<span>设备名称 : </span><span>{{ equipInfo.device_name }}</span>
-			</div>
-			<div class="tit">联网模块</div>
-			<el-button
-				type="primary"
-				size="mini"
-				@click="equipBtnControl('dtu_update')"
-				>升级</el-button
-			>
-			<el-button
-				type="primary"
-				size="mini"
-				@click="equipBtnControl('dtu_reboot')"
-				>重启</el-button
-			>
-			<div class="tit">板子设置</div>
-			<el-row>
-				<el-button type="primary" size="mini">查看原始imei</el-button>
-				<el-button type="primary" size="mini">更改imei</el-button>
-			</el-row>
-			<div class="tit">强制操作</div>
-			<el-row>
-				<el-button
-					type="danger"
-					size="mini"
-					@click="equipBtnControl('takephoto')"
-					>拍照</el-button
-				>
-				<el-button type="danger" size="mini" @click="equipBtnControl('update')"
-					>升级</el-button
-				>
-				<el-button type="danger" size="mini" @click="equipBtnControl('reboot')"
-					>重启</el-button
-				>
-				<el-button
-					type="danger"
-					size="mini"
-					@click="equipBtnControl('open_shake')"
-					>震动开启</el-button
-				>
-				<el-button
-					type="danger"
-					size="mini"
-					@click="equipBtnControl('close_shake')"
-					>震动关闭</el-button
-				>
-			</el-row>
-		</el-dialog>
-	</div>
-</template>
-<script>
-import SearchBar from '@/components/SearchBar'
-import EquipItem from '@/components/EquipItem'
-export default {
-	data() {
-		return {
-			//图表和表格切换
-			displayType: '',
-			//设备列表
-			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: '',
-			ws: 0, //工作模式
-			equipInfo: {
-				//设备控制回显
-				device_id: '',
-				device_name: ''
-			},
-			equipContrlForm: {
-				st: '',
-				et: '',
-				ts: 0,
-				tt: null,
-				collt: null,
-				htim: null,
-				hst: null,
-				tph: null,
-				tpl: null,
-				datt: null,
-				imgres: 0,
-				ds:1
-			},
-			//参数
-			queryInfo: {
-				page: 1,
-				is_online: null,
-				dver: null,
-				selectUser: '',
-				f_id: '',
-				ename: ''
-			},
-			totalNum: 0,
-			//设备控制对话框
-			equipControlDialogVisible: false,
-			operationDialogVisible: false
-		}
-	},
-	created() {
-		this.displayType = String(localStorage.getItem('cbdListType') || '1')
-	},
-	mounted() {
-		this.getEquipList()
-	},
-	computed: {
-		userType: function () {
-			//获取用户类型
-			return sessionStorage.getItem('myuser_type')
-		}
-	},
-	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 = String(data)
-			localStorage.setItem('cbdListType', data)
-		},
-		//获取设备列表
-		getEquipList() {
-			this.$axios({
-				method: 'POST',
-				url: '/api/api_gateway?method=forecast.worm_lamp.lamp_list',
-				data: this.qs.stringify({
-					device_type_id: 3,
-					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({ path: `/index/cbdDataDetails/${e_id}/${d_id}` })
-		},
-		// 查看图片
-		viewPhotoDialog(id, d_id) {
-			this.device_id = id
-			this.$router.push({
-				path: `/index/cbdDataPhotos/${id}`,
-				query: { d_id: d_id }
-			})
-		},
-		//设备控制
-		EquipControl(d_id, device_id, device_name) {
-			this.d_id = d_id
-			this.equipInfo = { device_id, device_name }
-			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) => {
-				if (Object.keys(res.data.data).length > 0) {
-					let data = res.data.data
-					data.ds=data.ds?data.ds:null
-					data.st =
-						data.st && data.st < 10 ? '0' + data.st + ':00' : data.st + ':00'
-					data.et =
-						data.et && data.et < 10 ? '0' + data.et + ':00' : data.et + ':00'
-					this.equipContrlForm = data
-				}
-				this.equipControlDialogVisible = true
-			})
-		},
-		//设备控制提交
-		equipControlSubm() {
-			let newForm = Object.assign({}, this.equipContrlForm) //深拷贝
-			newForm.st =
-				newForm.st && newForm.st.slice(0, 2).charAt(0) != '0'
-					? newForm.st.slice(0, 2)
-					: newForm.st.slice(1, 2)
-			newForm.et =
-				newForm.et && newForm.et.slice(0, 2).charAt(0) != '0'
-					? newForm.et.slice(0, 2)
-					: newForm.et.slice(1, 2)
-			this.$axios({
-				method: 'POST',
-				url: '/api/api_gateway?method=forecast.send_control.device_control',
-				data: this.qs.stringify({
-					device_type_id: 3,
-					d_id: this.d_id,
-					config: JSON.stringify(newForm)
-				})
-			}).then((res) => {
-				if (res.data.message=='') {
-					this.$message.success('设备控制修改成功')
-				} else {
-					his.$message.error('设备控制修改失败')
-				}
-				this.equipControlDialogVisible = false
-			})
-		},
-		resetEquipControlDialogClosed() {
-			this.$refs.equipContrlRef.resetFields()
-			this.ws = 0
-		},
-		//害虫统计
-		showTimeControlDialog(d_id,id) {
-			this.device_id = id
-			this.$router.push(`/index/pestsStats/${d_id}/${id}`)
-		},
-		//设备控制->工作模式切换
-		wsChange() {
-			this.$confirm('确定修改工作模式?', '提示', {
-				confirmButtonText: '确定',
-				cancelButtonText: '取消',
-				type: 'warning'
-			})
-				.then(() => {
-					this.$axios({
-						method: 'POST',
-						url: '/api/api_gateway?method=forecast.send_control.device_control',
-						data: this.qs.stringify({
-							device_type_id: 3,
-							d_id: this.d_id,
-							work_type: this.ws
-						})
-					}).then((res) => {
-						if (res.data.message == '') {
-							this.$message({
-								type: 'success',
-								message: '修改成功!'
-							})
-						} else {
-							this.$message({
-								type: 'error',
-								message: res.data.message
-							})
-						}
-					})
-				})
-				.catch(() => {
-					this.$message({
-						type: 'info',
-						message: '已取消修改'
-					})
-				})
-		},
-		equipOperation(d_id, device_id, device_name) {
-			this.d_id = d_id
-			this.equipInfo = { device_id, device_name }
-			this.operationDialogVisible = true
-		},
-		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: 3,
-					d_id: this.d_id
-				})
-			}).then((res) => {
-				if (res.data.message == '') {
-					this.$message.success('指令下发成功!')
-				}
-			})
-		},
-
-		// 设备版本、用户筛选
-		searchChange() {
-			console.log(this.queryInfo.selectUser)
-			this.getEquipList()
-		}
-	},
-	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;
-	}
-}
-.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%;
-}
-// 暂无数据
-.expertDiagnosis_referral_units_not {
-	width: 272px;
-	margin: 0 auto;
-}
-.tit {
-	font-weight: 800;
-	margin: 15px 0 8px 0;
-}
-.item {
-	margin-bottom: 10px;
-}
-
-.onlineState {
-	margin: 0 3px 0 3px;
-}
-.onlineState .icon-diannao {
-	margin: 0 19px 0 -2px !important;
-}
-</style>

+ 0 - 908
src/pages/forecasting/cbd/DataDetails.vue

@@ -1,908 +0,0 @@
-<template>
-	<div>
-		<el-breadcrumb separator-class="el-icon-arrow-right">
-			<el-breadcrumb-item>测报系统</el-breadcrumb-item>
-			<el-breadcrumb-item :to="{ path: '/index/cbd' }"
-				>虫情测报</el-breadcrumb-item
-			>
-			<el-breadcrumb-item>数据详情</el-breadcrumb-item>
-		</el-breadcrumb>
-		<el-button type="success" size="small" @click="goBackPage()"
-			><i class="el-icon--left el-icon-d-arrow-left"></i>返回</el-button
-		>
-		<div class="equipInfo">
-			<div class="equipMsg">
-				<span>设备ID:{{ this.$route.params.e_id }}</span>
-				<span>设备名称:{{ equipStatus.device_name || '无' }}</span>
-				<span>位置:{{ equipStatus.address || '无' }}</span>
-			</div>
-			<DateSearch @dateChange="dateChange"></DateSearch>
-		</div>
-		<div class="ctrl-check">
-			<el-button type="primary" size="mini" @click="refresh">刷新</el-button>
-			<el-button type="primary" size="mini" @click="lookSIMCode('sim')"
-				>SIM 卡</el-button
-			>
-		</div>
-		<!-- 统计图 -->
-		<el-row :gutter="10">
-			<el-col :md="24" :lg="15">
-				<el-card class="box-card">
-					<div class="charts">
-						<template v-if="Object.keys(options).length > 0">
-							<highcharts :options="options"></highcharts>
-						</template>
-						<template v-else>
-							<div
-								style="text-align: center; font-size: 20px; line-height: 450px"
-							>
-								暂无数据
-							</div>
-						</template>
-					</div>
-				</el-card>
-			</el-col>
-			<el-col :md="24" :lg="9">
-				<el-card class="box-card">
-					<el-row :gutter="10">
-						<el-col :xs="12" :sm="12" :md="6" :lg="12">
-							<div class="equipStatus">
-								<div class="equipIcon">
-									<img
-										src="@/assets/images/forecasting/cbd/staticIcon1.png"
-										alt
-									/>
-								</div>
-								<div class="equipParams">
-									<strong>{{
-										equipStatus.ds? '开机' : '关机'
-									}}</strong>
-									<p>设备状态</p>
-								</div>
-							</div>
-						</el-col>
-						<el-col :xs="12" :sm="12" :md="6" :lg="12">
-							<div class="equipStatus">
-								<div class="equipIcon">
-									<img
-										src="@/assets/images/forecasting/cbd/staticIcon2.png"
-										alt
-									/>
-								</div>
-								<div class="equipParams">
-									<strong>{{ equipStatus.ts ? '时控' : '光控' }}</strong>
-									<p>定时模式</p>
-								</div>
-							</div>
-						</el-col>
-						<el-col :xs="12" :sm="12" :md="6" :lg="12">
-							<div class="equipStatus">
-								<div class="equipIcon">
-									<img
-										src="@/assets/images/forecasting/cbd/staticIcon3.png"
-										alt
-									/>
-								</div>
-								<div class="equipParams">
-									<strong>{{ equipStatus.gs ? '落虫' : '排水' }}</strong>
-									<p>通道状态</p>
-								</div>
-							</div>
-						</el-col>
-						<el-col :xs="12" :sm="12" :md="6" :lg="12">
-							<div class="equipStatus">
-								<div class="equipIcon">
-									<img
-										src="@/assets/images/forecasting/cbd/staticIcon4.png"
-										alt
-									/>
-								</div>
-								<div class="equipParams">
-									<strong>{{ equipStatus.hs ? '加热' : '正常' }}</strong>
-									<p>加热状态</p>
-								</div>
-							</div>
-						</el-col>
-						<el-col :xs="12" :sm="12" :md="6" :lg="12">
-							<div class="equipStatus">
-								<div class="equipIcon">
-									<img
-										src="@/assets/images/forecasting/cbd/staticIcon5.png"
-										alt
-									/>
-								</div>
-								<div class="equipParams">
-									<strong>{{ equipStatus.upds ? '打开' : '关闭' }}</strong>
-									<p>上仓门</p>
-								</div>
-							</div>
-						</el-col>
-						<el-col :xs="12" :sm="12" :md="6" :lg="12">
-							<div class="equipStatus">
-								<div class="equipIcon">
-									<img
-										src="@/assets/images/forecasting/cbd/staticIcon6.png"
-										alt
-									/>
-								</div>
-								<div class="equipParams">
-									<strong>{{ equipStatus.dpds ? '打开' : '关闭' }}</strong>
-									<p>下仓门</p>
-								</div>
-							</div>
-						</el-col>
-						<el-col :xs="12" :sm="12" :md="6" :lg="12">
-							<div class="equipStatus">
-								<div class="equipIcon">
-									<img
-										src="@/assets/images/forecasting/cbd/staticIcon7.png"
-										alt
-									/>
-								</div>
-								<div class="equipParams">
-									<strong>{{ equipStatus.csq }}</strong>
-									<p>信号强度</p>
-								</div>
-							</div>
-						</el-col>
-						<el-col :xs="12" :sm="12" :md="6" :lg="12">
-							<div class="equipStatus">
-								<div class="equipIcon">
-									<img
-										src="@/assets/images/forecasting/cbd/staticIcon8.png"
-										alt
-									/>
-								</div>
-								<div class="equipParams">
-									<strong>{{ equipStatus.dver }}</strong>
-									<p>设备版本</p>
-								</div>
-							</div>
-						</el-col>
-						<el-col :xs="12" :sm="12" :md="6" :lg="12">
-							<div class="equipStatus">
-								<div class="equipIcon">
-									<img
-										src="@/assets/images/forecasting/cbd/staticIcon9.png"
-										alt
-									/>
-								</div>
-								<div class="equipParams">
-									<strong>{{ equipStatus.tph }}</strong>
-									<p>高温限值</p>
-								</div>
-							</div>
-						</el-col>
-						<el-col :xs="12" :sm="12" :md="6" :lg="12">
-							<div class="equipStatus">
-								<div class="equipIcon">
-									<img
-										src="@/assets/images/forecasting/cbd/staticIcon10.png"
-										alt
-									/>
-								</div>
-								<div class="equipParams">
-									<strong>{{ equipStatus.tpl }}</strong>
-									<p>低温限值</p>
-								</div>
-							</div>
-						</el-col>
-					</el-row>
-				</el-card>
-			</el-col>
-		</el-row>
-		<div class="dataTableSearch">
-			<div>
-				<el-button type="primary" size="mini">导出</el-button>
-			</div>
-		</div>
-		<el-card class="box-card" v-if="showControl">
-			<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]"
-				>
-					<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>
-		<!-- SIM卡对话框 -->
-		<el-dialog title="SIM卡" :visible.sync="simCodeVisible" width="30%">
-			<template>
-				<el-tabs
-					v-loading="simLoading"
-					element-loading-text="数据请求中"
-					v-model="activeName"
-					@tab-click="handleClick"
-				>
-					<el-tab-pane label="SIM卡流量" name="sim">
-						<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 }}MB</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-tab-pane>
-					<el-tab-pane label="海康SIM卡流量" name="hksim" v-if="showHksimFlag">
-						<div class="simCodeBox">
-							<div>
-								<span class="simCodeTitle">ICCID:</span>
-								<div>{{ hksim.iccid }}</div>
-							</div>
-							<div>
-								<span class="simCodeTitle">状态:</span>
-								<div>{{ hksim.account_status | simStatus }}</div>
-							</div>
-							<div>
-								<span class="simCodeTitle">套餐:</span>
-								<div>
-									<el-progress
-										:show-text="false"
-										:percentage="100"
-									></el-progress>
-								</div>
-								<span>{{ hksim.data_plan }}MB</span>
-							</div>
-							<div>
-								<span class="simCodeTitle">已用流量:</span>
-								<div>
-									<template v-if="!isNaN(hkdata_usage_Per)">
-										<el-progress
-											:show-text="false"
-											:percentage="hkdata_usage_Per"
-										></el-progress>
-									</template>
-								</div>
-								<span>{{ hksim.data_usage }}MB</span>
-							</div>
-							<div>
-								<span class="simCodeTitle">剩余流量:</span>
-								<div>
-									<template v-if="!isNaN(hkdata_balance_per)">
-										<el-progress
-											:show-text="false"
-											:percentage="hkdata_balance_per"
-										></el-progress>
-									</template>
-								</div>
-								<span>{{ hksim.data_balance }}MB</span>
-							</div>
-							<div>
-								<span class="simCodeTitle">到期时间:</span>
-								<div>{{ (hksim.expiry_date * 1000) | formatTime }}</div>
-							</div>
-							<div>
-								<span class="simCodeTitle">更换ICCID:</span>
-								<div>
-									<el-input
-										type="number"
-										v-model="hksiminp"
-										placeholder="请输入ICCID"
-									></el-input>
-								</div>
-							</div>
-							<div class="operateBtn">
-								<el-button type="primary" size="mini" @click="changeHkSim"
-									>确定</el-button
-								>
-								<el-button size="mini" @click="simCodeVisible = false"
-									>取消</el-button
-								>
-							</div>
-						</div>
-					</el-tab-pane>
-				</el-tabs>
-			</template>
-		</el-dialog>
-	</div>
-</template>
-
-<script>
-import DateSearch from '@/components/DateSearch'
-export default {
-	data() {
-		return {
-			// 请求sim卡获取到需要回显的数据
-			simLoading: true, //sim卡加载loading
-			showHksimFlag: true, //是否显示hksim卡标识
-			simCodeVisible: false,
-			simFlag: true, //是否重复加载hksim卡
-			sim: {
-				iccid: '',
-				account_status: 0, //卡状态 0-7 未知 测试期 沉默期 使用中 停机 停机保号 预销号 销号
-				data_plan: 0, //套餐大小
-				data_usage: 0, //当月用量
-				data_balance: 0, //剩余流量
-				expiry_date: 0 //到期日期
-			},
-			hksimFlag: true, //是否重复加载hksim卡
-			hksim: {
-				iccid: '',
-				account_status: 0, //卡状态 0-7 未知 测试期 沉默期 使用中 停机 停机保号 预销号 销号
-				data_plan: 0, //套餐大小
-				data_usage: 0, //当月用量
-				data_balance: 0, //剩余流量
-				expiry_date: 0 //到期日期
-			},
-			hksiminp: '',
-			timeRange: '', //时间范围picker
-			btnSelected: null, //时间按钮高亮
-			dataList: [], //所有数据
-			options: {},
-			// 状态信息
-			equipStatus: {},
-			// 统计图表信息
-			equipChartData: [],
-			//总数据条数
-			total: 0,
-			// 动态表头
-			tableHeadTxt: [
-				['环境温度(°C)', 'at'],
-				['环境湿度(%)', 'ah'],
-				['加热仓温度(°C)', 'hrt'],
-				['雨控状态', 'rps'],
-				['温控状态', 'tps'],
-				['光控状态', 'lps'],
-				['灯管状态', 'blbs'],
-				['信号强度', 'csq'],
-				['功率(mA)', 'current'],
-				['电压(V)', 'vbat'],
-				['上报时间', 'addtime']
-			],
-			// 表格数据
-			tableData: [],
-			timeRange: '',
-			queryInfo: {
-				begin: '',
-				end: '',
-				e_id: this.$route.params.e_id,
-				d_id: this.$route.params.d_id,
-				page: 1
-			},
-			//图表实时否有数据
-			isEchartData: true,
-			//表格和图表按钮样式切换参数
-			display: '0', //0代表表格、1代表图表
-			// 表格和图表显示切换控制
-			showControl: true,
-			//echarts图表参数
-			echartOptions: [],
-			// 动态表头
-			tableHead: [],
-			// 表格数据
-			hisData: [],
-			simCodeDialogVisible: false,
-			f_id: '',
-			// sim卡切换状态
-			activeName: 'sim'
-		}
-	},
-	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 '销号'
-			}
-		}
-	},
-	computed: {
-		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
-		},
-		hkdata_usage_Per: function () {
-			let aa = Number(this.hksim.data_usage / this.hksim.data_plan) * 100
-			return aa
-		},
-		hkdata_balance_per: function () {
-			let aa = Number(this.hksim.data_balance / this.hksim.data_plan) * 100
-			return aa
-		}
-	},
-	mounted() {
-		this.getEquipStatus()
-	},
-	methods: {
-		//获取折线图数据
-		getChartLine() {
-			this.$axios({
-				method: 'POST',
-				url: '/api/api_gateway?method=forecast.worm_lamp.device_polyline_data',
-				data: this.qs.stringify({
-					device_type_id: 3,
-					d_id: this.queryInfo.d_id,
-					start_time: this.queryInfo.begin,
-					end_time: this.queryInfo.end
-				})
-			}).then((res) => {
-				if (res.data.message == '') {
-					var ChartData = [
-						{
-							name: '温度(°C)',
-							dat: []
-						},
-						{
-							name: '湿度(%)',
-							dat: []
-						},
-						{
-							name: '加热仓温度(°C)',
-							dat: []
-						}
-					]
-					var data = res.data.data
-					this.options = {}
-					if (data.length > 0) {
-						for (let item of data) {
-							ChartData[0].dat.unshift([
-								item.addtime * 1000 + 8 * 3600000,
-								Number(item.temperature)
-							])
-							ChartData[1].dat.unshift([
-								item.addtime * 1000 + 8 * 3600000,
-								Number(item.humidity)
-							])
-							ChartData[2].dat.unshift([
-								item.addtime * 1000 + 8 * 3600000,
-								Number(item.others)
-							])
-						}
-						this.options = {
-							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'
-											}
-										}
-									}
-								]
-							}
-						}
-					}
-				}
-			})
-		},
-		// 获取状态信息
-		getEquipStatus() {
-			this.$axios({
-				method: 'POST',
-				url: '/api/api_gateway?method=forecast.worm_lamp.device_status_data',
-				data: this.qs.stringify({
-					device_id: this.queryInfo.e_id
-				})
-			}).then((res) => {
-				if (res.data.message == '') {
-					this.equipStatus = res.data.data
-					if (res.data.data.dver.indexOf('HK') != '-1') {
-						//判断版本是否包含HK的
-						this.showHksimFlag = true
-					} else {
-						this.showHksimFlag = false
-					}
-				}
-			})
-		},
-		dateChange(data) {
-			this.queryInfo.page = 1
-			this.queryInfo.begin = data.begin
-			this.queryInfo.end = data.end
-			this.getChartLine()
-			this.getHisDataList()
-		},
-		//获取表格数据
-		getHisDataList() {
-			this.$axios({
-				method: 'POST',
-				url: '/api/api_gateway?method=forecast.worm_lamp.device_history_data',
-				data: this.qs.stringify({
-					device_type_id: 3,
-					device_id: this.queryInfo.e_id,
-					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
-					this.tableData = []
-					if (data.length > 0) {
-						for (var i = 0; i < data.length; i++) {
-							var dht = data[i].d_h_t
-							dht.addtime = this.formatTime(dht.addtime * 1000)
-							dht.rps = dht.rps == 0 ? '正常' : '雨控'
-							dht.tps = dht.tps == 0 ? '正常' : '温控'
-							dht.lps = dht.lps == 0 ? '正常' : '光控'
-							if (dht.lamp != undefined) {
-								if (dht.ws == 1) {
-									if (dht.lamp == 1) {
-										dht.blbs = '工作中'
-									} else if (dht.lux == 0) {
-										dht.blbs = 'N/A(未检测到传感器)'
-									} else {
-										dht.blbs = '异常'
-									}
-								} else {
-									dht.blbs = '关闭'
-								}
-							} else {
-								dht.blbs = '--'
-							}
-							this.tableData.push(dht)
-						}
-					}
-				}
-			})
-		},
-		//改变page
-		changePage(val) {
-			this.queryInfo.page = val
-			this.getHisDataList()
-		},
-		// SIM卡
-		lookSIMCode(flag) {
-			this.simLoading = true
-			this.simCodeVisible = true
-			if (flag == 'sim') {
-				if (!this.simFlag) {
-					this.simLoading = false
-					return false
-				}
-			}
-			this.$axios({
-				method: 'post',
-				url: '/api/api_gateway?method=forecast.send_control.device_sim',
-				data: this.qs.stringify({
-					d_id: this.queryInfo.d_id,
-					type: flag
-				})
-			}).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) => {
-						let data = eval('(' + res.data.data.data + ')')
-						if (data.code != 0) {
-							this.$message({
-								type: 'info',
-								message: data.msg
-							})
-							this.hksim = {
-								iccid: '',
-								account_status: 0, //卡状态 0-7 未知 测试期 沉默期 使用中 停机 停机保号 预销号 销号
-								data_plan: 0, //套餐大小
-								data_usage: 0, //当月用量
-								data_balance: 0, //剩余流量
-								expiry_date: 0 //到期日期
-							}
-							console.log(this.hksim)
-						}
-						if (res.data.message == '') {
-							console.log(data)
-							let cardInfo = data.data
-							this.simLoading = false
-							if (flag == 'sim') {
-								this.sim = cardInfo
-								this.simFlag = false
-							} else {
-								if (cardInfo) {
-									this.hksim = cardInfo
-								} else {
-									this.hksim = {
-										iccid: '',
-										account_status: 0, //卡状态 0-7 未知 测试期 沉默期 使用中 停机 停机保号 预销号 销号
-										data_plan: 0, //套餐大小
-										data_usage: 0, //当月用量
-										data_balance: 0, //剩余流量
-										expiry_date: 0 //到期日期
-									}
-								}
-							}
-						}
-					})
-				}
-			})
-		},
-		//sim卡状态
-		handleClick(tab, event) {
-			console.log(event)
-			console.log(event.target)
-			console.log(event.target.innerText)
-			if (event.target.innerText == '海康SIM卡流量' && this.hksimFlag) {
-				this.hksimFlag = false
-				console.log(event.target.innerText)
-				this.lookSIMCode('hksim')
-			}
-		},
-		//绑定更换海康SIM
-		changeHkSim() {
-			if (!this.hksiminp) {
-			}
-			this.$axios({
-				method: 'post',
-				url: '/api/api_gateway?method=forecast.send_control.device_sim',
-				data: this.qs.stringify({
-					d_id: this.queryInfo.d_id,
-					iccid: this.hksiminp,
-					type: 'change'
-				})
-			}).then((res) => {
-				this.hksiminp = ''
-				if (res.data.data == '1') {
-					this.lookSIMCode('hksim')
-				}
-			})
-		},
-		//刷新按钮
-		refresh() {
-			this.$axios({
-				method: 'POST',
-				url: '/api/api_gateway?method=forecast.send_control.get_device_config',
-				data: this.qs.stringify({
-					device_type_id: 3,
-					d_id: this.queryInfo.d_id,
-					control_type: 'data'
-				})
-			}).then((res) => {
-				if (res.data.message=='') {
-					this.$message.success('刷新成功')
-				} else {
-					this.$message.err('刷新失败')
-				}
-			})
-		},
-		//返回上一页
-		goBackPage() {
-			this.$router.go(-1)
-		}
-	},
-	components: {
-		DateSearch
-	}
-}
-</script>
-
-<style lang='less' scoped>
-.equipInfo {
-	display: flex;
-	justify-content: space-between;
-	margin-top: 10px;
-	margin-bottom: 8px;
-	.equipMsg {
-		font-size: 14px;
-		color: #3d3d3d;
-	}
-}
-.ctrl-check {
-	margin-bottom: 20px;
-}
-
-.time-check {
-	display: flex;
-	justify-content: space-between;
-	.el-button {
-		border-radius: 30px;
-	}
-	.el-input__inner {
-		width: 222px;
-	}
-}
-.charts {
-	height: 450px;
-}
-.equipStatus {
-	display: flex;
-	justify-content: left;
-	margin: 10px 0;
-	.equipIcon {
-		margin:0 10%;
-	}
-	.equipParams {
-		min-width: 80px;
-		line-height: 27px;
-		p {
-			color: #a6a6a6;
-		}
-	}
-}
-
-.dataTableSearch {
-	display: flex;
-	justify-content: space-between;
-	margin: 20px 0;
-	.el-input__inner {
-		width: 222px;
-	}
-}
-.echarts {
-	width: 100%;
-	height: 300px;
-}
-.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;
-	}
-}
-</style>

+ 0 - 647
src/pages/forecasting/cbd/MessageWarn.vue

@@ -1,647 +0,0 @@
-<template>
-	<div>
-		<el-breadcrumb separator-class="el-icon-arrow-right">
-			<el-breadcrumb-item>测报系统</el-breadcrumb-item>
-			<el-breadcrumb-item :to="{ path: '/index/cbd' }">虫情测报</el-breadcrumb-item>
-			<el-breadcrumb-item>短信通知</el-breadcrumb-item>
-		</el-breadcrumb>
-		<el-button type="success" size="small" @click="goBackPage()"
-			><i class="el-icon--left el-icon-d-arrow-left"></i>返回</el-button
-		>
-		<div class="innerBox">
-			<!-- 1 -->
-			<div class="category">
-				<div class="titleNum">
-					<span>1</span>
-				</div>
-				<div class="wormItem">
-					<h2>目标种类预警</h2>
-					<div class="previewSwitchBox">
-						<span>害虫种类数预警</span>
-						<el-switch
-							v-model="switch1"
-							active-color="#13ce66"
-							inactive-color="#dcdfe6"
-							@change="switch1Fun"
-						></el-switch>
-					</div>
-					<div class="limitValBox">
-						<div>
-							<el-input
-								v-model="input1"
-								type="number"
-								ref="input"
-								placeholder="请填写害虫数量"
-								clearable
-								@change="input1ChangeFun"
-							></el-input>
-						</div>
-						<div class="hint">
-							每天害虫
-							<span>种类数量</span>达到此值时,短信预警
-						</div>
-					</div>
-					<div class="previewBox">
-						<el-button :type="input1!=''?'success':''" @click="previewFun" round size="mini">预览</el-button>
-					</div>
-				</div>
-			</div>
-			<!-- 2 -->
-			<div class="category">
-				<div class="titleNum">
-					<span>2</span>
-				</div>
-				<div class="wormItem">
-					<h2>数量预警</h2>
-					<div class="previewSwitchBox">
-						<span>指定害虫数量预警</span>
-						<el-switch
-							v-model="switch2"
-							active-color="#13ce66"
-							inactive-color="#dcdfe6"
-							@change="switch2Fun"
-						></el-switch>
-					</div>
-					<div class="limitValBox">
-						<div class="limitWormItem">
-							<div class="limitWormItemBox" v-for="(item,index) in planKind" :key="index">
-								<el-select v-model="item.value" placeholder="请选择害虫种类">
-									<el-option v-for="num in cbdPestNum" :key="num" :label="cbdPest[num]" :value="num"></el-option>
-								</el-select>
-								<el-input
-									v-model="item.nums"
-									type="number"
-									placeholder="请填写害虫数量"
-									clearable
-									@change="wormNumFun2"
-								></el-input>
-								<i v-if="index==0" class="el-icon-circle-plus-outline" @click="addWormKind"></i>
-								<i v-if="index!=0" class="el-icon-delete" @click="delWormKind(index)"></i>
-							</div>
-						</div>
-						<div class="hint">
-							每天
-							<span>指定害虫数</span>达到此数量时,短信预警
-						</div>
-					</div>
-					<div class="previewBox">
-						<el-button :type="reversedMessage?'success':''" @click="previewFun2" round size="mini">预览</el-button>
-					</div>
-				</div>
-			</div>
-			<!-- 3 -->
-			<div class="category">
-				<div class="titleNum">
-					<span>3</span>
-				</div>
-				<div class="wormItem">
-					<h2>数量预警</h2>
-					<div class="previewSwitchBox">
-						<span>害虫数量总和预警</span>
-						<el-switch
-							v-model="switch3"
-							active-color="#13ce66"
-							inactive-color="#dcdfe6"
-							@change="switch3Fun"
-						></el-switch>
-					</div>
-					<div class="limitValBox">
-						<div>
-							<el-input
-								v-model="input3"
-								type="number"
-								ref="input3"
-								placeholder="请填写害虫数量"
-								clearable
-								@change="input3ChangeFun"
-							></el-input>
-						</div>
-						<div class="hint">
-							每天害虫
-							<span>种类数量</span>达到此值时,短信预警
-						</div>
-					</div>
-					<div class="previewBox">
-						<el-button :type="input3!=''?'success':''" @click="previewFun3" round size="mini">预览</el-button>
-					</div>
-				</div>
-			</div>
-			<!-- 4 -->
-			<div class="category">
-				<div class="titleNum">
-					<span>4</span>
-				</div>
-				<div class="wormItem">
-					<h2>综合预警</h2>
-					<div class="previewSwitchBox">
-						<span>监测每天出现的害虫种类及数量,短信预警</span>
-						<el-switch v-model="switch4" active-color="#13ce66" inactive-color="#dcdfe6"></el-switch>
-					</div>
-					<div class="previewBox">
-						<el-button type="success" @click="previewFun4" round size="mini">预览</el-button>
-					</div>
-				</div>
-			</div>
-			<!-- 5 -->
-			<div class="category">
-				<div class="titleNum">
-					<span>5</span>
-				</div>
-				<div class="wormItem">
-					<h2>信息接收</h2>
-					<div class="limitValBox">
-						<div class="receptionPhone">
-							<el-input
-								v-model="input5"
-								ref="tel"
-								type="tel"
-								placeholder="请填写信息接收手机号"
-								clearable
-								@change="telRegular"
-							></el-input>
-						</div>
-					</div>
-				</div>
-			</div>
-			<div>
-				<el-button type="primary" @click="submitData()">提交</el-button>
-				<el-button type="info">重置</el-button>
-			</div>
-		</div>
-		<!-- 预览框 -->
-		<el-dialog
-			width="500px"
-			top="50px"
-			:visible.sync="dialogVisible"
-			custom-class="previewDialog"
-			:close-on-click-modal="false"
-			:show-close="true"
-		>
-			<div class="noteWarnBj">
-				<div class="noteWarnTxt" ref="txt" v-html="dialogHtml"></div>
-				<div class="noteWarnTime">上午 8:49</div>
-			</div>
-		</el-dialog>
-	</div>
-</template>
-
-<script>
-import dict from '../../../../static/js/cbd_pest_library.js'
-export default {
-	data() {
-		return {
-			switch1: false,
-			input1: '',
-			dialogVisible: false,
-			// 2
-			switch2: false,
-			input2: false,
-			cbdPest: dict,
-			cbdPestNum: 332,
-			planKind: [
-				{
-					label: '',
-					value: '',
-					nums: 0
-				}
-			],
-			// 3
-			switch3: false,
-			input3: '',
-			// 4
-			switch4: false,
-			// 5
-			input5: '',
-
-			dialogHtml: '',
-
-			value: true,
-			input: '',
-			options: [
-				{
-					value: '选项1',
-					label: '1'
-				},
-				{
-					value: '选项2',
-					label: '2'
-				}
-			],
-			value2: ''
-			// redata: {}, //回显数据
-		}
-	},
-	computed: {
-		// 计算属性的 getter
-		reversedMessage: function () {
-			// `this` 指向 vm 实例
-			var planKind = this.planKind
-			var len = this.planKind.length
-			for (var i = 0; i < len; i++) {
-				if (!(planKind[i].value && planKind[i].nums != 0)) {
-					return false
-				}
-				if (i == len - 1) {
-					return true
-				}
-			}
-		}
-	},
-	created() {
-		// this.getHisDataList();
-	},
-	mounted() {
-		// this.echartsFn();
-		this.warningData()
-	},
-	methods: {
-		switch1Fun() {
-			console.log(this.switch1)
-			if (this.switch1 && !this.input1) {
-				this.$message({
-					message: '请将数据填写完整,再进行操作',
-					type: 'warning'
-				})
-				this.$refs.input.focus()
-				this.switch1 = false
-			}
-		},
-		previewFun() {
-			if (this.input1) {
-				this.dialogVisible = true
-				var html =
-					"尊敬的用户:您的虫情测报设备:868956044830804,于<span>2019-08-31</span>监测到害虫种类数量{'" +
-					this.input1 +
-					"'}种,请注意防范(详情请登陆<span>www.yfzhwlw.com</span>查看)"
-				this.dialogHtml = html
-			} else {
-				this.$message({
-					message: '请将数据填写完整,再进行查看',
-					type: 'warning'
-				})
-				this.$refs.input.focus()
-			}
-		},
-		input1ChangeFun() {
-			if (!this.input1) {
-				this.switch1 = false
-			}
-		},
-		// 2
-		addWormKind() {
-			var planKind = this.planKind
-			var len = this.planKind.length
-			for (var i = 0; i < len; i++) {
-				if (!(planKind[i].value && planKind[i].nums != 0)) {
-					this.$message({
-						message: '请将数据填写完整,再进行添加',
-						type: 'warning'
-					})
-					return false
-				}
-				if (i == len - 1) {
-					planKind.push({
-						label: '',
-						value: '',
-						nums: 0
-					})
-				}
-			}
-		},
-		delWormKind(index) {
-			var planKind = this.planKind
-			planKind.splice(index, 1)
-		},
-		previewFun2() {
-			if (this.reversedMessage) {
-				var html =
-					"尊敬的用户:您的虫情测报设备:865650044512263,于<span>2019-08-31</span>监测到害虫{'" +
-					this.cbdPest[this.planKind[0].value] +
-					"'}数量{'" +
-					this.planKind[0].nums +
-					"'}种,请注意防范(详情请登陆<span>www.yfzhwlw.com</span>查看)"
-				this.dialogHtml = html
-				this.dialogVisible = true
-			} else {
-				this.$message({
-					message: '请将数据填写完整,再进行查看',
-					type: 'warning'
-				})
-			}
-		},
-		switch2Fun() {
-			if (!this.reversedMessage) {
-				this.$message({
-					message: '请将数据填写完整,再进行操作',
-					type: 'warning'
-				})
-				this.switch2 = false
-			}
-		},
-		wormNumFun2() {
-			if (!this.reversedMessage) {
-				this.switch2 = false
-			}
-		},
-		// 3
-		switch3Fun() {
-			console.log(this.switch1)
-			if (this.switch3 && !this.input3) {
-				this.$message({
-					message: '请将数据填写完整,再进行操作',
-					type: 'warning'
-				})
-				this.$refs.input3.focus()
-				this.switch3 = false
-			}
-		},
-		previewFun3() {
-			if (this.input3) {
-				this.dialogVisible = true
-				var html =
-					"尊敬的用户:您的虫情测报设备:868956044830804,于<span>2019-08-31</span>监测到害虫数量已达到{'" +
-					this.input3 +
-					"'},请注意防范(详情请登陆<span>www.yfzhwlw.com</span>查看)"
-				this.dialogHtml = html
-			} else {
-				this.$message({
-					message: '请将数据填写完整,再进行查看',
-					type: 'warning'
-				})
-				this.$refs.input3.focus()
-			}
-		},
-		input3ChangeFun() {
-			if (!this.input3) {
-				this.switch3 = false
-			}
-		},
-		// 4
-		previewFun4() {
-			this.dialogVisible = true
-			var html =
-				"尊敬的用户:您的虫情测报设备:868956044830804,于<span>2019-08-31</span>监测到害虫{'暗黑鳃金龟': '5头', '二点委夜蛾': '5头', '玉米螟': '23头', '东方粘虫': '1头', '蝼蛄': '1头'}(详情请登陆<span>www.yfzhwlw.com</span>查看)"
-			// var html = "尊敬的用户:您的虫情测报设备:868956044830804,于<span>2019-08-31</span>监测到害虫数量已达到{'"+this.input3+"'},请注意防范(详情请登陆<span>www.yfzhwlw.com</span>查看)";
-			this.dialogHtml = html
-		},
-		// 5
-		telRegular() {
-			if (this.input5) {
-				if (!/^1[3456789]\d{9}$/.test(this.input5)) {
-					this.$message({
-						message: '手机号码有误,请重填',
-						type: 'warning'
-					})
-					this.$refs.tel.focus()
-					return false
-				}
-			}
-		},
-
-		// 提交数据
-		submitData() {
-			let that = this
-			var pestCategory = that.switch1 == true ? 'on' : 'off' //目标种类预警  pestCategory
-			var appointPest = that.switch2 == true ? 'on' : 'off' //指定害虫数量预警 appointPest
-			var pestTotal = that.switch3 == true ? 'on' : 'off' //害虫数量总和预警 pestTotal
-			var pestWarn = that.switch4 == true ? 'on' : 'off' //综合预警 pestWarn
-			console.log(that.planKind)
-			var plantName = []
-			var plantNums = []
-			var plantObj = {}
-			for (var i = 0; i < that.planKind.length; i++) {
-				plantName.push(that.planKind[i].value)
-				plantNums.push(that.planKind[i].nums)
-				plantObj['appointPestNum' + (i + 1)] = that.planKind[i].nums
-				plantObj['appointPestName' + (i + 1)] = that.planKind[i].value
-			}
-			plantObj['pestCategoryNum'] = that.input1 //目标种类预警
-			plantObj['pestTotalNum'] = that.input3 //害虫数量总和预警
-			plantObj['phone'] = that.input5 //信息接收
-			plantObj['appointPestName'] = plantName.join('#') //指定害虫数量预警
-			plantObj['appointPestNum'] = plantNums.join('#') //指定害虫数量预警
-			plantObj['pestCategory'] = pestCategory
-			plantObj['appointPest'] = appointPest
-			plantObj['pestTotal'] = pestTotal
-			plantObj['pestWarn'] = pestWarn
-
-			let postData = that.qs.stringify({
-				device_id: that.$route.params.id,
-				conf: JSON.stringify(plantObj)
-			})
-
-			that
-				.$axios({
-					method: 'post',
-					url: '/api/api_gateway?method=forecast.forecast_system.cbd_msg_conf',
-					data: postData
-				})
-				.then((res) => {
-					if (res.data.data == true && res.data.message == '') {
-						that.$message({
-							showClose: true,
-							message: '设置成功',
-							type: 'success',
-							duration: 1500
-						})
-					} else {
-						that.$message({
-							showClose: true,
-							message: '设置失败',
-							type: 'error',
-							duration: 1500
-						})
-					}
-				})
-				.catch((err) => {
-					console.log(err)
-				})
-		},
-
-		// 请求数据返显
-		warningData() {
-			let that = this
-			let postData = that.qs.stringify({
-				device_id: that.$route.params.id,
-				conf: ''
-			})
-			that
-				.$axios({
-					method: 'post',
-					url: '/api/api_gateway?method=forecast.forecast_system.cbd_msg_conf',
-					data: postData
-				})
-				.then((res) => {
-					if (res.data.data !== null || res.data.data !== '') {
-						var redata = JSON.parse(res.data.data)
-						that.input1 = redata.pestCategoryNum //目标种类预警
-						that.input2 = redata.appointPestNum1 //指定害虫数量预警
-						that.input3 = redata.pestTotalNum //害虫数量总和预警
-						that.input5 = redata.phone //信息接收
-
-						that.planKind[0].nums = redata.appointPestNum1 //数量预警害虫数量
-						that.planKind[0].value = redata.appointPestName1 //数量预警害虫
-
-						that.switch1 = redata.pestCategory == 'on' ? true : false //目标种类预警
-						that.switch2 = redata.appointPest == 'on' ? true : false //指定害虫数量预警
-						that.switch3 = redata.pestTotal == 'on' ? true : false //害虫数量总和预警
-						that.switch4 = redata.pestWarn == 'on' ? true : false //综合预警
-
-						var val = redata.appointPestName
-						var nums = redata.appointPestNum
-						var arr = val.split('#')
-						var arrA = nums.split('#')
-						that.planKind = []
-						for (let i = 0; i < arr.length; i++) {
-							var obj = {}
-							obj['value'] = parseInt(arr[i])
-							obj['nums'] = arrA[i]
-							obj['label'] = ''
-							that.planKind.push(obj)
-						}
-					}
-				})
-				.catch((err) => {
-					console.log(err)
-				})
-		},
-			//返回上一页
-		goBackPage() {
-			this.$router.go(-1)
-		}
-	}
-}
-</script>
-
-<style lang='less' scoped>
-.innerBox {
-	background: #fff;
-	border-radius: 15px;
-	padding: 20px;
-	.category {
-		margin-top: 20px;
-		display: flex;
-		:first-child {
-			margin-top: 0px;
-		}
-		.titleNum {
-			display: inline-block;
-			width: 30px;
-			height: 30px;
-			line-height: 30px;
-			text-align: center;
-			border-radius: 50%;
-			background: rgba(20, 164, 120, 0.18);
-			color: #14a478;
-			margin-right: 20px;
-			margin-top: 2px;
-		}
-		.wormItem {
-			flex: 1;
-			h2 {
-				line-height: 30px;
-				font-size: 18px;
-				margin: 0;
-			}
-			.previewSwitchBox {
-				font-size: 14px;
-				line-height: 50px;
-				letter-spacing: 2px;
-			}
-			.limitValBox {
-				display: flex;
-				align-content: center;
-				.limitWormItem {
-					> div {
-						margin-bottom: 10px;
-						:last-child {
-							margin: 0;
-						}
-					}
-				}
-				.receptionPhone {
-					margin: 10px 0 30px 0;
-				}
-				.el-select {
-					width: 300px;
-					margin-right: 20px;
-				}
-				.el-input {
-					width: 300px;
-					margin-right: 20px;
-				}
-				i {
-					line-height: 40px;
-					font-size: 21px;
-					cursor: pointer;
-					color: #35a478;
-				}
-				.hint {
-					margin-left: 15px;
-					line-height: 40px;
-					font-size: 14px;
-					color: #606060;
-					span {
-						color: #000;
-						font-weight: bold;
-					}
-				}
-			}
-			.previewBox {
-				margin: 15px 0;
-				.el-button--success {
-					background-color: #14a478;
-					border-color: #14a478;
-				}
-				button {
-					padding: 5px 15px;
-				}
-			}
-		}
-	}
-}
-/deep/.previewDialog.el-dialog {
-	background: transparent;
-	box-shadow: none;
-	.el-dialog__headerbtn {
-		.el-dialog__close {
-			color: #ffffff;
-			border: 1px solid #fff;
-			border-radius: 50%;
-			padding: 4px;
-		}
-		:hover {
-			color: #14a478;
-			border: 1px solid #14a478;
-		}
-	}
-	.el-dialog__header {
-		background: transparent;
-		border-bottom: 0 solid transparent;
-	}
-	.el-dialog__body {
-		padding: 0;
-		.noteWarnBj {
-			width: 500px;
-			height: 775px;
-			background: url(~@/assets/images/forecasting/cbd/noteWarnBj.png) no-repeat
-				center;
-			background-size: contain;
-			overflow: hidden;
-			.noteWarnTxt {
-				width: 46%;
-				margin: 136px 0 10px 23%;
-				background: #f2f2f2;
-				padding: 10px;
-				span {
-					color: #0099f2;
-				}
-			}
-			.noteWarnTime {
-				width: 46%;
-				margin: 13px 0 10px 23%;
-			}
-		}
-	}
-}
-</style>

文件差异内容过多而无法显示
+ 0 - 1460
src/pages/forecasting/cbd/PestsStats copy.vue


文件差异内容过多而无法显示
+ 0 - 1085
src/pages/forecasting/cbd/PestsStats.vue


文件差异内容过多而无法显示
+ 0 - 1170
src/pages/forecasting/cbd/cbdDataPhotos.vue


+ 0 - 436
src/pages/forecasting/tccb/TcDataDetail.vue

@@ -1,436 +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>
-		<el-button type="success" size="small" @click="goBackPage()"
-			><i class="el-icon--left el-icon-d-arrow-left"></i>返回</el-button
-		>
-		<div class="equipInfo">
-			<div class="detail">
-				<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.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,
-					d_id: this.queryInfo.d_id,
-					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('指令下发成功!')
-				}
-			})
-		},
-		//返回上一页
-		goBackPage() {
-			this.$router.go(-1)
-		}
-	},
-	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 - 329
src/pages/forecasting/tccb/TcDataPhotos.vue

@@ -1,329 +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">
-						<!-- 有的图片放到阿里云,有的放到了服务器 -->
-						<template v-if="item.addr.indexOf('http') != -1">
-							<img :src="item.addr" />
-						</template>
-						<template v-else>
-							<img :src="$host + item.addr" />
-						</template>
-					</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
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 - 336
src/pages/forecasting/xycb/XycbDataPhotos.vue

@@ -1,336 +0,0 @@
-<template>
-	<div>
-		<el-breadcrumb separator-class="el-icon-arrow-right">
-			<el-breadcrumb-item>测报系统</el-breadcrumb-item>
-			<el-breadcrumb-item :to="{ path: '/index/xycb' }"
-				>性诱测报</el-breadcrumb-item
-			>
-			<el-breadcrumb-item>查看图片</el-breadcrumb-item>
-		</el-breadcrumb>
-		<el-button type="success" size="small" @click="goBackPage()"
-			><i class="el-icon--left el-icon-d-arrow-left"></i>返回</el-button
-		>
-		<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="至"
-					start-placeholder="开始日期"
-					end-placeholder="结束日期"
-					@change="DateChange"
-				></el-date-picker>
-			</div>
-		</div>
-		<el-row :gutter="30" id="viewerDom" 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">
-						<!-- 有的图片放到阿里云,有的放到了服务器 -->
-						<template v-if="item.addr.indexOf('http') != -1">
-							<img :src="item.addr" />
-						</template>
-						<template v-else>
-							<img :src="$host + item.addr" />
-						</template>
-					</div>
-					<div class="photoCtrl">
-						<span>{{ (item.addtime * 1000) | formatTime }}</span>
-					</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-page="queryInfo.page"
-			@current-change="changePage"
-		></el-pagination>
-	</div>
-</template>
-<script>
-export default {
-	data() {
-		return {
-			//在线状态按钮切换
-			equipStatus: '0',
-			totalNum: 0,
-			timeRange: [],
-			delBtnState: true,
-			id: this.$route.params.id,
-			photoList: [],
-			queryInfo: {
-				begin: '',
-				end: '',
-				page: 1
-			},
-			addrlist: []
-		}
-	},
-	computed: {
-		userType: function () {
-			//获取用户类型
-			return window.sessionStorage.getItem('myuser_type')
-		}
-	},
-	mounted() {
-		this.getPhoteList()
-	},
-	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: 4,
-					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])
-		},
-		//返回上一页
-		goBackPage() {
-			this.$router.go(-1)
-		}
-	}
-}
-</script>
-<style lang="less" scoped>
-.check-btns {
-	display: flex;
-	justify-content: space-between;
-	margin-top: 10px;
-	margin-bottom: 10px;
-	align-items: center;
-}
-.photoItem {
-	position: relative;
-	border-radius: 10px;
-	overflow: hidden;
-	&:hover {
-		.photoInfo i {
-			display: block;
-		}
-	}
-	.photoInfo {
-		position: absolute;
-		top: 10px;
-		right: 10px;
-		z-index: 999;
-		span {
-			color: #fff;
-		}
-		i {
-			display: none;
-			cursor: pointer;
-			color: red;
-		}
-	}
-	.photoImg {
-		height: 250px;
-		cursor: pointer;
-		position: relative;
-		img {
-			width: 100%;
-			height: 100%;
-		}
-	}
-	.photoCtrl {
-		background-color: #fff;
-		text-align: center;
-		line-height: 50px;
-		font-size: 16px;
-		div {
-			flex: 1;
-			border-right: 1px solid #d8d8d8;
-			margin-bottom: 0;
-			cursor: pointer;
-			&:hover {
-				color: #14a478;
-			}
-		}
-		.el-col:last-child {
-			border-right: none;
-		}
-	}
-}
-</style>

+ 0 - 911
src/pages/forecasting/xycb/xycb.vue

@@ -1,911 +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"
-			:displayType="displayType"
-			@fun2="getIDName"
-			@fun3="getIsOnline"
-		>
-			<template slot="search-box">
-				<template v-if="role == 'admin'">
-					<el-select
-						v-model="queryInfo.device_model"
-						class="select01"
-						clearable
-						size="mini"
-						placeholder="请选择设备型号"
-						@change="deviceModel()"
-					>
-						<el-option label="全部" value></el-option>
-						<el-option label="I型" value="1"></el-option>
-						<el-option label="II型" value="2"></el-option>
-					</el-select>
-				</template>
-			</template>
-		</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.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.device_model,
-										item.d_id,
-										item.device_id,
-										item.device_name
-									)
-								"
-							></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 || '无' }}
-								</p>
-								<p class="onlineState">
-									<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-dizhi"></i>
-									设备型号:
-									{{ item.device_model == 1 ? 'I' + '型' : 'II' + '型' }}
-								</p>
-								<p>
-									<i class="iconfont icon-shijian"></i>
-									最新上报时间 : {{ (item.status_time * 1000) | formatTime }}
-								</p>
-								<p class="btns">
-									<i class="iconfont icon-yemiancaozuo"></i>
-									<template v-if="item.device_model == 2">
-										<el-button
-											size="mini"
-											type="info"
-											@click="viewImage(item.device_id, item.d_id)"
-											>查看图片</el-button
-										>
-									</template>
-									<el-button
-										size="mini"
-										type="warning"
-										@click="
-											EquipControl(
-												item.device_model,
-												item.d_id,
-												item.device_id,
-												item.device_name
-											)
-										"
-										>设备控制</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,
-												item.device_name,
-												item.address,
-												item.device_model
-											)
-										"
-										>数据详情</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 }}</template>
-					</el-table-column>
-					<el-table-column prop="device_code" label="设备编号" width="180">
-						<template slot-scope="scope">{{
-							scope.row.device_code || '无'
-						}}</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="xy_type" label="设备型号">
-						<template slot-scope="scope">
-							<p v-if="scope.row.device_model == 1">I型</p>
-							<p v-if="scope.row.device_model == 2">II型</p>
-						</template>
-					</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
-								v-if="scope.row.device_model == 2"
-								size="mini"
-								type="info"
-								@click="viewImage(scope.row.device_id, scope.row.d_id)"
-								>查看图片</el-button
-							>
-							<el-button
-								size="mini"
-								type="warning"
-								@click="
-									EquipControl(
-										scope.row.device_model,
-										scope.row.d_id,
-										scope.row.device_id,
-										scope.row.device_name
-									)
-								"
-								>设备控制</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,
-										scope.row.device_name,
-										scope.row.address,
-										scope.device_model
-									)
-								"
-								>数据详情</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>
-		<!-- 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>
-		<!-- 设备控制对话框II型,目前平台只有I型 -->
-		<!-- <el-dialog
-			title="设备控制"
-			:visible.sync="equipControlDialogVisible2"
-			@close="equipControlDialogClosed2"
-			width="30%"
-		>
-			<div class="handAddForm">
-				<el-form
-					ref="equipContrlRef2"
-					:model="equipContrlForm2"
-					label-position="right"
-					label-width="120px"
-				>
-					<el-form-item label="设备编号:">
-						<el-input disabled v-model="equipInfo.device_id"></el-input>
-					</el-form-item>
-					<el-form-item label="设备名称:" v-if="equipInfo.device_name">
-						<el-input disabled v-model="equipInfo.device_name"></el-input>
-					</el-form-item>
-					<el-form-item label="设备开关:" prop="ds">
-						<el-select v-model="equipContrlForm2.ds">
-							<el-option label="开机" :value="1"></el-option>
-							<el-option label="关机" :value="0"></el-option>
-						</el-select>
-					</el-form-item>
-					<el-form-item label="拍照时刻:" prop="pic_t">
-						<el-time-select
-							placeholder="起始时间"
-							v-model="equipContrlForm2.pic_t"
-							:picker-options="{
-								start: '0:00',
-								step: '1:00',
-								end: '23:00'
-							}"
-						></el-time-select>
-					</el-form-item>
-					<el-form-item label="拍照间隔:" prop="pic_f">
-						<el-select v-model="equipContrlForm2.pic_f" placeholder="请选择">
-							<el-option :label="1" :value="1"></el-option>
-							<el-option :label="2" :value="2"></el-option>
-							<el-option :label="3" :value="3"></el-option>
-							<el-option :label="4" :value="4"></el-option>
-							<el-option :label="6" :value="6"></el-option>
-							<el-option :label="8" :value="8"></el-option>
-							<el-option :label="12" :value="12"></el-option>
-							<el-option :label="24" :value="24"></el-option>
-						</el-select>
-					</el-form-item>
-					<el-form-item label="数据上传间隔:" prop="dat_t">
-						<div class="sliderParent">
-							<div class="block">
-								<el-slider
-									:min="10"
-									:step="10"
-									:max="120"
-									v-model="equipContrlForm2.dat_t"
-									show-input
-								></el-slider>
-							</div>
-						</div>
-					</el-form-item>
-					<el-form-item label="卷粘虫板时间:" prop="turn_t">
-						<div class="sliderParent">
-							<div class="block">
-								<el-slider
-									:min="1"
-									:max="23"
-									v-model="equipContrlForm2.turn_t"
-									show-input
-								></el-slider>
-							</div>
-						</div>
-					</el-form-item>
-					<el-form-item class="handAddFormBtn">
-						<el-button
-							type="primary"
-							size="mini"
-							@click="equipControlSubm(equipContrlForm2)"
-							>确定</el-button
-						>
-						<el-button size="mini" @click="equipControlDialogVisible2 = false"
-							>取消</el-button
-						>
-					</el-form-item>
-				</el-form>
-			</div>
-		</el-dialog> -->
-		<!-- 设备控制对话框I型 -->
-		<el-dialog
-			title="设备控制"
-			:visible.sync="equipControlDialogVisible1"
-			@close="equipControlDialogClosed1"
-			width="30%"
-		>
-			<div class="handAddForm">
-				<el-form
-					ref="equipContrlRef1"
-					:model="equipContrlForm1"
-					label-position="right"
-					label-width="130px"
-				>
-					<el-form-item label="设备编号:">
-						<el-input
-							disabled
-							class="facilityNum"
-							v-model="equipInfo.device_id"
-						></el-input>
-					</el-form-item>
-					<el-form-item label="设备名称:" v-if="equipInfo.device_name">
-						<el-input
-							disabled
-							class="facilityName"
-							v-model="equipInfo.device_name"
-						></el-input>
-					</el-form-item>
-					<el-form-item label="设备开关:" prop="ds">
-						<el-select v-model="equipContrlForm1.ds">
-							<el-option label="开机" :value="1"></el-option>
-							<el-option label="关机" :value="0"></el-option>
-						</el-select>
-					</el-form-item>
-					<el-form-item label="时控开关:" prop="timctrl">
-						<el-select v-model="equipContrlForm1.timctrl">
-							<el-option label="开" :value="1"></el-option>
-							<el-option label="关" :value="0"></el-option>
-						</el-select>
-					</el-form-item>
-					<el-form-item label="时控时长:">
-						<div class="timeSet">
-							<el-time-select
-								placeholder="起始时间"
-								v-model="equipContrlForm1.st"
-								value="05:00"
-								:picker-options="{
-									start: '0:00',
-									step: '1:00',
-									end: '23:00'
-								}"
-							></el-time-select>
-							<span style="margin: 0 10px">至</span>
-							<el-time-select
-								placeholder="结束时间"
-								v-model="equipContrlForm1.et"
-								:value="equipContrlForm1.et"
-								:picker-options="{
-									start: '0:00',
-									step: '1:00',
-									end: '23:00'
-								}"
-							></el-time-select>
-						</div>
-					</el-form-item>
-					<el-form-item label="数据频率(min):" prop="dat_f">
-						<div class="sliderParent">
-							<div class="block">
-								<el-slider
-									:min="10"
-									:max="60"
-									v-model="equipContrlForm1.dat_f"
-									show-input
-								></el-slider>
-							</div>
-						</div>
-					</el-form-item>
-					<el-form-item class="handAddFormBtn">
-						<el-button
-							type="primary"
-							size="small"
-							@click="equipControlSubm(equipContrlForm1)"
-							>确定</el-button
-						>
-						<el-button size="small" @click="equipControlDialogVisible1 = false"
-							>取消</el-button
-						>
-					</el-form-item>
-				</el-form>
-			</div>
-		</el-dialog>
-		<!-- 管理员操作对话框 I型-->
-		<el-dialog
-			title="管理员操作"
-			:visible.sync="operarionDialogVisible"
-			width="320px"
-		>
-			<!-- <el-button type="primary" @click="equipBtnControl('poweron')" size="mini">开启</el-button>
-			<el-button type="primary" @click="equipBtnControl('poweroff')" size="mini">关闭</el-button> -->
-			<div class="item">
-				<span>设备编号 : </span><span>{{ equipInfo.device_id }}</span>
-			</div>
-			<div class="item" v-if="equipInfo.device_name">
-				<span>设备名称 : </span><span>{{ equipInfo.device_name }}</span>
-			</div>
-			<el-button type="primary" @click="equipBtnControl('reboot')" size="mini"
-				>重启</el-button
-			>
-			<el-button type="primary" @click="equipBtnControl('update')" size="mini"
-				>升级</el-button
-			>
-			<el-button
-				type="primary"
-				@click="equipBtnControl('clearworm')"
-				size="mini"
-				>清网</el-button
-			>
-			<el-button type="primary" size="mini">查询服务器配置</el-button>
-		</el-dialog>
-		<!-- 管理员操作对话框 II型-->
-		<el-dialog
-			title="操作"
-			:visible.sync="operarionDialogVisible2"
-			width="500px"
-		>
-			<el-button type="primary" @click="equipBtnControl('reboot')" size="mini"
-				>重启</el-button
-			>
-			<el-button type="primary" @click="equipBtnControl('update')" size="mini"
-				>升级</el-button
-			>
-			<el-button type="primary" @click="equipBtnControl('mqttconf')" size="mini"
-				>mqtt网络配置</el-button
-			>
-			<el-button
-				type="primary"
-				@click="equipBtnControl('takephoto')"
-				size="mini"
-				>拍照</el-button
-			>
-			<el-button type="primary" @click="equipBtnControl('turn')" size="mini"
-				>卷黏虫带</el-button
-			>
-			<el-button type="primary" @click="equipBtnControl('repower')" size="mini"
-				>重新上电</el-button
-			>
-		</el-dialog>
-	</div>
-</template>
-<script>
-import SearchBar from '@/components/SearchBar'
-import EquipItem from '@/components/EquipItem'
-export default {
-	data() {
-		return {
-			//图表和表格切换
-			displayType: '',
-			//设备列表
-			equipList: [],
-			role: 'admin',
-			currImei: '',
-			d_id: '',
-			itemId: '',
-			selectItem: '1', //1设备号,2用户名
-			searchVal: '',
-			// sim卡切换状态
-			sim: {
-				iccid: '',
-				account_status: 0, //卡状态 0-7 未知 测试期 沉默期 使用中 停机 停机保号 预销号 销号
-				data_plan: 0, //套餐大小
-				data_usage: 0, //当月用量
-				data_balance: 0, //剩余流量
-				expiry_date: 0 //到期日期
-			},
-
-			//参数
-			queryInfo: {
-				page: 1,
-				is_online: null,
-				dver: '',
-				f_id: '',
-				ename: '',
-				device_model: null
-			},
-			equipInfo: {
-				//设备控制回显
-				device_id: '',
-				device_name: ''
-			},
-			//设备控制I 型
-			equipContrlForm1: {
-				// st: '', //时控开始时间
-				// et: '', //时控结束时间
-				// dat_f: null ,//数据上传时间间隔
-				// ds:''//开关,1开机,0关机
-			},
-			//设备控制II 型
-			equipContrlForm2: {
-				pic_t: '', //定时拍照时刻
-				pic_f: '', //定时拍照时间间隔
-				dat_t: null, //数据上传时间间隔
-				turn_t: null, //定时转动沾虫板
-				ds: '' //开关,1开机,0关机
-			},
-			totalNum: 0,
-			//SIM卡对话框
-			simCodeVisible: false,
-			//设备控制对话框
-			equipControlDialogVisible1: false,
-			equipControlDialogVisible2: false,
-			//管理员操作对话框
-			operarionDialogVisible: false,
-			operarionDialogVisible2: false
-		}
-	},
-	mounted() {
-		this.getEquipList()
-	},
-	created() {
-		this.displayType = String(localStorage.getItem('xycbListType') || '1')
-	},
-	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 = String(data)
-			localStorage.setItem('xycbListType', data)
-		},
-		//获取设备列表
-		getEquipList() {
-			this.$axios({
-				method: 'post',
-				url: '/api/api_gateway?method=forecast.worm_lamp.lamp_list',
-				data: this.qs.stringify({
-					device_type_id: 4,
-					page_size: 8,
-					device_id: this.queryInfo.f_id,
-					device_name: this.queryInfo.ename,
-					page: this.queryInfo.page,
-					device_status: this.queryInfo.is_online,
-					device_model: this.queryInfo.device_model
-				})
-			}).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, device_name, address, device_model) {
-			this.currImei = e_id
-			this.$router.push({
-				path: `/index/xycbDataDetail/${e_id}/${d_id}`,
-				query: { device_model, device_name, address }
-			})
-		},
-		//sim卡状态
-		handleClick(tab, event) {
-			console.log(tab, event)
-		},
-		// 查看图片
-		viewImage(id, d_id) {
-			this.currImei = id
-			this.$router.push({
-				path: `/index/xycbDataPhotos/${id}`,
-				query: { d_id: d_id }
-			})
-		},
-		//设备控制操作
-		EquipControl(model, d_id, device_id, device_name) {
-			if (model == 1) {
-				this.equipControlDialogVisible1 = true
-			} else {
-				this.equipControlDialogVisible2 = true
-			}
-			this.equipInfo = { device_id, device_name }
-			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) => {
-				if (res.data.message == '') {
-					if (Object.keys(res.data.data).length > 0) {
-						let data = res.data.data
-						let obj = {
-							st: data.work_tim.st,
-							et: data.work_tim.et,
-							timctrl: data.work_tim.timctrl,
-							ds: data.power.ds,
-							dat_f: data.data_tim.dat_f
-						}
-						obj.st =
-							obj.st && obj.st < 10 ? '0' + obj.st + ':00' : obj.st + ':00'
-						obj.et =
-							obj.et && obj.et < 10 ? '0' + obj.et + ':00' : obj.et + ':00'
-						if (model == 1) {
-							this.equipContrlForm1 = obj
-						} else {
-							this.equipContrlForm2 = data
-						}
-					}
-				}
-
-				this.equipControlDialogVisible = true
-			})
-		},
-		equipControlSubm(form) {
-			let newForm = Object.assign({}, form) //深拷贝
-			newForm.st =
-				newForm.st && newForm.st.slice(0, 2).charAt(0) != '0'
-					? newForm.st.slice(0, 2)
-					: newForm.st.slice(1, 2)
-			newForm.et =
-				newForm.et && newForm.et.slice(0, 2).charAt(0) != '0'
-					? newForm.et.slice(0, 2)
-					: newForm.et.slice(1, 2)
-			let obj = {
-				work_tim: { timctrl: newForm.timctrl, st: newForm.st, et: newForm.et },
-				data_tim: { dat_f: newForm.dat_f },
-				power: { ds: newForm.ds }
-			}
-			console.log(obj)
-			this.$axios({
-				method: 'POST',
-				url: '/api/api_gateway?method=forecast.send_control.device_control',
-				data: this.qs.stringify({
-					device_type_id: 4,
-					d_id: this.d_id,
-					config: JSON.stringify(obj)
-				})
-			}).then((res) => {
-				if (res.data.message=='') {
-					this.$message.success('设备控制修改成功')
-				} else {
-					this.$message.error('设备控制修改失败')
-				}
-				this.equipControlDialogVisible1 = false
-				this.equipControlDialogVisible2 = false
-			})
-		},
-		//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,
-					type: 'sim'
-				})
-			}).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
-							this.sim = cardInfo
-						}
-						this.simCodeVisible = true
-					})
-				}
-			})
-		},
-		//管理员操作
-		equipOperation(model, d_id, device_id, device_name) {
-			this.d_id = d_id
-			this.equipInfo = { device_id, device_name }
-			if (model == 1) {
-				this.operarionDialogVisible = true
-			} else {
-				this.operarionDialogVisible2 = true
-			}
-		},
-		deviceModel() {
-			this.getEquipList()
-		},
-		equipControlDialogClosed2() {
-			this.$refs.equipContrlRef2.resetFields()
-		},
-		equipControlDialogClosed1() {
-			this.$refs.equipContrlRef1.resetFields()
-			this.equipContrlForm1 = {}
-		},
-		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: 4,
-					d_id: this.d_id
-				})
-			}).then((res) => {
-				if (res.data.message == '') {
-					this.$message.success('指令下发成功!')
-				}
-			})
-		}
-	},
-	components: {
-		SearchBar,
-		EquipItem
-	},
-	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 '销号'
-			}
-		}
-	}
-}
-</script>
-<style lang="less" scoped>
-.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;
-	}
-}
-.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;
-	}
-}
-
-.red {
-	color: rgb(235, 103, 101);
-}
-.green {
-	color: rgb(23, 187, 137);
-}
-.timeSet {
-	display: flex;
-}
-.item {
-	margin-bottom: 10px;
-}
-
-.custom-ffffff .el-form-item__label {
-	text-align: left !important;
-	margin: 0 0 0 40px;
-}
-.facilityNum,
-.facilityName {
-	width: 62% !important;
-}
-.onlineState {
-	margin: 0 3px 0 3px;
-}
-.onlineState .icon-diannao {
-	margin: 0 19px 0 -2px !important;
-}
-</style>

+ 0 - 643
src/pages/forecasting/xycb/xycbDataDetail.vue

@@ -1,643 +0,0 @@
-<template>
-	<div>
-		<el-breadcrumb separator-class="el-icon-arrow-right">
-			<el-breadcrumb-item>防治系统</el-breadcrumb-item>
-			<el-breadcrumb-item :to="{ path: '/index/xycb' }"
-				>性诱测报</el-breadcrumb-item
-			>
-			<el-breadcrumb-item>数据详情</el-breadcrumb-item>
-		</el-breadcrumb>
-		<el-button type="success" size="small" @click="goBackPage()"
-			><i class="el-icon--left el-icon-d-arrow-left"></i>返回</el-button
-		>
-		<div class="equipInfo">
-			<div class="equipMsg">
-				<span>设备ID:{{ equipStatus.e_id }}</span>
-				<span>设备名称:{{ equipStatus.device_name || '无' }}</span>
-				<span>位置:{{ equipStatus.address || '无' }}</span>
-			</div>
-			<DateSearch @dateChange="dateChange"></DateSearch>
-		</div>
-		<div class="ctrl-check">
-			<el-button type="primary" size="mini" @click="refresh">刷新</el-button>
-		</div>
-		<!-- 统计图 -->
-		<div>
-			<div>
-				<el-row :gutter="10">
-					<el-col :md="24" :lg="14">
-						<el-card class="box-card">
-							<div class="charts">
-								<template v-if="Object.keys(options).length > 0">
-									<highcharts :options="options"></highcharts>
-								</template>
-								<template v-else>
-									<div
-										style="
-											text-align: center;
-											font-size: 20px;
-											line-height: 450px;
-										"
-									>
-										暂无数据
-									</div>
-								</template>
-							</div>
-						</el-card>
-					</el-col>
-					<el-col :md="24" :lg="10">
-						<el-card class="box-card">
-							<div class="pie">
-								<template v-if="device_model == 1">
-									<!-- <highcharts :options="options2" :key="1"></highcharts> -->
-									<template v-if="Object.keys(options2).length > 0">
-										<highcharts :options="options2"></highcharts>
-									</template>
-									<template v-else>
-										<div
-											style="
-												text-align: center;
-												font-size: 20px;
-												line-height: 450px;
-											"
-										>
-											暂无数据
-										</div>
-									</template>
-								</template>
-								<template v-if="device_model == 2">
-									<!-- <highcharts :options="options3" :key="2"></highcharts> -->
-									<template v-if="Object.keys(options3).length > 0">
-										<highcharts :options="options3"></highcharts>
-									</template>
-									<template v-else>
-										<div
-											style="
-												text-align: center;
-												font-size: 20px;
-												line-height: 450px;
-											"
-										>
-											暂无数据
-										</div>
-									</template>
-								</template>
-							</div>
-						</el-card>
-					</el-col>
-				</el-row>
-				<div class="dataTableSearch">
-					<div>
-						<el-button type="primary" size="mini">导出</el-button>
-					</div>
-				</div>
-			</div>
-			<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]"
-						:width="setWidth(item)"
-					>
-						<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>
-	</div>
-</template>
-
-<script>
-import DateSearch from '@/components/DateSearch'
-export default {
-	data() {
-		return {
-			device_model: this.$route.query.device_model, //性诱1型或II型
-			btnSelected: '',
-			lineTime: '',
-			dataTime: '',
-			options: {},
-			worms: [
-				{
-					value: 1,
-					label: '蛾子'
-				},
-				{
-					value: 2,
-					label: '蚊子'
-				}
-			],
-			options2: {},
-			options3: {},
-			// 状态信息
-			equipStatus: {
-				e_id: this.$route.params.e_id,
-				device_name: this.$route.query.device_name,
-				address: this.$route.query.address
-			},
-			// 统计图表信息
-			equipChartData: [],
-			//总数据条数
-			total: 0,
-			// 动态表头
-			tableHeadTxt: [
-				['型号', 'proj'],
-				['设备开关', 'ds'],
-				['工作状态', 'ws'],
-				['环境温度(℃)', 'at'],
-				['环境湿度(%)', 'ah'],
-				['充电电压(V)', 'cv'],
-				['电池电压(V)', 'bv'],
-				['充电状态', 'cs'],
-				['电池状态', 'bs'],
-				// ['CPU温度', 'cpu_tmp'],
-				['信号强度', 'csq'],
-				['版本号', 'dver'],
-				['上报时间', 'addtime']
-			],
-			// 表格数据
-			tableData: [],
-			timeRange: '',
-			queryInfo: {
-				begin: '',
-				end: '',
-				e_id: this.$route.params.e_id,
-				d_id: this.$route.params.d_id,
-				page: 1
-			},
-			//图表实时否有数据
-			isEchartData: true,
-			//表格和图表按钮样式切换参数
-			display: '0', //0代表表格、1代表图表
-			displayView: true,
-			// 表格和图表显示切换控制
-			showControl: true,
-			//echarts图表参数
-			echartOptions: [],
-			// 动态表头
-			tableHead: [],
-			// 表格数据
-			hisData: []
-		}
-	},
-	created() {},
-	mounted() {
-		// this.getChartDataList()
-		// this.getHisDataList()
-	},
-	methods: {
-		//获取折线数据
-		getChartDataList() {
-			this.$axios({
-				method: 'POST',
-				url: '/api/api_gateway?method=forecast.worm_lamp.device_polyline_data',
-				data: this.qs.stringify({
-					device_type_id: 4,
-					d_id: this.queryInfo.d_id,
-					start_time: this.queryInfo.begin,
-					end_time: this.queryInfo.end
-				})
-			}).then((res) => {
-				if (res.data.message == '' && res.data.data.length > 0) {
-					var ChartData = [
-						{
-							name: '温度(°C)',
-							dat: []
-						},
-						{
-							name: '湿度(%)',
-							dat: []
-						},
-						{
-							name: '红外计数值',
-							dat: []
-						},
-						{
-							name: '高压计数值',
-							dat: []
-						},
-						{
-							name: 'cpu温度(°C)',
-							dat: []
-						}
-					]
-					var data = res.data.data
-					for (let item of data) {
-						ChartData[0].dat.unshift([
-							item.addtime * 1000 + 8 * 3600000,
-							Number(item.temperature)
-						])
-						ChartData[1].dat.unshift([
-							item.addtime * 1000 + 8 * 3600000,
-							Number(item.humidity)
-						])
-						if (Object.keys(item.others).length == 2) {
-							this.device_model = 1 //1型
-							ChartData[2].dat.unshift([
-								item.addtime * 1000 + 8 * 3600000,
-								Number(item.others.infr_ct)
-							])
-							ChartData[3].dat.unshift([
-								item.addtime * 1000 + 8 * 3600000,
-								Number(item.others.volt_ct)
-							])
-						} else {
-							this.device_model = 2 //2型
-							ChartData[4].dat.unshift([
-								item.addtime * 1000 + 8 * 3600000,
-								Number(item.others.cpu_tmp)
-							])
-						}
-					}
-					this.options = {
-						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: [
-							{
-								type: 'spline',
-								name: ChartData[0].name,
-								data: ChartData[0].dat
-							},
-							{
-								type: 'spline',
-								name: ChartData[1].name,
-								data: ChartData[1].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>'
-						}
-					}
-					this.options2 = {
-						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: [
-							{
-								type: 'spline',
-								name: ChartData[2].name,
-								data: ChartData[2].dat
-							},
-							{
-								type: 'spline',
-								name: ChartData[3].name,
-								data: ChartData[3].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'
-										}
-									}
-								}
-							]
-						}
-					}
-					this.options3 = {
-						chart: {
-							zoomType: 'x'
-						},
-						title: {
-							text: 'CPU温度',
-							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: [
-							{
-								type: 'spline',
-								name: ChartData[4].name,
-								data: ChartData[4].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>'
-						}
-					}
-				} else {
-					this.options = {}
-					this.options2 = {}
-					this.options3 = {}
-				}
-			})
-		},
-		//获取表格数据
-		getHisDataList() {
-			this.$axios({
-				method: 'POST',
-				url: '/api/api_gateway?method=forecast.worm_lamp.device_history_data',
-				data: this.qs.stringify({
-					device_type_id: 4,
-					device_id: this.queryInfo.e_id,
-					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.addtime = this.formatTime(dht.addtime * 1000)
-							console.log(dht.ws)
-							dht.ws = dht.ws ? '工作' : '待机'
-							dht.cs = dht.cs ? '充电中' : '未充电'
-							if (dht.bs == 0) {
-								dht.bs = '正常'
-							} else if (dht.bs == 1) {
-								dht.bs = '欠压'
-							} else if (dht.bs == 2) {
-								dht.bs = '过压'
-							}
-							dht.rps = dht.rps ? '正常' : '雨控'
-							dht.ds = dht.ds==1 ? '开' : '关'
-							dht.tps = dht.tps ? '正常' : '温控'
-							dht.lps = dht.lps ? '夜晚' : '白天'
-							dht.cv=dht.cv/1000
-							dht.bv=dht.bv/1000
-							this.tableData.push(dht)
-						}
-					} else {
-						this.tableData = []
-					}
-				}
-			})
-		},
-		//改变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
-			this.getHisDataList()
-			this.getChartDataList()
-		},
-		setWidth(item) {
-			if (item[1] == 'addtime') {
-				return 180 + 'px'
-			}
-		},
-		refresh() {
-			this.$axios({
-				method: 'POST',
-				url: '/api/api_gateway?method=forecast.send_control.get_device_config',
-				data: this.qs.stringify({
-					device_type_id: 4,
-					d_id: this.queryInfo.d_id,
-					control_type: 'data'
-				})
-			}).then((res) => {
-				if (res.data.message=='') {
-					this.$message.success('刷新成功')
-				} else {
-					this.$message.err('刷新失败')
-				}
-			})
-		},
-		//返回上一页
-		goBackPage() {
-			this.$router.go(-1)
-		}
-	},
-	components: {
-		DateSearch
-	}
-}
-</script>
-
-<style lang='less' scoped>
-.box-card {
-	position: relative;
-}
-.equipInfo {
-	.equipMsg {
-		font-size: 14px;
-		color: #3d3d3d;
-		span {
-			margin-left: 5px;
-		}
-	}
-	display: flex;
-	justify-content: space-between;
-	margin-top: 10px;
-	margin-bottom: 8px;
-}
-
-.time-check {
-	display: flex;
-	justify-content: space-between;
-	.el-input__inner {
-		margin-left: 10px;
-		width: 222px;
-	}
-}
-
-.chartsSelect {
-	text-align: right;
-	position: absolute;
-	z-index: 999;
-	left: 0;
-	right: 21px;
-}
-.charts,
-.pie {
-	height: 423px;
-}
-.equipStatus {
-	display: flex;
-	justify-content: center;
-	margin: 10px 0;
-	.equipIcon {
-		margin-right: 14%;
-	}
-	.equipParams {
-		min-width: 80px;
-		line-height: 27px;
-		p {
-			color: #a6a6a6;
-		}
-	}
-}
-
-.dataTableSearch {
-	display: flex;
-	justify-content: space-between;
-	margin: 20px 0;
-	.el-input__inner {
-		width: 222px;
-	}
-}
-
-// .check-btns{display:flex;justify-content: space-between;margin-bottom:20px}
-.echarts {
-	width: 100%;
-	height: 300px;
-}
-.ctrl-check {
-	margin-bottom: 20px;
-}
-</style>

+ 0 - 760
src/pages/fourMoodBase/baseManage.vue

@@ -1,760 +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="$host + 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, '修改基地',item.address)">
-						<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="$host + 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 type="number" min="0" 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',
-							multiple: true
-						}"
-						clearable
-						filterable
-					></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-item>
-					<el-input
-						@change="addrChange()"
-						clearable
-						placeholder="请输入地区检索"
-						v-model="addr"
-					>
-						<i slot="suffix" class="el-input__icon el-icon-search"></i>
-					</el-input>
-				</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() {
-		var checkMobile = (rule, value, callback) => {
-			const regMobile = /^1\d{10}$/
-			if (regMobile.test(value)) {
-				callback()
-			} else {
-				// 返回一个错误提示
-				callback(new Error('请输入合法的手机号码'))
-			}
-		}
-		return {
-			dialogTxt: '',
-			search: '',
-			page: 1,
-			flag: null, //编辑基地提交为1,添加基地为2
-			totalNum: null,
-			baseAddVisible: false,
-			cropperVisible: false,
-			title: '',
-			addBaseInfo: {
-				baseName: '',
-				imgSrc: '',
-				principal: '',
-				phone: '',
-				area: 0,
-				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, trigger: 'blur', message: '手机号不能为空' },
-					{ required: true, validator: checkMobile, trigger: 'blur' }
-				],
-				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,
-			addr: '', //地图检索的地址
-			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
-					let _this = this
-					this.baseList = []
-					getList(0, data.length)
-					function getList(j, length) {
-						let lat = data[j].lat
-						let lng = data[j].lng
-						_this
-							.$jsonp(
-								`http://api.map.baidu.com/reverse_geocoding/v3/?renderReverse&output=json&coordtype=wgs84ll`,
-								{
-									ak: 'nroAiX0Lf6ppNEGt2dBLtDkOldGCPFwF',
-									location: `${lat},${lng}`
-								}
-							)
-							.then((res) => {
-								let addressComponent = res.result && res.result.addressComponent
-								if (addressComponent) {
-									data[j].address =
-										addressComponent.province +
-										addressComponent.city +
-										addressComponent.district
-								} else {
-									data[j].address = ''
-								}
-								_this.baseList.push(data[j])
-								if (++j < length) {
-									getList(j, length)
-								}
-							})
-					}
-					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, //去掉/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 = res.data.data.src
-					}
-				})
-			})
-		},
-		//转成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
-		},
-		addrChange() {
-			let local = new this.BMap.LocalSearch(this.map, {
-				renderOptions: { map: this.map, panel: 'r-result' }
-			})
-			local.search(this.addr)
-		},
-		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() {
-			let { lng, lat } = this.locationForm
-			this.$jsonp(
-				`http://api.map.baidu.com/reverse_geocoding/v3/?renderReverse&output=json&coordtype=wgs84ll`,
-				{
-					ak: 'nroAiX0Lf6ppNEGt2dBLtDkOldGCPFwF',
-					location: `${lat},${lng}`
-				}
-			).then((res) => {
-				let addressComponent = res.result && res.result.addressComponent
-				if (addressComponent) {
-					this.addBaseInfo.address =
-						addressComponent.province +
-						addressComponent.city +
-						addressComponent.district
-				} else {
-					this.addBaseInfo.address = ''
-				}
-				this.addBaseInfo.lng = lng
-				this.addBaseInfo.lat = lat
-				this.addLocationDialogVisible = false //关闭弹框
-			})
-		},
-		editBase(id, title,address) {
-			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 = Number(item.base_area)
-				this.addBaseInfo.imgSrc = item.base_img
-				this.addBaseInfo.bindEquip = item.base_equip
-				this.addBaseInfo.baseIntro = item.base_describe
-				this.addBaseInfo.address = address
-				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 - 1404
src/pages/fourMoodBase/baseShow.vue


+ 0 - 91
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 - 1067
src/pages/hjjc/environmentMonitor/EnvironmentMonitor.vue


+ 0 - 381
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 - 558
src/pages/monitor/monitorSystem/Monitor.vue

@@ -1,558 +0,0 @@
-<template>
-	<div class="monitor-container">
-		<el-breadcrumb separator-class="el-icon-arrow-right">
-			<el-breadcrumb-item>监控系统</el-breadcrumb-item>
-			<el-breadcrumb-item>监控</el-breadcrumb-item>
-		</el-breadcrumb>
-		<div class="monitor-wrap">
-			<div class="video-box">
-				<div
-					class="video-container"
-					ref="videoContainerRef"
-					:style="{width:'100%',height:divMainHeight}"
-				>
-					<!-- 插件播放 -->
-					<div v-show="playType==1" v-html="html" style="width:100%;height:100%"></div>
-					<!-- 非插件播放 ,默认非插件播放-->
-					<div
-						v-show="playType==0"
-						:class="{'videoItem':true,'a1':divNum==1,'a4':divNum==4,'a9':divNum==9,'selected':count==selected}"
-						v-for="count in divNum"
-						:key="count"
-						@click="selectVideo(count)"
-					>
-						<video
-							:id="'my-video'+count"
-							class="video-js vjs-default-skin"
-							controls
-							autoplay
-							muted
-							style="width:100%;height:100%"
-						></video>
-					</div>
-				</div>
-				<div v-show="playType==0" class="split-screen">
-					<span class="sp sp01" @click="splitView(1)"></span>
-					<span class="sp sp02" @click="splitView(4)"></span>
-					<span class="sp sp03" @click="splitView(9)"></span>
-				</div>
-			</div>
-			<div class="nav-box">
-				<ul class="viewLists">
-					<li
-						v-for="(item,index) in Idlist"
-						:key="index"
-						:class="{'active':activeIndex==index}"
-						@click="selectEquip(item.device_id,item.jktype,index)"
-					>
-						<span :class="['dot',item.status==1?'onLine':'outLine']"></span>
-						{{item | formatName}}
-						<span
-							@click.stop="viewPhoto(item.device_id)"
-							class="viewPhoto"
-							v-if="item.photo_num"
-						>查看图片</span>
-					</li>
-				</ul>
-				<div class="splitPage" onselectstart="return false">
-					<span class="arrow el-icon-caret-top" @click="splitPage('jian')"></span>
-					<span>{{currPage}}</span>
-					<span>/</span>
-					<span>{{totalPage}}</span>
-					<span class="arrow el-icon-caret-bottom" @click="splitPage('jia')"></span>
-				</div>
-				<div class="direc">
-					<div @click="configCamera('takephoto','')" class="cameraCtr"></div>
-					<div @mousedown="configCamera('move',0)"  @mouseup="stopConfigCamera()" class="upCtr"></div>
-					<div @mousedown="configCamera('move',1)"  @mouseup="stopConfigCamera()" class="downCtr"></div>
-					<div @mousedown="configCamera('move',2)"  @mouseup="stopConfigCamera()" class="leftCtr"></div>
-					<div @mousedown="configCamera('move',3)"  @mouseup="stopConfigCamera()" class="rightCtr"></div>
-				</div>
-				<div class="btnBox">
-					<div class="zoom">
-						<!-- 无论插件还是费插件都可以放大缩小 -->
-						<span class="addCtr" @mousedown="configCamera('move',8)" @mouseup="stopConfigCamera()"></span>
-						<span class="reduceCtr" @mousedown="configCamera('move',9)" @mouseup="stopConfigCamera()"></span>
-					</div>
-					<div v-show="playBackCtr" class="playBack" id="playBack"></div>  
-					<div v-show="playType==0" @click="checkPlayType(1)" class="playtype1"></div>
-					<div v-show="playType==1" @click="checkPlayType(0)" class="playtype0"></div>
-					<div @click="addEquip()" class="addequip"></div>
-				</div>
-			</div>
-		</div>
-		<!-- 拍照 -->
-		<el-dialog title="手动下载" :visible.sync="takePhotoDialogVisible" width="30%">
-			<el-input type="textarea" id="picUrl" v-model="picUrl"></el-input>
-			<span slot="footer" class="dialog-footer">
-				<el-button @click="dialogVisible = false">取 消</el-button>
-				<el-button type="primary" @click="copyPicUrl">复制</el-button>
-			</span>
-		</el-dialog>
-		<!-- 查看回放 -->
-		<el-dialog title="查看回放" :visible.sync="playBackDialogVisible" width="30%">
-			<div>123</div>
-		</el-dialog>
-	</div>
-</template>
-
-<script>
-import '@/plugin/ezuikit.js'
-import videojs from 'video.js'
-import 'videojs-contrib-hls'
-import 'video.js/dist/video-js.css'
-videojs.options.flash.swf = '/js/video-js.swf'
-export default {
-	data() {
-		return {
-			currPage: 1, //当前分页
-			totalPage: 0, //总分页
-			id: '', //右侧菜单选中的设备ID
-			activeIndex: 0, //控制设备列表选中状态
-			jktype: '', //为1有回放,否则无回放
-			playBackCtr: false, //控制回放按钮显示
-			divNum: 1, //默认分屏数量
-			hlsHdSrc: '',
-			rtmpHdSrc: '',
-			player: null, //videojs的对象
-			takePhotoDialogVisible: false, //拍照弹框
-			Idlist: [], //右侧设备列表
-			divMainHeight: '', //视频盒子高度
-			selected: 1, //默认选中第一个视频窗口
-			playType: 0, //0:直播 ; 1:插件
-			html: '', //插件播放内容
-			picUrl: '', //视频拍照地址
-			playBackDialogVisible: false,
-			mapTojkId: this.$route.query.id, //四情基地监控设备id
-			mapTojktype: this.$route.query.jktype, //四情基地监控设备jktype
-			player: {}
-		}
-	},
-	filters: {
-		formatName: function (value) {
-			//设备名字
-			if (value.equip_name) {
-				return value.equip_name
-			} else {
-				return '设备' + value.device_id
-			}
-		}
-	},
-	mounted() {
-		this.getJkList()
-		this.windowResize()
-		window.onresize = () => {
-			this.windowResize()
-		}
-	},
-	//注销window.onresize事件
-	destroyed() {
-		window.onresize = null
-		this.player.dispose()
-	},
-	methods: {
-		viewPhoto(id) {
-			this.$router.push('/index/photoView/' + id)
-		},
-		//获取视频列表
-		getJkList() {
-			this.$axios({
-				method: 'POST',
-				url: '/api/api_gateway?method=camera.camera_manage.list_camera',
-				data: this.qs.stringify({ page: this.currPage })
-			}).then((res) => {
-				if (res.data.message == '') {
-					this.Idlist = res.data.data.data
-					this.totalPage = Math.ceil(res.data.data.counts / 10)
-					if (this.mapTojkId && this.mapTojktype) {
-						//基地展示跳转过来
-						this.selectEquip(this.mapTojkId, this.mapTojktype, 99999)
-					} else {
-						this.selectEquip(this.Idlist[0].device_id, this.Idlist[0].jktype, 0)
-					}
-				}
-			})
-		},
-		//视频分页
-		splitPage(str) {
-			if (str == 'jian') {
-				if (this.currPage > 1) {
-					this.currPage--
-					this.getJkList()
-				}
-			} else {
-				if (this.currPage < this.totalPage) {
-					this.currPage++
-					this.getJkList()
-				}
-			}
-		},
-		//关闭方向
-		stopConfigCamera() {
-			this.$axios({
-				method: 'POST',
-				url: '/api/api_gateway?method=camera.camera_manage.ctrl_camera',
-				data: this.qs.stringify({
-					device_id: this.id,
-					ctrl: 'stop'
-				})
-			})
-		},
-		//上下左右和拍照
-		configCamera(ctrl, movenum) {
-			if (ctrl == 'takephoto') {
-				this.$axios({
-					method: 'POST',
-					url: '/api/api_gateway?method=camera.camera_manage.camera_takephoto',
-					data: this.qs.stringify({
-						device_id: this.id
-					})
-				}).then((res) => {
-					let data = JSON.parse(res.data.data)
-					if (data.code == 200) {
-						this.picUrl = data.data.picUrl
-						this.takePhotoDialogVisible = true
-					} else {
-						this.$message.error(data.msg)
-					}
-				})
-			} else {
-				//上下左右、放大、缩小
-				this.$axios({
-					method: 'POST',
-					url: '/api/api_gateway?method=camera.camera_manage.ctrl_camera',
-					data: this.qs.stringify({
-						device_id: this.id,
-						ctrl: ctrl,
-						movenum: movenum
-					})
-				}).then((res) => {
-					// if (res.data.message == '') {
-					// 	this.$message.success('指令下发成功')
-					// 	// this.stopConfigCamera() //关闭方向
-					// }
-				})
-			}
-		},
-		//选中右侧菜单设备
-		selectEquip(device_id, jktype, index) {
-			this.jktype = jktype
-			this.activeIndex = index //菜单选中状态
-			this.id = device_id //保存选中的设备id
-			if (jktype) {
-				//控制回放按钮显示
-				this.playBackCtr = true
-			} else {
-				this.playBackCtr = false
-			}
-			this.$axios({
-				url: '/api/api_gateway?method=camera.camera_manage.addr_camera',
-				method: 'POST',
-				data: this.qs.stringify({ device_id: device_id })
-			}).then((res) => {
-				if (res.data.message == '') {
-					var data = eval('(' + res.data.data + ')')
-					this.hlsHdSrc = data.hlsHd
-					this.rtmpHdSrc = data.rtmp
-					if (this.playType == 1) {
-						//插件
-						this.html =
-							'<video id="myPlayer" autoplay  controls playsInline webkit-playsinline  style="width:100%; height:100%;"><source src="' +
-							this.rtmpHdSrc +
-							'" type="application/x-mpegURL"></video>'
-						setTimeout(() => {
-							this.player = new EZUIKit.EZUIPlayer(myPlayer)
-							this.player.play()
-						}, 1000)
-					} else if (this.playType == 0) {
-						//非插件
-						this.$nextTick(() => {
-							this.player = videojs('my-video' + this.selected)
-							this.player.reset()
-							this.player.src({
-								src: this.hlsHdSrc,
-								type: 'application/x-mpegURL'
-							})
-							this.player.play()
-							this.player.load()
-						})
-					}
-				}
-			})
-		},
-		//函数:获取尺寸
-		windowResize() {
-			// console.log(this.$refs.videoContainerRef.offsetWidth);
-			this.divMainHeight =
-				(this.$refs.videoContainerRef.offsetWidth * 8) / 16 + 22 + 'px'
-		},
-		//点击分屏
-		splitView(num) {
-			this.player = null
-			this.divNum = num
-			this.selected = 1
-		},
-		//点击视频
-		selectVideo(i) {
-			this.selected = i
-		},
-		//播放模式切换,插件/视频直播
-		checkPlayType(i) {
-			this.playType = i
-			this.selectEquip(this.id, this.jktype, this.activeIndex)
-		},
-		//复制拍照地址
-		copyPicUrl() {
-			document.getElementById('picUrl').select()
-			this.$message({
-				showClose: true,
-				message: '手动复制,在浏览器打开,另存为'
-			})
-		},
-		//添加设备
-		addEquip() {
-			this.$prompt('添加设备id', '提示', {
-				confirmButtonText: '确定',
-				cancelButtonText: '取消'
-			})
-				.then(({ value }) => {
-					this.$axios({
-						method: 'POST',
-						url: '/api/api_gateway?method=camera.camera_manage.add_camera',
-						data: this.qs.stringify({ device_id: value })
-					}).then((res) => {
-						if (res.data.message == '') {
-							console.log(456)
-							this.getJkList()
-						}
-					})
-				})
-				.catch(() => {
-					this.$message({
-						type: 'info',
-						message: '取消添加'
-					})
-				})
-		}
-	}
-}
-</script>
-
-<style lang='less' scoped>
-.monitor-container {
-	display: flex;
-	flex-direction: column;
-	height: 100%;
-	.monitor-wrap {
-		display: flex;
-		justify-content: space-between;
-		background: #323a47;
-		flex: 1;
-		.video-box {
-			flex: 1;
-			padding: 10px;
-			.video-container {
-				width: 100%;
-				background: rgb(97, 93, 93);
-				display: flex;
-				flex-wrap: wrap;
-				.videoItem {
-					border: 1px solid #000;
-					box-sizing: border-box;
-				}
-				.videoItem:hover {
-					border-color: aquamarine;
-				}
-				.selected {
-					border: 1px solid aquamarine;
-				}
-				.a1 {
-					width: 100%;
-					height: 100%;
-				}
-				.a4 {
-					width: 50%;
-					height: 50%;
-				}
-				.a9 {
-					width: 33.3%;
-					height: 33.3%;
-				}
-			}
-			.split-screen {
-				display: flex;
-				justify-content: flex-start;
-				padding: 15px 0;
-				.sp {
-					width: 17px;
-					height: 17px;
-					display: inline-block;
-					margin-right: 10px;
-					cursor: pointer;
-				}
-				.sp01 {
-					background: url(../../../assets/images/forecasting/monitor/sp1.png);
-				}
-				.sp02 {
-					background: url(../../../assets/images/forecasting/monitor/sp2.png);
-				}
-				.sp03 {
-					background: url(../../../assets/images/forecasting/monitor/sp3.png);
-				}
-				.sp01:hover {
-					background: url(../../../assets/images/forecasting/monitor/sp1-active.png);
-				}
-				.sp02:hover {
-					background: url(../../../assets/images/forecasting/monitor/sp2-active.png);
-				}
-				.sp03:hover {
-					background: url(../../../assets/images/forecasting/monitor/sp3-active.png);
-				}
-			}
-		}
-		.nav-box {
-			width: 240px;
-			background: #474e60;
-			color: #fff;
-			font-size: 14px;
-			.viewLists {
-				height: 50%;
-				overflow: auto;
-				li {
-					padding-left: 25px;
-					padding-right: 25px;
-					line-height: 50px;
-					cursor: pointer;
-					.viewPhoto {
-						color: #eba219;
-						float: right;
-						font-size: 12px;
-						cursor: pointer;
-					}
-					.viewPhoto:hover {
-						text-decoration: underline;
-					}
-					.dot {
-						display: inline-block;
-						width: 7px;
-						height: 7px;
-						border-radius: 100%;
-						margin-right: 15px;
-					}
-					.onLine {
-						background: #15bb88;
-					}
-					.outLine {
-						background: #c1c1c1;
-					}
-				}
-				li.active {
-					background: #37414d;
-					color: yellow;
-				}
-				li:hover {
-					background: #37414d;
-				}
-			}
-			.splitPage {
-				height: 3%;
-				margin-top: 2%;
-				text-align: center;
-				color: #15bb88;
-				-webkit-user-select: none;
-				-moz-user-select: none;
-				-ms-user-select: none;
-				.arrow {
-					font-size: 20px;
-					cursor: pointer;
-				}
-			}
-			.direc {
-				text-align: center;
-				width: 100%;
-				height: 20%;
-				margin: 5% 0 5% 0;
-				position: relative;
-				background: url(../../../assets/images/forecasting/monitor/direction-btn.png)
-					no-repeat center;
-				background-size: contain;
-				& > div {
-					position: absolute;
-					width: 50px;
-					height: 50px;
-					cursor: pointer;
-				}
-				.upCtr {
-					top: 10px;
-					left: 50%;
-					margin-left: -25px;
-				}
-				.downCtr {
-					bottom: 10px;
-					left: 50%;
-					margin-left: -25px;
-				}
-				.leftCtr {
-					top: 50%;
-					left: 28px;
-					margin-top: -25px;
-				}
-				.rightCtr {
-					top: 50%;
-					right: 28px;
-					margin-top: -25px;
-				}
-				.cameraCtr {
-					top: 0;
-					bottom: 0;
-					left: 0;
-					right: 0;
-					margin: auto;
-				}
-			}
-			.btnBox {
-				height: 15%;
-				.zoom,
-				.playBack,
-				.playtype0,
-				.playtype1,
-				.addequip {
-					width: 140px;
-					height: 32px;
-					margin: auto;
-					margin-bottom: 10px;
-					cursor: pointer;
-				}
-				.zoom {
-					background: no-repeat center / 100%
-						url(../../../assets/images/forecasting/monitor/zoom-btn.png);
-					display: flex;
-					& > span {
-						flex: 1;
-						height: 32px;
-					}
-				}
-				.playBack {
-					background: url(../../../assets/images/forecasting/monitor/playback-btn.png)
-						no-repeat center;
-				}
-				.playtype0 {
-					background: url(../../../assets/images/forecasting/monitor/playtype0.png)
-						no-repeat center;
-					margin-bottom: 10px;
-				}
-				.playtype1 {
-					background: url(../../../assets/images/forecasting/monitor/playtype1.png)
-						no-repeat center;
-					margin-bottom: 10px;
-				}
-				.addequip {
-					background: url(../../../assets/images/forecasting/monitor/addequip.png)
-						no-repeat center;
-					margin-bottom: 10px;
-				}
-			}
-		}
-	}
-}
-</style>

+ 0 - 117
src/pages/monitor/monitorSystem/PhotoView.vue

@@ -1,117 +0,0 @@
-<template>
-   <div>
-      <el-breadcrumb separator-class="el-icon-arrow-right">
-            <el-breadcrumb-item :to="{path:'/index/monitor'}">监控</el-breadcrumb-item>
-            <el-breadcrumb-item>查看图片</el-breadcrumb-item>
-     </el-breadcrumb> 
-     <div class="opt-box">
-         <div>
-            <el-button type="primary" size="mini">刷新</el-button>
-            <el-button type="primary" size="mini">批量删除</el-button>
-         </div>
-        <el-date-picker
-        size="small"
-        align="right"
-        v-model="timeRange"
-        type="daterange"
-        @change="timeRangChange"
-        range-separator="至"
-        start-placeholder="开始日期"
-        end-placeholder="结束日期">
-        </el-date-picker>
-     </div>
-     <el-row :gutter="20">
-            <viewer :images="images" class="images clearfix">
-              <template slot-scope="scope">
-                  <el-col :span="6"  v-for="(src,index) in scope.images" :key="index">
-                      <el-card>
-                            <img :src="src"  class="image">
-                            <span class="time">2020-12-25 12:00:00</span>
-                            <span class="del iconfont icon-shanchu" @click="delPhoto()"></span>
-                            <div class="bottom">
-                                <img src="@/assets/images/forecasting/monitor/icon.png" >
-                                病情识别
-                            </div>
-                      </el-card>
-                  </el-col>
-             </template>
-            </viewer>
-    </el-row>
-    
-   </div>
-</template>
-
-<script>
-   export default {
-        data(){
-            return {
-                timeRange:'',
-                imei:this.$route.params.id,
-                page:1,
-                images:[
-                '../../../../static/images/forecasting/monitor/a.jpg',
-                '../../../../static/images/forecasting/monitor/a.jpg',
-                '../../../../static/images/forecasting/monitor/a.jpg',
-                '../../../../static/images/forecasting/monitor/a.jpg',
-                '../../../../static/images/forecasting/monitor/a.jpg',
-                '../../../../static/images/forecasting/monitor/a.jpg']
-            }
-        },
-        mounted(){
-            this.getImageList()
-        },
-        methods:{
-            getImageList(){
-                this.$axios({
-                    method:'POST',
-                    url:'jk_image',
-                    data:this.qs.stringify({
-                        imei:this.imei,
-                        page:this.page
-                    })
-                }).then((res)=>{
-
-                })
-            },
-            timeRangChange(){
-
-            },
-            delPhoto(){
-
-            }
-        }
-   }
-</script>
-
-<style lang='less' scoped>
-.opt-box{
-    display:flex;
-    justify-content: space-between;
-    margin-bottom:20px;
-}
-/* 时间段选择框的宽度 */
-.el-date-editor--daterange.el-input__inner{width:220px}
-.image {
-    width:100%;
-    height:auto;
-    cursor: pointer;
-    margin: 5px;
-    display: inline-block;
-  }
-.time{position:absolute;bottom:52px;color:#fff;font-size:14px;left:30px}
-.del{position: absolute;top:30px;right:30px;color:rgb(199, 0, 0);font-size:20px;font-weight:bold;display:none;}
-.el-card{
-    position:relative;
-    .bottom{
-        font-size:14px;
-        color:#666;
-        display:flex;
-        align-items: center;
-        justify-content:center;
-        img{margin-right:5px;width:16px;}
-        }
-    }
-.el-card:hover{
-    .del{display:block}
-}
-</style>

文件差异内容过多而无法显示
+ 0 - 13586
src/pages/personage/citydata.js


+ 0 - 296
src/pages/personage/personMsg.vue

@@ -1,296 +0,0 @@
-<template>
-   <div>
-      <el-breadcrumb separator-class="el-icon-arrow-right">
-         <el-breadcrumb-item>个人中心</el-breadcrumb-item>
-      </el-breadcrumb> 
-       <el-card class="card">
-        <el-form
-            class="form"
-				ref="userMsgRef"
-				:model="userMsg"
-				label-width="90px"
-            :rules="editUserMsgRules"
-			> 
-            <el-form-item label="用户头像:" prop="newPass">
-               <el-upload
-						class="avatar-uploader"
-						action
-						:auto-upload="false"
-						:show-file-list="false"
-						:on-change="changeUpload">
-						<img v-if="userMsg.image" :src="userMsg.image" class="avatar" />
-						<i v-else class="el-icon-plus avatar-uploader-icon"></i>
-					</el-upload>
-               <div class="hint">仅支持jpg、gif、jpeg、bmp格式,文件小于4M</div>
-				</el-form-item>
-            <el-form-item label="用户名:" prop="">
-					<el-input type="text" disabled="disabled" v-model="userMsg.username"></el-input>
-				</el-form-item>
-             <el-form-item label="联系方式: " prop="mobile">
-					<el-input type="mobile" v-model="userMsg.mobile" maxlength=11></el-input>
-				</el-form-item>
-				<el-form-item label="地址:">
-               <div class="block">
-                  <el-cascader
-                     placeholder="搜索:河南"
-                     v-model="cityValue"
-                     :options="options"
-                     :props="props"
-                     @change="handleChange"
-                     filterable>
-                  </el-cascader>
-               </div>
-				</el-form-item>
-				<el-form-item label="邮箱:" prop="email">
-					<el-input type="email" v-model="userMsg.email" ></el-input>
-				</el-form-item>
-            <el-form-item>
-               <el-button type="primary" @click="saveUserMsg">保存</el-button>
-               <el-button @click="resetForm">取消</el-button>
-            </el-form-item>
-			</el-form>
-       </el-card>
-       <!-- vueCropper 剪裁图片实现-->
-		<el-dialog title="图片剪裁" :visible.sync="cropperVisible" append-to-body>
-			<div class="cropper-content">
-				<div style="width:100%;height:500px">
-					<vueCropper
-						ref="cropper"
-						:img="photo.img"
-						autoCrop
-						centerBox
-						fixed
-						:fixedNumber="photo.fixedNumber"
-						:outputSize="photo.size"
-						:outputType="photo.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>
-   </div>
-</template>
-
-<script>
-   import cityArr from './citydata.js'
-   export default {
-      data(){
-         var telRexEx = (rule, value, callback) => {
-            if (value) {
-               if(!(/^1[3456789]\d{9}$/.test(value))){ 
-                  callback(new Error('手机号码有误,请重填'));
-                  return false; 
-               }else{
-                  callback();
-               }
-            } else {
-               // callback(new Error('请输入联系方式'));
-               callback();
-            }
-         };
-         var emailRexEx = (rule, value, callback) => {
-            if (value) {
-               // if(!(/^[A-Za-z0-9\u4e00-\u9fa5]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/.test(value))){ 
-               if(!(/^[0-9|A-z|]{6,18}[@][0-9|A-z]{1,3}.(com)$/.test(value))){ 
-                  callback(new Error('邮箱有误,请重填'));
-                  return false; 
-               }else{
-                  callback();
-               }
-            }else{
-               callback();
-            }
-         };
-         return {
-            userMsg:{
-               ret:'',
-               mobile:'',
-               province:'',
-               city:'',
-               district:'',
-               image:'',
-               email:'',
-               username:''
-            },
-            cityValue:[],
-            options: cityArr,
-            props: {
-               expandTrigger: 'hover',
-               value:'value',
-            },
-            cropperVisible: false,
-            // 裁剪组件的基础配置option
-            photo: {
-               img:'', // 裁剪图片的地址
-               info: true, // 裁剪框的大小信息
-               outputSize: 0.8, // 裁剪生成图片的质量
-               outputType: 'jpeg', // 裁剪生成图片的格式
-               // canScale: false, // 图片是否允许滚轮缩放
-               // autoCrop: true, // 是否默认生成截图框
-               // autoCropWidth: 300, // 默认生成截图框宽度
-               // autoCropHeight: 200, // 默认生成截图框高度
-               // fixedBox: true, // 固定截图框大小 不允许改变
-               fixed: true, // 是否开启截图框宽高固定比例
-               fixedNumber: [1, 1], // 截图框的宽高比例
-               full: true, // 是否输出原图比例的截图
-               canMoveBox: false, // 截图框能否拖动
-               original: false, // 上传图片按照原始比例渲染
-               centerBox: false, // 截图框是否被限制在图片里面
-               infoTrue: true // true 为展示真实输出图片宽高 false 展示看到的截图框宽高
-            },
-            // 表单验证
-            editUserMsgRules: {
-               mobile: [
-                  { validator: telRexEx, trigger: 'blur' }
-               ],
-               email: [
-                  {  validator: emailRexEx, trigger: 'blur' }
-               ]
-            },
-            
-         }
-      },
-      created(){
-         this.getRoleList()
-      },
-      mounted(){
-         // this.getRoleList()
-      },
-      methods:{
-         resetForm() {
-            this.$refs.userMsgRef.resetFields();
-         },
-         getRoleList(){
-            let that = this;
-            this.$axios({
-               method:'POST',
-               url:'/api/api_gateway?method=home.homes.personal_center',
-               data:this.qs.stringify({username:localStorage.getItem('username')})
-            }).then(res=>{
-               if(res.data.message==""){
-                  that.userMsg=res.data.data;
-                  that.cityValue = [res.data.data.province,res.data.data.city,res.data.data.district]
-               }
-            })
-         },
-         saveUserMsg(){
-            this.$refs.userMsgRef.validate((valid) => {
-               console.log(11111)
-               if (valid) {
-                  this.userMsg.ret = 'change'
-                  this.$axios({
-                     method:'POST',
-                     url:'/api/api_gateway?method=home.homes.personal_center',
-                     data:this.qs.stringify(this.userMsg)
-                  }).then(res=>{
-                     if(res.data.message==""){
-                        this.$message.success('修改成功!')
-                     }else{
-                        this.$message.error('修改失败!')
-                     }
-                  })
-               } else {
-                  return false
-               }
-            })
-            
-         },
-         // 上传按钮   限制图片大小
-         changeUpload(file, fileList) {
-            const isLt4M = file.size / 1024 / 1024 < 4
-            if (!isLt4M) {
-               this.$message.error('上传文件大小不能超过 4MB!')
-               return false
-            }
-            // 上传成功后将图片地址赋值给裁剪框显示图片
-            this.$nextTick(() => {
-               this.photo.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('image', resFile)
-               form.append('username', localStorage.getItem('username'))
-
-               this.cropperVisible = false
-               this.$axios({
-                  method: 'POST',
-                  url: '/api/api_gateway?method=home.homes.personal_photo',
-                  data: form
-               }).then((res) => {
-                  if (res.data.data.src != 0 && res.data.message == '') {
-                     this.userMsg.image = `/api/${res.data.data.src}`
-                  }else{
-                     this.$message({
-                        message: '上传失败',
-                        type: 'error'
-                     })
-                  }
-               })
-            })
-         },
-         //转成file
-         blobToFile(Blob, fileName) {
-            Blob.lastModifiedDate = new Date();
-            Blob.name = fileName;
-            return Blob;
-         },
-         handleChange(value) {
-            console.log(value)
-            console.log(this.cityValue)
-            this.userMsg.province = value[0]
-            this.userMsg.city = value[1]
-            this.userMsg.district = value[2]
-         }
-         
-      }
-   }
-</script>
-
-<style lang='less' scoped>
-   .card{
-      min-height: 80vh;
-      .form{
-         // width: 50%;
-         // 头像上传
-         .avatar-uploader .el-upload {
-            border: 1px dashed #d9d9d9;
-            border-radius: 6px;
-            cursor: pointer;
-            position: relative;
-            overflow: hidden;
-         }
-         .avatar-uploader .el-upload:hover {
-            border-color: #409EFF;
-         }
-         .avatar-uploader-icon {
-            font-size: 28px;
-            color: #8c939d;
-            width: 150px;
-            height: 150px;
-            line-height: 150px !important;
-            text-align: center;
-         }
-         .avatar {
-            width: 178px;
-            height: 178px;
-            display: block;
-         }
-         .hint{
-            font-size: 12px;
-            color: #707070;
-         }
-         .el-input{
-            width: 220px;
-         }
-      }
-   }
-</style>

+ 0 - 3
src/pages/symanger/resultInfo/resultInfoList.vue

@@ -49,7 +49,6 @@
 					<div class="btns">
 						<el-button
 							type="primary"
-							icon="el-icon-female"
 							size="mini"
 							plain
 							@click="lookProduct(item.backcode)"
@@ -57,7 +56,6 @@
 						>
 						<el-button
 							type="primary"
-							icon="iconfont icon-zhuti_tiaosepan_o"
 							size="mini"
 							plain
 							@click="editProduct(item.backcode)"
@@ -65,7 +63,6 @@
 						>
 						<el-button
 							type="primary"
-							icon="iconfont icon-zhuti_tiaosepan_o"
 							size="mini"
 							plain
 							@click="showQRcodeFun(item.id)"

+ 0 - 18
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
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
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
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 - 755
src/pages/systemmanger/UserGroupManger.vue

@@ -1,755 +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.role_logo == ''">
-								<img
-									:src="
-										require('@/assets/images/equipdistribute/user.png')
-									"
-								/>
-							</template>
-							<img v-else :src=" 'api/' + item.role_logo" alt="" class="">
-						</span>
-						<p>{{ item.role_describe }}</p>
-					</div>
-					<div class="detail">
-						<p>
-							创建时间
-							<span>{{ (item.role_cre_time * 1000) | 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"
-			:page-size="12"
-			@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 * 1000) | formatTime }}</span>
-			</p>
-			<p>
-				<span>首页主题 :</span>
-				<span>{{ userDetail.role_header }}</span>
-			</p>
-			<p>
-				<span>首页logo :</span>
-				<span>
-					<img style="width: 4rem; height: 2.5rem" :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="avatar-uploader"
-						ref="upload"
-						:http-request="ImgUploadSectionFile"
-						:with-credentials="true"
-						:auto-upload="false"
-						accept=".png, .jpg, .gif, .svg"
-						action
-						:on-change="handleChange"
-						list-type="list"
-						:file-list="fileList"
-						multiple
-						:show-file-list="false"
-					>
-						<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>
-
-		<!-- vueCropper 剪裁图片实现-->
-		<el-dialog
-			title="图片剪裁"
-			:close-on-click-modal="false"
-			:visible.sync="cropperVisible"
-			width="500px"
-		>
-			<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"
-						:high="option.high"
-						mode="cover"
-						:max-img-size="option.max"
-					></vue-cropper>
-				</div>
-			</div>
-			<div slot="footer" class="dialog-footer">
-				<el-button @click="cropperVisible = false">取 消</el-button>
-				<el-button type="primary" @click="cropperFinish">确认</el-button>
-			</div>
-		</el-dialog>
-	</div>
-</template>
-
-<script>
-export default {
-	data() {
-		return {
-			// 裁剪组件的基础配置option
-			cropperVisible: false,
-			option: {
-				img: null,
-				size: 1,
-				full: false,
-				outputType: 'png',
-				canMove: true,
-				fixed: false,
-				// fixedNumber: [16, 9],
-				// fixedNumber: [7, 6],
-				fixedBox: false,
-				original: false,
-				canMoveBox: true,
-				autoCrop: true,
-				// 只有自动截图开启 宽度高度才生效
-				autoCropWidth: 160,
-				autoCropHeight: 150,
-				centerBox: false,
-				high: true,
-				max: 99999
-			},
-			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, //角色描述
-				add_role: 'add', //角色描述
-				role_describe: 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)
-				})
-		},
-
-		// // 上传过图片编辑保存
-		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)
-				})
-			that.clearUploadBox()
-		},
-
-		clearUploadBox() {
-			this.userDetail.role_logo = ''
-		},
-		handleChange(file, fileList) {
-			if (!/\.(gif|jpg|jpeg|png|bmp|GIF|JPG|PNG)$/.test(file.raw.name)) {
-				alert('图片类型必须是.gif,jpeg,jpg,png,bmp中的一种')
-				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]))
-				} else {
-					data = e.target.result
-				}
-				this.option.img = data
-			}
-			this.cropperVisible = true
-			reader.readAsArrayBuffer(file.raw)
-			this.fileList = fileList
-		},
-		//转成blob
-		blobToFile(Blob, fileName) {
-			Blob.lastModifiedDate = new Date()
-			Blob.name = fileName
-			return Blob
-		},
-		cropperFinish() {
-			this.$refs.cropper.getCropData((data) => {
-				this.userDetail.role_logo = data
-				this.cropperVisible = false
-				this.btnShow = true
-			})
-			this.$refs.upload.submit()
-		},
-
-		// 编辑保存
-		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: 100%;
-				border-radius: 50px;
-			}
-		}
-		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 - 953
src/pages/systemmanger/UserManger.vue

@@ -1,953 +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' }
-				],
-				mobile: [
-					{ required: true,  trigger: 'blur',message: '手机号不能为空'},
-					{ 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.message=='') {
-						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
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
src/pages/systemmanger/citydata.js


+ 1 - 363
src/router/index.js

@@ -11,74 +11,6 @@ Router.prototype.push = function push(location) {
 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')
-const CbdDataDetails = () => import( /* webpackChunkName: "qxz" */ '@/Pages/forecasting/cbd/DataDetails')
-const cbdDataPhotos = () => import( /* webpackChunkName: "qxz" */ '@/Pages/forecasting/cbd/CbdDataPhotos')
-const PestsStats = () => import( /* webpackChunkName: "qxz" */ '@/Pages/forecasting/cbd/PestsStats')
-const MessageWarn = () => import( /* webpackChunkName: "qxz" */ '@/Pages/forecasting/cbd/MessageWarn')
-
-
-//---------------------------------------测报模块-----------------------------孢子仪-------------------------
-const Bzy = () => import( /* webpackChunkName: "bzy" */ '@/Pages/forecasting/bzy/Bzy')
-const BzyPhotos = () => import( /* webpackChunkName: "bzy" */ '@/Pages/forecasting/bzy/BzyPhotos')
-const DataDetail = () => import( /* webpackChunkName: "bzy" */ '@/Pages/forecasting/bzy/DataDetail')
-
-//---------------------------------------测报模块-----------------------------性诱测报-------------------------
-const Xycb = () => import( /* webpackChunkName: "xycb" */ '@/Pages/forecasting/xycb/Xycb')
-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')
@@ -105,26 +37,6 @@ 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 expertPostList from '@/pages/expertDiagnosis/posts/PostList'
-import expertPostDetail from '@/pages/expertDiagnosis/posts/PostDetail'
-//---------------------------------------售后服务----------------------------------------------------
-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)
 
@@ -134,220 +46,12 @@ export default new Router({
       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,
-          meta: {
-            keepAlive: true //留存数据
-          }
-        },
-        {
-          path: 'cbdDataDetails/:e_id/:d_id',
-          name:"CbdDataDetails",
-          component: CbdDataDetails
-        },
-        {
-          path: 'cbdDataPhotos/:id',
-          name:'cbdDataPhotos',
-          component: cbdDataPhotos
-        },
-        {
-          path: 'pestsStats/:d_id/:id',
-          name:'PestsStats',
-          component: PestsStats
-        },
-        {
-          path: 'messageWarn/:id',
-          name:'MessageWarn',
-          component: MessageWarn
-        },
-        //------------------测报模块-------------监控-------------
-        {
-          path: 'monitor',
-          component: Monitor,
-        },
-        {
-          path: 'photoView/:id',
-          component: PhotoView
-        },
-        //------------------测报模块-------------孢子仪-------------
-        {
-          path: 'bzy',
-          component: Bzy,
-          meta: {
-            keepAlive: true //留存数据
-          }
-        },
-        {
-          path: 'bzyPhotos/:id',
-          name:'BzyPhotos',
-          component: BzyPhotos
-        },
-        {
-          path: 'dataDetail/:e_id/:d_id',
-          name:'DataDetail',
-          component: DataDetail
-        },
-        //------------------测报模块-------------性诱测报-------------
-        {
-          path: 'xycb',
-          component: Xycb,
-          meta: {
-            keepAlive: true //留存数据
-          }
-        },
-        {
-          path: 'xycbDataPhotos/:id',
-          name:'xycbDataPhotos',
-          component: xycbDataPhotos
-        },
-        {
-          path: 'xycbDataDetail/:e_id/:d_id',
-          name:'xycbDataDetail',
-          component: xycbDataDetail
-        },
-        //------------------测报模块-------------糖醋测报-------------
-        {
-          path: 'tccb',
-          component: Tccb,
-          meta: {
-            keepAlive: true //留存数据
-          }
-        },
-        {
-          path: 'tcDataPhotos/:id',
-          component: TcDataPhotos
-        },
-        {
-          path: 'tcDataDetail/:e_id/:d_id',
-          component: TcDataDetail
-        },
-        //------------------防治模块-------------杀虫灯-------------
-        {
-          path: 'scd',
-          component: Scd,
-          meta: {
-            keepAlive: true //留存数据
-          }
-        },
-        {
-          path: 'scdDetail/:e_id/:d_id',
-          name:'ScdDetail',
-          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',
@@ -423,72 +127,6 @@ export default new Router({
           path: 'farmThingTransport',
           component: FarmThingTransport
         },
-        //-------------------四情基地管理---------------------
-        {
-          path: 'fourMoodBase',
-          component: FourMoodBase
-        },
-        {
-          path: 'baseShow',
-          component: BaseShow
-        },
-        //-------------------专家诊断---------------------
-        {
-          path: 'expertAnswers',
-          component: ExpertAnswers
-        },
-        {
-          path: 'expertDatabase',
-          component: ExpertDatabase,
-          meta:{
-            login_require: false,
-          }
-        },
-        {
-          path: 'expertIntr',
-          component: ExpertIntr
-        },
-        {
-          path: 'picRec',
-          component: PicRec
-        },
-        {
-          path: 'expertAudit',
-          component: expertAudit
-        },
-        {
-          path: 'expertWriteBack',
-          component: expertWriteBack
-        },
-        {
-          path: 'expertPostList',
-          component: expertPostList
-        },
-        {
-          path: 'expertPostDetail',
-          component: expertPostDetail
-        },
-        //-------------------售后管理---------------------
-        {
-          path: 'saleAppli',
-          component: SaleAppli
-        },
-        {
-          path: 'saleAfterDetail',
-          component: SaleAfterDetail
-        },
-        {
-          path: 'saleAllotPeople',
-          component: SaleAllotPeople
-        },
-        {
-          path: 'progressInquiry',
-          component: ProgressInquiry
-        },
-        {
-          path: 'mRecords',
-          component: MRecords
-        },
       ]
     },
     //-------------------溯源模块-----------溯源中心----------

二进制
static/images/cure/scd/stateIcon/1.png


二进制
static/images/cure/scd/stateIcon/10.png


二进制
static/images/cure/scd/stateIcon/11.png


二进制
static/images/cure/scd/stateIcon/12.png


二进制
static/images/cure/scd/stateIcon/2.png


二进制
static/images/cure/scd/stateIcon/3.png


二进制
static/images/cure/scd/stateIcon/4.png


二进制
static/images/cure/scd/stateIcon/5.png


二进制
static/images/cure/scd/stateIcon/6.png


二进制
static/images/cure/scd/stateIcon/7.png


二进制
static/images/cure/scd/stateIcon/8.png


二进制
static/images/cure/scd/stateIcon/9.png


二进制
static/images/expertDiagnosis/ku/1.png


二进制
static/images/expertDiagnosis/ku/2.png


二进制
static/images/expertDiagnosis/ku/3.png


二进制
static/images/expertDiagnosis/qiyu/1.png


二进制
static/images/expertDiagnosis/qiyu/2.png


二进制
static/images/expertDiagnosis/qiyu/3.png


二进制
static/images/expertDiagnosis/qiyu/4.png


+ 0 - 0
static/images/expertDiagnosis/qiyu/5.png


部分文件因为文件数量过多而无法显示