Jelajahi Sumber

架构设置

wy 1 tahun lalu
induk
melakukan
ea4b546d62
32 mengubah file dengan 121 tambahan dan 5792 penghapusan
  1. 1 1
      .env.development
  2. 6 8
      src/layout/components/Navbar.vue
  3. 12 146
      src/router/index.js
  4. 13 0
      src/views/Real-time-image/index.vue
  5. 0 0
      src/views/current-alarm/index.scss
  6. 88 124
      src/views/current-alarm/index.vue
  7. 1 0
      src/views/equipment-monitoring/components/StorageInfo.vue
  8. TEMPAT SAMPAH
      src/views/manage-log/assets/c1.png
  9. TEMPAT SAMPAH
      src/views/manage-log/assets/c2.png
  10. TEMPAT SAMPAH
      src/views/manage-log/assets/c3.png
  11. TEMPAT SAMPAH
      src/views/manage-log/assets/c4.png
  12. 0 342
      src/views/manage-log/battery-charger.vue
  13. 0 356
      src/views/manage-log/bms.vue
  14. 0 285
      src/views/manage-log/change-record.vue
  15. 0 90
      src/views/manage-log/components/ControlBox.vue
  16. 0 188
      src/views/manage-log/control.vue
  17. 0 337
      src/views/manage-log/data-export.vue
  18. 0 169
      src/views/manage-log/log.scss
  19. 0 378
      src/views/manage-log/robot.vue
  20. 0 12
      src/views/permission/DetailList.vue
  21. 0 385
      src/views/permission/car-manage/index.vue
  22. 0 181
      src/views/permission/cartype-manage/index.vue
  23. 0 32
      src/views/permission/components/SwitchRoles.vue
  24. 0 60
      src/views/permission/components/TabMain.vue
  25. 0 556
      src/views/permission/directive.vue
  26. 0 181
      src/views/permission/driver-manage/index.vue
  27. 0 305
      src/views/permission/now-alarm/index.vue
  28. 0 194
      src/views/permission/page.vue
  29. 0 210
      src/views/permission/rate/index.vue
  30. 0 330
      src/views/permission/role.vue
  31. 0 166
      src/views/permission/updatepwd.vue
  32. 0 756
      src/views/statistical-analysis/index.vue

+ 1 - 1
.env.development

@@ -4,4 +4,4 @@ ENV = 'development'
 # base api
 VUE_APP_BASE_API = 'http://192.168.3.177:8080/api'
 VUE_APP_WS = 'ws://192.168.3.177:8080/ws'
-# VUE_APP_VIDEO = 'ws://192.168.3.110:8082/ws'
+VUE_APP_VIDEO = 'ws://192.168.3.177:8082/ws'

+ 6 - 8
src/layout/components/Navbar.vue

@@ -4,11 +4,8 @@
     <div class="stationNo">No.{{stationNo || '—'}}</div>
     <div class="left-menu">
       <div v-for="(item, index) in PermissionList" :key="index">
-        <router-link :to="item.path" :class="{'routerlink':index === 3 || index === 4}">
-          <svg-icon :icon-class="index === 3 || index === 4 || index === 5 ? item.meta.icon : item.children[0].meta.icon"/>
-          <svg-icon :icon-class="index === 3 || index === 4 || index === 5 ? item.meta.icon+'_active' : item.children[0].meta.icon+'_active'" class="iconacive"/>
-          <span>{{index === 3 || index === 4 || index === 5 ? item.meta.title : item.children[0].meta.title}}</span>
-          <i class="el-submenu__icon-arrow el-icon-arrow-down" v-if="index === 3 || index === 4"></i>
+        <router-link :to="item.path">
+          <span>{{item.children[0].meta.title}}</span>
         </router-link>
       </div>
     </div>
