浏览代码

维保管理加入

wt 3 年之前
父节点
当前提交
f45e8a412d
共有 42 个文件被更改,包括 1392 次插入899 次删除
  1. 9 9
      README.md
  2. 1 1
      package.json
  3. 13 3
      public/static/config.js
  4. 73 0
      src/App.vue
  5. 1 1
      src/api/MochaITOM/crew/index.js
  6. 10 0
      src/api/MochaITOM/record/index.js
  7. 1 1
      src/api/MochaITOM/route/index.js
  8. 0 2
      src/api/monitor.js
  9. 0 1
      src/api/system/auth-manage.js
  10. 8 1
      src/api/system/orgnization.js
  11. 9 0
      src/api/uploadfile.js
  12. 3 3
      src/api/user.js
  13. 0 1
      src/layout/components/Navbar.vue
  14. 2 1
      src/main.js
  15. 8 1
      src/permission.js
  16. 18 14
      src/store/index.js
  17. 11 3
      src/utils/request.js
  18. 388 5
      src/utils/validate.js
  19. 7 1
      src/utils/yongtian.js
  20. 99 52
      src/views/MochaITOM/crew/index.vue
  21. 147 96
      src/views/MochaITOM/plan/index.vue
  22. 137 115
      src/views/MochaITOM/point/index.vue
  23. 172 40
      src/views/MochaITOM/record/index.vue
  24. 87 48
      src/views/MochaITOM/route/index.vue
  25. 4 4
      src/views/alarm/alarm-log/index.vue
  26. 0 3
      src/views/building/building_mage.vue
  27. 0 1
      src/views/building/floor_mage.vue
  28. 0 2
      src/views/building/room_mage.vue
  29. 0 1
      src/views/device/camera/index.vue
  30. 3 6
      src/views/device/camera2/index.vue
  31. 78 83
      src/views/device/guard/index.vue
  32. 1 32
      src/views/index/components/alarming.vue
  33. 9 13
      src/views/index/components/monitor.vue
  34. 26 21
      src/views/login/index.vue
  35. 0 241
      src/views/login/index2.vue
  36. 0 1
      src/views/patrol/team/edit.vue
  37. 0 4
      src/views/patrol/team/index.vue
  38. 53 46
      src/views/system/auth-manage/index.vue
  39. 9 34
      src/views/system/organization/index.vue
  40. 0 1
      src/views/system/security/index.vue
  41. 0 3
      src/views/system/unit-info/index.vue
  42. 5 4
      vue.config.js

+ 9 - 9
README.md

@@ -1,5 +1,13 @@
+<!--
+ * @Author: wt 1241351815@qq.com
+ * @Date: 2022-04-25 10:16:57
+ * @LastEditors: wt 1241351815@qq.com
+ * @LastEditTime: 2022-05-09 13:33:39
+ * @FilePath: \securityHtml\README.md
+ * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
+-->
 # vue-admin-template
-
+东信综合安防
 English | [简体中文](./README-zh.md)
 
 > A minimal vue admin template with Element UI & axios & iconfont & permission control & lint
