yf_zd 4 роки тому
батько
коміт
c7ddcd561d
100 змінених файлів з 119 додано та 48763 видалено
  1. 1 1
      src/components/Login.vue
  2. 8 8
      src/components/highStand/sidebar.vue
  3. 10 106
      src/components/index.vue
  4. 1 1
      src/main.js
  5. 0 141
      src/pages/afterSale/AllotPeople.vue
  6. 0 18
      src/pages/afterSale/MRecords.vue
  7. 0 18
      src/pages/afterSale/ProgressInquiry.vue
  8. 0 369
      src/pages/afterSale/SaleAfterdetail.vue
  9. 0 478
      src/pages/afterSale/SaleAppli.vue
  10. 0 922
      src/pages/cure/scd/scd.vue
  11. 0 747
      src/pages/cure/scd/scdDetail.vue
  12. 0 301
      src/pages/equipmanger/EquipDistribute.vue
  13. 0 694
      src/pages/equipmanger/EquipList.vue
  14. 0 239
      src/pages/equipmanger/FaultList.vue
  15. 0 463
      src/pages/equipmanger/FaultUp.vue
  16. 0 248
      src/pages/equipmanger/UserList.vue
  17. 0 496
      src/pages/expertDiagnosis/expertAnswers/ExpertAnswers.vue
  18. 0 705
      src/pages/expertDiagnosis/expertAudit/expertAudit.vue
  19. 0 1659
      src/pages/expertDiagnosis/expertDatabase/ExpertDatabase.vue
  20. 0 701
      src/pages/expertDiagnosis/expertIntr/ExpertIntr.vue
  21. 0 513
      src/pages/expertDiagnosis/expertWriteBack/expertWriteBack.vue
  22. 0 812
      src/pages/expertDiagnosis/picRec/PicRec.vue
  23. 0 345
      src/pages/expertDiagnosis/posts/PostDetail.vue
  24. 0 455
      src/pages/expertDiagnosis/posts/PostList.vue
  25. 0 1054
      src/pages/forecasting/bzy/Bzy.vue
  26. 0 480
      src/pages/forecasting/bzy/BzyPhotos.vue
  27. 0 626
      src/pages/forecasting/bzy/DataDetail.vue
  28. 0 994
      src/pages/forecasting/cbd/Cbd.vue
  29. 0 1089
      src/pages/forecasting/cbd/DataDetails.vue
  30. 0 646
      src/pages/forecasting/cbd/MessageWarn.vue
  31. 0 1460
      src/pages/forecasting/cbd/PestsStats copy.vue
  32. 0 2343
      src/pages/forecasting/cbd/PestsStats.vue
  33. 0 2013
      src/pages/forecasting/cbd/cbdDataPhotos.vue
  34. 0 436
      src/pages/forecasting/tccb/TcDataDetail.vue
  35. 0 330
      src/pages/forecasting/tccb/TcDataPhotos.vue
  36. 0 783
      src/pages/forecasting/tccb/Tccb.vue
  37. 0 1024
      src/pages/forecasting/xycb/xycb.vue
  38. 0 680
      src/pages/forecasting/xycb/xycbDataDetail.vue
  39. 0 337
      src/pages/forecasting/xycb/xycbDataPhotos.vue
  40. 0 767
      src/pages/fourMoodBase/baseManage.vue
  41. 0 1426
      src/pages/fourMoodBase/baseShow.vue
  42. 0 78
      src/pages/hjjc/environmentMonitor/Data24.vue
  43. 0 1102
      src/pages/hjjc/environmentMonitor/EnvironmentMonitor.vue
  44. 0 343
      src/pages/hjjc/environmentMonitor/HistoryData.vue
  45. 0 55
      src/pages/plantGuard/animate.vue
  46. 0 314
      src/pages/plantGuard/baseAll区域划分海量点展示.vue
  47. 0 529
      src/pages/plantGuard/baseAll半成品.vue
  48. 0 335
      src/pages/plantGuard/baseAll海量点.vue
  49. 0 13586
      src/pages/plantGuard/citydata.js
  50. 0 123
      src/pages/plantGuard/dialog.vue
  51. 0 126
      src/pages/plantGuard/dialogHollow.vue
  52. 0 0
      src/pages/plantGuard/equipManage/equipManage.vue
  53. 0 0
      src/pages/plantGuard/monitor/Monitor.vue
  54. 0 0
      src/pages/plantGuard/monitor/MonitorOld.vue
  55. 0 0
      src/pages/plantGuard/monitor/PhotoView.vue
  56. 0 1154
      src/pages/plantGuard/page1 copy.vue
  57. 0 44
      src/pages/plantGuard/page2.vue
  58. 0 71
      src/pages/plantGuard/page3.vue
  59. 34 253
      src/pages/plantGuard/page1.vue
  60. 2 2
      src/pages/plantGuard/baseAll.vue
  61. 0 0
      src/pages/plantGuard/plantProtection/baseComponents/MapInfoWindow.vue
  62. 0 0
      src/pages/plantGuard/plantProtection/baseComponents/bzyTabPhoto.vue
  63. 0 0
      src/pages/plantGuard/plantProtection/baseComponents/cbdTabPestStat.vue
  64. 0 0
      src/pages/plantGuard/plantProtection/baseComponents/cbdTabPhoto.vue
  65. 0 0
      src/pages/plantGuard/plantProtection/baseComponents/equipHistoryDate.vue
  66. 0 0
      src/pages/plantGuard/plantProtection/baseComponents/equipHistoryDateQxz.vue
  67. 6 6
      src/pages/plantGuard/equipInfo.vue
  68. 0 0
      src/pages/plantGuard/plantProtection/baseComponents/equipState.vue
  69. 0 0
      src/pages/plantGuard/plantProtection/baseComponents/equipStateQxz.vue
  70. 0 0
      src/pages/plantGuard/plantProtection/baseComponents/equipState_dict.json
  71. 0 0
      src/pages/plantGuard/plantProtection/baseComponents/qxz_dict.json
  72. 0 0
      src/pages/plantGuard/plantProtection/baseComponents/twentyFourHistoryDate.vue
  73. 0 0
      src/pages/plantGuard/plantProtection/bzyPhoto.vue
  74. 7 7
      src/pages/plantGuard/cbdPestStats.vue
  75. 41 49
      src/pages/plantGuard/cbdPhoto/cbdPhoto.vue
  76. 0 0
      src/pages/plantGuard/plantProtection/equipCtrls/bzyctrl.vue
  77. 0 0
      src/pages/plantGuard/plantProtection/equipCtrls/cbdctrl.vue
  78. 0 0
      src/pages/plantGuard/plantProtection/equipCtrls/qxzctrl.vue
  79. 0 0
      src/pages/plantGuard/plantProtection/equipCtrls/scdctrl.vue
  80. 0 0
      src/pages/plantGuard/plantProtection/equipCtrls/simCode.vue
  81. 0 0
      src/pages/plantGuard/plantProtection/equipCtrls/xycbctrl.vue
  82. 1 1
      src/pages/plantGuard/warn/cbdMsgWarn.vue
  83. 0 0
      src/pages/plantGuard/plantProtection/warn/qxzMsgWarn.vue
  84. 0 0
      src/pages/plantGuard/sysManage/allotEquip.vue
  85. 0 0
      src/pages/plantGuard/sysManage/citydata.js
  86. 7 4
      src/pages/personage/personMsg.vue
  87. 0 0
      src/pages/plantGuard/sysManage/roleManage.vue
  88. 0 0
      src/pages/plantGuard/sysManage/topicManage.vue
  89. 1 1
      src/pages/plantGuard/page4.vue
  90. 0 325
      src/pages/symanger/farm/AddBase amap.vue
  91. 0 251
      src/pages/symanger/farm/AddBase.vue
  92. 0 259
      src/pages/symanger/farm/Base.vue
  93. 0 268
      src/pages/symanger/farm/EditBase.vue
  94. 0 427
      src/pages/symanger/farm/Fields.vue
  95. 0 344
      src/pages/symanger/farm/User.vue
  96. 0 447
      src/pages/symanger/farmThing/applyFertilizer.vue
  97. 0 470
      src/pages/symanger/farmThing/harvest.vue
  98. 0 432
      src/pages/symanger/farmThing/more.vue
  99. 0 429
      src/pages/symanger/farmThing/plant.vue
  100. 0 0
      src/pages/symanger/farmThing/sale.vue

+ 1 - 1
src/components/Login.vue

@@ -93,7 +93,7 @@ export default {
 					if(res.data.data.user_type == 1){
 						localStorage.setItem('setHomepage', '/baseAll')
 					}else{
-						localStorage.setItem('setHomepage', '/page1')
+						localStorage.setItem('setHomepage', '/base')
 					}
 					if (this.cState == true) {
 						//是否记住密码

+ 8 - 8
src/components/highStand/sidebar.vue

@@ -21,14 +21,14 @@
 </template>
 
 <script>
-import scdCtrl from '@/pages/plantGuard/equipCtrls/scdctrl' //杀虫灯控制
-import cbdCtrl from '@/pages/plantGuard/equipCtrls/cbdctrl' //测报灯控制
-import cbdMsgWarn from '@/pages/plantGuard/warn/cbdMsgWarn' //短信预警
-import xycbCtrl from '@/pages/plantGuard/equipCtrls/xycbctrl' //性诱测报控制
-import bzyCtrl from '@/pages/plantGuard/equipCtrls/bzyctrl' //孢子仪控制
-import qxzCtrl from '@/pages/plantGuard/equipCtrls/qxzctrl' //气象站控制
-import qxzMsgWarn from '@/pages/plantGuard/warn/qxzMsgWarn' //短信预警
-import simCode from '@/pages/plantGuard/equipCtrls/simCode' //SIM卡流量
+import scdCtrl from '@/pages/plantGuard/plantProtection/equipCtrls/scdctrl' //杀虫灯控制
+import cbdCtrl from '@/pages/plantGuard/plantProtection/equipCtrls/cbdctrl' //测报灯控制
+import cbdMsgWarn from '@/pages/plantGuard/plantProtection/warn/cbdMsgWarn' //短信预警
+import xycbCtrl from '@/pages/plantGuard/plantProtection/equipCtrls/xycbctrl' //性诱测报控制
+import bzyCtrl from '@/pages/plantGuard/plantProtection/equipCtrls/bzyctrl' //孢子仪控制
+import qxzCtrl from '@/pages/plantGuard/plantProtection/equipCtrls/qxzctrl' //气象站控制
+import qxzMsgWarn from '@/pages/plantGuard/plantProtection/warn/qxzMsgWarn' //短信预警
+import simCode from '@/pages/plantGuard/plantProtection/equipCtrls/simCode' //SIM卡流量
 export default {
   props: ["equipId", "equipType","d_id","model"],
   components: {

+ 10 - 106
src/components/index.vue

@@ -143,7 +143,7 @@
 <script>
 //这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等)
 //例如:import 《组件名称》 from '《组件路径》';
-
+import '@/plugin/flexible.js'
 export default {
   //import引入的组件需要注入到对象中才能使用
   components: {},
@@ -171,103 +171,7 @@ export default {
     return {
       that: this,
       logoIcon: "/images/logo.png",
-      menuList: [
-        // {
-        //   name: "农林植保",
-        //   id: "1",
-        //   children: [
-        //     {
-        //       name: "设备列表",
-        //       path: "/page1",
-        //       id: "11"
-        //     },
-        //   ]
-        // },
-        // {
-        //   name: "可视化系统",
-        //   id: "8",
-        //   children: [
-        //     {
-        //       name: "可视化系统",
-        //       path: "/monitor",
-        //       id: "88"
-        //     }
-        //   ]
-        // },
-        // {
-        //   name: "智能灌溉系统",
-        //   id: "2",
-        //   children: [
-        //     {
-        //       name: "系统管理",
-        //       path: "/page3",
-        //       id: "22"
-        //     }
-        //   ]
-        // },
-        // {
-        //   name: "农业水价改革",
-        //   id: "3",
-        //   children: [
-        //     {
-        //       name: "设备列表",
-        //       path: "/page1"
-        //     }
-        //   ]
-        // },
-        // {
-        //   name: "农业地理信息",
-        //   id: "4",
-        //   children: [
-        //     {
-        //       name: "设备列表",
-        //       path: "/page1"
-        //     }
-        //   ]
-        // },
-        // {
-        //   name: "农产品追溯",
-        //   id: "5",
-        //   children: [
-        //     {
-        //       name: "设备列表",
-        //       path: "/page1"
-        //     }
-        //   ]
-        // },
-        // {
-        //   name: "系统管理",
-        //   id: "6",
-        //   children: [
-        //     {
-        //       name: "用户管理",
-        //       path: "/page4",
-        //       id: "22"
-        //     },
-        //     {
-        //       name: "角色管理",
-        //       path: "/page6",
-        //       id: "22"
-        //     },
-        //     {
-        //       name: "主题定制",
-        //       path: "/page7",
-        //       id: "22"
-        //     },
-        //   ]
-        // },
-        // {
-        //   name: "设备管理",
-        //   id: "6",
-        //   children: [
-        //     {
-        //       name: "设备管理",
-        //       path: "/page8",
-        //       id: "22"
-        //     }
-        //   ]
-        // }
-      ],
+      menuList: [],
       leftMenuList: [],
       currTopMenuId: '农林植保',
       currLeftMenuId: '设备列表',
@@ -296,7 +200,7 @@ export default {
         "22": 'icon-chongzhi',
       },
       //动态标签
-      // menuTabs:[{ "path": "/plantGuard/page1", "name": "设备列表", "par": "农林植保", "order": 0 } ],
+      // menuTabs:[{ "path": "/plantGuard/base", "name": "设备列表", "par": "农林植保", "order": 0 } ],
       menuTabs:[],
       menuTabsValue:'',
       username:"",
@@ -458,7 +362,7 @@ export default {
                   "children": [
                      {
                      "name": "设备列表",
-                     "path": "/page1",
+                     "path": "/base",
                      "id": "2"
                      },
                      {
@@ -549,17 +453,17 @@ export default {
                   "children": [
                      {
                      "name": "用户管理",
-                     "path": "/page4",
+                     "path": "/userManage",
                      "id": "14"
                      },
                      {
                      "name": "角色管理",
-                     "path": "/page6",
+                     "path": "/roleManage",
                      "id": "15"
                      },
                      {
                      "name": "主题定制",
-                     "path": "/page7",
+                     "path": "/topicManage",
                      "id": "16"
                      },
                   ]
@@ -570,7 +474,7 @@ export default {
                   "children": [
                      {
                      "name": "设备管理",
-                     "path": "/page8",
+                     "path": "/equipManage",
                      "id": "18"
                      }
                   ]
@@ -589,11 +493,11 @@ export default {
               menuLists[0].children= [
                 {
                   "name": "设备列表",
-                  "path": "/page1",
+                  "path": "/base",
                   "id": "2"
                 }
               ]
-              this.menuTabs = [{ "path": "/plantGuard/page1", "name": "设备列表", "par": "农林植保", "order": 0 }]
+              this.menuTabs = [{ "path": "/plantGuard/base", "name": "设备列表", "par": "农林植保", "order": 0 }]
             }else{
               menuLists[0].children= [
                 {

+ 1 - 1
src/main.js

@@ -200,7 +200,7 @@ router.beforeEach((to, from, next) => {
     } else {
       next()
     }
-  } else if (to.name == 'TracebackDetailApp'||to.name =='TracebackDetail'||to.name =='FaultUp' || to.name =='PlantGuard'||to.name=='Page1'||to.name=='Page2') {
+  } else if (to.name == 'PlantGuard') {
     next()
   } else {
     // let type = to.meta.login_require; //是否需要登录,为了解决扫码在手机上看

+ 0 - 141
src/pages/afterSale/AllotPeople.vue

@@ -1,141 +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="$imghost + defaultimg" />
-					<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 {
-			// defaultimg:'/images/12.jpg',
-			defaultimg:'/images/newImg/12.jpg',
-			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 - 369
src/pages/afterSale/SaleAfterdetail.vue

@@ -1,369 +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" /> -->
-			<img src="@/assets/images/newImg/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 - 478
src/pages/afterSale/SaleAppli.vue

@@ -1,478 +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/12.jpg" alt /> -->
-								<img src="@/assets/images/newImg/12.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="$imghost+kong" />
-				<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 {
-			kong:'/images/saleAfter/kong.png',
-			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 - 922
src/pages/cure/scd/scd.vue

@@ -1,922 +0,0 @@
-<template>
-  <div style="cursor: default">
-    <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" v-loading="loading">
-        <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
-          v-loading="loading"
-          :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>
-    <!-- 暂无数据 -->
-    <div
-      class="expertDiagnosis_referral_units_not"
-      v-if="equipList.length <= 0 && displayType == 1"
-    >
-      <img
-        :src="$imghost + zanwu"
-        alt
-        class="expertDiagnosis_referral_units_notImg"
-      />
-    </div>
-    <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="
-                    $imghost +
-                    '/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 {
-      zanwu: "/images/expertDiagnosis/zanwu.png",
-      //图表和表格切换
-      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,
-      loading: true,
-    };
-  },
-  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;
-          this.loading = false;
-        }
-      });
-    },
-    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]
-              let cardInfo = data.data;
-              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, cmd: "paramconf" }),
-      }).then((res) => {
-        if (res.data.data && 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";
-          data.clt = Number(data.clt);
-          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 - 747
src/pages/cure/scd/scdDetail.vue

@@ -1,747 +0,0 @@
-<template>
-  <div style="cursor: default">
-    <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="$throttle(refresh,2000)">刷新</el-button>
-    </div>
-    <!-- 统计图 -->
-    <div v-if="viewSwitch">
-      <div>
-        <el-row :gutter="10">
-          <el-col :md="24" :lg="14">
-            <el-card class="box-card" id="box-card1">
-              <div class="charts">
-                <highcharts :options="option1"></highcharts>
-              </div>
-            </el-card>
-          </el-col>
-          <el-col :md="24" :lg="10">
-            <el-card class="box-card" id="box-card2">
-              <div class="pie">
-                <highcharts :options="option2"></highcharts>
-              </div>
-            </el-card>
-          </el-col>
-        </el-row>
-        <div class="dataTableSearch">
-          <div>
-            <el-button type="primary" size="mini" @click="deriveData()"
-              >导出</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>
-
-      <!-- 导出对话框 -->
-      <el-dialog title="导出信息" :visible.sync="dialogVisible" width="30%">
-        <!-- <span>这是一段信息</span> -->
-
-        <!-- 下拉框和输入框 -->
-        <ul class="iptUl">
-          <li class="iptList">
-            <div class="iptTxt">
-              <span style="color: red">*</span>文件名称:
-            </div>
-            <div class="iptBox">
-              <el-input
-                placeholder="请输入文件的名称"
-                v-model="value"
-                clearable
-              >
-              </el-input>
-            </div>
-          </li>
-          <li class="iptList">
-            <div class="iptTxt">
-              <span style="color: red">*</span>下载类型:
-            </div>
-            <div class="iptBox">
-              <el-select v-model="value1" placeholder="请选择">
-                <el-option
-                  v-for="item in optionsA"
-                  :key="item.value"
-                  :label="item.label"
-                  :value="item.value"
-                >
-                </el-option>
-              </el-select>
-            </div>
-          </li>
-          <li class="iptList" v-show="timeShow">
-            <div class="iptTxt"><span style="color: red">*</span>时间段:</div>
-            <div class="iptBox">
-              <el-date-picker
-                v-model="value2"
-                type="daterange"
-                range-separator="至"
-                start-placeholder="开始日期"
-                end-placeholder="结束日期"
-              >
-              </el-date-picker>
-            </div>
-          </li>
-        </ul>
-        <!-- 下拉框和输入框 -->
-
-        <span slot="footer" class="dialog-footer">
-          <el-button @click="dialogVisible = false">取 消</el-button>
-          <el-button type="primary" @click="addData()">确 定</el-button>
-        </span>
-      </el-dialog>
-      <!-- 导出对话框 -->
-    </div>
-  </div>
-</template>
-
-<script>
-import DateSearch from "@/components/DateSearch";
-import HighCharts from "highcharts";
-import HighchartsNoData from "highcharts/modules/no-data-to-display";
-HighchartsNoData(HighCharts);
-import { Loading } from "element-ui";
-export default {
-  data() {
-    return {
-      id: this.$route.params.e_id,
-      lineTime: "",
-      dataTime: "",
-      worms: [
-        {
-          value: 1,
-          label: "蛾子",
-        },
-        {
-          value: 2,
-          label: "蚊子",
-        },
-      ],
-      // 状态信息
-      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: [],
-      //导出弹框
-      dialogVisible: false,
-      optionsA: [
-        {
-          value: "选项1",
-          label: "全部",
-        },
-        {
-          value: "选项2",
-          label: "时间段",
-        },
-      ],
-      value: "", //文件名称
-      value1: "", //下载类型
-      value2: "", //时间段
-      timeShow: false, //选择时间
-      loadingInstance1: {},
-      loadingInstance2: {},
-      ChartData: [
-        {
-          name: "温度(°C)",
-          dat: [],
-        },
-        {
-          name: "湿度(%)",
-          dat: [],
-        },
-        {
-          name: "击虫次数",
-          dat: [],
-        },
-        {
-          name:"充电电压",
-          dat:[]
-        },
-         {
-          name:"电池电压",
-          dat:[]
-        }
-      ],
-    };
-  },
-  mounted() {
-    this.refreshData();
-    this.loadingInstance1 = Loading.service({
-      fullscreen: false,
-      target: document.getElementById("box-card1"),
-    });
-    this.loadingInstance2 = Loading.service({
-      fullscreen: false,
-      target: document.getElementById("box-card2"),
-    });
-  },
-  computed: {
-    option1() {
-      return {
-        chart: {
-          zoomType: "x",
-        },
-        title: {
-          text: "环境温度、湿度、充电电压、电池电压",
-          align: "left",
-        },
-        lang: {
-          noData: "暂无数据",
-        },
-        noData: {
-          style: {
-            fontWeight: "bold",
-            fontSize: "15px",
-            color: "#303030",
-          },
-        },
-        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: this.ChartData[0].name,
-            data: this.ChartData[0].dat,
-          },
-          {
-            name: this.ChartData[1].name,
-            data: this.ChartData[1].dat,
-          },
-          {
-            name: this.ChartData[3].name,
-            data: this.ChartData[3].dat,
-          },
-          {
-            name: this.ChartData[4].name,
-            data: this.ChartData[4].dat,
-          },
-        ],
-        colors: ["#f97000", "#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",
-                },
-              },
-            },
-          ],
-        },
-      };
-    },
-    option2() {
-      return {
-        chart: {
-          zoomType: "x",
-        },
-        title: {
-          text: "击虫次数",
-          align: "left",
-        },
-        lang: {
-          noData: "暂无数据",
-        },
-        noData: {
-          style: {
-            fontWeight: "bold",
-            fontSize: "15px",
-            color: "#303030",
-          },
-        },
-        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: this.ChartData[2].name,
-            data: this.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",
-                },
-              },
-            },
-          ],
-        },
-      };
-    },
-  },
-  methods: {
-    // 设置hightcharts配置
-    refreshData() {
-      HighCharts.setOptions({
-        // 所有语言文字相关配置都设置在 lang 里
-        lang: {
-          resetZoom: "刷新",
-          resetZoomTitle: "重置缩放比例",
-        },
-      });
-    },
-    //获取折线数据
-    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 == "" && res.data.data.length !== 0) {
-          var data = res.data.data;
-            for (let item of data) {
-              this.ChartData[0].dat.unshift([
-                item.addtime * 1000 + 8 * 3600000,
-                Number(item.temperature),
-              ]);
-              this.ChartData[1].dat.unshift([
-                item.addtime * 1000 + 8 * 3600000,
-                Number(item.humidity),
-              ]);
-              this.ChartData[2].dat.unshift([
-                item.addtime * 1000 + 8 * 3600000,
-                Number(item.others.ct),
-              ]);
-               this.ChartData[3].dat.unshift([
-                item.addtime * 1000 + 8 * 3600000,
-                Number(item.others.cv/1000),
-              ]);
-                this.ChartData[4].dat.unshift([
-                item.addtime * 1000 + 8 * 3600000,
-                Number(item.others.bv/1000),
-              ]);
-          }
-        }
-        this.loadingInstance1.close();
-        this.loadingInstance2.close();
-      });
-    },
-    //获取表格数据
-    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);
-    },
-
-    // 导出数据
-    deriveData() {
-      this.dialogVisible = true;
-    },
-    //导出数据确定
-    addData() {
-      var that = this;
-      if (that.value == "" && that.value1 == "" && that.value2 == "") {
-        this.$message({
-          message: "请将必填项填写完整",
-          type: "warning",
-          duration: 1500,
-        });
-      } else if (
-        that.value !== "" &&
-        that.value1 == "选项2" &&
-        that.value2 == ""
-      ) {
-        this.$message({
-          message: "请填写导出时间段",
-          type: "warning",
-          duration: 1500,
-        });
-      } else if (
-        that.value !== "" &&
-        (that.value1 == "选项1" ||
-          (that.value1 == "选项2" && that.value2 !== ""))
-      ) {
-        var begin = "";
-        var end = "";
-        if (that.value2) {
-          begin = parseInt(new Date(that.value2[0]).getTime() / 1000);
-          end = parseInt(new Date(that.value2[1]).getTime() / 1000);
-        } else {
-          begin = "";
-          end = "";
-        }
-        window.location.href =
-          this.$deriveData +
-          "/api/cbd_export?device_id=" +
-          that.$route.params.d_id +
-          "&filename=" +
-          that.value +
-          "&start_time=" +
-          begin +
-          "&end_time=" +
-          end +
-          "&device_type=2";
-      }
-    },
-  },
-  components: {
-    DateSearch,
-  },
-  watch: {
-    value1(val) {
-      if (val == "选项2") {
-        this.timeShow = true;
-      }
-      if (val == "选项1") {
-        this.timeShow = false;
-      }
-    },
-    dialogVisible(val) {
-      if (val == false) {
-        this.value = "";
-        this.value1 = "";
-        this.value2 = "";
-        this.timeShow = false;
-      }
-    },
-  },
-};
-</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;
-}
-
-.iptList {
-  display: flex;
-  margin: 15px 0 15px 0;
-}
-.iptTxt {
-  text-align: right;
-  width: 20%;
-  margin: 0 5% 0 0;
-  display: inline-block;
-}
-.iptBox {
-  width: 40%;
-}
-</style>

+ 0 - 301
src/pages/equipmanger/EquipDistribute.vue

@@ -1,301 +0,0 @@
-<template>
-  <div style="cursor: default">
-    <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
-          style="cursor: pointer"
-          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
-          style="cursor: pointer"
-          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
-          @click.native="itemFun(item)"
-          :class="['box-card', item.checked ? 'selected' : '']"
-        >
-          <el-checkbox
-            :ref="'checkboxRef'"
-            v-model="item.checked"
-            @click.native="stopDefault($event)"
-            @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="$imghost + zanwu"
-        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 {
-      zanwu: "/images/expertDiagnosis/zanwu.png",
-      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();
-    },
-    stopDefault(e) {
-      e.stopPropagation();
-    },
-    checkboxChange(event, d_id) {
-      for (let i in this.own_device) {
-        if (!event && d_id == this.own_device[i]) {
-          //取消勾选并且是用户已拥有的设备
-          this.own_device.splice(i, 1);
-        }
-	  }
-    },
-    itemFun(item) {
-      item.checked = !item.checked;
-      this.checkboxChange(item.checked, item.d_id);
-    },
-  },
-};
-</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;
-}
-</style>

+ 0 - 694
src/pages/equipmanger/EquipList.vue

@@ -1,694 +0,0 @@
-<template>
-  <div style="cursor: default">
-    <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
-          style="cursor: pointer"
-          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
-        style="cursor: pointer"
-        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">
-          <i class="del-icon el-icon-delete" @click="delEquip(item.d_id)"></i>
-          <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>
-            <span @click="addFault(item.device_id, item.device_type_id)">
-              <i class="el-icon-edit-outline"></i> 故障上报
-            </span>
-          </div>
-        </el-card>
-      </el-col>
-    </el-row>
-    <!-- 暂无数据 -->
-    <div class="expertDiagnosis_referral_units_not" v-if="dataList.length <= 0">
-      <img
-        :src="$imghost + zanwu"
-        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>
-      <el-amap
-        class="bm-view"
-        vid="amapDemo"
-        :center="center"
-        :amap-manager="amapManager"
-        :zoom="mapZoom"
-        :plugin="plugin"
-        :events='mapEvents'
-      >
-        <el-amap-marker vid="component-marker" v-if="point.length" :position="point"  ></el-amap-marker>
-      </el-amap>
-      <!-- <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>
-    <!-- 故障上报  -->
-    <el-dialog
-      class="map_dialog"
-      title="故障上报"
-      v-if="addFaultDialogVisible"
-      :visible.sync="addFaultDialogVisible"
-      width="500px"
-      @closed="addLocationDialogClosed"
-    >
-      <el-form
-        ref="editFaultform"
-        :rules="editFaultrules"
-        :model="editFault"
-        label-width="80px"
-      >
-        <el-form-item label="设备ID">
-          <el-input v-model="editFault.imei" disabled></el-input>
-        </el-form-item>
-        <el-form-item label="联系人" prop="user">
-          <el-input v-model="editFault.user"></el-input>
-        </el-form-item>
-        <el-form-item label="联系电话" prop="tel">
-          <el-input
-            type="text"
-            maxlength="11"
-            v-model="editFault.tel"
-          ></el-input>
-        </el-form-item>
-        <el-form-item label="故障原因" prop="detail">
-          <el-input type="textarea" v-model="editFault.detail"></el-input>
-        </el-form-item>
-      </el-form>
-      <span slot="footer" class="dialog-footer">
-        <el-button @click="addFaultDialogVisible = false">取 消</el-button>
-        <el-button type="primary" @click="addFaultSubm">确 定</el-button>
-      </span>
-    </el-dialog>
-  </div>
-</template>
-
-<script>
-import VueAMap from "vue-amap";
-let amapManager = new VueAMap.AMapManager();
-export default {
-  data() {
-    var checkphone = (rule, value, callback) => {
-      let phoneReg = /(^1[3|4|5|6|7|8|9]\d{9}$)|(^09\d{8}$)/;
-      if (value == "") {
-        callback(new Error("请输入手机号"));
-      } else if (!phoneReg.test(value)) {
-        //引入methods中封装的检查手机格式的方法
-        callback(new Error("请输入正确的手机号!"));
-      } else {
-        callback();
-      }
-    };
-    return {
-      amapManager,
-      zanwu: "/images/expertDiagnosis/zanwu.png",
-      timeRange: "",
-      queryInfo: {
-        f_id: "",
-        page: 1,
-        device_type_id: null,
-        start_time: "",
-        end_time: "",
-      },
-      dataList: [],
-      totalNum: 0,
-      addr: "",
-      locationForm: {
-        lat: "",
-        lng: "",
-      },
-      editFault: {
-        imei: "",
-        user: "",
-        tel: "",
-        detail: "",
-        type: "",
-      },
-      device_id: "",
-      mapZoom: 6,
-      mapEvents: { 
-        init: (o) => {
-          // console.log(o.getCenter())
-          // console.log(this.$refs.map.$$getInstance())
-          // o.getCity(result => {
-          //   console.log(result)
-          // })
-        },
-        'moveend': () => {
-        },
-        'zoomchange': () => {
-        },
-        'click': (e) => {
-          console.log(this)
-          console.log(e.lnglat)
-          this.point = [e.lnglat.lng,e.lnglat.lat]
-          this.locationForm.lng = e.lnglat.lng;
-          this.locationForm.lat = e.lnglat.lat;
-        }
-      },
-      plugin: [
-        {
-          pName: "ToolBar",
-          events: {
-            init(instance) {
-              console.log(instance);
-            }
-          }
-        },
-        {
-          pName: "Scale",
-          events: {
-            init(instance) {
-              console.log(instance);
-            }
-          }
-        },
-        // {
-        //     pName: 'MapType',
-        //     defaultType: 0,
-        //     events: {
-        //       init(instance) {
-        //         console.log(instance);
-        //       }
-        //     }
-        //   }
-      ],
-      point: { lng: "", lat: "" },
-      center: [104.776123,33.118667],
-      addLocationDialogVisible: false,
-      addFaultDialogVisible: false,
-      editFaultrules: {
-        user: { required: true, message: "请输入联系人", trigger: "blur" },
-        tel: { required: true, validator: checkphone, trigger: "blur" },
-        detail: { required: true, message: "请输入故障原因", trigger: "blur" },
-      },
-    };
-  },
-  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() {
-      this.geocoder = new AMap.Geocoder({
-          city: "全国", //城市设为北京,默认:“全国”
-      });
-      var _this = this;
-      if(!this.addr){
-        this.point = []
-        return false;
-      }
-      this.geocoder.getLocation(this.addr, function(status, result) {
-          if (status === 'complete'&&result.geocodes.length) {
-              var lnglat = result.geocodes[0].location
-              _this.point = [lnglat.lng,lnglat.lat];
-              _this.center = [lnglat.lng,lnglat.lat];
-          }else{
-              log.error('根据地址查询位置失败');
-          }
-      });
-    },
-    // 修改设备名称
-    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.lng,this.locationForm.lat];
-        this.center = [this.locationForm.lng,this.locationForm.lat];
-      }
-    },
-    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.center = [lng, lat ];
-      this.locationForm.lng = lng
-      this.locationForm.lat = lat
-      this.addLocationDialogVisible = true;
-    },
-    // 故障上报
-    addFault(device_id, type) {
-      this.device_id = device_id;
-      this.editFault.imei = device_id;
-      this.editFault.type = type;
-      this.addFaultDialogVisible = true;
-    },
-    changePage(val) {
-      console.log(val);
-      this.queryInfo.page = val;
-      this.getList();
-    },
-    //关闭定位弹框时调用
-    addLocationDialogClosed() {
-      this.locationForm = { lat: "", lng: "" };
-      this.point = [0,0];
-      this.center = [113.271429, 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[1],
-          lng: this.point[0],
-        }),
-      }).then((res) => {
-        if (res.data.message == "") {
-          this.getList();
-          this.$message({
-            type: "success",
-            message: "定位成功",
-          });
-        } else {
-          this.$message({
-            type: "error",
-            message: "定位失败",
-          });
-        }
-      });
-      this.addLocationDialogVisible = false;
-    },
-    addFaultSubm() {
-      this.$refs.editFaultform.validate((valid) => {
-        if (valid) {
-          this.$axios({
-            method: "POST",
-            url:
-              "/api/api_gateway?method=after_sale.after_sale_manage.aftersale_apply",
-            data: this.qs.stringify({
-              device_id: this.device_id,
-              errordesc: this.editFault.detail,
-              errorimg: [],
-              addr: "",
-              user: this.editFault.user,
-              userphone: this.editFault.tel,
-              repairtime: "",
-              d_type: this.editFault.type,
-              is_pc: "1", //0 手机  1 电脑
-              errorvideo: "",
-            }),
-          }).then((res) => {
-            if (res.data.message == "") {
-              this.$message({
-                type: "success",
-                message: "修改成功",
-              });
-              this.addFaultDialogVisible = false;
-            } else {
-              this.$message({
-                type: "error",
-                message: res.data.message,
-              });
-            }
-          });
-        } else {
-          return false;
-        }
-      });
-    },
-    //删除设备
-    delEquip(d_id) {
-      this.$confirm("确定删除此设备么?", "提示", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning",
-      })
-        .then(() => {
-          this.$axios({
-            method: "POST",
-            url: "/api/api_gateway?method=device.device_manage.delete_device",
-            data: this.qs.stringify({
-              d_id,
-            }),
-          }).then((res) => {
-            if (res.data.message == "") {
-              this.$message({
-                type: "success",
-                message: "删除成功!",
-			  });
-			  this.getList()
-            } else {
-              this.$message({
-                type: "error",
-                message: res.data.message,
-              });
-            }
-          });
-        })
-        .catch(() => {
-          this.$message({
-            type: "info",
-            message: "已取消删除",
-          });
-        });
-    },
-  },
-};
-</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 {
-  position: relative;
-  .del-icon {
-    display: none;
-    font-size: 16px;
-    position: absolute;
-    right: 10px;
-    top: 10px;
-    color: red;
-    cursor: pointer;
-  }
-  &:hover {
-    .del-icon {
-      display: block;
-    }
-  }
-  .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;
-      border-left: 1px solid #e1e1e1;
-      i {
-        font-size: 16px;
-      }
-    }
-    span:first-child {
-      border-left: none;
-    }
-  }
-}
-.bm-view {
-  width: 100%;
-  height: 400px;
-}
-.map_dialog /deep/ .el-dialog__body {
-  padding: 20px 20px 0 20px;
-}
-</style>