@@ -112,7 +109,7 @@ export default {
   },
   methods: {
     goToAlarm(){
-      this.$router.push({path:"/permission/now-alarm"})
+      // this.$router.push({path:"/permission/now-alarm"})
     },
     //获取换电站编号
     getStationCode(){
@@ -161,9 +158,10 @@ export default {
     },
     //菜单路由
     menuList(){
-      //console.log(this.permission_routes);
+      
       // this.PermissionList = this.permission_routes.slice(5, 11);
-      this.PermissionList = this.permission_routes.slice(5,10);
+      this.PermissionList = this.permission_routes.slice(5,11);
+      console.log(this.PermissionList,'999999');
     },
     //当前时间
     timer() {

+ 12 - 146
src/router/index.js

@@ -64,170 +64,36 @@ export const constantRoutes = [
     ]
   },
   {
-    path: '/statistical-analysis',
+    path: '/current-alarm',
     component: Layout,
     children: [
       {
         path: '',
-        component: () => import('@/views/statistical-analysis/index'),
+        component: () => import('@/views/current-alarm/index'),
         name: 'StatisticalAnalysis',
         meta: { title: '统计分析', icon: 'tjfx', noCache: true }
       }
     ]
   },
-
-]
-
-/**
- * asyncRoutes
- * the routes that need to be dynamically loaded based on user roles
- */
-export const asyncRoutes = [
   {
-    path: '/permission',
+    path: '/Real-time-image',
     component: Layout,
-    redirect: '/permission/page',
-    name: 'Permission',
-    meta: {
-      title: '站控管理',
-      icon: 'zkgl',
-      roles: ['admin', 'manage'] // you can set roles in root nav
-    },
     children: [
       {
-        path: 'page',
-        component: () => import('@/views/permission/page'),
-        name: 'PagePermission',
-        meta: {title: '充电记录'}
-      },
-      {
-        path: 'directive',
-        component: () => import('@/views/permission/directive'),
-        name: 'DirectivePermission',
-        meta: {title: '换电记录'}
-      },
-      {
-        path: 'now-alarm',
-        component: () => import('@/views/permission/now-alarm/index'),
-        name: 'NowAlarm',
-        meta: {title: '当前告警'}
-      },
-      {
-        path: 'record-alarm',
-        component: () => import('@/views/permission/record-alarm/index'),
-        name: 'RecordAlarm',
-        meta: {title: '告警记录'}
-      },
-      {
-        path: 'car-manage',
-        component: () => import('@/views/permission/car-manage/index'),
-        name: 'CarManage',
-        meta: {title: '车辆管理'}
-      },
-      {
-        path: 'rate',
-        component: () => import('@/views/permission/rate/index'),
-        name: 'Rate',
-        meta: {title: '费率'}
-      },
-    
-      // {
-      //   path: 'cartype-manage',
-      //   component: () => import('@/views/permission/cartype-manage/index'),
-      //   name: 'CarTypeManage',
-      //   meta: {title: '车型管理'}
-      // },
-      // {
-      //   path: 'driver-manage',
-      //   component: () => import('@/views/permission/driver-manage/index'),
-      //   name: 'DriverManage',
-      //   meta: {title: '司机管理'}
-      // },
-      {
-        path: 'role',
-        component: () => import('@/views/permission/role'),
-        name: 'RolePermission',
-        meta: {
-          title: '账号管理',
-          roles: ['admin']
-        }
-      },
-      {
-        path: 'updatepwd',
-        hidden: true,
-        component: () => import('@/views/permission/updatepwd'),
-        name: 'UpdatePassword',
-        meta: {title: '修改密码'}
-      }
-    ]
-  },
-  {
-    path: '/manage-log',
-    component: Layout,
-    redirect: '/manage-log/robot',
-    name: 'ManageLog',
-    meta: {
-      title: '日志管理',
-      icon: 'rzgl'
-    },
-    children: [
-      {
-        path: 'robot',
-        component: () => import('@/views/manage-log/robot'),
-        name: 'Robot',
-        meta: { title: '机器人' }
-      },
-      {
-        path: 'battery-charger',
-        component: () => import('@/views/manage-log/battery-charger'),
-        name: 'BatteryCharger',
-        meta: { title: '充电机' }
-      },
-      {
-        path: 'bms',
-        component: () => import('@/views/manage-log/bms'),
-        name: 'Bms',
-        meta: { title: 'BMS' }
-      },
-      {
-        path: 'change-record',
-        component: () => import('@/views/manage-log/change-record'),
-        name: 'ChangeRecord',
-        meta: { title: '换电记录' }
-      },
-      {
-        path: 'data-export',
-        component: () => import('@/views/manage-log/data-export'),
-        name: 'DataExport',
-        meta: { title: '数据导出' }
-      },
-      // {
-      //   path: 'control',
-      //   component: () => import('@/views/manage-log/control'),
-      //   name: 'Control',
-      //   meta: { title: '机器人实时数据'}
-      // },
-    ]
-  },
-  {
-    path: '/control-config',
-    component: Layout,
-    redirect: '/control-config/setFile',
-    name: 'ControlConfig',
-    meta: {title: '站控配置',icon: 'kzpz'},
-    children: [
-      {
-        path: 'setfile',
-        component: () => import('@/views/control-config/setFile'),
-        name: 'SetFile',
-        meta: { title: '消防配置'}
+        path: '',
+        component: () => import('@/views/Real-time-image/index'),
+        name: 'RealTimeImage',
+        meta: { title: '实时影像', icon: 'tjfx',}
       }
     ]
   },
-  // 404 page must be placed at the end !!!
-  { path: '*', redirect: '/404', hidden: true }
 ]
 
+/**
+ * asyncRoutes
+ * the routes that need to be dynamically loaded based on user roles
+ */
+
 const createRouter = () => new Router({
   // mode: 'history', // require service support
   scrollBehavior: () => ({ y: 0 }),

+ 13 - 0
src/views/Real-time-image/index.vue

@@ -0,0 +1,13 @@
+<template>
+  <div>123456</div>
+</template>
+
+<script>
+export default {
+
+}
+</script>
+
+<style>
+
+</style>

+ 0 - 0
src/views/permission/permission.scss → src/views/current-alarm/index.scss


+ 88 - 124
src/views/permission/record-alarm/index.vue → src/views/current-alarm/index.vue

@@ -10,7 +10,7 @@
           <el-form-item label="告警信息:">
             <el-input placeholder="请输入告警信息" v-model.trim="queryParams.info" clearable></el-input>
           </el-form-item>
-          <el-form-item label="告警状态:">
+          <!-- <el-form-item label="告警状态:">
             <el-select v-model="queryParams.state" clearable placeholder="请选择状态">
               <el-option label="待处理" value="0"></el-option>
               <el-option label="处理中" value="1"></el-option>
@@ -29,8 +29,8 @@
               value-format="yyyy-MM-dd"
             >
             </el-date-picker>
-          </el-form-item>
-
+          </el-form-item> -->
+  
           <el-form-item label="告警类型:">
             <el-select v-model="queryParams.type" clearable placeholder="请选择类型">
               <el-option label="充电机告警" value="1"></el-option>
@@ -39,7 +39,7 @@
               <el-option label="消防告警" value="4"></el-option>
             </el-select>
           </el-form-item>
-
+  
           <el-form-item>
             <el-button type="primary" @click="handleQuery" class="serch actve">查询</el-button>
           <el-button type="primary" @click="resetForm" class="serch">重置</el-button>
@@ -48,9 +48,7 @@
         </el-form>
       </div>
       <div class="charge-table">
-        <div class="charge-table-top">
-          <el-button type="primary" @click="alarmExport" class="daochu">导出结果</el-button>
-        </div>
+       
         <div class="charge-table-bottom">
           <el-table
             :data="datalist"
@@ -91,13 +89,13 @@
               sortable
               >
             </el-table-column>
-            <el-table-column
+            <!-- <el-table-column
               prop="endTime"
               label="告警结束时间"
               sortable
               >
-            </el-table-column>
-            <el-table-column label="告警状态">
+            </el-table-column> -->
+            <!-- <el-table-column label="告警状态">
                 <template slot-scope="scope">
                   <template v-if="scope.row.state === 0">
                     <el-badge is-dot class="item nostate">待处理</el-badge>
@@ -109,12 +107,12 @@
                     <el-badge is-dot class="item">已处理</el-badge>
                   </template>
                 </template>
-            </el-table-column>
-            <!-- <el-table-column label="操作" width="100" align="center">
+            </el-table-column> -->
+            <el-table-column label="操作" width="100" align="center">
               <template slot-scope="scope">
-                <el-button type="primary" class="handle" size="small" @click="handlealarm(scope.row)">处理</el-button>
+                <el-button type="primary" class="handle" size="small" @click="handlealarm(scope.row)">消防换仓</el-button>
               </template>
-            </el-table-column> -->
+            </el-table-column>
           </el-table>
         </div>
         
@@ -130,53 +128,36 @@
         </el-pagination>
         </div>
       </div>
-
+  
       <!--处理告警弹窗-->
-      <!-- <div class="rolemanage alarmFrom">
+      <div class="rolemanage alarmFrom">
         <el-dialog 
-        title="告警处理" 
+        title="消防告警处理" 
         :visible.sync="dialogAlarmVisible" 
         :destroy-on-close="true"
         >
-          <el-form 
-          :model="alarmFrom" 
-          v-loading="loading"
-          :rules="rules"
-          ref="ruleForm"
-          >
-            <el-form-item label="告警设备:" :label-width="formLabelWidth">
-              <span>{{alarmFrom.equipment}}</span>
-            </el-form-item>
-            <el-form-item label="告警信息:" :label-width="formLabelWidth">
-              <span>{{alarmFrom.info}}</span>
-            </el-form-item>
-            <el-form-item label="告警开始时间:" :label-width="formLabelWidth">
-              <span>{{alarmFrom.beginTime}}</span>
-            </el-form-item>
-            <el-form-item label="处理:" :label-width="formLabelWidth" style="margin-bottom:10px">
-              <el-select v-model="alarmFrom.state" placeholder="请选择状态">
-                <el-option label="处理中" value="1"></el-option>
-                <el-option label="已处理" value="2"></el-option>
-              </el-select>
-            </el-form-item>
-            <el-form-item label="说明:" :label-width="formLabelWidth" prop="remark">
-              <el-input type="textarea" :rows="4" placeholder="请输入说明,30字以内" maxlength="30" v-model="alarmFrom.remark">
-              </el-input>
-            </el-form-item>
-          </el-form>
+        <div class="drawer_main_title">
+                              系统检测到【电池/架载机】发生了消防问题,确认需要抓取电池吗?
+                          </div>
+                          <div class="drawer_main_tip">
+                              <span>确认消防换仓:</span>机器人执行消防换仓动作。
+                          </div>
+                          <div class="drawer_main_tip">
+                              <span>忽略:</span>放弃消防换仓。
+                          </div>
           <div slot="footer" class="dialog-footer">
-            <el-button @click="dialogAlarmVisible = false" class="exit">取 消</el-button>
-            <el-button type="primary" @click="alarmDispose" class="save">确 定</el-button>
+            <el-button type="primary" @click="alarmDispose" class="saveOk">确认消防换仓</el-button>
+            <el-button @click="dialogAlarmVisible = false" class="exit">忽略</el-button>
           </div>
         </el-dialog>
-      </div> -->
+      </div>
       <!--处理告警弹窗结束-->
     </div>
   </template>
   
   <script>
-  import '../permission.scss';
-  import { alarmList,alarmExport,alarmDispose,RecordFile } from "@/api/records";
+  import './index.scss';
+  import { alarmList,alarmDispose,RecordFile,getrealList,FireChangestorage } from "@/api/records";
   export default {
     name: "RecordAlarm",
     components: {},
@@ -210,12 +191,6 @@
         tableheight:0,//表格高度设置
         dialogAlarmVisible:false,//弹窗状态
         alarmFrom:{
-          id:0,
-          remark:null,
-          state:undefined,
-          equipment:undefined,
-          info:undefined,
-          beginTime:undefined,
         },
         formLabelWidth: '120px',
         loading:false,
@@ -230,25 +205,23 @@
       //告警记录列表,
       alarmList(){
         const params=this.queryParams
-        alarmList(params).then(res=>{
+        getrealList(params).then(res=>{
           if(res.code == 0){
-            res.data.records.forEach(item=>{
-							if(item.type == 1){
-								item.type = '充电机告警'
-							}else if(item.type == 2){
-								item.type = 'BMS告警'
-							}else if(item.type == 3){
-								item.type = '机器人告警'
-							}else if(item.type == 4){
-								item.type = '消防告警'
-							}
-              if(!item.endTime){
-                item.endTime = '-'
+            res.data.list.forEach(item=>{
+              if(item.type == 1){
+                item.type = '充电机告警'
+              }else if(item.type == 2){
+                item.type = 'BMS告警'
+              }else if(item.type == 3){
+                item.type = '机器人告警'
+              }else if(item.type == 4){
+                item.type = '消防告警'
               }
-						})
-          }
-          this.datalist =res.data.records
+            })
+            this.datalist =res.data.list
           this.total=res.data.total
+          }
+         
         });
       },
       /**分页下一页 */
@@ -279,63 +252,54 @@
         this.queryParams.equipment = undefined
         this.queryParams.info = undefined
         this.queryParams.type = undefined
-        this.queryParams.remark = null
         this.dateArr.alarmDate=[]
         this.alarmList()
       },
-      //导出结果
-      alarmExport(){
-        this.$confirm('确认导出结果?', '导出结果', {
-          confirmButtonText: '确认',
-          cancelButtonText: '取消',
-          type: 'warning'
-        })
-        .then(async() => {
-            const res = await alarmExport(this.queryParams)
-            // const execlUrl=process.env.VUE_APP_BASE_API+'/excel/'+res.data
-            // window.open(execlUrl,'_blank')
-            const execlUrl=process.env.VUE_APP_BASE_API+'/excel/'+res.data
-            const resUrl=await RecordFile(execlUrl, res.data)
-          })
-        .catch(err => { console.error(err) })
-      },
+   
       //告警状态弹窗
-      // handlealarm(row){
-      //   if(row.state === 0)
-      //   {
-      //     this.alarmFrom.state=undefined
-      //   }else{
-      //     this.alarmFrom.state=row.state+'';
-      //   }
-      //   this.alarmFrom.id=row.id;
-      //   this.alarmFrom.equipment=row.equipment;
-      //   this.alarmFrom.info=row.info;
-      //   this.alarmFrom.beginTime=row.beginTime;
-      //   this.alarmFrom.remark=row.remark;
-      //   this.dialogAlarmVisible=true;
-      // },
-      // //处理告警
-      // alarmDispose(){
-      //   const params={
-      //     id:this.alarmFrom.id,
-      //     state:this.alarmFrom.state,
-      //     remark:this.alarmFrom.remark
-      //   }
-      //   alarmDispose(params).then(res=>{
-      //     if(res.code === 0){
-      //       this.loading = false;
-      //       this.dialogAlarmVisible = false;
-      //       this.$message({
-      //         type: 'success',
-      //         message: '操作成功!'
-      //       })
-      //       this.alarmList()
-      //     }else {
-      //       this.loading = false;
-      //       return this.$message.error(res.msg);
-      //     }
-      //   })
-      // },
+      handlealarm(row){
+        this.alarmFrom=row;
+        this.dialogAlarmVisible=true;
+      },
+      //处理告警
+      alarmDispose(){
+        const params={
+          targetCode: this.alarmFrom.chargerCode,
+        }
+        // FireChangestorage(params).then(res=>{
+        //   if(res.code === 0){
+        //     this.loading = false;
+        //     this.dialogAlarmVisible = false;
+        //     this.$message({
+        //       type: 'success',
+        //       message: '操作成功!'
+        //     })
+        //     this.alarmList()
+        //   }else {
+        //     this.loading = false;
+        //     return this.$message.error(res.msg);
+        //   }
+        // })
+      },
     },
   };
-  </script>
+  </script>
+  <style lang="scss" scoped>
+  .saveOk{
+    width: 150px;
+    height: 36px;
+    line-height: 36px;
+    text-align: center;
+  }
+          .drawer_main_title{
+              font-size: 16px;
+          }
+          .drawer_main_tip{
+              font-size: 14px;
+              margin-top: 20px;
+              span{
+                  font-size: 16px;
+              }
+          }
+    
+  </style>

+ 1 - 0
src/views/equipment-monitoring/components/StorageInfo.vue

@@ -505,6 +505,7 @@ export default {
 
         .top {
             height: 340px;
+            border-top: none;
         }
 
         .container-header {

TEMPAT SAMPAH
src/views/manage-log/assets/c1.png


TEMPAT SAMPAH
src/views/manage-log/assets/c2.png


TEMPAT SAMPAH
src/views/manage-log/assets/c3.png


TEMPAT SAMPAH
src/views/manage-log/assets/c4.png


+ 0 - 342
src/views/manage-log/battery-charger.vue

@@ -1,342 +0,0 @@
-<template>
-    <div class="charge-box">
-      <div class="charge-tools">
-        <el-form :inline="true" :model="queryParams">
-          <el-form-item label="日志范围:" style="margin-left: 35px">
-            <el-select 
-              multiple
-              v-model="robotValue" 
-              clearable 
-              placeholder="请选择"
-              @change="changeSelect"
-              collapse-tags
-              @remove-tag="removeTag"
-            >
-              <el-option label="全选" value="全选" @click.native="selectAll"></el-option>
-              <el-option
-                v-for="item in logOptions"
-                :key="item.alarmCode"
-                :label="item.alarmName"
-                :value="item.alarmCode"
-              />
-            </el-select>
-          </el-form-item>
-          
-          <el-form-item label="充电机ID:" style="margin-left: 35px">
-          <el-select v-model="queryParams.deviceNo" clearable placeholder="请选择">
-            <el-option
-              v-for="item in chargerArr"
-              :key="item.value"
-              :label="item+'号充电机'"
-              :value="item"
-            />
-          </el-select>
-          </el-form-item>
-
-          <el-form-item label="时间范围:" style="margin-left: 50px">
-            <el-date-picker
-              v-model="dateTime"
-              class="times"
-              type="datetimerange"
-              range-separator="至"
-              start-placeholder="开始时间"
-              end-placeholder="结束时间"
-              format="yyyy-MM-dd HH:mm:ss"
-            />
-          </el-form-item>
-  
-          <el-form-item>
-            <el-button type="primary" class="serch actve" @click="handleQuery">查询</el-button>
-            <el-button type="primary" class="serch" @click="resetForm">重置</el-button>
-          </el-form-item>
-  
-        </el-form>
-      </div>
-  
-      <div class="charge-table">
-        <div class="charge-table-top">
-          <el-button type="primary" class="daochu" @click="chargeExport">导出结果</el-button>
-        </div>
-        <div class="charge-table-bottom">
-          <el-table
-            :data="datalist"
-            :header-cell-style="{
-              background: '#1d283e',
-              borderColor: '#2f3c86',
-              height: '36px',
-              lineHeight: '36px',
-              color:'white',
-              fontSize: '15px',
-            }"
-            stripe
-            fit
-            :height="tableheight"
-            style="width: 100%"
-            ref="tblist"
-            v-loading="loading"
-          >
-          <el-table-column
-            prop="time"
-            label="发生时间"
-            fixed
-            width="150"
-            v-if="logheader.length"
-            >
-          </el-table-column>
-          <el-table-column
-            prop="deviceNo"
-            label="充电机ID"
-            fixed
-            width="150"
-            v-if="logheader.length"
-            >
-          </el-table-column>
-          <el-table-column v-for="log in logheader" :key="log.alarmCode" :label="log.alarmName" :render-header="labelHead">
-            <template slot-scope="scope">
-              {{ scope.row[log.alarmCode] }}
-            </template>
-          </el-table-column>
-          </el-table>
-        </div>
-        <div class="pageblock">
-          <el-pagination
-            :current-page="queryParams.page"
-            :page-sizes="[10, 20, 30, 40]"
-            :page-size="queryParams.pageSize"
-            layout="total, sizes, prev, pager, next, jumper"
-            :total="total"
-            @size-change="handleSizeChange"
-            @current-change="handleCurrentChange"
-          />
-        </div>
-      </div>
-      <!--导出弹窗-->
-      <div class="rolemanage chargeshow">
-        <el-dialog
-          title="生成导出任务"
-          :visible.sync="dialogExportVisible"
-          :destroy-on-close="true"
-        >
-          <div class="setExport">
-            <el-form :model="ruleForm" :rules="rules" ref="ExportForm">
-              <el-form-item label="任务名称" prop="exportName">
-                <el-input v-model="ruleForm.exportName" placeholder="请输入任务名称"></el-input>
-              </el-form-item>
-              <el-form-item>
-                <el-button type="primary" @click="AddExport">生成</el-button>
-              </el-form-item>
-            </el-form>
-            <div class="descript">说明:导出任务生成后,你可以在数据导出列表中进行查询和下载</div>
-          </div>
-        </el-dialog>
-      </div>
-      <!--导出弹窗结束-->
-    </div>
-  </template>
-  
-  <script>
-  import './log.scss'
-  import { getChargeCode } from '@/api/records'
-  import { chargerModel,chargerList,exportFile } from '@/api/log'
-  export default {
-    name: 'BatteryCharger',
-    components: {},
-    data() {
-      return {
-        // 查询时间数组
-        dateTime: '',
-        // 充电机ID下拉列表
-        chargerArr: null,
-        // 数据列表
-        datalist: [],
-        // 查询参数
-        queryParams: {
-          page: 1, // 当前页
-          pageSize: 10, // 每页条数
-          deviceNo: undefined, // 充电机ID
-          endTime: undefined, // 电池编号
-          signals: undefined, // 排序字段
-          startTime: undefined,// 排序方式
-          sort:1
-        },
-        total: 0, // 总条数,
-        tableheight: 0, // 表格高度设置
-        dialogExportVisible: false, // 弹窗显示
-        checked: false,
-        indeterminate: false,
-        robotValue:'',
-        logOptions: [],
-        logheader:[],
-        heightTimer:false,
-        loading: false,
-        ruleForm:{
-          exportName:undefined,
-        },
-        rules:{
-          exportName: [
-              { required: true, message: '请输入任务名称', trigger: 'blur' },
-              { min: 2, max: 20, message: '长度在 2 到 20 个字符', trigger: 'blur' }
-            ],
-        }
-      }
-    },
-    mounted() {
-      this.getChargeCode()
-      this.onLoadHeight()
-      this.changeWindow()
-      this.getLogModel()
-      this.getchargerList()
-    },
-    methods: {
-      labelHead(h,{column,index}){
-        let l = column.label.length;
-        let f = 30;
-        if (l <= 3) {
-          f = 30;
-        }
-        if ( column.label == "sn") {
-          column.minWidth = f * l + 100;
-        } else {
-          column.minWidth = f * l;
-        }
-        return h("div", { class: "table-head", style: { minWidth: "100%" } }, [
-          column.label,
-        ]);
-      },
-      // 获取充电机ID
-      getChargeCode() {
-        getChargeCode().then(res => {
-          this.chargerArr = res.data
-        })
-      },
-      selectAll() {
-        if (this.robotValue.length < this.logOptions.length) {
-          this.robotValue = [];
-          this.logOptions.map((item) => {
-            this.robotValue.push(item.alarmCode);
-          });
-          this.robotValue.unshift("全选");
-        } else {
-          this.robotValue = [];
-        }
-      },
-      changeSelect(val) {
-        if (!val.includes("全选") && val.length === this.logOptions.length) {
-          this.robotValue.unshift("全选");
-        } else if (val.includes("全选") && val.length - 1 < this.logOptions.length) {
-          this.robotValue = this.robotValue.filter((item) => {
-            return item !== "全选";
-          });
-        }
-      },
-      removeTag(val) {
-        if (val === "全选") {
-          this.robotValue = [];
-        }
-      },
-      //获取充电机日志列表
-      getchargerList(){
-        this.loading=true;
-        chargerList(this.queryParams).then( res =>{
-          this.datalist= res.data.list
-          this.total=res.data.total
-          this.$nextTick(()=>{
-            this.$refs.tblist.doLayout();
-          })
-          this.loading=false;
-        })
-      },
-      //获取日志数据字典
-      getLogModel(){
-        chargerModel().then( res =>{
-          this.logOptions= res.data
-          this.logheader=res.data
-          this.$nextTick(()=>{
-            this.$refs.tblist.doLayout();
-          })
-        })
-      },
-      /** 分页下一页 */
-      handleSizeChange(val) {
-        this.queryParams.pageSize = val
-        this.getchargerList()
-      },
-      /** 分页选择页数 */
-      handleCurrentChange(val) {
-        this.queryParams.page = val
-        this.getchargerList()
-      },
-      // 搜索
-      handleQuery() {
-        if(this.dateTime || this.robotValue.length > 0 || this.queryParams.deviceNo != undefined){
-          if (this.dateTime) {
-            this.queryParams.startTime = this.$moment(this.dateTime[0]).format('YYYY-MM-DD HH:mm:ss')
-            this.queryParams.endTime = this.$moment(this.dateTime[1]).format('YYYY-MM-DD HH:mm:ss')
-          }
-          if(this.robotValue.length > 0){
-            this.queryParams.signals=this.robotValue
-            let differenceABSet = Array.from(new Set([...this.logOptions].filter(x => this.robotValue.includes(x.alarmCode))));
-            this.logheader=differenceABSet
-          }
-          this.getchargerList()
-        }else{
-          this.$message({
-            message: "请选择查询条件!",
-            type: "warning",
-            duration: 1000,
-            offset: 20,
-          });
-        }
-      },
-      // 搜索重置
-      resetForm() {
-        this.queryParams.startTime = undefined
-        this.queryParams.endTime = undefined
-        this.queryParams.signals = undefined
-        this.queryParams.deviceNo = undefined
-        this.dateTime = ''
-        this.robotValue = ''
-        this.queryParams.page = 1
-        this.queryParams.pageSize = 10
-        this.getchargerList()
-        this.getLogModel()
-      },
-      // 导出结果
-      chargeExport() {
-        this.dialogExportVisible=true
-      },
-      //生成报表
-      AddExport(){
-        this.$refs.ExportForm.validate((valid) => {
-            if (valid) {
-              let addParams={
-                exportName:this.ruleForm.exportName,
-                signals:this.robotValue,
-                deviceNo:this.queryParams.deviceNo,
-                startTime:this.queryParams.startTime,
-                endTime:this.queryParams.endTime,
-                exportLogType:2
-              }
-              exportFile(addParams).then( res =>{
-                console.log(res)
-                if(res.code === 0){
-                  this.dialogExportVisible = false;
-                  this.$router.push({path:"/manage-log/data-export"})
-                }else{
-                  this.$message({
-                    message: res.msg,
-                    type: "warning",
-                    duration: 1000,
-                    offset: 20,
-                  });
-                }
-              })
-            } else {
-              return false;
-            }
-          });
-      }
-    }
-  }
-  </script>
-  

+ 0 - 356
src/views/manage-log/bms.vue

@@ -1,356 +0,0 @@
-<template>
-    <div class="charge-box">
-      <div class="charge-tools">
-        <el-form :inline="true" :model="queryParams">
-          <el-form-item label="日志范围:" style="margin-left: 35px">
-            <el-select 
-              multiple
-              v-model="robotValue" 
-              clearable 
-              placeholder="请选择"
-              @change="changeSelect"
-              collapse-tags
-              @remove-tag="removeTag"
-            >
-              <el-option label="全选" value="全选" @click.native="selectAll"></el-option>
-              <el-option
-                v-for="item in logOptions"
-                :key="item.alarmCode"
-                :label="item.alarmName"
-                :value="item.alarmCode"
-              />
-            </el-select>
-          </el-form-item>
-          <el-form-item label="充电机ID:" style="margin-left: 35px">
-          <el-select v-model="queryParams.deviceNo" clearable placeholder="请选择">
-            <el-option
-              v-for="item in chargerArr"
-              :key="item.value"
-              :label="item+'号充电机'"
-              :value="item"
-            />
-          </el-select>
-          </el-form-item>
-          <el-form-item label="电池编号:" style="margin-left: 50px;">
-            <el-input v-model.trim="queryParams.sn" placeholder="请输入电池编号" clearable />
-          </el-form-item>
-          <el-form-item label="时间范围:" style="margin-left: 50px">
-            <el-date-picker
-              v-model="dateTime"
-              class="times"
-              type="datetimerange"
-              range-separator="至"
-              start-placeholder="开始时间"
-              end-placeholder="结束时间"
-              format="yyyy-MM-dd HH:mm:ss"
-            />
-          </el-form-item>
-  
-          <el-form-item>
-            <el-button type="primary" class="serch actve" @click="handleQuery">查询</el-button>
-            <el-button type="primary" class="serch" @click="resetForm">重置</el-button>
-          </el-form-item>
-  
-        </el-form>
-      </div>
-  
-      <div class="charge-table">
-        <div class="charge-table-top">
-          <el-button type="primary" class="daochu" @click="chargeExport">导出结果</el-button>
-        </div>
-        <div class="charge-table-bottom">
-          <el-table
-            :data="datalist"
-            :header-cell-style="{
-              background: '#1d283e',
-              borderColor: '#2f3c86',
-              height: '36px',
-              lineHeight: '36px',
-              color:'white',
-              fontSize: '15px',
-            }"
-            stripe
-            fit
-            :height="tableheight"
-            style="width: 100%"
-            ref="tblist"
-          >
-          <el-table-column
-            prop="time"
-            label="发生时间"
-            fixed
-            width="150">
-          </el-table-column>
-          <el-table-column
-            prop="deviceNo"
-            label="充电机ID"
-            fixed
-            width="150"
-            v-if="logheader.length"
-            >
-          </el-table-column>
-          <el-table-column
-            prop="sn"
-            label="电池编号"
-            fixed
-            width="150">
-          </el-table-column>
-          <el-table-column v-for="log in logheader" :key="log.alarmCode" :label="log.alarmName" :render-header="labelHead">
-            <template slot-scope="scope">
-              {{ scope.row[log.alarmCode] }}
-            </template>
-          </el-table-column>
-          </el-table>
-        </div>
-        <div class="pageblock">
-          <el-pagination
-            :current-page="queryParams.page"
-            :page-sizes="[10, 20, 30, 40]"
-            :page-size="queryParams.pageSize"
-            layout="total, sizes, prev, pager, next, jumper"
-            :total="total"
-            @size-change="handleSizeChange"
-            @current-change="handleCurrentChange"
-          />
-        </div>
-      </div>
-      <!--导出弹窗-->
-      <div class="rolemanage chargeshow">
-        <el-dialog
-          title="生成导出任务"
-          :visible.sync="dialogExportVisible"
-          :destroy-on-close="true"
-        >
-          <div class="setExport">
-            <el-form :model="ruleForm" :rules="rules" ref="ExportForm">
-              <el-form-item label="任务名称" prop="exportName">
-                <el-input v-model="ruleForm.exportName" placeholder="请输入任务名称"></el-input>
-              </el-form-item>
-              <el-form-item>
-                <el-button type="primary" @click="AddExport">生成</el-button>
-              </el-form-item>
-            </el-form>
-            <div class="descript">说明:导出任务生成后,你可以在数据导出列表中进行查询和下载</div>
-          </div>
-        </el-dialog>
-      </div>
-      <!--导出弹窗结束-->
-    </div>
-  </template>
-  
-  <script>
-  import './log.scss'
-  import { BmsModel,bmsList,exportFile } from '@/api/log'
-  import { getChargeCode } from '@/api/records'
-  export default {
-    name: 'Bms',
-    components: {},
-    data() {
-      return {
-        // 查询时间数组
-        dateTime: '',
-        // 充电机ID下拉列表
-        chargerArr: null,
-        // 数据列表
-        datalist: [],
-        // 查询参数
-        queryParams: {
-          page: 1, // 当前页
-          pageSize: 10, // 每页条数
-          deviceNo: undefined,
-          endTime: undefined, // 电池编号
-          signals: undefined, // 排序字段
-          startTime: undefined, // 排序方式
-          sn: undefined,
-          sort: 1,
-        },
-        total: 0, // 总条数,
-        tableheight: 0, // 表格高度设置
-        dialogExportVisible: false, // 弹窗显示
-        checked: false,
-        indeterminate: false,
-        robotValue:'',
-        logOptions: [],
-        logheader:[],
-        heightTimer:false,
-        loading: false,
-        ruleForm:{
-          exportName:undefined,
-        },
-        rules:{
-          exportName: [
-              { required: true, message: '请输入任务名称', trigger: 'blur' },
-              { min: 2, max: 20, message: '长度在 2 到 20 个字符', trigger: 'blur' }
-            ],
-        }
-      }
-    },
-    mounted() {
-      this.getChargeCode()
-      this.onLoadHeight()
-      this.changeWindow()
-      this.getLogModel()
-      this.getrobotList()
-    },
-    methods: {
-      labelHead(h,{column,index}){
-        let l = column.label.length
-        let f = 20
-        if(l <= 3){
-          f = 30
-        }else if(l >= 14){
-          f = 15
-        }
-        column.minWidth = f*l 
-        return h('div',{class:'table-head',style:{minWidth:'100%'}},[column.label])
-      },
-      selectAll() {
-        if (this.robotValue.length < this.logOptions.length) {
-          this.robotValue = [];
-          this.logOptions.map((item) => {
-            this.robotValue.push(item.alarmCode);
-          });
-          this.robotValue.unshift("全选");
-        } else {
-          this.robotValue = [];
-        }
-      },
-      changeSelect(val) {
-        if (!val.includes("全选") && val.length === this.logOptions.length) {
-          this.robotValue.unshift("全选");
-        } else if (val.includes("全选") && val.length - 1 < this.logOptions.length) {
-          this.robotValue = this.robotValue.filter((item) => {
-            return item !== "全选";
-          });
-        }
-      },
-      removeTag(val) {
-        if (val === "全选") {
-          this.robotValue = [];
-        }
-      },
-       // 获取充电机ID
-       getChargeCode() {
-        getChargeCode().then(res => {
-          this.chargerArr = res.data
-        })
-      },
-      //获取BMS日志列表
-      getrobotList(){
-        this.loading=true;
-        bmsList(this.queryParams).then( res =>{
-          this.datalist= res.data.list
-          this.total=res.data.total
-          this.$nextTick(()=>{
-            this.$refs.tblist.doLayout();
-          })
-          this.loading=false
-        })
-      },
-      //获取日志数据字典
-      getLogModel(){
-        BmsModel().then( res =>{
-          this.logOptions= res.data
-          this.logheader=res.data
-          this.$nextTick(()=>{
-            this.$refs.tblist.doLayout();
-          })
-        })
-      },
-      /** 分页下一页 */
-      handleSizeChange(val) {
-        this.queryParams.pageSize = val
-        this.getrobotList()
-      },
-      /** 分页选择页数 */
-      handleCurrentChange(val) {
-        this.queryParams.page = val
-        this.getrobotList()
-      },
-      // 搜索
-      handleQuery() {
-        console.log(this.queryParams.sn)
-        if (this.dateTime || this.robotValue.length > 0 || this.queryParams.sn || this.queryParams.deviceNo != undefined) {
-        if (this.dateTime) {
-          this.queryParams.startTime = this.$moment(this.dateTime[0]).format(
-            "YYYY-MM-DD HH:mm:ss"
-          );
-          this.queryParams.endTime = this.$moment(this.dateTime[1]).format(
-            "YYYY-MM-DD HH:mm:ss"
-          );
-        }
-        if (this.robotValue.length > 0) {
-          this.queryParams.signals = this.robotValue;
-          let differenceABSet = Array.from(
-            new Set(
-              [...this.logOptions].filter((x) =>
-                this.robotValue.includes(x.alarmCode)
-              )
-            )
-          );
-          this.logheader = differenceABSet;
-        }
-        this.getrobotList();
-        }else{
-          this.$message({
-            message: "请选择查询条件!",
-            type: "warning",
-            duration: 1000,
-            offset: 20,
-          });
-        }
-      },
-      // 搜索重置
-      resetForm() {
-        this.queryParams.startTime = undefined;
-        this.queryParams.endTime = undefined;
-        this.queryParams.signals = undefined;
-        this.queryParams.batteryNum = undefined;
-        this.queryParams.deviceNo = undefined;
-        this.queryParams.sn = "";
-        this.robotValue = "";
-        this.dateTime = "";
-        this.queryParams.page = 1;
-        this.queryParams.pageSize = 10;
-        this.getrobotList();
-        this.getLogModel();
-      },
-      // 导出结果
-      chargeExport() {
-        this.dialogExportVisible=true
-      },
-      //生成报表
-      AddExport(){
-        this.$refs.ExportForm.validate((valid) => {
-            if (valid) {
-              let addParams={
-                exportName:this.ruleForm.exportName,
-                signals:this.robotValue,
-                sn:this.queryParams.sn,
-                startTime:this.queryParams.startTime,
-                endTime:this.queryParams.endTime,
-                exportLogType:3
-              }
-              exportFile(addParams).then( res =>{
-                console.log(res)
-                if(res.code === 0){
-                  this.dialogExportVisible = false;
-                  this.$router.push({path:"/manage-log/data-export"})
-                }else{
-                  this.$message({
-                    message: res.msg,
-                    type: "warning",
-                    duration: 1000,
-                    offset: 20,
-                  });
-                }
-              })
-            } else {
-              return false;
-            }
-          });
-      }
-    }
-  }
-  </script>
-  

+ 0 - 285
src/views/manage-log/change-record.vue

@@ -1,285 +0,0 @@
-<template>
-  <div class="charge-box">
-    <div class="charge-tools">
-      <el-form :inline="true" :model="queryParams">
-        <el-form-item label="换电编号:">
-          <el-input v-model.trim="queryParams.swapId" placeholder="请输入换电编号" clearable />
-        </el-form-item>
-
-        <el-form-item label="车牌号:">
-          <el-input v-model.trim="queryParams.vehiclePlate" placeholder="请输入车牌号" clearable />
-        </el-form-item>
-
-        <el-form-item label="车辆识别码:">
-          <el-input v-model.trim="queryParams.PlateCode" placeholder="请输入车牌号" clearable />
-        </el-form-item>
-
-        <el-form-item label="时间范围:">
-          <el-date-picker v-model="dateTime" class="times" type="datetimerange" range-separator="至"
-            start-placeholder="开始时间" end-placeholder="结束时间" format="yyyy-MM-dd HH:mm:ss" />
-        </el-form-item>
-
-        <el-form-item>
-          <el-button type="primary" class="serch actve" @click="handleQuery">查询</el-button>
-          <el-button type="primary" class="serch" @click="resetForm">重置</el-button>
-        </el-form-item>
-      </el-form>
-    </div>
-
-    <div class="charge-table">
-      <div class="charge-table-bottom">
-        <el-table :data="datalist" :header-cell-style="{
-          background: '#1d283e',
-          borderColor: '#2f3c86',
-          color: 'white',
-        }" stripe fit :height="tableheight" style="width: 100%">
-          <el-table-column type="index" label="序号" width="55" />
-          <el-table-column prop="swapId" width="400" label="换电编号" />
-          <el-table-column prop="vehiclePlate" label="车牌号" />
-          <el-table-column prop="vehicleVin" label="车辆识别码" />
-          <el-table-column prop="swapBeginTime" width="180" label="换电开始时间" />
-          <el-table-column prop="swapEndTime" width="180" label="换电结束时间" />
-          <el-table-column prop="swapDuration" label="换电时长" />
-          <el-table-column label="操作" align="center" width="200">
-            <template v-if="scope.row.userAccount !== 'admin'" slot-scope="scope">
-              <el-button type="primary" class="handle" size="small" @click="handleSerch(scope.row)">日志查询</el-button>
-              <el-button type="primary" class="handle" size="small"
-                @click="handleExport(scope.row)">导出日志</el-button>
-            </template>
-          </el-table-column>
-        </el-table>
-      </div>
-      <div class="pageblock">
-        <el-pagination :current-page="queryParams.page" :page-sizes="[10, 20, 30, 40]" :page-size="queryParams.pageSize"
-          layout="total, sizes, prev, pager, next, jumper" :total="total" @size-change="handleSizeChange"
-          @current-change="handleCurrentChange" />
-      </div>
-    </div>
-
-    <!--导出弹窗-->
-    <div class="rolemanage">
-      <el-dialog :title="dialogType === 'find' ? '查看日志' : '导出日志'" :visible.sync="dialogexportVisible"
-        :destroy-on-close="true" @close="dialogClose">
-        <el-form :model="ruleForm" :rules="rules" ref="ExportForm" v-loading="loading">
-          <el-form-item label="任务名称:" prop="exportName" v-if="dialogType==='export'">
-            <el-input v-model="ruleForm.exportName" placeholder="请输入任务名称"></el-input>
-          </el-form-item>
-          <div class="checkFirst">
-            <div>日志范围:</div>
-            <template>
-              <el-form-item style="margin-left:8px; margin-top: 20px">
-                <el-select multiple v-model="robotValue" filterable clearable placeholder="全部" @change="changeSelect"
-                  collapse-tags @remove-tag="removeTag">
-                  <el-option label="全部" value="全部" @click.native="selectAll"></el-option>
-                  <el-option v-for="item in logOptions" :key="item.logCode" :label="item.logName"
-                    :value="item.logCode" />
-                </el-select>
-              </el-form-item>
-            </template>
-          </div>
-        </el-form>
-        <div slot="footer" class="dialog-footer">
-          <el-button type="primary" class="save" @click="handleExportLog">{{ dialogType==='find' ? '查看': '生成' }}</el-button>
-          <el-button class="exit" @click="dialogexportVisible = false">取消</el-button>
-        </div>
-      </el-dialog>
-    </div>
-    <!--导出弹窗结束-->
-  </div>
-</template>
-
-<script>
-import "./log.scss";
-import { swapList } from "@/api/records";
-import { logModel,exportFile } from "@/api/log";
-export default {
-  name: "ChangeRecord",
-  components: {},
-  data() {
-    return {
-      // 查询时间数组
-      dateTime: "",
-      // 充电机ID下拉列表
-      chargerArr: null,
-      // 数据列表
-      datalist: [],
-      dialogType: "find", // 按钮类型(find、export)
-      // 查询参数
-      queryParams: {
-        page: 1, // 当前页
-        pageSize: 10, // 每页条数
-        vehiclePlate: undefined, // 车牌号
-        vehicleVin:undefined,//车辆识别码
-        swapId: undefined, // 换电编号
-        swapBeginTime: undefined,
-        swapEndTime: undefined,
-        orderByField: undefined, // 排序字段
-        orderByWays: 'desc'// 排序方式
-      },
-      //日志查询参数
-      serchParams:{
-        exchangeNo:undefined,//换电编号
-        startTime:undefined,//开始时间
-        endTime:undefined,//结束时间
-        signals:[],//日志范围
-      },
-      total: 0, // 总条数,
-      tableheight: 0, // 表格高度设置
-      dialogexportVisible: false, // 弹窗显示
-      checked: false,
-      indeterminate: false,
-      robotValue: "",
-      logOptions: [],
-      logheader: [],
-      loading: false,
-      heightTimer: false,
-      ruleForm:{
-        exportName:undefined,
-      },
-      rules:{
-        exportName: [
-            { required: true, message: '请输入任务名称', trigger: 'blur' },
-            { min: 2, max: 20, message: '长度在 2 到 20 个字符', trigger: 'blur' }
-          ],
-      }
-    };
-  },
-  mounted() {
-    this.onLoadHeight();
-    this.changeWindow();
-    this.getLogModel();
-    this.getswapList();
-  },
-  methods: {
-    selectAll() {
-      if (this.robotValue.length < this.logOptions.length) {
-        this.robotValue = [];
-        this.logOptions.map((item) => {
-          this.robotValue.push(item.alarmCode);
-        });
-      } else {
-        this.robotValue = [];
-      }
-    },
-    changeSelect(val) {
-      if (!val.includes("全部") && val.length === this.logOptions.length) {
-        this.robotValue.unshift("全部");
-      } else if (val.includes("全部") && val.length - 1 < this.logOptions.length) {
-        this.robotValue = this.robotValue.filter((item) => {
-          return item !== "全部";
-        });
-      }
-    },
-    removeTag(val) {
-      if (val === "全部") {
-        this.robotValue = [];
-      }
-    },
-    // 清空表单数据
-    dialogClose() { },
-    //获取换电记录列表
-    getswapList() {
-      swapList(this.queryParams).then((res) => {
-        this.datalist = res.data.records;
-        this.total = res.data.total;
-      });
-    },
-    //获取日志数据字典
-    getLogModel() {
-      logModel().then((res) => {
-        this.logOptions = res.data;
-        this.logheader = res.data;
-      });
-    },
-    /** 分页下一页 */
-    handleSizeChange(val) {
-      this.queryParams.pageSize = val;
-      this.getswapList();
-    },
-    /** 分页选择页数 */
-    handleCurrentChange(val) {
-      this.queryParams.page = val;
-      this.getswapList();
-    },
-    // 搜索
-    handleQuery() {
-      if (this.dateTime) {
-        this.queryParams.swapBeginTime = this.$moment(this.dateTime[0]).format(
-          "YYYY-MM-DD HH:mm:ss"
-        );
-        this.queryParams.swapEndTime = this.$moment(this.dateTime[1]).format(
-          "YYYY-MM-DD HH:mm:ss"
-        );
-      }
-      this.getswapList();
-    },
-    // 搜索重置
-    resetForm() {
-      this.queryParams.swapBeginTime = undefined;
-      this.queryParams.swapEndTime = undefined;
-      this.getswapList();
-    },
-    //日志查询
-    handleSerch(val){
-      this.dialogexportVisible=true
-      this.dialogType='find'
-      this.serchParams.exchangeNo=val.swapId
-      this.serchParams.startTime=val.swapBeginTime
-      this.serchParams.endTime=val.swapEndTime
-    },
-    //导出日志
-    handleExport(val){
-      this.dialogexportVisible=true
-      this.dialogType='export'
-      this.serchParams.startTime=val.swapBeginTime
-      this.serchParams.endTime=val.swapEndTime
-      this.serchParams.exchangeNo=val.swapId
-    },
-    //查询和生成日志文件
-    handleExportLog(){
-      if(this.dialogType ==='find'){
-        this.serchParams.signals=this.robotValue
-        this.$router.push({name:"Robot",params:this.serchParams})
-       
-      }else{
-        this.$refs.ExportForm.validate((valid) => {
-          if (valid) {
-            let addParams={
-              exportName:this.ruleForm.exportName,
-              signals:this.robotValue,
-              exchangeNo:this.serchParams.exchangeNo,
-              startTime:this.serchParams.startTime,
-              endTime:this.serchParams.endTime,
-              exportLogType:1
-            }
-            exportFile(addParams).then( res =>{
-              if(res.code === 0){
-                this.$router.push({path:"/manage-log/data-export"})
-              }else{
-                this.$message({
-                  message: res.msg,
-                  type: "warning",
-                  duration: 1000,
-                  offset: 20,
-                });
-              }
-            })
-          } else {
-            return false;
-          }
-        });
-      }
-    }
-  },
-};
-</script>
-<style lang="scss" scoped>
-  .el-form{
-    .is-required{
-        display: flex;
-        align-items: center;
-        justify-content: center;
-        padding-right: 25px;
-      }
-  }
-</style>

+ 0 - 90
src/views/manage-log/components/ControlBox.vue

@@ -1,90 +0,0 @@
-<template>
-    <div class="control-box">
-        <div class="left">
-            <div class="title">
-                <img :src="require(`../assets/${img}.png`)" /><span>{{ title }}</span>
-            </div>
-            <div class="setspeed">
-                <div class="speed">速度: {{ speed }} m/s</div>
-                <!-- <el-button type="primary" class="set" @click="handleset('速度')">设置</el-button> -->
-            </div>
-        </div>
-        <div class="left">
-            <div class="setspeed" style="margin-top: 48px">
-                <div class="speed">位置: {{ position }} m/s</div>
-                <!-- <el-button type="primary" class="position" @click="handleset('位置')">设置</el-button> -->
-            </div>
-        </div>
-    </div>
-</template>
-
-<script>
-export default {
-    name: 'ControlBox',
-    props: ['title', 'img', 'speed', 'position', 'unit'],
-    methods: {
-        // handleset(unit) {
-        //     this.$emit('handleset',{title:this.title,unit:unit})
-        // }
-    }
-};
-</script>
-
-<style lang="scss" scoped>
-.control-box {
-    width: 45%;
-    display: flex;
-    padding-bottom: 64px;
-
-    .left {
-        display: flex;
-        flex-direction: column;
-        color: #91fdb9;
-        font-weight: bold;
-        margin-right: 20px;
-        .title {
-            display: flex;
-            align-items: center;
-
-            span {
-                margin-left: 8px;
-                margin-top: 3px;
-                font-size: 18px;
-            }
-        }
-
-        .setspeed {
-            display: flex;
-            margin-top: 25px;
-            color: #4c5d71;
-            font-size: 16px;
-
-            .speed {
-                width: 365px;
-                height: 40px;
-                border: #263042 solid 1px;
-                box-sizing: border-box;
-                line-height: 40px;
-                padding-left: 18px;
-                margin-right: 10px;
-            }
-
-            .position {
-                background-color: #111827;
-                color: #fff;
-                border-color: #263042;
-                font-weight: 600;
-                letter-spacing: 1px;
-            }
-
-            .set {
-                background-color: #91fdb9;
-                color: #0b111d;
-                border-color: #91fdb9;
-                font-weight: 600;
-                letter-spacing: 1px;
-            }
-        }
-    }
-}
-</style>

+ 0 - 188
src/views/manage-log/control.vue

@@ -1,188 +0,0 @@
-<template>
-  <div class="charge-table">
-    <div class="charge-table-bottom">
-      <control-box
-        title="旋转轴"
-        img="c1"
-        :speed="plcResultDTO.rAxis"
-        :position="plcResultDTO.rDpmt"
-        unit="m/s"
-      ></control-box>
-      <control-box
-        title="伸缩轴"
-        img="c2"
-        :speed="plcResultDTO.yAxis"
-        :position="plcResultDTO.yDpmt"
-        unit="m/s"
-      ></control-box>
-      <control-box
-        title="行走轴"
-        img="c3"
-        :speed="plcResultDTO.xAxis"
-        :position="plcResultDTO.xDpmt"
-        unit="m/s"
-      ></control-box>
-      <control-box
-        title="举升轴"
-        img="c4"
-        :speed="plcResultDTO.zAxis"
-        :position="plcResultDTO.zDpmt"
-        unit="m/s"
-      ></control-box>
-    </div>
-    <!--设置弹窗-->
-    <!-- <div class="rolemanage chargeshow">
-      <el-dialog
-        :title="`设置${dialogtext.title}-${dialogtext.unit}`"
-        :visible.sync="dialogConfigVisible"
-        :destroy-on-close="true"
-      >
-        <div class="setConfig">
-          <span>指令:</span>
-          <el-input v-model="input" placeholder="请输入指令"></el-input>
-          <el-button type="primary" class="set" @click="handleset"
-            >执行</el-button
-          >
-        </div>
-      </el-dialog>
-    </div> -->
-    <!--设置弹窗结束-->
-  </div>
-</template>
-
-<script>
-import { getToken } from '@/utils/auth'
-import ControlBox from './components/ControlBox'
-export default {
-  name: "Control",
-  components:{
-    ControlBox
-  },
-  data() {
-    return {
-      ws: null,
-      dialogConfigVisible: false,
-      input: "",
-      plcResultDTO:{
-        xAxis:'— — —',
-        yAxis:'— — —',
-        zAxis:'— — —',
-        rAxis:'— — —',
-        xDpmt:'— — —',
-        yDpmt:'— — —',
-        zDpmt:'— — —',
-        rDpmt:'— — —',
-      },
-      dialogtext: {}
-    };
-  },
-  mounted() {
-    if (getToken()) {
-      if (this.ws) {
-        this.ws.close();
-      }
-      this.websocketConnect();
-      // 检测websocket断开重连
-      this.detectWebsocketConnection();
-    }
-  },
-  destroyed() {
-    this.websocketOnClose();
-  },
-  methods: {
-    // handleset(obj) {
-    //   this.dialogtext=obj
-    //   this.dialogConfigVisible = true;
-    // },
-    websocketOnOpen() {
-      console.log("socket连接成功");
-      const wsMessage={
-        type: 'page',
-        payload: 'control'
-      }
-      this.ws.send(JSON.stringify(wsMessage))
-    },
-    websocketOnMessage(m) {
-      const d = JSON.parse(m.data)
-      // console.log(d.plcResultDTO)
-      if(d.plcResultDTO){
-        this.plcResultDTO=d.plcResultDTO
-      }
-      
-    },
-    websocketOnError(e) {
-      console.log("socket错误", e);
-    },
-    websocketOnClose(e) {
-      console.log("socket断开", e);
-    },
-    detectWebsocketConnection() {
-      this.wsTimer = setInterval(() => {
-        if (this.ws.readyState != 1) {
-          this.ws.close();
-          this.websocketConnect();
-        }
-      }, 3000);
-    },
-    websocketConnect() {
-      const wstoken = getToken();
-      this.ws = new WebSocket(
-        process.env.VUE_APP_WS + "/" + wstoken
-      );
-      this.ws.onopen = this.websocketOnOpen;
-      this.ws.onerror = this.websocketOnError;
-      this.ws.onmessage = this.websocketOnMessage;
-      this.ws.onclose = this.websocketOnClose;
-    },
-  },
-};
-</script>
-
-<style lang="scss" scoped>
-.setConfig {
-  margin: 35px auto;
-  display: flex;
-  align-items: center;
-  justify-content: center;
-  padding-bottom: 45px;
-
-  span {
-    color: #fff;
-    font-size: 15px;
-    text-align: right;
-  }
-
-  .el-input {
-    width: 240px;
-    margin-right: 15px;
-  }
-}
-
-.set {
-  background-color: #91fdb9;
-  color: #0b111d;
-  border-color: #91fdb9;
-  font-weight: 600;
-  letter-spacing: 1px;
-}
-
-.charge-table {
-  padding: 50px;
-  background-color: #111827;
-  border: #192337 solid 1px;
-  min-height: 68vh;
-  margin: 35px;
-  display: flex;
-  flex-direction: column;
-
-  .charge-table-bottom {
-    width: 100%;
-    min-height: 100%;
-    background-color: #111827;
-    display: flex;
-    flex-wrap: wrap;
-
-    
-  }
-}
-</style>

+ 0 - 337
src/views/manage-log/data-export.vue

@@ -1,337 +0,0 @@
-<template>
-  <div class="charge-box">
-    <div class="charge-tools">
-      <el-form :inline="true" :model="queryParams">
-        <el-form-item label="数据来源:" style="margin-left: 35px">
-          <el-select
-            v-model="queryParams.exportLogType"
-            clearable
-            placeholder="请选择"
-          >
-            <el-option
-              v-for="item in LogTypeArr"
-              :key="item.id"
-              :label="item.value"
-              :value="item.id"
-            />
-          </el-select>
-        </el-form-item>
-
-        <el-form-item label="任务名称:" style="margin-left: 50px">
-          <el-input
-            v-model.trim="queryParams.exportName"
-            placeholder="请输入任务名称"
-            clearable
-          />
-        </el-form-item>
-
-        <el-form-item label="时间范围:" style="margin-left: 50px">
-          <el-date-picker
-            v-model="dateTime"
-            class="times"
-            type="datetimerange"
-            range-separator="至"
-            start-placeholder="开始时间"
-            end-placeholder="结束时间"
-            format="yyyy-MM-dd HH:mm:ss"
-          />
-        </el-form-item>
-
-        <el-form-item>
-          <el-button type="primary" class="serch actve" @click="handleQuery"
-            >查询</el-button
-          >
-          <el-button type="primary" class="serch" @click="resetForm"
-            >重置</el-button
-          >
-        </el-form-item>
-      </el-form>
-    </div>
-
-    <div class="charge-table">
-      <div class="charge-table-bottom">
-        <el-table
-          :data="datalist"
-          :header-cell-style="{
-            background: '#1d283e',
-            borderColor: '#2f3c86',
-            height: '36px',
-            lineHeight: '36px',
-            color: 'white',
-            fontSize: '15px',
-          }"
-          stripe
-          fit
-          :height="tableheight"
-          style="width: 100%"
-        >
-          <el-table-column prop="exportName" label="导出任务名称" />
-          <el-table-column label="日志类型">
-            <template slot-scope="scope">
-              <span v-if="scope.row.exportLogType === 1">机器人</span>
-              <span v-else-if="scope.row.exportLogType === 2">充电机</span>
-              <span v-else-if="scope.row.exportLogType === 3">BMS</span>
-            </template>
-          </el-table-column>
-          <el-table-column prop="exporterName" label="创建人" />
-          <el-table-column label="状态" width="400">
-            <template slot-scope="scope">
-              <span v-if="scope.row.exportStatus !== 2">{{
-                scope.row.exportStatus === 0 ? "完成" : "失败"
-              }}</span>
-              <span v-else
-                ><el-progress
-                  :percentage="scope.row.exportProgress"
-                ></el-progress
-              ></span>
-            </template>
-          </el-table-column>
-          <el-table-column prop="createTime" label="创建时间" />
-          <el-table-column label="操作" align="center" width="200">
-            <template slot-scope="scope">
-              <span v-if="scope.row.exportStatus === 0">
-                <el-button
-                  type="primary"
-                  class="handle"
-                  size="small"
-                  @click="
-                    handleDownFile(
-                      scope.row.exportFilePath,
-                      scope.row.exportName
-                    )
-                  "
-                  >下载</el-button
-                >
-              </span>
-              <span v-if="scope.row.exportStatus !== 2">
-                <el-button
-                  type="primary"
-                  class="handle"
-                  size="small"
-                  @click="handleDelete(scope.row.id)"
-                  >删除</el-button
-                >
-              </span>
-
-              <span v-else>— —</span>
-            </template>
-          </el-table-column>
-        </el-table>
-        <vue-loading
-          :isLoading="showTotip"
-          type="loading3"
-          text="下载中..."
-          color="lightgreen"
-          scale="1"
-        ></vue-loading>
-      </div>
-      <div class="pageblock">
-        <el-pagination
-          :current-page="queryParams.page"
-          :page-sizes="[10, 20, 30, 40]"
-          :page-size="queryParams.pageSize"
-          layout="total, sizes, prev, pager, next, jumper"
-          :total="total"
-          @size-change="handleSizeChange"
-          @current-change="handleCurrentChange"
-        />
-      </div>
-    </div>
-  </div>
-</template>
-
-<script>
-import "./log.scss";
-import { exportList, deleteExportData } from "@/api/downfile";
-import request from '@/utils/requestfile';
-export default {
-  name: "DataExport",
-  components: {},
-  data() {
-    return {
-      //下载提示框
-      showTotip: false,
-      // 查询时间数组
-      dateTime: "",
-      // 导出类型z1
-      LogTypeArr: [
-        {
-          id: 1,
-          value: "机器人",
-        },
-        {
-          id: 2,
-          value: "充电机",
-        },
-        {
-          id: 3,
-          value: "BMS",
-        },
-      ], //日志类型
-      // 数据列表
-      datalist: [],
-      exportLogType: undefined,
-      exporterId: 0, //导出人id
-      // 查询参数
-      queryParams: {
-        page: 1, // 当前页
-        pageSize: 10, // 每页条数
-        exportName: undefined, // 导出任务名称
-        exporterId: undefined, // 导出人id
-        startTime: undefined,
-        endTime: undefined,
-        orderByField: "createTime", // 排序字段
-        orderByWays: "desc", // 排序方式
-        exporterId: this.$store.getters.userId,
-      },
-      total: 0, // 总条数,
-      tableheight: 0, // 表格高度设置
-      loading: false,
-      heightTimer: false,
-      exportTimer: null, //定时器
-    };
-  },
-  destroyed() {
-    this.clearListTimer();
-  },
-  mounted() {
-    this.onLoadHeight();
-    this.changeWindow();
-    //清除定时器
-    this.clearListTimer();
-    //开启定时任务
-    this.setListTimer();
-  },
-  methods: {
-    //定时请求导出列表
-    setListTimer() {
-      this.getExportList();
-      this.exportTimer = setInterval(() => {
-        this.getExportList();
-      }, 1000);
-    },
-    //清除定时器
-    clearListTimer() {
-      if (this.exportTimer) {
-        clearInterval(this.exportTimer);
-      }
-    },
-    // 清空表单数据
-    dialogClose() {},
-    //获取换电记录列表
-    getExportList() {
-      exportList(this.queryParams).then((res) => {
-        if (res?.code == 0) {
-          this.datalist = res.data.list;
-          this.total = res.data.total;
-        }
-      });
-    },
-    /** 分页下一页 */
-    handleSizeChange(val) {
-      this.queryParams.pageSize = val;
-      this.getExportList();
-    },
-    /** 分页选择页数 */
-    handleCurrentChange(val) {
-      this.queryParams.page = val;
-      this.getExportList();
-    },
-    // 搜索
-    handleQuery() {
-      if (this.dateTime) {
-        this.queryParams.startTime = this.$moment(this.dateTime[0]).format(
-          "YYYY-MM-DD HH:mm:ss"
-        );
-        this.queryParams.endTime = this.$moment(this.dateTime[1]).format(
-          "YYYY-MM-DD HH:mm:ss"
-        );
-      }
-      this.getExportList();
-    },
-    // 搜索重置
-    resetForm() {
-      // window.location.reload();
-      this.queryParams = {
-        page: 1, // 当前页
-        pageSize: 10, // 每页条数
-        exportName: undefined, // 导出任务名称
-        startTime: undefined,
-        endTime: undefined,
-        orderByField: "createTime", // 排序字段
-        orderByWays: "desc", // 排序方式
-        exporterId: this.$store.getters.userId,
-      };
-      this.dateTime = "";
-      this.queryParams.page = 1;
-      this.queryParams.pageSize = 10;
-      this.getExportList();
-    },
-    //删除导出任务列表
-    handleDelete(id) {
-      this.$confirm("删除数据将丢失,请确认是否删除", "确认删除", {
-        confirmButtonText: "确认",
-        cancelButtonText: "取消",
-        type: "warning",
-      })
-        .then(async () => {
-          await deleteExportData(id);
-          this.$message({
-            type: "success",
-            message: "删除成功!",
-          });
-          this.getExportList();
-        })
-        .catch((err) => {
-          console.error(err);
-        });
-    },
-    //下载文件
-    async handleDownFile(url, fileName) {
-      this.showTotip = true;
-      const execlUrl = process.env.VUE_APP_BASE_API + "/excel/" + url;
-      const fileDownName = fileName + "_" + new Date().getTime();
-      console.log(execlUrl, fileDownName);
-      const resUrl = await this.RecordFile(execlUrl, fileDownName);
-    },
-    RecordFile(Fileurl, fileName) {
-    
-      //接口方法
-      return request({
-        url: Fileurl,
-        method: "get",
-        responseType: "blob",
-      }).then((data) => {
-        console.log("RecordFile then", data);
-
-        if (!data) {
-          this.showTotip = false
-          return alert("文件下载失败");
-        }
-        // let fileName = '统计表计';
-        if (typeof window.navigator.msSaveBlob !== "undefined") {
-          // window.navigator.msSaveBlob(new Blob([data], { type: 'application/vnd.ms-excel' }), fileName + '.xlsx');
-          window.navigator.msSaveBlob(
-            new Blob([data], { type: "application/zip" }),
-            fileName
-          );
-        this.showTotip = false
-        } else {
-          let url = window.URL.createObjectURL(
-            new Blob([data], { type: "application/zip" })
-          );
-          let link = document.createElement("a");
-          link.style.display = "none";
-          link.href = url;
-          link.setAttribute("download", fileName);
-          document.body.appendChild(link);
-          link.click();
-          document.body.removeChild(link); //下载完成移除元素
-          window.URL.revokeObjectURL(url); //释放掉blob对象
-        this.showTotip = false
-        }
-      });
-    },
-  },
-};
-</script>

+ 0 - 169
src/views/manage-log/log.scss

@@ -1,169 +0,0 @@
-.charge-box {
-    display: flex;
-    padding: 0 35px;
-    flex-direction: column;
-    @media screen and (max-width:1152px) {
-        .charge-tools{
-            padding:25px 5px !important;
-        }
-        .el-input--suffix .el-input__inner{
-            padding-right: 0px;
-            width: 235px;
-        }
-    }
-    .charge-tools {
-        height: 88px;
-        background-color: #111827;
-        border: #192337 solid 1px;
-        padding: 25px;
-        width: 100%;
-        .el-form-item{
-            margin-left: 0px;
-        }
-        @media screen and (max-width:1440px) {
-            .el-form-item{
-                margin-left: 10px;
-            }
-        }
-        
-        .serch {
-            background-color: #111827;
-            width: 70px;
-            height: 40px;
-            border: #263042 solid 1px;
-            margin-left: 16px;
-            font-size: 16px;
-        }
-        .serch:hover{
-            color: #69b889;
-            background-color: #181e2e;
-            border-color: #69b889;
-        }
-        .actve {
-            background-color: #91fdb9;
-            color: #111827;
-            border: none;
-        }
-        .actve:hover{
-            background-color: #69b889;
-            border-color: #69b889;
-            color: white;
-        }
-
-        .days {
-            background-color: #111827;
-            height: 40px;
-            border: #263042 solid 1px;
-            width: 92px;
-            margin-right: 18px;
-            font-size: 16px;
-        }
-
-        .times {
-            background-color: #111827;
-            height: 40px;
-            border: #263042 solid 1px;
-        }
-    }
-
-    .charge-table {
-        padding: 15px 25px;
-        background-color: #111827;
-        border: #192337 solid 1px;
-        width: 100%;
-        min-height: 68vh;
-        margin-top: 3vh;
-        display: flex;
-        flex-direction: column;
-
-        .charge-table-top {
-            height: 50px;
-            width: 100%;
-            text-align: right;
-            margin-bottom: 10px;
-
-            .daochu {
-                background-color: #111827;
-                width: 100px;
-                border: #91fdb9 solid 1px;
-                color: #91fdb9;
-                height: 40px;
-                font-size: 14px;
-                font-weight: 600;
-            }
-        }
-
-        .charge-table-bottom {
-            width: 100%;
-            min-height: 100%;
-            background-color: #111827;
-            .el-progress-bar{
-                width: 50%;
-                .el-progress-bar__inner{
-                    background-color:#91fdb9
-                }
-            }
-            .el-progress__text{
-                color: white;
-            }
-        }
-
-        .pageblock {
-            text-align: right;
-            padding: 15px 0px;
-        }
-    }
-}
-
-.checkFirst{
-    height: 40px;
-    display: flex;
-    align-items: center;
-    padding: 0 12px;
-    color: #fff;
-    font-size: 15px;
-    font-weight: 600;
-    margin: 0 auto;
-    justify-content: center;
-}
-.setExport {
-    margin: 35px auto;
-    display: flex;
-    align-items: center;
-    justify-content: center;
-    padding-bottom: 45px;
-    flex-direction: column;
-    span {
-      color: #fff;
-      font-size: 15px;
-      text-align: right;
-    }
-  
-    .el-input {
-      width: 240px;
-      margin-right: 15px;
-    }
-    .el-form{
-        display: flex;
-        .el-button{
-            background-color: #91fdb9;
-            border-color: #91fdb9;
-            font-weight: 600;
-            letter-spacing: 1px;
-            width: 70px;
-            height: 36px;
-            span{
-                color: #0b111d;
-            }
-        }
-        .el-form-item{
-            display: flex;
-            margin-left:0;
-        }
-    }
-    .descript{
-        color: #D9001B;
-        text-indent: 1em;
-        font-weight: normal;
-    }
-}

+ 0 - 378
src/views/manage-log/robot.vue

@@ -1,378 +0,0 @@
-<template>
-  <div class="charge-box">
-    <div class="charge-tools">
-      <el-form :inline="true" :model="queryParams">
-        <el-form-item label="日志范围:" style="margin-left: 35px">
-          <el-select
-            multiple
-            v-model="robotValue"
-            clearable
-            placeholder="请选择"
-            @change="changeSelect"
-            collapse-tags
-            @remove-tag="removeTag"
-          >
-            <el-option
-              label="全选"
-              value="全选"
-              @click.native="selectAll"
-            ></el-option>
-            <el-option
-              v-for="item in logOptions"
-              :key="item.logCode"
-              :label="item.logName"
-              :value="item.logCode"
-            />
-          </el-select>
-        </el-form-item>
-
-        <el-form-item label="时间范围:" style="margin-left: 50px">
-          <el-date-picker
-            v-model="dateTime"
-            class="times"
-            type="datetimerange"
-            range-separator="至"
-            start-placeholder="开始时间"
-            end-placeholder="结束时间"
-            format="yyyy-MM-dd HH:mm:ss"
-          />
-        </el-form-item>
-
-        <el-form-item>
-          <el-button type="primary" class="serch actve" @click="handleQuery"
-            >查询</el-button
-          >
-          <el-button type="primary" class="serch" @click="resetForm"
-            >重置</el-button
-          >
-        </el-form-item>
-      </el-form>
-    </div>
-
-    <div class="charge-table">
-      <div class="charge-table-top">
-        <el-button type="primary" class="daochu" @click="chargeExport"
-          >导出结果</el-button
-        >
-      </div>
-      <div class="charge-table-bottom">
-        <el-table
-          :data="datalist"
-          :header-cell-style="{
-            background: '#1d283e',
-            borderColor: '#2f3c86',
-            height: '36px',
-            lineHeight: '36px',
-            color: 'white',
-            fontSize: '15px',
-          }"
-          stripe
-          :height="tableheight"
-          v-loading="loading"
-          ref="tblist"
-          style="width: 100%"
-        >
-          <el-table-column
-            prop="time"
-            label="发生时间"
-            fixed="left"
-            width="180"
-          >
-          </el-table-column>
-          <af-table-column
-            v-for="log in logheader"
-            :key="log.logCode"
-            :label="log.logName"
-            :render-header="labelHead"
-          >
-            <template slot-scope="scope">
-              {{ scope.row[log.logCode] }}
-            </template>
-          </af-table-column>
-        </el-table>
-      </div>
-      <div class="pageblock">
-        <el-pagination
-          :current-page="queryParams.page"
-          :page-sizes="[10, 20, 30, 40]"
-          :page-size="queryParams.pageSize"
-          layout="total, sizes, prev, pager, next, jumper"
-          :total="total"
-          @size-change="handleSizeChange"
-          @current-change="handleCurrentChange"
-        />
-      </div>
-    </div>
-    <!--导出弹窗-->
-    <div class="rolemanage chargeshow">
-      <el-dialog
-        title="生成导出任务"
-        :visible.sync="dialogExportVisible"
-        :destroy-on-close="true"
-      >
-        <div class="setExport">
-          <el-form :model="ruleForm" :rules="rules" ref="ExportForm">
-            <el-form-item label="任务名称" prop="exportName">
-              <el-input
-                v-model="ruleForm.exportName"
-                placeholder="请输入任务名称"
-              ></el-input>
-            </el-form-item>
-            <el-form-item>
-              <el-button type="primary" @click="AddExport">生成</el-button>
-            </el-form-item>
-          </el-form>
-          <div class="descript">
-            说明:导出任务生成后,你可以在数据导出列表中进行查询和下载
-          </div>
-        </div>
-      </el-dialog>
-    </div>
-    <!--导出弹窗结束-->
-  </div>
-</template>
-
-<script>
-import "./log.scss";
-import { logModel, robotList, exportFile } from "@/api/log";
-export default {
-  name: "Robot",
-  components: {},
-  data() {
-    return {
-      // 查询时间数组
-      dateTime: "",
-      // 充电机ID下拉列表
-      // 数据列表
-      datalist: [],
-      // 查询参数
-      queryParams: {
-        page: 1, // 当前页
-        pageSize: 10, // 每页条数
-        deviceNo: undefined,
-        endTime: undefined,
-        signals: undefined,
-        startTime: undefined,
-        exchangeNo: undefined,
-        sort: 1,
-      },
-      total: 0, // 总条数,
-      tableheight: 0, // 表格高度设置
-      checked: false,
-      indeterminate: false,
-      robotValue: "",
-      logOptions: [],
-      logheader: [],
-      heightTimer: false,
-      loading: false,
-      dialogExportVisible: false,
-      ruleForm: {
-        exportName: undefined,
-      },
-      rules: {
-        exportName: [
-          { required: true, message: "请输入任务名称", trigger: "blur" },
-          {
-            min: 2,
-            max: 20,
-            message: "长度在 2 到 20 个字符",
-            trigger: "blur",
-          },
-        ],
-      },
-    };
-  },
-  mounted() {
-    this.getrobotList();
-    this.getLogModel();
-    this.onLoadHeight();
-    this.changeWindow();
-    this.getRecordParams();
-  },
-  methods: {
-    labelHead(h, { column, index }) {
-      let l = column.label.length;
-      let f = 20;
-      if (l <= 2) {
-        f = 30;
-      }
-      column.minWidth = f * l;
-      return h("div", { class: "table-head", style: { minWidth: "100%" } }, [
-        column.label,
-      ]);
-    },
-    selectAll() {
-      if (this.robotValue.length < this.logOptions.length) {
-        this.robotValue = [];
-        this.logOptions.map((item) => {
-          this.robotValue.push(item.logCode);
-        });
-      } else {
-        this.robotValue = [];
-      }
-    },
-    changeSelect(val) {
-      if (!val.includes("全选") && val.length === this.logOptions.length) {
-        this.robotValue.unshift("全选");
-      } else if (
-        val.includes("全选") &&
-        val.length - 1 < this.logOptions.length
-      ) {
-        this.robotValue = this.robotValue.filter((item) => {
-          return item !== "全选";
-        });
-      }
-    },
-    removeTag(val) {
-      if (val === "全选") {
-        this.robotValue = [];
-      }
-    },
-    //获取机器人日志列表
-    getrobotList() {
-      this.loading = true;
-      console.log(this.queryParams, "queryparams");
-      robotList(this.queryParams).then((res) => {
-        this.datalist = res.data.list;
-        this.total = res.data.total;
-        this.$nextTick(() => {
-          this.$refs.tblist.doLayout();
-          this.loading = false;
-        });
-      });
-    },
-    //获取日志数据字典
-    getLogModel() {
-      logModel().then((res) => {
-        this.logOptions = res.data;
-        this.logheader = res.data;
-        //接收换电记录传过来得参数
-        if (
-          this.$route.params.signals &&
-          this.$route.params.signals.length > 0
-        ) {
-          let differenceSet = Array.from(
-            new Set(
-              [...this.logOptions].filter((x) =>
-                this.$route.params.signals.includes(x.logCode)
-              )
-            )
-          );
-          this.logheader = differenceSet;
-          this.robotValue = this.$route.params.signals;
-          this.queryParams.signals = this.$route.params.signals;
-          this.dateTime = [
-            this.$route.params.startTime,
-            this.$route.params.endTime,
-          ];
-        }
-        this.$nextTick(() => {
-          this.$refs.tblist.doLayout();
-        });
-      });
-    },
-    /** 分页下一页 */
-    handleSizeChange(val) {
-      this.queryParams.pageSize = val;
-      this.getrobotList();
-    },
-    /** 分页选择页数 */
-    handleCurrentChange(val) {
-      this.queryParams.page = val;
-      this.getrobotList();
-    },
-    // 搜索
-    handleQuery() {
-      if (this.dateTime || this.robotValue.length > 0) {
-        if (this.dateTime) {
-          this.queryParams.startTime = this.$moment(this.dateTime[0]).format(
-            "YYYY-MM-DD HH:mm:ss"
-          );
-          this.queryParams.endTime = this.$moment(this.dateTime[1]).format(
-            "YYYY-MM-DD HH:mm:ss"
-          );
-        }
-        if (this.robotValue.length > 0) {
-          this.queryParams.signals = this.robotValue;
-          let differenceSet = Array.from(
-            new Set(
-              [...this.logOptions].filter((x) =>
-                this.robotValue.includes(x.logCode)
-              )
-            )
-          );
-          this.logheader = differenceSet;
-        }
-        delete this.queryParams.exchangeNo;
-        this.getrobotList();
-      } else {
-        this.$message({
-          message: "请选择查询条件!",
-          type: "warning",
-          duration: 1000,
-          offset: 20,
-        });
-      }
-      this.$nextTick(() => {
-        this.$refs.tblist.doLayout();
-      });
-    },
-    // 搜索重置
-    resetForm() {
-      // window.location.reload();
-      this.robotValue = "";
-      this.dateTime = "";
-      this.queryParams.page = 1;
-      this.queryParams.pageSize = 10;
-      this.queryParams.startTime = ''
-      this.queryParams.endTime = ''
-      this.getLogModel()
-      this.getrobotList();
-    },
-    // 导出弹窗显示
-    chargeExport() {
-      this.dialogExportVisible = true;
-    },
-    //生成报表
-    AddExport() {
-      this.$refs.ExportForm.validate((valid) => {
-        if (valid) {
-          let addParams = {
-            exportName: this.ruleForm.exportName,
-            signals: this.robotValue,
-            startTime: this.queryParams.startTime,
-            endTime: this.queryParams.endTime,
-            exportLogType: 1,
-          };
-          exportFile(addParams).then((res) => {
-            if (res.code === 0) {
-              this.dialogExportVisible = false;
-              this.$router.push({ path: "/manage-log/data-export" });
-            } else {
-              this.$message({
-                message: res.msg,
-                type: "warning",
-                duration: 1000,
-                offset: 20,
-              });
-            }
-          });
-        } else {
-          return false;
-        }
-      });
-    },
-    //获取换电记录日志查询参数
-    getRecordParams() {
-      if (JSON.stringify(this.$route.params) == "{}") {
-      } else {
-        this.queryParams.exchangeNo = this.$route.params.exchangeNo;
-        this.queryParams.startTime = this.$route.params.startTime;
-        this.queryParams.endTime = this.$route.params.endTime;
-        this.queryParams.signals=this.$route.params.signals;
-        this.getrobotList();
-      }
-    },
-  },
-};
-</script>

