yf_zd hace 4 años
padre
commit
b802bcd42c

BIN
dist.zip


+ 6 - 2
src/pages/plantGuard/disasterWarn/disasterWarn.vue

@@ -318,7 +318,6 @@ export default {
       });
     },
     markerClick(event, item) {
-      console.log(item);
       if(item.equips[0].device_type_id == 11){
         this.equips.qxzId = item.equips[0].device_id
         this.equips.qxzName = item.equips[0].device_name
@@ -372,11 +371,16 @@ export default {
         infoWindow: this.infoWindow
       });
       this.infoWindow.setContent(this.$refs.windowPopUp.$el);
-      this.infoWindow.open(this.map, event.target.getPosition());
+      if(event){
+        this.infoWindow.open(this.map, event.target.getPosition());
+      }else{
+        this.infoWindow.open(this.map, item.lnglat);
+      }
     },
     lookEquip(item){
       this.map.setCenter(item.lnglat)
       this.map.setZoom(17)
+      this.markerClick('', item);
     },
     getWranInfo(){
       this.$axios({

+ 2 - 4
src/pages/plantGuard/disasterWarn/disasterWarnList.vue

@@ -228,14 +228,12 @@ export default {
     text-align: center;
 }
 /deep/.el-table th{
-    background-color: #43cdf6;
+    background-color: #232733;
 }
 /deep/.el-table thead{
     color: #fff;
 }
-/deep/.el-table__body tr.hover-row > td{
-	background-color: rgba(67,205,246,.22);
-}
+
 // 分页为蓝色调
 /deep/.el-pagination .el-pager li.active{
   background-color: #0295ff!important;  

+ 4 - 2
src/pages/plantGuard/irrigate/irrigate.vue

@@ -111,6 +111,7 @@
                   <el-switch v-model="item.val" @change="equipStateSwitch(item)" active-color="#0295ff" inactive-color="#b6b6b6"></el-switch>
                 </div>
               </div>
+              <div style="text-align: center;width: 100%;line-height: 44px;color:#fff" v-if="!equipRelayList.length">暂无数据</div>
             </div>
           </el-scrollbar>
         </div>
@@ -142,6 +143,7 @@
                   <div class="name">{{item.name}}</div>
                 </div>
               </div>
+              <div style="text-align: center;width: 100%;line-height: 44px;" v-if="!equipEleList.length">暂无数据</div>
             </div>
           </el-scrollbar>
         </div>
@@ -254,14 +256,14 @@ export default {
       relayName: [],
       relaydevice_addr:[],
       equipRelayList: [],
-      ctrlScrollHeight:"",
+      ctrlScrollHeight:"50",
       // 要素
       eleList:eleList,
       eleName: [],
       eleNum: [],
       eleVal: [],
       equipEleList: [],
-      qxzScrollHeight: "",
+      qxzScrollHeight: "50",
       searchVal: "",
       equipData: [],
       marker: null,

+ 11 - 16
src/pages/plantGuard/irrigate/operatData.vue

@@ -18,7 +18,7 @@
 				</el-date-picker>
 			</div>
 			<div class="exportRight">
-				<el-button size="small" type="primary">导 出</el-button>
+				<el-button size="small" type="blueInfo">导 出</el-button>
 			</div>
 		</div>
        <template>
@@ -140,22 +140,19 @@ export default {
 			width: 250px;
 		}
 		/deep/.el-input-group__append{
-			border-color: #43cdf6;
+      border-color: #0295ff;
+      font-size: 0;
 		}
 		.title{
 			margin: 0 5px 0 15px;
 		}
 		.el-button{
-			background: #43cdf6;
-			color: #fff;
-    		border-color: #43cdf6;
-		}
-	}
-	.exportRight{
-		.el-button{
-			background: #43cdf6;
-			color: #fff;
-    		border-color: #43cdf6;
+			background: #0295ff;
+      color: #fff;
+      border-color: #0295ff;
+      height: 32px;
+      width: 42px;
+      font-size: 12px;
 		}
 	}
 }
@@ -173,14 +170,12 @@ export default {
     text-align: center;
 }
 /deep/.el-table th{
-    background-color: #43cdf6;
+    background-color: #232733;
 }
 /deep/.el-table thead{
     color: #fff;
 }
-/deep/.el-table__body tr.hover-row > td{
-	background-color: rgba(67,205,246,.22);
-}
+
 // 分页为蓝色调
 /deep/.el-pagination .el-pager li.active{
   background-color: #0295ff!important;  

+ 13 - 12
src/pages/plantGuard/irrigate/wranData/wranDataList.vue

@@ -209,15 +209,19 @@ export default {
 			width: 250px;
 		}
 		/deep/.el-input-group__append{
-			border-color: #43cdf6;
-		}
-		.title{
-			margin: 0 5px 0 15px;
-		}
-		.el-button{
-			background: #43cdf6;
+			border-color: #0295ff;
+			font-size: 0;
+				}
+				.title{
+					margin: 0 5px 0 15px;
+				}
+				.el-button{
+					background: #0295ff;
 			color: #fff;
-    		border-color: #43cdf6;
+			border-color: #0295ff;
+			height: 32px;
+			width: 42px;
+			font-size: 12px;
 		}
 	}
 	.exportRight{
@@ -249,14 +253,11 @@ export default {
     text-align: center;
 }
 /deep/.el-table th{
-    background-color: #43cdf6;
+    background-color: #232733;
 }
 /deep/.el-table thead{
     color: #fff;
 }
-/deep/.el-table__body tr.hover-row > td{
-	background-color: rgba(67,205,246,.22);
-}
 // 分页为蓝色调
 /deep/.el-pagination .el-pager li.active{
   background-color: #0295ff!important;  

+ 14 - 12
src/pages/plantGuard/irrigate/wranData/wranDataSet.vue

@@ -240,15 +240,19 @@ export default {
 			width: 250px;
 		}
 		/deep/.el-input-group__append{
-			border-color: #43cdf6;
-		}
-		.title{
-			margin: 0 5px 0 15px;
-		}
-		.el-button{
-			background: #43cdf6;
+			border-color: #0295ff;
+			font-size: 0;
+				}
+				.title{
+					margin: 0 5px 0 15px;
+				}
+				.el-button{
+					background: #0295ff;
 			color: #fff;
-    		border-color: #43cdf6;
+			border-color: #0295ff;
+			height: 32px;
+			width: 42px;
+			font-size: 12px;
 		}
 	}
 	.exportRight{
@@ -280,14 +284,12 @@ export default {
     text-align: center;
 }
 /deep/.el-table th{
-    background-color: #43cdf6;
+    background-color: #232733;
 }
 /deep/.el-table thead{
     color: #fff;
 }
-/deep/.el-table__body tr.hover-row > td,/deep/.el-table--enable-row-hover .el-table__body tr:hover > td{
-	background-color: rgba(67,205,246,.22);
-}
+
 // 分页为蓝色调
 /deep/.el-pagination .el-pager li.active{
   background-color: #0295ff!important;  

+ 1 - 1
src/pages/plantGuard/monitor/Monitor.vue

@@ -696,7 +696,7 @@ li {
 .monitor-container {
   display: flex;
   flex-direction: column;
-  // height: 100%;
+  height: 100%;
   .monitor-wrap {
     // height: 100%;
     display: flex;

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

@@ -214,10 +214,10 @@ export default {
     text-align: center;
 }
 /deep/.el-table th{
-    background-color: #f6f6f6;
+    background-color: #232733;
 }
 /deep/.el-table thead{
-    color: #373737;
+    color: #fff;
 }
 .greenState{
   color: green;

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

@@ -210,10 +210,10 @@ export default {
     text-align: center;
 }
 /deep/.el-table th{
-    background-color: #f6f6f6;
+    background-color: #232733;
 }
 /deep/.el-table thead{
-    color: #373737;
+    color: #fff;
 }
 .greenState{
   color: green;

+ 5 - 1
src/pages/plantGuard/plantProtection/baseComponents/bzyTabPhoto.vue

@@ -13,7 +13,11 @@
       <div class="photos" v-viewer>
           <div v-for="i in photoList" :key="i.addtime">
               <div class="photo">
-                <img :src="i.addr" alt />
+                <img
+                  v-lazy="i.addr"
+                  @error="errImg"
+                  alt
+                />
               </div>
               <div class="time">{{i.addtime*1000|formatTime}}</div>
           </div>

+ 8 - 2
src/pages/plantGuard/plantProtection/baseComponents/cbdTabPestStat.vue

@@ -30,7 +30,7 @@
       </div>
     </div>
     <!-- 自动统计图 -->
-    <div v-if="viewSwitch" >
+    <div  v-loading="PestAllDataLoading"  element-loading-background="rgba(0, 0, 0, 0.8)" v-if="viewSwitch" >
       <div>
         <el-row :gutter="10">
           <el-col :md="24" :lg="24">
@@ -78,7 +78,7 @@
     </div>
 
     <!-- 手动统计 -->
-    <div v-if="!viewSwitch">
+    <div  v-loading="manualStatisticsLoading"  element-loading-background="rgba(0, 0, 0, 0.8)" v-if="!viewSwitch">
       <div>
         <el-row :gutter="10">
           <el-col :md="24" :lg="24">
@@ -159,6 +159,8 @@ export default {
       viewSwitch2: "",
       viewSwitch23: "",
       dropDown:[],
+      PestAllDataLoading:false,
+      manualStatisticsLoading:false,
     };
   },
   watch: {
@@ -254,6 +256,7 @@ export default {
     },
     // 获取折线和饼状图和数据列表
      getPestAllData(list) {
+       this.PestAllDataLoading = true;
       this.$axios({
         method: "POST",
         url: "/api/api_gateway?method=forecast.worm_lamp.pest_statistics",
@@ -264,6 +267,7 @@ export default {
           pest_name: this.queryInfo.pest_name,
         }),
       }).then((res) => {
+        this.PestAllDataLoading = false;
         if (res.data.message == "") {
           this.equipStatus = {
             address: res.data.data.address,
@@ -479,6 +483,7 @@ export default {
 
     // 手动统计-折线图数据请求
     manualStatistics(flag) {
+      this.manualStatisticsLoading = true;
       let that = this;
       let postData = that.qs.stringify({
         device_id: this.d_id, //设备id
@@ -495,6 +500,7 @@ export default {
           data: postData,
         })
         .then((res) => {
+          this.manualStatisticsLoading = false;
           if (res.data.message == "") {
             this.total = res.data.data.nums;
             var ChartData = [

+ 9 - 1
src/pages/plantGuard/plantProtection/baseComponents/cbdTabPhoto.vue

@@ -13,7 +13,11 @@
     <div class="photos" v-viewer>
       <div v-for="i in imgList" :key="i.addtime">
         <div class="photo">
-          <img :src="i.addr" alt />
+          <img
+            v-lazy="i.addr"
+            @error="errImg"
+            alt
+          />
         </div>
         <div class="time">
           <span>{{i.addtime*1000|formatTime}}</span>
@@ -92,6 +96,10 @@ export default {
   watch: {},
   //方法集合
   methods: {
+    // 列表图片加载失败
+    errImg(e) {
+      e.target.src = $imghost + "/images/expertDiagnosis/ku/noData.jpg";
+    },
     //在线状态选择
     equipStatusCheck(flag) {
       this.active = flag;

+ 50 - 37
src/pages/plantGuard/plantProtection/baseComponents/equipHistoryDate.vue

@@ -2,49 +2,52 @@
 <template>
   <div class="equipInfo">
     <DateSearch @exportData="exportData" @dateChange="dateChange" ref="timeSearchRefs" @toggleSwitcState="toggleSwitcState"></DateSearch>
-    <div class="charts" v-if="switcState">
-      <highcharts
-        class="highcharts"
-        :options="options"
-        v-if="Object.keys(options).length > 0"
-      ></highcharts>
-      <div class="noDataClass" v-else>暂无数据</div>
-    </div>
-    <div v-if="!switcState">
-      <el-table :data="tableData" max-height="300" class="customTable" :header-row-class-name="tableth" style="width: 150%">
-        <el-table-column
-          v-for="(item, index) in tableHeadTxt[equipType]"
-          :key="index"
-          :prop="item"
-          :fixed="item == 'addtime'?'left':false"
-          :label="equipState_dict[item].name+equipState_dict[item].unit"
-          :width="item=='addtime'?'170px':''"
-        >
-          <template slot-scope="scope">
-            <template v-if="equipState_dict[scope.column.property].value">
-              {{ equipState_dict[scope.column.property].value[scope.row.d_h_t[scope.column.property]] }}
-            </template>
-            <template v-else>
-              <template v-if="scope.column.property=='addtime'">
-                  {{ scope.row.d_h_t[scope.column.property]*1000|formatTime }}
+    <div v-loading="dataLoading"  element-loading-background="rgba(0, 0, 0, 0.8)">
+      <div class="charts" v-if="switcState">
+        <highcharts
+          class="highcharts"
+          :options="options"
+          v-if="Object.keys(options).length > 0"
+        ></highcharts>
+        <div class="noDataClass" v-else>暂无数据</div>
+      </div>
+      <div v-if="!switcState">
+        <el-table :data="tableData" max-height="300" class="customTable" :header-row-class-name="tableth" style="width: 150%">
+          <el-table-column
+            v-for="(item, index) in tableHeadTxt[equipType]"
+            :key="index"
+            :prop="item"
+            :fixed="item == 'addtime'?'left':false"
+            :label="equipState_dict[item].name+equipState_dict[item].unit"
+            :width="item=='addtime'?'170px':''"
+          >
+            <template slot-scope="scope">
+              <template v-if="equipState_dict[scope.column.property].value">
+                {{ equipState_dict[scope.column.property].value[scope.row.d_h_t[scope.column.property]] }}
               </template>
               <template v-else>
-                {{ scope.row.d_h_t[scope.column.property] }}
+                <template v-if="scope.column.property=='addtime'">
+                    {{ scope.row.d_h_t[scope.column.property]*1000|formatTime }}
+                </template>
+                <template v-else>
+                  {{ scope.row.d_h_t[scope.column.property] }}
+                </template>
               </template>
             </template>
-          </template>
-        </el-table-column>
-      </el-table>
-      <el-pagination
-        small
-        background
-        layout="prev, pager, next"
-        :total="total"
-        :current-page="queryInfo.page"
-        @current-change="changePage"
-      ></el-pagination>
+          </el-table-column>
+        </el-table>
+        <el-pagination
+          small
+          background
+          layout="prev, pager, next"
+          :total="total"
+          :current-page="queryInfo.page"
+          @current-change="changePage"
+        ></el-pagination>
+      </div>
     </div>
     
+    
   </div>
 </template>
 
@@ -77,6 +80,7 @@ export default {
       // 表格数据
       total:0,
       tableData:[],
+      dataLoading:false,
       // 动态表头
       tableHeadTxt: {
         "2":["addtime","ds", "ws", "tbs", "rps", "tps", "dps", "tt", "ct", "at", "ah", "cv", "bv"],
@@ -240,6 +244,7 @@ export default {
       };
     },
     getChartLine(chart,table){
+      this.dataLoading = true;
       switch(this.equipType){
         case 2: 
           if(chart){
@@ -275,6 +280,7 @@ export default {
                 end_time: this.queryInfo.end,
               }),
             }).then((res) => {
+              this.dataLoading = false;
               if (res.data.data.length !== 0) {
                 var data = res.data.data;
                 for (let item of data) {
@@ -321,6 +327,7 @@ export default {
                 page: this.queryInfo.page,
               }),
             }).then((res) => {
+              this.dataLoading = false;
               if (res.data.message == "") {
                 this.total = res.data.data.counts;
                 if(this.total !== 0){
@@ -367,6 +374,7 @@ export default {
                 end_time: this.queryInfo.end,
               }),
             }).then((res) => {
+              this.dataLoading = false;
               if (res.data.data.length) {
                 var data = res.data.data;
                 for (let item of data) {
@@ -402,6 +410,7 @@ export default {
                 page: this.queryInfo.page,
               }),
             }).then((res) => {
+              this.dataLoading = false;
               if (res.data.message == "") {
                 this.total = res.data.data.counts;
                 if(this.total){
@@ -455,6 +464,7 @@ export default {
                 end_time: this.queryInfo.end,
               }),
             }).then((res) => {
+              this.dataLoading = false;
               if (res.data.data.length > 0) {
                 var data = res.data.data;
                 for (let item of data) {
@@ -489,6 +499,7 @@ export default {
                 page: this.queryInfo.page,
               }),
             }).then((res) => {
+              this.dataLoading = false;
               if (res.data.message == "") {
                 this.total = res.data.data.counts;
                 if(this.total){
@@ -534,6 +545,7 @@ export default {
                 end_time: this.queryInfo.end,
               }),
             }).then((res) => {
+              this.dataLoading = false;
               if (res.data.data.length !== 0) {
                 var data = res.data.data;
                 for (let item of data) {
@@ -568,6 +580,7 @@ export default {
                 page: this.queryInfo.page,
               }),
             }).then((res) => {
+              this.dataLoading = false;
               if (res.data.message == "") {
                 this.total = res.data.data.counts;
                 if(this.total){

+ 35 - 28
src/pages/plantGuard/plantProtection/baseComponents/equipHistoryDateQxz.vue

@@ -2,34 +2,36 @@
 <template>
   <div class="equipInfo">
     <DateSearch @dateChange="dateChange" ref="timeSearchRefs" @toggleSwitcState="toggleSwitcState"></DateSearch>
-    <div v-if="switcState">
-      <highcharts v-if="ChartData.length"
-        :options="options"
-      ></highcharts>
-      <div class="noDataClass" v-else>暂无数据</div>
-    </div>
-    <div v-if="!switcState">
-      <el-table :data="hisData" max-height="405" class="customTable" :header-row-class-name="tableth"  style="width: 100%">
-				<el-table-column
-					v-for="(item, index) in tableHead"
-					:key="index"
-					:width="item.property == 'date' ? '160px' : ''"
-					:label="item.label"
-          :fixed="item.property == 'date'?'left':false"
-					: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>
+    <div v-loading="dataLoading"  element-loading-background="rgba(0, 0, 0, 0.8)">
+      <div v-if="switcState">
+        <highcharts v-if="ChartData.length"
+          :options="options"
+        ></highcharts>
+        <div class="noDataClass" v-else>暂无数据</div>
+      </div>
+      <div v-if="!switcState">
+        <el-table :data="hisData" max-height="405" class="customTable" :header-row-class-name="tableth"  style="width: 100%">
+          <el-table-column
+            v-for="(item, index) in tableHead"
+            :key="index"
+            :width="item.property == 'date' ? '160px' : ''"
+            :label="item.label"
+            :fixed="item.property == 'date'?'left':false"
+            :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>
+      </div>
     </div>
     
   </div>
@@ -66,6 +68,7 @@ export default {
       // 动态表头
 			tableHead: [],
       hisData:[],
+      dataLoading:false,
     };
   },
   //监听属性 类似于data概念
@@ -192,6 +195,7 @@ export default {
     },
     //获取图表历史数据
 		getEchartsHisDataList() {
+      this.dataLoading = true;
 			this.$axios({
 				method: 'POST',
 				url: '/api/api_gateway?method=weather.weather.qxz_data_chart',
@@ -202,6 +206,7 @@ export default {
 				})
 			})
 				.then((res) => {
+          this.dataLoading = false;
 					this.echartsFn(res.data.data)
 				})
 				.catch((err) => {
@@ -248,6 +253,7 @@ export default {
 
 		},
     getHisDataList() {
+      this.dataLoading = true;
 			this.$axios({
 				method: 'POST',
 				url: '/api/api_gateway?method=weather.weather.qxz_detail',
@@ -258,6 +264,7 @@ export default {
 					device_id: this.equipId
 				})
 			}).then((res) => {
+        this.dataLoading = false;
 				this.total = Number(res.data.data.nums)
 				if (res.data.data.nums > 0) {
 					let arr1 = [{ label: '日期', property: 'date' }]

+ 118 - 56
src/pages/plantGuard/sysManage/userManage.vue

@@ -48,11 +48,28 @@
           </div>
         </template>
         <template v-slot:right-search>
-          <el-button type="blueInfo" size="small" @click="addUser()">添加新用户</el-button>
+			<el-button :type="tableRadio?'blueInfo':'grayInfo'" size="mini" title="充值" @click="recharge()">
+                充值
+              </el-button>
+			  <el-button :type="tableRadio?'blueInfo':'grayInfo'" size="mini" title="充值" @click="testUser()">
+                激活
+              </el-button>
+			  <el-button :type="tableRadio?'blueInfo':'grayInfo'" size="mini" title="充值" @click="edit()">
+                编辑
+              </el-button>
+			  <el-button :type="tableRadio?'blueInfo':'grayInfo'" size="mini" title="充值" @click="resetPassword()">
+                重置密码
+              </el-button>
+          	<el-button type="blueInfo" size="small" @click="addUser()">添加新用户</el-button>
         </template>
       </search-bar>
        <template>
         <el-table :data="userList" stripe style="width: 100%">
+			<el-table-column label="选择" fixed width="55">
+				<template slot-scope="scope">
+					<el-radio  v-model="tableRadio" :label="scope.row"><i></i></el-radio>
+				</template>
+			</el-table-column>
           <el-table-column prop="username" width="150" fixed label="用户名称"></el-table-column>
           <el-table-column prop="role_name" label="用户角色">
           </el-table-column>
@@ -75,20 +92,20 @@
           <el-table-column prop="expire_time" width="200" label="到期时间">
               <template slot-scope="scope">{{ ( scope.row.expire_time * 1000) | formatTime }}</template>
           </el-table-column>
-          <el-table-column prop label="操作" fixed="right" width="450">
+          <el-table-column prop label="操作" fixed="right" width="250">
             <template slot-scope="scope">
               <el-button type="blueInfo" size="mini" title="一键登录" plain @click="login(scope.row.uid, scope.row.username)">
                 一键登录
               </el-button>
-              <el-button type="greenInfo" v-if="scope.row.user_type!=3" size="mini" title="分配设备" plain @click="distribute(scope.row.uid, scope.row.username)">
+              <el-button type="orangeInfo" v-if="scope.row.user_type!=3" size="mini" title="分配设备" plain @click="distribute(scope.row.uid, scope.row.username)">
                 分配设备
               </el-button>
-              <el-button type="redInfo" size="mini" title="充值" plain @click="recharge(scope.row.uid)">
+              <!-- <el-button type="redInfo" size="mini" title="充值" plain @click="recharge(scope.row.uid)">
                 充值
-              </el-button>
-              <el-button type="blueInfo" size="mini" title="编辑" plain @click="edit(scope.row)">
+              </el-button> -->
+              <!-- <el-button type="blueInfo" size="mini" title="编辑" plain @click="edit(scope.row)">
                 编辑
-              </el-button>
+              </el-button> -->
               <template v-if="scope.row.state == 1">
                 <el-button type="greenInfo" size="mini" title="禁用" plain @click="forbidUse(scope.row.uid,4, '确认禁用该用户?')">
                   禁用
@@ -99,9 +116,9 @@
                   恢复
                 </el-button>
               </template>
-              <el-button type="blueInfo" size="mini" title="重置密码" plain @click="resetPassword(scope.row.uid, scope.row.username)">
+              <!-- <el-button type="blueInfo" size="mini" title="重置密码" plain @click="resetPassword(scope.row.uid, scope.row.username)">
                 重置密码
-              </el-button>
+              </el-button> -->
             </template>
             
           </el-table-column>
@@ -481,6 +498,7 @@ export default {
         this.page = 1
         this.getList()
       },
+	  tableRadio:'',
     };
   },
   //监听属性 类似于data概念
@@ -510,7 +528,7 @@ export default {
         url: "/api/api_gateway?method=user.login.users_info",
         data: this.qs.stringify({
           role_id: this.role,
-          page_size: 8,
+          page_size: 10,
           user_type: this.userTypeCheck,
           page: this.page,
           username: this.username,
@@ -638,19 +656,26 @@ export default {
 			})
     },
     // 编辑用户信息
-		edit(role) {
-			console.log(role)
-			let data = JSON.stringify(role)
-			this.editUserForm = JSON.parse(data)
-			if (role.role_id == 0) {
-				//把0转换成""
-				this.editUserForm.role_id = ''
-      }
-      if (role.user_group_id=='0') {
-				//把0转换成""
-				this.editUserForm.user_group_id = ''
+		edit() {
+			if(this.tableRadio){
+				let data = JSON.stringify(this.tableRadio)
+				this.editUserForm = JSON.parse(data)
+				if (this.tableRadio.role_id == 0) {
+					//把0转换成""
+					this.editUserForm.role_id = ''
+				}
+				if (this.tableRadio.user_group_id=='0') {
+					//把0转换成""
+					this.editUserForm.user_group_id = ''
+				}
+				this.editUserDialogVisible = true
+			}else{
+				this.$message({
+					type: 'error',
+					message: '请先选择用户!'
+				})
 			}
-			this.editUserDialogVisible = true
+     
     },
     editUserDialogClosed() {
 			this.$refs.editUserFormRef.resetFields()
@@ -771,7 +796,8 @@ export default {
         })
 		this.$router.push('allotEquip')
 	},
-	recharge(id) {
+	recharge() {
+		if(this.tableRadio){
 			this.$confirm('是否向该用户充值一年费用?', '信息', {
 				confirmButtonText: '确定',
 				cancelButtonText: '取消',
@@ -782,7 +808,7 @@ export default {
 						method: 'POST',
 						url: '/api/api_gateway?method=user.login.user_add_package_time',
 						data: this.qs.stringify({
-							uid: id
+							uid: this.tableRadio.uid
 						})
 					}).then((res) => {
 						if (res.data.message == '') {
@@ -805,46 +831,82 @@ export default {
 						message: '充值取消!'
 					})
 				})
+		}else{
+			this.$message({
+				type: 'error',
+				message: '请先选择用户!'
+			})
+		}
+			
 	},
 	//密码重置
-	resetPassword(id, name) {
-		// this.resetPassForm.uid = id
-		// this.resetPassForm.username = name
-		// this.resetPassDialogVisible = true
-		this.$confirm('是否重置密码 ? 重置后的密码为 yf_123456', '提示', {
-			confirmButtonText: '确定',
-			cancelButtonText: '取消',
-			type: 'warning'
-		})
-			.then(() => {
-				this.$axios({
-					method: 'POST',
-					url: '/api/api_gateway?method=user.login.admin_changepwd',
-					data: this.qs.stringify({
-						uid: id
-					})
-				}).then((res) => {
-					if (res.data.message == '') {
-						this.$message({
-							type: 'success',
-							message: '操作成功!'
-						})
-						this.getList()
-					} else {
-						this.$message({
-							type: 'warning',
-							message: res.data.message
+	resetPassword() {
+		if(this.tableRadio){
+			this.$confirm('是否重置密码 ? 重置后的密码为 yf_123456', '提示', {
+				confirmButtonText: '确定',
+				cancelButtonText: '取消',
+				type: 'warning'
+			})
+				.then(() => {
+					this.$axios({
+						method: 'POST',
+						url: '/api/api_gateway?method=user.login.admin_changepwd',
+						data: this.qs.stringify({
+							uid: this.tableRadio.uid
 						})
-					}
+					}).then((res) => {
+						if (res.data.message == '') {
+							this.$message({
+								type: 'success',
+								message: '操作成功!'
+							})
+							this.getList()
+						} else {
+							this.$message({
+								type: 'warning',
+								message: res.data.message
+							})
+						}
+					})
 				})
-			})
-			.catch(() => {
+				.catch(() => {
 				this.$message({
 					type: 'info',
 					message: '取消重置密码!'
 				})
 			})
+		}else{
+			this.$message({
+				type: 'error',
+				message: '请先选择用户!'
+			})
+		}
 	},
+	testUser() {
+		if(this.tableRadio){
+			this.$axios({
+				method: "POST",
+				url: "/api/api_gateway?method=user.login.user_add_package_time",
+				data: this.qs.stringify({
+				uid:this.tableRadio.uid,
+				user_test: 1,
+				}),
+			}).then((res) => {
+				if (res.data.message == "") {
+				this.$message.success("激活成功");
+				this.getList();
+				} else {
+				this.$message.warning(res.data.message);
+				}
+			});
+		}else{
+			this.$message({
+				type: 'error',
+				message: '请先选择用户!'
+			})
+		}
+      
+    },
     
   },
   filters: {
@@ -889,10 +951,10 @@ export default {
     text-align: center;
 }
 /deep/.el-table th{
-    background-color: #f6f6f6;
+    background-color: #232733;
 }
 /deep/.el-table thead{
-    color: #373737;
+    color: #fff;
 }
 .greenState{
   color: green;