+ 0 - 239
src/pages/equipmanger/FaultList.vue

@@ -1,239 +0,0 @@
-<template>
-	<div style="cursor: default">
-		<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
-					style="cursor: pointer"
-					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>
-		</div>
-		<template>
-			<el-table :data="dataList" stripe>
-				<el-table-column
-					v-for="(item, index) in tableHeadTxt"
-					:key="index"
-					:prop="item[1]"
-					:label="item[0]"
-				>
-				</el-table-column>
-				 <el-table-column
-					label="操作"
-					width="200">
-					<template slot-scope="scope">
-						<el-button size='mini' @click="photoshow(scope.$index)" :class="[dataList[scope.$index].errorimg.length>3?'photoseebtn':'']">故障图片</el-button>
-						<el-button size='mini' @click="videoshow(scope.$index)" :class="[dataList[scope.$index].errorvideo?'videoseebtn':'']" >故障视频</el-button>
-					</template>
-				</el-table-column>
-			</el-table>
-		</template>
-		<el-pagination
-			v-if="dataList.length > 0"
-			background
-			:current-page='page'
-			layout="prev, pager, next"
-			:page-size="12"
-			:total="totalNum"
-			@current-change="changePage"
-		></el-pagination>
-		<!-- 查看大图 -->
-		<viewer	
-			v-show="imageListtstatus"
-			:images="imageListtData"
-			@inited="inited"
-		>
-			<img v-for="(src, index) in imageListtData" :src="src" :key="index" />
-		</viewer>
-		<!-- 查看视频 -->
-		<el-dialog
-			title="故障视频"
-			:visible.sync="videodialogVisible"
-			width="35%"
-			:before-close="videohandleClose">
-			<div>
-				<video width="100%" :src="DOMIN+videosrc" controls autoplay></video>
-			</div>
-		</el-dialog>
-	</div>
-</template>
-
-<script>
-export default {
-	data() {
-
-		return {
-			// 动态表头
-			tableHeadTxt: [
-				['设备id','device_id'],
-				['设备类型','device_type'],
-				['位置','addr'],
-				['联系人','user'],
-				['联系电话','userphone'],
-				['故障原因','errordesc'],
-				['上报时间','uptime'],
-			],
-			dataList: [],
-			totalNum: 0,
-			page:1,
-			queryInfo:{
-				device_type_id:'',
-				f_id:''
-			},
-			imageListtstatus:false,
-			imageListtData:[],
-			videodialogVisible:false,
-			videosrc:''
-		}
-	},
-	mounted() {
-		this.getList()
-	},
-	beforeMount() {},
-	methods: {
-		getList(){
-			this.$axios({
-				method: 'POST',
-				url: '/api/api_gateway?method=after_sale.after_sale_manage.aftersale_info',
-				data: this.qs.stringify({
-					device_type_id:this.queryInfo.device_type_id,
-					f_id:this.queryInfo.f_id,
-					page:this.page
-				})
-			}).then((res) => {
-				if (res.data.message == '') {
-					this.dataList = []
-					res.data.data.data.forEach((item) => {
-						item.device_type = this.equipType(item.device_type)
-						item.addr = item.addr || '--'
-						item.errorimg = item.errorimg || ''
-						item.uptime = new Date(parseInt(item.uptime) * 1000).toLocaleString().replace(/:\d{1,2}$/,' '); 
-						this.dataList.push(item)
-					});
-					// this.dataList = res.data.data.data 
-					this.totalNum = res.data.data.counts
-				}
-			})
-		},
-		changePage(val){
-			this.page = val;
-			this.getList();
-		},
-		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
-				default:
-					return '--'
-			}
-		},
-		searchChange(){
-			this.getList()
-		},
-		photoshow(index){
-			if(this.dataList[index].errorimg && this.dataList[index].errorimg.length>2){
-				this.imageListtData = JSON.parse(this.dataList[index].errorimg)
-				this.$viewer.show()
-			}else{
-				this.$message({
-					type:'error',
-					message:'暂无图片'
-				})
-			}
-		},
-		videoshow(index){
-			if(this.dataList[index].errorvideo){
-				this.videodialogVisible = true;
-				this.videosrc = this.dataList[index].errorvideo;
-			}else{
-				this.$message({
-					type:'error',
-					message:'暂无视频'
-				})
-			}
-		},
-		inited(viewer) {
-			this.$viewer = viewer
-		},
-		videohandleClose(){
-			this.videodialogVisible = false;
-			this.videosrc = ''
-		}
-	},
-}
-</script>
-
-<style lang='less' scoped>
-	.search-box{
-		margin-bottom: 20px;
-		.el-input{
-			width: 200px;
-		}
-	}
-	.photoseebtn{
-		color: #2acdfe;
-		border-color: #2acdfe;
-		outline: none;
-		&:hover{
-			color: #2acdfe;
-			border-color: #2acdfe;
-			outline: none;
-    		background-color: rgba(42,205,254,.07);
-		}
-	}
-	.videoseebtn{
-		color: #fbb40a;
-		border-color: #fbb40a;
-		outline: none;
-		&:hover{
-			color: #fbb40a;
-			border-color: #fbb40a;
-			outline: none;
-    		background-color: rgba(251,180,10,.07);
-		}
-	}
-</style>

+ 0 - 463
src/pages/equipmanger/FaultUp.vue

@@ -1,463 +0,0 @@
-<template>
-	<div class="content">
-		<div class="userinfo plan">
-			<div class="title">基本信息</div>
-			<div class="inputbox">
-				<input :style="{border:result.imei?'1px solid red':''}" type="number" v-model="editFault.imei" @blur='equipIdExp' placeholder="请填写设备ID">
-				<div v-if="result.imei" class="hint">{{result.imei}}</div>
-			</div>
-			<div class="inputbox">
-				<input :style="{border:result.user?'1px solid red':''}" type="text" v-model="editFault.user" @blur='userExp' placeholder="请填写联系人">
-				<div v-if="result.user" class="hint">{{result.user}}</div>
-			</div>
-			<div class="inputbox">
-				<input :style="{border:result.tel?'1px solid red':''}" type="number" v-model="editFault.tel" @blur='telExp' :maxlength="11" placeholder="请填写联系电话">
-				<div v-if="result.tel" class="hint">{{result.tel}}</div>
-			</div>
-		</div>
-		
-		<div class="problems plan">
-			<div class="title">报修详情</div>
-			<div class="inputbox">
-				<textarea :style="{border:result.detail?'1px solid red':''}" name="" v-model="editFault.detail" @blur='detailExp' placeholder="请描述设备问题"></textarea>
-				<div v-if="result.detail" class="hint">{{result.detail}}</div>
-			</div>
-			<div class="plan" style="margin-top:10px">
-				<el-upload
-					ref='photolist'
-					:class="[noneBtnImg?'disUoloadSty':'']"
-					:action='DOMIN+uploadurl'
-					name="img_file"
-					:limit="limitnum"
-					list-type="picture-card"
-					:on-success='loadsuccess'
-					:on-preview="handlePictureCardPreview"
-					:on-remove="handleRemove">
-					<i class="iconfont icon-tupian-xianxing"></i>
-					<p style="font-size:12px">上传图片(可选)</p>
-				</el-upload>
-				<el-dialog :visible.sync="dialogVisible">
-					<img width="100%" :src="dialogImageUrl" alt="">
-				</el-dialog>
-				<!-- 视频 -->
-				<div v-if="editFault.Video !='' && videoFlag == false" style="position:relative" @click="videodelFun">
-					<div class="videodel">
-						<i class="el-icon-delete"></i>
-					</div>
-					<video 
-						:src="DOMIN+editFault.Video" 
-						style="width:100%;margin-top:20px"
-						controls="controls">
-						您的浏览器不支持视频播放
-					</video>	
-				</div>
-				<el-upload
-					accept="video/*"
-					capture="camcorder"
-					v-else
-					class="avatar-uploader"
-					:action="DOMIN+uploadurlvideo"
-					:data="data"
-					name="upload"
-					:show-file-list="false"
-					:on-success="handleVideoSuccess" 
-					:on-progress="uploadVideoProcess" 
-					:before-upload="beforeUploadVideo"> <!-- 验证上传格式 -->
-					<i v-if="editFault.Video =='' && videoFlag == false" class="iconfont icon-luxiang avatar-uploader-icon"></i>
-					<p style="font-size:12px">上传视频(可选)</p>
-					<el-progress v-if="videoFlag == true" type="circle" :percentage="videoUploadPercent" ></el-progress>
-				</el-upload>
-			</div>
-			<div class="submitbox">
-				<button class="submit" @click="addFaultSubm">提交</button>
-			</div>
-		</div>
-	</div>
-</template>
-
-<script>
-export default {
-	data() {
-		var checkphone = (rule, value, callback) => {
-			let phoneReg = /(^1[3|4|5|6|7|8|9]\d{9}$)|(^09\d{8}$)/;
-			if (value == "") {
-			callback(new Error("请输入手机号"));
-			} else if (!phoneReg.test(value)) {//引入methods中封装的检查手机格式的方法
-			callback(new Error("请输入正确的手机号!"));
-			} else {
-			callback();
-			}
-		};
-		return {
-			uploadurl:'/api/api_gateway?method=base.bases.base_photo',
-			uploadurlvideo:'/api/api_gateway?method=after_sale.after_sale_manage.video_upload',
-			editFault:{
-				imei:'',
-				user:'',
-				tel:'',
-				detail:'',
-				photos:[],
-				Video:'',
-				addr:'',
-				type:'',
-			},
-			editFaultrules:{
-				user:{ required: true, message: '请输入联系人', trigger: 'blur' },
-				tel:{ required: true, validator: checkphone, trigger: 'blur' },
-				detail:{ required: true, message: '请输入故障原因', trigger: 'blur' },
-			},
-			dialogImageUrl: '',
-			dialogVisible: false,
-			limitnum:4,
-			noneBtnImg:false,
-			videoFlag:false,
-			videoUploadPercent:0,
-			result:{
-				imei:'',
-				user:'',
-				tel:'',
-				detail:''
-			},
-			data:{
-				device_id:''
-			}
-		}
-	},
-	mounted() {
-		if(navigator.geolocation){
-			navigator.geolocation.getCurrentPosition(this.onSuccess , this.onError);
-		}else{
-			alert("您的浏览器不支持使用HTML 5来获取地理位置服务");
-		}
-	},
-	beforeMount() {},
-	methods: {
-		//文本框校验
-		equipIdExp(){
-			this.$axios({
-				method: 'POST',
-				url: '/api/api_gateway?method=after_sale.after_sale_manage.device_check',
-				data: this.qs.stringify({
-					device_id: this.editFault.imei,
-				})
-			}).then((res) => {
-				this.result.imei = res.data.message
-				if(res.data.message == ''){
-					this.editFault.type = res.data.data.device_type_id
-				}else{
-					this.editFault.type = ''
-				}
-			})
-		},
-		userExp(){
-			if(!this.editFault.user){
-				this.result.user = '请输入联系人'
-			}else{
-				this.result.user = ''
-			}
-		},
-		telExp(){
-			if(!this.editFault.tel){
-				this.result.tel = '请输入联系电话'
-			}else{
-				let phoneRe = /^1(3|4|5|6|7|8|9)\d{9}$/; 
-				if(phoneRe.test(this.editFault.tel)){
-					this.result.tel = ''
-				}else{
-					this.result.tel = '请输入正确联系方式'
-				}
-			}
-		},
-		detailExp(){
-			if(!this.editFault.detail){
-				this.result.detail = '请输入故障原因'
-			}else{
-				this.result.detail = ''
-			}
-		},
-		// 提交故障
-		addFaultSubm(){
-			let photos = [];
-			this.editFault.photos.forEach((item)=>{
-				photos.push(item.response.data.src)
-			})
-			console.log(this.editFault.photos)
-			if(this.result.imei || !this.editFault.imei || !this.editFault.user || !this.editFault.tel ||!this.editFault.detail){
-				if(!this.editFault.imei){
-					this.result.imei = '请输入设备号'
-				}
-				if(!this.editFault.user){
-					this.result.user = '请输入联系人'
-				}
-				if(!this.editFault.tel){
-					this.result.tel = '请输入联系电话'
-				}
-				if(!this.editFault.detail){
-					this.result.detail = '请输入故障原因'
-				}
-				return false;
-			}
-
-			this.$axios({
-				method: 'POST',
-				url: '/api/api_gateway?method=after_sale.after_sale_manage.aftersale_apply',
-				data: this.qs.stringify({
-					device_id: this.editFault.imei,
-					errordesc:this.editFault.detail,
-					errorimg:JSON.stringify(photos),
-					addr:this.editFault.addr,
-					user:this.editFault.user,
-					userphone:this.editFault.tel,
-					d_type:this.editFault.type,
-					is_pc:'0',      //0 手机  1 电脑
-					errorvideo:this.editFault.Video
-				})
-			}).then((res) => {
-				if (res.data.message == '') {
-					this.$message({
-						type: 'success',
-						offset:100,
-						message: '提交成功'
-					})
-					this.$refs.photolist.clearFiles();
-					this.editFault = {
-						imei:'',
-						user:'',
-						tel:'',
-						detail:'',
-						photos:[],
-						Video:''
-					}
-				}else{
-					this.$message({
-						type: 'error',
-						offset:100,
-						message: res.data.message
-					})
-				}
-			})	
-			
-		},
-		// 图片上传校验
-		handleRemove(file, fileList) {
-			this.editFault.photos = fileList
-			if(this.editFault.photos.length>=this.limitnum){
-				this.noneBtnImg = true
-			}else{
-				this.noneBtnImg = false
-			}
-		},
-		loadsuccess(response, file, fileList){
-			this.editFault.photos = fileList
-			if(this.editFault.photos.length>=this.limitnum){
-				this.noneBtnImg = true
-			}else{
-				this.noneBtnImg = false
-			}
-		},
-		handlePictureCardPreview(file) {
-			this.dialogImageUrl = file.url;
-			this.dialogVisible = true;
-		},
-		// 视频上传校验
-		uploadVideoProcess(event, file, fileList){
-			this.videoFlag = true;
-			this.videoUploadPercent = parseInt(file.percentage);
-		},
-		beforeUploadVideo(file) {
-			const isLt10M = file.size / 1024 / 1024  < 100;
-			if (['video/mp4', 'video/ogg', 'video/flv','video/avi','video/wmv','video/rmvb','video/mov'].indexOf(file.type) == -1) {
-				this.$message.error('请上传正确的视频格式');
-				return false;
-			}
-			if (!isLt10M) {
-				this.$message.error('上传视频大小不能超过100MB哦!');
-				return false;
-			}
-			if(!this.editFault.imei){
-				this.$message.error('请先填写设备ID!');
-				return false;
-			}else{
-				this.data.device_id = this.editFault.imei
-			}
-
-		},
-		handleVideoSuccess(res, file) {    
-			console.log(res)                           //获取上传图片地址
-			this.videoFlag = false;
-			this.videoUploadPercent = 0;
-			if(res.message == ''){
-				this.editFault.Video = res.data.data.src
-			}else{
-				this.$message.error('视频上传失败,请重新上传!');
-			}
-		},
-		// 获取手机定位
-		onSuccess(position){
-			this.editFault.addr = position.coords.longitude+','+position.coords.latitude
-		},
-		onError(error) {
-			switch(error.code){
-				case error.PERMISSION_DENIED:
-				console.log("您拒绝对获取地理位置的请求");
-				break;
-				case error.POSITION_UNAVAILABLE:
-				console.log("位置信息是不可用的");
-				break;
-				case error.TIMEOUT:
-				console.log("请求您的地理位置超时");
-				break;
-				case error.UNKNOWN_ERROR:
-				console.log("未知错误");
-				break;
-			}
-		},
-		videodelFun(){
-			this.videoFlag = false;
-			this.editFault.Video = ''
-		}
-	}
-}
-</script>
-
-<style lang='less' scoped>
-/deep/.el-dialog__headerbtn{
-	top: 7px;
-}
-/deep/.disUoloadSty .el-upload--picture-card{
-  display:none;   /* 上传按钮隐藏 */
-}
-/deep/.avatar-uploader{
-	margin-top: 20px;
-}
-/deep/.avatar-uploader .avatar-uploader-icon{
-	height: 30px;
-	line-height: 28px !important;
-	display: inline-block;
-	font-size: 26px;
-	color: #2292c5;
-	margin-top: 44px;
-}
-/deep/.el-upload--picture-card{
-	border: 1px dashed #2292c5;
-	line-height: 27px;
-}
-/deep/.el-upload--picture-card i{
-	color: #2292c5;
-	margin-top: 44px;
-    display: block;
-}
-/deep/.avatar-uploader .el-upload{
-	border: 1px dashed #2292c5;
-    width: 148px;
-    height: 148px;
-}
-.content{
-	padding-top: 20px;
-    padding-bottom: 20px;
-	background: #2292c5;
-	color: #2292c5;
-	.plan{
-		background: #fff;
-		border-radius: 5px;
-		width: 90%;
-    	margin: 0 auto;
-		.title{
-			font-size: 14px;
-			font-weight: 700;
-			text-align: center;
-			line-height: 35px;
-		}
-	}
-	.inputbox{
-		text-align: center;
-		padding-bottom: 10px;
-		position: relative;
-		input,textarea{
-			width: 86%;
-			background: rgba(34,146,197,.2);
-			border: 1px solid transparent;
-			line-height: 33px;
-			border-radius: 4px;
-			outline: none;
-			padding: 0 2%;
-			color: rgba(34,146,197,.7);
-		}
-		.hint{
-			position: absolute;
-			font-size: 12px;
-			color: red;
-			left: 8%;
-		}
-		textarea{
-			height: 100px;
-			resize:none;
-		}
-	}
-	.userinfo{
-		margin-bottom: 10px;
-		padding-bottom: 10px;
-		position: relative;
-		&:before{
-			position: absolute;
-			content: '';
-			bottom: -29px;
-			left: 5%;
-			width: 12px;
-			height: 40px;
-			// background: url('../../assets/images/failticon.png') no-repeat;
-			background: url('../../assets/images/newImg/failticon.png') no-repeat;
-			background-size: 8px 40px;
-		}
-		&:after{
-			position: absolute;
-			content: '';
-			bottom: -29px;
-			right: 5%;
-			width: 12px;
-			height: 40px;
-			// background: url('../../assets/images/failticon.png') no-repeat;
-			background: url('../../assets/images/newImg/failticon.png') no-repeat;
-			background-size: 8px 40px;
-		}
-	}
-	.submitbox{
-		text-align: center;
-		padding-bottom: 20px;
-		.submit{
-			width: 80%;
-			border: none;
-			background: #2292c5;
-			color: #fff;
-			line-height: 33px;
-			border-radius: 15px;
-			outline: none;
-			&:active{
-				background: #3cbef8;
-			}
-		}
-	}
-}
-.videodel{
-	position: absolute;
-    right: 6px;
-    top: 17px;
-    z-index: 9;
-}
-input::-webkit-input-placeholder ,textarea::-webkit-input-placeholder{ 
-/* WebKit browsers */ 
-color: rgba(34,146,197,.7); 
-} 
-input:-moz-placeholder ,textarea:-moz-placeholder{ 
-/* Mozilla Firefox 4 to 18 */ 
-color: rgba(34,146,197,.7); 
-} 
-input::-moz-placeholder ,textarea::-moz-placeholder { 
-/* Mozilla Firefox 19+ */ 
-color: rgba(34,146,197,.7); 
-} 
-input:-ms-input-placeholder,textarea:-ms-input-placeholder { 
-/* Internet Explorer 10+ */ 
-color: rgba(34,146,197,.7); 
-}
-</style>

+ 0 - 248
src/pages/equipmanger/UserList.vue

@@ -1,248 +0,0 @@
-<template>
-	<div style="cursor: default">
-		<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
-				style="cursor: pointer"
-				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="$imghost + zanwu"
-				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 {
-			zanwu: '/images/expertDiagnosis/zanwu.png',
-			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;
-		}
-	}
-}
-
-</style>

+ 0 - 496
src/pages/expertDiagnosis/expertAnswers/ExpertAnswers.vue

@@ -1,496 +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="$imghost + zanwu"
-						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 {
-			zanwu:'/images/expertDiagnosis/zanwu.png',
-			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 = $imghost+'/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;
-}
-
-</style>

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

@@ -1,705 +0,0 @@
-<!--  -->
-<template>
-	<div style="cursor: default">
-		<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; cursor: default">用户补充审核</div>
-
-					<div style="display: flex; margin: 0 55px 0 0">
-						<!-- 审核筛选 -->
-						<el-dropdown style="cursor: pointer;" 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"
-						style="cursor: default"
-					>
-						<!-- 头像以及详情描述 -->
-						<div class="expertDiagnosis_recognition_mainLi_box">
-							<div class>
-								<!-- <img
-									:src="$host+item.user_img"
-									alt
-									@error="errImg"
-									class="expertDiagnosis_recognition_mainLi_box_img"
-								/> -->
-								<img
-									:src="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="$imghost + zanwu"
-						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" style="cursor: default;">
-							<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"
-									style="cursor: pointer;"
-									alt
-									@error="errImg"
-									class="expertDiagnosis_recognition_main_popUp_li_imgVal"
-								/>
-							</div>
-						</li>
-
-						<li class="expertDiagnosis_recognition_main_popUp_li" style="cursor: default;">
-							<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 {
-			zanwu:'/images/expertDiagnosis/zanwu.png',
-			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 = $imghost+'/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;
-			}
-		}
-	}
-}
-
-
-</style>

Різницю між файлами не показано, бо вона завелика
+ 0 - 1659
src/pages/expertDiagnosis/expertDatabase/ExpertDatabase.vue


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

@@ -1,701 +0,0 @@
-<template>
-	<div style="cursor: default">
-		<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)"
-				style="cursor: pointer"
-				class="expertDiagnosis_referral_mainBtn"
-			>
-				<!-- 左 -->
-				<div class="expertDiagnosis_referral_mainBtnBox">
-					<img :src="$imghost+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 style="margin: 0 0 0 2%;">
-						<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="index"
-					>
-						<img
-							:src="$imghost+'/static/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"
-								/> -->
-								<img
-									:src="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 style="cursor: default" class="expertDiagnosis_referral_units_liRight_details">
-									{{ item.briefing }}
-								</div>
-							</div>
-						</div>
-					</li>
-				</ul>
-
-				<!-- 暂无数据 -->
-				<div class="expertDiagnosis_referral_units_not" v-else>
-					<img
-						:src="$imghost + zanwu"
-						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 style="margin: 0 0 0 2%;">
-						<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="index"
-					>
-						<img
-							:src="$imghost+'/static/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"
-								/> -->
-								<img
-									:src="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 style="cursor: default" class="expertDiagnosis_referral_units_liRight_details">
-									{{ item.briefing }}
-								</div>
-							</div>
-						</div>
-					</li>
-				</ul>
-
-				<!-- 暂无数据 -->
-				<div class="expertDiagnosis_referral_units_not" v-else>
-					<img
-						:src="$imghost + zanwu"
-						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 style="margin: 0 0 0 2%;">
-						<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="index"
-					>
-						<img
-							:src="$imghost+'/static/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"
-								/> -->
-								<img
-									:src="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 style="cursor: default" class="expertDiagnosis_referral_units_liRight_details">
-									{{ item.briefing }}
-								</div>
-							</div>
-						</div>
-					</li>
-				</ul>
-
-				<!-- 暂无数据 -->
-				<div class="expertDiagnosis_referral_units_not" v-else>
-					<img
-						:src="$imghost + zanwu"
-						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="12"
-		></el-pagination>
-	</div>
-</template>
-
-<script>
-//自适应
-import '@/plugin/flexible.js'
-
-export default {
-	data() {
-		return {
-			zanwu:'/images/expertDiagnosis/zanwu.png',
-			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;
-		margin: 0 0 0 2%;
-
-		.expertDiagnosis_referral_mainBtnBox {
-			display: flex;
-			// margin: 0 0 0 35px;
-			margin: 0 0 0 1%;
-			// 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;
-			margin: 0 6% 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;
-				padding: 50px 0 50px 0;
-				// 图片
-				.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;
-						margin: 0 0 0 1rem;
-						.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;
-						}
-					}
-				}
-			}
-		}
-
-	}
-}
-</style>

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

@@ -1,513 +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="$imghost + zanwu"
-						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 {
-			zanwu:'/images/expertDiagnosis/zanwu.png',
-			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;
-			}
-		}
-	}
-}
-
-</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 = $imghost+'/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 - 345
src/pages/expertDiagnosis/posts/PostDetail.vue

@@ -1,345 +0,0 @@
-<template>
-	<div style="cursor: default">
-		<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" style="cursor: default">
-				<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" style="cursor: default">
-				<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" style="cursor: default" v-for="item in commentList" :key="item.lower">
-				<div class="user_info">
-					<div class="img_box">
-						<template v-if="item.image">
-							<img :src="item.image" @error="errImg" />
-						</template>
-						<template v-else>
-							<img :src="$imghost+defaultimg" />
-						</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 {
-			defaultimg:'/images/expertDiagnosis/img01.png',
-			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 = $imghost+'/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 - 455
src/pages/expertDiagnosis/posts/PostList.vue

@@ -1,455 +0,0 @@
-<template>
-	<div style="cursor: default">
-		<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" style="cursor: default">
-						<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"/> -->
-									<img :src="item.img_urls" />
-								</template>
-								<template v-else>
-									<img :src="$imghost + defaultimg" />
-								</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="$imghost + zanwu" 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" style="cursor: default">
-						<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"
-						style="cursor: pointer;"
-					>
-						<div class="img-box">
-							<template v-if="item.img_urls">
-								<!-- <img :src="$host + item.img_urls" @error="errImg" /> -->
-								<img :src="item.img_urls" @error="errImg" />
-							</template>
-							<template v-else>
-								<img :src="$imghost + defaultimg" />
-							</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 {
-			zanwu: '/images/expertDiagnosis/zanwu.png',
-			defaultimg: '/images/expertDiagnosis/img01.png',
-			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 = $imghost + '/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 - 1054
src/pages/forecasting/bzy/Bzy.vue


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

@@ -1,480 +0,0 @@
-<template>
-  <div style="cursor: default">
-    <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
-          >
-          <el-button
-            type="primary"
-            v-if="downBtnState"
-            size="mini"
-            @click="equipStatusCheck('7')"
-            >图片下载</el-button
-          >
-          <el-button
-            v-if="!downBtnState"
-            type="primary"
-            size="mini"
-            @click="equipStatusCheck('8')"
-            >下载</el-button
-          >
-          <el-button
-            v-if="!downBtnState"
-            size="mini"
-            @click="equipStatusCheck('9')"
-            >取消</el-button
-          >
-        </template>
-      </div>
-      <div class="search-box">
-        <el-date-picker
-          style="cursor: pointer"
-          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 && downBtnState"
-                @click="delectImg(item.id)"
-              ></i>
-              <el-checkbox
-                v-show="!delBtnState || !downBtnState"
-                v-model="item.checked"
-              ></el-checkbox>
-            </template>
-          </div>
-          <div class="photoImg">
-            <!-- 有的图片放到阿里云,有的放到了服务器 -->
-            <template v-if="item.addr.indexOf('http') != -1">
-              <!-- <img :src="item.addr" /> -->
-              <img v-lazy="item.addr" alt="">
-            </template>
-            <template v-else>
-              <!-- <img :src="$host + item.addr" /> -->
-              <img v-lazy="$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="$imghost + zanwu" 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 {
-      zanwu: "/images/expertDiagnosis/zanwu.png",
-      totalNum: 0,
-      timeRange: [],
-      delBtnState: true,
-      downBtnState: true,
-      device_id: this.$route.params.id,
-      d_id: this.$route.query.d_id,
-      photoList: [],
-      queryInfo: {
-        begin: "",
-        end: "",
-        page: 1,
-      },
-      idList: [], //删除图片的地址数组
-      photoDescDialogVisible: false,
-      times: 50, //下载图片定时器次数,超过50停止下载
-    };
-  },
-  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("");
-      }
-
-      if (flag == 7) {
-        this.downBtnState = !this.downBtnState;
-      }
-      if (flag == 8) {
-        //批量下载图片
-        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.downPhoto(this.idList);
-        }
-      }
-      if (flag == 9) {
-        this.photoList.map((item) => {
-          item.checked = false;
-        });
-        this.downBtnState = !this.downBtnState;
-      }
-    },
-    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);
-    },
-    downloadFile(data) {
-      let blob = new Blob([data], { type: "application/zip" });
-      let url = window.URL.createObjectURL(blob);
-      const link = document.createElement("a"); // 创建a标签
-      link.href = url;
-      link.download = "下载图片"; // 重命名文件
-      link.click();
-      URL.revokeObjectURL(url); // 释放内存
-    },
-    downPhoto(arr) {
-      let uid = sessionStorage.getItem("myuid");
-      let image_id = arr.join(",");
-      this.$axios({
-        method: "post",
-        url: "/api/api_gateway?method=forecast.worm_lamp.get_task_id",
-        data: this.qs.stringify({
-          image_id,
-          myuid: uid,
-        }),
-      }).then((res) => {
-        if (res.data.message == "") {
-          this.$message.success('图片下载中!')
-          let that = this;
-          this.cy_id = res.data.data;
-          function downPhotoState() {
-            if (that.times >= 0) {
-              that.times--;
-              that
-                .$axios({
-                  method: "POST",
-                  url: "/api/api_gateway?method=forecast.worm_lamp.check_down",
-                  data: that.qs.stringify({
-                    get_id: that.cy_id,
-                  }),
-                })
-                .then((res) => {
-                  if (res.data.data) {
-                    // 判断后台从阿里云下载图片是否完成
-                    clearInterval(interval);
-                    that
-                      .$axios({
-                        method: "POST",
-                        url: "/api/image_down",
-                        responseType: "blob",
-                        data: that.qs.stringify({
-                          get_id: that.cy_id,
-                        }),
-                      })
-                      .then((res) => {
-                        that.downloadFile(res.data);
-                      });
-                  }
-                })
-                .catch((error) => this.$message.error(error));
-            } else {
-              clearInterval(interval);
-              that.$message.warning("图片下载失败!");
-            }
-          }
-          var interval = setInterval(downPhotoState, 1000);
-        }
-      });
-    },
-  },
-};
-</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 - 626
src/pages/forecasting/bzy/DataDetail.vue