+ 0 - 12
src/views/permission/DetailList.vue

@@ -1,12 +0,0 @@
-<template>
-    <div class="DetailList">
-        <span>{{label}}:</span><div class="frame">{{value || '—'}}</div>
-    </div>
-</template>
-
-<script>
-export default {
-    name:'DetailList',
-    props:['label','value']
-}
-</script>

+ 0 - 385
src/views/permission/car-manage/index.vue

@@ -1,385 +0,0 @@
-<template>
-  <div class="charge-box">
-    <div class="charge-tools">
-      <el-form :inline="true" :model="queryParams">
-        <el-form-item label="车牌号:">
-          <el-input
-            placeholder="请输入车牌号"
-            v-model.trim="queryParams.vehiclePlate"
-            clearable
-          ></el-input>
-        </el-form-item>
-        <el-form-item label="来源:">
-          <el-select
-            v-model="queryParams.source"
-            clearable
-            placeholder="请选择来源"
-          >
-            <el-option label="云端" value="1"></el-option>
-            <el-option label="站控" value="0"></el-option>
-          </el-select>
-        </el-form-item>
-        <el-form-item>
-          <el-button type="primary" @click="handleQuery" class="serch actve"
-            >查询</el-button
-          >
-          <el-button type="primary" @click="resetForm" class="serch"
-            >重置</el-button
-          >
-        </el-form-item>
-      </el-form>
-    </div>
-    <div class="charge-table">
-      <div class="adduser">
-        <el-button type="primary" class="addbtn" @click="handleAddCar"
-          >新增</el-button
-        >
-      </div>
-      <div class="charge-table-bottom">
-        <el-table
-          :data="datalist"
-          :header-cell-style="{
-            background: '#1d283e',
-            borderColor: '#2f3c86',
-            height: '36px',
-            lineHeight: '36px',
-            color: 'white',
-            fontSize: '16px',
-          }"
-          stripe
-          fit
-          :height="tableheight"
-          style="width: 100%">
-          <el-table-column prop="vehiclePlate" label="车牌号">
-          </el-table-column>
-          <el-table-column prop="vehicleVin" label="车辆识别码">
-          </el-table-column>
-          <el-table-column prop="modelDistance" label="电池距离(mm)">
-          </el-table-column>
-          <el-table-column prop="createTime" label="创建时间" sortable>
-          </el-table-column>
-          <el-table-column prop="modelName" label="来源" width="160"> 
-              <template slot-scope="{ row }">
-                  {{ row.source===0?'站控':'云端' }}
-              </template>
-          </el-table-column>
-          <el-table-column label="操作" align="center" width="120">
-            <template slot-scope="scope" v-if="scope.row.source===0">
-              <el-button
-                type="primary"
-                class="handle"
-                size="small"
-                @click="handleDelete(scope.row.id)"
-                >删除</el-button
-              >
-            </template>
-          </el-table-column>
-          <!-- <el-table-column label="状态" align="center">
-            <template slot-scope="{ row }">
-              <el-badge
-                is-dot
-                class="item"
-                :class="{ disable: row.state === 0 }"
-                >{{ row.state === 0 ? "停用" : "启用" }}</el-badge
-              >
-            </template>
-          </el-table-column>
-          <el-table-column label="操作" align="center" width="120">
-            <template slot-scope="scope">
-              <el-button
-                type="primary"
-                class="handle"
-                size="small"
-                @click="handleEdit(scope.row)"
-                >编辑</el-button
-              >
-              <el-button
-                type="primary"
-                class="handle"
-                size="small"
-                @click="handleDelete(scope.row.id)"
-                >删除</el-button
-              >
-            </template>
-          </el-table-column> -->
-        </el-table>
-      </div>
-
-      <div class="pageblock">
-        <el-pagination
-          @size-change="handleSizeChange"
-          @current-change="handleCurrentChange"
-          :current-page="queryParams.page"
-          :page-sizes="[10, 20, 30, 40]"
-          :page-size="queryParams.pageSize"
-          layout="total, sizes, prev, pager, next, jumper"
-          :total="total"
-        >
-        </el-pagination>
-      </div>
-    </div>
-    <!--新增车辆弹窗-->
-    <div class="rolemanage">
-      <el-dialog
-        :title="dialogType==='edit'?'编辑':'新增'"
-        :visible.sync="dialogCarVisible"
-        :destroy-on-close="true"
-        @close="dialogClose"
-      >
-        <el-form
-          ref="ruleForm"
-          v-loading="loading"
-          :model="formData"
-          :rules="rules"
-        >
-          <el-form-item label="车牌号:" :label-width="formLabelWidth" prop="CarPlate">
-            <el-input v-model.trim="formData.CarPlate" autocomplete="off" placeholder="请输入车牌号码" />
-          </el-form-item>
-          <el-form-item label="车辆识别码:" :label-width="formLabelWidth" prop="CarVin">
-            <el-input v-model.trim="formData.CarVin" autocomplete="off" placeholder="请输入车辆识别码" />
-          </el-form-item>
-          <el-form-item label="电池距离:" :label-width="formLabelWidth" prop="CarDistance">
-            <el-input v-model.number="formData.CarDistance" :min="1" maxlength="4" autocomplete="off" placeholder="请输入电池距离(mm)" />
-          </el-form-item>
-          <!-- <el-form-item label="状态:" :label-width="formLabelWidth">
-            <el-select v-model="formData.source" placeholder="请选择状态">
-              <el-option label="云端" value="1" />
-              <el-option label="站控" value="0" />
-            </el-select>
-          </el-form-item> -->
-        </el-form>
-        <div slot="footer" class="dialog-footer">
-          <el-button class="exit" @click="dialogCarVisible = false">取 消</el-button>
-          <el-button type="primary" class="save" @click="AddCarinfo">确 定</el-button>
-        </div>
-      </el-dialog>
-    </div>
-    <!--新增车辆弹窗结束-->
-  </div>
-</template>
-  
-  <script>
-import { vehicleList,SaveVehicle,EditVehicle,DeleteVehicle} from "@/api/car";
-import "../permission.scss";
-export default {
-  name: "CarManage",
-  components: {},
-  data() {
-    return {
-      options: [
-        {
-          value: "01号",
-          label: "01号",
-        },
-        {
-          value: "02号",
-          label: "02号",
-        },
-        {
-          value: "03号",
-          label: "03号",
-        },
-        {
-          value: "04号",
-          label: "04号",
-        },
-        {
-          value: "05号",
-          label: "05号",
-        },
-      ],
-      datalist: [],
-      total: 0, //总条数,
-      tableheight: 0, //表格高度设置
-      dialogCarVisible: false, // 弹窗显示
-      formLabelWidth: '120px',
-      // 新增账号弹窗
-      formData: {
-        CarDistance: undefined,
-        CarPlate: undefined,
-        CarVin: undefined,
-        // state: '1',
-        // source:undefined,
-        id:0,
-      },
-      // 表单校验
-      rules: {
-        CarPlate: [
-          { required: true, message: '车牌号不能为空', trigger: 'blur' },
-          { min: 4, max: 16, message: '长度在 4 到 16 个字符', trigger: 'blur' }
-        ],
-        CarVin: [
-          { required: true, message: '车辆识别码不能为空', trigger: 'blur' },
-          { min: 10, max: 30, message: '长度为10-30个字符', trigger: 'blur' }
-        ],
-        CarDistance: [
-          { required: true, message: '电池距离不能为空', trigger: 'blur' },
-          { type: 'number', message: '电池距离必须为数字值'},
-        ]
-      },
-      formLabelWidth: '120px',
-      // 新增账号弹窗结束
-      dialogType: 'new', // 按钮类型(new、edit)
-      loading: false,
-      //查询参数
-      queryParams: {
-        page: 1, //当前页
-        pageSize: 10, //每页条数
-        vehiclePlate: undefined, //车牌号
-        source: undefined, //来源
-        orderByField: undefined, //排序字段
-        orderByWays: "desc", //排序方式
-      },
-    };
-  },
-  mounted() {
-    this.vehicleList();
-    this.onLoadHeight();
-    this.changeWindow();
-  },
-  methods: {
-    //车辆列表,
-    vehicleList() {
-      const params = this.queryParams;
-      vehicleList(params).then((res) => {
-        this.datalist = res.data.records;
-        this.total = res.data.total;
-      });
-    },
-    /**分页下一页 */
-    handleSizeChange(val) {
-      this.queryParams.pageSize = val;
-      this.vehicleList();
-    },
-    /**分页选择页数 */
-    handleCurrentChange(val) {
-      this.queryParams.page = val;
-      this.vehicleList();
-    },
-    //搜索
-    handleQuery() {
-      this.vehicleList();
-    },
-    //搜索重置
-    resetForm() {
-      this.queryParams.vehiclePlate = undefined;
-      this.queryParams.source = undefined;
-      this.vehicleList();
-    },
-    // 添加车辆、编辑车辆
-    AddCarinfo() {
-      this.$refs.ruleForm.validate((valid) => {
-        if (valid) {
-          // 添加车辆
-          if (this.dialogType === 'new') {
-            const params={
-              modelDistance:this.formData.CarDistance,
-              vehiclePlate:this.formData.CarPlate,
-              vehicleVin:this.formData.CarVin,
-              source:0
-            }
-            SaveVehicle(params).then(res => {
-              if (res.code === 0) {
-                this.loading = false
-                this.dialogCarVisible = false
-                this.$message({
-                  type: 'success',
-                  message: '操作成功!'
-                })
-                this.vehicleList()
-              } else {
-                this.loading = false
-                return this.$message.error(res.msg)
-              }
-            })
-          }
-          // 修改车辆
-          else {
-            const params={
-              modelDistance:this.formData.CarDistance,
-              vehiclePlate:this.formData.CarPlate,
-              vehicleVin:this.formData.CarVin,
-              state:this.formData.state*1,
-              id:this.formData.id
-            }
-            EditVehicle(params).then(res => {
-              if (res.code === 0) {
-                this.loading = false
-                this.dialogCarVisible = false
-                this.$message({
-                  type: 'success',
-                  message: '操作成功!'
-                })
-                this.vehicleList()
-              } else {
-                this.loading = false
-                return this.$message.error(res.msg)
-              }
-            })
-          }
-        }
-      })
-    },
-    // 添加、编辑、
-    handleAddCar() {
-      this.dialogType = "new";
-      this.dialogCarVisible = true;
-    },
-    handleEdit(row) {
-      this.formData.CarDistance = row.modelDistance;
-      this.formData.CarPlate = row.vehiclePlate;
-      this.formData.CarVin = row.vehicleVin;
-      this.formData.id = row.id;
-      this.formData.state=row.state+'';
-      this.dialogType = "edit";
-      this.dialogCarVisible = true;
-    },
-    //清空表单
-    dialogClose(){
-      this.formData.CarDistance = undefined;
-      this.formData.CarPlate = undefined;
-      this.formData.CarVin = undefined;
-      this.formData.id = 0;
-      this.formData.state='1';
-    },
-    //删除车辆
-    handleDelete(id) {
-      this.$confirm("删除数据将丢失,请确认是否删除", "确认删除", {
-        confirmButtonText: "确认",
-        cancelButtonText: "取消",
-        type: "warning",
-      })
-        .then(async () => {
-          await DeleteVehicle(id);
-          this.$message({
-            type: "success",
-            message: "删除成功!",
-          });
-          this.vehicleList();
-        })
-        .catch((err) => {
-          console.error(err);
-        });
-    },
-  },
-};
-</script>
-  <style lang="scss" scoped>
-.adduser {
-  margin-bottom: 20px;
-  .addbtn {
-    background-color: #91fdb9;
-    color: #111827;
-    border: none;
-    font-size: 15px;
-    font-weight: 600;
-    height: 40px;
-    width: 70px;
-  }
-  .addbtn:hover {
-    background-color: #69b889;
-    border-color: #69b889;
-    color: white;
-  }
-}
-</style>

