浏览代码

Merge branch 'master' of http://120.26.64.82:10880/BFFE/SMAirports

zhaoke 1 年之前
父节点
当前提交
ceebafe4da

+ 2 - 2
public/index.html

@@ -11,8 +11,8 @@
     <meta http-equiv="X-Content-Type-Options" content="nosniff" />
     <link rel="icon" href="<%= BASE_URL %>favicon.ico" />
     <title><%= webpackConfig.name %></title>
-    <script src="<%= BASE_URL %>staticConfig.js" type="text/javascript"></script>
-    <script id="configJS" src="<%= BASE_URL %>config.js" type="text/javascript"></script>
+    <!-- <script src="<%= BASE_URL %>staticConfig.js" type="text/javascript"></script> -->
+    <!-- <script id="configJS" src="<%= BASE_URL %>config.js" type="text/javascript"></script> -->
   </head>
   <body>
     <div id="app"></div>

+ 1 - 1
src/api/flight.js

@@ -1,5 +1,5 @@
 import request from '@/utils/request'
-
+import '@/config/staticConfig' //配置文件
 // 全部机场查询
 export function CurrentAirportQuery (params) {
   return request({

+ 1 - 1
src/api/temp.js

@@ -1,6 +1,6 @@
 import request from '@/utils/request'
 import { Message } from 'element-ui'
-
+import '@/config/staticConfig' //配置文件
 export function GeneralDataReception (params) {
   return request({
     url: '/openApi/generalDataReception',

+ 6 - 5
src/components/PassengerDialog/index.vue

@@ -6,8 +6,8 @@
     <div
       id="dialogPassenger"
       ref="dialog"
-      tabindex="0"
       v-loading="loading"
+      tabindex="0"
       element-loading-text="拼命加载中"
       element-loading-spinner="el-icon-loading"
       element-loading-background="rgba(0, 0, 0, 0.8)"
@@ -60,7 +60,7 @@
                 />
               </el-form-item>
               <Identify
-                :identifyCode="checkCode"
+                :identify-code="checkCode"
                 style="margin-left: 24px"
                 @changeCode="changeCode"
               />
@@ -75,7 +75,7 @@
               alt="旅客信息"
               title="旅客信息"
               class="passenger-info-img"
-            />
+            >
           </div>
         </template>
       </div>
@@ -103,6 +103,7 @@ import Identify from '@/views/login/identify'
 import { mapGetters } from 'vuex'
 import { GetCheckCode, CheckUser } from '@/api/temp'
 import { GetPassengerInfo } from '@/api/flight'
+import '@/config/staticConfig' // 配置文件
 // import { getToken } from '@/utils/auth'
 import MD5 from 'blueimp-md5'
 
@@ -155,7 +156,7 @@ export default {
       this.$refs['checkForm']?.resetFields()
       this.$store.dispatch('app/togglePassengerDialogFlag', false)
     },
-    //获取动态验证码
+    // 获取动态验证码
     async getCheckCode() {
       try {
         const { code, data, message } = await GetCheckCode({
@@ -170,7 +171,7 @@ export default {
         this.$message.error('失败')
       }
     },
-    //验证码重新获取
+    // 验证码重新获取
     changeCode() {
       this.getCheckCode()
     },

+ 0 - 0
public/config.js → src/config/config.js


+ 0 - 0
public/staticConfig.js → src/config/staticConfig.js


+ 1 - 0
src/getMenu.js

@@ -8,6 +8,7 @@ import getPageTitle from '@/utils/get-page-title'
 import Layout from '@/layout'
 import { setTree, listToTree } from '@/utils/validate'
 import * as _ from 'lodash'
+import '@/config/staticConfig' //按钮权限 全局自定义指令v-is
 
 NProgress.configure({ showSpinner: false }) // NProgress Configuration
 

+ 19 - 19
src/layout/index.vue

@@ -1,12 +1,12 @@
 <template>
   <div class="app-wrapper">
-    <sidebar class="sidebar-container" id="sidebar-containers" />
+    <sidebar id="sidebar-containers" class="sidebar-container" />
     <div class="main-container">
       <navbar />
       <app-main id="main-containers" />
     </div>
     <!--修改密码弹框-->
-    <Dialog width="496px" customClass="dataStoreInfoDialog" :flag="pwdflag">
+    <Dialog width="496px" custom-class="dataStoreInfoDialog" :flag="pwdflag">
       <div class="dialog-public-background">
         <div class="title">修改密码</div>
         <div class="content">
@@ -16,20 +16,20 @@
           <div class="ruleZf">
             密码规则:长度为8-20个字符,并且必须包含数字、大写字母、小写字母、特殊字符
           </div>
-          <el-form :model="dataForm" :rules="dataRules" ref="dataForm" class="demo-dataForm">
+          <el-form ref="dataForm" :model="dataForm" :rules="dataRules" class="demo-dataForm">
             <el-form-item label="旧密码" prop="old">
-              <el-input size="medium" placeholder="请输入旧密码" show-password v-model="dataForm.old"></el-input>
+              <el-input v-model="dataForm.old" size="medium" placeholder="请输入旧密码" show-password />
             </el-form-item>
             <el-form-item label="新密码" prop="new">
-              <el-input size="medium" placeholder="请输入新密码" show-password v-model="dataForm.new"></el-input>
+              <el-input v-model="dataForm.new" size="medium" placeholder="请输入新密码" show-password />
             </el-form-item>
             <el-form-item label="再次确认新密码" prop="again">
-              <el-input size="medium" placeholder="请再次确认新密码" show-password v-model="dataForm.again"></el-input>
+              <el-input v-model="dataForm.again" size="medium" placeholder="请再次确认新密码" show-password />
             </el-form-item>
           </el-form>
         </div>
         <div class="foot center t30">
-          <el-button size="medium" type="primary" @click="addSubmit('dataForm')" class="r24">保存</el-button>
+          <el-button size="medium" type="primary" class="r24" @click="addSubmit('dataForm')">保存</el-button>
           <el-button v-if="!restFlag" size="medium" @click="resetForm('dataForm')">取消</el-button>
         </div>
       </div>
@@ -40,8 +40,8 @@
         <div class="flx">退出系统</div>
         <div class="content">是否确认退出系统?</div>
         <div class="foot right t30" style="margin-top: 24px">
-          <el-button size="medium" class="r25 r26" @click="outQd" type="primary">确定</el-button>
-          <el-button size="medium" @click="outQx" class="r26">取消</el-button>
+          <el-button size="medium" class="r25 r26" type="primary" @click="outQd">确定</el-button>
+          <el-button size="medium" class="r26" @click="outQx">取消</el-button>
         </div>
       </div>
     </Dialog>
@@ -65,6 +65,7 @@ import PassengerDialog from '@/components/PassengerDialog'
 import AbnormalBaggageDialog from '@/components/AbnormalBaggageDialog'
 import WarningDialog from '@/components/WarningDialog'
 import ErrorDialog from '@/components/ErrorDialog'
+import '@/config/staticConfig' // 按钮权限 全局自定义指令v-is
 export default {
   name: 'Layout',
   components: {
@@ -81,14 +82,14 @@ export default {
   data () {
     return {
       dataForm: {
-        //数据项表单
+        // 数据项表单
         old: '',
         new: '',
         again: '',
       },
       // leup: true,
       dataRules: {
-        //数据项表单验证
+        // 数据项表单验证
         old: [{ required: true, message: '请输入旧密码', trigger: 'blur' }],
         new: [{ required: true, message: '请输入新密码', trigger: 'blur' }],
         again: [
@@ -105,7 +106,7 @@ export default {
     this.getLastLoginTime()
   },
   methods: {
-    //获取最后登录时间
+    // 获取最后登录时间
     async getLastLoginTime () {
       try {
         const { code, returnData } = await Query({
@@ -134,7 +135,7 @@ export default {
         console.log(error)
       }
     },
-    //存储数据项-提交
+    // 存储数据项-提交
     addSubmit (formName) {
       this.$refs[formName].validate(valid => {
         if (valid) {
@@ -146,8 +147,7 @@ export default {
               return false
             }
             this.editPwd()
-          }
-          else {
+          } else {
             this.$message.error('请根据密码规则设置密码')
           }
         } else {
@@ -155,16 +155,16 @@ export default {
         }
       })
     },
-    //存储数据项-取消
+    // 存储数据项-取消
     resetForm (formName) {
       this.$store.dispatch('app/togglePwdflag', false)
       this.$refs[formName].resetFields()
     },
-    //退出系统-取消
+    // 退出系统-取消
     outQx () {
       this.$store.dispatch('app/toggleOutflag', false)
     },
-    //退出系统-确定
+    // 退出系统-确定
     async outQd () {
       const res = await this.$store.dispatch('user/logout')
       const that = this
@@ -209,7 +209,7 @@ export default {
             ],
             Value: {
               user_pwd: MD5(this.dataForm.again),
-              lastPasswordModificationTime: this.$moment().format("YYYY-MM-DD HH:mm:ss")
+              lastPasswordModificationTime: this.$moment().format('YYYY-MM-DD HH:mm:ss')
             },
           },
         })

+ 3 - 1
src/main.js

@@ -20,7 +20,9 @@ import router from './router'
 import '@/icons' // icon
 // import '@/permission'
 import '@/getMenu'
-import '@/config/checkPermission' //按钮权限 全局自定义指令v-is
+import '@/config/staticConfig' //按钮权限 全局自定义指令v-is
+import '@/config/checkPermission' //配置文件
+import '@/config/config' //服务配置文件
 
 Vue.use(ElementUI)
 Vue.prototype._ = _

+ 1 - 0
src/store/modules/user.js

@@ -3,6 +3,7 @@ import { resetRouter } from '@/router'
 import { Query } from "@/api/webApi"
 import { isValue } from "@/utils/validate"
 import { getAuth, signIn, loginOut } from '@/api/login'
+import '@/config/staticConfig' //按钮权限 全局自定义指令v-is
 const getDefaultState = () => {
   return {
     token: getToken(),

+ 1 - 0
src/utils/request-new.js

@@ -2,6 +2,7 @@ import axios from 'axios'
 import { MessageBox, Message } from 'element-ui'
 import { getToken, getCodeToken, TokenKey } from '@/utils/auth'
 import store from '@/store'
+import '@/config/staticConfig' //按钮权限 全局自定义指令v-is
 let isMttoken
 // create an axios instance
 const service = axios.create({

+ 1 - 0
src/utils/request.js

@@ -3,6 +3,7 @@ import { MessageBox, Message } from "element-ui";
 import store from "@/store";
 import router, { resetRouter } from "@/router";
 import { getToken, TokenKey, removeToken } from "@/utils/auth";
+import '@/config/staticConfig' //按钮权限 全局自定义指令v-is
 // create an axios instance
 // let baseURL
 // if (process.env.NODE_ENV === "development") {

+ 1 - 0
src/utils/requestTemp.js

@@ -2,6 +2,7 @@ import axios from 'axios'
 import { MessageBox, Message } from 'element-ui'
 import store from '@/store'
 import router, { resetRouter } from '@/router'
+import '@/config/staticConfig' //按钮权限 全局自定义指令v-is
 // import { getToken, getUserId, removeToken } from '@/utils/auth'
 // import MD5 from 'blueimp-md5'
 // create an axios instance

+ 62 - 61
src/views/login/index.vue

@@ -3,7 +3,7 @@
     <el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form" auto-complete="on" label-position="left">
       <div class="title-container flex-wrap">
         <el-avatar :size="36" :src="imgSrc" @error="errorHandler">
-          <img src="@/assets/logo/error.png" />
+          <img src="@/assets/logo/error.png">
         </el-avatar>
         <!-- <el-divider direction="vertical"></el-divider> -->
         <div class="content-box">
@@ -29,44 +29,45 @@
         <el-form-item class="flex1" prop="identify">
           <el-input ref="identify" v-model="loginForm.identify" placeholder="请输入验证码" name="identify" tabindex="3" auto-complete="on" @keyup.enter.native="handleLogin" />
         </el-form-item>
-        <img @click="changeCode" style="width: 116px;height: 40px;margin-left: 18px;cursor: pointer;" :src="baseImg" alt="验证码">
+        <img style="width: 116px;height: 40px;margin-left: 18px;cursor: pointer;" :src="baseImg" alt="验证码" @click="changeCode">
       </div>
 
       <el-button :loading="loading" type="primary" style="width: 100%;margin-top: 18px;height: 42px;border-radius: 2px;" @click.native.prevent="handleLogin">登录</el-button>
-      <p v-if="timeMinunt.state" class="stateError">当前登录错误次数过多,{{timeMinunt.time}}分钟后可以再次登录</p>
+      <p v-if="timeMinunt.state" class="stateError">当前登录错误次数过多,{{ timeMinunt.time }}分钟后可以再次登录</p>
     </el-form>
   </div>
 </template>
 
 <script>
-import { isValue } from "@/utils/validate";
-import { getVCode, getToken } from "@/api/login";
-import { setCodeToken, getCodeToken, setToken } from '@/utils/auth';
+import { isValue } from '@/utils/validate'
+import { getVCode, getToken } from '@/api/login'
+import { setCodeToken, getCodeToken, setToken } from '@/utils/auth'
 import MD5 from 'blueimp-md5'
 import { mapGetters } from 'vuex'
+import '@/config/staticConfig' // 按钮权限 全局自定义指令v-is
 export default {
-  name: "Login",
+  name: 'Login',
   data () {
     return {
       text: `<a onclick='("XSS")'>链接</a>`,
       flag: false,
       PwdMessage: null,
       loginForm: {
-        username: "",
-        password: "",
-        identify: "",
+        username: '',
+        password: '',
+        identify: '',
       },
       loginRules: {
         username: [
-          { required: true, trigger: "blur", message: "请输入用户名" },
+          { required: true, trigger: 'blur', message: '请输入用户名' },
         ],
-        password: [{ required: true, trigger: "blur", message: "请输入密码" }],
+        password: [{ required: true, trigger: 'blur', message: '请输入密码' }],
         identify: [
-          { required: true, trigger: "blur", message: "请输入验证码" },
+          { required: true, trigger: 'blur', message: '请输入验证码' },
         ],
       },
       loading: false,
-      passwordType: "password",
+      passwordType: 'password',
       redirect: undefined,
       isCode: false,
       pageTitle: '',
@@ -75,12 +76,12 @@ export default {
       appId: '',
       userCount: 0,
       timer: null,
-    };
+    }
   },
   watch: {
     $route: {
       handler: function (route) {
-        this.redirect = route.query && route.query.redirect;
+        this.redirect = route.query && route.query.redirect
       },
       immediate: true,
     }
@@ -100,29 +101,29 @@ export default {
         'appSecret': PLATFROM_CONFIG.appKeyString
       })
       if (code == 0 && isValue(returnData)) {
-        const { app_log, app_name, app_token, active_duration, app_code_rule } = returnData;
+        const { app_log, app_name, app_token, active_duration, app_code_rule } = returnData
         this.imgSrc = window.location.origin + app_log
         this.pageTitle = app_name
         this.isCode = app_code_rule
-        setCodeToken(app_token);
-        setToken('active_duration', active_duration);
+        setCodeToken(app_token)
+        setToken('active_duration', active_duration)
         sessionStorage.setItem('appLog', app_log)
         sessionStorage.setItem('appName', app_name)
         if (app_code_rule) {
           this.getCheckCode()
         }
         const loginList = this.userLoginList
-        //登录限制查询
+        // 登录限制查询
         if (loginList.length > PLATFROM_CONFIG.maxCount && this.getLoginState()) {
           this.loading = true
           const userState = this.userLoginState
           this.timePiker(userState)
         }
       } else {
-        this.$message.error(message);
+        this.$message.error(message)
       }
     } catch (error) {
-      this.$message.error(error.message);
+      this.$message.error(error.message)
     }
   },
   beforeDestroy () {
@@ -132,83 +133,83 @@ export default {
   },
   methods: {
     showPwd () {
-      if (this.passwordType === "password") {
-        this.passwordType = "";
+      if (this.passwordType === 'password') {
+        this.passwordType = ''
       } else {
-        this.passwordType = "password";
+        this.passwordType = 'password'
       }
       this.$nextTick(() => {
-        this.$refs.password.focus();
-      });
+        this.$refs.password.focus()
+      })
     },
     // 登录
     handleLogin () {
       this.$refs.loginForm.validate((valid) => {
         if (valid) {
-          this.loading = true;
+          this.loading = true
           const params = {
             app_token: getCodeToken(),
-            username: this.loginForm.username.replace(/\s+/g, ""),
-            password: MD5(this.loginForm.password.replace(/\s+/g, "")),
+            username: this.loginForm.username.replace(/\s+/g, ''),
+            password: MD5(this.loginForm.password.replace(/\s+/g, '')),
             // password: this.loginForm.password.replace(/\s+/g, ""),
-            verifyCode: this.loginForm.identify.replace(/\s+/g, ""),
-          };
+            verifyCode: this.loginForm.identify.replace(/\s+/g, ''),
+          }
           this.$store
-            .dispatch("user/login", params)
+            .dispatch('user/login', params)
             .then(async () => {
               clearInterval(this.timer)
               this.timer = null
-              this.$store.dispatch("app/toggleOutcheck", false)
-              this.$store.dispatch("user/setLoginList", [])
-              this.$store.dispatch("user/setLoginState", { state: false, time: 60 * PLATFROM_CONFIG.maxTime })
-              sessionStorage.setItem("userName", params.username);
-              this.$router.push({ path: this.redirect || "/" });
-              this.loading = false;
+              this.$store.dispatch('app/toggleOutcheck', false)
+              this.$store.dispatch('user/setLoginList', [])
+              this.$store.dispatch('user/setLoginState', { state: false, time: 60 * PLATFROM_CONFIG.maxTime })
+              sessionStorage.setItem('userName', params.username)
+              this.$router.push({ path: this.redirect || '/' })
+              this.loading = false
             })
             .catch(() => {
-              const mapDataLen = this.restrictLogin();
-              this.getCheckCode();
+              const mapDataLen = this.restrictLogin()
+              this.getCheckCode()
               if (mapDataLen > PLATFROM_CONFIG.maxCount) {
                 this.$message.error('登录错误次数超过最大登录次数限制,禁止登录')
                 this.loading = true
                 const userState = this.userLoginState
                 this.timePiker(userState)
               } else {
-                this.loading = false;
+                this.loading = false
               }
-            });
+            })
         } else {
-          return false;
+          return false
         }
-      });
+      })
     },
     // 限制登录
     restrictLogin () {
       const loginParams = {
-        username: this.loginForm.username.replace(/\s+/g, ""),
+        username: this.loginForm.username.replace(/\s+/g, ''),
       }
       const loginList = this.userLoginList
       loginList.push(loginParams)
-      this.$store.dispatch("user/setLoginList", loginList)
+      this.$store.dispatch('user/setLoginList', loginList)
       const mapData = loginList.filter(item => item.username === this.loginForm.username)
       return mapData.length
     },
-    //登录计时器
+    // 登录计时器
     timePiker (userState) {
       this.timer = setInterval(() => {
         const newTime = userState.time--
         const newState = { state: true, time: newTime }
-        this.$store.dispatch("user/setLoginState", newState)
+        this.$store.dispatch('user/setLoginState', newState)
         if (userState.time == 0) {
           clearInterval(this.timer)
           this.timer = null
           this.loading = false
-          this.$store.dispatch("user/setLoginList", [])
-          this.$store.dispatch("user/setLoginState", { state: false, time: 60 * PLATFROM_CONFIG.maxTime })
+          this.$store.dispatch('user/setLoginList', [])
+          this.$store.dispatch('user/setLoginState', { state: false, time: 60 * PLATFROM_CONFIG.maxTime })
         }
-      }, 1000);
+      }, 1000)
     },
-    //登录状态
+    // 登录状态
     getLoginState () {
       const userState = this.userLoginState
       const newTime = userState.time
@@ -218,27 +219,27 @@ export default {
         return true
       }
     },
-    //获取动态验证码
+    // 获取动态验证码
     async getCheckCode () {
       const { code, message, returnData } = await getVCode({
         app_token: getCodeToken()
-      });
+      })
       if (code == 0 && isValue(returnData)) {
-        const { verifyCode } = returnData;
-        this.baseImg = "data:image/gif;base64," + verifyCode;
+        const { verifyCode } = returnData
+        this.baseImg = 'data:image/gif;base64,' + verifyCode
       } else {
-        this.$message.error(message);
+        this.$message.error(message)
       }
     },
-    //验证码重新获取
+    // 验证码重新获取
     changeCode () {
-      this.getCheckCode();
+      this.getCheckCode()
     },
     errorHandler () {
       return true
     }
   },
-};
+}
 </script>
 
 <style lang="scss" scoped>

+ 62 - 67
src/views/newUserManagement/index.vue

@@ -21,11 +21,10 @@
         <div class="newService-content-left-top">
           <div class="flex head">
             <div class="title">账号组列表</div>
-            <el-button @click="handleAdd" class="serButton" size="small">新增</el-button>
+            <el-button class="serButton" size="small" @click="handleAdd">新增</el-button>
           </div>
           <div class="search">
-            <el-input size="small" placeholder="请输入内容" clearable prefix-icon="el-icon-search" :filter-node-method="filterArrNode" v-model="search">
-            </el-input>
+            <el-input v-model="search" size="small" placeholder="请输入内容" clearable prefix-icon="el-icon-search" :filter-node-method="filterArrNode" />
           </div>
         </div>
         <div class="newService-content-left-bottom">
@@ -40,8 +39,8 @@
                     <span @click.stop="handleRemove(item)" class="error">删除</span>
                   </div>
                 </div> -->
-                <el-tree ref="treeArr" :data="arrs" :props="defaultArrProps" highlight-current :filter-node-method="filterArrNode" default-expand-all node-key="user_group_id" @node-click="handleNodeClick" :expand-on-click-node="false">
-                  <span class="custom-tree-node" slot-scope="{ node,data }">
+                <el-tree ref="treeArr" :data="arrs" :props="defaultArrProps" highlight-current :filter-node-method="filterArrNode" default-expand-all node-key="user_group_id" :expand-on-click-node="false" @node-click="handleNodeClick">
+                  <span slot-scope="{ node,data }" class="custom-tree-node">
                     <div class="flex">
                       <span class="customTxt">{{ node.label }}</span>
                       <span v-show="treeCheckId == data.user_group_id" class="customBtn">
@@ -54,7 +53,7 @@
             </el-scrollbar>
           </template>
           <template v-else>
-            <el-empty description="暂无数据"></el-empty>
+            <el-empty description="暂无数据" />
           </template>
         </div>
       </div>
@@ -62,21 +61,20 @@
         <div class="newUserManagement-content-right-top">
           <div class="head flex">
             <div class="title">账号组信息</div>
-            <el-button @click="handleSave" type="primary" size="small" :disabled="editGroupDisabled">保存</el-button>
+            <el-button type="primary" size="small" :disabled="editGroupDisabled" @click="handleSave">保存</el-button>
           </div>
           <div class="contents">
-            <el-form :inline="true" :rules="rules" ref="form" :model="formInline" class="demo-form-inline">
+            <el-form ref="form" :inline="true" :rules="rules" :model="formInline" class="demo-form-inline">
               <el-form-item prop="user_group_name" label="账号组名称">
-                <el-input style="width:260px;margin-right: 30px;" size="small" v-model="formInline.user_group_name" placeholder="请输入账号组名称" :disabled="editGroupDisabled"></el-input>
+                <el-input v-model="formInline.user_group_name" style="width:260px;margin-right: 30px;" size="small" placeholder="请输入账号组名称" :disabled="editGroupDisabled" />
               </el-form-item>
               <el-form-item prop="up_user_group_name" label="上级用户组">
-                <el-select style="width:260px;margin-right: 30px;" size="small" clearable v-model="formInline.up_user_group_id" placeholder="请选择上级用户组" :disabled="editGroupDisabled">
-                  <el-option v-for="item in arrTree" :key="item.user_group_id" :label="item.user_group_name" :value="item.user_group_id">
-                  </el-option>
+                <el-select v-model="formInline.up_user_group_id" style="width:260px;margin-right: 30px;" size="small" clearable placeholder="请选择上级用户组" :disabled="editGroupDisabled">
+                  <el-option v-for="item in arrTree" :key="item.user_group_id" :label="item.user_group_name" :value="item.user_group_id" />
                 </el-select>
               </el-form-item>
               <el-form-item label="描述">
-                <el-input style="width:260px;" size="small" v-model="formInline.user_group_comment" placeholder="请输入描述" :disabled="editGroupDisabled"></el-input>
+                <el-input v-model="formInline.user_group_comment" style="width:260px;" size="small" placeholder="请输入描述" :disabled="editGroupDisabled" />
               </el-form-item>
             </el-form>
           </div>
@@ -84,12 +82,11 @@
         <div class="newUserManagement-content-right-bottom">
           <div class="head flex">
             <div class="title">账号列表</div>
-            <el-button @click="handleTableAdd" type="primary" size="small" :disabled="addUserDisabled">新增</el-button>
+            <el-button type="primary" size="small" :disabled="addUserDisabled" @click="handleTableAdd">新增</el-button>
           </div>
           <div class="contents">
             <el-table :data="tableData" height="100%" border style="width: 100%">
-              <el-table-column prop="user_name" label="用户名">
-              </el-table-column>
+              <el-table-column prop="user_name" label="用户名" />
               <el-table-column prop="user_status" label="状态">
                 <template slot-scope="scope">
                   <div>{{ scope.row.user_status ? '启用' :'禁用' }}</div>
@@ -97,14 +94,13 @@
               </el-table-column>
               <!-- <el-table-column prop="token_valid_duration" label="令牌有效时长">
               </el-table-column> -->
-              <el-table-column prop="user_comment" label="描述">
-              </el-table-column>
+              <el-table-column prop="user_comment" label="描述" />
               <el-table-column label="操作" width="235">
                 <template slot-scope="scope">
-                  <el-button @click="handleTablepaswod(scope.row)" type="primary" plain size="small">修改密码 </el-button>
-                  <el-button @click="handleTableEdit(scope.row)" type="primary" plain size="small">编辑 </el-button>
+                  <el-button type="primary" plain size="small" @click="handleTablepaswod(scope.row)">修改密码 </el-button>
+                  <el-button type="primary" plain size="small" @click="handleTableEdit(scope.row)">编辑 </el-button>
                   <!-- <el-button @click="handleTableAuth(scope.row)" type="primary" plain size="small">账号授权 </el-button> -->
-                  <el-button @click="handleTableDel(scope.row)" type="danger" size="small">删除 </el-button>
+                  <el-button type="danger" size="small" @click="handleTableDel(scope.row)">删除 </el-button>
                 </template>
               </el-table-column>
             </el-table>
@@ -120,14 +116,14 @@
             <el-form-item label="账号密码" prop="user_pwd">
               <div class="flex-wrap">
                 <el-input v-model="ruleForm.user_pwd" class="r25" size="small" placeholder="请输入密码" />
-                <el-button size="small" @click="restPwd" style="position: relative;top: 4px;" class="r26" type="primary">生成密码</el-button>
+                <el-button size="small" style="position: relative;top: 4px;" class="r26" type="primary" @click="restPwd">生成密码</el-button>
               </div>
             </el-form-item>
           </el-form>
         </div>
         <div class="foot right">
-          <el-button size="small" @click="handleOkSk('ruleForms')" class="r24" type="primary">确定</el-button>
-          <el-button @click="eledite" size="small">取消</el-button>
+          <el-button size="small" class="r24" type="primary" @click="handleOkSk('ruleForms')">确定</el-button>
+          <el-button size="small" @click="eledite">取消</el-button>
         </div>
       </div>
     </Dialog>
@@ -137,8 +133,8 @@
         <div class="contents">
           <el-form ref="ruleForm" :model="ruleForm" :rules="tableRules" label-width="100px" class="demo-ruleForm">
             <el-form-item label="账号组关联" prop="user_gropu_id">
-              <el-select style="width: 100%" size="small" v-model="ruleForm.user_group_id" placeholder="请选择">
-                <el-option v-for="item in arrTree" :key="item.user_group_id" :label="item.user_group_name" :value="item.user_group_id"> </el-option>
+              <el-select v-model="ruleForm.user_group_id" style="width: 100%" size="small" placeholder="请选择">
+                <el-option v-for="item in arrTree" :key="item.user_group_id" :label="item.user_group_name" :value="item.user_group_id" />
               </el-select>
             </el-form-item>
             <el-form-item label="账号名称" prop="user_name">
@@ -166,8 +162,8 @@
           </el-form>
         </div>
         <div class="foot right">
-          <el-button size="small" @click="handleOk('ruleForm')" class="r24" type="primary">确定</el-button>
-          <el-button @click="eledite" size="small">取消</el-button>
+          <el-button size="small" class="r24" type="primary" @click="handleOk('ruleForm')">确定</el-button>
+          <el-button size="small" @click="eledite">取消</el-button>
         </div>
       </div>
     </Dialog>
@@ -179,7 +175,7 @@
               label: 'role_name',
               children: 'role_ID',
             }" :default-checked-keys="checkedKeysTemp" @check="handleCheck" /> -->
-          <el-checkbox v-model="item.role_status" v-for="(item, index) in tableCols" :key="index" @change="handleCheckedCitiesChange(item)">{{ item.role_name }}</el-checkbox>
+          <el-checkbox v-for="(item, index) in tableCols" :key="index" v-model="item.role_status" @change="handleCheckedCitiesChange(item)">{{ item.role_name }}</el-checkbox>
         </div>
         <div class="foot right t30">
           <!-- <el-button size="medium" class="r24" type="primary" @click="onCheck">确定</el-button> -->
@@ -191,11 +187,11 @@
       <div class="airportInfoDialog">
         <div class="title del-title">删除</div>
         <div class="content del-content">
-          <span class="el-icon-error error r10"></span>您是否确认删除<span class="error l10">{{ rmTitle }}</span>
+          <span class="el-icon-error error r10" />您是否确认删除<span class="error l10">{{ rmTitle }}</span>
         </div>
         <div class="foot right Delfoot">
-          <el-button size="small" class="r24" @click="tableRemove" type="danger">删除</el-button>
+          <el-button size="small" class="r24" type="danger" @click="tableRemove">删除</el-button>
           <el-button size="small" @click="rmFlag = false">取消</el-button>
         </div>
       </div>
@@ -209,6 +205,7 @@ import Dialog from '@/layout/components/Dialog'
 import pf from '@/layout/mixin/publicFunc'
 import MD5 from 'blueimp-md5'
 import { listToTree } from '@/utils/validate'
+import '@/config/staticConfig' // 按钮权限 全局自定义指令v-is
 export default {
   name: 'NewManageMent',
   components: { Dialog },
@@ -238,25 +235,25 @@ export default {
         user_group_name: [{ required: true, message: '请输入账号组名称', trigger: 'blur' }],
       },
       ruleForm: {
-        "token_valid_time": null,
-        "token_valid_duration": null,
-        "user_code": null,
-        "user_code_expire": null,
-        "user_comment": null,
-        "user_group_id": null,
-        "user_id": null,
-        "user_name": null,
-        "user_pwd": null,
-        "user_sec_pwd": null,
-        "user_status": null,
-        "user_token": null
+        'token_valid_time': null,
+        'token_valid_duration': null,
+        'user_code': null,
+        'user_code_expire': null,
+        'user_comment': null,
+        'user_group_id': null,
+        'user_id': null,
+        'user_name': null,
+        'user_pwd': null,
+        'user_sec_pwd': null,
+        'user_status': null,
+        'user_token': null
       },
       tableRules: {
-        user_name: [{ required: true, message: "请输入账号名称", trigger: "blur" }],
+        user_name: [{ required: true, message: '请输入账号名称', trigger: 'blur' }],
         user_group_id: [{ required: true, message: '请选择账号组', trigger: 'change' }],
-        user_pwd: [{ required: true, message: "请输入密码", trigger: "blur" }],
+        user_pwd: [{ required: true, message: '请输入密码', trigger: 'blur' }],
       },
-      paswordFlag: false,//修改密码
+      paswordFlag: false, // 修改密码
       tableFlag: false,
       title: '新增',
       type: '',
@@ -287,14 +284,6 @@ export default {
       treeCheckObj: {}
     }
   },
-  watch: {
-    search (val) {
-      this.$refs.treeArr.filter(val);
-    }
-  },
-  mounted () {
-    this.getTreeData()
-  },
   computed: {
     dataList () {
       return this.arrs
@@ -306,6 +295,14 @@ export default {
       return !this.treeCheckId
     }
   },
+  watch: {
+    search (val) {
+      this.$refs.treeArr.filter(val)
+    }
+  },
+  mounted () {
+    this.getTreeData()
+  },
   methods: {
     async getTreeData () {
       const { code, returnData } = await this.getQueryListAuth(this.queryId)
@@ -318,8 +315,8 @@ export default {
       }
     },
     filterArrNode (value, data) {
-      if (!value) return true;
-      return data.user_group_name.indexOf(value) !== -1;
+      if (!value) return true
+      return data.user_group_name.indexOf(value) !== -1
     },
     handleAdd () {
       this.type = 'add'
@@ -357,7 +354,7 @@ export default {
         }
       }
     },
-    //清空表单
+    // 清空表单
     clearForm () {
       const data = this.formInline
       for (const key in data) {
@@ -376,12 +373,12 @@ export default {
       }
       setTimeout(() => {
         this.$refs['ruleForm'].resetFields()
-      }, 50);
+      }, 50)
     },
     restPwd () {
       this.ruleForm.user_pwd = '123!@#QWEqwe'
     },
-    //树删除
+    // 树删除
     handleRemove (data) {
       this.rmTitle = data.user_group_name
       this.rmFlag = true
@@ -459,8 +456,7 @@ export default {
               this.tipMsg(code)
             }
           }
-        }
-        else {
+        } else {
           return false
         }
       })
@@ -494,7 +490,7 @@ export default {
         this.tableCols = result.returnData
         this.tableCols.forEach(element => {
           element.user_id = row.user_id
-        });
+        })
       }
       if (msg.code == 0 && msg.returnData && msg.returnData.length) {
         msg.returnData.forEach(element => {
@@ -502,8 +498,8 @@ export default {
             if (res.role_ID == element.role_id) {
               res.role_status = true
             }
-          });
-        });
+          })
+        })
       }
       // console.log(this.tableCols)
       // console.log(code)
@@ -605,8 +601,7 @@ export default {
           this.clearTableForm()
           this.tableFlag = false
           this.paswordFlag = false
-        }
-        else {
+        } else {
           return false
         }
       })
@@ -720,4 +715,4 @@ export default {
     }
   }
 }
-</style>
+</style>