@@ -79,12 +87,4 @@ For `typescript` version, you can use [vue-typescript-admin-template](https://gi
 
 Modern browsers and Internet Explorer 10+.
 
-| [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/edge/edge_48x48.png" alt="IE / Edge" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>IE / Edge | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/firefox/firefox_48x48.png" alt="Firefox" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Firefox | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/chrome/chrome_48x48.png" alt="Chrome" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Chrome | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/safari/safari_48x48.png" alt="Safari" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Safari |
-| --------- | --------- | --------- | --------- |
-| IE10, IE11, Edge| last 2 versions| last 2 versions| last 2 versions
-
-## License
-
-[MIT](https://github.com/PanJiaChen/vue-admin-template/blob/master/LICENSE) license.
 
-Copyright (c) 2017-present PanJiaChen

+ 1 - 1
package.json

@@ -18,7 +18,7 @@
         "axios": "^0.21.1",
         "core-js": "3.6.5",
         "echarts": "^4.8.0",
-        "element-ui": "2.13.2",
+        "element-ui": "^2.15.5",
         "file-saver": "^2.0.5",
         "hls.js": "^1.0.4",
         "jquery": "^3.6.0",

+ 13 - 3
public/static/config.js

@@ -1,10 +1,20 @@
+/*
+ * @Author: wt 1241351815@qq.com
+ * @Date: 2022-04-25 10:21:18
+ * @LastEditors: wt 1241351815@qq.com
+ * @LastEditTime: 2022-05-09 13:30:35
+ * @FilePath: \securityHtml\public\static\config.js
+ * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
+ */
 // api 请求路径
 var PLATFROM_CONFIG = {};
-PLATFROM_CONFIG.baseUrl = "https://smartpark.caih.com/spapi"
+//PLATFROM_CONFIG.baseUrl = "https://smartpark.caih.com/spapi"
+//PLATFROM_CONFIG.baseUrl = "https://qhome.usky.cn/af"
+
+//PLATFROM_CONFIG.baseUrl = "http://101.133.214.75:81/af"
      //PLATFROM_CONFIG.baseUrl = "http://172.16.120.104:8082"
     // PLATFROM_CONFIG.baseUrl = "http://localhost:8082"
-
-//PLATFROM_CONFIG.baseUrl = "http://10.21.39.1:8082" //线上
+PLATFROM_CONFIG.baseUrl = "http://10.21.39.1:8082" //生产
 //alarming WEBSOCKET
 let userInfo = window.localStorage.getItem("key");
 var PLATFROM_WEBSOCKET = {};

+ 73 - 0
src/App.vue

@@ -1,3 +1,11 @@
+<!--
+ * @Author: wt 1241351815@qq.com
+ * @Date: 2022-04-25 10:21:18
+ * @LastEditors: wt 1241351815@qq.com
+ * @LastEditTime: 2022-05-09 11:30:10
+ * @FilePath: \securityHtml\src\App.vue
+ * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
+-->
 <template>
   <div id="app" @mouseenter="mouseenter()" @mouseout="mouseout()">
     <router-view />
@@ -47,4 +55,69 @@ export default {
     background: #99a9bf;
     border-radius: 20px;
   }
+  .el-dialog .el-form-item{
+    width:auto !important;
+  }
+
+  .el-input__inner{
+  height:28px !important;
+  line-height: 28px !important;
+}
+.el-input-number--small{
+  height:26px !important;
+  line-height: 26px !important;
+}
+.el-textarea .el-input__count,.el-input .el-input__count .el-input__count-inner{
+  font-size: 8px;
+  height: 12px;
+  line-height: 12px;
+  background: transparent !important
+}
+
+.el-input-number--medium{
+  width:auto;
+  line-height:28px;
+}
+.el-input-number.is-controls-right[class*=medium] [class*=increase], .el-input-number.is-controls-right[class*=medium] [class*=decrease] {
+    line-height: 13px;
+}
+/* .el-textarea .el-input__count, .el-input .el-input__count .el-input__count-inner{
+  margin-top:4px;
+} */
+.el-dialog .el-form-item__content, .el-dialog .el-form-item__label{
+  line-height: 40px;
+}
+
+.el-input-number.is-controls-right[class*=medium] [class*=increase], .el-input-number.is-controls-right[class*=medium] [class*=decrease]{
+  line-height:13px;
+}
+
+
+/* 下拉框底部颜色 */
+::-webkit-scrollbar-track-piece{
+background: transparent !important;
+}
+</style>
+<style>
+/* 时间选择器图标位置 */
+.el-input__prefix{
+  margin-top:0px !important;
+}
+/* 页面下拉框箭头 */
+.el-select .el-input .el-select__caret{
+  display: block;
+  margin-top:-2px;
+}
+/* 页面弹框input间距 */
+.roleDialog .el-dialog .el-form-item{
+  margin:10px auto;
+}
+/* 数字加减图标位置 */
+.el-input-number{
+  line-height: 28px !important;
+}
+.el-input-number.is-controls-right .el-input-number__increase, .el-input-number.is-controls-right .el-input-number__decrease{
+  line-height:10px;
+}
+
 </style>

+ 1 - 1
src/api/MochaITOM/crew/index.js

@@ -30,7 +30,7 @@ export function getDevopsTeam(data) {
 }
 export function getTD(data) {//团队组员
     return request({
-        url: "/team/list",
+        url: "/teamUser/list",
         method: 'get',
         params: data
     })

+ 10 - 0
src/api/MochaITOM/record/index.js

@@ -25,3 +25,13 @@ export function exportMaintianLog(data) {
     })
 }
 
+
+export function getPlanDetail(data) {
+    return request({
+        url: "/planDetail/listByPlanId",
+        method: 'get',
+        params: data
+    })
+}
+
+

+ 1 - 1
src/api/MochaITOM/route/index.js

@@ -30,7 +30,7 @@ export function getPlanPath(data) {
 }
 export function getXL(data) {
     return request({
-        url: "planSpot/list",
+        url: "/planPoint/list",
         method: 'get',
         params: data
     })

+ 0 - 2
src/api/monitor.js

@@ -45,7 +45,6 @@ export default {
 
     // 获取视屏监控
     getMonitoring(data) {
-        // console.log("data",data)
         return request({
             url: `/video/VideoCollectionUrl`,
             method: 'post',
@@ -55,7 +54,6 @@ export default {
 
     // 获取视屏监控
     getMonitoring1(data1) {
-        // console.log("data1",data1)
         return request({
             url: `/video/VideoCollectionUrl`,
             method: 'post',

+ 0 - 1
src/api/system/auth-manage.js

@@ -25,7 +25,6 @@ export function menuEdit(params) { //菜单管理-修改
     })
 }
 export function menuRemove(params) { //菜单管理-删除
-    console.log(params)
     return request({
         url: '/sys/menu/remove',
         method: 'post',

+ 8 - 1
src/api/system/orgnization.js

@@ -1,3 +1,11 @@
+/*
+ * @Author: wt 1241351815@qq.com
+ * @Date: 2022-04-25 10:21:18
+ * @LastEditors: wt 1241351815@qq.com
+ * @LastEditTime: 2022-05-09 13:24:12
+ * @FilePath: \securityHtml\src\api\system\orgnization.js
+ * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
+ */
 import request from '@/utils/request'
 
 
@@ -10,7 +18,6 @@ export function deptAdd(params) { //新增部门
 }
 
 export function deptEdit(query) { //修改部门
-    console.log(query)
     return request({
         url: '/system/dept/edit',
         method: 'post',

+ 9 - 0
src/api/uploadfile.js

@@ -0,0 +1,9 @@
+import request from '@/utils/request'
+/* 上传 */
+export function fileUpload(data) {
+    return request({
+        url: "/file/upload",
+        method: 'post',
+        data: data
+    })
+}

+ 3 - 3
src/api/user.js

@@ -11,9 +11,9 @@ export function login(data) {//常规
 // 登录方法(ERP)
 export function loginERP(data) {
     return request({
-      url: '/sys/loginByCenterId',
-      method: 'get',
-      params: data
+      url: '/sys/loginByCenter',
+      method: 'post',
+      data
     })
 }
   

+ 0 - 1
src/layout/components/Navbar.vue

@@ -33,7 +33,6 @@ export default {
     TimeMenu
   },
   mounted(){
-    // console.log(Hamburger)
     // Hamburger.props.isActive.default = true
   },
   computed: {

+ 2 - 1
src/main.js

@@ -10,7 +10,7 @@ import '@/assets/styles/index.scss' // global css
 import '@/assets/styles/yongtian.scss' // yongtian css
 import locale from 'element-ui/lib/locale/lang/en' // lang i18n
 import '@/styles/index.scss' // global css
-import { handleTree, addDateRange } from "@/utils/yongtian";
+import { handleTree, addDateRange, resetForm, } from "@/utils/yongtian";
 
 
 import App from './App'
@@ -25,6 +25,7 @@ import getPageTitle from '@/utils/get-page-title'
 //全局挂载
 Vue.prototype.handleTree = handleTree
 Vue.prototype.addDateRange = addDateRange
+Vue.prototype.resetForm = resetForm
 
 
 import '@/icons' // icon

+ 8 - 1
src/permission.js

@@ -1,3 +1,11 @@
+/*
+ * @Author: wt 1241351815@qq.com
+ * @Date: 2022-04-25 10:21:18
+ * @LastEditors: wt 1241351815@qq.com
+ * @LastEditTime: 2022-05-09 13:24:45
+ * @FilePath: \securityHtml\src\permission.js
+ * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
+ */
 import router from './router'
 import store from './store'
 import { Message } from 'element-ui'
@@ -17,7 +25,6 @@ router.beforeEach(async(to, from, next) => {
         // determine whether the user has logged in
     const hasToken = getToken()
     if (hasToken) {
-        // console.log(hasToken , to.path)
         if (to.path === '/login') {
             // if is logged in, redirect to the home page
             next({ path: '/' })

+ 18 - 14
src/store/index.js

@@ -64,11 +64,10 @@ const mutations = {
         state.addRoutes = routes
         routes.forEach((i, index) => {
             // 从第3+index个位置插入
-            constantRoutes.splice(3 + index, 0, i)
+            // constantRoutes.splice(3 + index, 0, i)
         })
     },
     SET_MENULIST: (state, menuList) => {
-        console.log(state.menuList = menuList)
         state.menuList = menuList
     }
 }
@@ -94,7 +93,7 @@ const actions = {
     // 登录PER
     LoginERP({ commit }, userInfo) {
         return new Promise((resolve, reject) => {
-            loginERP({centerId:userInfo.id}).then(response => {
+            loginERP({username:userInfo.username,password:userInfo.password}).then(response => {
                 if (response.status == "SUCCESS") {
                     setToken(response.data)
                     commit('SET_TOKEN', response.data)
@@ -111,26 +110,28 @@ const actions = {
     getInfo() {
         return new Promise((resolve, reject) => {
             getInfo().then(response => {
+                let data = response.data
                 var arrayList = [];
-                for (let i = 0; i < response.data.length; i++) {
+                for (let i = 0; i < data.length; i++) {
                     arrayList.push({
-                        path: (response.data[i].path).slice(1, 8),
+                        path: (data[i].path).slice(1, 8),
                         component: Layout,
-                        redirect: (response.data[i].path).slice(1, 8),
-                        name: response.data[i].name,
+                        redirect: (data[i].path).slice(1, 8),
+                        name: data[i].name,
                         meta: {
-                            title: response.data[i].meta.title,
-                            icon: response.data[i].meta.icon
+                            title: data[i].meta.title,
+                            icon: data[i].meta.icon
                         },
                         children: []
                     })
-                    for (let j = 0; j < response.data[i].children.length; j++) {
-                        var new_response = response.data[i].children[j].meta
-                        var url = (response.data[i].children[j].path).slice(8, -6)
+                    for (let j = 0; j < data[i].children.length; j++) {
+                        var new_response = data[i].children[j].meta
+                        //var url = (data[i].children[j].path).slice(8, -2)
+                        var url = data[i].children[j].path
                         arrayList[i].children.push({
                             path: url,
                             name: new_response.title,
-                            component: (resolve) => require([`@/views${response.data[i].children[j].path}`], resolve),
+                            component: (resolve) => require([`@/views${data[i].children[j].path}`], resolve),
                             meta: {
                                 title: new_response.title,
                                 icon: new_response.icon
@@ -139,7 +140,8 @@ const actions = {
                         })
                     }
                 }
-                var header = [{
+                var header = [
+                        {
                             path: '/index',
                             component: () =>
                                 import ('@/views/index/index'),
@@ -157,6 +159,8 @@ const actions = {
                                 meta: { title: '首页', icon: 'home' }
                             }]
                         },
+                        
+                        
                     ]
                     // 404 page must be placed at the end !!!
                 let footer = {

+ 11 - 3
src/utils/request.js

@@ -1,3 +1,11 @@
+/*
+ * @Author: wt 1241351815@qq.com
+ * @Date: 2022-04-25 10:21:19
+ * @LastEditors: wt 1241351815@qq.com
+ * @LastEditTime: 2022-05-09 13:23:41
+ * @FilePath: \securityHtml\src\utils\request.js
+ * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
+ */
 import axios from 'axios'
 import {  MessageBox, Message } from 'element-ui'
 import store from '@/store'
@@ -8,6 +16,8 @@ axios.defaults.headers['Content-Type'] = 'application/json;multipart/form-data;c
 const service = axios.create({
     baseURL: baseURL, // url = base url + request url
     timeout: 10000, // request timeout
+    // withCredentials:true,
+
 })
 
 // request interceptor
@@ -15,7 +25,6 @@ service.interceptors.request.use(config => {
         // 是否需要设置 token
         // const isToken = (config.headers || {}).isToken === false
         if (getToken()) {
-            console.log(getToken())
            config.headers['Authorization'] =  getToken() // 让每个请求携带自定义token 请根据实际情况自行修改
         }
         if (config.method == 'get') {
@@ -30,7 +39,6 @@ service.interceptors.request.use(config => {
     },
     error => {
         // do something with request error
-        console.log(error) // for debug
         return Promise.reject(error)
     }
 )
@@ -48,7 +56,7 @@ service.interceptors.response.use(response => {
             type: 'warning'
         }).then(() => {
             store.dispatch('logout').then(() => {
-                location.href = '/#/login?redirect=%2Fdevice%2Fguard/';
+                location.href = '/#/login';
             })
         }).catch(() => {});
     } else {

+ 388 - 5
src/utils/validate.js

@@ -1,12 +1,8 @@
-/**
- * Created by PanJiaChen on 16/11/18.
- */
-
 /**
  * @param {string} path
  * @returns {Boolean}
  */
-export function isExternal(path) {
+ export function isExternal(path) {
   return /^(https?:|mailto:|tel:)/.test(path)
 }
 
@@ -18,3 +14,390 @@ export function validUsername(str) {
   const valid_map = ['admin', 'editor']
   return valid_map.indexOf(str.trim()) >= 0
 }
+
+/**
+ * @param {string} url
+ * @returns {Boolean}
+ */
+export function validURL(url) {
+  const reg = /^(https?|ftp):\/\/([a-zA-Z0-9.-]+(:[a-zA-Z0-9.&%$-]+)*@)*((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]?)(\.(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])){3}|([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+\.(com|edu|gov|int|mil|net|org|biz|arpa|info|name|pro|aero|coop|museum|[a-zA-Z]{2}))(:[0-9]+)*(\/($|[a-zA-Z0-9.,?'\\+&%$#=~_-]+))*$/
+  return reg.test(url)
+}
+
+/**
+ * @param {string} str
+ * @returns {Boolean}
+ */
+export function validLowerCase(str) {
+  const reg = /^[a-z]+$/
+  return reg.test(str)
+}
+
+/**
+ * @param {string} str
+ * @returns {Boolean}
+ */
+export function validUpperCase(str) {
+  const reg = /^[A-Z]+$/
+  return reg.test(str)
+}
+
+/**
+ * @param {string} str
+ * @returns {Boolean}
+ */
+export function validAlphabets(str) {
+  const reg = /^[A-Za-z]+$/
+  return reg.test(str)
+}
+
+/**
+ * @param {string} email
+ * @returns {Boolean}
+ */
+export function validEmail(email) {
+  const reg = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/
+  return reg.test(email)
+}
+
+/**
+ * @param {string} str
+ * @returns {Boolean}
+ */
+export function isString(str) {
+  if (typeof str === 'string' || str instanceof String) {
+    return true
+  }
+  return false
+}
+
+/**
+ * @param {Array} arg
+ * @returns {Boolean}
+ */
+export function isArray(arg) {
+  if (typeof Array.isArray === 'undefined') {
+    return Object.prototype.toString.call(arg) === '[object Array]'
+  }
+  return Array.isArray(arg)
+}
+
+/*是否合法IP地址*/
+export function validateIP(rule, value, callback) {
+  if (value == '' || value == undefined || value == null) {
+      callback();
+  } else {
+      const reg = /^(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])$/;
+      if ((!reg.test(value)) && value != '') {
+          callback(new Error('请输入正确的IP地址'));
+      } else {
+          callback();
+      }
+  }
+}
+
+/* 是否手机号码或者固话*/
+export function validatePhoneTwo(rule, value, callback) {
+  const reg = /^((0\d{2,3}-\d{7,8})|(1[34578]\d{9}))$/;;
+  if (value == '' || value == undefined || value == null) {
+      callback();
+  } else {
+      if ((!reg.test(value)) && value != '') {
+          callback(new Error('请输入正确的电话号码或者固话号码'));
+      } else {
+          callback();
+      }
+  }
+}
+/* 是否固话*/
+export function validateTelphone(rule, value, callback) {
+  const reg = /0\d{2}-\d{7,8}/;
+  if (value == '' || value == undefined || value == null) {
+      callback();
+  } else {
+      if ((!reg.test(value)) && value != '') {
+          callback(new Error('请输入正确的固话(格式:区号+号码,如010-1234567)'));
+      } else {
+          callback();
+      }
+  }
+}
+/* 是否手机号码*/
+export function validatePhone(rule, value, callback) {
+  const reg = /^[1][3,4,5,7,8][0-9]{9}$/;
+  if (value == '' || value == undefined || value == null) {
+      callback();
+  } else {
+      if ((!reg.test(value)) && value != '') {
+          callback(new Error('请输入正确的电话号码'));
+      } else {
+          callback();
+      }
+  }
+}
+/* 是否身份证号码*/
+export function validateIdNo(rule, value, callback) {
+  const reg = /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/;
+  if (value == '' || value == undefined || value == null) {
+      callback();
+  } else {
+      if ((!reg.test(value)) && value != '') {
+          callback(new Error('请输入正确的身份证号码'));
+      } else {
+          callback();
+      }
+  }
+}
+/* 是否邮箱*/
+export function validateEMail(rule, value, callback) {
+  const reg = /^([a-zA-Z0-9]+[-_\.]?)+@[a-zA-Z0-9]+\.[a-z]+$/;
+  if (value == '' || value == undefined || value == null) {
+      callback();
+  } else {
+      if (!reg.test(value)) {
+          callback(new Error('请输入正确的邮箱地址'));
+      } else {
+          callback();
+      }
+  }
+}
+/* 合法uri*/
+export function validateURL(textval) {
+  const urlregex = /^(https?|ftp):\/\/([a-zA-Z0-9.-]+(:[a-zA-Z0-9.&%$-]+)*@)*((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]?)(\.(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])){3}|([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+\.(com|edu|gov|int|mil|net|org|biz|arpa|info|name|pro|aero|coop|museum|[a-zA-Z]{2}))(:[0-9]+)*(\/($|[a-zA-Z0-9.,?'\\+&%$#=~_-]+))*$/;
+  return urlregex.test(textval);
+}
+
+/*验证内容是否英文数字以及下划线*/
+export function isPassword(rule, value, callback) {
+  const reg = /^[_a-zA-Z0-9]+$/;
+  if (value == '' || value == undefined || value == null) {
+      callback();
+  } else {
+      if (!reg.test(value)) {
+          callback(new Error('密码仅由英文字母,数字以及下划线组成'));
+      } else {
+          callback();
+      }
+  }
+}
+
+/*自动检验数值的范围*/
+export function checkMax20000(rule, value, callback) {
+  if (value == '' || value == undefined || value == null) {
+      callback();
+  } else if (!Number(value)) {
+      callback(new Error('请输入[1,20000]之间的数字'));
+  } else if (value < 1 || value > 20000) {
+      callback(new Error('请输入[1,20000]之间的数字'));
+  } else {
+      callback();
+  }
+}
+
+//验证数字输入框最大数值,32767
+export function checkMaxVal(rule, value, callback) {
+  if (value < 0 || value > 32767) {
+      callback(new Error('请输入[0,32767]之间的数字'));
+  } else {
+      callback();
+  }
+}
+//验证是否1-99之间
+export function isOneToNinetyNine(rule, value, callback) {
+  if (!value) {
+      return callback(new Error('输入不可以为空'));
+  }
+  setTimeout(() => {
+      if (!Number(value)) {
+          callback(new Error('请输入正整数'));
+      } else {
+          const re = /^[1-9][0-9]{0,1}$/;
+          const rsCheck = re.test(value);
+          if (!rsCheck) {
+              callback(new Error('请输入正整数,值为【1,99】'));
+          } else {
+              callback();
+          }
+      }
+  }, 0);
+}
+
+// 验证是否整数
+export function isInteger(rule, value, callback) {
+  if (!value) {
+      return callback(new Error('输入不可以为空'));
+  }
+  setTimeout(() => {
+      if (!Number(value)) {
+          callback(new Error('请输入正整数'));
+      } else {
+          const re = /^[0-9]*[1-9][0-9]*$/;
+          const rsCheck = re.test(value);
+          if (!rsCheck) {
+              callback(new Error('请输入正整数'));
+          } else {
+              callback();
+          }
+      }
+  }, 0);
+}
+// 验证是否整数,非必填
+export function isIntegerNotMust(rule, value, callback) {
+  if (!value) {
+      callback();
+  }
+  setTimeout(() => {
+      if (!Number(value)) {
+          callback(new Error('请输入正整数'));
+      } else {
+          const re = /^[0-9]*[1-9][0-9]*$/;
+          const rsCheck = re.test(value);
+          if (!rsCheck) {
+              callback(new Error('请输入正整数'));
+          } else {
+              callback();
+          }
+      }
+  }, 1000);
+}
+
+// 验证是否是[0-1]的小数
+export function isDecimal(rule, value, callback) {
+  if (!value) {
+      return callback(new Error('输入不可以为空'));
+  }
+  setTimeout(() => {
+      if (!Number(value)) {
+          callback(new Error('请输入[0,1]之间的数字'));
+      } else {
+          if (value < 0 || value > 1) {
+              callback(new Error('请输入[0,1]之间的数字'));
+          } else {
+              callback();
+          }
+      }
+  }, 100);
+}
+
+// 验证是否是[1-10]的小数,即不可以等于0
+export function isBtnOneToTen(rule, value, callback) {
+  if (typeof value == 'undefined') {
+      return callback(new Error('输入不可以为空'));
+  }
+  setTimeout(() => {
+      if (!Number(value)) {
+          callback(new Error('请输入正整数,值为[1,10]'));
+      } else {
+          if (!(value == '1' || value == '2' || value == '3' || value == '4' || value == '5' || value == '6' || value == '7' || value == '8' || value == '9' || value == '10')) {
+              callback(new Error('请输入正整数,值为[1,10]'));
+          } else {
+              callback();
+          }
+      }
+  }, 100);
+}
+// 验证是否是[1-100]的小数,即不可以等于0
+export function isBtnOneToHundred(rule, value, callback) {
+  if (!value) {
+      return callback(new Error('输入不可以为空'));
+  }
+  setTimeout(() => {
+      if (!Number(value)) {
+          callback(new Error('请输入整数,值为[1,100]'));
+      } else {
+          if (value < 1 || value > 100) {
+              callback(new Error('请输入整数,值为[1,100]'));
+          } else {
+              callback();
+          }
+      }
+  }, 100);
+}
+// 验证是否是[0-100]的小数
+export function isBtnZeroToHundred(rule, value, callback) {
+  if (!value) {
+      return callback(new Error('输入不可以为空'));
+  }
+  setTimeout(() => {
+      if (!Number(value)) {
+          callback(new Error('请输入[1,100]之间的数字'));
+      } else {
+          if (value < 0 || value > 100) {
+              callback(new Error('请输入[1,100]之间的数字'));
+          } else {
+              callback();
+          }
+      }
+  }, 100);
+}
+
+// 验证端口是否在[0,65535]之间
+export function isPort(rule, value, callback) {
+  if (!value) {
+      return callback(new Error('输入不可以为空'));
+  }
+  setTimeout(() => {
+      if (value == '' || typeof(value) == undefined) {
+          callback(new Error('请输入端口值'));
+      } else {
+          const re = /^([0-9]|[1-9]\d|[1-9]\d{2}|[1-9]\d{3}|[1-5]\d{4}|6[0-4]\d{3}|65[0-4]\d{2}|655[0-2]\d|6553[0-5])$/;
+          const rsCheck = re.test(value);
+          if (!rsCheck) {
+              callback(new Error('请输入在[0-65535]之间的端口值'));
+          } else {
+              callback();
+          }
+      }
+  }, 100);
+}
+// 验证端口是否在[0,65535]之间,非必填,isMust表示是否必填
+export function isCheckPort(rule, value, callback) {
+  if (!value) {
+      callback();
+  }
+  setTimeout(() => {
+      if (value == '' || typeof(value) == undefined) {
+          //callback(new Error('请输入端口值'));
+      } else {
+          const re = /^([0-9]|[1-9]\d|[1-9]\d{2}|[1-9]\d{3}|[1-5]\d{4}|6[0-4]\d{3}|65[0-4]\d{2}|655[0-2]\d|6553[0-5])$/;
+          const rsCheck = re.test(value);
+          if (!rsCheck) {
+              callback(new Error('请输入在[0-65535]之间的端口值'));
+          } else {
+              callback();
+          }
+      }
+  }, 100);
+}
+
+/* 小写字母*/
+export function validateLowerCase(str) {
+  const reg = /^[a-z]+$/;
+  return reg.test(str);
+}
+/*保留2为小数*/
+export function validatetoFixedNew(str) {
+  return str;
+}
+/* 验证key*/
+// export function validateKey(str) {
+//     var reg = /^[a-z_\-:]+$/;
+//     return reg.test(str);
+// }
+
+/* 大写字母*/
+export function validateUpperCase(str) {
+  const reg = /^[A-Z]+$/;
+  return reg.test(str);
+}
+
+/* 大小写字母*/
+export function validatAlphabets(str) {
+  const reg = /^[A-Za-z]+$/;
+  return reg.test(str);
+}
+/* 输入金额保留两位小数*/
+export function money2(str) {
+  const reg = /^(([1-9]{1}\d*)|(0{1}))(\.\d{1,2})?$/;
+  return reg.test(str);
+}

+ 7 - 1
src/utils/yongtian.js

@@ -6,7 +6,6 @@
  * @param {*} children 孩子节点字段 默认 'children'
  */
 export function handleTree(data, id, parentId, children) {
-    //console.log(data, id, parentId, children)
     let config = {
         id: id || 'id',
         parentId: parentId || 'parentId',
@@ -67,4 +66,11 @@ export function addDateRange(params, dateRange, propName) {
         }
     }
     return search;
+}
+
+// 表单重置
+export function resetForm(refName) {
+    if (this.$refs[refName]) {
+        this.$refs[refName].resetFields();
+    }
 }

+ 99 - 52
src/views/MochaITOM/crew/index.vue

@@ -1,18 +1,18 @@
 <template>
   <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="90px">
-      <el-form-item label="团队名称:" prop="name">
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" >
+      <el-form-item label="班组名称:" prop="name">
         <el-input
           v-model.trim="queryParams.name"
-          placeholder="请输入团队名称"
+          placeholder="请输入班组名称"
           clearable
           size="small"
           style="width: 140px"
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
-      <el-form-item label="责任人" prop="userName">
-        <el-select v-model="queryParams.userName"   placeholder="请选择责任人" style="width: 140px">
+      <el-form-item label="责任人" prop="dutyName">
+        <el-select v-model="queryParams.dutyName"   placeholder="请选择责任人" style="width: 140px" >
           <el-option
             v-for="item in zrr"
             :key="item.name"
@@ -31,18 +31,17 @@
           icon="el-icon-plus"
           size="mini"
           @click="handleAdd"
-          v-hasPermi="['system:admin:add']"
         >新增</el-button>
       </el-form-item>
     </el-form>
 
-    <el-table v-loading="loading" :data="adminList" height="calc(100vh - 28vh)">
-      <el-table-column label="团队名称" align="center" prop="name"  show-overflow-tooltip />
+    <el-table v-loading="loading" :data="adminList" :max-height="tableHeight">
+      <el-table-column label="班组名称" align="center" prop="name"  show-overflow-tooltip />
       <el-table-column label="责任人" align="center" prop="dutyName"  show-overflow-tooltip />
       <el-table-column label="联系方式" align="center" prop="dutyPhone"  show-overflow-tooltip />
       <el-table-column label="创建时间" align="center" prop="createTime"  show-overflow-tooltip />
       <el-table-column label="创建人" align="center" prop="createBy"  show-overflow-tooltip />
-      <el-table-column label="修改时间" align="center" prop="updateTimecreateTime"  show-overflow-tooltip />
+      <el-table-column label="修改时间" align="center" prop="updateTime"  show-overflow-tooltip />
       <el-table-column label="修改人" align="center" prop="updateBy"  show-overflow-tooltip />
       <el-table-column label="操作" align="center" class-name="small-padding fixed-width" >
         <template slot-scope="scope">
@@ -51,14 +50,12 @@
             type="text"
             icon="el-icon-edit"
             @click="handleUpdate(scope.row)"
-            v-hasPermi="['system:admin:edit']"
           >修改</el-button>
           <el-button
             size="mini"
             type="text"
             icon="el-icon-delete"
             @click="handleDelete(scope.row)"
-            v-hasPermi="['system:admin:remove']"
           >删除</el-button>
         </template>
       </el-table-column>
@@ -69,14 +66,14 @@
       <el-form ref="form" :model="form" :rules="rules" label-width="auto" >
         <el-row :gutter="20">
           <el-col :span="12" >
-            <el-form-item label="团队名称" prop="name">
-              <el-input v-model="form.name" style="width: 160px" placeholder="请填写团队名称" @input="onInput()" maxlength="15" show-word-limit />
+            <el-form-item label="班组名称" prop="name">
+              <el-input v-model="form.name" style="width: 160px" placeholder="请填写班组名称" @input="onInput()" maxlength="15" show-word-limit />
             </el-form-item>
           </el-col>
-          <div class="btn" style="text-align: left;margin:0 auto 30px;">
+          <div class="btn" style="text-align: left;margin:0 auto 30px;float:right">
             <el-button type="primary" icon="el-icon-plus" size="mini" @click="addItem">新增人员</el-button>
           </div>
-          <el-table :data="list" border  style=" 100%;" stripe height="260" :rules="rules2" >
+          <el-table :data="list" border   stripe height="200" :rules="rules2" >
             <el-table-column label="序号" width="80px" align='center'>
               <template slot-scope="scope">
                 <span>{{ scope.$index +1 }}</span>
@@ -101,14 +98,14 @@
              <el-table-column prop="phone" label="手机号" align='center'>
               <template slot-scope="scope">
                 <span v-if="!scope.row.isEgdit">{{scope.row.phone}}</span>
-                <el-input v-if="scope.row.isEgdit" v-model="scope.row.phone"  maxlength="11" oninput="value=value.replace(/^1[3|4|5|6|7|8|9][0-9]\d{8}$/,'')"></el-input>
+                <el-input v-if="scope.row.isEgdit" v-model="scope.row.phone"  maxlength="11" ></el-input>
               </template>
             </el-table-column>
             <el-table-column fixed="right" label="操作" align='center' >
               <template slot-scope="scope">
-                <el-button v-if="!scope.row.isEgdit" type="primary" size="small" @click='edit(scope.$index,scope.row)' icon="el-icon-edit" circle></el-button>
-                <el-button v-if="scope.row.isEgdit" type="success" size="small" @click='editSuccess(scope.$index,scope.row)' icon="el-icon-check" circle></el-button>
-                <el-button @click.native.prevent="deleteItem(scope.$index, list)" type="danger" size="small" icon="el-icon-delete" circle></el-button>
+                <el-button v-if="!scope.row.isEgdit" type="primary" size="small" @click='edit(scope.$index,scope.row)' icon="el-icon-edit" plain></el-button>
+                <el-button v-if="scope.row.isEgdit" type="success" size="small" @click='editSuccess(scope.$index,scope.row)' icon="el-icon-check" plain></el-button>
+                <el-button @click.native.prevent="deleteItem(scope.$index, list)" type="danger" size="small" icon="el-icon-delete" plain></el-button>
               </template>
             </el-table-column>
           </el-table>
@@ -119,13 +116,18 @@
         <el-button @click="cancel">取 消</el-button>
       </div>
     </el-dialog>
-    <pagination
-      v-show="total>0"
-      :total="total"
-      :page.sync="queryParams.current"
-      :limit.sync="queryParams.size"
-      @pagination="getList"
-    />
+    <el-pagination
+      style="bottom:0px"
+      background
+      @current-change="handleCurrentChange1"
+      :page-sizes="[10, 15, 20, 30]"
+      @size-change="handleSizeChange1"
+      :current-page="queryParams.pageNo"
+      :page-size="queryParams.pageSize"
+      layout="sizes,prev, pager, next"
+      :total="totalCount1"
+    >
+    </el-pagination>
     <a href="" download="" id="xz" style="position: absolute;z-index: -1;opacity: 0;"></a>
   </div>
 </template>
@@ -139,7 +141,8 @@ export default {
       // 显示搜索条件
       showSearch: true,
       // 总条数
-      total: 0,
+      totalCount1:undefined,
+      totalCount2:undefined,
       // 参数表格数据
       adminList: [],
       // 弹出层标题
@@ -149,16 +152,26 @@ export default {
       // 查询参数
       queryParams: {
         current: 1,
-        size: 20,
+        size: 15,
         name: undefined,
-        userName:undefined
+        dutyName:undefined,
+        pageNo:1,
+        pageSize:15,
       },
+      // 查询参数
+      queryParams2: {
+        current: 1,
+        size: 15,
+        pageNo:1,
+        pageSize:15,
+      },
+      tableHeight:undefined,
       // 表单参数
       form: {},
       // 表单校验
       rules: {
         name: [
-          { required: true, message: "团队名称不能为空",  trigger: "blur"  }
+          { required: true, message: "班组名称不能为空",  trigger: "blur"  }
         ],
       },
       rules2: {
@@ -192,14 +205,47 @@ export default {
   created() {
     this.getList();//初始化table
   },
+  mounted() {
+    // table高度
+    if(window.innerWidth <1920){
+      this.tableHeight = window.innerHeight - 300
+    }else{
+      this.tableHeight = window.innerHeight - 295
+    }
+    // 监听窗口大小变化
+    let self = this;
+    window.onresize = function() {
+      self.tableHeight = window.innerHeight - 300
+    }
+  },
   methods: {
+    //分页查询
+    handleCurrentChange1(val) {
+      this.queryParams.pageNo = val;
+      this.getList();
+    },
+    //分页查询
+    handleSizeChange1(val) {
+      this.queryParams.pageSize = val;
+      this.getList();
+    },
+    //分页查询
+    handleCurrentChange2(val) {
+      this.queryParams2.pageNo = val;
+      this.getList();
+    },
+    //分页查询
+    handleSizeChange2(val) {
+      this.queryParams2.pageSize = val;
+      this.getList();
+    },
     //新增数据
     addItem() {
       let item = {
         name:undefined,
         phone:undefined,
         switch:false,
-        label:false,
+        label:1,
         userId:1,
       }
       this.list.push(item)
@@ -240,29 +286,31 @@ export default {
     },
     //手机号验证
     testPhone(str) {
-      const reg = /^1[3|4|5|7|8|6|9][0-9]\d{8}$/;
-      return reg.test(str);
+      // const reg = /^1[3|4|5|7|8|6|9][0-9]\d{8}$/;
+      // return reg.test(str);
     },
     vaildPhone(value) {
       if (!this.testPhone(value)) {
-        this.msgError("请输入正确的手机号码");
+        this.$message.warning("请输入正确的手机号码");
       }
     },
     /** 重置按钮操作 */
     resetQuery() {
       this.dateRange = [];
       this.queryParams = {
-        name:undefined,
+        dutyName:undefined,
         current:1,
-        size:20
+        size:15,
+        pageSize:15,
+        pageNo:1,
       }
-      this.resetForm("queryForm");
+      // this.resetForm("queryForm");
       this.handleQuery();
     },
     // 表单重置
     reset() {
       this.form = {};
-      this.resetForm("form");
+      // this.resetForm("form");
     },
     /** 搜索按钮操作 */
     handleQuery() {
@@ -273,17 +321,16 @@ export default {
     getList() {
       this.loading = true;
       getDevopsTeam(this.queryParams).then(response => {
-        if(response.data.records.length>0){
-          this.adminList = response.data.records;
+        if(response.data.pageList.length>0){
+          this.adminList = response.data.pageList;
+          this.totalCount1 = response.data.totalCount;
           for(let i=0;i<this.adminList.length;i++){
             this.zrr[i] = {}
             this.zrr[i].name = this.adminList[i].dutyName
           }
-          this.total = response.data.total;
           this.loading = false;
         }else{
           this.adminList = []
-          this.total = response.data.total;
           this.loading = false;
         }
         
@@ -296,7 +343,7 @@ export default {
       this.title = "修改";
       this.form = JSON.parse(JSON.stringify(row))
       this.list = this.form.userIds
-      getTD({teamId:this.form.id}).then(res =>{
+      getTD({teamId:this.form.id,current:1,size:20}).then(res =>{
         let arr = res.data
         for(let i = 0;i<arr.length;i++){
           if(arr[i].label == "1"){
@@ -326,11 +373,11 @@ export default {
           if(arr.length>0){
             for(let i = 0;i<arr.length;i++){
               if(!arr[i].name){
-                this.msgError("姓名不能为空");
+                this.$message.error("姓名不能为空");
                 return
               }
               if(!arr[i].phone){
-                this.msgError("电话不能为空");
+                this.$message.error("电话不能为空");
                 return
               }
             }
@@ -339,7 +386,7 @@ export default {
           if (this.form.id != undefined) {
             updateDevopsTeam(this.form).then(response => {
               this.loading = false,
-              this.msgSuccess("修改成功");
+              this.$message.success("修改成功");
               this.open = false;
               this.getList();
             }).catch(()=>{
@@ -347,12 +394,12 @@ export default {
             })
           } else {
             addDevopsTeam(this.form).then(response => {
-              this.loading = false,
-              this.msgSuccess("新增成功");
-              this.open = false;
-              this.getList();
-            }).catch(()=>{
               this.loading = false
+              if(response.status == "SUCCESS"){
+                this.$message.success("新增成功");
+                this.open = false;
+                this.getList();
+              }
             })
           }
         }
@@ -369,7 +416,7 @@ export default {
           return delDevopsTeam(ids);
         }).then(() => {
           this.getList();
-          this.msgSuccess("删除成功");
+          this.$message.success("删除成功");
         }).catch(() => {});
     },
   }

+ 147 - 96
src/views/MochaITOM/plan/index.vue

@@ -20,9 +20,8 @@
           icon="el-icon-plus"
           size="mini"
           @click="handleAdd"
-          v-hasPermi="['system:admin:add']"
         >新增</el-button>
-        <el-button
+        <!-- <el-button
           type="warning"
           plain
           icon="el-icon-download"
@@ -30,15 +29,21 @@
           :loading="exportLoading"
           @click="handleExport"
           v-hasPermi="['system:admin:export']"
-        >导出</el-button>
+        >导出</el-button> -->
       </el-form-item>
     </el-form>
-    <el-table v-loading="loading" :data="adminList" height="calc(100vh - 28vh)">
+    <el-table v-loading="loading" :data="adminList" :max-height="tableHeight">
       <el-table-column label="计划名称" align="center" prop="name"  show-overflow-tooltip />
-      <el-table-column label="周期" align="center" prop="cycle"  show-overflow-tooltip />
+      <el-table-column label="周期" align="center" prop="cycle"  show-overflow-tooltip >
+       <template slot-scope="scope">
+          <span>{{scope.row.cycle == 1 ? "日" : scope.row.cycle == 2 ? "周" : "月"}}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="计划开始时间" align="center" prop="startTime"  show-overflow-tooltip />
+      <el-table-column label="计划结束时间" align="center" prop="endTime"  show-overflow-tooltip />
       <el-table-column label="执行开始时间" align="center" prop="startInspectTime"  show-overflow-tooltip />
       <el-table-column label="执行结束时间" align="center" prop="endInspectTime"  show-overflow-tooltip />
-      <el-table-column label="执行团队" align="center" prop="teamName"  show-overflow-tooltip />
+      <el-table-column label="执行班组" align="center" prop="teamName"  show-overflow-tooltip />
       <el-table-column label="操作" align="center" class-name="small-padding fixed-width" >
         <template slot-scope="scope">
           <el-button
@@ -46,33 +51,31 @@
             type="text"
             icon="el-icon-edit"
             @click="handleUpdate(scope.row)"
-            v-hasPermi="['system:admin:edit']"
           >修改</el-button>
           <el-button
             size="mini"
             type="text"
             icon="el-icon-delete"
             @click="handleDelete(scope.row)"
-            v-hasPermi="['system:admin:remove']"
           >删除</el-button>
         </template>
       </el-table-column>
     </el-table>
 
     <!-- 修改、新增对话框 -->
-    <el-dialog :title="title" :visible.sync="open" width="600px" append-to-body :before-close="cancel" :close-on-click-modal="false">
-      <el-form ref="form" :model="form" :rules="rules" label-width="auto" >
+    <el-dialog :title="title" :visible.sync="open" width="640px" append-to-body :before-close="cancel" :close-on-click-modal="false">
+      <el-form ref="form" :model="form" :rules="rules" label-width="120px" >
         <el-row :gutter="20">
           <el-col :span="12">
-            <el-form-item label="计划名称" prop="planName">
-              <el-input v-model="form.planName" placeholder="请填写计划名称" @input="onInput()" maxlength="15" show-word-limit />
+            <el-form-item label="计划名称" prop="name">
+              <el-input v-model="form.name" placeholder="请填写计划名称" @input="onInput()" maxlength="15" show-word-limit  />
             </el-form-item>
           </el-col>
           <el-col :span="12">
-            <el-form-item label="执行团队" prop="teamId">
+            <el-form-item label="执行班组" prop="teamId">
               <el-select
                 v-model="form.teamId"
-                placeholder="请选择执行团队"
+                placeholder="请选择执行班组"
                 clearable
                 size="small"
                 style="width: 160px"
@@ -80,34 +83,17 @@
                 <el-option
                   v-for="dict in teamList"
                   :key="dict.id"
-                  :label="dict.teamName"
+                  :label="dict.name"
                   :value="dict.id"
+                  width="30%"
                 />
               </el-select>
             </el-form-item>
           </el-col>
           <el-col :span="12">
-            <el-form-item label="周期" prop="cycle">
-              <el-select
-                v-model="form.cycle"
-                placeholder="请选择周期"
-                clearable
-                size="small"
-                style="width: 160px"
-              >
-                <el-option
-                  v-for="dict in cycleList"
-                  :key="dict.dictValue"
-                  :label="dict.dictLabel"
-                  :value="dict.dictValue"
-                />
-              </el-select>
-            </el-form-item>
-          </el-col>
-          <el-col :span="12">
-            <el-form-item label="计划开始时间" prop="startDate">
+            <el-form-item label="计划开始时间" prop="startTime">
               <el-date-picker
-                v-model="form.startDate"
+                v-model="form.startTime"
                 type="date"
                 style="width:160px"
                 placeholder="选择日期">
@@ -115,11 +101,11 @@
             </el-form-item>
           </el-col>
           <el-col :span="12">
-            <el-form-item label="计划结束时间" prop="endDate">
+            <el-form-item label="计划结束时间" prop="endTime">
               <el-date-picker
-                v-model="form.endDate"
+                v-model="form.endTime"
                 type="date"
-                style="width:160px"
+                style="width:160px;"
                 placeholder="选择日期">
               </el-date-picker>
             </el-form-item>
@@ -160,20 +146,44 @@
               </el-select>
             </el-form-item>
           </el-col>
+          <el-col :span="12">
+            <el-form-item label="周期" prop="cycle">
+              <el-select
+                v-model="form.cycle"
+                placeholder="请选择周期"
+                clearable
+                size="small"
+                style="width: 160px;"
+                
+              >
+                <el-option
+                  v-for="dict in cycleList"
+                  :key="dict.dictValue"
+                  :label="dict.dictLabel"
+                  :value="dict.dictValue"
+                />
+              </el-select>
+            </el-form-item>
+          </el-col>
           
           <el-col style="font-size:16px;font-weight:700;margin:10px 0 20px;">巡更路线</el-col>
-          <el-table v-loading="loading2" :data="adminList2" height="200"   @select="dialogCheck" ref="dataTable">
+          <el-table v-loading="loading2" :data="adminList2" height="150"   @select="dialogCheck" ref="dataTable" style="margin-bottom:50px">
             <el-table-column type="selection" />
             <el-table-column label="线路名称" align="center" prop="name"  show-overflow-tooltip />
             <el-table-column label="创建时间" align="center" prop="createTime"  show-overflow-tooltip />
           </el-table>
-          <pagination
-            v-show="total2>0"
-            :total="total2"
-            :page.sync="queryParams2.current"
-            :limit.sync="queryParams2.size"
-            @pagination="getList2"
-          />
+          <el-pagination
+            style="bottom:0px"
+            background
+            @current-change="handleCurrentChange2"
+            :page-sizes="[10, 15, 20, 30]"
+            @size-change="handleSizeChange2"
+            :current-page="queryParams2.pageNo"
+            :page-size="queryParams2.pageSize"
+            layout="sizes,prev, pager, next"
+            :total="totalCount2"
+          >
+          </el-pagination>
         </el-row>
       </el-form>
       <div slot="footer" class="dialog-footer">
@@ -181,13 +191,17 @@
         <el-button @click="cancel">取 消</el-button>
       </div>
     </el-dialog>
-    <pagination
-      v-show="total>0"
-      :total="total"
-      :page.sync="queryParams.current"
-      :limit.sync="queryParams.size"
-      @pagination="getList"
-    />
+    <el-pagination
+      background
+      @current-change="handleCurrentChange1"
+      :page-sizes="[10, 15, 20, 30]"
+      @size-change="handleSizeChange1"
+      :current-page="queryParams.pageNo"
+      :page-size="queryParams.pageSize"
+      layout="sizes,prev, pager, next"
+      :total="totalCount1"
+    >
+    </el-pagination>
     <a href="" download="" id="xz" style="position: absolute;z-index: -1;opacity: 0;"></a>
   </div>
 </template>
@@ -206,9 +220,9 @@ export default {
       // 显示搜索条件
       showSearch: true,
       // 总条数
-      total: 0,
+      totalCount1: undefined,
       // 总条数
-      total2: 0,
+      totalCount2: undefined,
       // 参数表格数据
       adminList: [],
       adminList2:[],
@@ -219,23 +233,27 @@ export default {
       // 查询参数
       queryParams: {
         current: 1,
-        size: 20,
+        size: 15,
         name: undefined,
+        pageNo:1,
+        pageSize:15,
       },
       // 查询参数
       queryParams2: {
         current: 1,
-        size: 20,
+        size: 15,
+        pageNo:1,
+        pageSize:15,
       },
       // 表单参数
       form: {},
       // 表单校验
       rules: {
-        planName: [
+        name: [
           { required: true, message: "任务名称不能为空",  trigger: "blur"  }
         ],
         teamId: [
-          { required: true, message: "团队名称不能为空",  trigger: "blur"  }
+          { required: true, message: "班组名称不能为空",  trigger: ["blur",'change'] }
         ],
         companyCode: [
           { required: true, message: "单位名称不能为空",  trigger: ["blur",'change']}
@@ -243,11 +261,11 @@ export default {
         cycle: [
           { required: true, message: "周期不能为空",  trigger: ["blur",'change']}
         ],
-        startDate: [
-          { required: true, message: "维保开始时间不能为空",  trigger: ["blur",'change']}
+        startTime: [
+          { required: true, message: "计划开始时间不能为空",  trigger: ["blur",'change']}
         ],
-        endDate: [
-          { required: true, message: "维保结束时间不能为空",  trigger: ["blur",'change']}
+        endTime: [
+          { required: true, message: "计划结束时间不能为空",  trigger: ["blur",'change']}
         ],
         startInspectTime: [
           { required: true, message: "执行开始时间称不能为空",  trigger: ["blur",'change']}
@@ -258,27 +276,56 @@ export default {
       },
       zrr:[],
       cycleList:[
-        {dictValue:"周一",dictValue:"周一"},
-        {dictValue:"周二",dictValue:"周二"},
-        {dictValue:"周三",dictValue:"周三"},
-        {dictValue:"周四",dictValue:"周四"},
-        {dictValue:"周五",dictValue:"周五"},
-        {dictValue:"周六",dictValue:"周六"},
-        {dictValue:"周日",dictValue:"周日"},
+        {dictValue:1,dictLabel:"日"},
+        {dictValue:2,dictLabel:"周"},
+        {dictValue:3,dictLabel:"月"},
       ],
       inspectTimeList:[],
 
       dateRange:[],
       teamList:[],
       selectioned:'',//单选中的值
+      tableHeight:undefined,
     };
   },
   created() {
     this.getList();//初始化table
     this.zxtime()//执行时间
   },
+  mounted() {
+    // table高度
+    if(window.innerWidth <1920){
+      this.tableHeight = window.innerHeight - 300
+    }else{
+      this.tableHeight = window.innerHeight - 295
+    }
+    // 监听窗口大小变化
+    let self = this;
+    window.onresize = function() {
+      self.tableHeight = window.innerHeight - 300
+    }
+  },
   methods: {
-    
+    //分页查询
+    handleCurrentChange1(val) {
+      this.queryParams.pageNo = val;
+      this.getList();
+    },
+    //分页查询
+    handleSizeChange1(val) {
+      this.queryParams.pageSize = val;
+      this.getList();
+    },
+    //分页查询
+    handleCurrentChange2(val) {
+      this.queryParams2.pageNo = val;
+      this.getList();
+    },
+    //分页查询
+    handleSizeChange2(val) {
+      this.queryParams2.pageSize = val;
+      this.getList();
+    },
    
     //强制el-input刷新
     onInput(){
@@ -287,7 +334,10 @@ export default {
     // 取消按钮
     cancel() {
       this.open = false;
-      this.reset();
+      setTimeout(()=>{
+        this.reset();
+      },500)
+      
     },
     /** 重置按钮操作 */
     resetQuery() {
@@ -295,14 +345,16 @@ export default {
       this.queryParams = {
         name:undefined,
         current:1,
-        size:20
+        size:15,
+        pageSize:15,
+        pageNo1,
       }
-      this.resetForm("queryForm");
+      // this.resetForm("queryForm");
       this.handleQuery();
     },
     // 表单重置
     reset() {
-      this.form = {};
+      this.form={}
       this.resetForm("form");
     },
     /** 搜索按钮操作 */
@@ -339,20 +391,21 @@ export default {
     getList() {
       this.loading = true;
       getMaintianPlan(this.queryParams).then(response => {
-        this.adminList = response.data.records;
-        this.total = response.data.total;
+        this.adminList = response.data.pageList;
+        this.totalCount1 = response.data.totalCount;
         this.loading = false;
       });
       getDevopsTeam(this.queryParams).then(response => {
-        if(response.data.records.length>0){
-          this.teamList = response.data.records;
+        if(response.data.pageList.length>0){
+          this.teamList = response.data.pageList;
         }
       })
     },
     getList2(row){
         this.adminList2 = []
         getPlanPath(this.queryParams2).then(response => {
-            this.adminList2 = response.data.records;
+            this.adminList2 = response.data.pageList;
+            this.totalCount2 = response.data.totalCount;
             if(row){
                 let list = []
                 for(let i = 0; i<this.adminList2.length;i++){
@@ -369,18 +422,15 @@ export default {
                             })
                         }
                     })
-                    this.total2 = response.data.total;
                     this.loading2 = false;
                 })
             }else{
-                this.total2 = response.data.total;
                 this.loading2 = false;
             }
         });
     },
     /** 修改按钮操作 */
     handleUpdate(row) {
-      this.reset();
       this.title = "修改";
       this.form = JSON.parse(JSON.stringify(row))
       this.getList2(row)
@@ -390,31 +440,31 @@ export default {
     handleAdd() {
       this.reset();
       this.getList2()
-      this.open = true;
       this.title = "新增";
       this.list = []
+      this.open = true;
     },
     /** 提交按钮 */
     submitForm(row) {
       this.$refs["form"].validate(valid => {
         if (valid) {
-          this.form.endDate = timestampToTime(this.form.endDate)
-          this.form.startDate = timestampToTime(this.form.startDate)
+          this.form.endTime = timestampToTime(this.form.endTime)
+          this.form.startTime = timestampToTime(this.form.startTime)
           let start = YearMonthDate().split(" ")[0] + " " + this.form.startInspectTime
           let end = YearMonthDate().split(" ")[0] + " " + this.form.endInspectTime
-          if(getTimeFormat(this.form.endDate) < getTimeFormat(this.form.startDate)){
-            this.msgError("计划结束时间不能小于计划开始时间");
+          if(getTimeFormat(this.form.endTime) < getTimeFormat(this.form.startTime)){
+            this.$message.error("计划结束时间不能小于计划开始时间");
             return
           }
           if(getTimeFormat(end) < getTimeFormat(start)){
-            this.msgError("执行结束时间不能小于执行开始时间");
+            this.$message.error("执行结束时间不能小于执行开始时间");
             return
           }
           this.loading = true
           if (this.form.id != undefined) {
             updateMaintianPlan(this.form).then(response => {
               this.loading = false,
-              this.msgSuccess("修改成功");
+              this.$message.success("修改成功");
               this.open = false;
               this.getList();
             }).catch(()=>{
@@ -422,12 +472,13 @@ export default {
             })
           } else {
             addMaintianPlan(this.form).then(response => {
-              this.loading = false,
-              this.msgSuccess("新增成功");
-              this.open = false;
-              this.getList();
-            }).catch(()=>{
               this.loading = false
+              if(response.status == "SUCCESS"){
+                this.loading = false,
+                this.$message.success("新增成功");
+                this.open = false;
+                this.getList();
+              }
             })
           }
         }
@@ -444,7 +495,7 @@ export default {
           return delMaintianPlan(ids);
         }).then(() => {
           this.getList();
-          this.msgSuccess("删除成功");
+          this.$message.success("删除成功");
         }).catch(() => {});
     },
     /** table */

+ 137 - 115
src/views/MochaITOM/point/index.vue

@@ -30,9 +30,8 @@
           icon="el-icon-plus"
           size="mini"
           @click="handleAdd"
-          v-hasPermi="['system:admin:add']"
         >新增</el-button>
-        <el-button
+        <!-- <el-button
           type="warning"
           plain
           icon="el-icon-download"
@@ -40,34 +39,25 @@
           :loading="exportLoading"
           @click="handleExport"
           v-hasPermi="['system:admin:export']"
-        >导出</el-button>
+        >导出</el-button> -->
       </el-form-item>
     </el-form>
 
-    <el-table v-loading="loading" :data="adminList" height="calc(100vh - 28vh)">
+    <el-table v-loading="loading" :data="adminList"  :max-height="tableHeight">
       <el-table-column label="点位名称" align="center" prop="name"  show-overflow-tooltip />
       <!-- <el-table-column label="所属单位" align="center" prop="companyName"  show-overflow-tooltip /> -->
       <el-table-column label="点位地址" align="center" prop="address"  show-overflow-tooltip />
-      <el-table-column label="设备类型" align="center" prop="type"  show-overflow-tooltip />
-      <el-table-column label="点位唯一标识" align="center" prop="code"  show-overflow-tooltip />
-      <el-table-column label="视频编号" align="center" prop="vidCode"  show-overflow-tooltip />
+      <!-- <el-table-column label="设备类型" align="center" prop="type"  show-overflow-tooltip /> -->
+      <!-- <el-table-column label="点位唯一标识" align="center" prop="code"  show-overflow-tooltip /> -->
+      <el-table-column label="摄像头名称" align="center" prop="dhDeviceName"  show-overflow-tooltip />
+      <el-table-column label="摄像头通道ID" align="center" prop="vidCode"  show-overflow-tooltip />
       <el-table-column label="点位标签" align="center" prop="qrCodeUrl"  show-overflow-tooltip >
         <template slot-scope="scope">
           <el-image
             v-if="scope.row.qrCodeUrl"
             style="width: 24px; height: 24px"
-            :preview-src-list="['https://smartpark.caih.com/dmapi/archive/' + scope.row.qrCodeUrl]"
-            :src="'https://smartpark.caih.com/dmapi/archive/' + scope.row.qrCodeUrl">
-          </el-image>
-      </template>
-      </el-table-column>
-      <el-table-column label="点位图片" align="center" prop="qrContent"  show-overflow-tooltip >
-        <template slot-scope="scope">
-          <el-image
-            v-if="scope.row.qrContent"
-            style="width: 24px; height: 24px"
-            :preview-src-list="['https://smartpark.caih.com/dmapi/archive/' + scope.row.qrContent]"
-            :src="'https://smartpark.caih.com/dmapi/archive/' + scope.row.qrContent">
+            :preview-src-list="[scope.row.qrCodeUrl]"
+            :src="scope.row.qrCodeUrl">
           </el-image>
       </template>
       </el-table-column>
@@ -82,14 +72,12 @@
             type="text"
             icon="el-icon-edit"
             @click="handleUpdate(scope.row)"
-            v-hasPermi="['system:admin:edit']"
           >修改</el-button>
           <el-button
             size="mini"
             type="text"
             icon="el-icon-delete"
             @click="handleDelete(scope.row)"
-            v-hasPermi="['system:admin:remove']"
           >删除</el-button>
         </template>
       </el-table-column>
@@ -98,43 +86,33 @@
     <!-- 修改、新增对话框 -->
     <el-dialog :title="title" :visible.sync="open" width="600px" append-to-body :before-close="cancel" :close-on-click-modal="false">
       <el-form ref="form" :model="form" :rules="rules" label-width="auto" >
-        <el-row :gutter="20">
+        <el-row :gutter="10">
           <el-col :span="12" >
-            <el-form-item label="点位名称" prop="spotName">
-              <el-input v-model="form.spotName" placeholder="请填写点位名称" @input="onInput()" maxlength="15" show-word-limit />
+            <el-form-item label="点位名称" prop="name">
+              <el-input v-model="form.name" placeholder="请填写点位名称" @input="onInput()" maxlength="15" show-word-limit width="30%"/>
             </el-form-item>
           </el-col>
-          <el-col :span="12">
-            <el-form-item label="单位名称" prop="companyCode">
-                  <el-select
-                    v-model="form.companyCode"
-                    placeholder="请选择单位名称"
-                    clearable
-                    size="small"
-                    style="width: 160px"
-                  >
-                    <el-option
-                      v-for="dict in companyList"
-                      :key="dict.dictValue"
-                      :label="dict.dictLabel"
-                      :value="dict.dictValue"
-                    />
-                  </el-select>
-                </el-form-item>
-          </el-col>
           <el-col :span="12" >
-            <el-form-item label="点位地址" prop="spotAddress">
-              <el-input v-model="form.spotAddress" placeholder="请填写点位地址" @input="onInput()" maxlength="15" show-word-limit />
+            <el-form-item label="点位地址" prop="address">
+              <el-input v-model="form.address" placeholder="请填写点位地址" @input="onInput()" maxlength="15" show-word-limit width="30%"/>
             </el-form-item>
           </el-col>
           <el-col :span="12" >
-            <el-form-item label="设备编号" prop="data1">
-              <el-input v-model="form.data1" placeholder="请填写设备编号" @input="onInput()" maxlength="30" show-word-limit />
-            </el-form-item>
-          </el-col>
-          <el-col :span="12" >
-            <el-form-item label="备注" prop="remarks">
-              <el-input v-model="form.remarks" placeholder="请填写备注" @input="onInput()" maxlength="30" show-word-limit />
+            <el-form-item label="摄像头名称" prop="vidCode">
+              <el-select
+                v-model="form.vidCode"
+                placeholder="请选择摄像头名称"
+                clearable
+                size="small"
+                style="width: 160px"
+              >
+                <el-option
+                  v-for="dict in cocalChannelList"
+                  :key="dict.id"
+                  :label="dict.name"
+                  :value="dict.id"
+                />
+              </el-select>
             </el-form-item>
           </el-col>
           
@@ -150,8 +128,8 @@
               </el-select>
             </el-form-item>
           </el-col> -->
-          <el-col :span="12">
-            <el-form-item label="点位文件上传" prop="pictureRoute">
+          <!-- <el-col :span="12">
+            <el-form-item label="点位图片上传" prop="pictureRoute">
                 <el-upload
                   class="upload-demo"
                   action="#"
@@ -163,7 +141,7 @@
                   <el-button size="small" type="primary">点击上传</el-button>
                 </el-upload>
             </el-form-item>
-          </el-col>
+          </el-col> -->
         </el-row>
       </el-form>
       <div slot="footer" class="dialog-footer">
@@ -171,22 +149,34 @@
         <el-button @click="cancel">取 消</el-button>
       </div>
     </el-dialog>
-    <pagination
+    <!-- <pagination
       v-show="total>0"
       :total="total"
       :page.sync="queryParams.current"
       :limit.sync="queryParams.size"
       @pagination="getList"
-    />
+    /> -->
+     <el-pagination
+      background
+      @current-change="handleCurrentChange"
+      :page-sizes="[10, 15, 20, 30]"
+      @size-change="handleSizeChange"
+      :current-page="queryParams.pageNo"
+      :page-size="queryParams.pageSize"
+      layout="sizes,prev, pager, next"
+      :total="totalCount"
+    >
+    </el-pagination>
     <div class="qrcode" ref="qrCodeUrl" style="position: absolute;z-index: -1;opacity: 0;"></div>
     <a href="" download="" id="xz" style="position: absolute;z-index: -1;opacity: 0;"></a>
   </div>
 </template>
 <script>
 import QRCode from 'qrcodejs2'
-// import { fileUpload } from "@/api/business/uploadfile.js";
-import { getPlanPath } from "@/api/MochaITOM/route";
+import { fileUpload } from "@/api/uploadfile.js";
+// import { getPlanPath } from "@/api/MochaITOM/route";
 import { addInspectionPoint, delInspectionPoint, updateInspectionPoint, getInspectionPoint, exportInspectionPoint } from "@/api/MochaITOM/point";
+import { getLocalDeviceList, getLocalUnitNodes,  getLocalChannel, getDhDeviceListNew } from "@/api/device/camera";
 import { YearMonthDateSFN } from "@/assets/js/dataFormate.js";
 export default {
   name: "Floor",
@@ -196,7 +186,7 @@ export default {
       // 显示搜索条件
       showSearch: true,
       // 总条数
-      total: 0,
+      totalCount:undefined,
       // 参数表格数据
       adminList: [],
       // 弹出层标题
@@ -206,33 +196,31 @@ export default {
       // 查询参数
       queryParams: {
         current: 1,
-        size: 20,
+        size: 15,
         name: undefined,
-        address:undefined
+        address:undefined,
+        pageSize:15,
+        pageNo:1
       },
       // 表单参数
       form: {},
       // 表单校验
       rules: {
-        spotName: [
+        name: [
           { required: true, message: "点位名称不能为空",  trigger: "blur"  }
         ],
-        spotAddress: [
+        address: [
           { required: true, message: "点位地址不能为空",  trigger: "blur"  }
         ],
-        data1: [
-          { required: true, message: "设备编号不能为空",  trigger: "blur"  }
-        ],
-        
-        companyCode: [
-          { required: true, message: "单位名称不能为空",  trigger: ["blur",'change']}
-        ],
-        dwtype: [
-          { required: true, message: "涉设备类型不能为空",  trigger: ["blur",'change']}
-        ],
-        pictureRoute: [
-          { required: true, message: "文件不能为空", trigger: ["blur",'change'] }
+        vidCode: [
+          { required: true, message: "摄像头名称不能为空",  trigger: ["blur",'change'] }
         ],
+        // dwtype: [
+        //   { required: true, message: "设备类型不能为空",  trigger: ["blur",'change']}
+        // ],
+        // pictureRoute: [
+        //   { required: true, message: "文件不能为空", trigger: ["blur",'change'] }
+        // ],
       },
       // 公司列表
       companyList: [],
@@ -242,12 +230,63 @@ export default {
       num:0,
       fileList:[],
       base64:undefined,//二维码
+      tableHeight:undefined,
+      cocalChannelList:[]
     };
   },
   created() {
     this.getList();//初始化table
   },
+  mounted() {
+    // table高度
+    if(window.innerWidth <1920){
+      this.tableHeight = window.innerHeight - 300
+    }else{
+      this.tableHeight = window.innerHeight - 295
+    }
+    // 监听窗口大小变化
+    let self = this;
+    window.onresize = function() {
+      self.tableHeight = window.innerHeight - 300
+    }
+  },
   methods: {
+    //分页查询
+    handleCurrentChange(val) {
+      this.queryParams.pageNo = val;
+      this.getList();
+    },
+    //分页查询
+    handleSizeChange(val) {
+      this.queryParams.pageSize = val;
+      this.getList();
+    },
+    //视频通道数据
+    // selectChanged(val){
+    //   for(let i =0;i<this.cocalChannelList.length;i++){
+    //     if(this.cocalChannelList[i].id == val){
+    //       this.form.dhDeviceName = this.cocalChannelList[i].name
+    //     }
+    //   }
+    // },
+    //获取视频通道
+    getLocal(){
+       getLocalChannel({pageNo: 1,
+        pageSize: 1500,
+        unitType: 1}).then(Response =>{
+        let data = Response.data.pageList
+        if(data.length>0){
+          let arr = []
+          for(let i = 0; i<data.length;i++){
+            arr[i] = {}
+            arr[i].id = data[i].id
+            arr[i].name = data[i].name
+          }
+          this.cocalChannelList = arr
+        }
+      })
+    },
+    
     creatQrCode(text) {//二维码
       var qrcode = new QRCode(this.$refs.qrCodeUrl, {
           text: "点位编号:" + text, // 需要转换为二维码的内容
@@ -272,7 +311,7 @@ export default {
       formData.append('file',blob, Date.now() + '.jpg');
       formData.append('multipart',blob, Date.now() + '.jpg');
       fileUpload(formData).then(response => {
-        this.form.spotLabelRoute = response.data
+        this.form.qrCodeUrl = response.data
         this.addData()
       });
     },
@@ -298,7 +337,9 @@ export default {
     // 取消按钮
     cancel() {
       this.open = false;
-      this.reset();
+      setTimeout(()=>{
+        this.reset();
+      },1000)
     },
     /** 重置按钮操作 */
     resetQuery() {
@@ -306,15 +347,18 @@ export default {
       this.queryParams = {
         name:undefined,
         current:1,
-        size:20
+        size:15,
+        pageSize:15,
+        pageNo:1,
+
       }
-      this.resetForm("queryForm");
+      //this.resetForm("queryForm");
       this.handleQuery();
     },
     // 表单重置
     reset() {
       this.form = {};
-      this.resetForm("form");
+      //this.resetForm("form");
     },
     /** 搜索按钮操作 */
     handleQuery() {
@@ -325,31 +369,11 @@ export default {
     getList() {
       this.loading = true;
       getInspectionPoint(this.queryParams).then(response => {
-        this.adminList = response.data.records;
-        this.total = response.data.total;
+        this.adminList = response.data.pageList;
+        this.totalCount = response.data.totalCount;
         this.loading = false;
+        this.getLocal()
       });
-      /* 公司列表 */
-      listChannel(this.queryParams).then(response => {
-        if(response.data.records.length>0){
-          this.companyList = response.data.records.map(val =>{
-            return {
-              dictValue:val.ownerId,
-              dictLabel:val.ownerName,
-              address:val.ownerAddress,
-            }
-          })
-        }
-      });
-      //设备类型
-      getDeviceType({current:1,size:100}).then(response =>{
-        this.dwtypeList = response.data.records.map(val=>{
-          return {
-            id:val.id,
-            name:val.typeName
-          }
-        });
-      })
     },
 
     /** 修改按钮操作 */
@@ -371,22 +395,20 @@ export default {
     submitForm(row) {
       this.$refs["form"].validate(valid => {
         if (valid) {
-          this.form.latestChangeTime = YearMonthDateSFN()
-          this.form.spotType = 1
-          this.form.userName = 1
+          this.form.type = 1
           this.loading = true
           if (this.form.id != undefined) {
             updateInspectionPoint(this.form).then(response => {
               this.loading = false,
-              this.msgSuccess("修改成功");
+              this.$message.success("修改成功")
               this.open = false;
               this.getList();
             }).catch(()=>{
               this.loading = false
             })
           } else {
-            this.form.spotLabelAnalysis = new Date().getTime()
-            this.creatQrCode(this.form.spotLabelAnalysis)
+            this.form.qrContent = new Date().getTime()
+            this.creatQrCode(this.form.qrContent)
           }
         }
       });
@@ -394,12 +416,12 @@ export default {
     /**新增 */
     addData(){
       addInspectionPoint(this.form).then(response => {
-        this.loading = false,
-        this.msgSuccess("新增成功");
-        this.open = false;
-        this.getList();
-      }).catch(()=>{
         this.loading = false
+        if(response.status == "SUCCESS"){
+          this.$message.success("新增成功")
+          this.open = false;
+          this.getList();
+        }
       })
     },
     /** 删除按钮操作 */
@@ -413,7 +435,7 @@ export default {
           return delInspectionPoint(ids);
         }).then(() => {
           this.getList();
-          this.msgSuccess("删除成功");
+          this.$message.success("删除成功");
         }).catch(() => {});
     },
     /** 导出按钮操作 */

+ 172 - 40
src/views/MochaITOM/record/index.vue

@@ -1,8 +1,8 @@
 <template>
   <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="90px">
-      <el-form-item label="时间:" label-width="50px">
-        <el-date-picker style="vertical-align: middle;width:340px"
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" >
+      <el-form-item label="时间:" >
+        <el-date-picker style="width:360px"
           v-model="dateRange"
           size="small"
           value-format="yyyy-MM-dd HH:mm:ss"
@@ -12,10 +12,10 @@
           end-placeholder="结束日期"
         ></el-date-picker>
       </el-form-item>
-      <el-form-item label="完成状态">
-        <el-select v-model.trim="queryParams.isComplete"  size="small" style="width:120px">
-          <el-option value="false" label="未完成"></el-option>
-          <el-option value="true" label="已完成"></el-option>
+      <el-form-item label="完成状态:">
+        <el-select v-model.trim="queryParams.status"  size="small" style="width:160px" placeholder="请选择完成状态">
+          <el-option value="0" label="未完成"></el-option>
+          <el-option value="1" label="已完成"></el-option>
         </el-select>
       </el-form-item>
       <el-form-item>
@@ -35,35 +35,30 @@
     <el-row :gutter="20" v-loading="loading2">
       <el-col :span="2.4">
         <el-col class="event">
-            维保人员数量<span class="color1 colorc">{{collectList.userCount}}</span>
+            记录数量<span class="color1 colorc">{{collectList.total}}</span>
         </el-col>
       </el-col>
       <el-col :span="2.4">
         <el-col class="event">
-            今日任务<span class="color2 colorc">{{collectList.totalCount}}</span>
+            进行中任务<span class="color2 colorc">{{collectList.inWork}}</span>
         </el-col>
       </el-col>
       <el-col :span="2.4" >
         <el-col class="event">
-            超时任务<span class="color3 colorc">{{collectList.failCount}}</span>
+            超时任务<span class="color3 colorc">{{collectList.timeOut}}</span>
         </el-col>
       </el-col>
       <el-col :span="2.4">
         <el-col class="event">
-            今日完成任务
-            <span class="color4 colorc">{{collectList.successCount}}</span>
+            完成任务
+            <span class="color4 colorc">{{collectList.success}}</span>
         </el-col>
       </el-col>
     </el-row>
-    <el-table v-loading="loading" :data="adminList" style="margin-top:20px;" height="calc(100vh - 34vh)">
+    <el-table v-loading="loading" :data="adminList" style="margin-top:20px;" :max-height="tableHeight">
       <el-table-column label="任务名称" align="center" prop="planName" show-overflow-tooltip />
       <el-table-column label="维保点位" align="center" prop="pointName" show-overflow-tooltip />
-      <el-table-column label="应完成时间" align="center" prop="ywcTime" show-overflow-tooltip />
-      <!-- <el-table-column label="当前状态" align="center" prop="property" show-overflow-tooltip >
-        <template slot-scope="scope">
-          <span :class="scope.row.alarmStatus == 0 ? 'color3' : 'color4'">{{scope.row.alarmStatus == 0 ? "未处理" : "已处理"}}</span>
-        </template>
-      </el-table-column> -->
+      <el-table-column label="应完成时间" align="center" prop="endDate" show-overflow-tooltip />
       <el-table-column label="完成情况" align="center" prop="isComplete" show-overflow-tooltip >
         <template slot-scope="scope">
           <span :class="scope.row.isComplete == false ? 'color3' : 'color4'">{{scope.row.isComplete == false ? "未完成" : "已完成"}}</span>
@@ -71,20 +66,60 @@
       </el-table-column> 
       <el-table-column label="相关责任人" align="center" prop="dutyName" show-overflow-tooltip />
       <el-table-column label="联系电话" align="center" prop="dutyPhone" show-overflow-tooltip />
+      <el-table-column label="操作" width="190" fixed="right" >
+        <template slot-scope="scope">
+          <el-button v-if="scope.row.isComplete && scope.row.updateTime"
+            icon="el-icon-video-play"
+            style="color: #406ce5"
+            @click="play(scope.row)"
+            >视频回放</el-button
+          >
+          <el-button v-else
+            icon="el-icon-video-play"
+            style="color: #406ce5"
+            @click="play(scope.row)"
+            disabled
+            >视频回放</el-button
+          >
+        </template>
+      </el-table-column>
     </el-table>
-    <pagination
-      v-show="total>0"
-      :total="total"
-      :page.sync="queryParams.current"
-      :limit.sync="queryParams.size"
-      @pagination="getList"
-    />
-    <!-- 导出-->
-    <a href="" download="" id="xz" style="position: absolute;z-index: -1;opacity: 0;"></a>
+    <el-pagination
+      background
+      @current-change="handleCurrentChange"
+      :page-sizes="[10, 15, 20, 30]"
+      @size-change="handleSizeChange"
+      :current-page="queryParams.pageNo"
+      :page-size="queryParams.pageSize"
+      layout="sizes,prev, pager, next"
+      :total="totalCount"
+    >
+    </el-pagination>
+    <!-- 视频播放 -->
+    <el-dialog :visible.sync="dialogTable2" @close='closeDialog'>
+      <template slot="title">
+        <!-- <div
+          class="titleZise"
+          style="font-size: 15px; color: #484848; font-weight: 700"
+        >
+          {{ this.cameraTitle }}
+        </div> -->
+      </template>
+      <video
+        class="hlsVideo monitor-height"
+        ref="hlsVideo"
+        style="width: 100%"
+        controls
+        preload="true"
+        muted
+      ></video>
+    </el-dialog>
   </div>
 </template>
 <script>
-import { getMaintianLog, exportMaintianLog,getCollect } from "@/api/MochaITOM/record";
+import Hls from "hls.js";
+import { getCollect, getPlanDetail } from "@/api/MochaITOM/record";
+import { getTimeFormat } from "@/assets/js/dataFormate.js";
 export default {
   name: "TbAlarm",
   data() {
@@ -94,7 +129,7 @@ export default {
       // 显示搜索条件
       showSearch: true,
       // 总条数
-      total: 0,
+       totalCount:undefined,
       // 参数表格数据
       adminList: [],
       // 弹出层标题
@@ -104,11 +139,13 @@ export default {
       // 查询参数
       queryParams: {
         current: 1,
-        size: 10,
+        size: 15,
         name: undefined,
         startTime:undefined,
         endTime:undefined,
-        isComplete:undefined
+        status:undefined,
+        pageSize:15,
+        pageNo:1
       },
       // 表单参数
       form: {},
@@ -123,13 +160,39 @@ export default {
 
       ],
       loading2:true,
+      tableHeight:undefined,
+      dialogTable2:false, //视频弹框
+      cameraTitle:undefined //视频标题
     };
   },
   created() {
     this.getList();//初始化table
     // this.getCollect();//初始化table
   },
+  mounted() {
+    // table高度
+    if(window.innerWidth <1920){
+      this.tableHeight = window.innerHeight - 300
+    }else{
+      this.tableHeight = window.innerHeight - 295
+    }
+    // 监听窗口大小变化
+    let self = this;
+    window.onresize = function() {
+      self.tableHeight = window.innerHeight - 300
+    }
+  },
   methods: {
+    //分页查询
+    handleCurrentChange(val) {
+      this.queryParams.pageNo = val;
+      this.getList();
+    },
+    //分页查询
+    handleSizeChange(val) {
+      this.queryParams.pageSize = val;
+      this.getList();
+    },
     //强制el-input刷新
     onInput(){
         this.$forceUpdate();
@@ -145,8 +208,10 @@ export default {
       this.queryParams = {
         name:undefined,
         current:1,
-        size:10,
-        type:1
+        size:15,
+        pageSize:15,
+        pageNo:1,
+        status:undefined
       }
       this.resetForm("queryForm");
       this.handleQuery();
@@ -168,9 +233,9 @@ export default {
         this.queryParams.startTime = this.dateRange[0]
         this.queryParams.endTime = this.dateRange[1]
       }
-      getMaintianLog(this.queryParams).then(response => {
-        this.adminList = response.data.records;
-        this.total = response.data.total;
+      getPlanDetail(this.queryParams).then(response => {
+        this.adminList = response.data.pageList;
+        this.totalCount = response.data.totalCount;
         this.loading = false;
       });
       /** 综合列表列表 */
@@ -180,9 +245,6 @@ export default {
         
       });
     },
-    
-
-
     /** 导出按钮操作 */
     handleExport() {
       exportMaintianLog(this.queryParams).then(response =>{
@@ -192,7 +254,77 @@ export default {
         document.getElementById("xz").click()
       })
     },
+
+
+
+   /** 视频播放 **/
+    //播放按钮
+    play(row) {
+      let start = getTimeFormat(row.updateTime) - 60
+      let end = start + 80
+      let timeC =Number(end-start)
+      let deviceId = (row.channleId).split("$")[0]
+      let id = row.channleId.split("$")[(row.channleId.split("$")).length-1]
+      this.destroyHls()
+      this.cameraTitle = row.dhDeviceName
+      let url =   `http://${row.nvrIp}:${row.hlsPort}/vod/device/cameraid/${deviceId}%24${id}/substream/1/recordtype/1/totallength/${timeC}/begintime/${start}/endtime/${end}.m3u8`
+      this.loadVideoFn(url)
+    },
+    destroyHls: function () {
+      if (this.hls) {
+        this.$refs.hlsVideo.pause();
+        this.hls.destroy();
+        this.hls = null;
+      }
+    },
+    loadVideoFn(url) {
+      this.dialogTable2 = true
+      setTimeout(() =>{
+        if (Hls.isSupported()) {
+          this.hls = new Hls();
+          this.hls.loadSource(url);
+          this.hls.attachMedia(this.$refs.hlsVideo);
+          this.hls.on(Hls.Events.MANIFEST_PARSED, () => {
+            console.log("加载成功");
+            this.$refs.hlsVideo.play();
+          });
+
+          this.hls.on(Hls.Events.ERROR, (event, data) => {
+            // console.log(event, data);
+            // 监听出错事件
+            console.log("加载失败");
+          });
+        }
+      },1000)
+    },
+    //关闭弹框
+    closeDialog(){
+      this.destroyHls()
+    },
   }
 };
 </script>
+<style scoped>
+.event{
+    border:1px solid #ccc;
+    padding:1.5vh 0;
+    font-size:0.9vw;
+  }
+  .colorc{
+    font-size:1.2vw;
+    margin-left:4px;
+  }
+  .color1{
+    color:#6F99FA!important;
+  }
+  .color2{
+    color:#DE8C54!important
+  }
+  .color3{
+    color:#FF5801!important
+  }
+  .color4{
+    color:#37FF01!important
+  }
+</style>
 

+ 87 - 48
src/views/MochaITOM/route/index.vue

@@ -25,7 +25,7 @@
       </el-form-item>
     </el-form>
 
-    <el-table v-loading="loading" :data="adminList" height="calc(100vh - 28vh)">
+    <el-table v-loading="loading" :data="adminList" :max-height="tableHeight">
       <el-table-column label="路线名称" align="center" prop="name"  show-overflow-tooltip />
       <el-table-column label="创建时间" align="center" prop="createTime"  show-overflow-tooltip />
       <el-table-column label="创建人" align="center" prop="createBy"  show-overflow-tooltip />
@@ -59,28 +59,23 @@
             </el-form-item>
           </el-col>
           <el-col style="font-size:16px;font-weight:700;margin:10px 0 20px;">维保点位</el-col>
-          <el-table v-loading="loading2" :data="adminList2" height="300" @selection-change="handleSelectionChange"  ref="dataTable">
+          <el-table v-loading="loading2" :data="adminList2" height="200" @selection-change="handleSelectionChange"  ref="dataTable" style="margin-bottom:50px">
             <el-table-column type="selection" />
-            <el-table-column label="点位名称" align="center" prop="spotName"  show-overflow-tooltip />
-            <el-table-column label="点位地址" align="center" prop="spotAddress"  show-overflow-tooltip />
-            <el-table-column label="点位图片" align="center" prop="pictureRoute"  show-overflow-tooltip >
-              <template slot-scope="scope">
-                <el-image
-                  v-if="scope.row.pictureRoute"
-                  style="width: 24px; height: 24px"
-                  :preview-src-list="['https://smartpark.caih.com/dmapi/archive/' + scope.row.pictureRoute]"
-                  :src="'https://smartpark.caih.com/dmapi/archive/' + scope.row.pictureRoute">
-                </el-image>
-            </template>
-            </el-table-column>
+            <el-table-column label="点位名称" align="center" prop="name"  show-overflow-tooltip />
+            <el-table-column label="点位地址" align="center" prop="address"  show-overflow-tooltip />
           </el-table>
-          <pagination
-            v-show="total2>0"
-            :total="total2"
-            :page.sync="queryParams2.current"
-            :limit.sync="queryParams2.size"
-            @pagination="getList2"
-          />
+           <el-pagination
+           style="bottom:0px"
+            background
+            @current-change="handleCurrentChange2"
+            :page-sizes="[10, 15, 20, 30]"
+            @size-change="handleSizeChange2"
+            :current-page="queryParams2.pageNo"
+            :page-size="queryParams2.pageSize"
+            layout="sizes,prev, pager, next"
+            :total="totalCount2"
+          >
+          </el-pagination>
         </el-row>
       </el-form>
       <div slot="footer" class="dialog-footer">
@@ -88,13 +83,17 @@
         <el-button @click="cancel">取 消</el-button>
       </div>
     </el-dialog>
-    <pagination
-      v-show="total>0"
-      :total="total"
-      :page.sync="queryParams.current"
-      :limit.sync="queryParams.size"
-      @pagination="getList"
-    />
+    <el-pagination
+      background
+      @current-change="handleCurrentChange1"
+      :page-sizes="[10, 15, 20, 30]"
+      @size-change="handleSizeChange1"
+      :current-page="queryParams.pageNo"
+      :page-size="queryParams.pageSize"
+      layout="sizes,prev, pager, next"
+      :total="totalCount1"
+    >
+    </el-pagination>
     <a href="" download="" id="xz" style="position: absolute;z-index: -1;opacity: 0;"></a>
   </div>
 </template>
@@ -111,9 +110,9 @@ export default {
       // 显示搜索条件
       showSearch: true,
       // 总条数
-      total: 0,
+      totalCount1: undefined,
       // 总条数
-      total2: 0,
+      totalCount2: undefined,
       // 参数表格数据
       adminList: [],
       // 参数表格数据
@@ -125,14 +124,18 @@ export default {
       // 查询参数
       queryParams: {
         current: 1,
-        size: 20,
+        size: 15,
         name: undefined,
-        dutyId:undefined
+        dutyId:undefined,
+        pageNo:1,
+        pageSize:15,
       },
       // 查询参数
       queryParams2: {
         current: 1,
-        size: 20,
+        size: 15,
+        pageNo:1,
+        pageSize:15,
       },
       // 表单参数
       form: {},
@@ -142,13 +145,46 @@ export default {
           { required: true, message: "线路名称不能为空",  trigger: "blur"  }
         ],
       },
+      tableHeight:undefined,
     };
   },
   created() {
     this.getList();//初始化table
   },
+  mounted() {
+    // table高度
+    if(window.innerWidth <1920){
+      this.tableHeight = window.innerHeight - 300
+    }else{
+      this.tableHeight = window.innerHeight - 295
+    }
+    // 监听窗口大小变化
+    let self = this;
+    window.onresize = function() {
+      self.tableHeight = window.innerHeight - 300
+    }
+  },
   methods: {
-    
+    //分页查询
+    handleCurrentChange1(val) {
+      this.queryParams.pageNo = val;
+      this.getList();
+    },
+    //分页查询
+    handleSizeChange1(val) {
+      this.queryParams.pageSize = val;
+      this.getList();
+    },
+    //分页查询
+    handleCurrentChange2(val) {
+      this.queryParams2.pageNo = val;
+      this.getList();
+    },
+    //分页查询
+    handleSizeChange2(val) {
+      this.queryParams2.pageSize = val;
+      this.getList();
+    },
     //强制el-input刷新
     onInput(){
         this.$forceUpdate();
@@ -164,15 +200,17 @@ export default {
       this.queryParams = {
         name:undefined,
         current:1,
-        size:20
+        sizee:15,
+        pageSize:15,
+        pageNo1,
       }
-      this.resetForm("queryForm");
+      // this.resetForm("queryForm");
       this.handleQuery();
     },
     // 表单重置
     reset() {
       this.form = {};
-      this.resetForm("form");
+      // this.resetForm("form");
     },
     /** 搜索按钮操作 */
     handleQuery() {
@@ -183,15 +221,16 @@ export default {
     getList() {
       this.loading = true;
       getPlanPath(this.queryParams).then(response => {
-        this.adminList = response.data.records;
-        this.total = response.data.total;
+        this.adminList = response.data.pageList;
+        this.totalCount1 = response.data.totalCount;
         this.loading = false;
       });
     },
     getList2(row){
         this.adminList2 = []
         getInspectionPoint(this.queryParams2).then(response => {
-            this.adminList2 = response.data.records;
+            this.adminList2 = response.data.pageList;
+            this.totalCount2 = response.data.totalCount;
             if(row && row.pointIds.length>0){
                 let list = []
                 for(let a = 0;a<row.pointIds.length;a++){
@@ -228,7 +267,7 @@ export default {
           if(res.data.length>0){
               row.pointIds = []
               for(let i=0;i<res.data.length;i++){
-                  row.pointIds.push(res.data[i].spotId)
+                  row.pointIds.push(res.data[i].pointId)
               }
           }
           this.getList2(row)
@@ -252,7 +291,7 @@ export default {
           if (this.form.id != undefined) {
             updatePlanPath(this.form).then(response => {
               this.loading = false,
-              this.msgSuccess("修改成功");
+              this.$message.success("修改成功");
               this.open = false;
               this.getList();
             }).catch(()=>{
@@ -260,12 +299,12 @@ export default {
             })
           } else {
             addPlanPath(this.form).then(response => {
-              this.loading = false,
-              this.msgSuccess("新增成功");
-              this.open = false;
-              this.getList();
-            }).catch(()=>{
               this.loading = false
+              if(response.status == "SUCCESS"){
+                this.$message.success("新增成功");
+                this.open = false;
+                this.getList();
+              }
             })
           }
         }
@@ -282,7 +321,7 @@ export default {
           return delPlanPath(ids);
         }).then(() => {
           this.getList();
-          this.msgSuccess("删除成功");
+          this.$message.success("删除成功");
         }).catch(() => {});
     },
     /** table */

+ 4 - 4
src/views/alarm/alarm-log/index.vue

@@ -42,10 +42,10 @@
       @selection-change="handleSelectionChange"
       :max-height="tableHeight"
     >
-      <el-table-column prop="cidcode" label="CID码"></el-table-column>
-      <el-table-column prop="cidlevel" label="CID级别"></el-table-column>
-      <el-table-column prop="cidmemo" label="CID内容"></el-table-column>
-      <el-table-column prop="cidtype" label="CID类型"></el-table-column>
+      <el-table-column prop="cidcode" label="设防码"></el-table-column>
+      <el-table-column prop="cidlevel" label="设防级别"></el-table-column>
+      <el-table-column prop="cidmemo" label="设防内容"></el-table-column>
+      <el-table-column prop="cidtype" label="设防类型"></el-table-column>
       <el-table-column prop="commType" label="连接类型">
         <template  slot-scope="scope">
             {{scope.row.commType == "1" ? "网络" : scope.row.commType == "2" ? "串口" :""}}

+ 0 - 3
src/views/building/building_mage.vue

@@ -250,7 +250,6 @@ export default {
       }
     },
     handleDelete(index, row) {
-      console.log(row.id)
       this.form.id = row.id
       this.form.status = 0
       this.$confirm("确定删除吗?", "删除", {
@@ -259,7 +258,6 @@ export default {
         type: "warning",
       }).then(() => {
           api.deletBuild(this.form).then((request) => {
-            console.log(request);
             if (request.flag == true) {
               this.$message({
                 type: "success",
@@ -288,7 +286,6 @@ export default {
     },
     //改变每条数
     handleSizeChange(val) {
-      console.log(val)
       this.pageSize = val;
       this.form.pageSize = this.pageSize
       this.query.pageSize = this.pageSize

+ 0 - 1
src/views/building/floor_mage.vue

@@ -290,7 +290,6 @@ export default {
     },
     select(value){
       this.floorBuildUuid = value
-      console.log(value)
     }
   },
 };

+ 0 - 2
src/views/building/room_mage.vue

@@ -200,7 +200,6 @@ export default {
     },
     //条件查询
     queryData(){
-      console.log(111)
       api.queryRoom(this.query).then((Response) => {
         if(Response.data.pageList){
           this.tableData = Response.data.pageList
@@ -303,7 +302,6 @@ export default {
     },
      select(value){
       this.roomFloorUuid = value
-      console.log(value)
     }
   },
 };

+ 0 - 1
src/views/device/camera/index.vue

@@ -415,7 +415,6 @@ export default {
       //     }
       //     setTimeout(()=>{
       //       this.tableData = arr
-      //       console.log(this.tableData)
       //       this.loading = false
       //       this.status2 = true
       //       this.query ={

+ 3 - 6
src/views/device/camera2/index.vue

@@ -32,13 +32,10 @@
           icon="el-icon-search"
           class="search-button"
           @click="getData()"
-          >搜索</el-button
-        >
-      </div>
-
-      <div class="handle-button-right">
+          >搜索</el-button>
         <el-button icon="el-icon-plus" type="success" @click="AddoOrEdit()">新增</el-button>
       </div>
+
     </div>
     <el-divider></el-divider>
     <!-- 初始化数据 -->
@@ -130,7 +127,7 @@
       <el-form>
       <el-form-item label="关联设备">
         <el-col :span="12">
-          <el-select v-model="AddOrEditForm.GLcode" placeholder="请选择关联设备" @change="deviceUrl(AddOrEditForm.GLcode)" style="width:100%">
+          <el-select v-model="AddOrEditForm.GLcode" placeholder="请选择关联设备" @change="deviceUrl(AddOrEditForm.GLcode)" style="width:150%">
             <el-option
               v-for="dict in idOptions"
               :key="dict.dictValue"

+ 78 - 83
src/views/device/guard/index.vue

@@ -28,46 +28,41 @@
         </div>
         <div class="filter-item">
           状态:
-         <el-select
-              v-model="query.status"
-              placeholder="状态"
-              clearable
-              size="small"
-              style="width: 150px"
-            >
-              <el-option
-                v-for="dict in statusOptions"
-                :key="dict.dictValue"
-                :label="dict.dictLabel"
-                :value="dict.dictValue"
-              />
-            </el-select>
+          <el-select
+            v-model="query.status"
+            placeholder="状态"
+            clearable
+            size="small"
+            style="width: 150px"
+          >
+            <el-option
+              v-for="dict in statusOptions"
+              :key="dict.dictValue"
+              :label="dict.dictLabel"
+              :value="dict.dictValue"
+            />
+          </el-select>
         </div>
 
         <el-button
           type="primary"
           icon="el-icon-search"
           class="search-button"
-          @click="queryPerimeterDevice({
-            pageNo: pageNo,
-            pageSize: pageSize,
-            status:query.status,
-            deviceNum:query.deviceNum,
-            deviceName:query.deviceName,
-            addr:query.addr,
-          })"
+          @click="
+            queryPerimeterDevice({
+              pageNo: pageNo,
+              pageSize: pageSize,
+              status: query.status,
+              deviceNum: query.deviceNum,
+              deviceName: query.deviceName,
+              addr: query.addr,
+            })
+          "
           >搜索</el-button
         >
-      </div>
-
-      <div class="handle-button-right">
         <el-button icon="el-icon-plus" type="success" @click="insert_add()"
           >新增</el-button
         >
-        <!-- <el-button type="warning">
-          <svg-icon icon-class="export" />
-          导出
-        </el-button> -->
       </div>
     </div>
 
@@ -127,15 +122,14 @@
 
     <el-dialog :title="this.el_button" :visible.sync="dialogFormVisible">
       <el-form>
-        <el-form-item
-          v-for="ins in insert_data"
-          :key="ins.prop"
-          :label="ins.label"
-          :label-width="formLabelWidth"
-        >
-          <el-input v-model="ins.value" autocomplete="off"></el-input>
-        </el-form-item>
-        <el-form-item
+        <el-row :gutter="20">
+          <el-col :span="12" v-for="ins in insert_data" :key="ins.prop">
+            <el-form-item :label="ins.label" :label-width="formLabelWidth">
+              <el-input v-model="ins.value" autocomplete="off"></el-input>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <!-- <el-form-item
           v-if="this.update_win"
           label="设备状态:"
           :label-width="formLabelWidth"
@@ -153,7 +147,7 @@
             >
             </el-option>
           </el-select>
-        </el-form-item>
+        </el-form-item> -->
       </el-form>
       <div slot="footer" class="dialog-footer">
         <el-button
@@ -181,23 +175,25 @@ export default {
       // 状态数据字典
       statusOptions: [
         {
-          dictLabel:"启用",
-          dictValue:0
-        },{
-          dictLabel:"停用",
-          dictValue:1
-        },{
-          dictLabel:"报废",
-          dictValue:2
-        }
+          dictLabel: "启用",
+          dictValue: 0,
+        },
+        {
+          dictLabel: "停用",
+          dictValue: 1,
+        },
+        {
+          dictLabel: "报废",
+          dictValue: 2,
+        },
       ],
-      query:{
-        deviceNum:undefined,
-        deviceName:undefined,
-        addr:undefined,
-        status:undefined
+      query: {
+        deviceNum: undefined,
+        deviceName: undefined,
+        addr: undefined,
+        status: undefined,
       },
-      loading:true,
+      loading: true,
       multipleSelection: [],
 
       dialogFormVisible: false,
@@ -225,28 +221,28 @@ export default {
       update_value: "",
       update_win: false,
       //表格自适应高度
-      tableHeight:undefined,
+      tableHeight: undefined,
     };
   },
   created() {
     this.queryPerimeterDevice({
       pageNo: this.pageNo,
       pageSize: this.pageSize,
-      status:this.query.status
+      status: this.query.status,
     });
   },
-  mounted(){
+  mounted() {
     // table高度
-    if(window.innerWidth <1920){
-      this.tableHeight = window.innerHeight - 300
-    }else{
-      this.tableHeight = window.innerHeight - 295
+    if (window.innerWidth < 1920) {
+      this.tableHeight = window.innerHeight - 300;
+    } else {
+      this.tableHeight = window.innerHeight - 295;
     }
     // 监听窗口大小变化
     let self = this;
-    window.onresize = function() {
-      self.tableHeight = window.innerHeight - 300
-    }
+    window.onresize = function () {
+      self.tableHeight = window.innerHeight - 300;
+    };
     this.getData();
   },
   methods: {
@@ -279,7 +275,7 @@ export default {
               remark: this.insert_data[5].value,
             })
             .then((response) => {
-              this.$message.success("新增成功")
+              this.$message.success("新增成功");
               this.dialogFormVisible = false;
               this.queryPerimeterDevice();
             });
@@ -296,7 +292,7 @@ export default {
               status: this.update_value,
             })
             .then((response) => {
-              this.$message.success("修改成功")
+              this.$message.success("修改成功");
               this.dialogFormVisible = false;
               this.queryPerimeterDevice();
             });
@@ -322,10 +318,10 @@ export default {
       this.queryPerimeterDevice({
         pageNo: this.pageNo,
         pageSize: this.pageSize,
-        status:this.query.status,
-        deviceNum:this.query.deviceNum,
-        deviceName:this.query.deviceName,
-        addr:this.query.addr,
+        status: this.query.status,
+        deviceNum: this.query.deviceNum,
+        deviceName: this.query.deviceName,
+        addr: this.query.addr,
       });
     },
     //改变每条数
@@ -334,10 +330,10 @@ export default {
       this.queryPerimeterDevice({
         pageNo: this.pageNo,
         pageSize: this.pageSize,
-        status:this.query.status,
-        deviceNum:this.query.deviceNum,
-        deviceName:this.query.deviceName,
-        addr:this.query.addr,
+        status: this.query.status,
+        deviceNum: this.query.deviceNum,
+        deviceName: this.query.deviceName,
+        addr: this.query.addr,
       });
     },
     //查询区域入侵告警设备登记信息
@@ -354,8 +350,8 @@ export default {
         { prop: "remark", label: "备注", width: "" },
       ];
       api.queryPerimeterDevice(data).then((response) => {
-        if(response.status == "SUCCESS"){
-          if(response.data.pageList){
+        if (response.status == "SUCCESS") {
+          if (response.data.pageList) {
             this.tableData = response.data.pageList;
             this.totalCount = response.data.totalCount;
             for (let i = 0; i < this.tableData.length; i++) {
@@ -368,10 +364,9 @@ export default {
                 ? (tableData.status = "报废")
                 : "";
             }
-            this.loading = false
+            this.loading = false;
           }
         }
-
       });
     },
     //编辑按钮操作事件
@@ -406,13 +401,13 @@ export default {
         type: "warning",
       })
         .then(() => {
-          api.perimeterAlarmDel({id:row.id}).then((response) => {
-            this.$message.success("删除成功")
-            this.queryPerimeterDevice()
-          })
+          api.perimeterAlarmDel({ id: row.id }).then((response) => {
+            this.$message.success("删除成功");
+            this.queryPerimeterDevice();
+          });
         })
         .catch(() => {
-          this.$message.info("已取消删除")
+          this.$message.info("已取消删除");
         });
     },
     //定义导出Excel表格事件

+ 1 - 32
src/views/index/components/alarming.vue

@@ -36,38 +36,7 @@ export default {
       username: "",
       path: "",
       socket: "",
-      arrayList: [
-        // {
-        //   id: 1,
-        //   time: "2020-09-22 15:00:00",
-        //   content: "事件11111",
-        // },
-        // {
-        //   id: 2,
-        //   time: "2020-09-22 15:00:00",
-        //   content: "事件11111",
-        // },
-        // {
-        //   id: 3,
-        //   time: "2020-09-22 15:00:00",
-        //   content: "事件11111",
-        // },
-        // {
-        //   id: 4,
-        //   time: "2020-09-22 15:00:00",
-        //   content: "事件11111",
-        // },
-        // {
-        //   id: 5,
-        //   time: "2020-09-22 15:00:00",
-        //   content: "事件11111",
-        // },
-        // {
-        //   id: 6,
-        //   time: "2020-09-22 15:00:00",
-        //   content: "事件11111",
-        // }
-      ],
+      arrayList: [],
     };
   },
   mounted() {

+ 9 - 13
src/views/index/components/monitor.vue

@@ -40,7 +40,7 @@
           <div class="monitor-option">
             <el-form ref="form" :model="form" label-width="10rem">
               <el-form-item label="画面一:">
-                <el-select class="main-select-tree" ref="selectTree" v-model="selectVideoHc[0].name"  >
+                <el-select class="main-select-tree" ref="selectTree" v-model="selectVideoHc[0].label"  >
                   <el-option v-for="item in formatData(list)" :key="item.value" :label="item.label" :value="item.label"   class="select1" />
                   <el-tree class="main-select-el-tree" ref="selecteltree"
                     :data="list"
@@ -54,7 +54,7 @@
                 </el-select>
               </el-form-item>
               <el-form-item label="画面二:">
-                <el-select class="main-select-tree" ref="selectTree" v-model="selectVideoHc[1].name"  >
+                <el-select class="main-select-tree" ref="selectTree" v-model="selectVideoHc[1].label"  >
                   <el-option v-for="item in formatData(list)" :key="item.value" :label="item.label" :value="item.label"   class="select1" />
                   <el-tree class="main-select-el-tree" ref="selecteltree"
                     :data="list"
@@ -68,7 +68,7 @@
                 </el-select>
               </el-form-item>
               <el-form-item label="画面三:">
-                <el-select class="main-select-tree" ref="selectTree" v-model="selectVideoHc[2].name"  >
+                <el-select class="main-select-tree" ref="selectTree" v-model="selectVideoHc[2].label"  >
                   <el-option v-for="item in formatData(list)" :key="item.value" :label="item.label" :value="item.label"   class="select1" />
                   <el-tree class="main-select-el-tree" ref="selecteltree"
                     :data="list"
@@ -82,7 +82,7 @@
                 </el-select>
               </el-form-item>
               <el-form-item label="画面四:">
-                <el-select class="main-select-tree" ref="selectTree" v-model="selectVideoHc[3].name"  >
+                <el-select class="main-select-tree" ref="selectTree" v-model="selectVideoHc[3].label"  >
                   <el-option v-for="item in formatData(list)" :key="item.value" :label="item.label" :value="item.label"   class="select1" />
                   <el-tree class="main-select-el-tree" ref="selecteltree"
                     :data="list"
@@ -96,7 +96,7 @@
                 </el-select>
               </el-form-item>
               <el-form-item label="画面五:">
-                <el-select class="main-select-tree" ref="selectTree" v-model="selectVideoHc[4].name"  >
+                <el-select class="main-select-tree" ref="selectTree" v-model="selectVideoHc[4].label"  >
                   <el-option v-for="item in formatData(list)" :key="item.value" :label="item.label" :value="item.label"   class="select1" />
                   <el-tree class="main-select-el-tree" ref="selecteltree"
                     :data="list"
@@ -110,7 +110,7 @@
                 </el-select>
               </el-form-item>
               <el-form-item label="画面六:">
-                <el-select class="main-select-tree" ref="selectTree" v-model="selectVideoHc[5].name"  >
+                <el-select class="main-select-tree" ref="selectTree" v-model="selectVideoHc[5].label"  >
                   <el-option v-for="item in formatData(list)" :key="item.value" :label="item.label" :value="item.label"   class="select1" />
                   <el-tree class="main-select-el-tree" ref="selecteltree"
                     :data="list"
@@ -325,7 +325,6 @@ export default {
             })
           }
           this.list = arr
-          console.log(this.list)
         }
       })
     },
@@ -342,7 +341,7 @@ export default {
       ).then(Response =>{
         if(Response.status == "SUCCESS"){
           Message({
-            message: "添加成功",
+            message: "摄像头配置添加成功",
             type: 'success'
           })
         }
@@ -352,13 +351,12 @@ export default {
     getVideoUrl(){
       api.getVideoUrl("video.top.device").then(Response =>{
         if(Response.status == "SUCCESS"){
-          console.log(JSON.parse(Response.data.configValue))
           this.selectVideo = this.deepClone(JSON.parse(Response.data.configValue).video)
           this.selectVideoHc = this.deepClone(JSON.parse(Response.data.configValue).video)
           for(let i =0;i<this.selectVideo.length;i++){
             this.hls_video.push({
               ref: "hlsVideo" + (i),
-              name: this.selectVideo[i].name,
+              name: (this.selectVideo[i].name).split("/")[2],
               hls: "hlsVideo" + (i),
               url:this.selectVideo[i].url,
               boolhls: true,
@@ -383,7 +381,7 @@ export default {
       ).then(Response =>{
         if(Response.status == "SUCCESS"){
           Message({
-            message: "修改成功",
+            message: "摄像头配置修改成功",
             type: 'success'
           })
         }
@@ -411,7 +409,6 @@ export default {
           });
         }
       });
-      console.log(options)
       return options;
     },
     //下拉点击
@@ -537,7 +534,6 @@ export default {
       }
     },
     onSubmit() {
-      console.log("submit!");
     },
   },
   // created: function () {

+ 26 - 21
src/views/login/index.vue

@@ -46,7 +46,7 @@
           <img :src="codeUrl" @click="getCode" class="login-code-img"/>
         </div>
       </el-form-item>
-      <el-checkbox v-model="loginForm.rememberMe"   style="margin:0px 0px 25px 0px;">记住密码</el-checkbox>
+      <el-checkbox v-model="loginForm.rememberMe"   style="margin:0px 0px 25px 0px;" @change="memory">记住密码</el-checkbox>
       <el-button
         type="primary"
         @click.native.prevent="login_info()"
@@ -123,12 +123,10 @@ export default {
   methods: {
     getUrl(){
       let url = this.$route.query
-      if(url.id && url.name){
-        let data = {id:url.id,name:url.name}
+      if(url.username && url.password){
+        let data = {username:url.username,password:url.password}
         this.handleLoginERP(data)
       }else{
-        this.erp = true
-        this.ERPloading = false
         this.getCode();
         this.getCookie();
         this.zddl();//自动登录
@@ -154,6 +152,10 @@ export default {
       getCodeImg().then(res => {
         this.codeUrl = "data:image/gif;base64," + res.data.img;
         this.loginForm.uuid = res.data.uuid;
+        this.erp = true
+        setTimeout(()=>{
+          this.ERPloading = false
+        },)
       });
     },
     getCookie() {//缓存数据
@@ -170,31 +172,29 @@ export default {
       this.$refs.loginForm.validate(valid => {
         if (valid) {
           this.loading = true;
-          if (this.loginForm.rememberMe) {
-            Cookies.set("username429", this.loginForm.username, { expires: 300 });
-            Cookies.set("password429", encrypt(this.loginForm.password), { expires: 300 });
-            Cookies.set('rememberMe429', this.loginForm.rememberMe, { expires: 300 });
-          } else {
-            Cookies.remove("username429");
-            Cookies.remove("password429");
-            Cookies.remove('rememberMe429');
-          }
           this.$store.dispatch('login', this.loginForm).then(() => {
             this.$router.push('/index?name='+this.loginForm.username)
             window.localStorage.setItem('key',this.loginForm.username)
             this.loading=false
-          }).catch(err => {
-            this.loading=false
-            this.getCode()
-            this.$message.error(err); //登录失败提示错误
-          });
+          })
         }
       });
     },
+    memory(){
+      if (this.loginForm.rememberMe) {
+        Cookies.set("username429", this.loginForm.username, { expires: 300 });
+        Cookies.set("password429", encrypt(this.loginForm.password), { expires: 300 });
+        Cookies.set('rememberMe429', this.loginForm.rememberMe, { expires: 300 });
+      } else {
+        Cookies.remove("username429");
+        Cookies.remove("password429");
+        Cookies.remove('rememberMe429');
+      }
+    },
     handleLoginERP(data) {//erp登录
       Cookies.set("username429", data.name);
       this.$store.dispatch("LoginERP", data).then((res) => {
-        this.$router.push({ path: "/index"}).catch(()=>{});
+        this.$router.push({ path: "/index?name=" + data.id}).catch(()=>{});
       }).catch((err) => {
         location.href = '/#/';
       });
@@ -325,7 +325,8 @@ export default {
   letter-spacing: 1px;
 }
 .login-code-img {
-  height: 38px;
+  height: 36px;
+  width:100%;
 }
 
 .el-button--primary{
@@ -341,6 +342,10 @@ body,html{
   height:100%;
   background: #7171C6;
 }
+::v-deep .el-input__inner{
+  height:36px !important;
+  line-height: 36px !important;
+}
         
         #loader-wrapper {
             position: fixed;

+ 0 - 241
src/views/login/index2.vue

@@ -1,241 +0,0 @@
-<template>
-  <div class="login-container">
-    <el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form" auto-complete="on" label-position="left">
-
-      <div class="title-container">
-        <h3 class="title">用户登录</h3>
-      </div>
-
-      <el-form-item prop="username">
-        <span class="svg-container">
-          <svg-icon icon-class="user" />
-        </span>
-        <el-input
-          ref="username"
-          v-model="loginForm.username"
-          placeholder="请输入用户名"
-          name="username"
-          type="text"
-          tabindex="1"
-          auto-complete="on"
-        />
-      </el-form-item>
-
-      <el-form-item prop="password">
-        <span class="svg-container">
-          <svg-icon icon-class="password" />
-        </span>
-        <el-input
-          :key="passwordType"
-          ref="password"
-          v-model="loginForm.password"
-          :type="passwordType"
-          placeholder="请输入密码"
-          name="password"
-          tabindex="2"
-          auto-complete="on"
-          @keyup.enter.native="handleLogin"
-        />
-        <span class="show-pwd" @click="showPwd">
-          <svg-icon :icon-class="passwordType === 'password' ? 'eye' : 'eye-open'" />
-        </span>
-      </el-form-item>
-
-      <el-button :loading="loading" type="primary" style="width:100%;margin-bottom:30px;" @click.native.prevent="handleLogin">Login</el-button>
-
-      <div class="tips">
-        <span style="margin-right:20px;">username: admin</span>
-        <span> password: any</span>
-      </div>
-
-    </el-form>
-  </div>
-</template>
-
-<script>
-import { validUsername } from '@/utils/validate'
-
-export default {
-  name: 'Login',
-  data() {
-    const validateUsername = (rule, value, callback) => {
-      if (!validUsername(value)) {
-        callback(new Error('Please enter the correct user name'))
-      } else {
-        callback()
-      }
-    }
-    const validatePassword = (rule, value, callback) => {
-      if (value.length < 6) {
-        callback(new Error('The password can not be less than 6 digits'))
-      } else {
-        callback()
-      }
-    }
-    return {
-      loginForm: {
-        username: 'admin',
-        password: '111111'
-      },
-      loginRules: {
-        username: [{ required: true, trigger: 'blur', validator: validateUsername }],
-        password: [{ required: true, trigger: 'blur', validator: validatePassword }]
-      },
-      loading: false,
-      passwordType: 'password',
-      redirect: undefined
-    }
-  },
-  watch: {
-    $route: {
-      handler: function(route) {
-        this.redirect = route.query && route.query.redirect
-      },
-      immediate: true
-    }
-  },
-  methods: {
-    showPwd() {
-      if (this.passwordType === 'password') {
-        this.passwordType = ''
-      } else {
-        this.passwordType = 'password'
-      }
-      this.$nextTick(() => {
-        this.$refs.password.focus()
-      })
-    },
-    handleLogin() {
-      this.$refs.loginForm.validate(valid => {
-        if (valid) {
-          this.loading = true
-          this.$store.dispatch('user/login', this.loginForm).then(() => {
-            this.$router.push({ path: this.redirect || '/' })
-            this.loading = false
-          }).catch(() => {
-            this.loading = false
-          })
-        } else {
-          console.log('error submit!!')
-          return false
-        }
-      })
-    }
-  }
-}
-</script>
-
-<style lang="scss">
-/* 修复input 背景不协调 和光标变色 */
-/* Detail see https://github.com/PanJiaChen/vue-element-admin/pull/927 */
-
-$bg:#283443;
-$light_gray:#fff;
-$cursor: #fff;
-
-@supports (-webkit-mask: none) and (not (cater-color: $cursor)) {
-  .login-container .el-input input {
-    color: $cursor;
-  }
-}
-
-/* reset element-ui css */
-.login-container {
-  .el-input {
-    display: inline-block;
-    height: 47px;
-    width: 85%;
-
-    input {
-      background: transparent;
-      border: 0px;
-      -webkit-appearance: none;
-      border-radius: 0px;
-      padding: 12px 5px 12px 15px;
-      color: $light_gray;
-      height: 47px;
-      caret-color: $cursor;
-
-      &:-webkit-autofill {
-        box-shadow: 0 0 0px 1000px $bg inset !important;
-        -webkit-text-fill-color: $cursor !important;
-      }
-    }
-  }
-
-  .el-form-item {
-    border: 1px solid rgba(255, 255, 255, 0.1);
-    background: rgba(0, 0, 0, 0.1);
-    border-radius: 5px;
-    color: #454545;
-  }
-}
-</style>
-
-<style lang="scss" scoped>
-$bg:#2d3a4b;
-$dark_gray:#889aa4;
-$light_gray:#eee;
-
-.login-container {
-  min-height: 100%;
-  width: 100%;
-  // background-color: $bg;
-  background-image:url('../../assets/login-bg.png');
-  background-size:cover;
-  background-repeat:no-repeat;
-  overflow: hidden;
-
-  .login-form {
-    position: relative;
-    width: 520px;
-    max-width: 100%;
-    padding: 160px 35px 0;
-    margin: 0 auto;
-    margin-right:10%;
-    overflow: hidden;
-  }
-
-  .tips {
-    font-size: 14px;
-    color: #fff;
-    margin-bottom: 10px;
-
-    span {
-      &:first-of-type {
-        margin-right: 16px;
-      }
-    }
-  }
-
-  .svg-container {
-    padding: 6px 5px 6px 15px;
-    color: $dark_gray;
-    vertical-align: middle;
-    width: 30px;
-    display: inline-block;
-  }
-
-  .title-container {
-    position: relative;
-
-    .title {
-      font-size: 26px;
-      color: $light_gray;
-      margin: 0px auto 40px auto;
-      text-align: center;
-      font-weight: bold;
-    }
-  }
-
-  .show-pwd {
-    position: absolute;
-    right: 10px;
-    top: 7px;
-    font-size: 16px;
-    color: $dark_gray;
-    cursor: pointer;
-    user-select: none;
-  }
-}
-</style>

+ 0 - 1
src/views/patrol/team/edit.vue

@@ -224,7 +224,6 @@ export default {
 
           this.submitData();
         } else {
-          console.log("error submit!!");
           return false;
         }
       });

+ 0 - 4
src/views/patrol/team/index.vue

@@ -203,7 +203,6 @@ export default {
       api
         .getList(this.query, this.page.pageNo, this.page.pageSize)
         .then((response) => {
-          // console.log("response", response);
           // 列表数据
           this.list = response.pageList;
           this.page.total = response.totalPages;
@@ -215,8 +214,6 @@ export default {
     fetchPersonData() {
       api.getPersonList().then(
         (response) => {
-          // console.log('response2');
-          // console.log(response);
           this.deviceList = response.pageList;
           // this.page.total = response.totalPages;
         }
@@ -300,7 +297,6 @@ export default {
           if (JSON.stringify(tableData[y]) == JSON.stringify(multData[i])) {
             //判断是否相等,相等就删除
             this.list.splice(y, 1);
-            console.log("aa");
           }
         }
       }

+ 53 - 46
src/views/system/auth-manage/index.vue

@@ -29,8 +29,6 @@
                   @click="getMenuData()"
                   >搜索</el-button
                 >
-              </div>
-              <div class="handle-button-right">
                 <el-button
                   icon="el-icon-plus"
                   type="success"
@@ -192,8 +190,8 @@
                   角色名称:
                   <el-input
                     v-model="roleListQuery.roleName"
-                    placeholder=""
-                    style="width: 120px"
+                    placeholder="请输入角色名称"
+                    style="width: 140px"
                   ></el-input>
                 </div>
                 <el-button
@@ -203,9 +201,7 @@
                   @click="roleQuery()"
                   >搜索</el-button
                 >
-              </div>
-              <div class="handle-button-right">
-                <el-button
+                 <el-button
                   icon="el-icon-plus"
                   type="success"
                   @click="roleEditOrAdd('add')"
@@ -261,21 +257,29 @@
             <!-- 添加或修改角色配置对话框 -->
             <el-dialog :title="roleTitle" class="roleDialog" :visible.sync="dialogFormVisible2" width="680px">
               <el-form ref="roleForm" :model="roleForm" :rules="roleRules" label-width="100px"  class="roleform">
-                <el-form-item label="角色名称" prop="roleName" width="80%">
-                  <el-input v-model="roleForm.roleName" placeholder="请输入角色名称"   />
-                </el-form-item>
-                <el-form-item prop="roleKey">
-                  <span slot="label">
-                    <el-tooltip content="控制器中定义的权限字符,如:@PreAuthorize(`@ss.hasRole('admin')`)" placement="top">
-                      <i class="el-icon-question"></i>
-                    </el-tooltip>
-                    权限字符
-                  </span>
-                  <el-input v-model="roleForm.roleKey" placeholder="请输入权限字符" />
-                </el-form-item>
-                <el-form-item label="角色顺序" prop="roleSort">
-                  <el-input-number v-model="roleForm.roleSort" controls-position="right" :min="0" />
-                </el-form-item>
+                <el-row :gutter="20">
+                  <el-col :span="12">
+                    <el-form-item label="角色名称" prop="roleName" width="80%">
+                      <el-input v-model="roleForm.roleName" placeholder="请输入角色名称"   />
+                    </el-form-item>
+                  </el-col>
+                  <el-col :span="12">
+                    <el-form-item prop="roleKey">
+                      <span slot="label">
+                        <el-tooltip content="控制器中定义的权限字符,如:@PreAuthorize(`@ss.hasRole('admin')`)" placement="top">
+                          <i class="el-icon-question"></i>
+                        </el-tooltip>
+                        权限字符
+                      </span>
+                      <el-input v-model="roleForm.roleKey" placeholder="请输入权限字符" />
+                    </el-form-item>
+                  </el-col>
+                  <el-col :span="24">
+                    <el-form-item label="角色顺序" prop="roleSort">
+                      <el-input-number v-model="roleForm.roleSort" controls-position="right" :min="0" />
+                    </el-form-item>
+                  </el-col>
+                  <el-col :span="24">
                 <!-- <el-form-item label="状态">
                   <el-radio-group v-model="roleForm.status">
                     <el-radio
@@ -285,24 +289,28 @@
                     >{{dict.dictLabel}}</el-radio>
                   </el-radio-group>
                 </el-form-item> -->
-                <el-form-item label="菜单权限">
-                  <el-checkbox v-model="menuExpand" @change="handleCheckedTreeExpand($event, 'menu')">展开/折叠</el-checkbox>
-                  <el-checkbox v-model="menuNodeAll" @change="handleCheckedTreeNodeAll($event, 'menu')">全选/全不选</el-checkbox>
-                  <el-checkbox v-model="roleForm.menuCheckStrictly"  @change="handleCheckedTreeConnect($event, 'menu')">父子联动</el-checkbox>
-                  <el-tree
-                    class="tree-border"
-                    :data="menuOptions"
-                    show-checkbox
-                    ref="menu"
-                    node-key="id"
-                    :check-strictly="!roleForm.menuCheckStrictly"
-                    empty-text="加载中,请稍后"
-                    :props="defaultProps"
-                  ></el-tree>
-                </el-form-item>
-                <el-form-item label="备注">
-                  <el-input v-model="roleForm.remark" type="textarea" placeholder="请输入内容"></el-input>
-                </el-form-item>
+                    <el-form-item label="菜单权限">
+                      <el-checkbox v-model="menuExpand" @change="handleCheckedTreeExpand($event, 'menu')">展开/折叠</el-checkbox>
+                      <el-checkbox v-model="menuNodeAll" @change="handleCheckedTreeNodeAll($event, 'menu')">全选/全不选</el-checkbox>
+                      <el-checkbox v-model="roleForm.menuCheckStrictly"  @change="handleCheckedTreeConnect($event, 'menu')">父子联动</el-checkbox>
+                      <el-tree
+                        class="tree-border"
+                        :data="menuOptions"
+                        show-checkbox
+                        ref="menu"
+                        node-key="id"
+                        :check-strictly="!roleForm.menuCheckStrictly"
+                        empty-text="加载中,请稍后"
+                        :props="defaultProps"
+                      ></el-tree>
+                    </el-form-item>
+                  </el-col>
+                  <el-col :span="24">
+                    <el-form-item label="备注">
+                      <el-input v-model="roleForm.remark" type="textarea" placeholder="请输入内容" ></el-input>
+                    </el-form-item>
+                  </el-col>
+                </el-row>
               </el-form>
               <div slot="footer" class="dialog-footer">
                 <el-button type="primary" @click="roleSubmit" v-if="!loading">确 定</el-button>
@@ -1277,12 +1285,11 @@ export default {
   height:40px;
   line-height: 40px;
 }
-/* .el-dialog .el-form-item__content, .el-dialog .el-form-item__label{
-  line-height: auto;
-} */
 
-.roleDialog .el-dialog .el-form-item{
-  margin:20px 0
+.el-dialog .el-form-item__label{
+  margin-top:0px;
+}
+.svg-icon{
+  margin-right:5px;
 }
-
 </style>

+ 9 - 34
src/views/system/organization/index.vue

@@ -12,23 +12,15 @@
         </div>
 
         <el-button type="primary" icon="el-icon-search" class="search-button" @click="query()">搜索</el-button>
-      </div>
-
-      <div class="handle-button-right">
         <el-button
+          disabled
           icon="el-icon-plus"
           type="success"
           @click="handleAdd()"
           >新增</el-button
         >
-        <!-- <el-button icon="el-icon-delete" type="danger" @click="batchDelete"
-          >删除</el-button
-        >
-        <el-button type="warning">
-          <svg-icon icon-class="export" />
-          导出
-        </el-button> -->
       </div>
+
     </div>
 
     <el-divider></el-divider>
@@ -41,19 +33,21 @@
       @selection-change="handleSelectionChange"
     >
       <el-table-column prop="deptName" label="部门名称" ></el-table-column>
-      <el-table-column prop="leader" label="负责人" ></el-table-column>
+      <!-- <el-table-column prop="leader" label="负责人" ></el-table-column>
       <el-table-column prop="phone" label="电话" ></el-table-column>
       <el-table-column prop="email" label="邮箱" ></el-table-column>
-      <el-table-column label="创建时间" align="center" prop="createTime"></el-table-column>
-      <el-table-column label="操作" width="150">
+      <el-table-column label="创建时间" align="center" prop="createTime"></el-table-column> -->
+      <el-table-column label="操作" >
         <template slot-scope="scope">
           <el-button
+            disabled
             icon="el-icon-edit"
             style="color: #406CE5"
             @click="handleUpdate(scope.row)"
             >编辑</el-button
           >
           <el-button
+            disabled
             icon="el-icon-delete"
             style="color: #F27979"
             @click="handleDelete(scope.$index, scope.row)"
@@ -226,7 +220,6 @@ export default {
           }
         }
         this.loading = false
-        this.reset()
       })
       // this.getDicts("sys_normal_disable").then(response => {
       //   this.statusOptions = response.data;
@@ -265,7 +258,6 @@ export default {
     handleUpdate(row) {
       this.reset();
       // getDept(row.deptId).then(response => {
-      //   console.log(response)
       //   this.form = response.data.depts[0];
       //   this.dialogFormVisible = true
       //   this.title = "修改部门";
@@ -446,9 +438,7 @@ export default {
   line-height: 35px;
 }
 
-.roleDialog .el-dialog .el-form-item {
-  margin: 20px 20px 0;
-}
+
 .roleDialog .el-dialog .el-form-item:first-child,
 .roleDialog .el-dialog .el-form-item:nth-child(2) {
   display: inline-block;
@@ -459,23 +449,8 @@ export default {
 .el-dialog .el-form-item{
   width:100%;
 }
-.el-input__inner{
-  height:40px;
-  line-height: 40px;
-}
-/* .el-dialog .el-form-item__content, .el-dialog .el-form-item__label{
-  line-height: auto;
-} */
 
-.roleDialog .el-dialog .el-form-item{
-  margin:20px 0
-}
-/* .el-table__row--level-1{
-  text-indent: 40px !important;
-  .el-table__indent{
-    margin-left:40px;
-  }
-} */
+
 
 </style>
 

+ 0 - 1
src/views/system/security/index.vue

@@ -261,7 +261,6 @@ export default {
               });
               this.open = false;
               this.getList();
-              console.log(111)
             }).catch(()=>{
               this.loading = false
             });

+ 0 - 3
src/views/system/unit-info/index.vue

@@ -8,9 +8,6 @@
         </div>
 
         <el-button type="primary" icon="el-icon-search" class="search-button"  @click="getList()">搜索</el-button>
-      </div>
-
-      <div class="handle-button-right">
         <el-button
           icon="el-icon-plus"
           type="success"

+ 5 - 4
vue.config.js

@@ -31,7 +31,7 @@ module.exports = {
     // lintOnSave: process.env.NODE_ENV === 'development',
     productionSourceMap: false,
     devServer: {
-        host: '0.0.0.0',
+        // host: '0.0.0.0',
         port: port,
         open: true,
         overlay: {
@@ -42,10 +42,11 @@ module.exports = {
         //解决跨越问题
         proxy: {
             [process.env.VUE_APP_BASE_API]: {
-                //target: 'http://10.21.39.1:8082', //线上
-                target: 'http://smartpark.caih.com/spapi',
+                //target: "http://101.133.214.75:81/af",
+                target: 'http://10.21.39.1:8082', //生产
+                //target: 'https://smartpark.caih.com/spapi',
+                //target: 'https://qhome.usky.cn/af',
                 // target: 'http://172.16.120.104:8082', //强
-                //target: 'http://localhost:8082', //本地
                 changeOrigin: true,
                 pathRewrite: {
                     ['^' + process.env.VUE_APP_BASE_API]: ''