+ 0 - 181
src/views/permission/cartype-manage/index.vue

@@ -1,181 +0,0 @@
-<template>
-    <div class="charge-box">
-      <div class="charge-tools">
-        <el-form :inline="true" :model="queryParams">
-  
-          <el-form-item label="车型名称:" style="margin-left: 35px;">
-            <el-input placeholder="请输入车型名称" v-model.trim="queryParams.modelName" clearable></el-input>
-          </el-form-item>
-  
-          <el-form-item label="车辆状态:" style="margin-left: 50px;">
-            <el-select v-model="queryParams.state" clearable placeholder="请选择状态">
-              <el-option label="启用" value="1"></el-option>
-              <el-option label="禁用" value="0"></el-option>
-            </el-select>
-          </el-form-item>
-          
-          
-          <el-form-item>
-            <el-button type="primary" @click="handleQuery" class="serch actve">查询</el-button>
-            <el-button type="primary" @click="resetForm" class="serch">重置</el-button>
-          </el-form-item>
-  
-        </el-form>
-      </div>
-      <div class="charge-table">
-        <div class="charge-table-bottom">
-          <el-table
-            :data="datalist"
-            :header-cell-style="{
-              background: '#1d283e',
-              borderColor: '#2f3c86',
-              height: '36px',
-              lineHeight: '36px',
-              color:'white',
-              fontSize: '16px',
-            }"
-            stripe
-            fit
-            :height="tableheight"
-            style="width: 100%"
-            :default-sort = "{prop: 'id', order: 'descending'}"
-            >
-            <el-table-column prop="modelImage" label="车型照片">
-              <template slot-scope="{row}">
-                <img :src="row.modelImage" style="height: 40px;width: 40px" @click="imgshow(row.modelImage)" class="imgborder" title="点击可放大图片" v-if="row.modelImage">
-                <img src="@/assets/cartype.png" style="height: 40px;width: 40px" v-else>
-              </template>
-            </el-table-column>
-            <el-table-column
-              prop="modelCode"
-              label="车牌编号">
-            </el-table-column>
-            <el-table-column
-              prop="modelName"
-              label="车型"
-              >
-            </el-table-column>
-            <el-table-column
-              prop="modelDistance"
-              label="前端电池距离(CM)"
-              >
-            </el-table-column>
-            <el-table-column
-              prop="batteryHighly"
-              label="电池高度(MM)"
-              >
-            </el-table-column>
-            <el-table-column
-              prop="createTime"
-              label="创建时间"
-              sortable
-              width="400"
-              >
-            </el-table-column>
-            <el-table-column label="状态" width="100" align="center">
-              <template slot-scope="{row}">
-                  <el-badge is-dot class="item" :class="{disable:row.state === 0}">{{row.state === 0 ? '停用' : '启用'}}</el-badge>
-              </template>
-            </el-table-column>
-          </el-table>
-        </div>
-        
-        <div class="pageblock">
-          <el-pagination
-              @size-change="handleSizeChange"
-              @current-change="handleCurrentChange"
-              :current-page="queryParams.page"
-              :page-sizes="[10, 20, 30, 40]"
-              :page-size="queryParams.pageSize"
-              layout="total, sizes, prev, pager, next, jumper"
-              :total="total">
-          </el-pagination>
-        </div>
-      </div>
-      <!-- 图片预览-->
-      <el-dialog :visible.sync="lookdialogVisible" :modal="false">
-          <img :src="previewpic" alt=""  width="100%" />
-      </el-dialog>
-      <!-- 图片预览 -->
-    </div>
-  </template>
-  
-  <script>
-  import { modelList } from "@/api/car";
-  import '../permission.scss';
-  export default {
-    name: "CarTypeManage",
-    components: {},
-    data() {
-      return {
-        datalist: [],
-        //查询参数
-        queryParams:{
-          page: 1, //当前页
-          pageSize:10,//每页条数
-          modelName:undefined, //车型名称
-          state:undefined, //车辆状态
-          orderByField:undefined, //排序字段
-          orderByWays:'desc'//排序方式
-        },
-        total:0,//总条数,
-        tableheight:0,//表格高度设置
-        lookdialogVisible:false,
-        previewpic:''
-      };
-    },
-    mounted() {
-      this.modelList()
-      this.onLoadHeight()
-      this.changeWindow()
-    },
-    methods: {
-      /*设置初始视窗高度*/
-      onLoadHeight(){
-        this.$nextTick(()=>{
-          this.tableheight = document.body.clientHeight - 460
-        })
-      },
-      /*设置窗口变化高度*/
-      changeWindow(){
-        window.onresize = () => {
-          return (() => {
-            this.tableheight = document.body.clientHeight - 460
-          })()
-        }
-      },
-      //车辆列表,
-      modelList(){
-        const params=this.queryParams
-        modelList(params).then(res=>{
-          this.datalist =res.data.records
-          this.total=res.data.total
-        });
-      },
-      /**分页下一页 */
-      handleSizeChange(val) {
-        this.queryParams.pageSize = val
-        this.modelList()
-      },
-      /**分页选择页数 */
-      handleCurrentChange(val) {
-        this.queryParams.page = val
-        this.modelList()
-      },
-      //搜索
-      handleQuery(){
-        this.modelList()
-      },
-      //搜索重置
-      resetForm(){
-        this.queryParams.modelName = undefined
-        this.queryParams.state = undefined
-        this.modelList()
-      },
-      imgshow(modelImage){
-        this.lookdialogVisible =true
-        this.previewpic = modelImage
-      }
-    },
-  };
-  </script>