@@ -1,626 +0,0 @@
-<template>
-  <div style="cursor: default">
-    <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="$throttle(refresh,2000)">刷新</el-button>
-    </div>
-    <el-row :gutter="20">
-      <el-col :md="24" :lg="12">
-        <el-card class="box-card" id="box-card1">
-          <highcharts :options="option1"></highcharts>
-        </el-card>
-      </el-col>
-      <el-col :md="24" :lg="12">
-        <el-card class="box-card" id="box-card2">
-          <highcharts :options="option2"></highcharts>
-        </el-card>
-      </el-col>
-    </el-row>
-    <div class="dataTableSearch">
-      <el-button type="primary" size="mini" @click="deriveData()"
-        >导出</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>
-
-    <!-- 导出对话框 -->
-    <el-dialog title="导出信息" :visible.sync="dialogVisible" width="30%">
-      <!-- <span>这是一段信息</span> -->
-
-      <!-- 下拉框和输入框 -->
-      <ul class="iptUl">
-        <li class="iptList">
-          <div class="iptTxt"><span style="color: red">*</span>文件名称:</div>
-          <div class="iptBox">
-            <el-input placeholder="请输入文件的名称" v-model="value" clearable>
-            </el-input>
-          </div>
-        </li>
-        <li class="iptList">
-          <div class="iptTxt"><span style="color: red">*</span>下载类型:</div>
-          <div class="iptBox">
-            <el-select v-model="value1" placeholder="请选择">
-              <el-option
-                v-for="item in optionsA"
-                :key="item.value"
-                :label="item.label"
-                :value="item.value"
-              >
-              </el-option>
-            </el-select>
-          </div>
-        </li>
-        <li class="iptList" v-show="timeShow">
-          <div class="iptTxt"><span style="color: red">*</span>时间段:</div>
-          <div class="iptBox">
-            <el-date-picker
-              v-model="value2"
-              type="daterange"
-              range-separator="至"
-              start-placeholder="开始日期"
-              end-placeholder="结束日期"
-            >
-            </el-date-picker>
-          </div>
-        </li>
-      </ul>
-      <!-- 下拉框和输入框 -->
-      <span slot="footer" class="dialog-footer">
-        <el-button @click="dialogVisible = false">取 消</el-button>
-        <el-button type="primary" @click="addData()">确 定</el-button>
-      </span>
-    </el-dialog>
-    <!-- 导出对话框 -->
-  </div>
-</template>
-
-<script>
-import DateSearch from "@/components/DateSearch";
-import HighCharts from "highcharts";
-import HighchartsNoData from "highcharts/modules/no-data-to-display";
-HighchartsNoData(HighCharts);
-import { Loading } from "element-ui";
-export default {
-  data() {
-    return {
-      id: this.$route.params.e_id,
-      btnSelected: "",
-      timeRange: "",
-      lineTime: "",
-      tableHeadTxt: [
-        ["设备开关", "on_off"],
-        ["环境温度(°C)", "at"],
-        ["环境湿度(%)", "ah"],
-        ["保温仓设定温度(°C)", "set_temp"],
-        ["保温仓当前温度(°C)", "pre_temp"],
-        ["电池状态", "batStatus"],
-        ["雨控状态", "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,
-      //导出弹框
-      dialogVisible: false,
-      optionsA: [
-        {
-          value: "选项1",
-          label: "全部",
-        },
-        {
-          value: "选项2",
-          label: "时间段",
-        },
-      ],
-      value: "", //文件名称
-      value1: "", //下载类型
-      value2: "", //时间段
-      timeShow: false, //选择时间
-      loadingInstance1: {},
-      loadingInstance2: {},
-      ChartData: [
-        {
-          name: "温度(°C)",
-          dat: [],
-        },
-        {
-          name: "湿度(RH)",
-          dat: [],
-        },
-        {
-          name: "保温仓温度(°C)",
-          dat: [],
-        },
-      ],
-    };
-  },
-  mounted() {
-    this.getChartDataList();
-    this.getHisDataList();
-    this.refreshData();
-    this.loadingInstance1 = Loading.service({
-      fullscreen: false,
-      target: document.getElementById("box-card1"),
-    });
-    this.loadingInstance2 = Loading.service({
-      fullscreen: false,
-      target: document.getElementById("box-card2"),
-    });
-  },
-  computed: {
-    option1() {
-      return {
-        chart: {
-          zoomType: "x",
-        },
-        title: {
-          text: "环境温湿度",
-          align: "left",
-        },
-        lang: {
-          noData: "暂无数据",
-        },
-        noData: {
-          style: {
-            fontWeight: "bold",
-            fontSize: "15px",
-            color: "#303030",
-          },
-        },
-        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: this.ChartData[0].name,
-            data: this.ChartData[0].dat,
-          },
-          {
-            name: this.ChartData[1].name,
-            data: this.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",
-                },
-              },
-            },
-          ],
-        },
-      };
-    },
-    option2() {
-      return {
-        chart: {
-          zoomType: "x",
-        },
-        title: {
-          text: "保温仓温度",
-          align: "left",
-        },
-        lang: {
-          noData: "暂无数据",
-        },
-        noData: {
-          style: {
-            fontWeight: "bold",
-            fontSize: "15px",
-            color: "#303030",
-          },
-        },
-        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: this.ChartData[2].name,
-            data: this.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",
-                },
-              },
-            },
-          ],
-        },
-      };
-    },
-  },
-  methods: {
-    // 设置hightcharts配置
-    refreshData() {
-      HighCharts.setOptions({
-        // 所有语言文字相关配置都设置在 lang 里
-        lang: {
-          resetZoom: "刷新",
-          resetZoomTitle: "重置缩放比例",
-        },
-      });
-    },
-    //获取折线数据
-    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 == "" && res.data.data.length !== 0) {
-          var data = res.data.data;
-          for (let item of data) {
-            this.ChartData[0].dat.unshift([
-              item.addtime * 1000 + 8 * 3600000,
-              item.temperature,
-            ]);
-            this.ChartData[1].dat.unshift([
-              item.addtime * 1000 + 8 * 3600000,
-              item.humidity,
-            ]);
-            this.ChartData[2].dat.unshift([
-              item.addtime * 1000 + 8 * 3600000,
-              item.others,
-            ]);
-          }
-        }
-        this.loadingInstance1.close();
-        this.loadingInstance2.close();
-      });
-    },
-    //获取表格数据
-    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.batStatus = dht.batStatus == 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);
-    },
-
-    // 导出数据
-    deriveData() {
-      this.dialogVisible = true;
-    },
-    //导出数据确定
-    addData() {
-      var that = this;
-      if (that.value == "" && that.value1 == "" && that.value2 == "") {
-        this.$message({
-          message: "请将必填项填写完整",
-          type: "warning",
-          duration: 1500,
-        });
-      } else if (
-        that.value !== "" &&
-        that.value1 == "选项2" &&
-        that.value2 == ""
-      ) {
-        this.$message({
-          message: "请填写导出时间段",
-          type: "warning",
-          duration: 1500,
-        });
-      } else if (
-        that.value !== "" &&
-        (that.value1 == "选项1" ||
-          (that.value1 == "选项2" && that.value2 !== ""))
-      ) {
-        var begin = "";
-        var end = "";
-        if (that.value2) {
-          begin = parseInt(new Date(that.value2[0]).getTime() / 1000);
-          end = parseInt(new Date(that.value2[1]).getTime() / 1000);
-        } else {
-          begin = "";
-          end = "";
-        }
-        window.location.href =
-          this.$deriveData +
-          "/api/cbd_export?device_id=" +
-          this.$route.params.d_id +
-          "&filename=" +
-          that.value +
-          "&start_time=" +
-          begin +
-          "&end_time=" +
-          end +
-          "&device_type=7";
-      }
-    },
-  },
-  components: {
-    DateSearch,
-  },
-  watch: {
-    value1(val) {
-      if (val == "选项2") {
-        this.timeShow = true;
-      }
-      if (val == "选项1") {
-        this.timeShow = false;
-      }
-    },
-    dialogVisible(val) {
-      if (val == false) {
-        this.value = "";
-        this.value1 = "";
-        this.value2 = "";
-        this.timeShow = false;
-      }
-    },
-  },
-};
-</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;
-}
-
-.iptList {
-  display: flex;
-  margin: 15px 0 15px 0;
-}
-.iptTxt {
-  text-align: right;
-  width: 20%;
-  margin: 0 5% 0 0;
-  display: inline-block;
-}
-.iptBox {
-  width: 40%;
-}
-</style>

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

@@ -1,994 +0,0 @@
-<template>
-	<div style="cursor: default">
-		<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="userType == 1">
-					<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>
-		</search-bar>
-		<template v-if="displayType == 1">
-			<el-row :gutter="10" v-loading="loading">
-				<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 v-loading="loading" :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="$imghost + zanwu"
-				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-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
-			>
-			<el-button type="primary" size="mini" @click="mqttInfo"
-				>MQTT配置</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>
-		<!-- MQTT配置 -->
-		<el-dialog
-			title="MQTT配置"
-			:visible.sync="mqttDialogVisible"
-			width="450px"
-			@close="mqttDialogClosed"
-		>
-			<el-form
-				ref="mqttConfigRef"
-				:model="mqttConfig"
-				label-position="right"
-				label-width="130px"
-				:rules="mqttFormRules"
-			>
-				<el-form-item label="MQTT用户名:" prop="muid">
-					<el-input v-model="mqttConfig.muid"></el-input>
-				</el-form-item>
-				<el-form-item label="MQTT密码:" prop="mpwd">
-					<el-input type="password" v-model="mqttConfig.mpwd"></el-input>
-				</el-form-item>
-				<el-form-item label="MQTT地址:" prop="mip">
-					<el-input v-model="mqttConfig.mip"></el-input>
-				</el-form-item>
-				<el-form-item label="MQTT端口:" prop="mport">
-					<el-input v-model="mqttConfig.mport"></el-input>
-				</el-form-item>
-				<el-form-item label="上传地址:" prop="mpub">
-					<el-input v-model="mqttConfig.mpub"></el-input>
-				</el-form-item>
-				<el-form-item label="下发地址:" prop="msub">
-					<el-input v-model="mqttConfig.msub"></el-input>
-				</el-form-item>
-				<el-form-item label="FTP用户名:" prop="fuid">
-					<el-input v-model="mqttConfig.fuid"></el-input>
-				</el-form-item>
-				<el-form-item label="FTP密码:" prop="fpwd">
-					<el-input type="password" v-model="mqttConfig.fpwd"></el-input>
-				</el-form-item>
-				<el-form-item label="图片上传地址:" prop="fip">
-					<el-input v-model="mqttConfig.fip"></el-input>
-				</el-form-item>
-				<el-form-item label="图片上传端口:" prop="fport">
-					<el-input v-model="mqttConfig.fport"></el-input>
-				</el-form-item>
-				<el-form-item style="text-align: right">
-					<el-button
-						type="default"
-						size="mini"
-						@click="mqttDialogVisible = false"
-						>取消</el-button
-					>
-					<el-button type="primary" size="mini" @click="mqttSubm"
-						>确定</el-button
-					>
-				</el-form-item>
-			</el-form>
-		</el-dialog>
-	</div>
-</template>
-<script>
-import SearchBar from '@/components/SearchBar'
-import EquipItem from '@/components/EquipItem'
-export default {
-	data() {
-		return {
-			zanwu: '/images/expertDiagnosis/zanwu.png',
-			//图表和表格切换
-			displayType: '',
-			//设备列表
-			equipList: [],
-			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,
-			mqttDialogVisible: false,
-			mqttConfig: {
-				muid: '',
-				mpwd: '',
-				mip: '',
-				mport: '',
-				mpub: '',
-				msub: '',
-				fuid: '',
-				fpwd: '',
-				fip: '',
-				fport: ''
-			},
-			mqttFormRules: {
-				muid: [
-					{ required: true, message: '请填写MQTT用户名', trigger: 'blur' }
-				],
-				mpwd: [{ required: true, message: '请填写MQTT密码', trigger: 'blur' }],
-				mip: [{ required: true, message: '请填写MQTT地址', trigger: 'blur' }],
-				mport: [{ required: true, message: '请填写MQTT端口', trigger: 'blur' }],
-				mpub: [{ required: true, message: '请填写上传地址', trigger: 'blur' }],
-				msub: [{ required: true, message: '请填写下发地址', trigger: 'blur' }],
-				// fuid: [{ required: true, message: '请填写FTP用户名', trigger: 'blur' }],
-				// fpwd: [{ required: true, message: '请填写FTP密码', trigger: 'blur' }],
-				fip: [
-					{ required: true, message: '请填写图片上传地址', trigger: 'blur' }
-				],
-				fport: [
-					{ required: true, message: '请填写图片上传端口', trigger: 'blur' }
-				]
-			},
-			loading:true
-			
-		}
-	},
-	created() {
-		console.log('created')
-		this.displayType = String(localStorage.getItem('cbdListType') || '1')
-	},
-	mounted() {
-		console.log('mounted')
-		// this.getEquipList()
-	},
-	activated() {
-		this.getEquipList()
-		console.log('cbd_activated')
-	},
-	deactivated() {
-		console.log('cbd_deactivated')
-	},
-	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
-					this.loading=false
-				}
-			})
-		},
-		//改变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, cmd: 'paramconf' })
-			}).then((res) => {
-				if (res.data.data&&Object.keys(res.data.data).length > 0) {
-					let data = res.data.data
-					data.ds = Number(data.ds)
-					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()
-		},
-		mqttControl() {
-			this.mqttDialogVisible = true
-		},
-		mqttDialogClosed() {
-			this.$refs.mqttConfigRef.resetFields()
-		},
-		mqttSubm() {
-			this.$refs.mqttConfigRef.validate((valid) => {
-				console.log(valid)
-				if (!valid) {
-					return false
-				}
-				let obj = {
-					mqtt: {
-						uid: this.mqttConfig.muid,
-						pwd: this.mqttConfig.mpwd,
-						ip: this.mqttConfig.mip,
-						port: this.mqttConfig.mport,
-						pub: this.mqttConfig.mpub,
-						sub: this.mqttConfig.msub,
-						keepalive: 60,
-						lastwill: '/yfkj/cbd/offline/'
-					},
-					ftp: {
-						uid: this.mqttConfig.fuid,
-						pwd: this.mqttConfig.fpwd,
-						ip: this.mqttConfig.fip,
-						port: this.mqttConfig.fport
-					}
-				}
-				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,
-						cmd: 'setnet',
-						config: JSON.stringify(obj)
-					})
-				}).then((res) => {
-					if (res.data.message == '') {
-						this.$message.success('提交成功')
-					} else {
-						this.$message.error('提交失败')
-					}
-				})
-				this.mqttDialogVisible = false
-			})
-		},
-		mqttInfo() {
-			this.$axios({
-				method: 'POST',
-				url:
-					'/api/api_gateway?method=forecast.send_control.device_control_info',
-				data: this.qs.stringify({
-					d_id: this.d_id,
-					cmd: 'netconf'
-				})
-			}).then((res) => {
-				if (res.data.message == '') {
-					let { ftp, mqtt } = res.data.data
-					console.log(ftp, mqtt)
-					this.mqttConfig = {
-						muid: mqtt.uid,
-						mpwd: mqtt.pwd,
-						mip: mqtt.ip,
-						mport: mqtt.port,
-						mpub: mqtt.pub,
-						msub: mqtt.sub,
-						fuid:ftp.uid,
-						fpwd:ftp.pwd,
-						fip:ftp.ip,
-						fport:ftp.port
-					}
-				}
-			})
-			this.mqttDialogVisible = true
-		}
-	},
-	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%;
-}
-
-.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 - 1089
src/pages/forecasting/cbd/DataDetails.vue


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

@@ -1,646 +0,0 @@
-<template>
-	<div style="cursor: default">
-		<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('../../../../static/images/cure/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 - 2343
src/pages/forecasting/cbd/PestsStats.vue


Різницю між файлами не показано, бо вона завелика
+ 0 - 2013
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 - 330
src/pages/forecasting/tccb/TcDataPhotos.vue

@@ -1,330 +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="$imghost + zanwu" 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 {
-			zanwu:'/images/expertDiagnosis/zanwu.png',
-			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 - 783
src/pages/forecasting/tccb/Tccb.vue

@@ -1,783 +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 style="text-align:right">
-						<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()
-	},
-	activated() {
-		this.getEquipList()
-		console.log('tccb_activated')
-	},
-	deactivated() {
-		console.log('tccb_deactivated')
-	},
-	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, cmd: 'paramconf' })
-			}).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 - 1024
src/pages/forecasting/xycb/xycb.vue


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

@@ -1,680 +0,0 @@
-<template>
-  <div style="cursor: default">
-    <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="$throttle(refresh,2000)">刷新</el-button>
-    </div>
-    <!-- 统计图 -->
-    <div>
-      <div>
-        <el-row :gutter="10">
-          <el-col :md="24" :lg="20">
-            <el-card class="box-card">
-              <div class="charts" id="charts">
-                <highcharts :options="optionFn"></highcharts>
-              </div>
-            </el-card>
-          </el-col>
-          <el-col :md="24" :lg="4">
-            <el-card class="box-card">
-              <div class="pie">
-                <div class="item">
-                  <img src="@/assets/images/forecasting/xy/fs.png" />
-                  <div>风速 : {{ fs + "(m/s)" }}</div>
-                </div>
-                <div class="item">
-                  <img src="@/assets/images/forecasting/xy/fx.png" />
-                  <div>风向 : {{ fx }}</div>
-                </div>
-              </div>
-            </el-card>
-          </el-col>
-        </el-row>
-        <div class="dataTableSearch">
-          <div>
-            <el-button type="primary" size="mini" @click="deriveData()"
-              >导出</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>
-
-      <!-- 导出对话框 -->
-      <el-dialog title="导出信息" :visible.sync="dialogVisible" width="30%">
-        <!-- <span>这是一段信息</span> -->
-
-        <!-- 下拉框和输入框 -->
-        <ul class="iptUl">
-          <li class="iptList">
-            <div class="iptTxt">
-              <span style="color: red">*</span>文件名称:
-            </div>
-            <div class="iptBox">
-              <el-input
-                placeholder="请输入文件的名称"
-                v-model="value"
-                clearable
-              >
-              </el-input>
-            </div>
-          </li>
-          <li class="iptList">
-            <div class="iptTxt">
-              <span style="color: red">*</span>下载类型:
-            </div>
-            <div class="iptBox">
-              <el-select v-model="value1" placeholder="请选择">
-                <el-option
-                  v-for="item in optionsA"
-                  :key="item.value"
-                  :label="item.label"
-                  :value="item.value"
-                >
-                </el-option>
-              </el-select>
-            </div>
-          </li>
-          <li class="iptList" v-show="timeShow">
-            <div class="iptTxt"><span style="color: red">*</span>时间段:</div>
-            <div class="iptBox">
-              <el-date-picker
-                v-model="value2"
-                type="daterange"
-                range-separator="至"
-                start-placeholder="开始日期"
-                end-placeholder="结束日期"
-              >
-              </el-date-picker>
-            </div>
-          </li>
-        </ul>
-        <!-- 下拉框和输入框 -->
-
-        <span slot="footer" class="dialog-footer">
-          <el-button @click="dialogVisible = false">取 消</el-button>
-          <el-button type="primary" @click="addData()">确 定</el-button>
-        </span>
-      </el-dialog>
-      <!-- 导出对话框 -->
-    </div>
-  </div>
-</template>
-
-<script>
-import DateSearch from "@/components/DateSearch";
-import HighCharts from "highcharts";
-import HighchartsNoData from "highcharts/modules/no-data-to-display";
-HighchartsNoData(HighCharts);
-import { Loading } from "element-ui";
-export default {
-  data() {
-    return {
-      device_model: this.$route.query.device_model, //性诱1型或II型
-      btnSelected: "",
-      lineTime: "",
-      dataTime: "",
-      worms: [
-        {
-          value: 1,
-          label: "蛾子",
-        },
-        {
-          value: 2,
-          label: "蚊子",
-        },
-      ],
-      // 状态信息
-      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"],
-        ["红外计数值", "infr_ct"],
-        // ['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: [],
-      // 导出
-      dialogVisible: false,
-      optionsA: [
-        {
-          value: "选项1",
-          label: "全部",
-        },
-        {
-          value: "选项2",
-          label: "时间段",
-        },
-      ],
-      value: "", //文件名称
-      value1: "", //下载类型
-      value2: "", //时间段
-      timeShow: false, //选择时间
-      fs: "--", //风速
-      fx: "--", //风向
-      loadingInstance: {},
-      ChartData : [
-            {
-              name: "温度(°C)",
-              dat: [],
-            },
-            {
-              name: "湿度(%)",
-              dat: [],
-            },
-            {
-              name: "红外计数值",
-              dat: [],
-            },
-            {
-              name: "高压计数值",
-              dat: [],
-            },
-            {
-              name: "cpu温度(°C)",
-              dat: [],
-            },
-          ]
-    };
-  },
-  created() {},
-  mounted() {
-    // this.getChartDataList()
-    // this.getHisDataList()
-    this.refreshData();
-    this.loadingInstance = Loading.service({
-      fullscreen: false,
-      target: document.getElementById("charts"),
-    });
-  },
-  computed:{
-    optionFn(){
-      return {
-            chart: {
-              zoomType: "x",
-            },
-            title: {
-              text: "环境温湿度",
-              align: "left",
-            },
-            lang: {
-              noData: "暂无数据",
-            },
-            noData: {
-              style: {
-                fontWeight: "bold",
-                fontSize: "15px",
-                color: "#303030",
-              },
-            },
-            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: this.ChartData[0].name,
-                data: this.ChartData[0].dat,
-              },
-              {
-                type: "spline",
-                name: this.ChartData[1].name,
-                data: this.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>",
-            },
-      }
-    }
-  },
-  methods: {
-    // 设置hightcharts配置
-    refreshData() {
-      HighCharts.setOptions({
-        // 所有语言文字相关配置都设置在 lang 里
-        lang: {
-          resetZoom: "刷新",
-          resetZoomTitle: "重置缩放比例",
-        },
-      });
-    },
-
-    //获取折线数据
-    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 data = res.data.data;
-          for (let item of data) {
-            this.ChartData[0].dat.unshift([
-              item.addtime * 1000 + 8 * 3600000,
-              Number(item.temperature),
-            ]);
-            this.ChartData[1].dat.unshift([
-              item.addtime * 1000 + 8 * 3600000,
-              Number(item.humidity),
-            ]);
-          }
-        }
-        this.loadingInstance.close();
-      });
-    },
-    //获取表格数据
-    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 (this.queryInfo.page == 1 && data[0]) {
-            this.fs = data[0].d_h_t.wind_sped;
-            let fx = data[0].d_h_t.wind_drec;
-            if (fx > 337.5 || fx < 22.5) {
-              fx = "北";
-            } else if (fx > 22.5 && fx < 67.5) {
-              fx = "东北";
-            } else if (fx > 67.5 && fx < 112.5) {
-              fx = "东";
-            } else if (fx > 112.5 && fx < 157.5) {
-              fx = "东南";
-            } else if (fx > 157.5 && fx < 202.5) {
-              fx = "南";
-            } else if (fx > 202.5 && fx < 247.5) {
-              fx = "西南";
-            } else if (fx > 247.5 && fx < 292.5) {
-              fx = "西";
-            } else if (fx > 292.5 && fx < 337.5) {
-              fx = "西北";
-            }
-            this.fx = fx;
-          }
-          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.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";
-      } else if (item[1] == "proj") {
-        return 150 + "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);
-    },
-
-    // 导出s数据
-    deriveData() {
-      this.dialogVisible = true;
-    },
-    //导出数据确定
-    addData() {
-      var that = this;
-      if (that.value == "" && that.value1 == "" && that.value2 == "") {
-        this.$message({
-          message: "请将必填项填写完整",
-          type: "warning",
-          duration: 1500,
-        });
-      } else if (
-        that.value !== "" &&
-        that.value1 == "选项2" &&
-        that.value2 == ""
-      ) {
-        this.$message({
-          message: "请填写导出时间段",
-          type: "warning",
-          duration: 1500,
-        });
-      } else if (
-        that.value !== "" &&
-        (that.value1 == "选项1" ||
-          (that.value1 == "选项2" && that.value2 !== ""))
-      ) {
-        var begin = "";
-        var end = "";
-        if (that.value2) {
-          begin = parseInt(new Date(that.value2[0]).getTime() / 1000);
-          end = parseInt(new Date(that.value2[1]).getTime() / 1000);
-        } else {
-          begin = "";
-          end = "";
-        }
-        console.log(this.value);
-        console.log(that.queryInfo.d_id);
-        console.log(begin);
-        console.log(end);
-        console.log(
-          "/api/cbd_export?device_id=" +
-            that.queryInfo.d_id +
-            "&filename=" +
-            that.value +
-            "&start_time=" +
-            begin +
-            "&end_time=" +
-            end +
-            "&device_type=4"
-        );
-
-        window.location.href =
-          this.$deriveData +
-          "/api/cbd_export?device_id=" +
-          that.queryInfo.d_id +
-          "&filename=" +
-          that.value +
-          "&start_time=" +
-          begin +
-          "&end_time=" +
-          end +
-          "&device_type=4";
-      }
-    },
-  },
-  components: {
-    DateSearch,
-  },
-  watch: {
-    value1(val) {
-      if (val == "选项2") {
-        this.timeShow = true;
-      }
-      if (val == "选项1") {
-        this.timeShow = false;
-      }
-    },
-    dialogVisible(val) {
-      if (val == false) {
-        this.value = "";
-        this.value1 = "";
-        this.value2 = "";
-        this.timeShow = false;
-      }
-    },
-  },
-};
-</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;
-  display: flex;
-  flex-direction: column;
-  .item {
-    flex: 1;
-    text-align: center;
-    font-size: 16px;
-  }
-}
-.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;
-}
-
-.iptList {
-  display: flex;
-  margin: 15px 0 15px 0;
-}
-.iptTxt {
-  text-align: right;
-  width: 20%;
-  margin: 0 5% 0 0;
-  display: inline-block;
-}
-.iptBox {
-  width: 40%;
-}
-</style>

+ 0 - 337
src/pages/forecasting/xycb/xycbDataPhotos.vue

@@ -1,337 +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="$imghost + zanwu" 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 {
-			zanwu:'/images/expertDiagnosis/zanwu.png',
-			//在线状态按钮切换
-			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 - 767
src/pages/fourMoodBase/baseManage.vue

@@ -1,767 +0,0 @@
-<template>
-	<div style="cursor: default">
-		<el-breadcrumb separator-class="el-icon-arrow-right">
-			<el-breadcrumb-item>基地管理</el-breadcrumb-item>
-		</el-breadcrumb>
-		<SearchBar>
-			<div slot="type-check">
-				<el-input
-					style="cursor: pointer"
-					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" /> -->
-							<img :src="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="$imghost + zanwu"
-				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"
-						/> -->
-						<img
-							v-if="addBaseInfo.imgSrc"
-							:src="addBaseInfo.imgSrc"
-							class="avatar"
-						/>
-						<i v-else class="el-icon-plus avatar-uploader-icon"></i>
-					</el-upload>
-				</el-form-item>
-				<el-form-item label="负责人 : " prop="principal">
-					<el-input v-model="addBaseInfo.principal"></el-input>
-				</el-form-item>
-				<el-form-item label="联系电话 : " prop="phone">
-					<el-input v-model="addBaseInfo.phone"></el-input>
-				</el-form-item>
-				<el-form-item label="面积(亩) : " prop="area">
-					<el-input 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 {
-			zanwu: '/images/expertDiagnosis/zanwu.png',
-			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;
-}
-
-</style>

Різницю між файлами не показано, бо вона завелика
+ 0 - 1426
src/pages/fourMoodBase/baseShow.vue


+ 0 - 78
src/pages/hjjc/environmentMonitor/Data24.vue

@@ -1,78 +0,0 @@
-<template>
-	<div style="cursor: default">
-		<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 data = res.data.data.data
-				if (data && data.length > 0) {
-					for (let item of data) {
-						arr.push({
-							e: item.ekey,
-							name: item.enum[1],
-							min: item.min == '-99.99' ? 'N/A' : item.min,
-							mintime: item.mintime,
-							max: item.max == '-99.99' ? 'N/A' : item.max,
-							maxtime: item.maxtime
-						})
-					}
-					this.data24 = arr
-				}
-			})
-		}
-	}
-}
-</script>
-
-<style lang='less' scoped>
-</style>

Різницю між файлами не показано, бо вона завелика
+ 0 - 1102
src/pages/hjjc/environmentMonitor/EnvironmentMonitor.vue


+ 0 - 343
src/pages/hjjc/environmentMonitor/HistoryData.vue

@@ -1,343 +0,0 @@
-<template>
-	<div style="cursor: default">
-		<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>
-						</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'
-import Highcharts from 'highcharts'
-import HighchartsNoData from 'highcharts/modules/no-data-to-display'
-HighchartsNoData(Highcharts)
-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] == '-99.99'
-										? 'N/A'
-										: 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 && m.dat[n].split('#')[0] != '-99.99') {
-								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)
-			})
-		},
-		OptionFn(item) {
-			return {
-				title: {
-					text: item.tit,
-					align: 'left'
-				},
-				lang: {
-					noData: '暂无数据'
-				},
-				noData: {
-					style: {
-						fontWeight: 'bold',
-						fontSize: '15px',
-						color: '#303030'
-					}
-				},
-				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'
-								}
-							}
-						}
-					]
-				}
-			}
-		},
-		//表格和图表切换
-		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 - 55
src/pages/plantGuard/animate.vue

@@ -1,55 +0,0 @@
-
-<template>
-  <div>
-    <p>vue 同时使用transition 和 animate.css</p>
-    <button @click="change"> 触发动画</button>
-    <!-- 自定义name 以及使用animated.css,添加apper实现页面刷新第一次触发动画
-    type="transition" 定义以transition时长为准 animated默认时长1s
-    -->
-    <transition
-    name='fade'
-    :duration="{enter:5000,leave:10000}"
-    appear
-    enter-active-class="animate__animated animate__zoomIn" 
-    leave-active-class="animate__animated animate__zoomOut"
-    apper-active-class = "animate__animated animate__zoomIn"
-    >
-    
-      <div class="div" v-if="show">
-        hello 
-      </div>
-    </transition>
-  </div>
-</template>
- 
-<script type="text/ecmascript-6">
-export default {
-  data() {
-    return {
-      show: true,
-    }
-  },
-  methods: {
-    change() {
-      this.show = !this.show
-    }
-  },
-  components: {
-  }
-}
-</script>
- 
-<style lang="less">
- 
-.div {
-  width: 200px;
-  height: 200px;
-  background-color: pink;
-  &.fade-enter ,.fade-leave-to{
-    opacity: 0;
-  }
-  &.fade-enter-active,.fade-leave-active{
-    transition: opacity 10s;
-  }
-}
-</style>

+ 0 - 314
src/pages/plantGuard/baseAll区域划分海量点展示.vue

@@ -1,314 +0,0 @@
-<!-- mapui-->
-<template>
-<div class='map'>
-  <button @click="aa">sdfsdf</button>
-    <div id="container">dsfgfsdghdf</div>
-</div>
-</template>
-
-<script>
-//这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等)
-//例如:import 《组件名称》 from '《组件路径》';
-
-export default {
-//import引入的组件需要注入到对象中才能使用
-components: {},
-data() {
-//这里存放数据
-return {
-    map:null,
-    data:null,
-    topAdcodes:[100000],//全国区划编码
-    center:[116.3683244,39.915085],
-    zoom:11
-};
-},
-//监听属性 类似于data概念
-computed: {},
-//监控data中的数据变化
-watch: {},
-//方法集合
-methods: {
-    initMap(){
-         //创建地图
-            var that = this
-            this.map = new AMap.Map('container', {
-                center:that.center,
-                zoom: that.zoom
-            });
-            AMapUI.loadUI(['control/BasicControl'], function(BasicControl) {
-                //缩放控件,显示Zoom值
-                that.map.addControl(new BasicControl.Zoom({
-                    position: 'lb',
-                    showZoomNum: true
-                }));
-            });
-                //加载相关组件
-            AMapUI.load(['ui/geo/DistrictCluster', 'ui/misc/PointSimplifier', 'lib/$'], function(DistrictCluster,PointSimplifier, $) {
-
-                //启动页面
-                that.initPage(DistrictCluster,PointSimplifier, $);
-            });
-    },
-    initPage(DistrictCluster,PointSimplifier, $) {
-        var that = this;
-        var pointSimplifierIns = new PointSimplifier({
-            map: that.map, //所属的地图实例
-            // autoSetFitView: false, //禁止自动更新地图视野
-            zIndex: 110,
-            getPosition: function(item) {
-                if (!item) {
-                    return null;
-                }
-                var parts = item.split(',');
-                //返回经纬度
-                return [parseFloat(parts[0]), parseFloat(parts[1])];
-            },
-            getHoverTitle: function(dataItem, idx) {
-                console.log(dataItem);
-                console.log(that.data[idx]);
-                
-                return "<div>"+idx + ': ' + dataItem+"</div>";
-            },
-            renderOptions: {
-                 //点的样式
-                pointStyle: {
-                    //绘制点占据的矩形区域
-                    content: function(ctx, x, y, width, height) {
-
-                        //注意,这里的width和height可能不同于pointStyle里面的width/height, 高清屏幕下会存在比例缩放
-
-                        //这里绘制一个圆顶锥形
-
-                        var yPos = 1 / 3;
-
-                        var top = [x + width / 2, y],
-                            right = [x + width, y + height * yPos],
-                            bottom = [x + width / 2, y + height],
-                            left = [x, y + height * yPos];
-
-                        ctx.moveTo(left[0], left[1]);
-                        ctx.arcTo(top[0], top[1], right[0], right[1], width / 3);
-                        ctx.lineTo(right[0], right[1]);
-                        ctx.lineTo(bottom[0], bottom[1]);
-                        ctx.lineTo(left[0], left[1]);
-
-                    },
-                    //宽度
-                    width: 15,
-                    //高度
-                    height: 30,
-                    offset: ['-50%', '-100%'],
-                    fillStyle: 'red',
-                    lineWidth: 1,
-                    strokeStyle: 'red'
-                },
-                //鼠标hover时的title信息
-                hoverTitleStyle: {
-                    position: 'top'
-                }
-            }
-        });
-        var distCluster = new DistrictCluster({
-            map: that.map, //所属的地图实例
-            zIndex:11,
-            // autoSetFitView: false,
-            topAdcodes: that.topAdcodes,
-            getPosition: function(item) {
-                if (!item) {
-                    return null;
-                }
-                var parts = item.split(',');
-                //返回经纬度
-                return [parseFloat(parts[0]), parseFloat(parts[1])];
-            },
-            renderOptions: {
-                // clusterMarkerKeepConsistent: false, //marker的位置随交互变化
-                 //基础样式
-                featureStyle: {
-                    fillStyle: 'rgba(102,170,0,0.5)', //填充色
-                    lineWidth: 2, //描边线宽
-                    strokeStyle: '#4e6ef2', //描边色
-                    //鼠标Hover后的样式
-                    hoverOptions: {
-                        fillStyle: 'rgba(255,255,255,0.2)'
-                    }
-                },
-                //特定区划级别的默认样式
-                featureStyleByLevel: {
-                    //全国
-                    country: {
-                        fillStyle: 'rgba(78,110,242,0.8)'
-                    },
-                    //省
-                    province: {
-                        fillStyle: 'rgba(78,110,242,0.7)'
-                    },
-                    //市
-                    city: {
-                        fillStyle: 'rgba(78,110,242,0.6)'
-                    },
-                    //区县
-                    district: {
-                        fillStyle:'rgba(78,110,242,0.5)'
-                    }
-                },
-                getClusterMarker: function(feature, dataItems, recycledMarker) {
-
-                    //不是当前feature,直接返回null
-                    if(dataItems.length){
-                        var container, title, body, nodeClassNames = {
-                            title: 'amap-ui-district-cluster-marker-title',
-                            body: 'amap-ui-district-cluster-marker-body',
-                            container: 'amap-ui-district-cluster-marker'
-                        };
-                        
-                        console.log(recycledMarker);
-                        if (recycledMarker) {
-                        console.log(recycledMarker.getContent());
-
-                            container = recycledMarker.getContent();
-
-                            title = $(container).find('.' + nodeClassNames.title)[0];
-
-                            body = $(container).find('.' + nodeClassNames.body)[0];
-
-                        } else {
-
-                            container = document.createElement('div');
-
-                            title = document.createElement('span');
-
-                            title.className = nodeClassNames.title;
-
-                            body = document.createElement('span');
-
-                            body.className = nodeClassNames.body;
-
-                            container.appendChild(title);
-
-                            container.appendChild(body);
-                        }
-                        console.log(feature.properties);
-                        
-                        var props = feature.properties,
-                            routeNames = [];
-
-                        var classNameList = [nodeClassNames.container, 'level_' + props.level, 'adcode_' + props.adcode];
-
-                        container.className = classNameList.join(' ');
-
-                        if (routeNames.length > 0) {
-
-                            routeNames.push(props.name);
-
-                            container.setAttribute('title', routeNames.join('>'));
-
-                        } else {
-                            container.removeAttribute('title');
-                        }
-
-                        $(title).html(props.name);
-                        $(body).html(dataItems.length);
-
-                        var resultMarker = recycledMarker || new AMap.Marker({
-                            topWhenClick: true,
-                            offset: new AMap.Pixel(-20, -30),
-                            content: container
-                        });
-                        console.log(container);
-                        console.log(resultMarker);
-                        
-                        return resultMarker;
-                    }
-                }
-            },
-        });
-            //监听区划面的点击
-        distCluster.on('clusterMarkerClick', function(e, feature) {
-
-           console.log(e)
-           console.log(feature)
-           console.log(that);
-        //    that.$router.push('/plantGuard/page8')
-            //重绘
-            //distCluster.renderLater();
-        });
-        window.distCluster = distCluster;
-
-        function refresh() {
-
-            var zoom = that.map.getZoom();
-            
-            //获取 pointStyle
-            var pointStyle = pointSimplifierIns.getRenderOptions().pointStyle;
-
-            //根据当前zoom调整点的尺寸
-            pointStyle.width = pointStyle.height = 2 * Math.pow(1.2, that.map.getZoom() - 3);
-
-            // var zoom = map.getZoom();
-
-            // if (zoom < 10) {
-
-            //     pointSimplifierIns.hide();
-
-            // } else {
-
-            //     pointSimplifierIns.show();
-            // }
-        }
-
-        that.map.on('zoomend', function() {
-            refresh();
-        });
-
-        refresh();
-
-        $('<div id="loadingTip">加载数据,请稍候...</div>').appendTo(document.body);
-        $.get('https://a.amap.com/amap-ui/static/data/10w.txt', function(csv) {
-
-            $('#loadingTip').remove();
-
-        // var data = [
-        //     "113.665412,34.757975",
-        //     "113.671767,34.815528",
-        //     "113.671867,34.825528",
-        //     "113.735978,34.728131",
-        //     "120.412618,36.382612",
-        //     "112.985037,23.15046",
-        //     "126.687123,45.787618"
-        //     ]
- var data = csv.split('\n').slice(0,100);
-            that.data = data
-            distCluster.setData(data);
-            pointSimplifierIns.setData(data);
-        });
-    },
-    aa(){
-      this.map.setZoom(11)
-      this.map.setCenter([113.671767,34.815528])
-    }
-},
-//生命周期 - 创建完成(可以访问当前this实例)
-created() {
-
-},
-//生命周期 - 挂载完成(可以访问DOM元素)
-mounted() {
-    this.initMap()
-},
-beforeCreate() {}, //生命周期 - 创建之前
-beforeMount() {}, //生命周期 - 挂载之前
-beforeUpdate() {}, //生命周期 - 更新之前
-updated() {}, //生命周期 - 更新之后
-beforeDestroy() {}, //生命周期 - 销毁之前
-destroyed() {}, //生命周期 - 销毁完成
-activated() {}, //如果页面有keep-alive缓存功能,这个函数会触发
-}
-</script>
-<style scoped>
-.map,#container{
-    width: 100%;
-    height: 100%;
-}
-</style>