+ 0 - 32
src/views/permission/components/SwitchRoles.vue

@@ -1,32 +0,0 @@
-<template>
-  <div>
-    <div style="margin-bottom:15px;">
-      Your roles: {{ roles }}
-    </div>
-    Switch roles:
-    <el-radio-group v-model="switchRoles">
-      <el-radio-button label="editor" />
-      <el-radio-button label="admin" />
-    </el-radio-group>
-  </div>
-</template>
-
-<script>
-export default {
-  computed: {
-    roles() {
-      return this.$store.getters.roles
-    },
-    switchRoles: {
-      get() {
-        return this.roles[0]
-      },
-      set(val) {
-        this.$store.dispatch('user/changeRoles', val).then(() => {
-          this.$emit('change')
-        })
-      }
-    }
-  }
-}
-</script>

+ 0 - 60
src/views/permission/components/TabMain.vue

@@ -1,60 +0,0 @@
-<template>
-  <section class="app-main">
-    <transition name="fade-transform" mode="out-in">
-      <keep-alive :include="cachedViews">
-        <router-view :key="key" />
-      </keep-alive>
-    </transition>
-  </section>
-</template>
-
-<script>
-export default {
-  name: 'TabMain',
-  mounted(){
-    
-  },
-  computed: {
-    cachedViews() {
-      return this.$store.state.tagsView.cachedViews
-    },
-    key() {
-      return this.$route.path
-    }
-  }
-}
-</script>
-
-<style lang="scss" scoped>
-.app-main {
-  /* 50= navbar  50  */
-  min-height: calc(100vh - 200px);
-  width: 100%;
-  position: relative;
-  overflow: hidden;
-}
-
-.fixed-header+.app-main {
-  padding-top: 65px;
-}
-
-.hasTagsView {
-  .app-main {
-    /* 84 = navbar + tags-view = 50 + 34 */
-    min-height: calc(100vh - 84px);
-  }
-
-  .fixed-header+.app-main {
-    padding-top: 84px;
-  }
-}
-</style>
-
-<style lang="scss">
-// fix css style bug in open el-dialog
-.el-popup-parent--hidden {
-  .fixed-header {
-    padding-right: 15px;
-  }
-}
-</style>

+ 0 - 556
src/views/permission/directive.vue

@@ -1,556 +0,0 @@
-<template>
-  <div class="charge-box">
-    <div class="charge-tools">
-      <el-form :inline="true" :model="queryParams">
-
-        <el-form-item label="换电编号:">
-          <el-input v-model="queryParams.swapId" placeholder="请输入换电编号" clearable />
-        </el-form-item>
-
-        <el-form-item label="车牌号:">
-          <el-input v-model="queryParams.vehiclePlate" placeholder="请输入车牌号" clearable />
-        </el-form-item>
-
-        <el-form-item label="换电日期:">
-          <el-date-picker
-            v-model="dateArr.swapDate"
-            class="times"
-            type="daterange"
-            range-separator="至"
-            start-placeholder="开始日期"
-            end-placeholder="结束日期"
-            value-format="yyyy-MM-dd"
-          />
-        </el-form-item>
-        <el-form-item label="换电结果:">
-          <el-select v-model="queryParams.swapState" clearable placeholder="全部">
-            <el-option label="全部" value=""></el-option>
-            <el-option label="成功" value="1"></el-option>
-            <el-option label="失败" value="2"></el-option>
-            <el-option label="不完整" value="0"></el-option>
-            <el-option label="换电错误" value="3"></el-option>
-          </el-select>
-        </el-form-item>
-        <el-form-item>
-          <el-button type="primary" class="serch actve" @click="handleQuery">查询</el-button>
-          <el-button type="primary" class="serch" @click="resetForm">重置</el-button>
-        </el-form-item>
-
-      </el-form>
-    </div>
-    <div class="charge-table">
-      <div class="charge-table-top">
-        <el-button type="primary" class="daochu" @click="swapExport">导出结果</el-button>
-      </div>
-      <div class="charge-table-bottom">
-        <el-table
-          :data="datalist"
-          :header-cell-style="{
-            background: '#1d283e',
-            borderColor: '#2f3c86',
-            height: '36px',
-            lineHeight: '36px',
-            color:'white',
-            fontSize: '16px',
-          }"
-          fit
-          :height="tableheight"
-          style="width: 100%"
-        >
-          <el-table-column
-            prop="swapId"
-            label="换电编号"
-            fixed
-            width="180"
-          />
-          <el-table-column
-            prop="vehiclePlate"
-            label="车牌号"
-            width="100"
-          />
-          <el-table-column
-            prop="vehicleVin"
-            label="车辆识别码"
-            width="200"
-          />
-          <el-table-column
-            prop="swapBeginTime"
-            label="换电开始时间"
-            width="180"
-          />
-          <el-table-column
-            prop="fullDuration"
-            label="安装满电时长"
-            width="120"
-          />
-          <el-table-column
-            prop="swapDuration"
-            label="换电时长"
-            sortable
-            width="110"
-          />
-          <el-table-column
-            prop="vehicleSn"
-            label="亏电电池SN"
-            width="200"
-          />
-          <el-table-column
-            label="亏电电池SOC"
-            width="120"
-          >
-          <template slot-scope="scope">
-              {{ scope.row.vehicleSoc | PercentFilter}}
-          </template>
-          </el-table-column>
-          <el-table-column
-            label="亏电电池SOH"
-            width="120"
-          >
-          <template slot-scope="scope">
-              {{ scope.row.vehicleSoh | PercentFilter}}
-          </template>
-          </el-table-column>
-          <el-table-column
-            prop="swapSn"
-            label="满电电池SN"
-            width="228"
-          />
-          <el-table-column
-            label="满电电池SOC"
-            width="120"
-          >
-            <template slot-scope="scope">
-              {{ scope.row.swapSoc | PercentFilter}}
-            </template>
-          </el-table-column>
-          <el-table-column
-            label="满电电池SOH"
-            width="150"
-          >
-            <template slot-scope="scope">
-              {{ scope.row.swapSoh | PercentFilter}}
-            </template>
-          </el-table-column>
-          <el-table-column
-            prop="swapState"
-            label="换电结果"
-            width="90"
-          >
-            <template slot-scope="scope">
-              {{ scope.row.swapState===1?'换电成功': scope.row.swapState===2?'换电失败':scope.row.swapState===3?'换电错误':'不完整'}}
-            </template>
-          </el-table-column>
-          <el-table-column label="操作" width="230" align="center" fixed="right">
-            
-            <template slot-scope="scope">
-              <el-button type="primary" class="handle" @click="RecordDetail(scope.row.id)" size="small">详情</el-button>
-              <el-button type="primary" class="handle" size="small" @click="handleSerch(scope.row)">日志查询</el-button>
-              <el-button type="primary" class="handle" size="small" @click="handleExport(scope.row)">导出日志</el-button>
-            </template>
-          </el-table-column>
-        </el-table>
-      </div>
-
-      <div class="pageblock">
-        <el-pagination
-          :current-page="queryParams.page"
-          :page-sizes="[10, 20, 30, 40]"
-          :page-size="queryParams.pageSize"
-          layout="total, sizes, prev, pager, next, jumper"
-          :total="total"
-          @size-change="handleSizeChange"
-          @current-change="handleCurrentChange"
-        />
-      </div>
-    </div>
-    <!--记录详情弹窗-->
-    <div class="onlineManage">
-      <el-dialog title="换电详情" :visible.sync="dialogRecordDetailVisible" width="1600px">
-        <div class="charge-RecordDetail" :style="{'height':tableheight+'px'}">
-            <el-tabs v-model="activeName" @tab-click="handleDialogTab">
-              <el-tab-pane label="基本信息" name="first">
-                <div class="RecordBottom">
-                  <div class="DetailDefault">
-                    <div class="DetailList">
-                        <span>换电编号:</span>
-                        <el-tooltip :content="Detail.swapId" placement="top" effect="light">
-                          <div class="frame">{{ Detail.swapId  || '—'}}</div>
-                        </el-tooltip>
-                    </div>
-                    <DetailList label="换电开始时间" :value="Detail.swapBeginTime"/>
-                    <DetailList label="满电电池SN" :value="Detail.swapSn"/>
-                    <DetailList label="亏电电池SN" :value="Detail.vehicleSn"/>
-                    <DetailList label="是否暂停" :value="Detail.everPause?'发生':'没有'"/>
-                  </div>
-                  <div class="DetailDefault">
-                    <DetailList label="换电模式" :value="Detail.startMode?'小程序发起':'站控发起'"/>
-                    <DetailList label="换电结束时间" :value="Detail.swapEndTime"/>
-                    <DetailList label="满电电池SOC" :value="Detail.swapSoc | PercentFilter"/>
-                    <DetailList label="亏电电池SOC" :value="Detail.vehicleSoc | PercentFilter"/>
-                    <DetailList label="是否中止" :value="Detail.everStop?'发生':'没有'"/>
-                  </div>
-                  <div class="DetailMin">
-                    <DetailList label="选电模式" :value="Detail.chooseMode?'手动':'自动'"/>
-                    <DetailList label="安装满电时长" :value="Detail.fullDuration "/>
-                    <DetailList label="满电电池SOH" :value="Detail.swapSoh | PercentFilter"/>
-                    <DetailList label="亏电电池SOH" :value="Detail.vehicleSoh | PercentFilter"/>
-                    
-                  </div>
-                  <div class="DetailMin" style="width: 248px;">
-                    <DetailList label="换电结果" :value="swapResult"/>
-                    <DetailList label="换电时长" :value="Detail.swapDuration"/>
-                    <DetailList label="满电电池仓位" :value="Detail.swapCode"/>
-                    <DetailList label="是否急停" :value="Detail.everEmergency?'发生':'没有'"/>
-                  </div>
-                </div>
-              </el-tab-pane>
-              <el-tab-pane label="车辆信息" name="second">
-                <div class="RecordBottom">
-                    <div class="DetailDefault">
-                      <DetailList label="车牌号" :value="Detail.vehiclePlate"/>
-                      <!-- <DetailList label="车辆电池SN" :value="Detail.vehicleSn"/> -->
-                    </div>
-                    <div class="DetailDefault">
-                      <DetailList label="车辆识别码" :value="Detail.vehicleVin"/>
-                      <!-- <DetailList label="车辆电池SOC" :value="Detail.vehicleSoc | PercentFilter"/> -->
-                    </div>
-                    <div class="DetailDefault">
-                      <!-- <DetailList label="车辆里程(km)" :value="Detail.vehicleOdo"/> -->
-                      <!-- <DetailList label="车辆电池SOH" :value="Detail.vehicleSoh | PercentFilter"/> -->
-                    </div>
-                    <div class="DetailMin"></div>
-                </div>
-              </el-tab-pane>
-              <el-tab-pane label="预选电池" name="third">
-                <div class="RecordBottom" style="margin: 0;">
-                  <div class="DetailDefault"><DetailList label="预选电池仓位" :value="Detail.preselectionCode"/></div>
-                  <div class="DetailDefault" style="width:365px;"><DetailList label="预选满电电池SN" :value="Detail.preselectionSn"/></div>
-                  <div class="DetailMin" style="width:268px;"><DetailList label="预选满电电池SOC" :value="Detail.preselectionSoc | PercentFilter"/></div>
-                  <div class="DetailMin" style="width:268px;"><DetailList label="预选满电电池SOH" :value="Detail.preselectionSoh | PercentFilter"/></div>
-                </div>
-              </el-tab-pane>
-              <el-tab-pane label="更换快照" name="fourth">
-                <div class="DetailStoreList">
-                    <div class="DetailStore" v-for="(item,index) in Detail.beginBatSnapshot" :key="item.code">
-                        <div class="StoreHead">{{item.code}}号仓</div>
-                        <div class="StoreFoot">
-                            <div class="battery-begin">
-                                <span>电池编号:</span>
-                                <div class="frame-text">{{ item.sn || '-' }}</div>
-                                <div class="downInfo">
-                                  <span>落座信号:</span><div class="frame-text">{{ item.inPlace?'已落座':'未落座' }}</div>
-                                </div>
-                            </div>
-                            <div class="Store-direction"><img src="@/assets/record.png"></div>
-                            <div class="battery-begin" v-if="item.code===Detail.endBatSnapshot[index].code">
-                                <span>电池编号:</span>
-                                <div class="frame-text">{{Detail.endBatSnapshot[index].sn || '-'}}</div>
-                                <div class="downInfo">
-                                  <span>落座信号:</span><div class="frame-text">{{Detail.endBatSnapshot[index].inPlace?'已落座':'未落座'}}</div>
-                                </div>
-                            </div>
-                        </div>
-                    </div>
-                </div>
-              </el-tab-pane>
-              <el-tab-pane label="同步信息" name="sixth">
-                <div class="RecordBottom">
-                  <div class="DetailDefault" style="width:310px;"><DetailList label="同步状态" :value="cloudTimeState"/></div>
-                  <div class="DetailDefault" style="width:310px;"><DetailList label="同步时间" :value="Detail.uploadTime"/></div>
-                  <div class="DetailDefault"></div><div class="DetailDefault"></div>
-                </div>
-              </el-tab-pane>
-            </el-tabs>
-            <div class="DetailClose">
-                <div class="close" @click="dialogRecordDetailVisible=false">关闭</div>
-            </div>
-        </div>
-        <div slot="footer" class="dialog-footer"></div>
-      </el-dialog>
-    </div>
-    <!--记录详情弹窗结束-->
-    <!--导出弹窗-->
-    <div class="rolemanage">
-      <el-dialog :title="dialogType === 'find' ? '查看日志' : '导出日志'" :visible.sync="dialogexportVisible"
-        :destroy-on-close="true" @close="dialogClose">
-        <el-form :model="ruleForm" :rules="rules" ref="ExportForm" v-loading="loading">
-          <el-form-item label="任务名称:" prop="exportName" v-if="dialogType==='export'">
-            <el-input v-model="ruleForm.exportName" placeholder="请输入任务名称"></el-input>
-          </el-form-item>
-          <div class="checkFirst">
-            <div>日志范围:</div>
-            <template>
-              <el-form-item style="margin-left:8px; margin-top: 20px">
-                <el-select multiple v-model="robotValue" filterable clearable placeholder="全部" @change="changeSelect"
-                  collapse-tags @remove-tag="removeTag">
-                  <el-option label="全部" value="全部" @click.native="selectAll"></el-option>
-                  <el-option v-for="item in logOptions" :key="item.logCode" :label="item.logName"
-                    :value="item.logCode" />
-                </el-select>
-              </el-form-item>
-            </template>
-          </div>
-        </el-form>
-        <div slot="footer" class="dialog-footer">
-          <el-button type="primary" class="save" @click="handleExportLog">{{ dialogType==='find' ? '查看': '生成' }}</el-button>
-          <el-button class="exit" @click="dialogexportVisible = false">取消</el-button>
-        </div>
-      </el-dialog>
-    </div>
-    <!--导出弹窗结束-->
-  </div>
-</template>
-
-<script>
-import './permission.scss'
-import { swapList, swapExport,RecordFile,swapRecordDetail} from '@/api/records'
-import { logModel,exportFile } from "@/api/log";
-import DetailList from './DetailList'
-export default {
-  name: 'DirectivePermission',
-  components: {DetailList},
-  data() {
-    return {
-      activeName:'first',
-      ExhangeNo:'',
-      // 查询时间数组
-      dateArr: {
-        swapDate: []
-      },
-      // 数据列表
-      datalist: [],
-      // 查询参数
-      queryParams: {
-        page: 1, // 当前页
-        pageSize: 10, // 每页条数
-        vehiclePlate: undefined, // 车牌号
-        swapId: undefined, // 换电编号
-        swapBeginTime: undefined,
-        swapEndTime: undefined,
-        orderByField: undefined, // 排序字段
-        orderByWays: 'desc',// 排序方式
-        swapState:undefined
-      },
-      total: 0, // 总条数,
-      tableheight: 0,// 表格高度设置
-      dialogRecordDetailVisible:false,//详情弹窗状态
-      Detail:{},
-      //日志查询参数
-      serchParams:{
-        exchangeNo:undefined,//换电编号
-        startTime:undefined,//开始时间
-        endTime:undefined,//结束时间
-        signals:[],//日志范围
-      },
-      ruleForm:{
-        exportName:undefined,
-      },
-      rules:{
-        exportName: [
-            { required: true, message: '请输入任务名称', trigger: 'blur' },
-            { min: 2, max: 20, message: '长度在 2 到 20 个字符', trigger: 'blur' }
-          ],
-      },
-      dialogexportVisible: false, // 弹窗显示
-      logOptions: [],
-      logheader: [],
-      robotValue: "",
-      loading: false,
-      dialogType: "find", // 按钮类型(find、export)
-    }
-  },
-  computed:{
-    swapResult(){
-      switch(this.Detail.swapState){
-        case 0:
-          return '不完整';
-        case 1:
-          return '换电成功';
-        case 2:
-          return '换电失败';
-        case 3:
-          return '换电错误'
-      }
-    },
-    cloudTimeState(){
-      switch(this.Detail.state){
-        case 0:
-          return '待上传'
-        case 1:
-          return '上传成功'
-        case 2:
-          return '上传失败'
-      }
-    }
-  },
-  mounted() {
-    this.swapList()
-    this.onLoadHeight()//设置初始视窗高度
-    this.changeWindow()//设置窗口变化高度
-    this.getLogModel()
-  },
-  methods: {
-    selectAll() {
-      if (this.robotValue.length < this.logOptions.length) {
-        this.robotValue = [];
-        this.logOptions.map((item) => {
-          this.robotValue.push(item.alarmCode);
-        });
-      } else {
-        this.robotValue = [];
-      }
-    },
-    changeSelect(val) {
-      if (!val.includes("全部") && val.length === this.logOptions.length) {
-        this.robotValue.unshift("全部");
-      } else if (val.includes("全部") && val.length - 1 < this.logOptions.length) {
-        this.robotValue = this.robotValue.filter((item) => {
-          return item !== "全部";
-        });
-      }
-    },
-    removeTag(val) {
-      if (val === "全部") {
-        this.robotValue = [];
-      }
-    },
-    //获取日志数据字典
-    getLogModel() {
-      logModel().then((res) => {
-        this.logOptions = res.data;
-        this.logheader = res.data;
-      });
-    },
-    //日志查询
-    handleSerch(val){
-      this.dialogexportVisible=true
-      this.dialogType='find'
-      this.serchParams.exchangeNo=val.swapId
-      this.serchParams.startTime=val.swapBeginTime
-      this.serchParams.endTime=val.swapEndTime
-    },
-    //导出日志
-    handleExport(val){
-      this.dialogexportVisible=true
-      this.dialogType='export'
-      this.serchParams.startTime=val.swapBeginTime
-      this.serchParams.endTime=val.swapEndTime
-      this.serchParams.exchangeNo=val.swapId
-    },
-    handleExportLog(){
-      if(this.dialogType ==='find'){
-        this.serchParams.signals=this.robotValue
-        this.$router.push({name:"Robot",params:this.serchParams})
-      }else{
-        this.$refs.ExportForm.validate((valid) => {
-          if (valid) {
-            let addParams={
-              exportName:this.ruleForm.exportName,
-              signals:this.robotValue,
-              exchangeNo:this.serchParams.exchangeNo,
-              startTime:this.serchParams.startTime,
-              endTime:this.serchParams.endTime,
-              exportLogType:1
-            }
-            exportFile(addParams).then( res =>{
-              if(res.code === 0){
-                this.$router.push({path:"/manage-log/data-export"})
-              }else{
-                this.$message({
-                  message: res.msg,
-                  type: "warning",
-                  duration: 1000,
-                  offset: 20,
-                });
-              }
-            })
-          } else {
-            return false;
-          }
-        });
-      }
-    },
-    // 清空表单数据
-    dialogClose() { },
-    // 弹窗Tab切换
-    handleDialogTab(tab, event) {},
-    // 换电记录列表,
-    swapList() {
-      const params = this.queryParams     
-      swapList(params).then(res => {
-        this.datalist = res.data.records
-        this.total = res.data.total
-      })
-    },
-    /** 分页下一页 */
-    handleSizeChange(val) {
-      this.queryParams.pageSize = val
-      this.swapList()
-    },
-    /** 分页选择页数 */
-    handleCurrentChange(val) {
-      this.queryParams.page = val
-      this.swapList()
-    },
-    // 搜索
-    handleQuery() {     
-      if (this.dateArr.swapDate!==null && this.dateArr.swapDate.length !== 0) {
-        this.queryParams.swapBeginTime = this.dateArr.swapDate[0]+' '+'00:00:00'
-        this.queryParams.swapEndTime = this.dateArr.swapDate[1]+' '+'23:59:59'
-      }else{
-        this.queryParams.swapBeginTime=undefined
-        this.queryParams.swapEndTime=undefined
-      }
-      this.swapList()
-    },
-    // 搜索重置
-    resetForm() {
-      this.queryParams.swapBeginTime = undefined
-      this.queryParams.swapEndTime = undefined
-      this.queryParams.swapId = undefined
-      this.queryParams.vehiclePlate = undefined
-      this.queryParams.swapState=undefined
-      this.dateArr.swapDate=[]
-      this.swapList()
-    },
-    // 导出结果
-    swapExport() {
-      this.$confirm('确认导出结果?', '导出结果', {
-        confirmButtonText: '确认',
-        cancelButtonText: '取消',
-        type: 'warning'
-      })
-      .then(async() => {
-          const res = await swapExport(this.queryParams)
-          //const execlUrl=serverUrl.devServer.proxy['/api'].target+'/excel/'+res.data
-          const execlUrl=process.env.VUE_APP_BASE_API+'/excel/'+res.data
-          const resUrl=await RecordFile(execlUrl, res.data)
-        })
-      .catch(err => { console.error(err) })
-    },
-    //换电记录详情
-    RecordDetail(id){
-      this.dialogRecordDetailVisible=true     
-      if(id){
-        swapRecordDetail(id).then(res=>{          
-          if(res.code ===0){
-            this.Detail=res.data
-          }else{
-            this.$message.error(res.msg)
-          }
-        })
-      }
-    }
-  }
-}
-</script>
-<style lang="scss" scoped>
-  .el-form{
-    .is-required{
-        display: flex;
-        align-items: center;
-        justify-content: center;
-        padding-right: 25px;
-      }
-  }
-</style>

+ 0 - 181
src/views/permission/driver-manage/index.vue

@@ -1,181 +0,0 @@
-<template>
-    <div class="charge-box">
-      <div class="charge-tools">
-        <el-form :inline="true" :model="queryParams">
-  
-          <el-form-item label="司机姓名:">
-            <el-input placeholder="请输入司机姓名" v-model.trim="queryParams.driverName" clearable></el-input>
-          </el-form-item>
-  
-          <el-form-item label="身份证号:">
-            <el-input placeholder="请输入身份证号" v-model.trim="queryParams.driverCardNum" clearable></el-input>
-          </el-form-item>
-          <el-form-item label="手机号码:">
-            <el-input placeholder="请输入手机号码" v-model.trim="queryParams.driverMobile" clearable></el-input>
-          </el-form-item>
-          <el-form-item label="车辆状态:">
-            <el-select v-model="queryParams.state" clearable placeholder="请选择状态">
-              <el-option label="启用" value="1"></el-option>
-              <el-option label="禁用" value="0"></el-option>
-            </el-select>
-          </el-form-item>
-          <el-form-item>
-            <el-button type="primary" @click="handleQuery" class="serch actve">查询</el-button>
-            <el-button type="primary" @click="resetForm" class="serch">重置</el-button>
-          </el-form-item>
-  
-        </el-form>
-      </div>
-      <div class="charge-table">
-        <div class="charge-table-bottom">
-          <el-table
-            :data="datalist"
-            :header-cell-style="{
-              background: '#1d283e',
-              borderColor: '#2f3c86',
-              height: '36px',
-              lineHeight: '36px',
-              color:'white',
-              fontSize: '16px',
-            }"
-            stripe
-            fit
-            :height="tableheight"
-            style="width: 100%"
-            :default-sort = "{prop: 'id', order: 'descending'}"
-            >
-            <el-table-column prop="date" label="头像">
-              <template slot-scope="{row}">
-                <img :src="row.driverImage" style="height: 36px;width: 36px" v-if="row.driverImage">
-                <img src="@/assets/default.png" style="height: 36px;width: 36px" v-else>
-              </template>
-            </el-table-column>
-            <el-table-column
-              prop="driverNickName"
-              label="昵称">
-            </el-table-column>
-            <el-table-column
-              prop="driverCode"
-              label="司机编号"
-              >
-            </el-table-column>
-            <el-table-column
-              prop="driverName"
-              label="司机姓名"
-              >
-            </el-table-column>
-            <el-table-column
-              prop="driverMobile"
-              label="手机号">
-            </el-table-column>
-            <el-table-column
-              prop="driverCardNum"
-              label="身份证号">
-            </el-table-column>
-            <el-table-column
-              prop="createTime"
-              label="创建时间"
-              sortable
-              >
-            </el-table-column>
-            <el-table-column prop="name" label="状态" width="100" align="center">
-              <template slot-scope="{row}">
-                  <el-badge is-dot class="item" :class="{disable:row.state === 0}">{{row.state === 0 ? '停用' : '启用'}}</el-badge>
-              </template>
-            </el-table-column>
-          </el-table>
-        </div>
-        
-        <div class="pageblock">
-          <el-pagination
-              @size-change="handleSizeChange"
-              @current-change="handleCurrentChange"
-              :current-page="queryParams.page"
-              :page-sizes="[10, 20, 30, 40]"
-              :page-size="queryParams.pageSize"
-              layout="total, sizes, prev, pager, next, jumper"
-              :total="total">
-          </el-pagination>
-        </div>
-      </div>
-    </div>
-  </template>
-  
-  <script>
-  import { driverList } from "@/api/car";
-  import '../permission.scss';
-  export default {
-    name: "DriverManage",
-    components: {},
-    data() {
-      return {
-        datalist: [],
-        //查询参数
-        queryParams:{
-          page: 1, //当前页
-          pageSize:10,//每页条数
-          driverName:undefined, //司机姓名
-          driverCardNum:undefined, //身份证号
-          driverMobile:undefined, //手机号
-          state:undefined, //车辆状态
-          orderByField:undefined, //排序字段
-          orderByWays:'desc'//排序方式
-        },
-        total:0,//总条数,
-        tableheight:0,//表格高度设置,
-        defaultpng:'this.src="' + require('@/assets/default.png') + '"'
-      };
-    },
-    mounted() {
-      this.driverList()
-      this.onLoadHeight()
-      this.changeWindow()
-    },
-    methods: {
-      /*设置初始视窗高度*/
-      onLoadHeight(){
-        this.$nextTick(()=>{
-          this.tableheight = document.body.clientHeight - 460
-        })
-      },
-      /*设置窗口变化高度*/
-      changeWindow(){
-        window.onresize = () => {
-          return (() => {
-            this.tableheight = document.body.clientHeight - 460
-          })()
-        }
-      },
-      //车辆列表,
-      driverList(){
-        const params=this.queryParams
-        driverList(params).then(res=>{
-          this.datalist =res.data.records
-          this.total=res.data.total
-        });
-      },
-      /**分页下一页 */
-      handleSizeChange(val) {
-        this.queryParams.pageSize = val
-        this.driverList()
-      },
-      /**分页选择页数 */
-      handleCurrentChange(val) {
-        this.queryParams.page = val
-        this.driverList()
-      },
-      //搜索
-      handleQuery(){
-        this.driverList()
-      },
-      //搜索重置
-      resetForm(){
-        this.queryParams.driverName = undefined
-        this.queryParams.driverCardNum = undefined
-        this.queryParams.driverMobile = undefined
-        this.queryParams.state = undefined
-        this.driverList()
-      },
-    },
-  };
-  </script>

+ 0 - 305
src/views/permission/now-alarm/index.vue

@@ -1,305 +0,0 @@
-<template>
-  <div class="charge-box">
-    <div class="charge-tools">
-      <el-form :inline="true" :model="queryParams">
-
-        <el-form-item label="告警设备:">
-          <el-input placeholder="请输入告警设备" v-model="queryParams.equipment" clearable></el-input>
-        </el-form-item>
-
-        <el-form-item label="告警信息:">
-          <el-input placeholder="请输入告警信息" v-model.trim="queryParams.info" clearable></el-input>
-        </el-form-item>
-        <!-- <el-form-item label="告警状态:">
-          <el-select v-model="queryParams.state" clearable 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 label="告警时间:" >
-          <el-date-picker
-            class="times"
-            v-model="dateArr.alarmDate"
-            type="daterange"
-            range-separator="至"
-            start-placeholder="开始日期"
-            end-placeholder="结束日期"
-            value-format="yyyy-MM-dd"
-          >
-          </el-date-picker>
-        </el-form-item> -->
-
-        <el-form-item label="告警类型:">
-          <el-select v-model="queryParams.type" clearable placeholder="请选择类型">
-            <el-option label="充电机告警" value="1"></el-option>
-            <el-option label="BMS告警" value="2"></el-option>
-            <el-option label="机器人告警" value="3"></el-option>
-            <el-option label="消防告警" value="4"></el-option>
-          </el-select>
-        </el-form-item>
-
-        <el-form-item>
-          <el-button type="primary" @click="handleQuery" class="serch actve">查询</el-button>
-        <el-button type="primary" @click="resetForm" class="serch">重置</el-button>
-        </el-form-item>
-
-      </el-form>
-    </div>
-    <div class="charge-table">
-     
-      <div class="charge-table-bottom">
-        <el-table
-          :data="datalist"
-          :header-cell-style="{
-            background: '#1d283e',
-            borderColor: '#2f3c86',
-            height: '36px',
-            lineHeight: '36px',
-            color:'white',
-            fontSize: '16px',
-          }"
-          stripe
-          fit
-          :height="tableheight"
-          style="width: 100%"
-          :default-sort = "{prop: 'date', order: 'descending'}"
-          >
-          <el-table-column
-            prop="equipment"
-            label="告警设备">
-          </el-table-column>
-          <el-table-column
-            prop="type"
-            label="告警类型">
-          </el-table-column>
-          <el-table-column
-            prop="code"
-            label="告警标识">
-          </el-table-column>
-          <el-table-column
-            prop="info"
-            label="告警信息"
-            >
-          </el-table-column>
-          <el-table-column
-            prop="beginTime"
-            label="告警开始时间"
-            sortable
-            >
-          </el-table-column>
-          <!-- <el-table-column
-            prop="endTime"
-            label="告警结束时间"
-            sortable
-            >
-          </el-table-column> -->
-          <!-- <el-table-column label="告警状态">
-              <template slot-scope="scope">
-                <template v-if="scope.row.state === 0">
-                  <el-badge is-dot class="item nostate">待处理</el-badge>
-                </template>
-                <template v-else-if="scope.row.state === 1">
-                  <el-badge is-dot class="item instate">处理中</el-badge>
-                </template>
-                <template v-else>
-                  <el-badge is-dot class="item">已处理</el-badge>
-                </template>
-              </template>
-          </el-table-column> -->
-          <el-table-column label="操作" width="100" align="center">
-            <template slot-scope="scope">
-              <el-button type="primary" class="handle" size="small" @click="handlealarm(scope.row)">消防换仓</el-button>
-            </template>
-          </el-table-column>
-        </el-table>
-      </div>
-      
-      <div class="pageblock">
-        <el-pagination
-        @size-change="handleSizeChange"
-        @current-change="handleCurrentChange"
-        :current-page="queryParams.page"
-        :page-sizes="[10, 20, 30, 40]"
-        :page-size="queryParams.pageSize"
-        layout="total, sizes, prev, pager, next, jumper"
-        :total="total">
-      </el-pagination>
-      </div>
-    </div>
-
-    <!--处理告警弹窗-->
-    <div class="rolemanage alarmFrom">
-      <el-dialog 
-      title="消防告警处理" 
-      :visible.sync="dialogAlarmVisible" 
-      :destroy-on-close="true"
-      >
-      <div class="drawer_main_title">
-							系统检测到【电池/架载机】发生了消防问题,确认需要抓取电池吗?
-						</div>
-						<div class="drawer_main_tip">
-							<span>确认消防换仓:</span>机器人执行消防换仓动作。
-						</div>
-						<div class="drawer_main_tip">
-							<span>忽略:</span>放弃消防换仓。
-						</div>
-        <div slot="footer" class="dialog-footer">
-          <el-button type="primary" @click="alarmDispose" class="saveOk">确认消防换仓</el-button>
-          <el-button @click="dialogAlarmVisible = false" class="exit">忽略</el-button>
-        </div>
-      </el-dialog>
-    </div>
-    <!--处理告警弹窗结束-->
-  </div>
-</template>
-
-<script>
-import '../permission.scss';
-import { alarmList,alarmDispose,RecordFile,getrealList,FireChangestorage } from "@/api/records";
-export default {
-  name: "RecordAlarm",
-  components: {},
-  data() {
-    return {
-      // 表单校验
-     rules: {
-        remark:[
-          { min: 0, max: 30, message: '长度最大30个字符', trigger: 'blur' }
-        ],
-      },
-      //查询时间数组
-      dateArr: {
-        alarmDate: [],
-      },
-      datalist:[],
-      //查询参数
-      queryParams:{
-        page: 1, //当前页
-        pageSize:10,//每页条数
-        equipment:undefined, //充电机ID
-        info:undefined, //告警信息
-        beginTime:undefined,
-        endTime:undefined,
-        state:undefined, //告警状态
-        orderByField:undefined, //排序字段
-        orderByWays:'desc',//排序方式
-        type:undefined//告警类型
-      },
-      total:0,//总条数,
-      tableheight:0,//表格高度设置
-      dialogAlarmVisible:false,//弹窗状态
-      alarmFrom:{
-      },
-      formLabelWidth: '120px',
-      loading:false,
-    };
-  },
-  mounted() {
-    this.alarmList()
-    this.onLoadHeight()
-    this.changeWindow()
-  },
-  methods: {
-    //告警记录列表,
-    alarmList(){
-      const params=this.queryParams
-      getrealList(params).then(res=>{
-        if(res.code == 0){
-          res.data.list.forEach(item=>{
-            if(item.type == 1){
-              item.type = '充电机告警'
-            }else if(item.type == 2){
-              item.type = 'BMS告警'
-            }else if(item.type == 3){
-              item.type = '机器人告警'
-            }else if(item.type == 4){
-              item.type = '消防告警'
-            }
-          })
-          this.datalist =res.data.list
-        this.total=res.data.total
-        }
-       
-      });
-    },
-    /**分页下一页 */
-    handleSizeChange(val) {
-      this.queryParams.pageSize = val
-      this.alarmList()
-    },
-    /**分页选择页数 */
-    handleCurrentChange(val) {
-      this.queryParams.page = val
-      this.alarmList()
-    },
-    //搜索
-    handleQuery(){
-      if(this.dateArr.alarmDate.length !== 0){
-        this.queryParams.beginTime = this.dateArr.alarmDate[0]+' '+'00:00:00'
-        this.queryParams.endTime = this.dateArr.alarmDate[1]+' '+'23:59:59'
-      }else{
-        this.queryParams.beginTime=undefined
-        this.queryParams.endTime=undefined
-      }
-      this.alarmList()
-    },
-    //搜索重置
-    resetForm(){
-      this.queryParams.beginTime = undefined
-      this.queryParams.state = undefined
-      this.queryParams.equipment = undefined
-      this.queryParams.info = undefined
-      this.queryParams.type = undefined
-      this.dateArr.alarmDate=[]
-      this.alarmList()
-    },
- 
-    //告警状态弹窗
-    handlealarm(row){
-      this.alarmFrom=row;
-      this.dialogAlarmVisible=true;
-    },
-    //处理告警
-    alarmDispose(){
-      const params={
-        targetCode: this.alarmFrom.chargerCode,
-      }
-      // FireChangestorage(params).then(res=>{
-      //   if(res.code === 0){
-      //     this.loading = false;
-      //     this.dialogAlarmVisible = false;
-      //     this.$message({
-      //       type: 'success',
-      //       message: '操作成功!'
-      //     })
-      //     this.alarmList()
-      //   }else {
-      //     this.loading = false;
-      //     return this.$message.error(res.msg);
-      //   }
-      // })
-    },
-  },
-};
-</script>
-<style lang="scss" scoped>
-.saveOk{
-  width: 150px;
-  height: 36px;
-  line-height: 36px;
-  text-align: center;
-}
-		.drawer_main_title{
-			font-size: 16px;
-		}
-		.drawer_main_tip{
-			font-size: 14px;
-			margin-top: 20px;
-			span{
-				font-size: 16px;
-			}
-		}
-  
-</style>

+ 0 - 194
src/views/permission/page.vue