+ 0 - 529
src/pages/plantGuard/baseAll半成品.vue

@@ -1,529 +0,0 @@
-<!-- mapui-->
-<template>
-<div class='map'>
-    <div id="container">加载数据,请稍候...</div>
-    <div class="leftNavBox">
-        <div class="searchBox">
-            <el-select size="small" @change="searchPro()" filterable v-model="form.province" placeholder="选择省">
-                <el-option label="--请选择--" value=""></el-option>
-                <el-option
-                    v-for="item in provinceList"
-                    :key="item.adcode"
-                    :label="item.name"
-                    :value="item.adcode">
-                </el-option>
-            </el-select>
-            <el-select size="small" @change="searchCity()" filterable v-model="form.city" placeholder="选择市">
-                <el-option label="--请选择--" value=""></el-option>
-                <el-option
-                    v-for="item in cityList"
-                    :key="item.adcode"
-                    :label="item.name"
-                    :value="item.adcode">
-                </el-option>
-            </el-select>
-            <el-select size="small" @change="searchDis()" filterable v-model="form.district" placeholder="选择区">
-                <el-option label="--请选择--" value=""></el-option>
-                <el-option
-                    v-for="item in districtList"
-                    :key="item.adcode"
-                    :label="item.name"
-                    :value="item.adcode">
-                </el-option>
-            </el-select>
-        </div>
-        <div class="listBox">
-            <div class="projectSearch">
-                <div>项目列表</div>
-                <div>
-                    <el-input
-                        size="small"
-                        placeholder="请输入项目名称"
-                        v-model="input"
-                        suffix-icon="el-icon-search"
-                        clearable>
-                    </el-input>
-                </div>
-            </div>
-            <div></div>
-        </div>
-    </div>
-</div>
-</template>
-
-<script>
-//这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等)
-//例如:import 《组件名称》 from '《组件路径》';
-export default {
-//import引入的组件需要注入到对象中才能使用
-components: {},
-data() {
-//这里存放数据
-return {
-    map:null,
-    data:[],
-    topAdcodes:[100000],//全国区划编码
-    center:[116.3683244,39.915085],
-    zoom:4.5,
-    // 搜索
-    form:{
-        province:'',
-        city:'',
-        district:'',
-    },
-    provinceList:[],
-    cityList:[],
-    districtList:[],
-    district:null,
-    input:'',
-    polygons:[],
-    distCluster:null,
-    pointSimplifierIns:null,
-};
-},
-//监听属性 类似于data概念
-computed: {},
-//监控data中的数据变化
-watch: {},
-//方法集合
-methods: {
-    initMap(){
-         //创建地图
-            var that = this
-            this.map = new AMap.Map('container', {
-                center:that.center,
-                zoom: that.zoom
-            });
-            AMapUI.loadUI(['control/BasicControl'], function(BasicControl) {
-                //缩放控件,显示Zoom值
-                that.map.addControl(new BasicControl.Zoom({
-                    position: 'rb',
-                    showZoomNum: true
-                }));
-            });
-                //加载相关组件
-            AMapUI.load(['ui/geo/DistrictCluster', 'lib/$','ui/misc/PointSimplifier'], function(DistrictCluster, $,PointSimplifier) {
-
-                //启动页面
-                that.initPage(DistrictCluster, $,PointSimplifier);
-            });
-    },
-    initPage(DistrictCluster, $,PointSimplifier) {
-        var that = this;
-        //创建组件实例
-        this.pointSimplifierIns = new PointSimplifier({
-            map: this.map, //关联的map
-            zIndex:12,
-            autoSetFitView: false,
-            compareDataItem: function(a, b, aIndex, bIndex) {
-                //数据源中靠后的元素优先,index大的排到前面去
-                // return aIndex > bIndex ? -1 : 1;
-            },
-            getPosition: function(item) {
-                if (!item.lnglat) {
-                    return null;
-                }
-                //返回经纬度
-                return [parseFloat(item.lnglat[0]), parseFloat(item.lnglat[1])];
-            },
-            getHoverTitle: function(dataItem, idx) {
-                //返回数据项的Title信息,鼠标hover时显示
-                return '序号: ' + idx;
-            },
-            renderOptions: {
-                //点的样式
-                pointStyle: {
-                    fillStyle: 'blue' //蓝色填充
-                }
-            }
-        });
-        this.distCluster = new DistrictCluster({
-            map: that.map, //所属的地图实例
-            zIndex:11,
-            autoSetFitView: false,
-            topAdcodes: that.topAdcodes,
-            getPosition: function(item) {
-                if (!item.lnglat) {
-                    return null;
-                }
-                //返回经纬度
-                return [parseFloat(item.lnglat[0]), parseFloat(item.lnglat[1])];
-            },
-            renderOptions: {
-                // clusterMarkerKeepConsistent: false, //marker的位置随交互变化
-                 //基础样式
-                featureStyle: {
-                    fillStyle: 'rgba(102,170,0,0.5)', //填充色
-                    lineWidth: 2, //描边线宽
-                    strokeStyle: '#4e6ef2', //描边色
-                    //鼠标Hover后的样式
-                    hoverOptions: {
-                        fillStyle: 'rgba(78,110,242,0.4)'
-                    }
-                },
-                //特定区划级别的默认样式
-                featureStyleByLevel: {
-                    //全国
-                    country: {
-                        fillStyle: 'rgba(78,110,242,0)'
-                    },
-                    //省
-                    province: {
-                        fillStyle: 'rgba(78,110,242,0)'
-                    },
-                    //市
-                    city: {
-                        fillStyle: 'rgba(78,110,242,0)'
-                    },
-                    //区县
-                    district: {
-                        fillStyle:'rgba(78,110,242,0)'
-                    }
-                },
-                getClusterMarker: function(feature, dataItems, recycledMarker) {
-
-                    //不是当前feature,直接返回null
-                    if(dataItems.length){
-                        var container, title, body, nodeClassNames = {
-                            title: 'amap-ui-district-cluster-marker-title',
-                            body: 'amap-ui-district-cluster-marker-body',
-                            container: 'amap-ui-district-cluster-marker'
-                        };
-                        
-                        console.log(recycledMarker);
-                        if (recycledMarker) {
-                        console.log(recycledMarker.getContent());
-
-                            container = recycledMarker.getContent();
-
-                            title = $(container).find('.' + nodeClassNames.title)[0];
-
-                            body = $(container).find('.' + nodeClassNames.body)[0];
-
-                        } else {
-
-                            container = document.createElement('div');
-
-                            title = document.createElement('span');
-
-                            title.className = nodeClassNames.title;
-
-                            body = document.createElement('span');
-
-                            body.className = nodeClassNames.body;
-
-                            container.appendChild(title);
-
-                            container.appendChild(body);
-                        }
-                        console.log(feature.properties);
-                        
-                        var props = feature.properties,
-                            routeNames = [];
-
-                        var classNameList = [nodeClassNames.container, 'level_' + props.level, 'adcode_' + props.adcode];
-
-                        container.className = classNameList.join(' ');
-
-                        if (routeNames.length > 0) {
-
-                            routeNames.push(props.name);
-
-                            container.setAttribute('title', routeNames.join('>'));
-
-                        } else {
-                            container.removeAttribute('title');
-                        }
-
-                        $(title).html(props.name);
-                        $(body).html(dataItems.length);
-
-                        var resultMarker = recycledMarker || new AMap.Marker({
-                            topWhenClick: true,
-                            offset: new AMap.Pixel(-20, -30),
-                            content: container
-                        });
-                        console.log(container);
-                        console.log(resultMarker);
-                        
-                        return resultMarker;
-                    }
-                }
-            },
-        });
-            //监听区划面的点击
-        this.distCluster.on('clusterMarkerClick', function(e, feature) {
-
-           console.log(e)
-           console.log(feature)
-           console.log(that);
-        //    that.$router.push('/plantGuard/page8')
-            //重绘
-            //distCluster.renderLater();
-        });
-        // window.distCluster = distCluster;
-
-
-        $('<div id="loadingTip">加载数据,请稍候...</div>').appendTo(document.body);
-        $.get('https://a.amap.com/amap-ui/static/data/10w.txt', (csv)=>{
-
-            $('#loadingTip').remove();
-
-        // var data = [
-        //     "113.665412,34.757975",
-        //     "113.671767,34.815528",
-        //     "113.671867,34.825528",
-        //     "113.735978,34.728131",
-        //     "120.412618,36.382612",
-        //     "112.985037,23.15046",
-        //     "126.687123,45.787618"
-        //     ]
-            var data = csv.split('\n').slice(0,1000);
-            // that.data = data
-            this.distCluster.setData(that.data);
-            this.pointSimplifierIns.setData(that.data);
-
-        });
-    },
-    getEquipList() {
-      let uid = sessionStorage.getItem("myuid");
-      this.$axios({
-        method: "POST",
-        url: "/api/api_gateway?method=user.login.user_project_addr",
-        data: this.qs.stringify({
-          // uid:uid
-        })
-      }).then(res => {
-        if (res.data.message == ""){
-            this.data = res.data.data.user_project;
-            // data.forEach((item,index)=>{
-            //     this.data.push(item.lnglat[0]+','+item.lnglat[1])
-            // })
-            this.$nextTick(()=>{
-                this.initMap()
-            })
-        } else {
-          this.$message.error(res.data.message);
-        }
-      });
-    },
-    districtFun(){
-        this.map = new AMap.Map('container', {
-            resizeEnable: true,
-            center: [116.30946, 39.937629],
-            zoom: 3
-        });
-        //行政区划查询
-        var opts = {
-            subdistrict: 1,   //返回下一级行政区
-            showbiz:false  //最后一级返回街道信息
-        };
-        this.district = new AMap.DistrictSearch(opts);//注意:需要使用插件同步下发功能才能这样直接使用
-        this.district.search('中国', (status, result)=>{
-            if(status=='complete'){
-                this.getData(result.districtList[0],'country');
-            }
-        });
-    },
-    getData(data,level) {
-        console.log(data);
-        var bounds = data.boundaries;
-        if (bounds) {
-            for (var i = 0, l = bounds.length; i < l; i++) {
-                // var polygon = new AMap.Polygon({
-                //     map: this.map,
-                //     strokeWeight: 2,
-                //     strokeColor: 'rgba(78,110,242,1)',
-                //     fillColor: 'rgba(78,110,242,1)',
-                //     fillOpacity: 0.2,
-                //     path: bounds[i]
-                // });
-                var polygon = new AMap.Polygon({
-                    map: this.map,
-                    strokeWeight: 2,
-                    strokeColor: 'red',
-                    fillColor: 'red',
-                    fillOpacity: 0.2,
-                    path: bounds[i]
-                });
-                this.polygons.push(polygon);
-            }
-            this.map.setFitView();//地图自适应
-        }
-        var subList = data.districtList;
-        //清空下一级别的下拉列表
-        if (level === 'country') {
-            console.log('country');
-            
-            this.provinceList = subList;
-            this.cityList = []
-            this.districtList = [];
-            this.form.province=''
-            this.form.city=''
-            this.form.district=''
-        } else if (level === 'province') {
-            console.log('province');
-            this.cityList = subList;
-            this.districtList = [];
-            this.form.city=''
-            this.form.district=''
-        } else if (level === 'city') {
-            console.log('city');
-            this.districtList = subList;
-            this.form.district=''
-        }
-
-        console.log(subList);
-        // if (subList) {
-        //     var contentSub = new Option('--请选择--');
-        //     var curlevel = subList[0].level;
-        //     var curList =  document.querySelector('#' + curlevel);
-        //     curList.add(contentSub);
-        //     for (var i = 0, l = subList.length; i < l; i++) {
-        //         var name = subList[i].name;
-        //         var levelSub = subList[i].level;
-        //         var cityCode = subList[i].citycode;
-        //         contentSub = new Option(name);
-        //         contentSub.setAttribute("value", levelSub);
-        //         contentSub.center = subList[i].center;
-        //         contentSub.adcode = subList[i].adcode;
-        //         curList.add(contentSub);
-        //     }
-        // }
-        
-    },
-    searchPro(){
-        var keyword = this.form.province; //关键字 
-        console.log(this.form.province);
-        console.log(this.form.city);
-        console.log(this.form.district);
-        this.distCluster.getClusterRecord(this.form.province,(error, result)=>{
-            console.log(result);
-        })
-        if(!keyword){
-            this.cityList = []
-            this.districtList = [];
-            this.form.city=''
-            this.form.district=''
-        }
-        // if(this.form.province||this.form.city||this.form.district){
-        //     this.distCluster.setData([])
-        // }else{
-        //     this.distCluster.setData(this.data)
-        // }
-        this.search('province',keyword)
-        
-    },
-    searchCity(){
-        var keyword = this.form.city; //关键字 
-        if(!keyword){
-            this.districtList = [];
-            this.form.district=''
-            return
-        }
-        this.search('city',keyword)
-    },
-    searchDis(){
-        var keyword = this.form.district; //关键字 
-        if(!keyword){
-            return
-        }
-        this.search('district',keyword)
-    },
-    search(levelSub,keyword) {
-        //清除地图上所有覆盖物
-        for (var i = 0, l = this.polygons.length; i < l; i++) {
-            this.polygons[i].setMap(null);
-        }
-        console.log(this.distCluster);
-        // this.distCluster.setData([
-            // "113.665412,34.757975",
-            // "113.671767,34.815528",
-            // "113.671867,34.825528",
-            // "113.735978,34.728131",
-            // "120.412618,36.382612",
-            // "112.985037,23.15046",
-            // "126.687123,45.787618"
-        // ])
- 
-        
-        if(!keyword){
-            return;
-        }
-
-        this.district.setLevel(levelSub); //行政区级别
-        this.district.setExtensions('all');
-        //行政区查询
-        //按照adcode进行查询可以保证数据返回的唯一性
-        this.district.search(keyword,(status, result)=>{
-            if(status === 'complete'){
-                this.getData(result.districtList[0],levelSub);
-            }
-        });
-    },
-    addMassMarkers(){
-        //设置数据源,data需要是一个数组
-        // this.pointSimplifierIns.setData(data);
-
-        //监听事件
-        this.pointSimplifierIns.on('pointClick pointMouseover pointMouseout', function(e, record) {
-            console.log(e.type, record);
-        });
-    }
-},
-//生命周期 - 创建完成(可以访问当前this实例)
-created() {
-
-},
-//生命周期 - 挂载完成(可以访问DOM元素)
-mounted() {
-    this.getEquipList()
-    // setTimeout(()=>{
-        this.districtFun()
-    // },3000)
-},
-beforeCreate() {}, //生命周期 - 创建之前
-beforeMount() {}, //生命周期 - 挂载之前
-beforeUpdate() {}, //生命周期 - 更新之前
-updated() {}, //生命周期 - 更新之后
-beforeDestroy() {}, //生命周期 - 销毁之前
-destroyed() {}, //生命周期 - 销毁完成
-activated() {}, //如果页面有keep-alive缓存功能,这个函数会触发
-}
-</script>
-<style scoped lang='less'>
-.map,#container{
-    width: 100%;
-    height: 100%;
-}
-.leftNavBox{
-    position: absolute;
-    left: 100px;
-    top: 160px;
-    bottom:0;
-    /deep/.el-select{
-        width: 1.4rem;
-    }
-    .listBox{
-        width: 4.25rem;
-        height: 90%;
-        margin-top: 16px;
-        border-radius: 6px;
-        background: rgba(255,255,255,.58);
-        box-shadow: 0px 3px 9px 0px #a7a7a7;
-        .projectSearch{
-            display: flex;
-            justify-content: space-between;
-            align-items: center;
-            padding: .15rem;
-            background: #182037;
-            color: #fff;
-            font-size: .175rem;
-            border-radius: 6px 6px 0 0;
-            /deep/.el-input{
-                width: 2.5rem;
-            }
-        }
-    }
-}
-</style>

+ 0 - 335
src/pages/plantGuard/baseAll海量点.vue

@@ -1,335 +0,0 @@
-<!--  -->
-<template>
-  <div class="inner">
-    <div class="mapCover">
-      <div id="map">地图</div>
-    </div>
-    <div class="mapTypebox">
-      <el-radio-group v-model="mapType" @change="changeMapType">
-        <el-radio :label="0">标准图</el-radio>
-        <el-radio :label="1">卫星图</el-radio>
-      </el-radio-group>
-    </div>
-  </div>
-</template>
-
-<script>
-//这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等)
-//例如:import 《组件名称》 from '《组件路径》';
-import { bd09togcj02,gcj02tobd09,wgs84togcj02,gcj02towgs84 } from "../../components/home/coordtransform_utils";  //纠偏方法
-export default {
-  //import引入的组件需要注入到对象中才能使用
-  components: {
-  },
-  data() {
-    //这里存放数据
-    return {
-      // center: [65.212881,31.279042],
-      // zoom: 8,
-      mapType: 1,
-      tileLayer1: null,
-      tileLayer2: null,
-      equipListCurr:[],
-      equipStyleObject:[
-        {
-          url: require("../../../static/images/projectIcon.png"), // 设别类型0
-          size: new AMap.Size(70, 70), // 图标大小
-          anchor: new AMap.Pixel(0,0) // 图标显示位置偏移量,基准点为图标左上角
-        },
-        {
-          url: require("@/assets/images/home/mapView/scd.png"), // 设别类型1
-          size: new AMap.Size(25, 15), // 图标大小
-          anchor: new AMap.Pixel(5, 5) // 图标显示位置偏移量,基准点为图标左上角
-        },
-        {
-          url: require("@/assets/images/home/mapView/scd.png"), // 设别类型2
-          size: new AMap.Size(25, 15), // 图标大小
-          anchor: new AMap.Pixel(5, 5) // 图标显示位置偏移量,基准点为图标左上角
-        },
-        {
-          url: require("@/assets/images/home/mapView/cbd.png"), // 设别类型3
-          size: new AMap.Size(25, 15), // 图标大小
-          anchor: new AMap.Pixel(5, 5) // 图标显示位置偏移量,基准点为图标左上角
-        },
-        {
-          url: require("@/assets/images/home/mapView/xyq.png"), // 设别类型4
-          size: new AMap.Size(25, 15), // 图标大小
-          anchor: new AMap.Pixel(5, 5) // 图标显示位置偏移量,基准点为图标左上角
-        },
-        {
-          url: require("@/assets/images/home/mapView/qxz.png"), // 设别类型5
-          size: new AMap.Size(25, 15), // 图标大小
-          anchor: new AMap.Pixel(5, 5) // 图标显示位置偏移量,基准点为图标左上角
-        },
-        {
-          url: require("@/assets/images/home/mapView/jk.png"), // 设别类型6
-          size: new AMap.Size(25, 15), // 图标大小
-          anchor: new AMap.Pixel(5, 5) // 图标显示位置偏移量,基准点为图标左上角
-        },
-        {
-          url: require("@/assets/images/home/mapView/bzy.png"), // 设别类型7
-          size: new AMap.Size(25, 15), // 图标大小
-          anchor: new AMap.Pixel(5, 5) // 图标显示位置偏移量,基准点为图标左上角
-        },
-        {
-          url: require("@/assets/images/home/mapView/bzy.png"), // 设别类型8
-          size: new AMap.Size(25, 15), // 图标大小
-          anchor: new AMap.Pixel(5, 5) // 图标显示位置偏移量,基准点为图标左上角
-        },
-        {
-          url: require("@/assets/images/home/mapView/tccb.png"), // 设别类型9
-          size: new AMap.Size(25, 15), // 图标大小
-          anchor: new AMap.Pixel(5, 5) // 图标显示位置偏移量,基准点为图标左上角
-        },
-      ],
-      icon:{
-        // 图标类型,现阶段只支持 image 类型
-        type: 'image',
-        // 图片 url
-        image: require("../../../static/images/icon5.svg"),
-        // 图片尺寸
-        size: [74, 66],
-        // 图片相对 position 的锚点,默认为 bottom-center
-        anchor: 'center',
-      },
-      // markers: [
-      //   {
-      //     addr: [121.5273285, 31.21515044],
-      //     projectname: '南阳农田项目南阳农田项目',
-      //     uid:1
-      //   },
-      // ],
-      markersStatus:{
-        iconOffset: [-70, -70],
-        textOffset: [-35, 0],
-        icon:require('../../../static/images/icon5.svg'),
-        events: {
-          click: (e) => {
-            console.log(e.target.Ce.vid)
-            console.log(this.markers[e.target.Ce.vid])
-            // this.$store.state.user_id = this.markers[e.target.Ce.vid].uid
-            this.$store.commit('setUserId',this.markers[e.target.Ce.vid].uid)
-            this.$router.push('page1')
-          },
-          dragend: (e) => {
-            console.log('---event---: dragend')
-            // this.markers[0].position = [e.lnglat.lng, e.lnglat.lat];
-          }
-        },
-        visible: true,
-        draggable: false,
-      },
-      txtLabels:[],
-      layer:null,
-      markers:[],
-    };
-  },
-  //监听属性 类似于data概念
-  computed: {},
-  //监控data中的数据变化
-  watch: {},
-  //方法集合
-  methods: {
-    // 初始化地图
-    infoMap(){
-        this.map = new AMap.Map("map", {
-            center: this.center,
-            resizeEnable: true,
-            zoom: 4,
-            lang: "en",
-        });
-        AMap.plugin(
-        [
-          "AMap.ToolBar",
-          "AMap.Scale",
-          "AMap.MouseTool",
-          "AMap.Geocoder",
-          "AMap.PolyEditor",
-        ],
-        () => {
-          this.map.addControl(new AMap.ToolBar());
-          this.map.addControl(new AMap.Scale());
-
-          this.geocoder = new AMap.Geocoder({
-            city: "全国",
-            radius: 1000,
-          });
-
-        }
-      );
-      this.tileLayer1 = new AMap.TileLayer({
-        tileUrl:
-          "http://t{0,1,2,3,4,5,6,7}.tianditu.gov.cn/DataServer?T=img_w&tk=888bc7de1a5f14aa1b335b02e558d9b3&x=[x]&y=[y]&l=[z]",
-        zIndex: 10,
-      }); //卫星图层
-      this.tileLayer2 = new AMap.TileLayer({
-        // 图块取图地址
-        tileUrl:
-          "http://t{0,1,2,3,4,5,6,7}.tianditu.gov.cn/DataServer?T=cta_w&tk=888bc7de1a5f14aa1b335b02e558d9b3&x=[x]&y=[y]&l=[z]",
-        zIndex: 101,
-      });
-      this.map.add(this.tileLayer1);
-      // this.map.add(this.tileLayer2);
-      this.getEquipList();
-    },
-    changeMapType(val){ 
-      if(val==0){
-        this.tileLayer1.hide()
-        this.tileLayer2.hide()
-      }else{
-        this.tileLayer1.show()
-        this.tileLayer2.show()
-      }
-    },
- 
-    iconFormat(equip_ip, item) {
-      switch (equip_ip + "") {
-        case "2":
-          item.icon = require("@/assets/images/home/mapView/scd.png");
-          break;
-        case "3":
-          item.icon = require("@/assets/images/home/mapView/cbd.png");
-          break;
-        case "4":
-          item.icon = require("@/assets/images/home/mapView/xyq.png");
-          break;
-        case "5":
-          item.icon = require("@/assets/images/home/mapView/qxz.png");
-          break;
-        case "6":
-          item.icon = require("@/assets/images/home/mapView/jk.png");
-          break;
-        case "7":
-          item.icon = require("@/assets/images/home/mapView/bzy.png");
-          break;
-        case "9":
-          item.icon = require("@/assets/images/home/mapView/tccb.png");
-          break;
-      }
-    },
-    getEquipList() {
-      this.layer = new AMap.LabelsLayer({
-          zooms: [3, 20],
-          zIndex: 1000,
-          collision: false,
-          allowCollision: false,
-      });
-      let uid = sessionStorage.getItem("myuid");
-      this.$axios({
-        method: "POST",
-        url: "/api/api_gateway?method=user.login.user_project_addr",
-        data: this.qs.stringify({
-          // uid:uid
-        })
-      }).then(res => {
-        if (res.data.message == ""){
-          var data = res.data.data.user_project;
-          this.equipListCurr = data.map((item) => {
-            if (item.gps == 1) {
-              //GPS
-              item.lnglat = wgs84togcj02(item.lng, item.lat);
-            }
-            item.position=[item.lnglat[0],item.lnglat[1]]
-            item.text={
-                content: item.projectname,
-                direction: 'bottom',
-                offset: [-20, -5],
-                style: {
-                  // 字体大小
-                  fontSize: 16,
-                  // 字体颜色
-                  fillColor: '#ff0000',
-                  // 描边颜色
-                  strokeColor: '#ff0000',
-                  // 描边宽度
-                  strokeWidth: 1,
-                }
-            }
-            item.extData={
-              uid:item.uid
-            }
-            item.icon=this.icon
-            return item;
-              
-          });
-
-          this.equipListCurr.forEach((item)=>{
-            var labelMarker = new AMap.LabelMarker(item);
-            labelMarker.on("click", (e) => {
-              this.equipMarkerClick(e.target.getExtData().uid);
-            });
-            this.markers.push(labelMarker);
-          })
-
-          // 将 marker 添加到图层
-          this.layer.add(this.markers);
-          this.map.add(this.layer);
-          // this.massMarks.setMap(this.map);
-          // this.massMarks.on("click", (e) => {
-          //   this.equipMarkerClick(e.data);
-          // });
-        } else {
-          this.$message.error(res.data.message);
-        }
-      });
-    },
-    equipMarkerClick(uid) {
-      this.$store.commit('setUserId',uid)
-      this.$router.push('page1')
-    },
-
-  },
-  //生命周期 - 创建完成(可以访问当前this实例)
-  created() {},
-  //生命周期 - 挂载完成(可以访问DOM元素)
-  mounted() {
-    this.infoMap()
-  },
-  beforeCreate() {}, //生命周期 - 创建之前
-  beforeMount() {}, //生命周期 - 挂载之前
-  beforeUpdate() {}, //生命周期 - 更新之前
-  updated() {
-    
-  }, //生命周期 - 更新之后
-  beforeDestroy() {}, //生命周期 - 销毁之前
-  destroyed() {}, //生命周期 - 销毁完成
-  activated() {} //如果页面有keep-alive缓存功能,这个函数会触发
-};
-</script>
-<style scoped lang="less">
-.inner{
-    height: 100%;
-    position: relative;
-    .mapCover{
-        height: 100%;
-        #map{
-            width: 100%;
-            height: 100%;
-        }
-    }
-    .mapTypebox{
-        position: absolute;
-        right: 20px;
-        top:30px;
-        background: #fff;
-        padding: 5px;
-        border-radius: 5px;
-    }
-}
-// 标注点提示文本
-/deep/.amap-marker-label{
-      background: transparent;
-    border: none;
-    color: red;
-    font-size: 14px;
-    font-weight: 700;
-    text-shadow: #fff 1px 0 0, #fff 0 1px 0, #fff -1px 0 0, #fff 0 -1px 0;
-}
-/deep/.el-radio__input.is-checked .el-radio__inner{
-  border-color: #0195ff;
-  background: #0195ff;
-}
-/deep/.el-radio__input.is-checked + .el-radio__label {
-  color: #0195ff;
-}
-</style>

Різницю між файлами не показано, бо вона завелика
+ 0 - 13586
src/pages/plantGuard/citydata.js


+ 0 - 123
src/pages/plantGuard/dialog.vue

@@ -1,123 +0,0 @@
-<!-- 弹出框公共组件 -->
-<template>
-  <div class='DialogVisible' :style="{marginLeft:-width/2+'px'}">
-    <div class="mask">
-      <slot name="mask"></slot>
-    </div>
-    <div class="dialog__wrapper" :style="{width:width+'px'}">
-      <div class="dialog-header">
-        <slot name="header">
-          <span class="dialog-title">数据详情</span>
-          <button type="button" class="dialog-headerbtn">
-            <i class="el-icon el-icon-close"></i>
-          </button>
-        </slot>
-      </div>
-      <div class="dialog-body">
-        <slot name="inner"></slot>
-      </div>
-    </div>
-    
-  </div>
-</template>
-
-<script>
-//这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等)
-//例如:import 《组件名称》 from '《组件路径》';
-
-export default {
-//import引入的组件需要注入到对象中才能使用
-components: {},
-props:['width'],
-data() {
-//这里存放数据
-return {
-};
-},
-//监听属性 类似于data概念
-computed: {},
-//监控data中的数据变化
-watch: {},
-//方法集合
-methods: {
-
-},
-//生命周期 - 创建完成(可以访问当前this实例)
-created() {
-
-},
-//生命周期 - 挂载完成(可以访问DOM元素)
-mounted() {
-
-},
-beforeCreate() {}, //生命周期 - 创建之前
-beforeMount() {}, //生命周期 - 挂载之前
-beforeUpdate() {}, //生命周期 - 更新之前
-updated() {}, //生命周期 - 更新之后
-beforeDestroy() {}, //生命周期 - 销毁之前
-destroyed() {}, //生命周期 - 销毁完成
-activated() {}, //如果页面有keep-alive缓存功能,这个函数会触发
-}
-</script>
-<style scoped lang="less">
-.DialogVisible{
-  position: fixed;
-  top: 215px;
-  left: 50%;
-  overflow: auto;
-  margin: 0;
-  z-index: 555;
-  .mask{
-    position: fixed;
-    left: 0;
-    top: 0;
-    width: 100%;
-    height: 100%;
-    opacity: 0.5;
-    background: #000000;
-  }
-  .dialog__wrapper{
-    border-radius: 5px;
-    margin: 0 auto 50px;
-    margin-top: 0vh;
-    // width: 500px;
-    position: relative;
-    background: #FFFFFF;
-    border-radius: 2px;
-    -webkit-box-shadow: 0 1px 3px rgb(0 0 0 / 30%);
-    box-shadow: 0 1px 3px rgb(0 0 0 / 30%);
-    -webkit-box-sizing: border-box;
-    box-sizing: border-box;
-    background: #fff;
-    .dialog-header{
-        padding: 20px;
-        padding-bottom: 10px;
-        background: #F2F2F2;
-      .dialog-title{
-        line-height: 24px;
-        font-size: 18px;
-        color: #303133;
-      }
-      .dialog-headerbtn{
-        position: absolute;
-        top: 20px;
-        right: 20px;
-        padding: 0;
-        background: transparent;
-        border: none;
-        outline: none;
-        cursor: pointer;
-        font-size: 16px;
-      }
-    }
-  }
-  .dialog-body{
-    padding: 20px 20px;
-    color: #606266;
-    font-size: 14px;
-  }
-}
-.animate__zoomOut.DialogVisible{
-  display: none;
-}
-</style>

+ 0 - 126
src/pages/plantGuard/dialogHollow.vue

@@ -1,126 +0,0 @@
-<!-- 地图镂空弹出框公共组件 -->
-<template>
-  <div class='DialogVisible' :style="{marginLeft:-width/2+'px'}">
-    <!-- <div class="mask">
-      <slot name="mask"></slot>
-    </div> -->
-    <div class="dialog__wrapper" :style="{width:width+'px'}">
-      <div class="dialog-header">
-        <slot name="header">
-          <span class="dialog-title">数据详情</span>
-          <button type="button" class="dialog-headerbtn">
-            <i class="el-icon el-icon-close"></i>
-          </button>
-        </slot>
-      </div>
-      <div class="dialog-body">
-        <slot name="inner"></slot>
-      </div>
-    </div>
-    
-  </div>
-</template>
-
-<script>
-//这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等)
-//例如:import 《组件名称》 from '《组件路径》';
-
-export default {
-//import引入的组件需要注入到对象中才能使用
-components: {},
-props:['width'],
-data() {
-//这里存放数据
-return {
-};
-},
-//监听属性 类似于data概念
-computed: {},
-//监控data中的数据变化
-watch: {},
-//方法集合
-methods: {
-
-},
-//生命周期 - 创建完成(可以访问当前this实例)
-created() {
-
-},
-//生命周期 - 挂载完成(可以访问DOM元素)
-mounted() {
-
-},
-beforeCreate() {}, //生命周期 - 创建之前
-beforeMount() {}, //生命周期 - 挂载之前
-beforeUpdate() {}, //生命周期 - 更新之前
-updated() {}, //生命周期 - 更新之后
-beforeDestroy() {}, //生命周期 - 销毁之前
-destroyed() {}, //生命周期 - 销毁完成
-activated() {}, //如果页面有keep-alive缓存功能,这个函数会触发
-}
-</script>
-<style scoped lang="less">
-.DialogVisible{
-  position: fixed;
-  top: 215px;
-  left: 50%;
-  overflow: auto;
-  margin: 0;
-  z-index: 555;
-  .mask{
-    position: fixed;
-    left: 0;
-    top: 0;
-    width: 100%;
-    height: 100%;
-    opacity: 0.5;
-    background: #000000;
-  }
-  .dialog__wrapper{
-    border-radius: 5px;
-    // margin: 0 auto 50px;
-    // margin-top: 23vh;
-    // width: 500px;
-    position: relative;
-    background: #FFFFFF;
-    border-radius: 2px;
-    -webkit-box-shadow: 0 1px 3px rgb(0 0 0 / 30%);
-    box-shadow: 0 1px 3px rgb(0 0 0 / 30%);
-    -webkit-box-sizing: border-box;
-    box-sizing: border-box;
-    background: #fff;
-    .dialog-header{
-        padding: 20px;
-        padding-bottom: 10px;
-        background: #F2F2F2;
-      .dialog-title{
-        line-height: 24px;
-        font-size: 18px;
-        color: #303133;
-      }
-      .dialog-headerbtn{
-        position: absolute;
-        top: 20px;
-        right: 20px;
-        padding: 0;
-        background: transparent;
-        border: none;
-        outline: none;
-        cursor: pointer;
-        font-size: 16px;
-      }
-    }
-  }
-  .dialog-body{
-    padding: 30px 20px;
-    color: #606266;
-    font-size: 14px;
-    max-height: 55vh;
-    overflow-y: auto;
-    overflow-x: hidden;
-  }
-}
-.animate__zoomOut.DialogVisible{
-  display: none;
-}
-</style>