@@ -1,194 +0,0 @@
-<template>
-  <div class="charge-box">
-    <div class="charge-tools">
-      <el-form :inline="true" :model="queryParams">
-        <el-form-item label="充电机ID:">
-          <el-select v-model="queryParams.chargerId" clearable placeholder="请选择">
-            <el-option v-for="item in chargerArr" :key="item.value" :label="item + '号充电机'" :value="item" />
-          </el-select>
-        </el-form-item>
-
-        <el-form-item label="电池编号:">
-          <el-input v-model.trim="queryParams.chgSn" placeholder="请输入电池编号" clearable />
-        </el-form-item>
-
-        <el-form-item label="充电时间:">
-          <el-date-picker v-model="dateArr.chargerDate" class="times" type="daterange" range-separator="至"
-            start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd" />
-        </el-form-item>
-
-        <el-form-item>
-          <el-button type="primary" class="serch actve" @click="handleQuery">查询</el-button>
-          <el-button type="primary" class="serch" @click="resetForm">重置</el-button>
-        </el-form-item>
-
-      </el-form>
-    </div>
-    <div class="charge-table">
-      <div class="charge-table-top" style="color: white;">
-
-        <el-button type="primary" class="daochu" @click="chargeExport">导出结果</el-button>
-      </div>
-      <div class="charge-table-bottom">
-        <el-table :data="datalist" :header-cell-style="{
-          background: '#1d283e',
-          borderColor: '#2f3c86',
-          color: 'white',
-        }" stripe fit :height="tableheight" style="width: 100%">
-          <el-table-column prop="chargerId" label="充电机ID" fixed width="120" />
-          <el-table-column prop="chgId" label="充电流水号" width="270" />
-          <el-table-column prop="chgSn" label="电池编号" width="180" />
-          <el-table-column prop="chgBeginTime" label="充电开始时间" width="180" />
-          <el-table-column prop="chgEndTime" label="充电结束时间" width="180" />
-          <el-table-column prop="chgDuration" label="充电时长(秒)" sortable width="160" />
-          <el-table-column prop="chgBeginSoc" label="开始SOC(%)" width="150" />
-          <el-table-column prop="chgEndSoc" label="结束SOC" width="150" />
-          <el-table-column prop="chgCapacity" label="充电量" sortable width="120" />
-          <el-table-column prop="chgBeginAmmeter" label="充电前电表数" width="160" />
-          <el-table-column prop="chgEndAmmeter" label="充电后电表数" width="160" />
-          <el-table-column prop="chgEndReason" label="充电结束原因" width="160" />
-          <el-table-column prop="chgAccumCapacity" label="累计充电量" sortable width="160" />
-          <el-table-column label="时段明细" width="100" align="center" fixed="right">
-            <template slot-scope="scope">
-              <el-button type="primary" class="handle" size="small" @click="chargeShow(scope.row.interval)">明细</el-button>
-            </template>
-          </el-table-column>
-        </el-table>
-      </div>
-      <div class="pageblock">
-        <el-pagination :current-page="queryParams.page" :page-sizes="[10, 20, 30, 40]" :page-size="queryParams.pageSize"
-          layout="total, sizes, prev, pager, next, jumper" :total="total" @size-change="handleSizeChange"
-          @current-change="handleCurrentChange" />
-      </div>
-    </div>
-
-    <!--时段明细弹窗-->
-    <div class="rolemanage chargeshow">
-      <el-dialog title="充电明细" :visible.sync="dialogChargeVisible" :destroy-on-close="true">
-        <div class="charge-table-bottom">
-          <el-table :data="chargeShowList" :header-cell-style="{
-            background: '#1d283e',
-            borderColor: '#2f3c86',
-            color: 'white',
-          }" stripe fit :height="tableheight - 80" style="width: 100%">
-            <el-table-column prop="index" label="序号" />
-            <el-table-column prop="startTime" label="开始时间段" />
-            <el-table-column prop="endTime" label="结束时间段" />
-            <el-table-column prop="chargePower" label="充电量kWh" />
-          </el-table>
-        </div>
-        <div slot="footer" class="dialog-footer" />
-      </el-dialog>
-    </div>
-    <!--时段明细弹窗结束-->
-  </div>
-</template>
-
-<script>
-import './permission.scss'
-import { chargeList, chargeExport, getChargeCode, RecordFile } from '@/api/records'
-export default {
-  name: 'PagePermission',
-  components: {},
-  data() {
-    return {
-      // 查询时间数组
-      dateArr: {
-        chargerDate: []
-      },
-      // 充电机ID下拉列表
-      chargerArr: null,
-      // 数据列表
-      datalist: [],
-      // 查询参数
-      queryParams: {
-        page: 1, // 当前页
-        pageSize: 10, // 每页条数
-        chargerId: undefined, // 充电机ID
-        chgSn: undefined, // 电池编号
-        chgBeginTime: undefined,
-        chgEndTime: undefined,
-        orderByField: undefined, // 排序字段
-        orderByWays: 'desc'// 排序方式
-      },
-      total: 0, // 总条数,
-      tableheight: 0, // 表格高度设置
-      dialogChargeVisible: false, // 弹窗显示
-      chargeShowList: []// 充电机明细弹窗列表
-    }
-  },
-  mounted() {
-    this.chargeList()
-    this.getChargeCode()
-    this.onLoadHeight()//设置初始视窗高度
-    this.changeWindow()//设置窗口变化高度
-  },
-  methods: {    
-    // 充电明细弹窗显示
-    chargeShow(list) {
-      this.dialogChargeVisible = true
-      this.chargeShowList = list
-    },
-    // 获取充电机ID
-    getChargeCode() {
-      getChargeCode().then(res => {
-        this.chargerArr = res.data
-      })
-    },
-    // 充电记录列表,
-    chargeList() {
-      const params = this.queryParams
-      chargeList(params).then(res => {
-        this.datalist = res.data.records
-        this.total = res.data.total
-      })
-    },
-    /** 分页下一页 */
-    handleSizeChange(val) {
-      this.queryParams.pageSize = val
-      this.chargeList()
-    },
-    /** 分页选择页数 */
-    handleCurrentChange(val) {
-      this.queryParams.page = val
-      this.chargeList()
-    },
-    // 搜索
-    handleQuery() {
-      if (this.dateArr.chargerDate?.length !== 0 &&this.dateArr.chargerDate) {
-        this.queryParams.chgBeginTime = this.dateArr.chargerDate[0]+' '+'00:00:00'
-        this.queryParams.chgEndTime = this.dateArr.chargerDate[1]+' '+'23:59:59'
-      }else{
-        this.queryParams.chgBeginTime=undefined
-        this.queryParams.chgEndTime=undefined
-      }
-      this.chargeList()
-    },
-    // 搜索重置
-    resetForm() {
-      this.queryParams.chgBeginTime = undefined
-      this.queryParams.chgEndTime = undefined
-      this.queryParams.chargerId = undefined
-      this.queryParams.chgSn = undefined
-      this.dateArr.chargerDate=[]
-      this.chargeList()
-    },
-    // 导出结果
-    chargeExport() {
-      this.$confirm('确认导出结果?', '导出结果', {
-        confirmButtonText: '确认',
-        cancelButtonText: '取消',
-        type: 'warning'
-      })
-        .then(async () => {
-          const res = await chargeExport(this.queryParams)
-          // const execlUrl=process.env.VUE_APP_BASE_API+'/excel/'+res.data
-          // window.open(execlUrl,'_blank')
-          const execlUrl = process.env.VUE_APP_BASE_API + '/excel/' + res.data
-          const resUrl = await RecordFile(execlUrl, res.data)
-        })
-        .catch(err => { console.error(err) })
-    }
-  }
-}
-</script>

+ 0 - 210
src/views/permission/rate/index.vue

@@ -1,210 +0,0 @@
-<template>
-  <div class="charge-box">
-    <div class="charge-tools">
-      <el-form :inline="true" :model="queryParams">
-        <el-form-item label="模型名称:">
-          <el-input placeholder="请输入司机姓名" v-model="queryParams.modelName" clearable></el-input>
-        </el-form-item>
-        <el-form-item>
-          <el-button type="primary" @click="handleQuery" class="serch actve">查询</el-button>
-          <el-button type="primary" @click="resetForm" class="serch">重置</el-button>
-        </el-form-item>
-
-      </el-form>
-    </div>
-    <div class="charge-table">
-
-      <div class="charge-table-bottom">
-        <el-table :data="datalist" :header-cell-style="{
-          background: '#1d283e',
-          borderColor: '#2f3c86',
-          height: '36px',
-          lineHeight: '36px',
-          color: 'white',
-          fontSize: '16px',
-        }" stripe fit :height="tableheight" style="width: 100%" :default-sort="{ prop: 'date', order: 'descending' }">
-          <el-table-column prop="modelId" label="费率模型版本">
-          </el-table-column>
-          <el-table-column prop="modelName" label="模型名称">
-          </el-table-column>
-          <el-table-column prop="createTime" label="下发时间">
-          </el-table-column>
-          <el-table-column label="操作" width="150" align="center">
-            <template slot-scope="scope">
-              <el-button type="primary" class="handle" size="small" @click="handlealarm(scope.row)">详情</el-button>
-              <el-button type="primary" class="handle" size="small" v-if="scope.row.isCanDelete == 0"
-                @click="del(scope.row)">删除</el-button>
-            </template>
-          </el-table-column>
-        </el-table>
-      </div>
-
-      <div class="pageblock">
-        <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
-          :current-page="queryParams.page" :page-sizes="[10, 20, 30, 40]" :page-size="queryParams.pageSize"
-          layout="total, sizes, prev, pager, next, jumper" :total="total">
-        </el-pagination>
-      </div>
-    </div>
-
-    <!--弹窗-->
-    <div class="rolemanage alarmFrom">
-      <el-dialog title="详情" :visible.sync="dialogAlarmVisible" :destroy-on-close="true">
-        <el-form :model="alarmFrom" class="dislog">
-          <el-form-item label="费率模型名称:" label-width="120px">
-            <el-input v-model="alarmFrom.modelName" disabled></el-input>
-          </el-form-item></el-form>
-
-        <div class="charge-table-bottom">
-          <el-table :data="alarmFrom.rateDetailList" :header-cell-style="{
-            background: '#1d283e',
-            borderColor: '#2f3c86',
-            height: '36px',
-            lineHeight: '36px',
-            color: 'white',
-            fontSize: '16px',
-          }" stripe fit style="width: 100%" :default-sort="{ prop: 'date', order: 'descending' }">
-            <el-table-column prop="startTime" label="费率起始时分">
-            </el-table-column>
-            <el-table-column prop="chargePower" label="电价费率(kW·h/元)">
-            </el-table-column>
-            <el-table-column prop="serPower" label="服务费率(kW·h/元)">
-            </el-table-column>
-          </el-table>
-        </div>
-        <div slot="footer" class="dialog-footer">
-
-        </div>
-      </el-dialog>
-    </div>
-    <!--处理告警弹窗结束-->
-  </div>
-</template>
-  
-<script>
-import '../permission.scss';
-import { getratelist, getdeletecode } from "@/api/records";
-export default {
-  name: "RecordAlarm",
-  components: {},
-  data() {
-    return {
-      // 表单校验
-      rules: {
-        remark: [
-          { min: 0, max: 30, message: '长度最大30个字符', trigger: 'blur' }
-        ],
-      },
-      //查询时间数组
-      dateArr: {
-        alarmDate: [],
-      },
-      datalist: [],
-      //查询参数
-      queryParams: {
-        page: 1, //当前页
-        pageSize: 10,//每页条数
-        modelName: undefined, //充电机ID
-        orderByField: undefined, //排序字段
-        orderByWays: 'desc'//排序方式
-      },
-      total: 0,//总条数,
-      tableheight: 0,//表格高度设置
-      dialogAlarmVisible: false,//弹窗状态
-      alarmFrom: {
-      },
-      formLabelWidth: '120px',
-      loading: false,
-    };
-  },
-  mounted() {
-    this.alarmList()
-    this.onLoadHeight()
-    this.changeWindow()
-  },
-  methods: {
-    //告警记录列表,
-    alarmList() {
-      const params = this.queryParams
-      getratelist(params).then(res => {
-        this.datalist = res.data.list
-        this.total = res.data.total
-      });
-    },
-    /**分页下一页 */
-    handleSizeChange(val) {
-      this.queryParams.pageSize = val
-      this.alarmList()
-    },
-    /**分页选择页数 */
-    handleCurrentChange(val) {
-      this.queryParams.page = val
-      this.alarmList()
-    },
-    //搜索
-    handleQuery() {
-      this.alarmList()
-    },
-    //搜索重置
-    resetForm() {
-      this.queryParams.modelName = undefined
-      this.alarmList()
-    },
-    //弹窗
-    handlealarm(row) {
-      console.log(row, 'rp')
-      this.alarmFrom = row
-      this.dialogAlarmVisible = true;
-    },
-    //删除
-    del(e) {
-      this.$confirm("删除数据将丢失,请确认是否删除", "确认删除", {
-        confirmButtonText: "确认",
-        cancelButtonText: "取消",
-        type: "warning",
-      }).then(async () => {
-        await getdeletecode(e.id).then(res => {
-          if (res.code == 0) {
-            this.$message({
-              type: "success",
-              message: "删除成功!",
-            });
-            this.alarmList()
-          }
-        })
-      })
-        .catch((err) => {
-          console.error(err);
-        });
-
-    }
-  },
-};
-</script>
-<style lang="scss" scoped>
-::v-deep .is-disabled {
-  .el-input__inner {
-    border: 1px solid #556179 !important;
-  }
-
-  margin-bottom: 20px;
-}
-
-::v-deep .el-dialog__body {
-  padding: 0px;
-  padding-top: 20px;
-}
-
-::v-deep .dislog {
-  .el-form-item {
-    margin-left: 0px;
-  }
-}
-
-::v-deep .el-dialog__body {
-  .el-table__body-wrapper {
-    max-height: 280px;
-    overflow-y: auto;
-  }
-}
-</style>

+ 0 - 330
src/views/permission/role.vue

@@ -1,330 +0,0 @@
-<template>
-  <div class="charge-box">
-    <div class="routename">{{ $route.meta.title }}</div>
-    <div class="charge-tools">
-      <el-form ref="SerchForm" :inline="true">
-        <el-form-item label="账号:" style="margin-left: 35px;">
-          <el-input v-model.trim="queryParams.userAccount" placeholder="请输入账号" clearable />
-        </el-form-item>
-
-        <el-form-item label="账号状态:" style="margin-left: 50px;">
-          <el-select v-model="queryParams.state" clearable placeholder="请选择状态">
-            <el-option label="启用" value="1" />
-            <el-option label="禁用" value="0" />
-          </el-select>
-        </el-form-item>
-
-        <el-form-item>
-          <el-button type="primary" class="serch actve" @click="handleQuery">查询</el-button>
-          <el-button type="primary" class="serch" @click="resetForm">重置</el-button>
-        </el-form-item>
-
-      </el-form>
-    </div>
-    <div class="charge-table">
-      <div class="adduser">
-        <el-button type="primary" class="addbtn" @click="handleAddRole">新增账号</el-button>
-      </div>
-      <div class="charge-table-bottom">
-        <el-table
-          :data="UserList"
-          :header-cell-style="{
-            background: '#1d283e',
-            borderColor: '#2f3c86',
-            height: '36px',
-            lineHeight: '36px',
-            color:'white',
-            fontSize: '16px',
-          }"
-          stripe
-          style="width: 100%"
-          :default-sort="{prop: 'date', order: 'descending'}"
-        >
-          <el-table-column label="序号" type="index" :index="indexMethod" width="300" />
-          <el-table-column prop="userAccount" label="账号" />
-
-          <el-table-column prop="updateTime" label="创建时间" sortable>
-            <template slot-scope="{row}">
-              {{ row.updateTime }}
-            </template>
-          </el-table-column>
-          <el-table-column label="状态">
-            <template slot-scope="{row}">
-              <el-badge is-dot class="item" :class="{disable:row.state === 0}">{{ row.state === 0 ? '停用' : '启用' }}</el-badge>
-            </template>
-          </el-table-column>
-          <el-table-column label="操作" align="center" width="160">
-            <template v-if="scope.row.userAccount !== 'admin'" slot-scope="scope">
-              <el-button type="primary" class="handle" size="small" @click="handleEdit(scope.row)">编辑</el-button>
-              <el-button type="primary" class="handle" size="small" @click="handleDelete(scope.row.id)">删除</el-button>
-            </template>
-          </el-table-column>
-        </el-table>
-      </div>
-
-      <div class="pageblock">
-        <el-pagination
-          :current-page="queryParams.page"
-          :page-sizes="[10, 20, 30, 40]"
-          :page-size="queryParams.pageSize"
-          layout="total, sizes, prev, pager, next, jumper"
-          :total="total"
-          @size-change="handleSizeChange"
-          @current-change="handleCurrentChange"
-        />
-      </div>
-    </div>
-    <!--新增账号弹窗-->
-    <div class="rolemanage">
-      <el-dialog
-        :title="dialogType==='edit'?'编辑账号':'新增账号'"
-        :visible.sync="dialogUserVisible"
-        :destroy-on-close="true"
-        @close="dialogClose"
-      >
-        <el-form
-          ref="ruleForm"
-          v-loading="loading"
-          :model="formData"
-          :rules="rules"
-        >
-          <el-form-item label="账号:" :label-width="formLabelWidth" prop="userAccount">
-            <el-input v-model.trim="formData.userAccount" autocomplete="off" placeholder="请输入账号" :disabled="dialogType==='edit'" />
-          </el-form-item>
-          <el-form-item v-if="dialogType==='edit'" label="密码:" :label-width="formLabelWidth">
-            <el-button type="primary" class="reset" @click="resetpwd">重置密码</el-button>
-          </el-form-item>
-          <el-form-item v-if="dialogType==='new' || pwdIsShow" label="默认密码:" :label-width="formLabelWidth">
-            <el-input v-model="formData.pwd" autocomplete="off" placeholder="88888888" disabled />
-          </el-form-item>
-          <el-form-item label="状态" :label-width="formLabelWidth">
-            <el-select v-model="formData.state" placeholder="请选择状态">
-              <el-option label="启用" value="1" />
-              <el-option label="禁用" value="0" />
-            </el-select>
-          </el-form-item>
-          <el-form-item label="备注:" :label-width="formLabelWidth" prop="remark">
-            <el-input v-model="formData.remark" type="textarea" :rows="4" placeholder="请输入30字以内" maxlength="30" />
-          </el-form-item>
-        </el-form>
-        <div slot="footer" class="dialog-footer">
-          <el-button class="exit" @click="dialogUserVisible = false">取 消</el-button>
-          <el-button type="primary" class="save" @click="AddUserinfo">确 定</el-button>
-        </div>
-      </el-dialog>
-    </div>
-    <!--新增账号弹窗结束-->
-  </div>
-</template>
-
-<script>
-import './permission.scss'
-import { addUserinfo, getUserlist, deleteUser, updateUser, resetpwd } from '@/api/user'
-export default {
-  name: 'UpdatePassword',
-  components: {},
-  data() {
-    return {
-      UserList: [],
-      dialogUserVisible: false, // 弹窗显示
-      // 新增账号弹窗
-      formData: {
-        userAccount: '',
-        state: '1',
-        pwd: '88888888',
-        remark: '',
-        id: 0
-      },
-      formLabelWidth: '120px',
-      // 新增账号弹窗结束
-      dialogType: 'new', // 按钮类型(new、edit)
-      loading: false,
-      // 表单校验
-      rules: {
-        userAccount: [
-          { required: true, message: '账号不能为空', trigger: 'blur' },
-          { min: 4, max: 16, message: '长度在 4 到 16 个字符', trigger: 'blur' }
-        ],
-        remark: [
-          { min: 0, max: 30, message: '长度最大30个字符', trigger: 'blur' }
-        ]
-      },
-      pwdIsShow: false, // 默认密码显示
-      total: 0, // 总条数
-      queryParams: {
-        page: 1, // 当前页
-        pageSize: 10, // 每页条数
-        state: undefined,
-        userAccount: undefined,
-        orderByField: undefined, // 排序字段
-        orderByWays: 'desc'// 排序方式
-      }
-    }
-  },
-  mounted() {
-    this.getUserlist()
-  },
-  methods: {
-    // 添加用户、编辑用户
-    AddUserinfo() {
-      this.$refs.ruleForm.validate((valid) => {
-        if (valid) {
-          // 添加用户
-          if (this.dialogType === 'new') {
-            addUserinfo(this.formData).then(res => {
-              if (res.code === 0) {
-                this.loading = false
-                this.dialogUserVisible = false
-                this.$message({
-                  type: 'success',
-                  message: '操作成功!'
-                })
-                this.getUserlist()
-              } else {
-                this.loading = false
-                return this.$message.error(res.msg)
-              }
-            })
-          }
-          // 修改用户
-          else {
-            const updateFrom = this.formData
-            delete updateFrom.pwd
-            console.log(updateFrom)
-            updateUser(updateFrom).then(res => {
-              if (res.code === 0) {
-                this.loading = false
-                this.dialogUserVisible = false
-                this.$message({
-                  type: 'success',
-                  message: '操作成功!'
-                })
-                this.getUserlist()
-              } else {
-                this.loading = false
-                return this.$message.error(res.msg)
-              }
-            })
-          }
-        }
-      })
-    },
-    // 获取用户列表
-    getUserlist() {
-      const params = this.queryParams
-      getUserlist(params).then(res => {
-        this.UserList = res.data.records
-        this.total = res.data.total
-        // console.log(res.data)
-      })
-    },
-    /** 分页下一页 */
-    handleSizeChange(val) {
-      this.queryParams.pageSize = val
-      this.getUserlist()
-    },
-    /** 分页选择页数 */
-    handleCurrentChange(val) {
-      this.queryParams.page = val
-      this.getUserlist()
-    },
-    // 添加、编辑、删除账号
-    handleAddRole() {
-      this.dialogType = 'new'
-      this.dialogUserVisible = true
-    },
-    handleEdit(row) {
-      this.formData.userAccount = row.userAccount
-      this.formData.state = row.state + ''
-      this.formData.remark = row.remark
-      this.formData.id = row.id
-      this.dialogType = 'edit'
-      this.dialogUserVisible = true
-    },
-    handleDelete(userId) {
-      this.$confirm('删除数据将丢失,请确认是否删除', '确认删除', {
-        confirmButtonText: '确认',
-        cancelButtonText: '取消',
-        type: 'warning'
-      })
-        .then(async() => {
-          await deleteUser({ id: userId })
-          this.$message({
-            type: 'success',
-            message: '删除成功!'
-          })
-          this.getUserlist()
-        })
-        .catch(err => { console.error(err) })
-    },
-    // 序号自定义
-    indexMethod(index) {
-      return '1010' + (index + 1)
-    },
-    // 清空表单数据
-    dialogClose() {
-      this.formData.userAccount = ''
-      this.pwdIsShow = false
-    },
-    // 重置密码
-    resetpwd() {
-      this.$confirm('确认初始化密码?', '重置密码', {
-        confirmButtonText: '确认',
-        cancelButtonText: '取消',
-        type: 'warning'
-      })
-        .then(async() => {
-          await resetpwd({ id: this.formData.id, userAccount: this.formData.userAccount })
-          this.$message({
-            type: 'success',
-            message: '重置成功!'
-          })
-          this.pwdIsShow = true
-          setTimeout(() => {
-            this.dialogUserVisible = false
-          }, 2000)
-        })
-        .catch(err => { console.error(err) })
-    },
-    // 搜索
-    handleQuery() {
-      if (this.queryParams.userAccount === '') {
-        this.queryParams.userAccount = undefined
-      }
-      this.getUserlist()
-    },
-    // 搜索重置
-    resetForm() {
-      this.queryParams.userAccount = undefined
-      this.queryParams.state = undefined
-    }
-  }
-}
-</script>
-<style lang="scss" scoped>
-.routename {
-  padding: 25px 10px;
-  font-size: 20px;
-  color: white;
-  font-weight: 600;
-}
-
-.adduser {
-  padding: 20px 0;
-
-  .addbtn {
-    background-color: #91fdb9;
-    color: #111827;
-    border: none;
-    font-size: 15px;
-    font-weight: 600;
-    height: 40px;
-    width: 110px;
-  }
-  .addbtn:hover{
-      background-color: #69b889;
-      border-color: #69b889;
-      color: white;
-  }
-}
-</style>

+ 0 - 166
src/views/permission/updatepwd.vue

@@ -1,166 +0,0 @@
-<template>
-    <div class="charge-box">
-        <div class="routename">{{$route.meta.title}}</div>
-        <div class="updatebox">
-            <div class="frompwd">
-                <el-form :model="ruleForm" status-icon :rules="rules" ref="ruleForm" label-width="120px"
-                    class="demo-ruleForm">
-                    <el-form-item label="当前密码:" prop="currentPass">
-                        <el-input type="password" v-model="ruleForm.currentPass" placeholder="请输入当前密码"
-                            autocomplete="off"></el-input>
-                    </el-form-item>
-                    <el-form-item label="修改密码:" prop="newPass">
-                        <el-input type="password" v-model="ruleForm.newPass" placeholder="请输入修改密码" autocomplete="off">
-                        </el-input>
-                    </el-form-item>
-                    <el-form-item label="确认修改密码:" prop="checkPass">
-                        <el-input type="password" v-model="ruleForm.checkPass" placeholder="请输入确认修改密码"></el-input>
-                    </el-form-item>
-                    <el-form-item>
-                        <el-button type="primary" @click="updatePwd('ruleForm')" class="savefrom save">确定</el-button>
-                        <el-button @click="resetForm('ruleForm')" class="reset exit">重置</el-button>
-                    </el-form-item>
-                </el-form>
-            </div>
-        </div>
-    </div>
-</template>
-  
-<script>
-import './permission.scss';
-import { updatepwd } from "@/api/user";
-export default {
-    name: "UpdatePassword",
-    components: {},
-    data() {
-        var checkcurrentPass = (rule, value, callback) => {
-            if (!value) {
-                return callback(new Error('当前密码不能为空'));
-            }
-            setTimeout(() => {
-                if (value.length < 6) {
-                    callback(new Error('密码不少于6位数'));
-                }
-                callback();
-            });
-        };
-        var validatenewPass = (rule, value, callback) => {
-            if (value === '') {
-                callback(new Error('请输入新密码'));
-            } else if (value.length < 6) {
-                callback(new Error('密码不应少于6位数'));
-            }
-            else {
-                if (this.ruleForm.checkPass !== '') {
-                    this.$refs.ruleForm.validateField('checkPass');
-                }
-                callback();
-            }
-        };
-        var validatecheckPass = (rule, value, callback) => {
-            if (value === '') {
-                callback(new Error('请输入确认密码'));
-            } else if (value !== this.ruleForm.newPass) {
-                callback(new Error('两次输入密码不一致!'));
-            } else {
-                callback();
-            }
-        };
-        return {
-            ruleForm: {
-                currentPass: '',
-                newPass: '',
-                checkPass: ''
-            },
-            rules: {
-                currentPass: [
-                    { validator: checkcurrentPass, trigger: 'blur' }
-                ],
-                newPass: [
-                    { validator: validatenewPass, trigger: 'blur' }
-                ],
-                checkPass: [
-                    { validator: validatecheckPass, trigger: 'blur' }
-                ]
-            },
-            loading:false
-        };
-    },
-    mounted(){
-        // console.log(this.$store.getters.roles)
-    },
-    methods: {
-        updatePwd(formName) {
-            this.$refs[formName].validate((valid) => {
-                if (valid) {
-                    const params={
-                        id:localStorage.getItem('userId')*1,
-                        userAccount:this.$store.getters.name,
-                        userPwd:this.ruleForm.currentPass,
-                        newPwd:this.ruleForm.newPass
-                    }
-                    updatepwd(params).then(res => {
-                        if(res.code === 0){
-                            this.$message({
-                                message: '修改成功,3秒之后将重新登录!',
-                                type: 'success',
-                                duration: 3 * 1000,
-                            });
-                            this.loading = true;
-                            setTimeout(() =>{
-                                this.$store.dispatch('user/logout').then(() => {
-                                    this.$router.push({
-                                        path: "/login",
-                                    });
-                                })
-                            },3000)
-                        }else{
-                            return this.$message.error(res.msg)
-                        }
-                    })
-                }else {
-                    return false;
-                }
-            });
-        },
-        resetForm(formName) {
-            this.$refs[formName].resetFields();
-        }
-    },
-};
-</script>
-<style lang="scss" scoped>
-.routename {
-    padding: 25px 10px;
-    font-size: 20px;
-    color: white;
-    font-weight: 600;
-}
-
-.updatebox {
-    padding: 10px 35px;
-    width: 100%;
-    background-color: #111827;
-    border: #192337 solid 1px;
-    min-height: 488px;
-
-    .frompwd {
-        width: 520px;
-        margin: 0 auto;
-        padding-top: 80px;
-
-        .savefrom {
-            
-            font-weight: 600;
-            width: 80px;
-            height: 38px;
-        }
-
-        .reset {
-            height: 36px;
-            box-sizing: content-box;
-            padding: 0px 5px;
-        }
-    }
-}
-</style>

+ 0 - 756
src/views/statistical-analysis/index.vue

@@ -1,756 +0,0 @@
-<template>
-    <div class="analysis-box">
-        <div class="analysis-tools">
-            <el-form :inline="true" :model="formDate">
-                <el-form-item>
-                    <el-button type="primary" class="days" @click="Sevenday">近7天</el-button>
-                    <el-button type="primary" class="days" @click="Monthday">近30天</el-button>
-                </el-form-item>
-                <el-form-item label="时间:" style="margin-left:60px">
-                    <el-date-picker class="times" v-model="formDate.dateArr" type="daterange" range-separator="至"
-                        start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd">
-                    </el-date-picker>
-                </el-form-item>
-                <el-form-item>
-                    <el-button type="primary" @click="SerchEcharts" class="serch actve">查询</el-button>
-                    <el-button type="primary" @click="InitEchart" class="serch">重置</el-button>
-                </el-form-item>
-            </el-form>
-        </div>
-
-        <div class="power-line">
-            <div class="line-top">
-                <span></span><span>换电曲线</span>
-            </div>
-            <div class="line-bottom" ref="firstline"></div>
-        </div>
-
-        <div class="analysis-warning">
-            <div class="warning-type">
-                <div class="warning-top">
-                    <span></span><span>告警类型占比</span>
-                </div>
-                <div class="warning-bottom" ref="firstpie"></div>
-            </div>
-            <div class="warning-bar">
-                <div class="bar-top">
-                    <span></span><span>告警次数趋势图</span>
-                </div>
-                <div class="bar-bottom" ref="firstbar"></div>
-            </div>
-        </div>
-    </div>
-</template>
-
-<script>
-let echarts = require("echarts/lib/echarts")
-import { changePower,getAlarmType,getAlarm} from "@/api/statistics";
-export default {
-    name: "StatisticalAnalysis",
-    data() {
-        return {
-            formDate: {
-                dateArr: '',
-            },
-            beginTime:'',
-            endTime:'',
-            beginSenvenTime:'',
-            lineData:{
-                data:{
-                    date:[],
-                    swapCapacity:[], //换电量
-                    swapFreq:[], //换电次数
-                }
-            },
-            pieData:{
-                alarmFreq:0, //总次数
-                batteryAlarm:'', //电池告警比例
-                batteryFreq:0, //电池告警次数
-                storeAlarm:'', //储充告警比例
-                storeFreq:0, //储充告警次数
-                systemAlarm:'', //系统告警比例
-                systemFreq:0 //系统告警次数
-            },
-            barData:{
-                alarmFreq:[],
-                date:[],
-            },
-            fullscreenLoading:false
-        }
-    },
-    mounted() {
-        this.InitEchart()
-    },
-    methods: {
-        //初始化统计图
-        InitEchart(){
-            this.formDate.dateArr=[]
-            const start = new Date()
-            const serven = new Date()
-            const end = new Date()
-            this.beginTime=this.$moment(start.setTime(start.getTime() - 3600 * 1000 * 24 * 30)).format('YYYY-MM-DD')
-            this.beginSenvenTime=this.$moment(serven.setTime(serven.getTime() - 3600 * 1000 * 24 * 6)).format('YYYY-MM-DD')
-            this.endTime=this.$moment(end).format('YYYY-MM-DD')
-            const params = {
-                beginTime:this.beginTime,
-                endTime:this.endTime
-            }
-            const dateobj = {
-                beginTime:this.beginSenvenTime,
-                endTime:this.endTime
-            }
-            this.changePower(params)//换电曲线
-            this.getAlarmType(params) //告警类型
-            this.getAlarm(dateobj) //告警次数
-        },
-        //换电曲线
-        changePower(params){
-            changePower(params).then(res => {
-                if(res.code === 0){
-                    this.lineData=res.data
-                    this.$nextTick(()=>{
-                        this.getFirstline()
-                    })
-                }else{
-                    return this.$message.error(res.msg);
-                }
-            })
-        },
-        //告警类型
-        getAlarmType(params){
-            getAlarmType(params).then(res => {
-                if(res.code === 0){
-                    this.pieData = res.data
-                    this.$nextTick(()=>{
-                        this.getFirstpie()
-                    })
-                }else{
-                    return this.$message.error(res.msg);
-                }
-            })
-        },
-        //告警次数
-        getAlarm(params){
-            getAlarm(params).then(res => {
-                if(res.code === 0){
-                    this.barData = res.data
-                    this.$nextTick(()=>{
-                        this.getFirstbar()
-                    })
-                }else{
-                    return this.$message.error(res.msg);
-                }
-            })
-        },
-        //曲线图
-        getFirstline() {
-            let firstline = echarts.init(this.$refs.firstline)
-            var data = {
-                year: [
-                    this.lineData.swapCapacity,
-                    this.lineData.swapFreq
-                ]
-            };
-            // 2. 指定配置和数据
-            var option = {
-                title: {
-                    text: '单位:次',
-                    textStyle: {
-                        color: '#c9d9fa',
-                        fontSize: '14px'
-                    },
-                    padding: [2, 0, 0, 20]
-                },
-                color: ["#1ee7e7", "#1890ff"],
-                tooltip: {
-                    // 通过坐标轴来触发
-                    trigger: "axis",
-                    backgroundColor: "rgba(187,207,249,0.9)",
-                    textStyle: {
-                        color: "black",
-                    },
-                    axisPointer: {
-                        lineStyle: {
-                            color: "#2f353f",
-                            type: "line",
-                        }
-                    }
-                },
-
-                legend: {
-                    // 距离容器10%
-                    top: "3%",
-                    x: 'center',
-                    // 修饰图例文字的颜色
-                    icon: 'circle',
-                    itemWidth: 8,
-                    itemHeight: 8,
-                    textStyle: {
-                        color: "#ffffff"
-                    },
-                    // 如果series 里面设置了name,此时图例组件的data可以省略
-                },
-                grid: {
-                    top: "15%",
-                    left: "1%",
-                    right: "1%",
-                    bottom: "0%",
-                    show: false,
-                    borderColor: "#012f4a",
-                    containLabel: true
-                },
-                xAxis: {
-                    type: "category",
-                    //boundaryGap: true,
-                    // splitLine: {
-                    //     show: true,
-                    //     lineStyle: {
-                    //         color: "#2f353f",
-                    //         type:'dashed'
-                    //     }
-                    // },
-                    data: this.lineData.date,
-                    // 去除刻度
-                    axisTick: {
-                        show: false,
-                    },
-
-                    // 修饰刻度标签的颜色
-                    axisLabel: {
-                        // interval:this.tsWidth,
-                        color: "white",
-                        fontSize: "14px",
-                        margin: 20,
-                    },
-                    // 去除x坐标轴的颜色
-                    axisLine: {
-                        show: true,
-                        lineStyle: {
-                            color: "#3c4552",
-                        }
-                    },
-                },
-                yAxis:[ {
-                    type: "value",
-                    name: this.tsDate,
-                    nameTextStyle: {
-                        padding: [0, 35, 10, 868],
-                        fontWeight: "bold",
-                        fontSize: "13px",
-                        color: "#d6e7ff",
-                    },
-                    max:100,
-                    min:0,
-                    // 去除刻度
-                    axisTick: {
-                        show: false
-                    },
-                    // 修饰刻度标签的颜色
-                    axisLabel: {
-                        color: "rgba(255,255,255,.7)",
-                    },
-                    axisLine: { show: false },
-                    // 修改y轴分割线的颜色
-                    splitLine: {
-                        lineStyle: {
-                            color: "#2f353f",
-                            type: 'dashed'
-                        }
-                    }
-                }, {
-                    type: "value",
-                    name: 'kWh',
-                    nameTextStyle: {
-                        padding: [0, 35, 10, 80],
-                        fontWeight: "bold",
-                        fontSize: "13px",
-                        color: "#d6e7ff",
-                    },
-                    max:500,
-                    min:0,
-                    // 去除刻度
-                    axisTick: {
-                        show: false
-                    },
-                    // 修饰刻度标签的颜色
-                    axisLabel: {
-                        color: "rgba(255,255,255,.7)",
-                    },
-                    axisLine: { show: false },
-                    // 修改y轴分割线的颜色
-                    splitLine: {
-                        lineStyle: {
-                            color: "#2f353f",
-                            type: 'dashed'
-                        }
-                    }
-                }],
-                series: [
-                    {
-                        name: "换电量",
-                        type: "line",
-                        stack: "总量",
-                        // 是否让线条圆滑显示
-                        smooth: true,
-                        data: data.year[0]
-                    },
-                    {
-                        name: "换电次数",
-                        type: "line",
-                        stack: "总量",
-                        smooth: true,
-                        data: data.year[1]
-                    }
-                ]
-            };
-            // 3. 把配置和数据给实例对象
-            firstline.setOption(option);
-        },
-        //饼状图
-        getFirstpie() {
-            let firstpie = echarts.init(this.$refs.firstpie)
-            let getChartPointx=this.getFontSize(168);
-            let getChartPointy=this.getFontSize(80);
-            let getChartHeight=this.getFontSize(24);
-            let getChartSize=this.getFontSize(16);
-            let getChartTop=this.getFontSize(12);
-            var dataCake = [
-                { value: this.pieData.storeFreq, name: '储充告警', percentage: this.pieData.storeAlarm },
-                { value: this.pieData.batteryFreq, name: '电池告警', percentage: this.pieData.batteryAlarm },
-                { value: this.pieData.systemFreq, name: '机器人告警', percentage: this.pieData.systemAlarm },
-                { value: this.pieData.fireFreq, name: '消防告警', percentage: this.pieData.fireAlarm },
-            ]
-            var option = {
-                title: {
-                    text: '{a|总数次}'+'\n'+this.pieData.alarmFreq,
-                    left: getChartPointx,
-                    top:getChartPointy,
-                    textAlign: 'center',
-                    // 可以设置显示的样式
-                    textStyle: {
-                        color: 'white',
-                        fontWeight: 'bold',
-                        lineHeight: getChartHeight,
-                        fontSize: getChartSize,
-                        rich:{
-                            a:{
-                                fontWeight:600,
-                                fontSize: 14,
-                                color: '#14bdf3',
-                            }
-                        }
-                    }
-                },
-                tooltip: {
-                    trigger: "item",
-                    backgroundColor: "rgba(187,207,249,0.9)",
-                    padding: [15],
-                    textStyle: {
-                        color: "black",
-                    },
-                    // formatter: "{b}: {c}次 {d}%",
-                    formatter(params){
-                        return params.data.name +': &nbsp' + params.data.value + '次 &nbsp' + params.data.percentage
-                    },
-                    position: function (p) {
-                        //其中p为当前鼠标的位置
-                        return [p[0] + 10, p[1] - 10];
-                    }
-                },
-                legend: {
-                    top: getChartTop+'%',
-                    left: "52%",
-                    itemWidth: 8,
-                    itemHeight: 8,
-                    icon: 'circle',
-                    orient: 'vertical',
-                    itemGap:30,
-                    formatter: function (name) {
-                        let target, percentage;
-                        let result=''
-                        for (let i = 0; i < dataCake.length; i++) {
-                            if (dataCake[i].name === name) {
-                                target = dataCake[i].value
-                                percentage = dataCake[i].percentage
-                                result += `${name}    ${target+'次'}     ${percentage}`
-                            }
-                            
-                        }
-                        return result 
-
-                    },
-                    textStyle: {
-                        color: "white",
-                        fontSize: getChartSize,
-                        lineHeight:'12',
-                    }
-                },
-                series: [
-                    {
-                        name:'',
-                        type: "pie",
-                        center: ["30%", "42%"],
-                        radius: ["40%", "70%"],
-                        color: [
-                            "#3254dd",
-                            "#48e5e5",
-                            "#2b8ef3",
-                            "#99AEC5"
-                        ],
-                        label: { show: false },
-                        labelLine: { show: false },
-                        data: dataCake,
-                        itemStyle: {
-                            // emphasis:英文意思是 强调;着重;(轮廓、图形等的)鲜明;突出,重读
-                            // emphasis:设置鼠标放到哪一块扇形上面的时候,扇形样式、阴影
-                            emphasis: {
-                                shadowBlur: 6,
-                                shadowOffsetX: 0,
-                                shadowColor: 'white'
-                            }
-                        },
-                        // 设置值域的那指向线
-                        labelLine: {
-                            normal: {
-                                show: false   // show设置线是否显示,默认为true,可选值:true ¦ false
-                            }
-                        },
-                    }
-                ]
-            };
-            firstpie.setOption(option);
-        },
-        //柱状图
-        getFirstbar() {
-            let firstbar = echarts.init(this.$refs.firstbar)
-            var option = {
-                color: ["#1890ff"],
-                title: {
-                    text: '单位:次',
-                    textStyle: {
-                        color: '#c9d9fa',
-                        fontSize: '14px'
-                    },
-                    padding: [2, 0, 0, 25]
-                },
-                tooltip: {
-                    // 通过坐标轴来触发
-                    trigger: "axis",
-                    backgroundColor: "rgba(187,207,249,0.9)",
-                    textStyle: {
-                        color: "black",
-                    },
-                    axisPointer: {
-                        lineStyle: {
-                            color: "#2f353f",
-                            type: "line",
-                        }
-                    }
-                },
-                legend: {
-                    // 距离容器10%
-                    top: "3%",
-                    x: 'center',
-                    // 修饰图例文字的颜色
-                    icon: 'circle',
-                    itemWidth: 8,
-                    itemHeight: 8,
-                    textStyle: {
-                        color: "#ffffff"
-                    },
-                    // 如果series 里面设置了name,此时图例组件的data可以省略
-                },
-                grid: {
-                    left: "2%",
-                    top: "15%",
-                    right: "2%",
-                    bottom: "4%",
-                    containLabel: true
-                },
-                xAxis: [
-                    {
-                        type: "category",
-                        splitLine: {
-                            show: true,
-                            lineStyle: {
-                                color: "#2f353f",
-                                type:'dashed'
-                            }
-                        },
-                        data: this.barData.date,
-                        axisTick: {
-                            show: false,
-                        },
-                        axisLabel: {
-                            textStyle: {
-                                color: "white",
-                                fontSize: "12"
-                            }
-                        },
-                        axisLine: {
-                            show: true,
-                            lineStyle: {
-                                color: "#3c4552",
-                            }
-                        }
-                    }
-                ],
-                yAxis: [
-                    {
-                        type: "value",
-                        axisTick: {
-                            show: false,
-                        },
-                        axisLabel: {
-                            textStyle: {
-                                color: "#c9d9fa",
-                                fontSize: "12"
-                            }
-                        },
-                        axisLine: {
-                            lineStyle: {
-                                color: "rgba(255,255,255,.1)",
-                                // width: 1,
-                                type: "line"
-                            }
-                        },
-                        splitLine: {
-                            lineStyle: {
-                                color: "rgba(55,64,77,0.9)",
-                                type: "line"
-                            }
-                        }
-                    }
-                ],
-                series: [
-                    {
-                        name: "告警次数",
-                        type: "bar",
-                        barWidth: "35%",
-                        data: this.barData.alarmFreq,
-                        itemStyle: {
-                            barBorderRadius: 4,
-                            normal:{
-                                color:'#1890ff'
-                            }
-                        }
-                    }
-                ]
-            };
-            firstbar.setOption(option);
-        },
-        //查询
-        SerchEcharts(){
-            this.beginTime=this.formDate.dateArr[0],
-            this.endTime=this.formDate.dateArr[1]
-            const params={
-                beginTime:this.beginTime,
-                endTime:this.endTime
-            }
-            if((params.beginTime && params.endTime) !== undefined){
-                this.$nextTick(()=>{
-                    this.changePower(params)
-                    this.getAlarmType(params)
-                    this.getAlarm(params)
-                })
-            }else{
-                this.$alert('请选择开始日期和结束日期', '消息提示', {
-                    confirmButtonText: '退出',
-                    type: 'warning'
-                })
-            }
-        },
-        //近7天日期
-        Sevenday(){
-            this.loading=true
-            const start = new Date();
-            const end = new Date();
-            this.beginTime=this.$moment(start.setTime(start.getTime() - 3600 * 1000 * 24 * 6)).format('YYYY-MM-DD')
-            this.endTime=this.$moment(end).format('YYYY-MM-DD')
-            const params = {
-                beginTime:this.beginTime,
-                endTime:this.endTime
-            }
-            this.$nextTick(()=>{
-                this.changePower(params)
-                this.getAlarmType(params)
-                this.getAlarm(params)
-                this.loading=false
-            })
-        },
-        //近30天日期
-        Monthday(){
-            const start = new Date();
-            const end = new Date();
-            this.beginTime=this.$moment(start.setTime(start.getTime() - 3600 * 1000 * 24 * 30)).format('YYYY-MM-DD')
-            this.endTime=this.$moment(end).format('YYYY-MM-DD')
-            const params = {
-                beginTime:this.beginTime,
-                endTime:this.endTime
-            }
-            this.$nextTick(()=>{
-                this.changePower(params)
-                this.getAlarmType(params)
-                this.getAlarm(params)
-            })
-        },
-    }
-};
-</script>
-
-<style lang="scss" scoped>
-.analysis-box {
-    display: flex;
-    flex-direction: column;
-    padding: 20px 34px;
-
-    .analysis-tools {
-        height: 38px;
-        background-color: #111827;
-        border: #192337 solid 1px;
-        padding: 25px;
-        box-sizing: content-box;
-        
-        .serch {
-            background-color: #111827;
-            width: 70px;
-            height: 40px;
-            border: #263042 solid 1px;
-            margin-left: 16px;
-            font-size: 16px;
-        }
-
-        .actve {
-            background-color: #91fdb9;
-            color: #111827;
-            border: none;
-        }
-
-        .days {
-            background-color: #111827;
-            height: 40px;
-            border: #263042 solid 1px;
-            width: 92px;
-            margin-right: 18px;
-            font-size: 16px;
-            
-        }
-        .times {
-            background-color: #111827;
-            height: 40px;
-            border: #263042 solid 1px;
-        }
-    }
-
-    .power-line {
-        display: flex;
-        flex-direction: column;
-        background-color: #111827;
-        border: #192337 solid 1px;
-        margin: 18px 0px;
-
-        .line-top {
-            height: 64px;
-            border-bottom: #3a404c solid 1px;
-            padding: 0 25px;
-            display: flex;
-
-            span:first-child {
-                height: 20px;
-                width: 3px;
-                background-color: white;
-                margin-top: 22px;
-            }
-
-            span:last-child {
-                font-size: 20px;
-                font-weight: 600;
-                color: white;
-                text-shadow: 0 0 3px #1753ce, 0 0 4px #1753ce, 0 0 3px #1753ce, 0 0 3px #1753ce;
-                margin-top: 21px;
-                margin-left: 10px;
-            }
-        }
-
-        .line-bottom {
-            min-height: 395px;
-            padding: 20px 0;
-        }
-    }
-
-    .analysis-warning {
-        background-color: #111827;
-        border: #192337 solid 1px;
-        padding: 18px;
-        display: flex;
-        justify-content: space-between;
-
-        .warning-type {
-            width: 32%;
-            height: 340px;
-            border: #192337 solid 1px;
-
-            .warning-top {
-                height: 64px;
-                padding: 0 18px;
-                display: flex;
-
-                span:first-child {
-                    height: 20px;
-                    width: 3px;
-                    background-color: white;
-                    margin-top: 22px;
-                }
-
-                span:last-child {
-                    font-size: 20px;
-                    font-weight: 600;
-                    color: white;
-                    text-shadow: 0 0 3px #1753ce, 0 0 4px #1753ce, 0 0 3px #1753ce, 0 0 3px #1753ce;
-                    margin-top: 21px;
-                    margin-left: 10px;
-                }
-            }
-
-            .warning-bottom {
-                min-height: 265px;
-                margin-top: 20px;
-            }
-        }
-
-        .warning-bar {
-            flex: 1;
-            border: #192337 solid 1px;
-            margin-left: 20px;
-
-            .bar-top {
-                height: 64px;
-                border-bottom: #3a404c solid 1px;
-                padding: 0 25px;
-                display: flex;
-
-                span:first-child {
-                    height: 20px;
-                    width: 3px;
-                    background-color: white;
-                    margin-top: 22px;
-                }
-
-                span:last-child {
-                    font-size: 20px;
-                    font-weight: 600;
-                    color: white;
-                    text-shadow: 0 0 3px #1753ce, 0 0 4px #1753ce, 0 0 3px #1753ce, 0 0 3px #1753ce;
-                    margin-top: 21px;
-                    margin-left: 10px;
-                }
-            }
-
-            .bar-bottom {
-                min-height: 265px;
-                margin-top: 10px;
-            }
-        }
-    }
-}
-</style>