src/pages/plantGuard/page8.vue → src/pages/plantGuard/equipManage/equipManage.vue


src/pages/monitor/monitorSystem/Monitor.vue → src/pages/plantGuard/monitor/Monitor.vue


src/pages/monitor/monitorSystem/MonitorOld.vue → src/pages/plantGuard/monitor/MonitorOld.vue


src/pages/monitor/monitorSystem/PhotoView.vue → src/pages/plantGuard/monitor/PhotoView.vue


Різницю між файлами не показано, бо вона завелика
+ 0 - 1154
src/pages/plantGuard/page1 copy.vue


Різницю між файлами не показано, бо вона завелика
+ 0 - 44
src/pages/plantGuard/page2.vue


Різницю між файлами не показано, бо вона завелика
+ 0 - 71
src/pages/plantGuard/page3.vue


+ 34 - 253
src/pages/plantGuard/page1.vue

@@ -129,41 +129,6 @@
           </template>
         </div>
     </el-dialog>
-    <transition
-        enter-active-class="animate__animated animate__zoomIn" 
-        leave-active-class="animate__animated animate__zoomOut"
-    >
-      <dialog-box v-if="detailsShow==12" width='800'>
-          <template v-slot:header>
-            <span class="dialog-title">杀虫灯数据框</span>
-            <button type="button" @click="detailsShow=''" class="dialog-headerbtn">
-              <i class="el-icon el-icon-close"></i>
-            </button>
-          </template>
-          <template v-slot:inner>
-            <equip-info v-if="hackReset" @getNowState='getNowState' :equipId="queryInfo.equip_id" :d_id="queryInfo.d_id" :equipType='detailsShow'>
-              <template v-solt:equipStateInner></template>
-            </equip-info>
-            <div class="equipData">
-              <div class="more" @click="lookmore()">设备控制</div>
-              <template>
-                <el-tabs v-model="activeName" @tab-click="tabshandleClick">
-                  <el-tab-pane
-                    v-for="(pages, index) in pages['2']"
-                    v-bind:key="index"
-                    :label="pages.label"
-                    :name="pages.name"
-                  > 
-                    <!-- <keep-alive> -->
-                      <components :is="pages.name" :equipId="queryInfo.equip_id" :d_id="queryInfo.d_id" :equipType='detailsShow' v-if="pages.name == nowPage && hackReset"></components>
-                    <!-- </keep-alive> -->
-                  </el-tab-pane>
-                </el-tabs>
-              </template>
-            </div>
-          </template>
-      </dialog-box>
-    </transition>
     <!-- 测报灯数据框 -->
     <el-dialog
       class="figEldialog"
@@ -201,41 +166,6 @@
           </template>
         </div>
     </el-dialog>
-    <transition
-        enter-active-class="animate__animated animate__zoomIn" 
-        leave-active-class="animate__animated animate__zoomOut"
-    >
-      <dialog-box v-if="detailsShow==13" width='800'>
-          <template v-slot:header>
-            <span class="dialog-title">测报灯数据框</span>
-            <button type="button" @click="detailsShow=''" class="dialog-headerbtn">
-              <i class="el-icon el-icon-close"></i>
-            </button>
-          </template>
-          <template v-slot:inner>
-            <equip-info v-if="hackReset" @getNowState='getNowState' :equipId="queryInfo.equip_id" :d_id="queryInfo.d_id" :equipType='detailsShow'>
-              <template v-solt:equipStateInner></template>
-            </equip-info>
-            <div class="equipData">
-              <div class="more" @click="lookmore()">设备控制</div>
-              <template>
-                <el-tabs v-model="activeName" @tab-click="tabshandleClick">
-                  <el-tab-pane
-                    v-for="(pages, index) in pages['3']"
-                    v-bind:key="index"
-                    :label="pages.label"
-                    :name="pages.name"
-                  > 
-                    <!-- <keep-alive> -->
-                      <components :is="pages.name" :equipId="queryInfo.equip_id" :d_id="queryInfo.d_id" :equipType='detailsShow' v-if="pages.name == nowPage && hackReset"></components>
-                    <!-- </keep-alive> -->
-                  </el-tab-pane>
-                </el-tabs>
-              </template>
-            </div>
-          </template>
-      </dialog-box>
-    </transition>
     <!-- 性诱设备数据框 -->
     <el-dialog
       class="figEldialog"
@@ -273,41 +203,6 @@
           </template>
         </div>
     </el-dialog>
-    <transition
-        enter-active-class="animate__animated animate__zoomIn" 
-        leave-active-class="animate__animated animate__zoomOut"
-    >
-      <dialog-box v-if="detailsShow==14" width='800'>
-          <template v-slot:header>
-            <span class="dialog-title">性诱设备数据框</span>
-            <button type="button" @click="detailsShow=''" class="dialog-headerbtn">
-              <i class="el-icon el-icon-close"></i>
-            </button>
-          </template>
-          <template v-slot:inner>
-            <equip-info v-if="hackReset"  @getNowState='getNowState' :equipId="queryInfo.equip_id" :d_id="queryInfo.d_id" :equipType='detailsShow'>
-              <template v-solt:equipStateInner></template>
-            </equip-info>
-            <div class="equipData">
-              <div class="more" @click="lookmore()">设备控制</div>
-              <template>
-                <el-tabs v-model="activeName" @tab-click="tabshandleClick">
-                  <el-tab-pane
-                    v-for="(pages, index) in pages['4']"
-                    v-bind:key="index"
-                    :label="pages.label"
-                    :name="pages.name"
-                  > 
-                    <!-- <keep-alive> -->
-                      <components :is="pages.name" :equipId="queryInfo.equip_id" :d_id="queryInfo.d_id" :equipType='detailsShow' v-if="pages.name == nowPage && hackReset"></components>
-                    <!-- </keep-alive> -->
-                  </el-tab-pane>
-                </el-tabs>
-              </template>
-            </div>
-          </template>
-      </dialog-box>
-    </transition>
     <!-- 气象站数据框 -->
     <el-dialog
       class="figEldialog"
@@ -345,41 +240,6 @@
           </template>
         </div>
     </el-dialog>
-    <transition
-        enter-active-class="animate__animated animate__zoomIn" 
-        leave-active-class="animate__animated animate__zoomOut"
-    >
-      <dialog-box v-if="detailsShow==15" width='800'>
-          <template v-slot:header>
-            <span class="dialog-title">气象站数据框</span>
-            <button type="button" @click="detailsShow=''" class="dialog-headerbtn">
-              <i class="el-icon el-icon-close"></i>
-            </button>
-          </template>
-          <template v-slot:inner>
-            <equip-info v-if="hackReset" @getNowState='getNowState' :equipId='queryInfo.equip_id' :d_id="queryInfo.d_id" :equipType='detailsShow'>
-              <template v-solt:equipStateInner></template>
-            </equip-info>
-            <div class="equipData">
-              <div class="more" @click="lookmore()">设备控制</div>
-              <template>
-                <el-tabs v-model="activeName" @tab-click="tabshandleClick">
-                  <el-tab-pane
-                    v-for="(pages, index) in pages['5']"
-                    v-bind:key="index"
-                    :label="pages.label"
-                    :name="pages.name"
-                  > 
-                    <!-- <keep-alive> -->
-                      <components :is="pages.name" :equipId="queryInfo.equip_id" :d_id="queryInfo.d_id" :equipType='detailsShow' v-if="pages.name == nowPage && hackReset"></components>
-                    <!-- </keep-alive> -->
-                  </el-tab-pane>
-                </el-tabs>
-              </template>
-            </div>
-          </template>
-      </dialog-box>
-    </transition>
     <!-- 监控数据框 -->
     <el-dialog
       class="figEldialog"
@@ -408,75 +268,33 @@
                 @mouseup="stopConfigCamera()"
                 class="upCtr"
               >
-                <img src="../../../static/images/jkctrl1.png" alt="">
+                <img src="../../../../static/images/jkctrl1.png" alt="">
               </div>
               <div
                 @mousedown="configCamera('move', 1)"
                 @mouseup="stopConfigCamera()"
                 class="downCtr"
               >
-                <img src="../../../static/images/jkctrl2.png" alt="">
+                <img src="../../../../static/images/jkctrl2.png" alt="">
               </div>
               <div
                 @mousedown="configCamera('move', 2)"
                 @mouseup="stopConfigCamera()"
                 class="leftCtr"
               >
-                <img src="../../../static/images/jkctrl3.png" alt="">
+                <img src="../../../../static/images/jkctrl3.png" alt="">
               </div>
               <div
                 @mousedown="configCamera('move', 3)"
                 @mouseup="stopConfigCamera()"
                 class="rightCtr"
               >
-                <img src="../../../static/images/jkctrl4.png" alt="">
+                <img src="../../../../static/images/jkctrl4.png" alt="">
               </div>
             </div>
           </div>
         </div>
     </el-dialog>
-    <transition
-        enter-active-class="animate__animated animate__zoomIn" 
-        leave-active-class="animate__animated animate__zoomOut"
-    >
-      <div v-if="detailsShow==16" class="jkDialog">
-        <div class="jkTitle">
-          <div>监控</div>
-          <div @click="jkClose()"><i class="el-icon-close"></i></div>
-        </div>
-        <div id="videoCon"></div>
-        <div class="direc">
-          <div
-            @mousedown="configCamera('move', 0)"
-            @mouseup="stopConfigCamera()"
-            class="upCtr"
-          >
-            <img src="../../../static/images/jkctrl1.png" alt="">
-          </div>
-          <div
-            @mousedown="configCamera('move', 1)"
-            @mouseup="stopConfigCamera()"
-            class="downCtr"
-          >
-            <img src="../../../static/images/jkctrl2.png" alt="">
-          </div>
-          <div
-            @mousedown="configCamera('move', 2)"
-            @mouseup="stopConfigCamera()"
-            class="leftCtr"
-          >
-            <img src="../../../static/images/jkctrl3.png" alt="">
-          </div>
-          <div
-            @mousedown="configCamera('move', 3)"
-            @mouseup="stopConfigCamera()"
-            class="rightCtr"
-          >
-            <img src="../../../static/images/jkctrl4.png" alt="">
-          </div>
-        </div>
-      </div>
-    </transition>
     <!-- 孢子仪数据框 -->
      <el-dialog
       class="figEldialog"
@@ -520,41 +338,6 @@
           </template>
         </div>
     </el-dialog>
-    <transition
-        enter-active-class="animate__animated animate__zoomIn" 
-        leave-active-class="animate__animated animate__zoomOut"
-    >
-      <dialog-box v-if="detailsShow==17" width='800'>
-          <template v-slot:header>
-            <span class="dialog-title">孢子仪数据框</span>
-            <button type="button" @click="detailsShow=''" class="dialog-headerbtn">
-              <i class="el-icon el-icon-close"></i>
-            </button>
-          </template>
-          <template v-slot:inner>
-            <equip-info v-if="hackReset" @child-event="setTimeDialogShow" @getNowState='getNowState' :d_id="queryInfo.d_id" :equipId='queryInfo.equip_id' :equipType='detailsShow'>
-              <template v-solt:equipStateInner></template>
-            </equip-info>
-            <div class="equipData">
-              <div class="more" @click="lookmore()">设备控制</div>
-              <template>
-                <el-tabs v-model="activeName" @tab-click="tabshandleClick">
-                  <el-tab-pane
-                    v-for="(pages, index) in pages['7']"
-                    v-bind:key="index"
-                    :label="pages.label"
-                    :name="pages.name"
-                  > 
-                    <!-- <keep-alive> -->
-                      <components :is="pages.name" :equipId="queryInfo.equip_id" :d_id="queryInfo.d_id" :equipType='detailsShow' ref="child7" v-if="pages.name == nowPage && hackReset"></components>
-                    <!-- </keep-alive> -->
-                  </el-tab-pane>
-                </el-tabs>
-              </template>
-            </div>
-          </template>
-      </dialog-box>
-    </transition>
     <!-- 设置孢子仪载玻片、培养液更换时间配置弹框 -->
     <el-dialog
       class="figEldialog"
@@ -602,28 +385,26 @@
 <script>
 //这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等)
 //例如:import 《组件名称》 from '《组件路径》';
-import AMap from 'AMap'; 
-import infoWindowComponent from './MapInfoWindow.vue'
+// import AMap from 'AMap'; 
+import infoWindowComponent from './baseComponents/MapInfoWindow.vue'
 import sidebar from "@/components/highStand/sidebar"
 import equipList from "@/components/highStand/equipList"
 import { bd09togcj02,gcj02tobd09,wgs84togcj02,gcj02towgs84 } from "@/components/home/coordtransform_utils.js";  //纠偏方法
-import dialogBox from './dialogHollow' //地图镂空弹框 
-import equipState from './equipState' //设备状态
-import qxzEquipState from './equipStateQxz' //气象站设备状态
-import equipInfo from './equipInfo' //设备基础信息
-import equipHistoryDate from './equipHistoryDate' //设备历史数据
-import qxzEquipHistoryDate from './equipHistoryDateQxz' //气象站设备历史数据
-import twentyFourHistoryDate from './twentyFourHistoryDate' //气象站24小时数据
-import cbdTabPhoto from './cbdPhoto/cbdTabPhoto' //测报灯图片
-import cbdTabPestStat from './cbdTabPestStat' //测报灯害虫统计
-import bzyTabPhoto from './bzyPhoto/bzyTabPhoto' //测报灯图片
+import equipState from './baseComponents/equipState' //设备状态
+import qxzEquipState from './baseComponents/equipStateQxz' //气象站设备状态
+import equipInfo from './baseComponents/equipInfo' //设备基础信息
+import equipHistoryDate from './baseComponents/equipHistoryDate' //设备历史数据
+import qxzEquipHistoryDate from './baseComponents/equipHistoryDateQxz' //气象站设备历史数据
+import twentyFourHistoryDate from './baseComponents/twentyFourHistoryDate' //气象站24小时数据
+import cbdTabPhoto from './baseComponents/cbdTabPhoto' //测报灯图片
+import cbdTabPestStat from './baseComponents/cbdTabPestStat' //测报灯害虫统计
+import bzyTabPhoto from './baseComponents/bzyTabPhoto' //孢子仪图片
 export default {
   //import引入的组件需要注入到对象中才能使用
   components: {
       infoWindowComponent,
       sidebar,
       equipList,
-      dialogBox,
       equipState,
       qxzEquipState,
       equipInfo,
@@ -798,111 +579,111 @@ export default {
       ],
       markerStyleObject:[
         {
-          image: require("../../../static/images/baseEquipIcon/scdIcon.svg"), // 设别类型0
-          // image: require("../../../static/images/icon8.svg"), // 设别类型0
+          image: require("../../../../static/images/baseEquipIcon/scdIcon.svg"), // 设别类型0
+          // image: require("../../../../static/images/icon8.svg"), // 设别类型0
           // image: 'http://a.amap.com/jsapi_demos/static/demo-center/icons/dir-marker.png', // 设别类型0
           size: new AMap.Size(50, 50), // 图标大小
           // imageSize: new AMap.Size(32, 32),
           imageOffset: new AMap.Pixel(0,0) // 图标显示位置偏移量,基准点为图标左上角
         },
         {
-          image: require("../../../static/images/baseEquipIcon/scdIcon.svg"), // 设别类型1
+          image: require("../../../../static/images/baseEquipIcon/scdIcon.svg"), // 设别类型1
           size: new AMap.Size(50, 50), // 图标大小
           imageSize: new AMap.Size(50, 50),
           imageOffset: new AMap.Pixel(0, 0) // 图标显示位置偏移量,基准点为图标左上角
         },
         {
-          image: require("../../../static/images/baseEquipIcon/scdIcon.svg"), // 设别类型2
+          image: require("../../../../static/images/baseEquipIcon/scdIcon.svg"), // 设别类型2
           size: new AMap.Size(50, 50), // 图标大小
           imageSize: new AMap.Size(50, 50),
           imageOffset: new AMap.Pixel(0, 0) // 图标显示位置偏移量,基准点为图标左上角
         },
         {
-          image: require("../../../static/images/baseEquipIcon/cbdIcon.svg"), // 设别类型3
+          image: require("../../../../static/images/baseEquipIcon/cbdIcon.svg"), // 设别类型3
           size: new AMap.Size(50, 50), // 图标大小
           imageSize: new AMap.Size(50, 50),
           imageOffset: new AMap.Pixel(0, 0) // 图标显示位置偏移量,基准点为图标左上角
         },
         {
-          image: require("../../../static/images/baseEquipIcon/xycbIcon.svg"), // 设别类型4
+          image: require("../../../../static/images/baseEquipIcon/xycbIcon.svg"), // 设别类型4
           size: new AMap.Size(50, 50), // 图标大小
           imageSize: new AMap.Size(50, 50),
           imageOffset: new AMap.Pixel(0, 0) // 图标显示位置偏移量,基准点为图标左上角
         },
         {
-          image: require("../../../static/images/baseEquipIcon/qxzIcon.svg"), // 设别类型5
+          image: require("../../../../static/images/baseEquipIcon/qxzIcon.svg"), // 设别类型5
           size: new AMap.Size(50, 50), // 图标大小
           imageSize: new AMap.Size(50, 50),
           imageOffset: new AMap.Pixel(0, 0) // 图标显示位置偏移量,基准点为图标左上角
         },
         {
-          image: require("../../../static/images/baseEquipIcon/jkIcon.svg"), // 设别类型6
+          image: require("../../../../static/images/baseEquipIcon/jkIcon.svg"), // 设别类型6
           size: new AMap.Size(55, 55), // 图标大小
           imageSize: new AMap.Size(55, 55),
           imageOffset: new AMap.Pixel(0, 0) // 图标显示位置偏移量,基准点为图标左上角
         },
         {
-          image: require("../../../static/images/baseEquipIcon/bzyIcon.svg"), // 设别类型7
+          image: require("../../../../static/images/baseEquipIcon/bzyIcon.svg"), // 设别类型7
           size: new AMap.Size(50, 50), // 图标大小
           imageSize: new AMap.Size(50, 50),
           imageOffset: new AMap.Pixel(0, 0) // 图标显示位置偏移量,基准点为图标左上角
         },
         {
-          image: require("../../../static/images/baseEquipIcon/xycbIcon.svg"), // 设别类型8
+          image: require("../../../../static/images/baseEquipIcon/xycbIcon.svg"), // 设别类型8
           size: new AMap.Size(50, 50), // 图标大小
           imageSize: new AMap.Size(50, 50),
           imageOffset: new AMap.Pixel(0, 0) // 图标显示位置偏移量,基准点为图标左上角
         },
         {
-          image: require("../../../static/images/baseEquipIcon/cbdIcon.svg"), // 设别类型9
+          image: require("../../../../static/images/baseEquipIcon/cbdIcon.svg"), // 设别类型9
           size: new AMap.Size(50, 50), // 图标大小
           imageSize: new AMap.Size(50, 50),
           imageOffset: new AMap.Pixel(0, 0) // 图标显示位置偏移量,基准点为图标左上角
         },
         {
-          image: require("../../../static/images/baseEquipIcon/scdIcon1.svg"), // 设别类型2 index-10
+          image: require("../../../../static/images/baseEquipIcon/scdIcon1.svg"), // 设别类型2 index-10
           size: new AMap.Size(50, 50), // 图标大小
           imageSize: new AMap.Size(50, 50),
           imageOffset: new AMap.Pixel(0, 0) // 图标显示位置偏移量,基准点为图标左上角
         },
         {
-          image: require("../../../static/images/baseEquipIcon/cbdIcon1.svg"), // 设别类型3 index-11
+          image: require("../../../../static/images/baseEquipIcon/cbdIcon1.svg"), // 设别类型3 index-11
           size: new AMap.Size(50, 50), // 图标大小
           imageSize: new AMap.Size(50, 50),
           imageOffset: new AMap.Pixel(0, 0) // 图标显示位置偏移量,基准点为图标左上角
         },
         {
-          image: require("../../../static/images/baseEquipIcon/xycbIcon1.svg"), // 设别类型4 index-12
+          image: require("../../../../static/images/baseEquipIcon/xycbIcon1.svg"), // 设别类型4 index-12
           size: new AMap.Size(50, 50), // 图标大小
           imageSize: new AMap.Size(50, 50),
           imageOffset: new AMap.Pixel(0, 0) // 图标显示位置偏移量,基准点为图标左上角
         },
         {
-          image: require("../../../static/images/baseEquipIcon/qxzIcon1.svg"), // 设别类型5 index-13
+          image: require("../../../../static/images/baseEquipIcon/qxzIcon1.svg"), // 设别类型5 index-13
           size: new AMap.Size(50, 50), // 图标大小
           imageSize: new AMap.Size(50, 50),
           imageOffset: new AMap.Pixel(0, 0) // 图标显示位置偏移量,基准点为图标左上角
         },
         {
-          image: require("../../../static/images/baseEquipIcon/jkIcon1.svg"), // 设别类型6 index-14
+          image: require("../../../../static/images/baseEquipIcon/jkIcon1.svg"), // 设别类型6 index-14
           size: new AMap.Size(50, 50), // 图标大小
           imageSize: new AMap.Size(50, 50),
           imageOffset: new AMap.Pixel(0, 0) // 图标显示位置偏移量,基准点为图标左上角
         },
         {
-          image: require("../../../static/images/baseEquipIcon/bzyIcon1.svg"), // 设别类型7 index-15
+          image: require("../../../../static/images/baseEquipIcon/bzyIcon1.svg"), // 设别类型7 index-15
           size: new AMap.Size(50, 50), // 图标大小
           imageSize: new AMap.Size(50, 50),
           imageOffset: new AMap.Pixel(0, 0) // 图标显示位置偏移量,基准点为图标左上角
         },
         {
-          image: require("../../../static/images/baseEquipIcon/xycbIcon1.svg"), // 设别类型8 index-16
+          image: require("../../../../static/images/baseEquipIcon/xycbIcon1.svg"), // 设别类型8 index-16
           size: new AMap.Size(50, 50), // 图标大小
           imageSize: new AMap.Size(50, 50),
           imageOffset: new AMap.Pixel(0, 0) // 图标显示位置偏移量,基准点为图标左上角
         },
         {
-          image: require("../../../static/images/baseEquipIcon/cbdIcon1.svg"), // 设别类型9 index-17
+          image: require("../../../../static/images/baseEquipIcon/cbdIcon1.svg"), // 设别类型9 index-17
           size: new AMap.Size(50, 50), // 图标大小
           imageSize: new AMap.Size(50, 50),
           imageOffset: new AMap.Pixel(0, 0) // 图标显示位置偏移量,基准点为图标左上角

+ 2 - 2
src/pages/plantGuard/baseAll.vue

@@ -52,7 +52,7 @@
                         <div class="item"
                         @click="equipLocate(item)"
                         v-for="item in mapData" :key="item.uuid">
-                            <img src="../../../static/images/baseIcon.png" width="25px" alt="">
+                            <img src="../../../../static/images/baseIcon.png" width="25px" alt="">
                             {{item.projectname}}
                         </div>
                         <div class="item noDate" v-if="!mapData.length">暂无数据</div>
@@ -176,7 +176,7 @@ methods: {
             // console.log(e);
             // console.log(point);
             this.$store.commit('setUserId', point.data.uid)
-           that.$router.push('/plantGuard/page1')
+           that.$router.push('/plantGuard/base')
         })
         this.distCluster = new DistrictCluster({
             map: that.map, //所属的地图实例

src/pages/plantGuard/MapInfoWindow.vue → src/pages/plantGuard/plantProtection/baseComponents/MapInfoWindow.vue


src/pages/plantGuard/bzyPhoto/bzyTabPhoto.vue → src/pages/plantGuard/plantProtection/baseComponents/bzyTabPhoto.vue


src/pages/plantGuard/cbdTabPestStat.vue → src/pages/plantGuard/plantProtection/baseComponents/cbdTabPestStat.vue


src/pages/plantGuard/cbdPhoto/cbdTabPhoto.vue → src/pages/plantGuard/plantProtection/baseComponents/cbdTabPhoto.vue


src/pages/plantGuard/equipHistoryDate.vue → src/pages/plantGuard/plantProtection/baseComponents/equipHistoryDate.vue


src/pages/plantGuard/equipHistoryDateQxz.vue → src/pages/plantGuard/plantProtection/baseComponents/equipHistoryDateQxz.vue


+ 6 - 6
src/pages/plantGuard/equipInfo.vue

@@ -2,12 +2,12 @@
 <template>
   <div class="equipInfo">
     <div class="equipImg">
-      <img v-if="equipType==2" src="../../../static/images/equipImg2.png" alt="">
-      <img v-if="equipType==3" src="../../../static/images/equipImg3.png" alt="">
-      <img v-if="equipType==4" src="../../../static/images/equipImg4.jpg" alt="">
-      <img v-if="equipType==5" src="../../../static/images/equipImg5.png" alt="">
-      <img v-if="equipType==7" src="../../../static/images/equipImg7.png" alt="">
-      <img v-if="equipType==8" src="../../../static/images/equipImg8.jpg" alt="">
+      <img v-if="equipType==2" src="../../../../../static/images/equipImg2.png" alt="">
+      <img v-if="equipType==3" src="../../../../../static/images/equipImg3.png" alt="">
+      <img v-if="equipType==4" src="../../../../../static/images/equipImg4.jpg" alt="">
+      <img v-if="equipType==5" src="../../../../../static/images/equipImg5.png" alt="">
+      <img v-if="equipType==7" src="../../../../../static/images/equipImg7.png" alt="">
+      <img v-if="equipType==8" src="../../../../../static/images/equipImg8.jpg" alt="">
       <p>设备类型:{{equipType|equipType}}</p>
     </div>
     <div class="equipMsg">

src/pages/plantGuard/equipState.vue → src/pages/plantGuard/plantProtection/baseComponents/equipState.vue


src/pages/plantGuard/equipStateQxz.vue → src/pages/plantGuard/plantProtection/baseComponents/equipStateQxz.vue


src/pages/plantGuard/equipState_dict.json → src/pages/plantGuard/plantProtection/baseComponents/equipState_dict.json


src/pages/plantGuard/qxz_dict.json → src/pages/plantGuard/plantProtection/baseComponents/qxz_dict.json


src/pages/plantGuard/twentyFourHistoryDate.vue → src/pages/plantGuard/plantProtection/baseComponents/twentyFourHistoryDate.vue


src/pages/plantGuard/bzyPhoto/bzyPhoto.vue → src/pages/plantGuard/plantProtection/bzyPhoto.vue


+ 7 - 7
src/pages/plantGuard/cbdPestStats.vue

@@ -576,7 +576,7 @@
         <img
           v-if="iconIf"
           @click="openGridding()"
-          src="../../../static/images/icon1.png"
+          src="../../../../static/images/icon1.png"
           alt=""
           class="icon1"
           id="iconDom"
@@ -584,7 +584,7 @@
         <img
           v-else
           @click="offGridding()"
-          src="../../../static/images/icon2.png"
+          src="../../../../static/images/icon2.png"
           alt=""
           class="icon2"
           id="iconDom"
@@ -675,7 +675,7 @@ Viewer.setDefaults({
       var domData = document.getElementById("reseau");
       var html =
         '<div class="griddingLine" v-show="iconShow">' +
-        '<img src="../../../static/images/gridding.png" alt="" class="" ' +
+        '<img src="../../../../static/images/gridding.png" alt="" class="" ' +
         'style="' +
         x +
         '"' +
@@ -703,7 +703,7 @@ Viewer.setDefaults({
       var domData = document.getElementById("reseau");
       var html =
         '<div class="griddingLine" v-show="iconShow">' +
-        '<img src="../../../static/images/gridding.png" alt="" class="" ' +
+        '<img src="../../../../static/images/gridding.png" alt="" class="" ' +
         'style="' +
         x +
         '"' +
@@ -730,7 +730,7 @@ Viewer.setDefaults({
       var domData = document.getElementById("reseau");
       var html =
         '<div class="griddingLine" v-show="iconShow">' +
-        '<img src="../../../static/images/gridding.png" alt="" class="" ' +
+        '<img src="../../../../static/images/gridding.png" alt="" class="" ' +
         'style="' +
         x +
         '"' +
@@ -1970,7 +1970,7 @@ export default {
       // console.log(domData)
       var html =
         '<div class="griddingLine" v-show="iconShow">' +
-        '<img src="../../../static/images/gridding.png" alt="" class="" ' +
+        '<img src="../../../../static/images/gridding.png" alt="" class="" ' +
         'style="z-index: 10000;' +
         y +
         '"' +
@@ -2255,7 +2255,7 @@ export default {
 }
 
 .viewer-move {
-  background-image: url("../../../static/images/gridding.png");
+  background-image: url("../../../../static/images/gridding.png");
 }
 
 .btn-box {

+ 41 - 49
src/pages/plantGuard/cbdPhoto/cbdPhoto.vue

@@ -186,56 +186,50 @@
       <!-- 网格 -->
       <div id="reseau"></div>
       <!-- 识别结果弹框 -->
-    <transition
-        enter-active-class="animate__animated animate__zoomIn" 
-        leave-active-class="animate__animated  animate__zoomOut"
-    >
-      <dialog-box v-if="discernShow" width='1000'>
-          <template v-slot:header>
-            <span class="dialog-title">图片详情</span>
-            <button type="button" @click="closeDiscerRes()" class="dialog-headerbtn">
-              <i class="el-icon el-icon-close"></i>
-            </button>
-          </template>
-          <template v-slot:inner>
-            <div class="discernResult">
-              <div class="discernResultImg">
-                <div class="rectTitle">识别结果</div>
-                <img 
-                  :src="recognitionImage" 
-                  @click="amplificationA(index)" 
-                  alt=""
-                >
+      <el-dialog
+        title="图片详情"
+        :visible.sync="discernShow"
+        width="1000px"
+        top="180px"
+        @close="imgTagClosed"
+      >
+        <div class="discernResult">
+          <div class="discernResultImg">
+            <div class="rectTitle">识别结果</div>
+            <img 
+              :src="recognitionImage" 
+              @click="amplificationA(index)" 
+              alt=""
+            >
+          </div>
+          <div class="discernResultRight" v-if="describe">
+            <div class="rectTitle discernResultBtn">
+              <span>害虫识别</span>
+              <el-button type="blueInfo" size="small" @click="imgTag('result')" >手动标注</el-button>
+            </div>
+            <div v-for="(item, index) in recognitionData" :key="index" class="discernResults">
+              <div class="name">
+                名称
+                <span @click="getWromDiscern(item.result_list)">{{ item.result_list }}(序号:{{ item.number }})</span>
               </div>
-              <div class="discernResultRight" v-if="describe">
-                <div class="rectTitle discernResultBtn">
-                  <span>害虫识别</span>
-                  <el-button type="blueInfo" size="small" @click="imgTag('result')" >手动标注</el-button>
-                </div>
-                <div v-for="(item, index) in recognitionData" :key="index" class="discernResults">
-                  <div class="name">
-                    名称
-                    <span @click="getWromDiscern(item.result_list)">{{ item.result_list }}(序号:{{ item.number }})</span>
-                  </div>
-                  <div class="number">
-                    个数:
-                    <span>{{ item.nums }}</span>
-                  </div>
-                </div>
-              </div>
-              <div class="discernResultRight" v-else>
-                <div class="rectTitle discernResultBtn">
-                  <span>害虫识别</span>
-                  <el-button type="blueInfo" size="small" @click="describe=true" >返回</el-button>
-                </div>
-                <div>
-                  这是害虫描述
-                </div>
+              <div class="number">
+                个数:
+                <span>{{ item.nums }}</span>
               </div>
             </div>
-          </template>
-      </dialog-box>
-    </transition>
+          </div>
+          <div class="discernResultRight" v-else>
+            <div class="rectTitle discernResultBtn">
+              <span>害虫识别</span>
+              <el-button type="blueInfo" size="small" @click="describe=true" >返回</el-button>
+            </div>
+            <div>
+              这是害虫描述
+            </div>
+          </div>
+        </div>
+      </el-dialog>
+
     <!-- 图片手动标注 -->
     <el-dialog
       title="手动标注"
@@ -298,7 +292,6 @@
 //这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等)
 //例如:import 《组件名称》 from '《组件路径》';
 // 测试v-viewer注册
-import dialogBox from '../dialog' //地图镂空弹框 
 import Vue from "vue";
 import { AIMarker } from "Vue-Picture-BD-Marker";
 import Viewer from "v-viewer";
@@ -429,7 +422,6 @@ Viewer.setDefaults({
 export default {
   //import引入的组件需要注入到对象中才能使用
   components: {
-    dialogBox,
     "ui-marker": AIMarker
   },
   data() {

src/pages/plantGuard/equipCtrls/bzyctrl.vue → src/pages/plantGuard/plantProtection/equipCtrls/bzyctrl.vue


src/pages/plantGuard/equipCtrls/cbdctrl.vue → src/pages/plantGuard/plantProtection/equipCtrls/cbdctrl.vue


src/pages/plantGuard/equipCtrls/qxzctrl.vue → src/pages/plantGuard/plantProtection/equipCtrls/qxzctrl.vue


src/pages/plantGuard/equipCtrls/scdctrl.vue → src/pages/plantGuard/plantProtection/equipCtrls/scdctrl.vue


src/pages/plantGuard/equipCtrls/simCode.vue → src/pages/plantGuard/plantProtection/equipCtrls/simCode.vue


src/pages/plantGuard/equipCtrls/xycbctrl.vue → src/pages/plantGuard/plantProtection/equipCtrls/xycbctrl.vue


+ 1 - 1
src/pages/plantGuard/warn/cbdMsgWarn.vue

@@ -144,7 +144,7 @@
 <script>
 //这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等)
 //例如:import 《组件名称》 from '《组件路径》';
-import dict from '../../../../static/js/cbd_pest_library.js'
+import dict from '../../../../../static/js/cbd_pest_library.js'
 
 export default {
 props: ["equipId", "equipType","d_id"],

src/pages/plantGuard/warn/qxzMsgWarn.vue → src/pages/plantGuard/plantProtection/warn/qxzMsgWarn.vue


src/pages/plantGuard/page5.vue → src/pages/plantGuard/sysManage/allotEquip.vue


src/pages/personage/citydata.js → src/pages/plantGuard/sysManage/citydata.js


+ 7 - 4
src/pages/personage/personMsg.vue

@@ -1,6 +1,9 @@
 <template>
-	<div class="innerMargin">
-		<el-card class="card box-card">
+	<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"
@@ -170,7 +173,7 @@ export default {
 			this.$axios({
 				method: 'POST',
 				url: '/api/api_gateway?method=home.homes.personal_center',
-				data: this.qs.stringify({ username: localStorage.getItem('username') })
+				data: this.qs.stringify({ username: localStorage.getItem('cUsername') })
 			}).then((res) => {
 				if (res.data.message == '') {
                var obj = res.data.data
@@ -230,7 +233,7 @@ export default {
 				let resFile = this.blobToFile(data, 'filename.jpg')
 				console.log(resFile)
 				form.append('image', resFile)
-				form.append('username', localStorage.getItem('username'))
+				form.append('username', localStorage.getItem('cUsername'))
 
 				this.cropperVisible = false
 				this.$axios({

src/pages/plantGuard/page6.vue → src/pages/plantGuard/sysManage/roleManage.vue


src/pages/plantGuard/page7.vue → src/pages/plantGuard/sysManage/topicManage.vue


+ 1 - 1
src/pages/plantGuard/page4.vue

@@ -763,7 +763,7 @@ export default {
       this.$store.commit('setAlloEquipUserId',id)
       this.$store.commit('setAlloEquipUsename',username)
 
-		this.$router.push('page5')
+		this.$router.push('allotEquip')
 	},
 	recharge(id) {
 			this.$confirm('是否向该用户充值一年费用?', '信息', {

+ 0 - 325
src/pages/symanger/farm/AddBase amap.vue

@@ -1,325 +0,0 @@
-<template>
-	<div style="cursor: default">
-		<el-breadcrumb separator-class="el-icon-arrow-right">
-			<el-breadcrumb-item>农场管理</el-breadcrumb-item>
-			<el-breadcrumb-item :to="{ path: '/index/farmBaseManger' }"
-				>基地管理</el-breadcrumb-item
-			>
-			<el-breadcrumb-item>添加基地</el-breadcrumb-item>
-		</el-breadcrumb>
-		<el-card class="box-card">
-			<el-form
-				ref="addBaseFormRef"
-				:model="addBaseForm"
-				label-width="120px"
-				:rules="addBaseFormRules"
-			>
-				<el-form-item label="基地名称 : " prop="farmname">
-					<el-input v-model="addBaseForm.farmname"></el-input>
-				</el-form-item>
-				<el-form-item label="基地面积(亩) : " prop="farmarea">
-					<el-input type="number" min="0" v-model="addBaseForm.farmarea"></el-input>
-				</el-form-item>
-				<!-- <el-form-item label="基地地址 : " prop="farmaddr">
-					<el-input v-model="addBaseForm.farmaddr"></el-input>
-				</el-form-item> -->
-				<el-form-item label="基地描述 : " prop="farmdesc">
-					<el-input type="textarea" v-model="addBaseForm.farmdesc"></el-input>
-				</el-form-item>
-				<el-form-item label="负责人 : " prop="username">
-					<el-input v-model="addBaseForm.username"></el-input>
-				</el-form-item>
-				<el-form-item label="基地位置 : " class="map-box" prop="farmframe">
-					<el-input
-						style="width: 380px; cursor: pointer"
-						size="small"
-						@change="addrChange()"
-						clearable
-						placeholder="请输入地区检索"
-						v-model="addr"
-					>
-						<i slot="suffix" class="el-input__icon el-icon-search"></i>
-					</el-input>
-					{{polygonPath.paths}}
-					{{overlays}}
-					<button style="cursor: pointer" @click.prevent="toggle('polygonPath')">
-						{{ polygonPath.editable ? '停止绘制' : '开始绘制' }}
-					</button>
-					<el-amap
-						class="bm-view"
-						vid="amapDemo"
-						:center="center"
-						:amap-manager="amapManager"
-						style="height: 400px"
-						:zoom="zoom"
-						:plugin="plugin"
-        				:events="mapEvents"
-					>
-						<el-amap-polygon 
-							:path="polygonPath.paths"
-							:editable="true"
-							stroke-color="blue"
-							fill-color="red"
-							:fill-opacity="0.8"
-							:stroke-opacity="0.5"
-							:stroke-weight="2"
-							@click="alertpath"
-						></el-amap-polygon>
-						
-						<el-amap-marker v-if="componentMarker.position.length" vid="component-marker" :position="componentMarker.position"  ></el-amap-marker>
-					</el-amap>
-					<!-- <baidu-map
-						class="bm-view"
-						:center="center"
-						:zoom="zoom"
-						:map-click="false"
-						@mousemove="syncPolygon"
-						@ready="handler"
-						style="height: 400px"
-						@click="paintPolygon"
-						@rightclick="newPolygon"
-					>
-						<bm-polygon
-							:path="path"
-							v-for="path of polygonPath.paths"
-							:key="path.toString()"
-							stroke-color="blue"
-							fill-color="red"
-							:fill-opacity="0.8"
-							:stroke-opacity="0.5"
-							:stroke-weight="2"
-							@click="alertpath"
-						/>
-						<bm-control>
-							<button style="cursor: pointer" @click.prevent="toggle('polygonPath')">
-								{{ polygonPath.editable ? '停止绘制' : '开始绘制' }}
-							</button>
-						</bm-control>
-					</baidu-map> -->
-				</el-form-item>
-				<el-form-item>
-					<el-button type="primary" @click="addBaseSubm">添加</el-button>
-					<el-button @click="cancleaddBase">取消</el-button>
-				</el-form-item>
-			</el-form>
-		</el-card>
-	</div>
-</template>
-
-<script>
-import VueAMap from "vue-amap";
-let amapManager = new VueAMap.AMapManager();
-export default {
-	data() {
-		return {
-			amapManager,
-			mapEvents: { 
-				init: (o) => {
-				// console.log(o.getCenter())
-				// console.log(this.$refs.map.$$getInstance())
-				// o.getCity(result => {
-				//   console.log(result)
-				// })
-				},
-				'moveend': () => {
-				},
-				'zoomchange': () => {
-				},
-				'click': (e) => {
-				},
-				'mousemove': (e) => {
-				},
-			},
-			plugin: [
-				{
-				pName: "ToolBar",
-				events: {
-					init(instance) {
-					console.log(instance);
-					}
-				}
-				},
-				{
-				pName: "Scale",
-				events: {
-					init(instance) {
-					console.log(instance);
-					}
-				}
-				},
-				// {
-				//     pName: 'MapType',
-				//     defaultType: 0,
-				//     events: {
-				//       init(instance) {
-				//         console.log(instance);
-				//       }
-				//     }
-				//   }
-			],
-			addBaseForm: {
-				farmname: '',
-				username: '',
-				farmdesc: '',
-				farmaddr: '',
-				farmarea: ''
-			},
-			addBaseFormRules: {
-				farmname: [
-					{ required: true, message: '请填写基地名称', trigger: 'blur' }
-				],
-				username: [
-					{ required: true, message: '请填写负责人', trigger: 'blur' }
-				],
-				farmaddr: [
-					{ required: true, message: '请填写基地地址', trigger: 'blur' }
-				],
-				farmdesc: [
-					{ required: true, message: '请填写基地描述', trigger: 'blur' }
-				],
-				farmarea: [
-					{ required: true, message: '请填写基地面积', trigger: 'blur' }
-				]
-			},
-			center: [116.412732,39.911707 ],
-			zoom: 13,
-			overlays:[],//存储矢量图形
-			mouseTool:null,
-			polygonPath: {
-				editable: false,
-				paths: []// 绘制完成后的经纬度,其实是在画的时候动态push的,因为在点击的时候触发了 paintPolygon 函数
-			},
-			componentMarker:{
-				position:[]
-			},
-			addr: ''
-		}
-	},
-	methods: {
-		addBaseSubm() {
-			this.$refs.addBaseFormRef.validate((valid) => {
-				if (!valid) {
-					return
-				}
-				let farmframe =
-					this.polygonPath.paths[0] &&
-					this.polygonPath.paths[0]
-						.map((item) => {
-							return item.lng + ',' + item.lat
-						})
-						.join(';')
-				this.$axios({
-					url: '/api/api_gateway?method=ascend.ascend_manage.add_base',
-					method: 'POST',
-					data: this.qs.stringify({
-						farmname: this.addBaseForm.farmname,
-						farmdesc: this.addBaseForm.farmdesc,
-						username: this.addBaseForm.username,
-						farmaddr: this.addBaseForm.farmaddr,
-						farmframe,
-						farmarea: this.addBaseForm.farmarea
-					})
-				}).then((res) => {
-					if (res.data.message == '') {
-						this.$message.success('添加基地成功!')
-						this.$router.go(-1)
-					} else {
-						this.$message.error('添加基地失败!')
-					}
-				})
-			})
-		},
-		cancleaddBase() {
-			this.$router.go(-1)
-		},
-		getClickInfo(e) {
-			console.log(e.point.lng)
-			console.log(e.point.lat)
-		},
-		// 开启多边形绘制
-		toggle(name) {
-			this[name].editable = !this[name].editable
-			// 在这里做一步判断,如果有路径且开启绘制就把原来的路径清空
-			if (this.polygonPath.paths && this.polygonPath.editable) {
-				this.polygonPath.paths = []
-			}
-			if(this[name].editable){
-				this.paintPolygon()
-			}else{
-				this.mouseTool.close(true)//关闭,并清除覆盖物
-			}
-		},
-		addrChange() {
-			this.geocoder = new AMap.Geocoder({
-				city: "全国", //城市设为北京,默认:“全国”
-			});
-			var _this = this;
-			if(!this.addr){
-				this.componentMarker.position = []
-				return false;
-			}
-			this.geocoder.getLocation(this.addr, function(status, result) {
-				if (status === 'complete'&&result.geocodes.length) {
-					var lnglat = result.geocodes[0].location
-					_this.center = [lnglat.lng,lnglat.lat]
-					_this.componentMarker.position = [lnglat.lng,lnglat.lat];
-				}else{
-					log.error('根据地址查询位置失败');
-				}
-			});
-		},
-		// 鼠标多边形绘制
-		paintPolygon() {
-			var _this = this;
-			let o = amapManager.getMap();
-			var polyArr = o.getAllOverlays('polygon');	
-			if(polyArr.length){
-				o.remove(polyArr)
-			};
-			this.mouseTool = new AMap.MouseTool(o)
-			this.drawPolygon()
-			this.mouseTool.on('draw', function(e) {
-				// e.obj 为绘制出来的覆盖物对象
-				console.log(e.obj)
-				console.log(e.obj.getPath())
-				_this.mouseTool.close(false)//关闭
-				_this.polygonPath.editable = !_this.polygonPath.editable
-			})
-		},
-		drawPolygon () {
-			this.mouseTool.polygon({
-				strokeColor: "#FF33FF", 
-				strokeOpacity: 1,
-				strokeWeight: 6,
-				strokeOpacity: 0.2,
-				fillColor: '#1791fc',
-				fillOpacity: 0.4,
-				// 线样式还支持 'dashed'
-				strokeStyle: "solid",
-				// strokeStyle是dashed时有效
-				// strokeDasharray: [30,10],
-			})
-		},
-		alertpath(e) {
-			// console.log(this.polygonPath.paths)
-		},
-	}
-}
-</script>
-
-<style lang='less' scoped>
-// .el-form{width:500px;}
-.bm-view {
-	// height: 400px;
-	overflow: hidden;
-	 /deep/ .anchorBL {
-		display: none;
-	}
-}
-.el-form-item {
-	width: 500px;
-}
-.map-box {
-	width: 100%;
-}
-</style>

+ 0 - 251
src/pages/symanger/farm/AddBase.vue

@@ -1,251 +0,0 @@
-<template>
-	<div style="cursor: default">
-		<el-breadcrumb separator-class="el-icon-arrow-right">
-			<el-breadcrumb-item>农场管理</el-breadcrumb-item>
-			<el-breadcrumb-item :to="{ path: '/index/farmBaseManger' }"
-				>基地管理</el-breadcrumb-item
-			>
-			<el-breadcrumb-item>添加基地</el-breadcrumb-item>
-		</el-breadcrumb>
-		<el-card class="box-card">
-			<el-form
-				ref="addBaseFormRef"
-				:model="addBaseForm"
-				label-width="120px"
-				:rules="addBaseFormRules"
-			>
-				<el-form-item label="基地名称 : " prop="farmname">
-					<el-input v-model="addBaseForm.farmname"></el-input>
-				</el-form-item>
-				<el-form-item label="基地面积(亩) : " prop="farmarea">
-					<el-input type="number" min="0" v-model="addBaseForm.farmarea"></el-input>
-				</el-form-item>
-				<!-- <el-form-item label="基地地址 : " prop="farmaddr">
-					<el-input v-model="addBaseForm.farmaddr"></el-input>
-				</el-form-item> -->
-				<el-form-item label="基地描述 : " prop="farmdesc">
-					<el-input type="textarea" v-model="addBaseForm.farmdesc"></el-input>
-				</el-form-item>
-				<el-form-item label="负责人 : " prop="username">
-					<el-input v-model="addBaseForm.username"></el-input>
-				</el-form-item>
-				<el-form-item label="基地位置 : " class="map-box" prop="farmframe">
-					<el-input
-						style="width: 380px; cursor: pointer"
-						size="small"
-						@change="addrChange()"
-						clearable
-						placeholder="请输入地区检索"
-						v-model="addr"
-					>
-						<i slot="suffix" class="el-input__icon el-icon-search"></i>
-					</el-input>
-					{{polygonPath.paths}}
-					<baidu-map
-						class="bm-view"
-						:center="center"
-						:zoom="zoom"
-						:map-click="false"
-						@mousemove="syncPolygon"
-						@ready="handler"
-						style="height: 400px"
-						@click="paintPolygon"
-						@rightclick="newPolygon"
-					>
-						<bm-polygon
-							:path="path"
-							v-for="path of polygonPath.paths"
-							:key="path.toString()"
-							stroke-color="blue"
-							fill-color="red"
-							:fill-opacity="0.8"
-							:stroke-opacity="0.5"
-							:stroke-weight="2"
-							@click="alertpath"
-						/>
-						<bm-control>
-							<button style="cursor: pointer" @click.prevent="toggle('polygonPath')">
-								{{ polygonPath.editing ? '停止绘制' : '开始绘制' }}
-							</button>
-						</bm-control>
-					</baidu-map>
-				</el-form-item>
-				<el-form-item>
-					<el-button type="primary" @click="addBaseSubm">添加</el-button>
-					<el-button @click="cancleaddBase">取消</el-button>
-				</el-form-item>
-			</el-form>
-		</el-card>
-	</div>
-</template>
-
-<script>
-export default {
-	data() {
-		return {
-			addBaseForm: {
-				farmname: '',
-				username: '',
-				farmdesc: '',
-				farmaddr: '',
-				farmarea: ''
-			},
-			addBaseFormRules: {
-				farmname: [
-					{ required: true, message: '请填写基地名称', trigger: 'blur' }
-				],
-				username: [
-					{ required: true, message: '请填写负责人', trigger: 'blur' }
-				],
-				farmaddr: [
-					{ required: true, message: '请填写基地地址', trigger: 'blur' }
-				],
-				farmdesc: [
-					{ required: true, message: '请填写基地描述', trigger: 'blur' }
-				],
-				farmarea: [
-					{ required: true, message: '请填写基地面积', trigger: 'blur' }
-				]
-			},
-			haha: '百度地图',
-			center: { lng: 116.412732, lat: 39.911707 },
-			zoom: 13,
-			polygonPath: {
-				editing: false,
-				paths: [] // 绘制完成后的经纬度,其实是在画的时候动态push的,因为在点击的时候触发了 paintPolygon 函数
-			},
-			addr: ''
-		}
-	},
-	methods: {
-		addBaseSubm() {
-			this.$refs.addBaseFormRef.validate((valid) => {
-				if (!valid) {
-					return
-				}
-				let farmframe =
-					this.polygonPath.paths[0] &&
-					this.polygonPath.paths[0]
-						.map((item) => {
-							return item.lng + ',' + item.lat
-						})
-						.join(';')
-				this.$axios({
-					url: '/api/api_gateway?method=ascend.ascend_manage.add_base',
-					method: 'POST',
-					data: this.qs.stringify({
-						farmname: this.addBaseForm.farmname,
-						farmdesc: this.addBaseForm.farmdesc,
-						username: this.addBaseForm.username,
-						farmaddr: this.addBaseForm.farmaddr,
-						farmframe,
-						farmarea: this.addBaseForm.farmarea
-					})
-				}).then((res) => {
-					if (res.data.message == '') {
-						this.$message.success('添加基地成功!')
-						this.$router.go(-1)
-					} else {
-						this.$message.error('添加基地失败!')
-					}
-				})
-			})
-		},
-		cancleaddBase() {
-			this.$router.go(-1)
-		},
-		handler({ BMap, map }) {
-			this.BMap = BMap
-			this.map = map
-			map.enableScrollWheelZoom(true)
-			// map.centerAndZoom('青岛市', 13)
-		},
-		getClickInfo(e) {
-			console.log(e.point.lng)
-			console.log(e.point.lat)
-		},
-		// 开启多边形绘制
-		toggle(name) {
-			this[name].editing = !this[name].editing
-			// 在这里做一步判断,如果有路径且开启绘制就把原来的路径清空
-			if (this.polygonPath.paths && this.polygonPath.editing) {
-				this.polygonPath.paths = []
-			}
-		},
-		addrChange() {
-			let local = new this.BMap.LocalSearch(this.map, {
-				renderOptions: { map: this.map, panel: 'r-result' }
-			})
-			local.search(this.addr)
-		},
-		// 鼠标移动时
-		syncPolygon(e) {
-			if (!this.polygonPath.editing) {
-				return
-			}
-			const { paths } = this.polygonPath
-			if (!paths.length) {
-				return
-			}
-			const path = paths[paths.length - 1]
-			if (!path.length) {
-				return
-			}
-			console.log(path)
-			if (path.length === 1) {
-				console.log('path')
-				path.push(e.point)
-			}
-			console.log(path)
-			this.$set(path, path.length - 1, e.point)
-		},
-		// 鼠标右键点击时往路径里push一个点
-		newPolygon(e) {
-			if (!this.polygonPath.editing) {
-				return
-			}
-			// 当开始绘制后把按钮调回开始绘制状态,防止绘制多个图形
-			this['polygonPath'].editing = !this['polygonPath'].editing
-			const { paths } = this.polygonPath
-			if (!paths.length) {
-				paths.push([])
-			}
-			const path = paths[paths.length - 1]
-			path.pop()
-			if (path.length) {
-				paths.push([])
-			}
-			console.log(this.polygonPath.paths)
-		},
-		// 鼠标左键多边形绘制
-		paintPolygon(e) {
-			if (!this.polygonPath.editing) {
-				return
-			}
-			const { paths } = this.polygonPath
-			!paths.length && paths.push([])
-			paths[paths.length - 1].push(e.point)
-		},
-		alertpath(e) {
-			// console.log(this.polygonPath.paths)
-		},
-	}
-}
-</script>
-
-<style lang='less' scoped>
-// .el-form{width:500px;}
-.bm-view {
-	// height: 400px;
-	overflow: hidden;
-	 /deep/ .anchorBL {
-		display: none;
-	}
-}
-.el-form-item {
-	width: 500px;
-}
-.map-box {
-	width: 100%;
-}
-</style>

+ 0 - 259
src/pages/symanger/farm/Base.vue

@@ -1,259 +0,0 @@
-<template>
-	<div style="cursor: default">
-		<el-breadcrumb separator-class="el-icon-arrow-right">
-			<el-breadcrumb-item>农场管理</el-breadcrumb-item>
-			<el-breadcrumb-item>基地管理</el-breadcrumb-item>
-		</el-breadcrumb>
-		<el-card class="box-card pad0">
-			<baidu-map
-				class="bm-view"
-				:center='center'
-				@ready="handler"
-				:zoom='zoom'
-			>
-				<bm-polygon
-					v-for="(item, index) in polygonPath"
-					:key="index"
-					:path="item"
-					stroke-color="#3173f6"
-					fill-color="rgba(48,114,246,.3)"
-					:fill-opacity="0.8"
-					:stroke-opacity="1"
-					:stroke-weight="3"
-				/>
-			</baidu-map>
-		</el-card>
-		<el-card class="box-card marT">
-			<div class="base-check">
-				<el-select
-					v-model="baseInfo.id"
-					class="new-style-sel"
-					@change="selectBase"
-				>
-					<el-option
-						v-for="item in baseList"
-						:key="item.id"
-						:label="item.farmname"
-						:value="item.id"
-					></el-option>
-				</el-select>
-				<div>
-					<el-button
-						type="primary"
-						style="margin-right: 5px"
-						size="mini"
-						@click="addBase()"
-						>新增基地</el-button
-					>
-					<el-button
-						type="primary"
-						style="margin-right: 5px"
-						size="mini"
-						@click="editBase()"
-						>编辑基地</el-button
-					>
-					<i class="el-icon-delete" @click="deletBase()"></i>
-				</div>
-			</div>
-			<div class="intro">
-				<p>负责人: {{ baseInfo.username }}</p>
-				<!-- <p>基地地址: {{baseInfo.addr || '无'}}</p> -->
-				<p>基地面积(亩): {{ baseInfo.farmarea || '无' }}</p>
-				<p>基地描述: {{ baseInfo.desc || '无' }}</p>
-			</div>
-		</el-card>
-	</div>
-</template>
-
-<script>
-export default {
-	data() {
-		return {
-			baseList: [],
-			baseInfo: {
-				id: '',
-				farmname: '',
-				username: '',
-				addr: '',
-				desc: '',
-				farmarea: '',
-				polygonPath: [] //覆盖物
-			},
-			center:{ lng: 0, lat: 0 }, //地图中心点
-			zoom:null,
-			addBasedialogVisible: false,
-			polygonPath: [],
-			addBaseFormRules: {
-				baseName: [
-					{ required: true, message: '请输入基地名称', trigger: 'blur' }
-				],
-				username: [
-					{ required: true, message: '请输入负责人', trigger: 'blur' }
-				],
-				addr: [{ required: true, message: '请输入基地地址', trigger: 'blur' }]
-			}
-		}
-	},
-	created() {
-		this.getBaseList()
-	},
-	methods: {
-		handler({ BMap, map }) {
-			this.map=map
-			this.BMap=BMap
-			map.enableScrollWheelZoom(true)
-		},
-		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.farmname = this.baseList[0].farmname
-					this.baseInfo.username = this.baseList[0].user
-					this.baseInfo.addr = this.baseList[0].farmaddr
-					this.baseInfo.desc = this.baseList[0].farmdesc
-					this.baseInfo.farmarea = this.baseList[0].farmarea
-					this.selectBase(this.baseInfo.id)
-				}
-			})
-		},
-		selectBase(id) {
-			this.$axios({
-				method: 'POST',
-				url: '/api/api_gateway?method=ascend.ascend_manage.base_info',
-				data: this.qs.stringify({
-					id
-				})
-			}).then((res) => {
-				if (res.data.message == '') {
-					var data = res.data.data.data[0]
-					this.baseInfo.id = data.id
-					this.baseInfo.farmname = data.farmname
-					this.baseInfo.username = data.user
-					this.baseInfo.addr = data.farmaddr
-					this.baseInfo.desc = data.farmdesc
-					this.baseInfo.farmarea = data.farmarea
-					this.polygonPath = []
-					if (data.farmframe) {
-						let array2 = data.farmframe.split(';').map((item) => {
-							let arr = item.split(',')
-							return {
-								lng: arr[0],
-								lat: arr[1]
-							}
-						})
-						let view=this.map.getViewport(array2)
-						this.center=view.center
-						this.zoom=view.zoom
-						this.polygonPath.push(array2)
-					} else {
-						this.polygonPath = []
-					}
-				}
-			})
-		},
-		addBase() {
-			this.$router.push('/index/farmAddBase')
-		},
-		editBase() {
-			this.baseInfo.polygonPath = this.polygonPath
-			this.$router.push({ path: '/index/farmEditBase', query:{baseInfo:JSON.stringify(this.baseInfo)}})
-		},
-		deletBase() {
-			const h = this.$createElement
-			this.$msgbox({
-				title: '提示',
-				message: h('p', null, [
-					h('span', null, '确定要删除?'),
-					h('br'),
-					h(
-						'i',
-						{ style: 'color: red' },
-						'注意:此基地下的所有农事操作都会被清除,此操作不可逆'
-					)
-				]),
-				showCancelButton: true,
-				confirmButtonText: '确定',
-				cancelButtonText: '取消'
-			}).then((action) => {
-				this.$axios({
-					method: 'POST',
-					url: '/api/api_gateway?method=ascend.ascend_manage.del_base',
-					data: this.qs.stringify({
-						id: this.baseInfo.id
-					})
-				}).then((res) => {
-					if (res.data.message == '') {
-						this.$message({
-							type: 'success',
-							message: '删除成功!'
-						})
-						this.getBaseList()
-					}
-				})
-			})
-		}
-	}
-}
-</script>
-
-<style lang='less' scoped>
-.bm-view {
-	height: 500px;
-	overflow: hidden;
-}
-.marT {
-	margin-top: 20px;
-}
-.new-style-sel /deep/ input {
-	font-weight: 800;
-	border: none;
-	border-left: 6px solid #16c58f;
-	border-radius: 0;
-	line-height: 25px;
-	height: 25px;
-}
-.new-style-sel /deep/ .el-input__icon {
-	line-height: 25px;
-}
-/* 去掉百度地图左下角的logo */
-.bm-view /deep/ .BMap_cpyCtrl {
-	display: none;
-}
-.bm-view /deep/ .anchorBL {
-	display: none;
-}
-.base-check {
-	display: flex;
-	justify-content: space-between;
-	i.el-icon-delete {
-		font-weight: 600;
-		font-size: 18px;
-		cursor: pointer;
-	}
-}
-.intro {
-	font-size: 14px;
-	line-height: 30px;
-	letter-spacing: 1px;
-	color: #666;
-	text-indent: 20px;
-	margin-top: 20px;
-	p {
-		position: relative;
-		&:before {
-			content: '';
-			position: absolute;
-			width: 10px;
-			height: 10px;
-			border-radius: 100%;
-			background: #17bb89;
-			left: 0;
-			top: 10px;
-		}
-	}
-}
-</style>

+ 0 - 268
src/pages/symanger/farm/EditBase.vue

@@ -1,268 +0,0 @@
-<template>
-	<div style="cursor: default">
-		<el-breadcrumb separator-class="el-icon-arrow-right">
-			<el-breadcrumb-item>农场管理</el-breadcrumb-item>
-			<el-breadcrumb-item :to="{ path: '/index/farmBaseManger' }"
-				>基地管理</el-breadcrumb-item
-			>
-			<el-breadcrumb-item>编辑基地</el-breadcrumb-item>
-		</el-breadcrumb>
-		<el-card class="box-card">
-			<el-form
-				ref="editBaseFormRef"
-				:model="editBaseForm"
-				label-width="120px"
-				:rules="editBaseFormRules"
-			>
-				<el-form-item label="基地名称 : " prop="farmname">
-					<el-input v-model="editBaseForm.farmname"></el-input>
-				</el-form-item>
-				<el-form-item label="基地面积(亩) : " prop="farmarea">
-					<el-input
-						type="number"
-						min="0"
-						v-model="editBaseForm.farmarea"
-					></el-input>
-				</el-form-item>
-				<!-- <el-form-item label="基地地址 : " prop="farmaddr">
-					<el-input v-model="editBaseForm.farmaddr"></el-input>
-				</el-form-item> -->
-				<el-form-item label="基地描述 : " prop="farmdesc">
-					<el-input type="textarea" v-model="editBaseForm.farmdesc"></el-input>
-				</el-form-item>
-				<el-form-item label="负责人 : " prop="username">
-					<el-input v-model="editBaseForm.username"></el-input>
-				</el-form-item>
-				<el-form-item label="基地位置 : " class="map-box">
-					<el-input
-						style="width: 380px"
-						size="small"
-						@change="addrChange()"
-						clearable
-						placeholder="请输入地区检索"
-						v-model="addr"
-					>
-						<i slot="suffix" class="el-input__icon el-icon-search"></i>
-					</el-input>
-					<baidu-map
-						class="bm-view"
-						:center="center"
-						:zoom="zoom"
-						:map-click="false"
-						@mousemove="syncPolygon"
-						@ready="handler"
-						style="height: 400px"
-						@click="paintPolygon"
-						@rightclick="newPolygon"
-					>
-						<bm-polygon
-							:path="path"
-							v-for="path of polygonPath.paths"
-							:key="path.toString()"
-							stroke-color="#3173f6"
-							fill-color="rgba(48,114,246,.3)"
-							:fill-opacity="0.8"
-							:stroke-opacity="1"
-							:stroke-weight="3"
-							@click="alertpath"
-							@lineupdate="updatePolygonPath"
-							:editing="true"
-						/>
-						<bm-control>
-							<button style="cursor: pointer" @click.prevent="toggle('polygonPath')">
-								{{ polygonPath.editing ? '停止绘制' : '开始绘制' }}
-							</button>
-						</bm-control>
-					</baidu-map>
-				</el-form-item>
-				<el-form-item>
-					<el-button type="primary" @click="editBaseSubm">修改</el-button>
-					<el-button @click="cancleaddBase">取消</el-button>
-				</el-form-item>
-			</el-form>
-		</el-card>
-	</div>
-</template>
-
-<script>
-export default {
-	data() {
-		return {
-			info: JSON.parse(this.$route.query.baseInfo),
-			editBaseForm: {},
-			editBaseFormRules: {
-				farmname: [
-					{ required: true, message: '请填写基地名称', trigger: 'blur' }
-				],
-				username: [
-					{ required: true, message: '请填写负责人', trigger: 'blur' }
-				],
-				farmaddr: [
-					{ required: true, message: '请填写基地地址', trigger: 'blur' }
-				],
-				farmdesc: [
-					{ required: true, message: '请填写基地描述', trigger: 'blur' }
-				],
-				farmarea: [
-					{ required: true, message: '请填写基地面积', trigger: 'blur' }
-				]
-			},
-			haha: '百度地图',
-			center: { lng: 116.412732, lat: 39.911707 },
-			zoom: 13,
-			polygonPath: {
-				editing: false,
-				paths: []// 绘制完成后的经纬度,其实是在画的时候动态push的,因为在点击的时候触发了 paintPolygon 函数
-			},
-			addr: ''
-		}
-	},
-	mounted() {
-		this.editBaseForm = {
-			id: this.info.id,
-			farmname: this.info.farmname,
-			username: this.info.username,
-			farmdesc: this.info.desc,
-			farmaddr: this.info.addr,
-			farmarea: this.info.farmarea
-		}
-		this.polygonPath.paths=this.info.polygonPath
-	},
-	methods: {
-		editBaseSubm() {
-			this.$refs.editBaseFormRef.validate((valid) => {
-				if (!valid) {
-					return
-				}
-				let farmframe =
-					this.polygonPath.paths[0] &&
-					this.polygonPath.paths[0]
-						.map((item) => {
-							return item.lng + ',' + item.lat
-						})
-						.join(';')
-				this.$axios({
-					url: '/api/api_gateway?method=ascend.ascend_manage.edit_base',
-					method: 'POST',
-					data: this.qs.stringify({
-						id: this.editBaseForm.id,
-						farmname: this.editBaseForm.farmname,
-						farmdesc: this.editBaseForm.farmdesc,
-						username: this.editBaseForm.username,
-						farmaddr: this.editBaseForm.farmaddr,
-						farmframe,
-						farmarea: this.editBaseForm.farmarea
-					})
-				}).then((res) => {
-					if (res.data.message == '') {
-						this.$message.success('修改基地成功!')
-						this.$router.go(-1)
-					} else {
-						this.$message.error('修改基地失败!')
-					}
-				})
-			})
-		},
-		cancleaddBase() {
-			this.$router.go(-1)
-		},
-		handler({ BMap, map }) {
-			this.map = map
-			this.BMap = BMap
-			let view = map.getViewport(this.polygonPath.paths[0])
-			this.center = view.center
-			this.zoom = view.zoom
-			map.enableScrollWheelZoom(true)
-		},
-		getClickInfo(e) {
-			console.log(e.point.lng)
-			console.log(e.point.lat)
-		},
-		// 开启多边形绘制
-		toggle(name) {
-			this[name].editing = !this[name].editing
-			// 在这里做一步判断,如果有路径且开启绘制就把原来的路径清空
-			if (this.polygonPath.paths && this.polygonPath.editing) {
-				this.polygonPath.paths = []
-			}
-		},
-		// 鼠标移动时
-		syncPolygon(e) {
-			if (!this.polygonPath.editing) {
-				return
-			}
-			const { paths } = this.polygonPath
-			if (!paths.length) {
-				return
-			}
-			const path = paths[paths.length - 1]
-			if (!path.length) {
-				return
-			}
-			if (path.length === 1) {
-				path.push(e.point)
-			}
-			this.$set(path, path.length - 1, e.point)
-		},
-		// 鼠标右键点击时往路径里push一个面
-		newPolygon(e) {
-			if (!this.polygonPath.editing) {
-				return
-			}
-			// 当开始绘制后把按钮调回开始绘制状态,防止绘制多个图形
-			this['polygonPath'].editing = !this['polygonPath'].editing
-			const { paths } = this.polygonPath
-			if (!paths.length) {
-				paths.push([])
-			}
-			const path = paths[paths.length - 1]
-			path.pop()
-			if (path.length) {
-				paths.push([])
-			}
-		},
-		// 鼠标左键多边形绘制
-		paintPolygon(e) {
-			if (!this.polygonPath.editing) {
-				return
-			}
-			console.log(this.polygonPath)
-			const { paths } = this.polygonPath
-			!paths.length && paths.push([])
-			paths[paths.length - 1].push(e.point)
-		},
-		alertpath(e) {
-			// console.log(this.polygonPath.paths[0])
-		},
-		addrChange() {
-			let local = new this.BMap.LocalSearch(this.map, {
-				renderOptions: { map: this.map, panel: 'r-result' }
-			})
-			local.search(this.addr)
-		},
-		updatePolygonPath(e) {
-			//编辑覆盖物时触发,获取坐标点集合
-			// console.log(this.polygonPath.paths[0]);
-			console.log(e.target.getPath())
-			this.polygonPath.paths[0] = e.target.getPath()
-		}
-	}
-}
-</script>
-
-<style lang='less' scoped>
-// .el-form{width:500px;}
-.bm-view {
-	// height: 400px;
-	overflow: hidden;
-	 /deep/ .anchorBL {
-		display: none;
-	}
-}
-.el-form-item {
-	width: 500px;
-}
-.map-box {
-	width: 100%;
-}
-</style>

+ 0 - 427
src/pages/symanger/farm/Fields.vue

@@ -1,427 +0,0 @@
-<template>
-	<div style="cursor: default">
-		<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"
-					clearable
-					v-model="base"
-					@change="selChange"
-					placeholder="请选择基地名称"
-				>
-					<el-option
-						v-for="item in baseList"
-						:label="item.farmname"
-						:value="item.farmname"
-						:key="item.id"
-					></el-option>
-				</el-select>
-			</div>
-			<el-button type="primary" size="mini" @click="addfield()"
-				>新增地块</el-button
-			>
-		</div>
-		<el-row :gutter="10">
-			<el-col
-				:xs="24"
-				:sm="24"
-				:md="12"
-				:lg="6"
-				:xl="6"
-				v-for="item in fieldsList"
-				:key="item.id"
-			>
-				<el-card class="box-card">
-					<div class="img-box">
-						<img src="@/assets/images/sy/farmThing/more.png" />
-					</div>
-					<div class="detail">
-						<p class="borderLine">地块名称 : {{ item.landname }}</p>
-						<p class="borderLine">所属基地 : {{ item.farm }}</p>
-						<p class="borderLine">地块面积: {{ item.landarea }}㎡</p>
-						<!-- <p class="borderLine">地块位置 : {{ item.landaddr }}</p> -->
-					</div>
-					<div class="btns">
-						<a
-							:class="{ bg: itemId == item.id && btnindex == 1 ? true : false }"
-							@click="editField(item)"
-							>编辑</a
-						>
-						<a
-							:class="{ bg: itemId == item.id && btnindex == 2 ? true : false }"
-							@click="deletField(item)"
-							>删除</a
-						>
-					</div>
-				</el-card>
-			</el-col>
-		</el-row>
-		<el-pagination
-			background
-			layout="prev, pager, next"
-			:total="totalNum"
-			:page-size="8"
-			:current-page="page"
-			@current-change="changePage"
-		></el-pagination>
-		<!-- 添加地块弹框 -->
-		<el-dialog
-			title="添加地块"
-			:visible.sync="addFieldDialogVisible"
-			width="500px"
-			@close="addFieldDialogClosed"
-		>
-			<el-form
-				ref="addFieldFormRef"
-				:model="addFieldForm"
-				label-width="110px"
-				:rules="editFieldFormRules"
-			>
-				<el-form-item label="地块名称 : " prop="landname">
-					<el-input v-model="addFieldForm.landname"></el-input>
-				</el-form-item>
-				<el-form-item label="所属基地 : " prop="farm">
-					<el-select
-						v-model="addFieldForm.farm"
-						placeholder="请选择基地"
-						style="width: 100%"
-					>
-						<el-option
-							v-for="item in baseList"
-							:label="item.farmname"
-							:value="item.farmname"
-							:key="item.id"
-						></el-option>
-					</el-select>
-				</el-form-item>
-				<!-- <el-form-item label="地块用途 : " prop="landuse">
-					<el-select v-model="addFieldForm.landuse" placeholder="请选择地块用途" style="width: 100%;">
-						<el-option v-for="item in usefor" :label="item.label" :value="item.value" :key="item.value"></el-option>
-					</el-select>
-				</el-form-item> -->
-				<el-form-item label="地块面积(㎡) : " prop="landarea">
-					<el-input
-						type="number"
-						min="0"
-						v-model="addFieldForm.landarea"
-					></el-input>
-				</el-form-item>
-				<el-form-item label="地块描述 : " prop="landaddr">
-					<el-input v-model="addFieldForm.landaddr"></el-input>
-				</el-form-item>
-			</el-form>
-			<span slot="footer" class="dialog-footer">
-				<el-button @click="addFieldDialogVisible = false">取 消</el-button>
-				<el-button type="primary" @click="addFieldSubm">确 定</el-button>
-			</span>
-		</el-dialog>
-		<!-- 编辑地块弹框 -->
-		<el-dialog
-			title="编辑地块"
-			:visible.sync="editFieldDialogVisible"
-			width="500px"
-			@close="editFieldDialogClosed"
-		>
-			<el-form
-				ref="editFieldFormRef"
-				:model="editFieldForm"
-				label-width="110px"
-				:rules="editFieldFormRules"
-			>
-				<el-form-item label="地块名称 : " prop="landname">
-					<el-input disabled v-model="editFieldForm.landname"></el-input>
-				</el-form-item>
-				<el-form-item label="所属基地 : " prop="farm">
-					<el-select
-						disabled
-						v-model="editFieldForm.farm"
-						placeholder="请选择基地"
-						style="width: 100%"
-					>
-						<el-option
-							v-for="item in baseList"
-							:label="item.farmname"
-							:value="item.farmname"
-							:key="item.farmname"
-						></el-option>
-					</el-select>
-				</el-form-item>
-				<!-- <el-form-item label="地块用途 : " prop="landuse">
-					<el-select v-model="editFieldForm.landuse" placeholder="请选择地块用途" style="width: 100%;">
-						<el-option v-for="item in usefor" :label="item.label" :value="item.value" :key="item.value"></el-option>
-					</el-select>
-				</el-form-item> -->
-				<el-form-item label="土地面积(㎡) : " prop="landarea">
-					<el-input
-						type="number"
-						min="0"
-						v-model="editFieldForm.landarea"
-					></el-input>
-				</el-form-item>
-				<el-form-item label="地块位置 : " prop="landaddr">
-					<el-input v-model="editFieldForm.landaddr"></el-input>
-				</el-form-item>
-			</el-form>
-			<span slot="footer" class="dialog-footer">
-				<el-button @click="editFieldDialogVisible = false">取 消</el-button>
-				<el-button type="primary" @click="editSumb">确 定</el-button>
-			</span>
-		</el-dialog>
-	</div>
-</template>
-
-<script>
-export default {
-	data() {
-		return {
-			itemId: '',
-			btnindex: '',
-			fieldsList: [],
-			totalNum: null,
-			page: 1,
-			base: '',
-			baseList: [],
-			usefor: [
-				{ value: '1', label: '小麦' },
-				{ value: '2', label: '玉米' },
-				{ value: '3', label: '水稻' },
-				{ value: '4', label: '水果' },
-				{ value: '5', label: '茶园' }
-			],
-			addFieldForm: {
-				landname: '',
-				farm: '',
-				// landuse: '',
-				landarea: '',
-				landaddr: ''
-			},
-			editFieldForm: {
-				id: '',
-				landname: '',
-				farm: '',
-				// landuse: '',
-				landarea: '',
-				landaddr: ''
-			},
-			editFieldFormRules: {
-				landname: [
-					{ required: true, message: '请填写地块名称', trigger: 'blur' }
-				],
-				farm: [{ required: true, message: '请填写所属基地', trigger: 'blur' }],
-				// landuse: [
-				// 	{ required: true, message: '请填写地块用途', trigger: 'blur' }
-				// ],
-				landarea: [
-					{ required: true, message: '请填写土地面积', trigger: 'blur' }
-				]
-			},
-			addFieldDialogVisible: false,
-			editFieldDialogVisible: false
-		}
-	},
-	mounted() {
-		this.getFields()
-		this.getBaseList()
-	},
-	methods: {
-		getFields() {
-			this.$axios({
-				method: 'POST',
-				url: '/api/api_gateway?method=ascend.ascend_manage.land_info',
-				data: this.qs.stringify({
-					page: this.page,
-					farmname: this.base
-				})
-			}).then((res) => {
-				if (res.data.message == '') {
-					this.fieldsList = res.data.data.data
-					this.totalNum = res.data.data.counts
-				}
-			})
-		},
-		getBaseList() {
-			this.$axios({
-				method: 'POST',
-				url: '/api/api_gateway?method=ascend.ascend_manage.all_base'
-			}).then((res) => {
-				this.baseList = res.data.data.data
-			})
-		},
-		addFieldDialogClosed() {
-			this.addFieldForm = {}
-		},
-		editFieldDialogClosed() {
-			this.editFieldForm = {}
-		},
-		addfield() {
-			this.addFieldDialogVisible = true
-		},
-		addFieldSubm() {
-			this.$refs.addFieldFormRef.validate((valid) => {
-				if (!valid) return
-				this.$axios({
-					url: '/api/api_gateway?method=ascend.ascend_manage.add_land',
-					method: 'POST',
-					data: this.qs.stringify(this.addFieldForm)
-				}).then((res) => {
-					if (res.data.message == '') {
-						this.$message.success('地块添加成功!')
-						this.getFields()
-					} else {
-						this.$message.error(res.data.message)
-					}
-					this.addFieldDialogVisible = false
-				})
-			})
-		},
-		editField(item) {
-			this.itemId = item.id
-			this.btnindex = 1
-			this.editFieldForm = Object.assign({}, item)
-			this.editFieldDialogVisible = true
-		},
-		editSumb() {
-			this.$refs.editFieldFormRef.validate((valid) => {
-				if (!valid) return
-				this.$axios({
-					url: '/api/api_gateway?method=ascend.ascend_manage.edit_land',
-					method: 'POST',
-					data: this.qs.stringify({
-						id: this.editFieldForm.id,
-						farm: this.editFieldForm.farm,
-						// landname: this.editFieldForm.landname,
-						// landuse: this.editFieldForm.landuse,
-						landaddr: this.editFieldForm.landaddr,
-						landarea: this.editFieldForm.landarea
-					})
-				}).then((res) => {
-					if (res.data.message == '') {
-						this.$message.success('地块修改成功!')
-						this.getFields()
-					}
-					this.editFieldDialogVisible = false
-				})
-			})
-		},
-		deletField(item) {
-			console.log(item)
-			this.btnindex = 2
-			this.$confirm('确定要删除此地块么?', '提示', {
-				confirmButtonText: '确定',
-				cancelButtonText: '取消',
-				type: 'warning'
-			})
-				.then(() => {
-					this.$axios({
-						url: '/api/api_gateway?method=ascend.ascend_manage.del_land',
-						method: 'POST',
-						data: this.qs.stringify({
-							farm: item.farm,
-							landname: item.landname,
-							landuse: item.landuse,
-							landaddr: item.landaddr,
-							landarea: item.landarea
-						})
-					}).then((res) => {
-						if (res.data.message == '') {
-							this.$message({
-								type: 'success',
-								message: '删除成功!'
-							})
-							this.getFields()
-						}
-					})
-				})
-				.catch(() => {
-					this.$message({
-						type: 'info',
-						message: '已取消删除'
-					})
-				})
-		},
-		changePage(val) {
-			this.page = val
-			this.getFields()
-		},
-		selChange() {
-			this.page = 1
-			this.getFields()
-		}
-	},
-	filters: {
-		useFor(val) {
-			switch (val) {
-				case '1':
-					return '小麦'
-					break
-				case '2':
-					return '玉米'
-					break
-				case '3':
-					return '水稻'
-					break
-				case '4':
-					return '水果'
-					break
-				case '5':
-					return '茶园'
-					break
-			}
-		}
-	}
-}
-</script>
-
-<style lang='less' scoped>
-.search-box {
-	display: flex;
-	justify-content: space-between;
-	margin-bottom: 10px;
-	.el-input {
-		width: 200px;
-	}
-}
-.el-card {
-	text-align: center;
-	color: #555;
-	font-size: 13px;
-	.borderLine {
-		border: #eee;
-		border-radius: 5px;
-		box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
-		padding: 10px 0;
-	}
-	.btns {
-		display: flex;
-		width: 180px;
-		border-radius: 30px;
-		box-shadow: 0 0 10px rgba(0, 0, 0, 0.15);
-		margin: 20px auto 0;
-		a.bg {
-			background: #17bb89;
-			color: #fff;
-		}
-		a {
-			width: 50%;
-			padding: 8px 0;
-			cursor: pointer;
-			&:first-child {
-				border-top-left-radius: 30px;
-				border-bottom-left-radius: 30px;
-			}
-			&:last-child {
-				border-top-right-radius: 30px;
-				border-bottom-right-radius: 30px;
-			}
-		}
-		a:hover {
-			background: #14a478;
-			color: #fff;
-		}
-	}
-}
-</style>

+ 0 - 344
src/pages/symanger/farm/User.vue

@@ -1,344 +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="keyWords">
-                    <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.id">
-                <el-card class="box-card ">
-                    <div class="img-box">
-                        <img v-if="item.is_active==1" src="../../../assets/images/sy/farm/user-disabled.png" >
-                        <img v-if="item.is_active==0" src="../../../assets/images/sy/farm/user.png" >
-                    </div>
-                    <div class="detail">
-                        <p class="borderLine">用户名 : {{item.username}}</p>
-                        <p class="borderLine">真实姓名 : {{item.truename}}</p>
-                        <p class="borderLine">有效期 : {{item.validity_date}}</p>
-                        <p class="borderLine">手机号 : {{item.phone}}</p>
-                     </div>
-                    <div class="btns">
-                        <a :class="{bg:itemId==item.id&&btnindex==1?true:false}"  @click="editUser(item.id)">编辑</a>
-                        <a :class="{bg:itemId==item.id&&btnindex==2?true:false}" @click="forbidUser(item.id)">禁用</a>
-                    </div>
-                </el-card>
-            </el-col>
-         </el-row>
-        <el-pagination
-        background
-        layout="prev, pager, next"
-        :total="totalNum"
-        @current-change="changePage">
-       </el-pagination>
-         <!-- 添加新用户弹框 -->
-         <el-dialog
-         title="新增"
-         :visible.sync="addUserDialogVisible"
-         width="30%"
-         @close="addUserDialogClosed">
-            <el-form ref="addUserFormRef" :model="addUserForm" label-width="90px" :rules="addUserFormRules" >
-            <el-form-item label="用户名 : " prop="username">
-                  <el-input v-model="addUserForm.username"></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="真实姓名 : " prop="truename">
-                  <el-input  v-model="addUserForm.truename"></el-input>
-            </el-form-item>
-              <el-form-item label="有效期 : " prop="validity_date">
-                  <el-date-picker type="date" placeholder="选择日期" v-model="addUserForm.validity_date" style="width: 100%;"></el-date-picker>
-            </el-form-item>
-            <el-form-item label="管理地块 : " prop="fields">
-               <el-select   v-model="addUserForm.fields" placeholder="请选择地块" multiple  style="width: 100%;">
-                  <el-option v-for="item in fields" :label="item.label" :value="item.value" :key="item.value"></el-option>
-               </el-select>
-            </el-form-item>
-            <el-form-item label="手机号 : " prop="phone">
-                  <el-input  v-model="addUserForm.phone"></el-input>
-            </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="30%"
-         @close="editUserDialogClosed">
-            <el-form ref="editUserFormRef" :model="editUserForm" label-width="90px" :rules="addUserFormRules" >
-            <el-form-item label="用户名 : " prop="username">
-                  <el-input v-model="editUserForm.username"></el-input>
-            </el-form-item>
-            <el-form-item label="密码 : " prop="pass">
-                  <el-input  v-model="editUserForm.pass"></el-input>
-            </el-form-item>
-             <el-form-item label="真实姓名 : " prop="truename">
-                  <el-input  v-model="editUserForm.truename"></el-input>
-            </el-form-item>
-              <el-form-item label="有效期 : " prop="validity_date">
-                  <el-date-picker type="date" placeholder="选择日期" v-model="editUserForm.validity_date" style="width: 100%;"></el-date-picker>
-            </el-form-item>
-            <el-form-item label="管理地块 : " prop="fields">
-               <el-select   v-model="editUserForm.fields" placeholder="请选择地块" multiple  style="width: 100%;">
-                  <el-option v-for="item in fields" :label="item.label" :value="item.value" :key="item.value"></el-option>
-               </el-select>
-            </el-form-item>
-            <el-form-item label="手机号 : " prop="phone">
-                  <el-input  v-model="editUserForm.phone"></el-input>
-            </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>
-   export default {
-      data(){
-         var checkMobile = (rule, value, callback) => {
-            const regMobile = /^1\d{10}$/
-            if (regMobile.test(value)) {
-               callback()
-            }else{
-               // 返回一个错误提示
-               callback(new Error('请输入合法的手机号码'))
-            }
-         };
-         return {
-           btnindex:'',//按钮选中状态控制
-           itemId:'',//当前点开的弹框设备ID
-           keyWords:'',
-           userList:[
-               {
-                     "id":12,
-                     "username":"yyyzz",
-                     "truename":"张三",
-                     "validity_date":"2020-02-30 00:00:00",
-                     "phone":"18838094123",
-                     "password":"1234156",
-                     "is_active":1
-               },{
-                  "id":123,
-                  "username":"yyyzz",
-                  "truename":"张三",
-                  "validity_date":"2020-02-30 00:00:00",
-                  "phone":"18838094123",
-                  "password":"1234156",
-                  "is_active":1
-               },{
-                  "id":1234,
-                  "username":"yyyzz",
-                  "truename":"张三",
-                  "validity_date":"2020-02-30 00:00:00",
-                  "phone":"18838094123",
-                  "password":"1234156",
-                  "is_active":0
-               },{
-                  "id":12345,
-                  "username":"yyyzz",
-                  "truename":"张三",
-                  "validity_date":"2020-02-30 00:00:00",
-                  "phone":"18838094123",
-                  "password":"1234156",
-                  "is_active":true
-               },{
-                  "id":123456,
-                  "username":"yyyzz",
-                  "truename":"张三",
-                  "validity_date":"2020-02-30 00:00:00",
-                  "phone":"18838094123",
-                  "password":"1234156",
-                  "is_active":0
-               },{
-                  "id":1234567,
-                  "username":"yyyzz",
-                  "truename":"张三",
-                  "validity_date":"2020-02-30 00:00:00",
-                  "phone":"18838094123",
-                  "password":"1234156",
-                  "is_active":true
-               },{
-                  "id":12345678,
-                  "username":"yyyzz",
-                  "truename":"张三",
-                  "validity_date":"2020-02-30 00:00:00",
-                  "phone":"18838094123",
-                  "password":"1234156",
-                  "is_active":0
-               },{
-                  "id":123456789,
-                  "username":"yyyzz",
-                  "truename":"张三",
-                  "validity_date":"2020-02-30 00:00:00",
-                  "phone":"18838094123",
-                  "password":"1234156",
-                  "is_active":true
-               }
-            ],
-           totalNum:1,
-           addUserDialogVisible:false,
-           editUserDialogVisible:false,
-           fields:[
-              {value:'1',label:'地块一'},
-              {value:'2',label:'地块二'},
-              {value:'3',label:'地块三'},
-              {value:'4',label:'地块四'},
-           ],
-           addUserForm:{
-               username:"",
-               pass:"",
-               truename:"",
-               validity_date:"",
-               fields:[],
-               phone:"",
-           },
-           editUserForm:{
-               username:"yyyzz",
-               pass:"123456",
-               truename:"张三",
-               validity_date:"2020-02-30 00:00:00",
-               fields:['1'],
-               phone:"18838094123",
-           },
-           addUserFormRules:{
-               username:[{ required: true, message: '请填写用户名', trigger: 'blur'}],
-               pass:[{required: true, message: '请填写密码', trigger: 'blur' }],
-               truename:[{required: true, message: '请填写真实姓名', trigger: 'blur' }],
-               validity_date:[{required: true, message: '请选择有效期', trigger: 'change' }],
-               fields:[{required: true, message: '请选择地块', trigger: 'change' }],
-               phone:[
-                  {required: true, message: '请填写手机号', trigger: 'blur' },
-                  {validator: checkMobile, trigger: 'blur'}
-                  ]
-           }
-         }
-      },
-      mounted(){
-         // this.getUserList()
-      },
-      methods:{
-         // getUserList(){
-         //    this.$axios({
-         //       method:"GET",
-         //       url:"/farmUserList",
-         //    }).then((res)=>{
-         //          if (res.data.code !== 200) {
-         //          return this.$message.error('获取用户数据失败!')
-         //          }
-         //          this.userList=res.data.dat;
-         //          this.totalNum=res.data.nums;
-         //    })
-         // },
-         addUser(){
-            this.addUserDialogVisible=true;
-         },
-         addUserSubm(){
-            this.$refs.addUserFormRef.validate((valid)=>{
-               if (valid) {
-                  this.addUserDialogVisible=false;
-               } else {
-                  console.log('error submit!!');
-                  return false;
-               }
-            })
-         },
-         editUserSubm(){
-            this.$refs.editUserFormRef.validate((valid)=>{
-               if (valid) {
-                  this.editUserDialogVisible=false;
-               } else {
-                  console.log('error submit!!');
-                  return false;
-               }
-            })
-         },
-         editUserDialogClosed(){
-            this.$refs.editUserFormRef.resetFields();
-         },
-         addUserDialogClosed(){
-            this.$refs.addUserFormRef.resetFields();
-         },
-         editUser(id){
-            this.btnindex=1;
-            this.itemId=id;
-            this.editUserDialogVisible=true
-         },
-         forbidUser(id){
-            this.btnindex=2;
-            this.itemId=id;
-            this.$confirm('确定禁用此用户么?', '提示', {
-               confirmButtonText: '确定',
-               cancelButtonText: '取消',
-               type: 'warning'
-               }).then(() => {
-                  this.$message({
-                     type: 'success',
-                     message: '禁用成功!'
-                  });
-               }).catch(() => {
-                  this.$message({
-                     type: 'info',
-                     message: '已取消禁用'
-                  });          
-               });
-         },
-         changePage(val){
-            
-         }
-      }
-   }
-</script>
-
-<style lang='less' scoped>
-.search-box{
-    display:flex;
-    justify-content: space-between;
-    margin-bottom:10px;
-    .el-input{width:200px;}
-    }
-.el-card {
-    text-align: center;
-    color:#555;
-    font-size:13px;
-    .borderLine{
-        border: #eee;
-        border-radius:5px;
-        box-shadow: 0 0 10px rgba(0,0,0,.1);
-        padding: 10px 0;
-    }
-   .btns{
-      display:flex;
-      width:180px;
-      border-radius:30px;
-      box-shadow: 0 0 10px rgba(0,0,0,.15);
-      margin:20px auto 0;
-      a.bg{background:#17BB89;color:#fff;}
-      a{
-         width:50%;
-         padding:8px 0;
-         cursor:pointer;
-         &:first-child{border-top-left-radius:30px;border-bottom-left-radius:30px;}
-         &:last-child{border-top-right-radius:30px;border-bottom-right-radius:30px;}
-         }
-      a:hover{background:#14a478;color:#fff}
-   } 
-}
-</style>

+ 0 - 447
src/pages/symanger/farmThing/applyFertilizer.vue

@@ -1,447 +0,0 @@
-<template>
-	<div style="cursor: default">
-		<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="base"
-					clearable
-					@change="selChange"
-					placeholder="请选择基地名称"
-				>
-					<el-option
-						v-for="item in baseList"
-						:label="item.farmname"
-						:value="item.farmname"
-						:key="item.id"
-					></el-option>
-				</el-select>
-				<el-select
-					size="small"
-					v-model="pickcode"
-					clearable
-					@change="selChange"
-					placeholder="请选择采收状态"
-				>
-					<el-option label="已采收" value="1"></el-option>
-					<el-option label="未采收" value="0"></el-option>
-				</el-select>
-			</div>
-			<el-button type="primary" size="mini" @click="fertiAdd">新增</el-button>
-		</div>
-		<el-row :gutter="10">
-			<el-col
-				:xs="24"
-				:sm="24"
-				:md="12"
-				:lg="6"
-				:xl="6"
-				v-for="item in fieldsList"
-				:key="item.id"
-			>
-				<el-card class="box-card">
-					<img
-						class="tag"
-						v-if="item.is_pick == '1'"
-						src="@/assets/images/sy/farmThing/picked.png"
-					/>
-					<div class="img-box">
-						<img src="@/assets/images/sy/farmThing/applyFertilizer.png" />
-					</div>
-					<div class="detail">
-						<p class="borderLine">操作基地 : {{ item.farm }}</p>
-						<p class="borderLine">操作地块 : {{ item.land }}</p>
-						<p class="borderLine">肥料名称 : {{ item.itemname }}</p>
-						<p class="borderLine">施肥用量(kg) : {{ item.manureuse }}</p>
-						<p class="borderLine">
-							施肥时间 : {{ (item.uptime * 1000) | formatTime }}
-						</p>
-						<p class="borderLine">批次 : {{ item.batch }}</p>
-						<p class="borderLine">操作人 : {{ item.user }}</p>
-					</div>
-					<div class="btns">
-						<a
-							:class="{ bg: itemId == item.id && btnindex == 1 ? true : false }"
-							@click="fertiEdit(item)"
-							>编辑</a
-						>
-						<a
-							:class="{ bg: itemId == item.id && btnindex == 2 ? true : false }"
-							@click="fertiDelet(item)"
-							>删除</a
-						>
-					</div>
-				</el-card>
-			</el-col>
-		</el-row>
-		<el-pagination
-			background
-			layout="prev, pager, next"
-			:total="totalNum"
-			:page-size="8"
-			:current-page="page"
-			@current-change="changePage"
-		></el-pagination>
-		<!-- 新增弹框 -->
-		<el-dialog
-			title="新增"
-			:visible.sync="farmThingAddDialogVisible"
-			width="30%"
-			@close="AddDialogClosed"
-		>
-			<template v-if="planted.length > 0">
-				<el-form
-					ref="addFormRef"
-					:model="addForm"
-					label-width="116px"
-					:rules="addFormRules"
-				>
-					<el-form-item label="所属地块 : " prop="pro_cascader">
-						<el-cascader
-							v-model="addForm.pro_cascader"
-							:options="planted"
-							:props="{
-								expandTrigger: 'hover',
-								label: 'farmname',
-								value: 'farmname'
-							}"
-						></el-cascader>
-					</el-form-item>
-					<el-form-item label="肥料名称 : " prop="fertilizer_name">
-						<el-input v-model="addForm.fertilizer_name"></el-input>
-					</el-form-item>
-					<el-form-item label="使用总量(kg) : " prop="weight">
-						<el-input v-model="addForm.weight"></el-input>
-					</el-form-item>
-					<el-form-item label="操作人 : " prop="operator">
-						<el-input v-model="addForm.operator"></el-input>
-					</el-form-item>
-				</el-form>
-				<span slot="footer" class="dialog-footer">
-					<el-button @click="farmThingAddDialogVisible = false"
-						>取 消</el-button
-					>
-					<el-button type="primary" @click="addSubm">确认</el-button>
-				</span>
-			</template>
-			<template v-else>
-				<div class="noPlanted">暂无正在种植的地块!</div>
-			</template>
-		</el-dialog>
-		<!-- 编辑地块弹框 -->
-		<el-dialog
-			title="编辑"
-			:visible.sync="farmThingEditDialogVisible"
-			width="30%"
-			@close="EditDialogClosed"
-		>
-			<el-form
-				ref="editFormRef"
-				:model="editForm"
-				label-width="116px"
-				:rules="addFormRules"
-			>
-				<el-form-item label="所属地块 : " prop="pro_cascader">
-					<el-input disabled v-model="editForm.pro_cascader"></el-input>
-				</el-form-item>
-				<el-form-item label="肥料名称 : " prop="fertilizer_name">
-					<el-input v-model="editForm.fertilizer_name"></el-input>
-				</el-form-item>
-				<el-form-item label="使用总量(kg) : " prop="weight">
-					<el-input v-model="editForm.weight"></el-input>
-				</el-form-item>
-				<el-form-item label="操作人 : " prop="operator">
-					<el-input v-model="editForm.operator"></el-input>
-				</el-form-item>
-			</el-form>
-			<span slot="footer" class="dialog-footer">
-				<el-button @click="farmThingEditDialogVisible = false">取 消</el-button>
-				<el-button type="primary" @click="editSubm">确认</el-button>
-			</span>
-		</el-dialog>
-	</div>
-</template>
-
-<script>
-export default {
-	data() {
-		return {
-			itemId: '',
-			btnindex: '',
-			base: '',
-			pickcode: '',
-			pro_cascader: [],
-			planted: [],
-			baseList:[],
-			farmThingAddDialogVisible: false,
-			farmThingEditDialogVisible: false,
-			fieldsList: [],
-			totalNum: 1,
-			page: 1,
-			addForm: {
-				pro_cascader: [],
-				fertilizer_name: '', //肥料名称
-				weight: '', //使用总量
-				operator: '' //操作人
-			},
-			editForm: {
-				pro_cascader: '',
-				fertilizer_name: '',
-				weight: '', //使用总量
-				operator: '' //操作人
-			},
-			addFormRules: {
-				pro_cascader: [
-					{ required: true, message: '请选择地块', trigger: 'change' }
-				],
-				fertilizer_name: [
-					{ required: true, message: '请填写肥料名称', trigger: 'blur' }
-				],
-				weight: [
-					{ required: true, message: '请填写使用总量', trigger: 'blur' }
-				],
-				operator: [
-					{ required: true, message: '请选择操作人', trigger: 'change' }
-				]
-			}
-		}
-	},
-	mounted() {
-		this.getPlanted()
-		this.getFields()
-		this.getBaseList()
-	},
-	methods: {
-		getBaseList() {  //获取所有基地
-			this.$axios({
-				method: 'POST',
-				url: '/api/api_gateway?method=ascend.ascend_manage.all_base'
-			}).then((res) => {
-				this.baseList = res.data.data.data
-			})
-		},
-		getPlanted() {
-			this.$axios({
-				method: 'POST',
-				url: '/api/api_gateway?method=ascend.ascend_manage.already_plant'
-			}).then((res) => {
-				if (res.data.message == '') {
-					let arr = res.data.data.data
-					this.planted = arr.filter((item) => {
-						if (item.children.length > 0) {
-							return item.children.some((item2) => {
-								return item2.is_pick != 1 //未采收
-							})
-						} else {
-							return false
-						}
-					})
-				}
-			})
-		},
-		getFields() {
-			this.$axios({
-				method: 'POST',
-				url: '/api/api_gateway?method=ascend.ascend_manage.manure_info',
-				data: this.qs.stringify({
-					page: this.page,
-					farmname: this.base,
-					pickcode: this.pickcode
-				})
-			}).then((res) => {
-				if (res.data.message == '') {
-					this.fieldsList = res.data.data.data
-					this.totalNum = res.data.data.counts
-				}
-			})
-		},
-		fertiAdd() {
-			this.farmThingAddDialogVisible = true
-		},
-		fertiEdit(item) {
-			if (item.is_pick == 0) {
-				//未采收
-				this.editForm.pro_cascader = item.farm + ' / ' + item.land
-				this.editForm.fertilizer_name = item.itemname
-				this.editForm.weight = item.manureuse
-				this.editForm.operator = item.user
-				this.itemId = item.id
-				this.btnindex = 1
-				this.farmThingEditDialogVisible = true
-			} else {
-				this.$message.warning('此地块已采收,禁止编辑!')
-			}
-		},
-		fertiDelet(item) {
-			this.btnindex = 2
-			this.$confirm('确定删除么?', '提示', {
-				confirmButtonText: '确定',
-				cancelButtonText: '取消',
-				type: 'warning'
-			})
-				.then(() => {
-					this.$axios({
-						method: 'POST',
-						url: '/api/api_gateway?method=ascend.ascend_manage.del_manure',
-						data: this.qs.stringify({
-							id: item.id
-						})
-					}).then((res) => {
-						if (res.data.message == '') {
-							this.$message({
-								type: 'success',
-								message: '删除成功!'
-							})
-							this.getFields()
-						}
-					})
-				})
-				.catch(() => {
-					this.$message({
-						type: 'info',
-						message: '已取消删除'
-					})
-				})
-		},
-		AddDialogClosed() {
-			this.$refs.addFormRef.resetFields()
-		},
-		EditDialogClosed() {
-			this.$refs.editFormRef.resetFields()
-		},
-		addSubm() {
-			this.$refs.addFormRef.validate((valid) => {
-				if (!valid) return
-				let farm = this.addForm.pro_cascader[0]
-				let land = this.addForm.pro_cascader[1].split('/')[0]
-				this.$axios({
-					method: 'POST',
-					url: '/api/api_gateway?method=ascend.ascend_manage.add_manure',
-					data: this.qs.stringify({
-						farm: farm,
-						land: land,
-						itemname: this.addForm.fertilizer_name,
-						manureuse: this.addForm.weight,
-						user: this.addForm.operator
-					})
-				}).then((res) => {
-					if (res.data.message == '') {
-						this.getFields()
-					} else {
-						this.$message.warning(res.data.message)
-					}
-					this.farmThingAddDialogVisible = false
-				})
-			})
-		},
-		editSubm() {
-			this.$refs.editFormRef.validate((valid) => {
-				if (!valid) return
-				this.$axios({
-					method: 'POST',
-					url: '/api/api_gateway?method=ascend.ascend_manage.edit_manure',
-					data: this.qs.stringify({
-						id: this.itemId,
-						itemname: this.editForm.fertilizer_name,
-						manureuse: this.editForm.weight,
-						user: this.editForm.operator
-					})
-				}).then((res) => {
-					if (res.data.message == '') {
-						this.getFields()
-					} else {
-						this.$message.warning(res.data.message)
-					}
-				})
-				this.farmThingEditDialogVisible = false
-			})
-		},
-		changePage(val) {
-			this.page = val
-			this.getFields()
-		},
-		selChange(){
-			this.index=1
-			this.getFields()
-		}
-	}
-}
-</script>
-
-<style lang='less' scoped>
-.search-box {
-	display: flex;
-	justify-content: space-between;
-	margin-bottom: 10px;
-	.filter-box {
-		display: flex;
-		.el-input {
-			width: 200px;
-			margin-right: 10px;
-		}
-		.el-cascader {
-			width: 200px;
-		}
-	}
-}
-.el-card {
-	/deep/.el-card__body {
-		position: relative;
-	}
-	.tag {
-		position: absolute;
-		top: 0;
-		right: 20px;
-	}
-	text-align: center;
-	color: #555;
-	font-size: 13px;
-	.borderLine {
-		border: #eee;
-		border-radius: 5px;
-		-webkit-box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
-		box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
-		padding: 8px 0;
-		margin: 10px 0;
-	}
-	.btns {
-		display: flex;
-		width: 180px;
-		border-radius: 30px;
-		box-shadow: 0 0 10px rgba(0, 0, 0, 0.15);
-		margin: 20px auto 0;
-		a.bg {
-			background: #17bb89;
-			color: #fff;
-		}
-		a {
-			width: 50%;
-			height: 30px;
-			line-height: 30px;
-			cursor: pointer;
-			&:first-child {
-				border-top-left-radius: 30px;
-				border-bottom-left-radius: 30px;
-			}
-			&:last-child {
-				border-top-right-radius: 30px;
-				border-bottom-right-radius: 30px;
-			}
-		}
-		a:hover {
-			background: #14a478;
-			color: #fff;
-		}
-	}
-}
-.el-cascader {
-	width: 100%;
-}
-.noPlanted {
-	color: red;
-}
-</style>

+ 0 - 470
src/pages/symanger/farmThing/harvest.vue

@@ -1,470 +0,0 @@
-<template>
-	<div style="cursor: default">
-		<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="base"
-					clearable
-					@change="selChange"
-					placeholder="请选择基地名称"
-				>
-					<el-option
-						v-for="item in baseList"
-						:label="item.farmname"
-						:value="item.farmname"
-						:key="item.id"
-					></el-option>
-				</el-select>
-			</div>
-			<el-button type="primary" size="mini" @click="harvAdd">新增</el-button>
-		</div>
-		<el-row :gutter="10">
-			<el-col
-				:xs="24"
-				:sm="24"
-				:md="12"
-				:lg="6"
-				:xl="6"
-				v-for="item in pickList"
-				:key="item.id"
-			>
-				<el-card class="box-card">
-					<div class="img-box">
-						<img src="@/assets/images/sy/farmThing/harvest.png" />
-					</div>
-					<div class="detail">
-						<p class="borderLine">采收基地 : {{ item.farm }}</p>
-						<p class="borderLine">采收地块 : {{ item.land }}</p>
-						<p class="borderLine">产品名称 : {{ item.pickname }}</p>
-						<p class="borderLine">采收总量(kg) : {{ item.picktotal }}</p>
-						<p class="borderLine">
-							采收时间 : {{ (item.uptime * 1000) | formatTime }}
-						</p>
-						<p class="borderLine">批次 : {{ item.batch }}</p>
-						<p class="borderLine">操作人 : {{ item.user }}</p>
-					</div>
-					<!-- <div class="btns">
-						<a
-							:class="{ bg: itemId == item.id && btnindex == 1 ? true : false }"
-							@click="harvEdit(item)"
-							>编辑</a
-						>
-						<a
-							:class="{ bg: itemId == item.id && btnindex == 2 ? true : false }"
-							@click="showQRcode(item.id)"
-							>二维码</a
-						>
-					</div> -->
-					<div class="btns2">
-						<a
-							:class="{ bg: itemId == item.id ? true : false }"
-							@click="showQRcode(item.backcode)"
-							>二维码</a
-						>
-					</div>
-				</el-card>
-			</el-col>
-		</el-row>
-		<el-pagination
-			background
-			layout="prev, pager, next"
-			:total="totalNum"
-			:page-size="8"
-			:current-page="page"
-			@current-change="changePage"
-		></el-pagination>
-		<!-- 新增弹框 -->
-		<el-dialog
-			title="新增"
-			:visible.sync="farmThingAddDialogVisible"
-			width="30%"
-			@close="AddDialogClosed"
-		>
-			<template v-if="planted.length > 0">
-				<el-form
-					ref="addFormRef"
-					:model="addForm"
-					label-width="116px"
-					:rules="addFormRules"
-				>
-					<el-form-item label="所属地块 : " prop="pro_cascader">
-						<el-cascader
-							style="width: 100%"
-							@change="harvCascaderChange"
-							v-model="addForm.pro_cascader"
-							:options="planted"
-							:props="{
-								expandTrigger: 'hover',
-								label: 'farmname',
-								value: 'farmname'
-							}"
-						></el-cascader>
-					</el-form-item>
-					<el-form-item label="采收总量(kg) : " prop="har_total">
-						<el-input v-model="addForm.har_total"></el-input>
-					</el-form-item>
-					<el-form-item label="操作人 : " prop="operator">
-						<el-input v-model="addForm.operator"></el-input>
-					</el-form-item>
-				</el-form>
-				<span slot="footer" class="dialog-footer">
-					<el-button @click="farmThingAddDialogVisible = false"
-						>取 消</el-button
-					>
-					<el-button type="primary" @click="addSubm">确认</el-button>
-				</span>
-			</template>
-			<template v-else>
-				<div class="noPlanted">暂无正在种植的地块!</div>
-			</template>
-		</el-dialog>
-		<!-- 编辑地块弹框 -->
-		<el-dialog
-			title="编辑"
-			:visible.sync="farmThingEditDialogVisible"
-			width="350px"
-			@close="EditDialogClosed"
-		>
-			<el-form
-				ref="editFormRef"
-				:model="editForm"
-				label-width="116px"
-				:rules="addFormRules"
-			>
-				<el-form-item label="所属地块 : " prop="pro_cascader">
-					<el-cascader
-						style="width: 100%"
-						@change="harvCascaderChange"
-						v-model="editForm.pro_cascader"
-						:options="planted"
-						:props="{
-							expandTrigger: 'hover',
-							label: 'farmname',
-							value: 'farmname'
-						}"
-					></el-cascader>
-				</el-form-item>
-				<el-form-item label="采收总量(kg) : " prop="har_total">
-					<el-input v-model="editForm.har_total"></el-input>
-				</el-form-item>
-				<el-form-item label="批次名称 : " prop="batch_name">
-					<el-input v-model="editForm.batch_name"></el-input>
-				</el-form-item>
-				<el-form-item label="操作人 : " prop="operator">
-					<el-input v-model="editForm.operator"></el-input>
-				</el-form-item>
-			</el-form>
-			<span slot="footer" class="dialog-footer">
-				<el-button @click="farmThingEditDialogVisible = false">取 消</el-button>
-				<el-button type="primary" @click="editSubm">确认</el-button>
-			</span>
-		</el-dialog>
-		<!-- 生成二维码 -->
-		<el-dialog
-			title="追溯二维码"
-			:visible.sync="showQRcodeDialogVisible"
-			width="350px"
-			@close="QRcodeDialogClosed"
-		>
-			<div id="qrCode" ref="QRcodeShowImg"></div>
-			<!-- <p>{{ QRcode }}</p> -->
-		</el-dialog>
-	</div>
-</template>
-
-<script>
-import QRCode from 'qrcodejs2' //二维码生成
-export default {
-	data() {
-		return {
-			itemId: '',
-			btnindex: '',
-			backcode: '', //新增和编辑弹框
-			planted: [],
-			baseList: [],
-			base: '',
-			farmThingAddDialogVisible: false,
-			farmThingEditDialogVisible: false,
-			showQRcodeDialogVisible: false,
-			pickList: [],
-			totalNum: 1,
-			page: 1,
-			pro_cascader: [],
-			addForm: {
-				pro_cascader: [],
-				har_total: '', //采收总量
-				operator: '' //操作人
-			},
-			editForm: {
-				pro_cascader: [],
-				har_total: '', //采收总量
-				operator: '', //操作人
-				batch_name: '' //批次
-			},
-			addFormRules: {
-				pro_cascader: [
-					{ required: true, message: '请选择所属地块', trigger: 'change' }
-				],
-				batch_name: [
-					{ required: true, message: '请填写批次名称', trigger: 'blur' }
-				],
-				har_total: [
-					{ required: true, message: '请填写采收总量', trigger: 'blur' }
-				],
-				operator: [
-					{ required: true, message: '请选择操作人', trigger: 'change' }
-				]
-			},
-			QRcode: ''
-		}
-	},
-	created() {
-		this.getPickList()
-		this.getPlanted()
-		this.getBaseList()
-	},
-	methods: {
-		getBaseList() {
-			//获取所有基地
-			this.$axios({
-				method: 'POST',
-				url: '/api/api_gateway?method=ascend.ascend_manage.all_base'
-			}).then((res) => {
-				this.baseList = res.data.data.data
-			})
-		},
-		getPlanted() {
-			this.$axios({
-				method: 'POST',
-				url: '/api/api_gateway?method=ascend.ascend_manage.already_plant'
-			}).then((res) => {
-				if (res.data.message == '') {
-					let arr = res.data.data.data
-					this.planted = arr
-						.filter((item) => {
-							return item.children.some(m=>{
-								return m.is_pick==0
-							})
-						})
-						.map((item) => {
-							item.children = item.children.filter((m) => {
-								return m.is_pick == 0
-							})
-							return item
-						})
-					console.log(this.planted)
-				}
-			})
-		},
-		getPickList() {
-			this.$axios({
-				method: 'POST',
-				url: '/api/api_gateway?method=ascend.ascend_manage.pick_info',
-				data: this.qs.stringify({ page: this.page, farmname: this.base })
-			}).then((res) => {
-				if (res.data.message == '') {
-					this.pickList = res.data.data.data
-					this.totalNum = res.data.data.counts
-				}
-			})
-		},
-		harvAdd() {
-			this.farmThingAddDialogVisible = true
-		},
-		harvEdit(item) {
-			if (item.is_pick == 0) {
-				//未采收
-				this.editForm.pro_cascader = [item.farm, item.land]
-				this.editForm.har_total = item.picktotal
-				this.editForm.operator = item.user
-				this.editForm.batch_name = item.batch
-				this.itemId = item.id
-				this.btnindex = 1
-				this.farmThingEditDialogVisible = true
-			} else {
-				this.$message.warning('此地块已采收,禁止编辑!')
-			}
-		},
-		AddDialogClosed() {
-			this.$refs.addFormRef.resetFields()
-		},
-		EditDialogClosed() {
-			this.$refs.editFormRef.resetFields()
-		},
-		harvCascaderChange(value) {
-			let opt = this.planted
-			for (let item of opt) {
-				if (value[0] == item.farmname) {
-					for (let item2 of item.children) {
-						if (value[1] == item2.farmname) {
-							this.backcode = item2.backcode
-						}
-					}
-				}
-			}
-		},
-		addSubm() {
-			this.$refs.addFormRef.validate((valid) => {
-				if (!valid) return
-				this.$axios({
-					method: 'POST',
-					url: '/api/api_gateway?method=ascend.ascend_manage.add_pick',
-					data: this.qs.stringify({
-						farm: this.addForm.pro_cascader[0],
-						land: this.addForm.pro_cascader[1],
-						picktotal: this.addForm.har_total,
-						user: this.addForm.operator,
-						backcode: this.backcode
-					})
-				}).then((res) => {
-					if (res.data.message == '') {
-						this.getPickList()
-						this.getPlanted()
-						this.farmThingAddDialogVisible = false
-					} else {
-						this.$message.warning(res.data.message)
-					}
-				})
-			})
-		},
-		editSubm() {
-			// this.$refs.editFormRef.validate((valid) => {
-			// 	if (valid) {
-			// 		this.farmThingEditDialogVisible = false
-			// 	} else {
-			// 		return false
-			// 	}
-			// })
-		},
-		showQRcode(backcode) {
-			// this.itemId = id
-			this.showQRcodeDialogVisible = true
-			this.QRcode = backcode
-			this.$nextTick(() => {
-				new QRCode(this.$refs.QRcodeShowImg, {
-					text: 'http://182.92.193.64/#/tracebackDetailApp/' + backcode,
-					width: 200,
-					height: 200,
-					colorDark: '#333333', //二维码颜色
-					colorLight: '#ffffff', //二维码背景色
-					correctLevel: QRCode.CorrectLevel.L //容错率,L/M/H
-				})
-			})
-		},
-		QRcodeDialogClosed() {
-			this.$refs.QRcodeShowImg.innerHTML = ''
-		},
-		changePage(val) {
-			this.page = val
-			this.getPickList()
-		},
-		selChange() {
-			this.page = 1
-			this.getPickList()
-		}
-	}
-}
-</script>
-
-<style lang='less' scoped>
-.search-box {
-	display: flex;
-	justify-content: space-between;
-	margin-bottom: 10px;
-	.filter-box {
-		display: flex;
-		.el-cascader {
-			width: 200px;
-			margin-left: 10px;
-		}
-	}
-	.el-input {
-		width: 200px;
-	}
-}
-.el-card {
-	text-align: center;
-	color: #555;
-	font-size: 13px;
-	.borderLine {
-		border: #eee;
-		border-radius: 5px;
-		-webkit-box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
-		box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
-		padding: 8px 0;
-		margin: 10px 0;
-	}
-	.btns {
-		display: flex;
-		width: 180px;
-		border-radius: 30px;
-		box-shadow: 0 0 10px rgba(0, 0, 0, 0.15);
-		margin: 20px auto 0;
-		a.bg {
-			background: #17bb89;
-			color: #fff;
-		}
-		a {
-			width: 50%;
-			height: 30px;
-			line-height: 30px;
-			cursor: pointer;
-			&:first-child {
-				border-top-left-radius: 30px;
-				border-bottom-left-radius: 30px;
-			}
-			&:last-child {
-				border-top-right-radius: 30px;
-				border-bottom-right-radius: 30px;
-			}
-		}
-		a:hover {
-			background: #14a478;
-			color: #fff;
-		}
-	}
-	.btns2 {
-		width: 90px;
-		border-radius: 30px;
-		box-shadow: 0 0 10px rgba(0, 0, 0, 0.15);
-		margin: 20px auto 0;
-		a.bg {
-			background: #17bb89;
-			color: #fff;
-		}
-		a {
-			display: block;
-			width: 100%;
-			height: 30px;
-			border-radius: 30px;
-			line-height: 30px;
-			cursor: pointer;
-		}
-		a:hover {
-			background: #14a478;
-			color: #fff;
-		}
-	}
-}
-.el-cascader {
-	width: 100%;
-}
-#qrCode {
-	width: 200px;
-	margin: 0 auto;
-}
-#qrCode + p {
-	text-align: center;
-	line-height: 30px;
-	font-family: monospace;
-}
-.noPlanted {
-	padding: 0 10px 20px 10px;
-	color: red;
-}
-</style>

+ 0 - 432
src/pages/symanger/farmThing/more.vue

@@ -1,432 +0,0 @@
-<template>
-	<div style="cursor: default">
-		<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="base"
-					clearable
-					@change="selChange"
-					placeholder="请选择基地名称"
-				>
-					<el-option
-						v-for="item in baseList"
-						:label="item.farmname"
-						:value="item.farmname"
-						:key="item.id"
-					></el-option>
-				</el-select>
-				<el-select
-					size="small"
-					v-model="pickcode"
-					clearable
-					@change="selChange"
-					placeholder="请选择采收状态"
-				>
-					<el-option label="已采收" value="1"></el-option>
-					<el-option label="未采收" value="0"></el-option>
-				</el-select>
-			</div>
-			<el-button type="primary" size="mini" @click="sprayAdd">新增</el-button>
-		</div>
-		<el-row :gutter="10">
-			<el-col
-				:xs="24"
-				:sm="24"
-				:md="12"
-				:lg="6"
-				:xl="6"
-				v-for="item in fieldsList"
-				:key="item.id"
-			>
-				<el-card class="box-card">
-					<img
-						class="tag"
-						v-if="item.is_pick == '1'"
-						src="@/assets/images/sy/farmThing/picked.png"
-					/>
-					<div class="img-box">
-						<img src="@/assets/images/sy/farmThing/more.png" />
-					</div>
-					<div class="detail">
-						<p class="borderLine">操作基地 : {{ item.farm }}</p>
-						<p class="borderLine">操作地块 : {{ item.land }}</p>
-						<p class="borderLine">操作事项 : {{ item.jobname }}</p>
-						<p class="borderLine">
-							操作日期 : {{ (item.uptime * 1000) | formatTime }}
-						</p>
-						<p class="borderLine">批次名称 : {{ item.batch }}</p>
-						<p class="borderLine">操作人 : {{ item.user }}</p>
-					</div>
-					<div class="btns">
-						<a
-							:class="{ bg: itemId == item.id && btnindex == 1 ? true : false }"
-							@click="sprayEdit(item)"
-							>编辑</a
-						>
-						<a
-							:class="{ bg: itemId == item.id && btnindex == 2 ? true : false }"
-							@click="sprayDelet(item.id)"
-							>删除</a
-						>
-					</div>
-				</el-card>
-			</el-col>
-		</el-row>
-		<el-pagination
-			background
-			layout="prev, pager, next"
-			:total="totalNum"
-			:page-size="8"
-			:current-page="page"
-			@current-change="changePage"
-		></el-pagination>
-		<!-- 新增弹框 -->
-		<el-dialog
-			title="新增"
-			:visible.sync="farmThingAddDialogVisible"
-			width="30%"
-			@close="AddDialogClosed"
-		>
-			<template v-if="planted.length > 0">
-				<el-form
-					ref="addFormRef"
-					:model="addForm"
-					label-width="116px"
-					:rules="addFormRules"
-				>
-					<el-form-item label="所属地块 : " prop="pro_cascader">
-						<el-cascader
-							style="width: 100%"
-							v-model="addForm.pro_cascader"
-							:options="planted"
-							:props="{
-								expandTrigger: 'hover',
-								label: 'farmname',
-								value: 'farmname'
-							}"
-						></el-cascader>
-					</el-form-item>
-					<el-form-item label="操作事项 : " prop="opt_items">
-						<el-input v-model="addForm.opt_items"></el-input>
-					</el-form-item>
-					<el-form-item label="操作人 : " prop="operator">
-						<el-input v-model="addForm.operator"></el-input>
-					</el-form-item>
-				</el-form>
-				<span slot="footer" class="dialog-footer">
-					<el-button @click="farmThingAddDialogVisible = false"
-						>取 消</el-button
-					>
-					<el-button type="primary" @click="addSubm">确认</el-button>
-				</span>
-			</template>
-			<template v-else>
-				<div class="noPlanted">暂无正在种植的地块!</div>
-			</template>
-		</el-dialog>
-		<!-- 编辑地块弹框 -->
-		<el-dialog
-			title="编辑"
-			:visible.sync="farmThingEditDialogVisible"
-			width="30%"
-			@close="EditDialogClosed"
-		>
-			<el-form
-				ref="editFormRef"
-				:model="editForm"
-				label-width="116px"
-				:rules="addFormRules"
-			>
-				<el-form-item label="所属地块 : " prop="pro_cascader">
-					<el-input disabled v-model="editForm.pro_cascader"></el-input>
-				</el-form-item>
-				<el-form-item label="操作事项 : " prop="opt_items">
-					<el-input v-model="editForm.opt_items"></el-input>
-				</el-form-item>
-				<el-form-item label="操作人 : " prop="operator">
-					<el-input v-model="editForm.operator"></el-input>
-				</el-form-item>
-			</el-form>
-			<span slot="footer" class="dialog-footer">
-				<el-button @click="farmThingEditDialogVisible = false">取 消</el-button>
-				<el-button type="primary" @click="editSubm">确认</el-button>
-			</span>
-		</el-dialog>
-	</div>
-</template>
-
-<script>
-export default {
-	data() {
-		return {
-			itemId: '',
-			btnindex: '',
-			base: '',
-			pickcode: '',
-			farmThingAddDialogVisible: false,
-			farmThingEditDialogVisible: false,
-			fieldsList: [],
-			planted: [],
-			baseList: [], //所有基地
-			totalNum: null,
-			page: 1,
-			pro_cascader: [],
-			addForm: {
-				pro_cascader: [],
-				opt_items: '', //操作事项
-				operator: '' //操作人
-			},
-			editForm: {
-				pro_cascader: '',
-				opt_items: '', //操作事项
-				operator: '' //操作人
-			},
-			addFormRules: {
-				pro_cascader: [
-					{ required: true, message: '请选择所属地块', trigger: 'change' }
-				],
-				opt_items: [
-					{ required: true, message: '请填写操作事项', trigger: 'blur' }
-				],
-				operator: [
-					{ required: true, message: '请选择操作人', trigger: 'change' }
-				]
-			}
-		}
-	},
-	mounted() {
-		this.getFields()
-		this.getPlanted()
-		this.getBaseList()
-	},
-	methods: {
-		getBaseList() {
-			//获取所有基地
-			this.$axios({
-				method: 'POST',
-				url: '/api/api_gateway?method=ascend.ascend_manage.all_base'
-			}).then((res) => {
-				this.baseList = res.data.data.data
-			})
-		},
-		getPlanted() {
-			this.$axios({
-				method: 'POST',
-				url: '/api/api_gateway?method=ascend.ascend_manage.already_plant'
-			}).then((res) => {
-				if (res.data.message == '') {
-					let arr = res.data.data.data
-					this.planted = arr.filter((item) => {
-						if (item.children.length > 0) {
-							return item.children.some((item2) => {
-								return item2.is_pick != 1
-							})
-						} else {
-							return false
-						}
-					})
-				}
-			})
-		},
-		getFields() {
-			this.$axios({
-				method: 'POST',
-				url: '/api/api_gateway?method=ascend.ascend_manage.area_job_info',
-				data: this.qs.stringify({
-					page: this.page,
-					farmname: this.base,
-					pickcode: this.pickcode
-				})
-			}).then((res) => {
-				if (res.data.message == '') {
-					this.fieldsList = res.data.data.data
-					this.totalNum = res.data.data.counts
-				}
-			})
-		},
-		sprayAdd() {
-			this.farmThingAddDialogVisible = true
-		},
-		sprayEdit(item) {
-			if (item.is_pick == 0) {
-				//未采收
-				this.editForm.pro_cascader = item.farm + ' / ' + item.land
-				this.editForm.opt_items = item.jobname
-				this.editForm.operator = item.user
-				this.itemId = item.id
-				this.btnindex = 1
-				this.farmThingEditDialogVisible = true
-			} else {
-				this.$message.warning('此地块已采收,禁止编辑!')
-			}
-		},
-		sprayDelet(id) {
-			this.itemId = id
-			this.btnindex = 2
-			this.$confirm('确定要删除此地块么?', '提示', {
-				confirmButtonText: '确定',
-				cancelButtonText: '取消',
-				type: 'warning'
-			})
-				.then(() => {
-					this.$axios({
-						method: 'POST',
-						url: '/api/api_gateway?method=ascend.ascend_manage.del_area_job',
-						data: this.qs.stringify({
-							id: id
-						})
-					}).then((res) => {
-						if (res.data.message == '') {
-							this.$message({
-								type: 'success',
-								message: '删除成功!'
-							})
-							this.getFields()
-						}
-					})
-				})
-				.catch(() => {
-					this.$message({
-						type: 'info',
-						message: '已取消删除'
-					})
-				})
-		},
-		AddDialogClosed() {
-			this.$refs.addFormRef.resetFields()
-		},
-		EditDialogClosed() {
-			this.$refs.editFormRef.resetFields()
-		},
-		addSubm() {
-			this.$refs.addFormRef.validate((valid) => {
-				if (!valid) return
-				this.$axios({
-					method: 'POST',
-					url: '/api/api_gateway?method=ascend.ascend_manage.area_job',
-					data: this.qs.stringify({
-						farm: this.addForm.pro_cascader[0],
-						land: this.addForm.pro_cascader[1],
-						jobname: this.addForm.opt_items,
-						user: this.addForm.operator
-					})
-				}).then((res) => {
-					if (res.data.message == '') {
-						this.getFields()
-						this.farmThingAddDialogVisible = false
-					}
-				})
-			})
-		},
-		editSubm() {
-			this.$refs.editFormRef.validate((valid) => {
-				if (!valid) return
-				this.$axios({
-					method: 'POST',
-					url: '/api/api_gateway?method=ascend.ascend_manage.edit_area_job',
-					data: this.qs.stringify({
-						id: this.itemId,
-						jobname: this.editForm.opt_items,
-						user: this.editForm.operator
-					})
-				}).then((res) => {
-					if (res.data.message == '') {
-						this.getFields()
-					} else {
-						this.$message.warning(res.data.message)
-					}
-				})
-				this.farmThingEditDialogVisible = false
-			})
-		},
-		changePage(val) {
-			this.page = val
-			this.getFields()
-		},
-		selChange() {
-			this.page = 1
-			this.getFields()
-		}
-	}
-}
-</script>
-
-<style lang='less' scoped>
-.search-box {
-	display: flex;
-	justify-content: space-between;
-	margin-bottom: 10px;
-	.filter-box {
-		display: flex;
-		.el-cascader {
-			width: 200px;
-			margin-left: 10px;
-		}
-	}
-	.el-input {
-		width: 200px;
-	}
-}
-.el-card {
-	/deep/.el-card__body {
-		position: relative;
-	}
-	.tag {
-		position: absolute;
-		top: 0;
-		right: 20px;
-	}
-	text-align: center;
-	color: #555;
-	font-size: 13px;
-	.borderLine {
-		border: #eee;
-		border-radius: 5px;
-		-webkit-box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
-		box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
-		padding: 8px 0;
-		margin: 10px 0;
-	}
-	.btns {
-		display: flex;
-		width: 180px;
-		border-radius: 30px;
-		box-shadow: 0 0 10px rgba(0, 0, 0, 0.15);
-		margin: 20px auto 0;
-		a.bg {
-			background: #17bb89;
-			color: #fff;
-		}
-		a {
-			width: 50%;
-			height: 30px;
-			line-height: 30px;
-			cursor: pointer;
-			&:first-child {
-				border-top-left-radius: 30px;
-				border-bottom-left-radius: 30px;
-			}
-			&:last-child {
-				border-top-right-radius: 30px;
-				border-bottom-right-radius: 30px;
-			}
-		}
-		a:hover {
-			background: #14a478;
-			color: #fff;
-		}
-	}
-}
-.el-cascader {
-	width: 100%;
-}
-.noPlanted {
-	padding: 0 10px 20px 10px;
-	color: red;
-}
-</style>

+ 0 - 429
src/pages/symanger/farmThing/plant.vue

@@ -1,429 +0,0 @@
-<template>
-	<div style="cursor: default">
-		<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="base" clearable @change="selChange" placeholder="请选择基地名称">
-					<el-option
-						v-for="item in FieldCascader"
-						:label="item.farmname"
-						:value="item.farmname"
-						:key="item.id"
-					></el-option>
-				</el-select>
-				<el-select size="small" v-model="pickcode" clearable  @change="selChange" placeholder="请选择采收状态">
-					<el-option label="已采收" value="1"></el-option>
-					<el-option label="未采收" value="0"></el-option>
-				</el-select>
-			</div>
-			<el-button type="primary" size="mini" @click="plantAdd">新增</el-button>
-		</div>
-		<el-row :gutter="10">
-			<el-col
-				:xs="24"
-				:sm="24"
-				:md="12"
-				:lg="6"
-				:xl="6"
-				v-for="item in fieldsList"
-				:key="item.backcode"
-			>
-				<el-card class="box-card">
-					<img
-						class="tag"
-						v-if="item.pickcode == '1'"
-						src="@/assets/images/sy/farmThing/picked.png"
-					/>
-					<div class="img-box">
-						<img src="@/assets/images/sy/farmThing/plant.png" />
-					</div>
-					<div class="detail">
-						<p class="borderLine">种植基地 : {{ item.farm }}</p>
-						<p class="borderLine">种植地块 : {{ item.land }}</p>
-						<p class="borderLine">
-							采收状态 : {{ item.pickcode == 1 ? '已采收' : '未采收' }}
-						</p>
-						<p class="borderLine">类别 : {{ item.planttype }}</p>
-						<p class="borderLine">名称 : {{ item.plantname }}</p>
-						<p class="borderLine">批次 : {{ item.batch }}</p>
-						<p class="borderLine">
-							种植时间 : {{ (item.uptime * 1000) | formatTime }}
-						</p>
-					</div>
-					<div class="btns">
-						<a
-							:class="{ bg: itemId == item.id && btnindex == 1 ? true : false }"
-							@click="plantEdit(item)"
-							>编辑</a
-						>
-						<a
-							:class="{ bg: itemId == item.id && btnindex == 2 ? true : false }"
-							@click="plantDelet(item.id, item.backcode)"
-							>删除</a
-						>
-					</div>
-				</el-card>
-			</el-col>
-		</el-row>
-		<el-pagination
-			background
-			layout="prev, pager, next"
-			:total="totalNum"
-			:page-size="8"
-			:current-page="page"
-			@current-change="changePage"
-		></el-pagination>
-		<!-- 新增弹框 -->
-		<el-dialog
-			title="新增"
-			:visible.sync="farmThingAddDialogVisible"
-			width="30%"
-			@close="AddDialogClosed"
-		>
-			<el-form
-				ref="addFormRef"
-				:model="addForm"
-				label-width="90px"
-				:rules="addFormRules"
-			>
-				<el-form-item label="所属地块 : " prop="pro_cascader">
-					<el-cascader
-						v-model="addForm.pro_cascader"
-						:options="FieldCascader"
-						:props="{
-							expandTrigger: 'hover',
-							label: 'farmname',
-							value: 'farmname'
-						}"
-					></el-cascader>
-				</el-form-item>
-				<el-form-item label="产品类别 : " prop="pro_type">
-					<el-input v-model="addForm.pro_type"></el-input>
-				</el-form-item>
-				<el-form-item label="产品名称 : " prop="pro_name">
-					<el-input v-model="addForm.pro_name"></el-input>
-				</el-form-item>
-				<el-form-item label="批次名称 : " prop="batch_name">
-					<el-input v-model="addForm.batch_name"></el-input>
-				</el-form-item>
-			</el-form>
-			<span slot="footer" class="dialog-footer">
-				<el-button @click="farmThingAddDialogVisible = false">取 消</el-button>
-				<el-button type="primary" @click="addSubm">确认</el-button>
-			</span>
-		</el-dialog>
-		<!-- 编辑地块弹框 -->
-		<el-dialog
-			title="编辑"
-			:visible.sync="farmThingEditDialogVisible"
-			width="30%"
-			@close="EditDialogClosed"
-		>
-			<el-form
-				ref="editFormRef"
-				:model="editForm"
-				label-width="90px"
-				:rules="addFormRules"
-			>
-				<el-form-item label="所属地块 : " prop="pro_cascader">
-					<el-cascader
-						disabled
-						v-model="editForm.pro_cascader"
-						:options="FieldCascader"
-						:props="{
-							expandTrigger: 'hover',
-							label: 'farmname',
-							value: 'farmname'
-						}"
-					></el-cascader>
-				</el-form-item>
-				<el-form-item label="产品类别 : " prop="pro_type">
-					<el-input v-model="editForm.pro_type"></el-input>
-				</el-form-item>
-				<el-form-item label="产品名称 : " prop="pro_name">
-					<el-input v-model="editForm.pro_name"></el-input>
-				</el-form-item>
-				<el-form-item label="批次名称 : " prop="batch_name">
-					<el-input v-model="editForm.batch_name"></el-input>
-				</el-form-item>
-			</el-form>
-			<span slot="footer" class="dialog-footer">
-				<el-button @click="farmThingEditDialogVisible = false">取 消</el-button>
-				<el-button type="primary" @click="editSubm">确认</el-button>
-			</span>
-		</el-dialog>
-	</div>
-</template>
-
-<script>
-export default {
-	data() {
-		return {
-			itemId: '',
-			btnindex: '',
-			page: 1,
-			totalNum: null,
-			base: '',
-			pickcode: '',
-			farmThingAddDialogVisible: false,
-			farmThingEditDialogVisible: false,
-			fieldsList: [],
-
-			bases: [
-				{ value: '1', label: '基地一' },
-				{ value: '2', label: '基地二' },
-				{ value: '3', label: '基地三' },
-				{ value: '4', label: '基地四' }
-			],
-			fields: [
-				{ value: '1', label: '地块一' },
-				{ value: '2', label: '地块二' },
-				{ value: '3', label: '地块三' },
-				{ value: '4', label: '地块四' }
-			],
-			usefor: [
-				{ value: '1', label: '种植' },
-				{ value: '2', label: '种植' },
-				{ value: '3', label: '种植' },
-				{ value: '4', label: '种植' }
-			],
-			addForm: {
-				pro_name: '',
-				batch_name: '', //批次名称
-				pro_type: '',
-				pro_cascader: []
-			},
-			editForm: {
-				pro_name: '',
-				batch_name: '', //批次名称
-				pro_type: '',
-				pro_cascader: []
-			},
-			addFormRules: {
-				pro_name: [
-					{ required: true, message: '请填写产品名称', trigger: 'blur' }
-				],
-				pro_type: [
-					{ required: true, message: '请填写产品类别', trigger: 'blur' }
-				],
-				batch_name: [
-					{ required: true, message: '请填写批次名称', trigger: 'blur' }
-				],
-				pro_cascader: [
-					{ required: true, message: '请选择地块', trigger: 'change' }
-				]
-			},
-			FieldCascader: []
-		}
-	},
-	mounted() {
-		this.getAllFieldsCascader()
-		this.getplant()
-	},
-	methods: {
-		getAllFieldsCascader() {
-			this.$axios({
-				method: 'POST',
-				url: '/api/api_gateway?method=ascend.ascend_manage.all_base'
-			}).then((res) => {
-				if (res.data.message == '') {
-					this.FieldCascader = res.data.data.data
-				}
-			})
-		},
-		getplant() {
-			this.$axios({
-				method: 'POST',
-				url: '/api/api_gateway?method=ascend.ascend_manage.plant_info',
-				data: this.qs.stringify({
-					page: this.page,
-					farmname: this.base,
-					pickcode: this.pickcode
-				})
-			}).then((res) => {
-				if (res.data.message == '') {
-					this.totalNum = res.data.data.counts
-					this.fieldsList = res.data.data.data
-				}
-			})
-		},
-		selChange(){
-			this.page=1
-			this.getplant()
-		},
-		plantAdd() {
-			this.farmThingAddDialogVisible = true
-		},
-		plantEdit(item) {
-			if (item.pickcode == '0') {
-				//未采收
-				this.editForm.pro_name = item.plantname
-				this.editForm.batch_name = item.batch
-				this.editForm.pro_type = item.planttype
-				this.editForm.pro_cascader = [item.farm, item.land]
-				this.itemId = item.id
-				this.btnindex = 1
-				this.farmThingEditDialogVisible = true
-			} else {
-				this.$message.warning('此地块已采收,禁止编辑!')
-			}
-		},
-		plantDelet(id, backcode) {
-			this.itemId = id
-			this.btnindex = 2
-			this.$confirm('确定要删除此作物么?', '提示', {
-				confirmButtonText: '确定',
-				cancelButtonText: '取消',
-				type: 'warning'
-			})
-				.then(() => {
-					this.$axios({
-						method: 'POST',
-						url: '/api/api_gateway?method=ascend.ascend_manage.del_plant',
-						data: this.qs.stringify({
-							backcode: backcode
-						})
-					}).then((res) => {
-						if (res.data.message == '') {
-							this.$message({
-								type: 'success',
-								message: '删除成功!'
-							})
-							this.getplant()
-						}
-					})
-				})
-				.catch(() => {
-					this.$message({
-						type: 'info',
-						message: '已取消删除'
-					})
-				})
-		},
-		AddDialogClosed() {
-			this.$refs.addFormRef.resetFields()
-		},
-		EditDialogClosed() {
-			this.$refs.editFormRef.resetFields()
-		},
-		addSubm() {
-			this.$refs.addFormRef.validate((valid) => {
-				if (!valid) return
-				let farm = this.addForm.pro_cascader[0]
-				let land = this.addForm.pro_cascader[1]
-				this.$axios({
-					method: 'POST',
-					url: '/api/api_gateway?method=ascend.ascend_manage.add_plant',
-					data: this.qs.stringify({
-						farm: farm,
-						land: land,
-						planttype: this.addForm.pro_type,
-						batch: this.addForm.batch_name,
-						plantname: this.addForm.pro_name
-					})
-				}).then((res) => {
-					if (res.data.message == '') {
-						this.getplant()
-					} else {
-						this.$message.warning(res.data.message)
-					}
-					this.farmThingAddDialogVisible = false
-				})
-			})
-		},
-		editSubm() {
-			this.$refs.editFormRef.validate((valid) => {
-				if (!valid) return
-				this.$axios({
-					method: 'POST',
-					url: '/api/api_gateway?method=ascend.ascend_manage.edit_plant',
-					data: this.qs.stringify({
-						id: this.itemId,
-						planttype: this.editForm.pro_type,
-						batch: this.editForm.batch_name,
-						plantname: this.editForm.pro_name
-					})
-				}).then((res) => {
-					if (res.data.message == '') {
-						this.getplant()
-					} else {
-						this.$message.warning(res.data.message)
-					}
-				})
-				this.farmThingEditDialogVisible = false
-			})
-		},
-		changePage(val) {
-			this.page = val
-			this.getplant()
-		}
-	}
-}
-</script>
-
-<style lang='less' scoped>
-.search-box {
-	display: flex;
-	justify-content: space-between;
-	margin-bottom: 10px;
-	.el-input {
-		width: 200px;
-	}
-}
-.el-card {
-	/deep/.el-card__body {
-		position: relative;
-	}
-	.tag {
-		position: absolute;
-		top: 0;
-		right: 20px;
-	}
-	text-align: center;
-	color: #555;
-	font-size: 13px;
-	.borderLine {
-		border: #eee;
-		border-radius: 5px;
-		-webkit-box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
-		box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
-		padding: 8px 0;
-		margin: 10px 0;
-	}
-	.btns {
-		display: flex;
-		width: 180px;
-		border-radius: 30px;
-		box-shadow: 0 0 10px rgba(0, 0, 0, 0.15);
-		margin: 20px auto 0;
-		a.bg {
-			background: #17bb89;
-			color: #fff;
-		}
-		a {
-			width: 50%;
-			height: 30px;
-			line-height: 30px;
-			cursor: pointer;
-			&:first-child {
-				border-top-left-radius: 30px;
-				border-bottom-left-radius: 30px;
-			}
-			&:last-child {
-				border-top-right-radius: 30px;
-				border-bottom-right-radius: 30px;
-			}
-		}
-		a:hover {
-			background: #14a478;
-			color: #fff;
-		}
-	}
-}
-.el-cascader {
-	width: 100%;
-}
-</style>

+ 0 - 0
src/pages/symanger/farmThing/sale.vue


Деякі файли не було показано, через те що забагато файлів було змінено