plg-xiongt 2 månader sedan
förälder
incheckning
ea8f5a7f03
100 ändrade filer med 10926 tillägg och 0 borttagningar
  1. 3 0
      plg-tms-std-web-vue/.env.tms
  2. 36 0
      plg-tms-std-web-vue/.gitignore
  3. 5 0
      plg-tms-std-web-vue/.prettierrc
  4. 20 0
      plg-tms-std-web-vue/LICENSE
  5. 42 0
      plg-tms-std-web-vue/babel.config.js
  6. 49 0
      plg-tms-std-web-vue/config/plugin.config.js
  7. 115 0
      plg-tms-std-web-vue/config/themePluginConfig.js
  8. 4 0
      plg-tms-std-web-vue/deploy.js
  9. 31 0
      plg-tms-std-web-vue/docs/add-page-loading-animate.md
  10. 69 0
      plg-tms-std-web-vue/docs/main.html
  11. 38 0
      plg-tms-std-web-vue/docs/webpack-bundle-analyzer.md
  12. 23 0
      plg-tms-std-web-vue/jest.config.js
  13. 15 0
      plg-tms-std-web-vue/jsconfig.json
  14. 40 0
      plg-tms-std-web-vue/menu.json
  15. 32 0
      plg-tms-std-web-vue/models/nginx.yml
  16. 71 0
      plg-tms-std-web-vue/nginx.conf
  17. 32 0
      plg-tms-std-web-vue/nginx.yml
  18. 1481 0
      plg-tms-std-web-vue/output.js
  19. 94 0
      plg-tms-std-web-vue/package.json
  20. 10 0
      plg-tms-std-web-vue/pipeline_control.yaml
  21. 146 0
      plg-tms-std-web-vue/public/index.html
  22. 151 0
      plg-tms-std-web-vue/public/jq/data/ludiConfig.json
  23. 240 0
      plg-tms-std-web-vue/public/jq/data/menuData.json
  24. 25 0
      plg-tms-std-web-vue/public/jq/data/mock/groupResource.json
  25. BIN
      plg-tms-std-web-vue/public/jq/favicon.ico
  26. 9 0
      plg-tms-std-web-vue/public/jq/images/bcy_logo.svg
  27. BIN
      plg-tms-std-web-vue/public/jq/images/c_logo.png
  28. BIN
      plg-tms-std-web-vue/public/jq/images/c_logo2.png
  29. BIN
      plg-tms-std-web-vue/public/jq/images/default_handsome.jpg
  30. BIN
      plg-tms-std-web-vue/public/jq/images/h_oder_line.png
  31. BIN
      plg-tms-std-web-vue/public/jq/images/h_oders.png
  32. BIN
      plg-tms-std-web-vue/public/jq/images/home/ill_instance.png
  33. BIN
      plg-tms-std-web-vue/public/jq/images/home/ill_interface.png
  34. BIN
      plg-tms-std-web-vue/public/jq/images/home/ill_registration.png
  35. BIN
      plg-tms-std-web-vue/public/jq/images/home/ill_service.png
  36. BIN
      plg-tms-std-web-vue/public/jq/images/input02.png
  37. BIN
      plg-tms-std-web-vue/public/jq/images/inputlog.png
  38. BIN
      plg-tms-std-web-vue/public/jq/images/link-first.gif
  39. BIN
      plg-tms-std-web-vue/public/jq/images/link-last.gif
  40. BIN
      plg-tms-std-web-vue/public/jq/images/link.gif
  41. BIN
      plg-tms-std-web-vue/public/jq/images/login/i_pwd.png
  42. BIN
      plg-tms-std-web-vue/public/jq/images/login/i_pwd_active.png
  43. BIN
      plg-tms-std-web-vue/public/jq/images/login/i_reg.png
  44. BIN
      plg-tms-std-web-vue/public/jq/images/login/i_reg_active.png
  45. BIN
      plg-tms-std-web-vue/public/jq/images/login/i_usei.png
  46. BIN
      plg-tms-std-web-vue/public/jq/images/login/i_usei_active.png
  47. BIN
      plg-tms-std-web-vue/public/jq/images/login/icon_exit.png
  48. BIN
      plg-tms-std-web-vue/public/jq/images/login/icon_select.png
  49. BIN
      plg-tms-std-web-vue/public/jq/images/login/icon_user.png
  50. BIN
      plg-tms-std-web-vue/public/jq/images/login/inputlog.png
  51. BIN
      plg-tms-std-web-vue/public/jq/images/login/jqfu.png
  52. BIN
      plg-tms-std-web-vue/public/jq/images/login/loginBj.jpg
  53. BIN
      plg-tms-std-web-vue/public/jq/images/login/logo2.png
  54. BIN
      plg-tms-std-web-vue/public/jq/images/login/pcCloud.png
  55. BIN
      plg-tms-std-web-vue/public/jq/images/logo.png
  56. BIN
      plg-tms-std-web-vue/public/jq/images/output02.png
  57. 0 0
      plg-tms-std-web-vue/public/jq/images/user-20181112.svg
  58. BIN
      plg-tms-std-web-vue/public/jq/images/图层26.png
  59. BIN
      plg-tms-std-web-vue/public/jq/images/形状10.png
  60. BIN
      plg-tms-std-web-vue/public/jq/images/服务器.png
  61. BIN
      plg-tms-std-web-vue/public/jq/images/端口.png
  62. 353 0
      plg-tms-std-web-vue/public/jq/javascripts/api/index.js
  63. 14 0
      plg-tms-std-web-vue/public/jq/javascripts/language/en/message.json
  64. 180 0
      plg-tms-std-web-vue/public/jq/javascripts/language/en/translation.json
  65. 141 0
      plg-tms-std-web-vue/public/jq/javascripts/language/index.js
  66. 14 0
      plg-tms-std-web-vue/public/jq/javascripts/language/zh_CN/message.json
  67. 166 0
      plg-tms-std-web-vue/public/jq/javascripts/language/zh_CN/translation.json
  68. 660 0
      plg-tms-std-web-vue/public/jq/javascripts/util.js
  69. 99 0
      plg-tms-std-web-vue/public/jq/main.html
  70. 260 0
      plg-tms-std-web-vue/public/jq/pages/authorization/authUser.html
  71. 689 0
      plg-tms-std-web-vue/public/jq/pages/authorization/authorization.html
  72. 918 0
      plg-tms-std-web-vue/public/jq/pages/authorization/client.html
  73. 306 0
      plg-tms-std-web-vue/public/jq/pages/authorization/client.resource.html
  74. 296 0
      plg-tms-std-web-vue/public/jq/pages/authorization/client.resourceGroup.html
  75. 501 0
      plg-tms-std-web-vue/public/jq/pages/authorization/groupResource.html
  76. 375 0
      plg-tms-std-web-vue/public/jq/pages/authorization/resource.html
  77. 440 0
      plg-tms-std-web-vue/public/jq/pages/authorization/resourcegroup.html
  78. 119 0
      plg-tms-std-web-vue/public/jq/pages/bpm/activitiDefine.html
  79. 104 0
      plg-tms-std-web-vue/public/jq/pages/bpm/activitiDeployment.html
  80. 66 0
      plg-tms-std-web-vue/public/jq/pages/bpm/activitiExample.html
  81. 257 0
      plg-tms-std-web-vue/public/jq/pages/bpm/activitiInstance.html
  82. 349 0
      plg-tms-std-web-vue/public/jq/pages/bpm/activitiModel.html
  83. 59 0
      plg-tms-std-web-vue/public/jq/pages/bpm/leader.html
  84. 59 0
      plg-tms-std-web-vue/public/jq/pages/bpm/manager.html
  85. 32 0
      plg-tms-std-web-vue/public/jq/pages/configcenter/configcenter.html
  86. 65 0
      plg-tms-std-web-vue/public/jq/pages/home/css/home.css
  87. 1 0
      plg-tms-std-web-vue/public/jq/pages/home/css/home.css.map
  88. 97 0
      plg-tms-std-web-vue/public/jq/pages/home/css/home.less
  89. 483 0
      plg-tms-std-web-vue/public/jq/pages/home/home.html
  90. 135 0
      plg-tms-std-web-vue/public/jq/pages/mail/mailList.html
  91. 814 0
      plg-tms-std-web-vue/public/jq/pages/microservice/microservice.html
  92. 89 0
      plg-tms-std-web-vue/public/jq/pages/microservice/websockettest.html
  93. 0 0
      plg-tms-std-web-vue/public/jq/pages/rabbit/css/app.f077487f.css
  94. 1 0
      plg-tms-std-web-vue/public/jq/pages/rabbit/css/chunk-1b35494c.c139bcad.css
  95. 1 0
      plg-tms-std-web-vue/public/jq/pages/rabbit/css/chunk-67b2743a.33568435.css
  96. 1 0
      plg-tms-std-web-vue/public/jq/pages/rabbit/css/chunk-77d5b6e2.fa082d99.css
  97. 0 0
      plg-tms-std-web-vue/public/jq/pages/rabbit/css/chunk-vendors.b9c32c10.css
  98. BIN
      plg-tms-std-web-vue/public/jq/pages/rabbit/favicon.ico
  99. 1 0
      plg-tms-std-web-vue/public/jq/pages/rabbit/index.html
  100. 0 0
      plg-tms-std-web-vue/public/jq/pages/rabbit/js/app.bcfc8d6f.js

+ 3 - 0
plg-tms-std-web-vue/.env.tms

@@ -0,0 +1,3 @@
+VUE_APP_API_BASE_URL=
+VUE_APP_LOGIN_TITLE=TMS运输管理系统
+VUE_APP_PROJECT=tms

+ 36 - 0
plg-tms-std-web-vue/.gitignore

@@ -0,0 +1,36 @@
+.svn/
+target/
+node_modules
+!.mvn/wrapper/maven-wrapper.jar
+/dist
+__*
+*.diff
+
+
+### STS ###
+.apt_generated
+.classpath
+.factorypath
+.project
+.settings
+.springBeans
+
+### IntelliJ IDEA ###
+.idea
+*.iws
+*.iml
+*.ipr
+
+### NetBeans ###
+nbproject/private/
+nbbuild/
+nbdist/
+.nb-gradle/
+
+
+log/
+logs/
+*.log
+node_modules
+/dev.bat
+/.vscode

+ 5 - 0
plg-tms-std-web-vue/.prettierrc

@@ -0,0 +1,5 @@
+{
+  "printWidth": 200,
+  "semi": true,
+  "singleQuote": true
+}

+ 20 - 0
plg-tms-std-web-vue/LICENSE

@@ -0,0 +1,20 @@
+The MIT License (MIT)
+Copyright © 2021 <someone holders>
+
+Permission is hereby granted, free of charge, to any person obtaining a copy 
+of this software and associated documentation files (the “Software”), to deal 
+in the Software without restriction, including without limitation the rights 
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 
+copies of the Software, and to permit persons to whom the Software is 
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all 
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 
+SOFTWARE.

+ 42 - 0
plg-tms-std-web-vue/babel.config.js

@@ -0,0 +1,42 @@
+const IS_PROD = ['production', 'prod'].includes(process.env.NODE_ENV)
+
+const plugins = []
+if (IS_PROD) {
+  plugins.push('transform-remove-console')
+}
+
+// lazy load ant-design-vue
+// if your use import on Demand, Use this code
+plugins.push(
+  [
+    'import',
+    {
+      libraryName: 'ant-design-vue',
+      libraryDirectory: 'es',
+      style: true // `style: true` 会加载 less 文件
+    }
+  ],
+  [
+    'import',
+    {
+      libraryName: 'plglib',
+      libraryDirectory: 'components',
+      style: 'css' // `style: true` 会加载 less 文件
+    },
+    'plglib'
+  ]
+)
+
+module.exports = {
+  presets: [
+    '@vue/cli-plugin-babel/preset',
+    [
+      '@babel/preset-env',
+      {
+        useBuiltIns: 'entry',
+        corejs: 3
+      }
+    ]
+  ],
+  plugins
+}

+ 49 - 0
plg-tms-std-web-vue/config/plugin.config.js

@@ -0,0 +1,49 @@
+const ThemeColorReplacer = require('webpack-theme-color-replacer')
+const generate = require('@ant-design/colors/lib/generate').default
+
+const getAntdSerials = (color) => {
+  // 淡化(即less的tint)
+  const lightens = new Array(9).fill().map((t, i) => {
+    return ThemeColorReplacer.varyColor.lighten(color, i / 10)
+  })
+  const colorPalettes = generate(color)
+  const rgb = ThemeColorReplacer.varyColor.toNum3(color.replace('#', '')).join(',')
+  return lightens.concat(colorPalettes).concat(rgb)
+}
+
+const themePluginOption = {
+  fileName: 'css/theme-colors-[contenthash:8].css',
+  matchColors: getAntdSerials('#1890ff'), // 主色系列
+  // 改变样式选择器,解决样式覆盖问题
+  changeSelector (selector) {
+    switch (selector) {
+      case '.ant-calendar-today .ant-calendar-date':
+        return ':not(.ant-calendar-selected-date):not(.ant-calendar-selected-day)' + selector
+      case '.ant-btn:focus,.ant-btn:hover':
+        return '.ant-btn:focus:not(.ant-btn-primary):not(.ant-btn-danger),.ant-btn:hover:not(.ant-btn-primary):not(.ant-btn-danger)'
+      case '.ant-btn.active,.ant-btn:active':
+        return '.ant-btn.active:not(.ant-btn-primary):not(.ant-btn-danger),.ant-btn:active:not(.ant-btn-primary):not(.ant-btn-danger)'
+      case '.ant-steps-item-process .ant-steps-item-icon > .ant-steps-icon':
+      case '.ant-steps-item-process .ant-steps-item-icon>.ant-steps-icon':
+        return ':not(.ant-steps-item-process)' + selector
+      // fixed https://github.com/vueComponent/ant-design-vue-pro/issues/876
+      case '.ant-steps-item-process .ant-steps-item-icon':
+        return ':not(.ant-steps-item-custom)' + selector
+      case '.ant-menu-horizontal>.ant-menu-item-active,.ant-menu-horizontal>.ant-menu-item-open,.ant-menu-horizontal>.ant-menu-item-selected,.ant-menu-horizontal>.ant-menu-item:hover,.ant-menu-horizontal>.ant-menu-submenu-active,.ant-menu-horizontal>.ant-menu-submenu-open,.ant-menu-horizontal>.ant-menu-submenu-selected,.ant-menu-horizontal>.ant-menu-submenu:hover':
+      case '.ant-menu-horizontal > .ant-menu-item-active,.ant-menu-horizontal > .ant-menu-item-open,.ant-menu-horizontal > .ant-menu-item-selected,.ant-menu-horizontal > .ant-menu-item:hover,.ant-menu-horizontal > .ant-menu-submenu-active,.ant-menu-horizontal > .ant-menu-submenu-open,.ant-menu-horizontal > .ant-menu-submenu-selected,.ant-menu-horizontal > .ant-menu-submenu:hover':
+        return '.ant-menu-horizontal > .ant-menu-item-active,.ant-menu-horizontal > .ant-menu-item-open,.ant-menu-horizontal > .ant-menu-item-selected,.ant-menu-horizontal:not(.ant-menu-dark) > .ant-menu-item:hover,.ant-menu-horizontal > .ant-menu-submenu-active,.ant-menu-horizontal > .ant-menu-submenu-open,.ant-menu-horizontal:not(.ant-menu-dark) > .ant-menu-submenu-selected,.ant-menu-horizontal:not(.ant-menu-dark) > .ant-menu-submenu:hover'
+      case '.ant-menu-horizontal > .ant-menu-item-selected > a':
+      case '.ant-menu-horizontal>.ant-menu-item-selected>a':
+        return '.ant-menu-horizontal:not(ant-menu-light):not(.ant-menu-dark) > .ant-menu-item-selected > a'
+      case '.ant-menu-horizontal > .ant-menu-item > a:hover':
+      case '.ant-menu-horizontal>.ant-menu-item>a:hover':
+        return '.ant-menu-horizontal:not(ant-menu-light):not(.ant-menu-dark) > .ant-menu-item > a:hover'
+      default :
+        return selector
+    }
+  }
+}
+
+const createThemeColorReplacerPlugin = () => new ThemeColorReplacer(themePluginOption)
+
+module.exports = createThemeColorReplacerPlugin

+ 115 - 0
plg-tms-std-web-vue/config/themePluginConfig.js

@@ -0,0 +1,115 @@
+export default {
+  theme: [
+    {
+      key: 'dark',
+      fileName: 'dark.css',
+      theme: 'dark'
+    },
+    {
+      key: '#F5222D',
+      fileName: '#F5222D.css',
+      modifyVars: {
+        '@primary-color': '#F5222D'
+      }
+    },
+    {
+      key: '#FA541C',
+      fileName: '#FA541C.css',
+      modifyVars: {
+        '@primary-color': '#FA541C'
+      }
+    },
+    {
+      key: '#FAAD14',
+      fileName: '#FAAD14.css',
+      modifyVars: {
+        '@primary-color': '#FAAD14'
+      }
+    },
+    {
+      key: '#13C2C2',
+      fileName: '#13C2C2.css',
+      modifyVars: {
+        '@primary-color': '#13C2C2'
+      }
+    },
+    {
+      key: '#52C41A',
+      fileName: '#52C41A.css',
+      modifyVars: {
+        '@primary-color': '#52C41A'
+      }
+    },
+    {
+      key: '#2F54EB',
+      fileName: '#2F54EB.css',
+      modifyVars: {
+        '@primary-color': '#2F54EB'
+      }
+    },
+    {
+      key: '#722ED1',
+      fileName: '#722ED1.css',
+      modifyVars: {
+        '@primary-color': '#722ED1'
+      }
+    },
+
+    {
+      key: '#F5222D',
+      theme: 'dark',
+      fileName: 'dark-#F5222D.css',
+      modifyVars: {
+        '@primary-color': '#F5222D'
+      }
+    },
+    {
+      key: '#FA541C',
+      theme: 'dark',
+      fileName: 'dark-#FA541C.css',
+      modifyVars: {
+        '@primary-color': '#FA541C'
+      }
+    },
+    {
+      key: '#FAAD14',
+      theme: 'dark',
+      fileName: 'dark-#FAAD14.css',
+      modifyVars: {
+        '@primary-color': '#FAAD14'
+      }
+    },
+    {
+      key: '#13C2C2',
+      theme: 'dark',
+      fileName: 'dark-#13C2C2.css',
+      modifyVars: {
+        '@primary-color': '#13C2C2'
+      }
+    },
+    {
+      key: '#52C41A',
+      theme: 'dark',
+      fileName: 'dark-#52C41A.css',
+      modifyVars: {
+        '@primary-color': '#52C41A'
+      }
+    },
+    {
+      key: '#2F54EB',
+      theme: 'dark',
+      fileName: 'dark-#2F54EB.css',
+      modifyVars: {
+        '@primary-color': '#2F54EB'
+      }
+    },
+    {
+      key: '#722ED1',
+      theme: 'dark',
+      fileName: 'dark-#722ED1.css',
+      modifyVars: {
+        '@primary-color': '#722ED1'
+      }
+    }
+  ]
+}

+ 4 - 0
plg-tms-std-web-vue/deploy.js

@@ -0,0 +1,4 @@
+var tar = require('tar-fs')
+var fs = require('fs')
+
+tar.pack('./dist').pipe(fs.createWriteStream('dist.tar'))

+ 31 - 0
plg-tms-std-web-vue/docs/add-page-loading-animate.md

@@ -0,0 +1,31 @@
+为首屏增加 加载动画
+====
+
+
+
+## 需求
+
+> 为了缓解用户第一次访问时,加载 JS 过大所导致用户等待白屏时间过长导致的用户体验不好,进行的一个优化动效。
+
+
+
+## 实现方案
+
+1. 将 动画加载 dom 元素放在 #app 内,Vue 生命周期开始时,会自动清掉 #app 下的所有元素。
+2. 将 动画加载 dom 元素放在 body 下,Vue 生命周期开始时 App.vue (created, mounted) 调用 `@/utils/utll` 下的 removeLoadingAnimate(#id, timeout) 则会移除加载动画
+
+最后一步:
+​	将样式插入到 `public/index.html` 文件的 `<head></head>` 最好写成内联 `<style>动画样式</style>` 
+
+
+
+----
+
+目前提供有两个样式,均在 `public/loading` 文件夹内。且 pro 已经默认使用了一套 loading 动画方案,可以直接参考 `public/index.html`
+
+
+## 写在最后
+
+目前 pro 有页面 overflow 显示出浏览器滚动条时,页面会抖动一下的问题。
+
+欢迎各位提供能解决的方案和实现 demo。如果在条件允许的情况下,建议请直接使用 pro 进行改造,也欢迎直接 PR 到 pro 的仓库

+ 69 - 0
plg-tms-std-web-vue/docs/main.html

@@ -0,0 +1,69 @@
+<!DOCTYPE html>
+<html lang="en" id="plg_app">
+<head>
+  <meta charset="UTF-8">
+  <!--     <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ -->
+  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
+
+  <meta http-equiv="X-UA-Compatible" content="ie=edge">
+  <title>菠菜云运维管理平台</title>
+
+  <link rel="stylesheet" href="./prologui/dist/vendors/layui-master/dist/css/layui.rem.css" />
+  <link rel="stylesheet" href="./prologui/dist/css/prolog.all-0.0.1.css" />
+  <!-- 页面上使用css文件 -->
+  <link rel="stylesheet" href="./styles/dist_css/style.css" />
+  <link rel="stylesheet" type="text/css" href="//at.alicdn.com/t/font_799562_g9fbb4vlkl4.css" />
+
+
+  <script src="./prologui/dist/vendors/jquery/jquery-3.3.1.min.js"></script>
+  <script src="./prologui/dist/vendors/echarts/dist/echarts.js"></script>
+  <script src="./prologui/dist/vendors/layui-master/dist/layui.all.js"></script>
+
+
+  <script src="./prologui/dist/vendors/vipspa-master/build/vipspa.js"></script>
+  <script src="./prologui/dist/vendors/dhtmlx/grid/codebase/dhtmlxgrid.js"></script>
+  <script src="./prologui/dist/vendors/dhtmlx/form/codebase/dhtmlxform.js"></script>
+  <script src="./prologui/dist/vendors/zTree_v3/js/jquery.ztree.core.min.js"></script>
+  <script src="./prologui/dist/js/prolog.min-0.0.1.js"></script>
+  <script src="./javascripts/api/index.js"></script>
+  <script src="./javascripts/util.js"></script>
+  <script src="./javascripts/adminPlant.js"></script>
+  <!-- 国际化插件 -->
+  <script src="./prologui/dist/vendors/jquery-i18next/lib/i18next.min.js"></script>
+  <script src="./prologui/dist/vendors/jquery-i18next/lib/i18nextXHRBackend.js"></script>
+  <script src="./prologui/dist/vendors/jquery-i18next/lib/i18nextBrowserLanguageDetector.js"></script>
+  <script src="./prologui/dist/vendors/jquery-i18next/lib/jquery-i18next.min.js"></script>
+  <script src="./javascripts/language/index.js"></script>
+  <script>
+  window.global_fun={}
+
+  </script>
+  <style>
+    body{
+      padding:0px;
+      background:rgb(240, 242, 245);
+    }
+    .plg-tab-container{padding: 0px;}
+  </style>
+</head>
+
+<body class="layui-layout-admin">
+</body>
+<script>
+  var path = window.location.hash;
+  path='../jq/'+path.substring(1);
+  $.ajax({
+    url:path,
+    type:'GET',
+    dataType:'html',
+    data:{},
+    success:function(data){
+      debugger
+      $("body").html(data);
+    }
+  });
+</script>
+
+
+</html>

+ 38 - 0
plg-tms-std-web-vue/docs/webpack-bundle-analyzer.md

@@ -0,0 +1,38 @@
+先增加依赖
+
+```bash
+// npm
+$ npm install --save-dev webpack-bundle-analyzer
+
+// or yarn
+$ yarn add webpack-bundle-analyzer -D
+```
+
+配置文件 `vue.config.js` 增加 `configureWebpack.plugins` 参数
+
+```
+const path = require('path')
+const webpack = require('webpack')
+const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin
+
+function resolve (dir) {
+  return path.join(__dirname, dir)
+}
+
+// vue.config.js
+module.exports = {
+  configureWebpack: {
+    plugins: [
+      // Ignore all locale files of moment.js
+      new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/),
+      // 依赖大小分析工具
+      new BundleAnalyzerPlugin(),
+    ]
+  },
+
+
+  ...
+}
+```
+
+启动 `cli` 的 `build` 命令进行项目编译,编译完成时,会自动运行一个 http://localhost:8888 的地址,完整显示了支持库依赖

+ 23 - 0
plg-tms-std-web-vue/jest.config.js

@@ -0,0 +1,23 @@
+module.exports = {
+  moduleFileExtensions: [
+    'js',
+    'jsx',
+    'json',
+    'vue'
+  ],
+  transform: {
+    '^.+\\.vue$': 'vue-jest',
+    '.+\\.(css|styl|less|sass|scss|svg|png|jpg|ttf|woff|woff2)$': 'jest-transform-stub',
+    '^.+\\.jsx?$': 'babel-jest'
+  },
+  moduleNameMapper: {
+    '^@/(.*)$': '<rootDir>/src/$1'
+  },
+  snapshotSerializers: [
+    'jest-serializer-vue'
+  ],
+  testMatch: [
+    '**/tests/unit/**/*.spec.(js|jsx|ts|tsx)|**/__tests__/*.(js|jsx|ts|tsx)'
+  ],
+  testURL: 'http://localhost/'
+}

+ 15 - 0
plg-tms-std-web-vue/jsconfig.json

@@ -0,0 +1,15 @@
+{
+  "compilerOptions": {
+    "target": "es6",
+    "baseUrl": ".",
+    "paths": {
+      "@/*": ["src/*"]
+    }
+  },
+  "exclude": ["node_modules", "dist"],
+  "include": ["src/**/*"],
+  "vueCompilerOptions": {
+    "extensions": [".vue"],
+    "target": 2
+  }
+}

+ 40 - 0
plg-tms-std-web-vue/menu.json

@@ -0,0 +1,40 @@
+{
+  "p_id": "U0000000001",
+  "p_username": "admin",
+  "p_workernumber": "admin",
+  "p_nickname": "系统管理员",
+  "p_phone": null,
+  "p_email": null,
+  "p_companyid": "DWB01GS",
+  "p_enterpriseid": "ENT0000000001",
+  "p_organizationid": "ENT0000000001",
+  "p_companyname": "董文博一号公司",
+  "p_orgname": "湖北普罗格科技股份有限公司",
+  "p_enterprisename": "湖北普罗格科技股份有限公司",
+  "p_usertype": "1",
+  "p_lastlogindate": "2022-06-02 14:39:54",
+  "p_lastmodipassdate": null,
+  "p_validdate": "2027-11-30 17:26:00",
+  "p_import_batchno": null,
+  "p_data_source": null,
+  "forceModifyPasswdFlag": false,
+  "vehicle": null,
+  "branchids": [
+    "NoAuthority"
+  ],
+  "consignors": [
+    "NoAuthority"
+  ],
+  "companyids": [
+    "NoAuthority"
+  ],
+  "shipvendorids": [
+    "NoAuthority"
+  ],
+  "shopnos": [
+    "NoAuthority"
+  ],
+  "roles": null,
+  "p_face": "/img/0.jpg"
+}
+

+ 32 - 0
plg-tms-std-web-vue/models/nginx.yml

@@ -0,0 +1,32 @@
+apiVersion: v1
+kind: ConfigMap
+metadata:
+    name: nginx-config
+    namespace: upcloud
+data:
+  default.conf: |
+                server {
+                        listen       80;
+                        server_name  localhost;
+                        charset utf-8;
+                        location / {
+                            index index.html;
+                            root /usr/share/nginx/html;   
+                            try_files $uri $uri/ /index.html =404;
+                        }
+
+                        location ^~/japi/ {
+                          proxy_pass   http://192.168.1.88:7002/;
+                        }
+
+                        location ^~/api/ {
+                          proxy_pass  http://192.168.1.88:7002/;
+                          proxy_set_header  X-Real-IP $remote_addr;
+                        }
+
+                        error_page   500 502 503 504  /50x.html;
+                        location = /50x.html {
+                                root   html;
+                        }
+ 
+                }

+ 71 - 0
plg-tms-std-web-vue/nginx.conf

@@ -0,0 +1,71 @@
+#user  nobody;
+worker_processes 1;
+
+#error_log  logs/error.log;
+#error_log  logs/error.log  notice;
+#error_log  logs/error.log  info;
+
+#pid        logs/nginx.pid;
+events {
+  worker_connections 1024;
+}
+
+
+http {
+  include mime.types;
+  default_type application/octet-stream;
+
+  #log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
+  #                  '$status $body_bytes_sent "$http_referer" '
+  #                  '"$http_user_agent" "$http_x_forwarded_for"';
+
+  #access_log  logs/access.log  main;
+  sendfile on;
+  #tcp_nopush     on;
+
+  #keepalive_timeout  0;
+  keepalive_timeout 65;
+
+  #gzip  on;
+
+  client_max_body_size 30m;
+
+  server {
+    listen 10900;
+    server_name localhost;
+    charset utf-8;
+
+
+
+    location ^~/business {
+      proxy_pass http://192.168.1.212:10901/upcloud-rdc-tms-business-service;
+      proxy_set_header X-Real-IP $remote_addr;
+    }
+
+    location ^~/maindata {
+      proxy_pass http://192.168.1.212:10901/upcloud-rdc-tms-maindata-service;
+      proxy_set_header X-Real-IP $remote_addr;
+    }
+
+
+    #error_page  404              /404.html;
+
+    # redirect server error pages to the static page /50x.html
+    #
+    error_page 500 502 503 504 /50x.html;
+    location = /50x.html {
+      root html;
+    }
+
+  }
+  # images port
+  server {
+    listen 10139;
+    server_name localhost;
+    #charset koi8-r;
+    #access_log  /var/log/nginx/host.access.log  main;
+    location / {
+      root /usr/local/images/;
+    }
+  }
+}

+ 32 - 0
plg-tms-std-web-vue/nginx.yml

@@ -0,0 +1,32 @@
+apiVersion: v1
+kind: ConfigMap
+metadata:
+    name: nginx-config
+    namespace: upcloud
+data:
+  default.conf: |
+                server {
+                        listen       80;
+                        server_name  localhost;
+                        charset utf-8;
+                        location / {
+                            index index.html;
+                            root /usr/share/nginx/html;   
+                            try_files $uri $uri/ /index.html =404;
+                        }
+
+                        location ^~/japi/ {
+                          proxy_pass   http://192.168.1.88:7002/;
+                        }
+
+                        location ^~/api/ {
+                          proxy_pass  http://192.168.1.88:7002/;
+                          proxy_set_header  X-Real-IP $remote_addr;
+                        }
+
+                        error_page   500 502 503 504  /50x.html;
+                        location = /50x.html {
+                                root   html;
+                        }
+ 
+                }

+ 1481 - 0
plg-tms-std-web-vue/output.js

@@ -0,0 +1,1481 @@
+{
+  mode: 'development',
+  context: '/Users/coywoo/Documents/code/plg-tms-std-web',
+  node: {
+    setImmediate: false,
+    process: 'mock',
+    dgram: 'empty',
+    fs: 'empty',
+    net: 'empty',
+    tls: 'empty',
+    child_process: 'empty'
+  },
+  output: {
+    path: '/Users/coywoo/Documents/code/plg-tms-std-web/dist',
+    filename: 'js/[name].js',
+    publicPath: '/',
+    chunkFilename: 'js/[name].js'
+  },
+  resolve: {
+    alias: {
+      '@': '/Users/coywoo/Documents/code/plg-tms-std-web/src',
+      vue$: 'vue/dist/vue.esm.js',
+      '@$': '/Users/coywoo/Documents/code/plg-tms-std-web/src',
+      jq: '/Users/coywoo/Documents/code/plg-tms-std-web/public/jq',
+      'tms-js': '/Users/coywoo/Documents/code/plg-tms-std-web/src/views/JQ_Page/js'
+    },
+    extensions: [
+      '.mjs',
+      '.js',
+      '.jsx',
+      '.vue',
+      '.json',
+      '.wasm'
+    ],
+    modules: [
+      'node_modules',
+      '/Users/coywoo/Documents/code/plg-tms-std-web/node_modules',
+      '/Users/coywoo/Documents/code/plg-tms-std-web/node_modules/_@vue_cli-service@4.5.17@@vue/cli-service/node_modules'
+    ],
+    plugins: [
+      {
+        apply: function nothing() {
+          // ¯\_(ツ)_/¯
+        },
+        makePlugin: function () { /* omitted long function */ },
+        moduleLoader: function () { /* omitted long function */ },
+        topLevelLoader: {
+          apply: function nothing() {
+            // ¯\_(ツ)_/¯
+          }
+        },
+        bind: function () { /* omitted long function */ },
+        tsLoaderOptions: function () { /* omitted long function */ },
+        forkTsCheckerOptions: function () { /* omitted long function */ }
+      }
+    ]
+  },
+  resolveLoader: {
+    modules: [
+      '/Users/coywoo/Documents/code/plg-tms-std-web/node_modules/_@vue_cli-plugin-babel@4.5.17@@vue/cli-plugin-babel/node_modules',
+      'node_modules',
+      '/Users/coywoo/Documents/code/plg-tms-std-web/node_modules',
+      '/Users/coywoo/Documents/code/plg-tms-std-web/node_modules/_@vue_cli-service@4.5.17@@vue/cli-service/node_modules'
+    ],
+    plugins: [
+      {
+        apply: function nothing() {
+          // ¯\_(ツ)_/¯
+        }
+      }
+    ]
+  },
+  module: {
+    noParse: /^(vue|vue-router|vuex|vuex-router-sync)$/,
+    rules: [
+      /* config.module.rule('mjs') */
+      {
+        test: /\.mjs$/,
+        type: 'javascript/auto',
+        include: [
+          /node_modules/
+        ]
+      },
+      /* config.module.rule('vue') */
+      {
+        test: /\.vue$/,
+        use: [
+          {
+            loader: '/Users/coywoo/Documents/code/plg-tms-std-web/node_modules/_cache-loader@4.1.0@cache-loader/dist/cjs.js',
+            options: {
+              cacheDirectory: '/Users/coywoo/Documents/code/plg-tms-std-web/node_modules/.cache/vue-loader',
+              cacheIdentifier: '790f4abc'
+            }
+          },
+          {
+            loader: '/Users/coywoo/Documents/code/plg-tms-std-web/node_modules/_vue-loader@15.9.8@vue-loader/lib/index.js',
+            options: {
+              compilerOptions: {
+                whitespace: 'condense'
+              },
+              cacheDirectory: '/Users/coywoo/Documents/code/plg-tms-std-web/node_modules/.cache/vue-loader',
+              cacheIdentifier: '790f4abc'
+            }
+          }
+        ]
+      },
+      /* config.module.rule('images') */
+      {
+        test: /\.(png|jpe?g|gif|webp)(\?.*)?$/,
+        use: [
+          {
+            loader: '/Users/coywoo/Documents/code/plg-tms-std-web/node_modules/_url-loader@2.3.0@url-loader/dist/cjs.js',
+            options: {
+              limit: 4096,
+              fallback: {
+                loader: '/Users/coywoo/Documents/code/plg-tms-std-web/node_modules/_file-loader@4.3.0@file-loader/dist/cjs.js',
+                options: {
+                  name: 'img/[name].[ext]'
+                }
+              }
+            }
+          }
+        ]
+      },
+      /* config.module.rule('svg') */
+      {
+        test: /\.(svg)(\?.*)?$/,
+        oneOf: [
+          /* config.module.rule('svg').rule('inline') */
+          {
+            resourceQuery: /inline/,
+            use: [
+              {
+                loader: 'vue-svg-icon-loader'
+              }
+            ]
+          },
+          /* config.module.rule('svg').rule('external') */
+          {
+            use: [
+              {
+                loader: 'file-loader',
+                options: {
+                  name: 'assets/[name].[hash:8].[ext]'
+                }
+              }
+            ]
+          }
+        ]
+      },
+      /* config.module.rule('media') */
+      {
+        test: /\.(mp4|webm|ogg|mp3|wav|flac|aac)(\?.*)?$/,
+        use: [
+          {
+            loader: '/Users/coywoo/Documents/code/plg-tms-std-web/node_modules/_url-loader@2.3.0@url-loader/dist/cjs.js',
+            options: {
+              limit: 4096,
+              fallback: {
+                loader: '/Users/coywoo/Documents/code/plg-tms-std-web/node_modules/_file-loader@4.3.0@file-loader/dist/cjs.js',
+                options: {
+                  name: 'media/[name].[ext]'
+                }
+              }
+            }
+          }
+        ]
+      },
+      /* config.module.rule('fonts') */
+      {
+        test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/i,
+        use: [
+          {
+            loader: '/Users/coywoo/Documents/code/plg-tms-std-web/node_modules/_url-loader@2.3.0@url-loader/dist/cjs.js',
+            options: {
+              limit: 4096,
+              fallback: {
+                loader: '/Users/coywoo/Documents/code/plg-tms-std-web/node_modules/_file-loader@4.3.0@file-loader/dist/cjs.js',
+                options: {
+                  name: 'fonts/[name].[ext]'
+                }
+              }
+            }
+          }
+        ]
+      },
+      /* config.module.rule('pug') */
+      {
+        test: /\.pug$/,
+        oneOf: [
+          /* config.module.rule('pug').rule('pug-vue') */
+          {
+            resourceQuery: /vue/,
+            use: [
+              {
+                loader: 'pug-plain-loader'
+              }
+            ]
+          },
+          /* config.module.rule('pug').rule('pug-template') */
+          {
+            use: [
+              {
+                loader: '/Users/coywoo/Documents/code/plg-tms-std-web/node_modules/_raw-loader@4.0.2@raw-loader/dist/cjs.js'
+              },
+              {
+                loader: 'pug-plain-loader'
+              }
+            ]
+          }
+        ]
+      },
+      /* config.module.rule('css') */
+      {
+        test: /\.css$/,
+        oneOf: [
+          /* config.module.rule('css').rule('vue-modules') */
+          {
+            resourceQuery: /module/,
+            use: [
+              {
+                loader: '/Users/coywoo/Documents/code/plg-tms-std-web/node_modules/_vue-style-loader@4.1.3@vue-style-loader/index.js',
+                options: {
+                  sourceMap: true,
+                  shadowMode: false
+                }
+              },
+              {
+                loader: '/Users/coywoo/Documents/code/plg-tms-std-web/node_modules/_css-loader@3.6.0@css-loader/dist/cjs.js',
+                options: {
+                  sourceMap: true,
+                  importLoaders: 2,
+                  modules: {
+                    localIdentName: '[name]_[local]_[hash:base64:5]'
+                  }
+                }
+              },
+              {
+                loader: '/Users/coywoo/Documents/code/plg-tms-std-web/node_modules/_postcss-loader@3.0.0@postcss-loader/src/index.js',
+                options: {
+                  sourceMap: true
+                }
+              }
+            ]
+          },
+          /* config.module.rule('css').rule('vue') */
+          {
+            resourceQuery: /\?vue/,
+            use: [
+              {
+                loader: '/Users/coywoo/Documents/code/plg-tms-std-web/node_modules/_vue-style-loader@4.1.3@vue-style-loader/index.js',
+                options: {
+                  sourceMap: true,
+                  shadowMode: false
+                }
+              },
+              {
+                loader: '/Users/coywoo/Documents/code/plg-tms-std-web/node_modules/_css-loader@3.6.0@css-loader/dist/cjs.js',
+                options: {
+                  sourceMap: true,
+                  importLoaders: 2
+                }
+              },
+              {
+                loader: '/Users/coywoo/Documents/code/plg-tms-std-web/node_modules/_postcss-loader@3.0.0@postcss-loader/src/index.js',
+                options: {
+                  sourceMap: true
+                }
+              }
+            ]
+          },
+          /* config.module.rule('css').rule('normal-modules') */
+          {
+            test: /\.module\.\w+$/,
+            use: [
+              {
+                loader: '/Users/coywoo/Documents/code/plg-tms-std-web/node_modules/_vue-style-loader@4.1.3@vue-style-loader/index.js',
+                options: {
+                  sourceMap: true,
+                  shadowMode: false
+                }
+              },
+              {
+                loader: '/Users/coywoo/Documents/code/plg-tms-std-web/node_modules/_css-loader@3.6.0@css-loader/dist/cjs.js',
+                options: {
+                  sourceMap: true,
+                  importLoaders: 2,
+                  modules: {
+                    localIdentName: '[name]_[local]_[hash:base64:5]'
+                  }
+                }
+              },
+              {
+                loader: '/Users/coywoo/Documents/code/plg-tms-std-web/node_modules/_postcss-loader@3.0.0@postcss-loader/src/index.js',
+                options: {
+                  sourceMap: true
+                }
+              }
+            ]
+          },
+          /* config.module.rule('css').rule('normal') */
+          {
+            use: [
+              {
+                loader: '/Users/coywoo/Documents/code/plg-tms-std-web/node_modules/_vue-style-loader@4.1.3@vue-style-loader/index.js',
+                options: {
+                  sourceMap: true,
+                  shadowMode: false
+                }
+              },
+              {
+                loader: '/Users/coywoo/Documents/code/plg-tms-std-web/node_modules/_css-loader@3.6.0@css-loader/dist/cjs.js',
+                options: {
+                  sourceMap: true,
+                  importLoaders: 2
+                }
+              },
+              {
+                loader: '/Users/coywoo/Documents/code/plg-tms-std-web/node_modules/_postcss-loader@3.0.0@postcss-loader/src/index.js',
+                options: {
+                  sourceMap: true
+                }
+              }
+            ]
+          }
+        ]
+      },
+      /* config.module.rule('postcss') */
+      {
+        test: /\.p(ost)?css$/,
+        oneOf: [
+          /* config.module.rule('postcss').rule('vue-modules') */
+          {
+            resourceQuery: /module/,
+            use: [
+              {
+                loader: '/Users/coywoo/Documents/code/plg-tms-std-web/node_modules/_vue-style-loader@4.1.3@vue-style-loader/index.js',
+                options: {
+                  sourceMap: true,
+                  shadowMode: false
+                }
+              },
+              {
+                loader: '/Users/coywoo/Documents/code/plg-tms-std-web/node_modules/_css-loader@3.6.0@css-loader/dist/cjs.js',
+                options: {
+                  sourceMap: true,
+                  importLoaders: 2,
+                  modules: {
+                    localIdentName: '[name]_[local]_[hash:base64:5]'
+                  }
+                }
+              },
+              {
+                loader: '/Users/coywoo/Documents/code/plg-tms-std-web/node_modules/_postcss-loader@3.0.0@postcss-loader/src/index.js',
+                options: {
+                  sourceMap: true
+                }
+              }
+            ]
+          },
+          /* config.module.rule('postcss').rule('vue') */
+          {
+            resourceQuery: /\?vue/,
+            use: [
+              {
+                loader: '/Users/coywoo/Documents/code/plg-tms-std-web/node_modules/_vue-style-loader@4.1.3@vue-style-loader/index.js',
+                options: {
+                  sourceMap: true,
+                  shadowMode: false
+                }
+              },
+              {
+                loader: '/Users/coywoo/Documents/code/plg-tms-std-web/node_modules/_css-loader@3.6.0@css-loader/dist/cjs.js',
+                options: {
+                  sourceMap: true,
+                  importLoaders: 2
+                }
+              },
+              {
+                loader: '/Users/coywoo/Documents/code/plg-tms-std-web/node_modules/_postcss-loader@3.0.0@postcss-loader/src/index.js',
+                options: {
+                  sourceMap: true
+                }
+              }
+            ]
+          },
+          /* config.module.rule('postcss').rule('normal-modules') */
+          {
+            test: /\.module\.\w+$/,
+            use: [
+              {
+                loader: '/Users/coywoo/Documents/code/plg-tms-std-web/node_modules/_vue-style-loader@4.1.3@vue-style-loader/index.js',
+                options: {
+                  sourceMap: true,
+                  shadowMode: false
+                }
+              },
+              {
+                loader: '/Users/coywoo/Documents/code/plg-tms-std-web/node_modules/_css-loader@3.6.0@css-loader/dist/cjs.js',
+                options: {
+                  sourceMap: true,
+                  importLoaders: 2,
+                  modules: {
+                    localIdentName: '[name]_[local]_[hash:base64:5]'
+                  }
+                }
+              },
+              {
+                loader: '/Users/coywoo/Documents/code/plg-tms-std-web/node_modules/_postcss-loader@3.0.0@postcss-loader/src/index.js',
+                options: {
+                  sourceMap: true
+                }
+              }
+            ]
+          },
+          /* config.module.rule('postcss').rule('normal') */
+          {
+            use: [
+              {
+                loader: '/Users/coywoo/Documents/code/plg-tms-std-web/node_modules/_vue-style-loader@4.1.3@vue-style-loader/index.js',
+                options: {
+                  sourceMap: true,
+                  shadowMode: false
+                }
+              },
+              {
+                loader: '/Users/coywoo/Documents/code/plg-tms-std-web/node_modules/_css-loader@3.6.0@css-loader/dist/cjs.js',
+                options: {
+                  sourceMap: true,
+                  importLoaders: 2
+                }
+              },
+              {
+                loader: '/Users/coywoo/Documents/code/plg-tms-std-web/node_modules/_postcss-loader@3.0.0@postcss-loader/src/index.js',
+                options: {
+                  sourceMap: true
+                }
+              }
+            ]
+          }
+        ]
+      },
+      /* config.module.rule('scss') */
+      {
+        test: /\.scss$/,
+        oneOf: [
+          /* config.module.rule('scss').rule('vue-modules') */
+          {
+            resourceQuery: /module/,
+            use: [
+              {
+                loader: '/Users/coywoo/Documents/code/plg-tms-std-web/node_modules/_vue-style-loader@4.1.3@vue-style-loader/index.js',
+                options: {
+                  sourceMap: true,
+                  shadowMode: false
+                }
+              },
+              {
+                loader: '/Users/coywoo/Documents/code/plg-tms-std-web/node_modules/_css-loader@3.6.0@css-loader/dist/cjs.js',
+                options: {
+                  sourceMap: true,
+                  importLoaders: 2,
+                  modules: {
+                    localIdentName: '[name]_[local]_[hash:base64:5]'
+                  }
+                }
+              },
+              {
+                loader: '/Users/coywoo/Documents/code/plg-tms-std-web/node_modules/_postcss-loader@3.0.0@postcss-loader/src/index.js',
+                options: {
+                  sourceMap: true
+                }
+              },
+              {
+                loader: 'sass-loader',
+                options: {
+                  sourceMap: true
+                }
+              }
+            ]
+          },
+          /* config.module.rule('scss').rule('vue') */
+          {
+            resourceQuery: /\?vue/,
+            use: [
+              {
+                loader: '/Users/coywoo/Documents/code/plg-tms-std-web/node_modules/_vue-style-loader@4.1.3@vue-style-loader/index.js',
+                options: {
+                  sourceMap: true,
+                  shadowMode: false
+                }
+              },
+              {
+                loader: '/Users/coywoo/Documents/code/plg-tms-std-web/node_modules/_css-loader@3.6.0@css-loader/dist/cjs.js',
+                options: {
+                  sourceMap: true,
+                  importLoaders: 2
+                }
+              },
+              {
+                loader: '/Users/coywoo/Documents/code/plg-tms-std-web/node_modules/_postcss-loader@3.0.0@postcss-loader/src/index.js',
+                options: {
+                  sourceMap: true
+                }
+              },
+              {
+                loader: 'sass-loader',
+                options: {
+                  sourceMap: true
+                }
+              }
+            ]
+          },
+          /* config.module.rule('scss').rule('normal-modules') */
+          {
+            test: /\.module\.\w+$/,
+            use: [
+              {
+                loader: '/Users/coywoo/Documents/code/plg-tms-std-web/node_modules/_vue-style-loader@4.1.3@vue-style-loader/index.js',
+                options: {
+                  sourceMap: true,
+                  shadowMode: false
+                }
+              },
+              {
+                loader: '/Users/coywoo/Documents/code/plg-tms-std-web/node_modules/_css-loader@3.6.0@css-loader/dist/cjs.js',
+                options: {
+                  sourceMap: true,
+                  importLoaders: 2,
+                  modules: {
+                    localIdentName: '[name]_[local]_[hash:base64:5]'
+                  }
+                }
+              },
+              {
+                loader: '/Users/coywoo/Documents/code/plg-tms-std-web/node_modules/_postcss-loader@3.0.0@postcss-loader/src/index.js',
+                options: {
+                  sourceMap: true
+                }
+              },
+              {
+                loader: 'sass-loader',
+                options: {
+                  sourceMap: true
+                }
+              }
+            ]
+          },
+          /* config.module.rule('scss').rule('normal') */
+          {
+            use: [
+              {
+                loader: '/Users/coywoo/Documents/code/plg-tms-std-web/node_modules/_vue-style-loader@4.1.3@vue-style-loader/index.js',
+                options: {
+                  sourceMap: true,
+                  shadowMode: false
+                }
+              },
+              {
+                loader: '/Users/coywoo/Documents/code/plg-tms-std-web/node_modules/_css-loader@3.6.0@css-loader/dist/cjs.js',
+                options: {
+                  sourceMap: true,
+                  importLoaders: 2
+                }
+              },
+              {
+                loader: '/Users/coywoo/Documents/code/plg-tms-std-web/node_modules/_postcss-loader@3.0.0@postcss-loader/src/index.js',
+                options: {
+                  sourceMap: true
+                }
+              },
+              {
+                loader: 'sass-loader',
+                options: {
+                  sourceMap: true
+                }
+              }
+            ]
+          }
+        ]
+      },
+      /* config.module.rule('sass') */
+      {
+        test: /\.sass$/,
+        oneOf: [
+          /* config.module.rule('sass').rule('vue-modules') */
+          {
+            resourceQuery: /module/,
+            use: [
+              {
+                loader: '/Users/coywoo/Documents/code/plg-tms-std-web/node_modules/_vue-style-loader@4.1.3@vue-style-loader/index.js',
+                options: {
+                  sourceMap: true,
+                  shadowMode: false
+                }
+              },
+              {
+                loader: '/Users/coywoo/Documents/code/plg-tms-std-web/node_modules/_css-loader@3.6.0@css-loader/dist/cjs.js',
+                options: {
+                  sourceMap: true,
+                  importLoaders: 2,
+                  modules: {
+                    localIdentName: '[name]_[local]_[hash:base64:5]'
+                  }
+                }
+              },
+              {
+                loader: '/Users/coywoo/Documents/code/plg-tms-std-web/node_modules/_postcss-loader@3.0.0@postcss-loader/src/index.js',
+                options: {
+                  sourceMap: true
+                }
+              },
+              {
+                loader: 'sass-loader',
+                options: {
+                  sourceMap: true,
+                  sassOptions: {
+                    indentedSyntax: true
+                  }
+                }
+              }
+            ]
+          },
+          /* config.module.rule('sass').rule('vue') */
+          {
+            resourceQuery: /\?vue/,
+            use: [
+              {
+                loader: '/Users/coywoo/Documents/code/plg-tms-std-web/node_modules/_vue-style-loader@4.1.3@vue-style-loader/index.js',
+                options: {
+                  sourceMap: true,
+                  shadowMode: false
+                }
+              },
+              {
+                loader: '/Users/coywoo/Documents/code/plg-tms-std-web/node_modules/_css-loader@3.6.0@css-loader/dist/cjs.js',
+                options: {
+                  sourceMap: true,
+                  importLoaders: 2
+                }
+              },
+              {
+                loader: '/Users/coywoo/Documents/code/plg-tms-std-web/node_modules/_postcss-loader@3.0.0@postcss-loader/src/index.js',
+                options: {
+                  sourceMap: true
+                }
+              },
+              {
+                loader: 'sass-loader',
+                options: {
+                  sourceMap: true,
+                  sassOptions: {
+                    indentedSyntax: true
+                  }
+                }
+              }
+            ]
+          },
+          /* config.module.rule('sass').rule('normal-modules') */
+          {
+            test: /\.module\.\w+$/,
+            use: [
+              {
+                loader: '/Users/coywoo/Documents/code/plg-tms-std-web/node_modules/_vue-style-loader@4.1.3@vue-style-loader/index.js',
+                options: {
+                  sourceMap: true,
+                  shadowMode: false
+                }
+              },
+              {
+                loader: '/Users/coywoo/Documents/code/plg-tms-std-web/node_modules/_css-loader@3.6.0@css-loader/dist/cjs.js',
+                options: {
+                  sourceMap: true,
+                  importLoaders: 2,
+                  modules: {
+                    localIdentName: '[name]_[local]_[hash:base64:5]'
+                  }
+                }
+              },
+              {
+                loader: '/Users/coywoo/Documents/code/plg-tms-std-web/node_modules/_postcss-loader@3.0.0@postcss-loader/src/index.js',
+                options: {
+                  sourceMap: true
+                }
+              },
+              {
+                loader: 'sass-loader',
+                options: {
+                  sourceMap: true,
+                  sassOptions: {
+                    indentedSyntax: true
+                  }
+                }
+              }
+            ]
+          },
+          /* config.module.rule('sass').rule('normal') */
+          {
+            use: [
+              {
+                loader: '/Users/coywoo/Documents/code/plg-tms-std-web/node_modules/_vue-style-loader@4.1.3@vue-style-loader/index.js',
+                options: {
+                  sourceMap: true,
+                  shadowMode: false
+                }
+              },
+              {
+                loader: '/Users/coywoo/Documents/code/plg-tms-std-web/node_modules/_css-loader@3.6.0@css-loader/dist/cjs.js',
+                options: {
+                  sourceMap: true,
+                  importLoaders: 2
+                }
+              },
+              {
+                loader: '/Users/coywoo/Documents/code/plg-tms-std-web/node_modules/_postcss-loader@3.0.0@postcss-loader/src/index.js',
+                options: {
+                  sourceMap: true
+                }
+              },
+              {
+                loader: 'sass-loader',
+                options: {
+                  sourceMap: true,
+                  sassOptions: {
+                    indentedSyntax: true
+                  }
+                }
+              }
+            ]
+          }
+        ]
+      },
+      /* config.module.rule('less') */
+      {
+        test: /\.less$/,
+        oneOf: [
+          /* config.module.rule('less').rule('vue-modules') */
+          {
+            resourceQuery: /module/,
+            use: [
+              {
+                loader: '/Users/coywoo/Documents/code/plg-tms-std-web/node_modules/_vue-style-loader@4.1.3@vue-style-loader/index.js',
+                options: {
+                  sourceMap: true,
+                  shadowMode: false
+                }
+              },
+              {
+                loader: '/Users/coywoo/Documents/code/plg-tms-std-web/node_modules/_css-loader@3.6.0@css-loader/dist/cjs.js',
+                options: {
+                  sourceMap: true,
+                  importLoaders: 2,
+                  modules: {
+                    localIdentName: '[name]_[local]_[hash:base64:5]'
+                  }
+                }
+              },
+              {
+                loader: '/Users/coywoo/Documents/code/plg-tms-std-web/node_modules/_postcss-loader@3.0.0@postcss-loader/src/index.js',
+                options: {
+                  sourceMap: true
+                }
+              },
+              {
+                loader: '/Users/coywoo/Documents/code/plg-tms-std-web/node_modules/_less-loader@5.0.0@less-loader/dist/cjs.js',
+                options: {
+                  sourceMap: true,
+                  modifyVars: {
+                    'border-radius-base': '2px',
+                    'font-size-base': '12px',
+                    'table-padding-vertical': '10px',
+                    'table-padding-horizontal': '8px',
+                    'form-item-margin-bottom': '8px',
+                    'input-height-base': '28px',
+                    'btn-height-base': '28px',
+                    'btn-height-lg': ' 36px',
+                    'btn-height-sm': '20px',
+                    'padding-lg': '20px',
+                    'padding-md': '12px',
+                    'padding-sm': '8px',
+                    'checkbox-size': '16px',
+                    'switch-height': '18px',
+                    'switch-sm-height': '14px',
+                    'pagination-item-size': '28px',
+                    'pagination-item-size-sm': '20px',
+                    'modal-body-padding': '16px',
+                    'drawer-header-padding': '12px 18px',
+                    'drawer-body-padding': '18px',
+                    'card-head-padding': ' 12px',
+                    'card-inner-head-padding': '8px',
+                    'card-padding-base': '18px',
+                    'dropdown-vertical-padding': '4px',
+                    'dropdown-edge-child-vertical-padding': '3px'
+                  },
+                  javascriptEnabled: true
+                }
+              }
+            ]
+          },
+          /* config.module.rule('less').rule('vue') */
+          {
+            resourceQuery: /\?vue/,
+            use: [
+              {
+                loader: '/Users/coywoo/Documents/code/plg-tms-std-web/node_modules/_vue-style-loader@4.1.3@vue-style-loader/index.js',
+                options: {
+                  sourceMap: true,
+                  shadowMode: false
+                }
+              },
+              {
+                loader: '/Users/coywoo/Documents/code/plg-tms-std-web/node_modules/_css-loader@3.6.0@css-loader/dist/cjs.js',
+                options: {
+                  sourceMap: true,
+                  importLoaders: 2
+                }
+              },
+              {
+                loader: '/Users/coywoo/Documents/code/plg-tms-std-web/node_modules/_postcss-loader@3.0.0@postcss-loader/src/index.js',
+                options: {
+                  sourceMap: true
+                }
+              },
+              {
+                loader: '/Users/coywoo/Documents/code/plg-tms-std-web/node_modules/_less-loader@5.0.0@less-loader/dist/cjs.js',
+                options: {
+                  sourceMap: true,
+                  modifyVars: {
+                    'border-radius-base': '2px',
+                    'font-size-base': '12px',
+                    'table-padding-vertical': '10px',
+                    'table-padding-horizontal': '8px',
+                    'form-item-margin-bottom': '8px',
+                    'input-height-base': '28px',
+                    'btn-height-base': '28px',
+                    'btn-height-lg': ' 36px',
+                    'btn-height-sm': '20px',
+                    'padding-lg': '20px',
+                    'padding-md': '12px',
+                    'padding-sm': '8px',
+                    'checkbox-size': '16px',
+                    'switch-height': '18px',
+                    'switch-sm-height': '14px',
+                    'pagination-item-size': '28px',
+                    'pagination-item-size-sm': '20px',
+                    'modal-body-padding': '16px',
+                    'drawer-header-padding': '12px 18px',
+                    'drawer-body-padding': '18px',
+                    'card-head-padding': ' 12px',
+                    'card-inner-head-padding': '8px',
+                    'card-padding-base': '18px',
+                    'dropdown-vertical-padding': '4px',
+                    'dropdown-edge-child-vertical-padding': '3px'
+                  },
+                  javascriptEnabled: true
+                }
+              }
+            ]
+          },
+          /* config.module.rule('less').rule('normal-modules') */
+          {
+            test: /\.module\.\w+$/,
+            use: [
+              {
+                loader: '/Users/coywoo/Documents/code/plg-tms-std-web/node_modules/_vue-style-loader@4.1.3@vue-style-loader/index.js',
+                options: {
+                  sourceMap: true,
+                  shadowMode: false
+                }
+              },
+              {
+                loader: '/Users/coywoo/Documents/code/plg-tms-std-web/node_modules/_css-loader@3.6.0@css-loader/dist/cjs.js',
+                options: {
+                  sourceMap: true,
+                  importLoaders: 2,
+                  modules: {
+                    localIdentName: '[name]_[local]_[hash:base64:5]'
+                  }
+                }
+              },
+              {
+                loader: '/Users/coywoo/Documents/code/plg-tms-std-web/node_modules/_postcss-loader@3.0.0@postcss-loader/src/index.js',
+                options: {
+                  sourceMap: true
+                }
+              },
+              {
+                loader: '/Users/coywoo/Documents/code/plg-tms-std-web/node_modules/_less-loader@5.0.0@less-loader/dist/cjs.js',
+                options: {
+                  sourceMap: true,
+                  modifyVars: {
+                    'border-radius-base': '2px',
+                    'font-size-base': '12px',
+                    'table-padding-vertical': '10px',
+                    'table-padding-horizontal': '8px',
+                    'form-item-margin-bottom': '8px',
+                    'input-height-base': '28px',
+                    'btn-height-base': '28px',
+                    'btn-height-lg': ' 36px',
+                    'btn-height-sm': '20px',
+                    'padding-lg': '20px',
+                    'padding-md': '12px',
+                    'padding-sm': '8px',
+                    'checkbox-size': '16px',
+                    'switch-height': '18px',
+                    'switch-sm-height': '14px',
+                    'pagination-item-size': '28px',
+                    'pagination-item-size-sm': '20px',
+                    'modal-body-padding': '16px',
+                    'drawer-header-padding': '12px 18px',
+                    'drawer-body-padding': '18px',
+                    'card-head-padding': ' 12px',
+                    'card-inner-head-padding': '8px',
+                    'card-padding-base': '18px',
+                    'dropdown-vertical-padding': '4px',
+                    'dropdown-edge-child-vertical-padding': '3px'
+                  },
+                  javascriptEnabled: true
+                }
+              }
+            ]
+          },
+          /* config.module.rule('less').rule('normal') */
+          {
+            use: [
+              {
+                loader: '/Users/coywoo/Documents/code/plg-tms-std-web/node_modules/_vue-style-loader@4.1.3@vue-style-loader/index.js',
+                options: {
+                  sourceMap: true,
+                  shadowMode: false
+                }
+              },
+              {
+                loader: '/Users/coywoo/Documents/code/plg-tms-std-web/node_modules/_css-loader@3.6.0@css-loader/dist/cjs.js',
+                options: {
+                  sourceMap: true,
+                  importLoaders: 2
+                }
+              },
+              {
+                loader: '/Users/coywoo/Documents/code/plg-tms-std-web/node_modules/_postcss-loader@3.0.0@postcss-loader/src/index.js',
+                options: {
+                  sourceMap: true
+                }
+              },
+              {
+                loader: '/Users/coywoo/Documents/code/plg-tms-std-web/node_modules/_less-loader@5.0.0@less-loader/dist/cjs.js',
+                options: {
+                  sourceMap: true,
+                  modifyVars: {
+                    'border-radius-base': '2px',
+                    'font-size-base': '12px',
+                    'table-padding-vertical': '10px',
+                    'table-padding-horizontal': '8px',
+                    'form-item-margin-bottom': '8px',
+                    'input-height-base': '28px',
+                    'btn-height-base': '28px',
+                    'btn-height-lg': ' 36px',
+                    'btn-height-sm': '20px',
+                    'padding-lg': '20px',
+                    'padding-md': '12px',
+                    'padding-sm': '8px',
+                    'checkbox-size': '16px',
+                    'switch-height': '18px',
+                    'switch-sm-height': '14px',
+                    'pagination-item-size': '28px',
+                    'pagination-item-size-sm': '20px',
+                    'modal-body-padding': '16px',
+                    'drawer-header-padding': '12px 18px',
+                    'drawer-body-padding': '18px',
+                    'card-head-padding': ' 12px',
+                    'card-inner-head-padding': '8px',
+                    'card-padding-base': '18px',
+                    'dropdown-vertical-padding': '4px',
+                    'dropdown-edge-child-vertical-padding': '3px'
+                  },
+                  javascriptEnabled: true
+                }
+              }
+            ]
+          }
+        ]
+      },
+      /* config.module.rule('stylus') */
+      {
+        test: /\.styl(us)?$/,
+        oneOf: [
+          /* config.module.rule('stylus').rule('vue-modules') */
+          {
+            resourceQuery: /module/,
+            use: [
+              {
+                loader: '/Users/coywoo/Documents/code/plg-tms-std-web/node_modules/_vue-style-loader@4.1.3@vue-style-loader/index.js',
+                options: {
+                  sourceMap: true,
+                  shadowMode: false
+                }
+              },
+              {
+                loader: '/Users/coywoo/Documents/code/plg-tms-std-web/node_modules/_css-loader@3.6.0@css-loader/dist/cjs.js',
+                options: {
+                  sourceMap: true,
+                  importLoaders: 2,
+                  modules: {
+                    localIdentName: '[name]_[local]_[hash:base64:5]'
+                  }
+                }
+              },
+              {
+                loader: '/Users/coywoo/Documents/code/plg-tms-std-web/node_modules/_postcss-loader@3.0.0@postcss-loader/src/index.js',
+                options: {
+                  sourceMap: true
+                }
+              },
+              {
+                loader: 'stylus-loader',
+                options: {
+                  sourceMap: true,
+                  preferPathResolver: 'webpack'
+                }
+              }
+            ]
+          },
+          /* config.module.rule('stylus').rule('vue') */
+          {
+            resourceQuery: /\?vue/,
+            use: [
+              {
+                loader: '/Users/coywoo/Documents/code/plg-tms-std-web/node_modules/_vue-style-loader@4.1.3@vue-style-loader/index.js',
+                options: {
+                  sourceMap: true,
+                  shadowMode: false
+                }
+              },
+              {
+                loader: '/Users/coywoo/Documents/code/plg-tms-std-web/node_modules/_css-loader@3.6.0@css-loader/dist/cjs.js',
+                options: {
+                  sourceMap: true,
+                  importLoaders: 2
+                }
+              },
+              {
+                loader: '/Users/coywoo/Documents/code/plg-tms-std-web/node_modules/_postcss-loader@3.0.0@postcss-loader/src/index.js',
+                options: {
+                  sourceMap: true
+                }
+              },
+              {
+                loader: 'stylus-loader',
+                options: {
+                  sourceMap: true,
+                  preferPathResolver: 'webpack'
+                }
+              }
+            ]
+          },
+          /* config.module.rule('stylus').rule('normal-modules') */
+          {
+            test: /\.module\.\w+$/,
+            use: [
+              {
+                loader: '/Users/coywoo/Documents/code/plg-tms-std-web/node_modules/_vue-style-loader@4.1.3@vue-style-loader/index.js',
+                options: {
+                  sourceMap: true,
+                  shadowMode: false
+                }
+              },
+              {
+                loader: '/Users/coywoo/Documents/code/plg-tms-std-web/node_modules/_css-loader@3.6.0@css-loader/dist/cjs.js',
+                options: {
+                  sourceMap: true,
+                  importLoaders: 2,
+                  modules: {
+                    localIdentName: '[name]_[local]_[hash:base64:5]'
+                  }
+                }
+              },
+              {
+                loader: '/Users/coywoo/Documents/code/plg-tms-std-web/node_modules/_postcss-loader@3.0.0@postcss-loader/src/index.js',
+                options: {
+                  sourceMap: true
+                }
+              },
+              {
+                loader: 'stylus-loader',
+                options: {
+                  sourceMap: true,
+                  preferPathResolver: 'webpack'
+                }
+              }
+            ]
+          },
+          /* config.module.rule('stylus').rule('normal') */
+          {
+            use: [
+              {
+                loader: '/Users/coywoo/Documents/code/plg-tms-std-web/node_modules/_vue-style-loader@4.1.3@vue-style-loader/index.js',
+                options: {
+                  sourceMap: true,
+                  shadowMode: false
+                }
+              },
+              {
+                loader: '/Users/coywoo/Documents/code/plg-tms-std-web/node_modules/_css-loader@3.6.0@css-loader/dist/cjs.js',
+                options: {
+                  sourceMap: true,
+                  importLoaders: 2
+                }
+              },
+              {
+                loader: '/Users/coywoo/Documents/code/plg-tms-std-web/node_modules/_postcss-loader@3.0.0@postcss-loader/src/index.js',
+                options: {
+                  sourceMap: true
+                }
+              },
+              {
+                loader: 'stylus-loader',
+                options: {
+                  sourceMap: true,
+                  preferPathResolver: 'webpack'
+                }
+              }
+            ]
+          }
+        ]
+      },
+      /* config.module.rule('js') */
+      {
+        test: /\.m?jsx?$/,
+        exclude: [
+          function () { /* omitted long function */ }
+        ],
+        use: [
+          {
+            loader: '/Users/coywoo/Documents/code/plg-tms-std-web/node_modules/_cache-loader@4.1.0@cache-loader/dist/cjs.js',
+            options: {
+              cacheDirectory: '/Users/coywoo/Documents/code/plg-tms-std-web/node_modules/.cache/babel-loader',
+              cacheIdentifier: 'da826934'
+            }
+          },
+          {
+            loader: '/Users/coywoo/Documents/code/plg-tms-std-web/node_modules/_babel-loader@8.2.5@babel-loader/lib/index.js'
+          }
+        ]
+      },
+      /* config.module.rule('jqhtml') */
+      {
+        test: /(.*(\/JQ_Page\/pages)+?.*).html$/,
+        use: [
+          {
+            loader: 'html-loader'
+          }
+        ]
+      }
+    ]
+  },
+  optimization: {
+    splitChunks: {
+      cacheGroups: {
+        vendors: {
+          name: 'chunk-vendors',
+          test: /[\\/]node_modules[\\/]/,
+          priority: -10,
+          chunks: 'initial'
+        },
+        common: {
+          name: 'chunk-common',
+          minChunks: 2,
+          priority: -20,
+          chunks: 'initial',
+          reuseExistingChunk: true
+        },
+        JQPage: {
+          name: 'JQPage',
+          priority: -100,
+          test: /(.*(\/JQ_Page\/js)+?.*).js$/
+        }
+      }
+    },
+    minimizer: [
+      {
+        options: {
+          test: /\.m?js(\?.*)?$/i,
+          chunkFilter: () => true,
+          warningsFilter: () => true,
+          extractComments: false,
+          sourceMap: true,
+          cache: true,
+          cacheKeys: defaultCacheKeys => defaultCacheKeys,
+          parallel: true,
+          include: undefined,
+          exclude: undefined,
+          minify: undefined,
+          terserOptions: {
+            output: {
+              comments: /^\**!|@preserve|@license|@cc_on/i
+            },
+            compress: {
+              arrows: false,
+              collapse_vars: false,
+              comparisons: false,
+              computed_props: false,
+              hoist_funs: false,
+              hoist_props: false,
+              hoist_vars: false,
+              inline: false,
+              loops: false,
+              negate_iife: false,
+              properties: false,
+              reduce_funcs: false,
+              reduce_vars: false,
+              switches: false,
+              toplevel: false,
+              typeofs: false,
+              booleans: true,
+              if_return: true,
+              sequences: true,
+              unused: true,
+              conditionals: true,
+              dead_code: true,
+              evaluate: true
+            },
+            mangle: {
+              safari10: true
+            }
+          }
+        }
+      }
+    ]
+  },
+  plugins: [
+    /* config.plugin('vue-loader') */
+    new VueLoaderPlugin(),
+    /* config.plugin('define') */
+    new DefinePlugin(
+      {
+        'process.env': {
+          NODE_ENV: '"development"',
+          BASE_URL: '"/"'
+        }
+      }
+    ),
+    /* config.plugin('case-sensitive-paths') */
+    new CaseSensitivePathsPlugin(),
+    /* config.plugin('friendly-errors') */
+    new FriendlyErrorsWebpackPlugin(
+      {
+        additionalTransformers: [
+          function () { /* omitted long function */ }
+        ],
+        additionalFormatters: [
+          function () { /* omitted long function */ }
+        ]
+      }
+    ),
+    /* config.plugin('html') */
+    new HtmlWebpackPlugin(
+      {
+        title: 'TMS-UPCloud',
+        templateParameters: function () { /* omitted long function */ },
+        template: '/Users/coywoo/Documents/code/plg-tms-std-web/public/index.html',
+        scripts: [
+          '/tms/prologui/dist/vendors/jquery/jquery-3.3.1.min.js',
+          '/tms/prologui/dist/vendors/echarts/dist/echarts.js',
+          '/tms/prologui/dist/vendors/layui-master/dist/layui.all.js',
+          '/tms/prologui/dist/vendors/vipspa-master/build/vipspa.js',
+          '/tms/prologui/dist/vendors/dhtmlx/grid/codebase/dhtmlxgrid.js',
+          '/tms/prologui/dist/vendors/dhtmlx/form/codebase/dhtmlxform.js',
+          '/tms/prologui/dist/vendors/zTree_v3/js/jquery.ztree.core.min.js',
+          '/tms/prologui/dist/js/prolog.all-0.0.1.js',
+          '/tms/prologui/dist/vendors/zTree_v3/js/jquery.ztree.excheck.min.js',
+          '/tms/prologui/modules/cryptojs/crypto-js.js',
+          '/tms/prologui/modules/qrcode/qrcode.min.js',
+          '/tms/prologui/modules/viewer/js/viewer.min.js',
+          '//webapi.amap.com/maps?v=1.4.15&key=7a7f83315e1f4db61723b012737b7e30&plugin=AMap.Geocoder',
+          '//webapi.amap.com/ui/1.1/main.js',
+          '/tms/prologui/modules/qiankun@2.6.3/dist/index.umd.min.js',
+          '/tms/utils/prologutil.js'
+        ],
+        links: [
+          '/tms/prologui/dist/vendors/layui-master/dist/css/layui.rem.css',
+          '/tms/prologui/dist/css/prolog.all-0.0.1.css',
+          '/tms/css/auth.ext.css',
+          '//at.alicdn.com/t/font_799562_uwf89qp4mcf.css',
+          '/tms/prologui/modules/viewer/css/viewer.min.css'
+        ]
+      }
+    ),
+    /* config.plugin('preload') */
+    new PreloadPlugin(
+      {
+        rel: 'preload',
+        include: 'initial',
+        fileBlacklist: [
+          /\.map$/,
+          /hot-update\.js$/
+        ]
+      }
+    ),
+    /* config.plugin('copy') */
+    new CopyPlugin(
+      [
+        {
+          from: '/Users/coywoo/Documents/code/plg-tms-std-web/public',
+          to: '/Users/coywoo/Documents/code/plg-tms-std-web/dist',
+          toType: 'dir',
+          ignore: [
+            '.DS_Store',
+            {
+              glob: 'index.html',
+              matchBase: false
+            }
+          ]
+        }
+      ]
+    ),
+    {
+      options: {
+        resourceRegExp: /^\.\/locale$/,
+        contextRegExp: /moment$/
+      },
+      checkIgnore: function () { [native code] }
+    },
+    {
+      definitions: {
+        APP_VERSION: '"1.0.1"',
+        GIT_HASH: '"921d01c"',
+        BUILD_DATE: '"5/31/2022, 5:09:50 PM"'
+      }
+    },
+    {
+      options: {
+        languages: [
+          {
+            label: 'javascript',
+            entry: 'vs/basic-languages/javascript/javascript.contribution'
+          },
+          {
+            label: 'css',
+            entry: [
+              'vs/basic-languages/css/css.contribution',
+              'vs/language/css/monaco.contribution'
+            ],
+            worker: {
+              id: 'vs/language/css/cssWorker',
+              entry: 'vs/language/css/css.worker'
+            }
+          },
+          {
+            label: 'html',
+            entry: [
+              'vs/basic-languages/html/html.contribution',
+              'vs/language/html/monaco.contribution'
+            ],
+            worker: {
+              id: 'vs/language/html/htmlWorker',
+              entry: 'vs/language/html/html.worker'
+            }
+          },
+          {
+            label: 'json',
+            entry: 'vs/language/json/monaco.contribution',
+            worker: {
+              id: 'vs/language/json/jsonWorker',
+              entry: 'vs/language/json/json.worker'
+            }
+          },
+          {
+            label: 'sql',
+            entry: 'vs/basic-languages/sql/sql.contribution'
+          }
+        ],
+        features: [
+          {
+            label: 'coreCommands',
+            entry: 'vs/editor/browser/controller/coreCommands'
+          },
+          {
+            label: 'find',
+            entry: 'vs/editor/contrib/find/findController'
+          }
+        ],
+        filename: '[name].worker.js',
+        publicPath: '',
+        globalAPI: false
+      }
+    },
+    {
+      options: {
+        test: /\.(js|css)$/,
+        include: undefined,
+        exclude: undefined,
+        cache: true,
+        algorithm: 'gzip',
+        compressionOptions: {
+          level: 9
+        },
+        filename: '[path][base].gz',
+        threshold: 10240,
+        minRatio: 0.6,
+        deleteOriginalAssets: false
+      },
+      algorithm: function () { /* omitted long function */ }
+    },
+    {
+      handler: {
+        options: {
+          fileName: 'css/theme-colors-[contenthash:8].css',
+          matchColors: [
+            '#1890ff',
+            '#2f9bff',
+            '#46a6ff',
+            '#5db1ff',
+            '#74bcff',
+            '#8cc8ff',
+            '#a3d3ff',
+            '#badeff',
+            '#d1e9ff',
+            '#e6f7ff',
+            '#bae7ff',
+            '#91d5ff',
+            '#69c0ff',
+            '#40a9ff',
+            '#1890ff',
+            '#096dd9',
+            '#0050b3',
+            '#003a8c',
+            '#002766',
+            '24,144,255'
+          ],
+          isJsUgly: false,
+          configVar: 'tc_cfg_07733136315861389',
+          changeSelector: function () { /* omitted long function */ }
+        },
+        assetsExtractor: {
+          extractor: {
+            extractColors: function () { /* omitted long function */ },
+            getRules: function () { /* omitted long function */ },
+            testCssCode: function () { /* omitted long function */ }
+          },
+          extractAssets: function () { /* omitted long function */ },
+          extractToArray: function () { /* omitted long function */ },
+          extractAsset: function () { /* omitted long function */ }
+        }
+      }
+    },
+    {},
+    {
+      opts: {
+        analyzerMode: 'server',
+        analyzerHost: '127.0.0.1',
+        reportFilename: null,
+        reportTitle: function () { /* omitted long function */ },
+        defaultSizes: 'parsed',
+        openAnalyzer: true,
+        generateStatsFile: false,
+        statsFilename: 'stats.json',
+        statsOptions: null,
+        excludeAssets: null,
+        logLevel: 'info',
+        startAnalyzer: true,
+        analyzerPort: 8888
+      },
+      server: null,
+      logger: {
+        activeLevels: new Set([
+          'info',
+          'warn',
+          'error',
+          'silent'
+        ])
+      }
+    }
+  ],
+  entry: {
+    app: [
+      './src/main.js'
+    ]
+  },
+  externals: {}
+}

+ 94 - 0
plg-tms-std-web-vue/package.json

@@ -0,0 +1,94 @@
+{
+  "name": "TMS-UPCloud",
+  "version": "2.2.1",
+  "private": true,
+  "scripts": {
+    "serve": "cross-env vue-cli-service serve",
+    "cdn:serve": "cross-env NODE_ENV=cdn  VUE_APP_LOGIN_TITLE='' vue-cli-service serve ",
+    "build": "cross-env NODE_ENV=production vue-cli-service build",
+    "test:unit": "vue-cli-service test:unit",
+    "lint": "vue-cli-service lint",
+    "build:preview": "vue-cli-service build --mode preview",
+    "lint:nofix": "vue-cli-service lint --no-fix",
+    "test:plglib": "vue-cli-service serve --mode plglib",
+    "deploy": "npm run build && node deploy.js",
+    "analyze": "cross-env NODE_ENV=production npm_config_report=true npm run build",
+    "analyze:cdn": "cross-env NODE_ENV=production npm_config_report=true npm run build --mode cdn"
+  },
+  "dependencies": {
+    "@antv/g6": "^4.7.14",
+    "ant-design-vue": "1.7.8",
+    "axios": "^0.21.1",
+    "big.js": "^6.2.0",
+    "core-js": "^3.1.2",
+    "echarts": "^5.1.1",
+    "enquire.js": "^2.1.6",
+    "lodash.clonedeep": "^4.5.0",
+    "lodash.difference": "^4.5.0",
+    "lodash.get": "^4.4.2",
+    "lodash.pick": "^4.4.0",
+    "md5": "^2.2.1",
+    "moment": "^2.24.0",
+    "monaco-editor": "0.23.0",
+    "nprogress": "^0.2.0",
+    "pinyin-match": "^1.2.1",
+    "plg-platform-setting": "^1.0.2",
+    "plglib": "1.1.3",
+    "qs": "^6.10.3",
+    "store": "^2.0.12",
+    "v-viewer": "^1.6.3",
+    "vcolorpicker": "^1.1.0",
+    "vue": "~2.6.10",
+    "vue-clipboard2": "^0.2.1",
+    "vue-container-query": "^0.1.0",
+    "vue-copy-to-clipboard": "^1.0.3",
+    "vue-cropper": "0.4.9",
+    "vue-i18n": "^8.17.4",
+    "vue-json-editor": "^1.4.3",
+    "vue-json-viewer": "^2.2.18",
+    "vue-ls": "^3.2.2",
+    "vue-router": "^3.1.2",
+    "vue-svg-component-runtime": "^1.0.1",
+    "vuedraggable": "^2.24.3",
+    "vuex": "^3.6.2",
+    "vxe-table": "^3.6.11",
+    "wangeditor": "^3.1.1",
+    "xe-utils": "^3.5.7"
+  },
+  "peerDependencies": {
+    "ant-design-vue": "1.7.8"
+  },
+  "devDependencies": {
+    "@ant-design/colors": "^3.2.1",
+    "@vue/cli-plugin-babel": "^4.0.4",
+    "@vue/cli-plugin-eslint": "^4.0.4",
+    "@vue/cli-plugin-router": "^4.0.4",
+    "@vue/cli-plugin-vuex": "^4.0.4",
+    "@vue/cli-service": "^4.0.4",
+    "@vue/eslint-config-standard": "^4.0.0",
+    "babel-eslint": "^10.0.1",
+    "babel-plugin-import": "^1.12.2",
+    "babel-plugin-transform-remove-console": "^6.9.4",
+    "compression-webpack-plugin": "6.1.1",
+    "cross-env": "^7.0.3",
+    "eslint": "^5.16.0",
+    "eslint-plugin-html": "^5.0.0",
+    "eslint-plugin-vue": "^5.2.3",
+    "git-revision-webpack-plugin": "^3.0.6",
+    "html-loader": "^1.3.2",
+    "less": "^3.0.4",
+    "less-loader": "^5.0.0",
+    "monaco-editor-webpack-plugin": "^3.1.0",
+    "opencollective": "^1.0.3",
+    "opencollective-postinstall": "^2.0.2",
+    "raw-loader": "^4.0.2",
+    "svg-sprite-loader": "5.0.0",
+    "tar-fs": "^2.1.1",
+    "vue-svg-icon-loader": "^2.1.1",
+    "vue-template-compiler": "~2.6.10",
+    "webpack": "4.46.0",
+    "webpack-bundle-analyzer": "^4.4.2",
+    "webpack-cli": "^4.6.0",
+    "webpack-theme-color-replacer": "^1.3.12"
+  }
+}

+ 10 - 0
plg-tms-std-web-vue/pipeline_control.yaml

@@ -0,0 +1,10 @@
+#代码缓存开关 true开 false关
+BUILD_CACHE=true
+#代码编辑开关  ture开  false关
+BUILD_CODE=true
+#代码扫描开关 true扫描 false不扫描
+SONAR_SCAN=false
+#构建镜像开关 true构建 false不构建
+BUILD_IMAGE=true
+#发布开关 true发布 False不发布
+DEPLOY=true

+ 146 - 0
plg-tms-std-web-vue/public/index.html

@@ -0,0 +1,146 @@
+<!DOCTYPE html>
+<html lang="zh-cmn-Hans">
+
+<head>
+  <meta charset="utf-8">
+  <meta http-equiv="X-UA-Compatible" content="IE=edge">
+  <meta name="viewport" content="width=device-width,initial-scale=1.0">
+  <link rel="icon" href="<%= BASE_URL %>logo_blue.png">
+  <title>login for Upcloud Solution</title>
+  <script type="text/javascript" id="amap">
+    window._AMapSecurityConfig = {
+      securityJsCode: '1c3af40a5f28fe3259883dbc329e3874',
+    }
+  </script>
+  <link rel="stylesheet" href="//at.alicdn.com/t/font_2436719_kr9sj0250m.css">
+  <!-- <link rel="stylesheet" href="//prolog0212.vicp.cc:36872/plglib.css">
+  <script src="//prolog0212.vicp.cc:36872/plglib.umd.min.0.0.67.js"></script> -->
+  <!-- <script type="text/javascript" src="http://api.map.baidu.com/api?v=3.0&ak=vfZgs8WTqtPblvooiR0Qo4Zo2M0qxinS"></script> -->
+  <style>
+    #loading-mask {
+      position: fixed;
+      left: 0;
+      top: 0;
+      height: 100%;
+      width: 100%;
+      background: #fff;
+      user-select: none;
+      z-index: 9999;
+      overflow: hidden;
+    }
+
+    .loading-wrapper {
+      position: absolute;
+      top: 50%;
+      left: 50%;
+      transform: translate(-50%, -100%);
+    }
+
+    .loading-dot {
+      animation: antRotate 1.2s infinite linear;
+      transform: rotate(45deg);
+      position: relative;
+      display: inline-block;
+      font-size: 64px;
+      width: 64px;
+      height: 64px;
+      box-sizing: border-box;
+    }
+
+    .loading-dot i {
+      width: 22px;
+      height: 22px;
+      position: absolute;
+      display: block;
+      background-color: #1890ff;
+      border-radius: 100%;
+      transform: scale(0.75);
+      transform-origin: 50% 50%;
+      opacity: 0.3;
+      animation: antSpinMove 1s infinite linear alternate;
+    }
+
+    .loading-dot i:nth-child(1) {
+      top: 0;
+      left: 0;
+    }
+
+    .loading-dot i:nth-child(2) {
+      top: 0;
+      right: 0;
+      -webkit-animation-delay: 0.4s;
+      animation-delay: 0.4s;
+    }
+
+    .loading-dot i:nth-child(3) {
+      right: 0;
+      bottom: 0;
+      -webkit-animation-delay: 0.8s;
+      animation-delay: 0.8s;
+    }
+
+    .loading-dot i:nth-child(4) {
+      bottom: 0;
+      left: 0;
+      -webkit-animation-delay: 1.2s;
+      animation-delay: 1.2s;
+    }
+
+    @keyframes antRotate {
+      to {
+        -webkit-transform: rotate(405deg);
+        transform: rotate(405deg);
+      }
+    }
+
+    @-webkit-keyframes antRotate {
+      to {
+        -webkit-transform: rotate(405deg);
+        transform: rotate(405deg);
+      }
+    }
+
+    @keyframes antSpinMove {
+      to {
+        opacity: 1;
+      }
+    }
+
+    @-webkit-keyframes antSpinMove {
+      to {
+        opacity: 1;
+      }
+    }
+  </style>
+    <% for (var i in htmlWebpackPlugin.options.scripts) { %>
+      <script type="text/javascript"  src="<%= htmlWebpackPlugin.options.scripts[i] %>"></script>
+      <% } %>
+    <% for (var i in htmlWebpackPlugin.options.links) { %>
+        <link rel="stylesheet" type="text/css" href="<%= htmlWebpackPlugin.options.links[i] %>" />
+        <% } %>
+  <!-- require cdn assets css -->
+  <% for (var i in htmlWebpackPlugin.options.cdn && htmlWebpackPlugin.options.cdn.css) { %>
+    <link rel="stylesheet" href="<%= htmlWebpackPlugin.options.cdn.css[i] %>" />
+    <% } %>
+</head>
+
+<body>
+  <noscript>
+    <strong>系统需要脚本支持,请勿限制</strong>
+  </noscript>
+  <div id="app">
+    <div id="loading-mask">
+      <div class="loading-wrapper">
+        <img style="width:60px;" src="<%= BASE_URL %>load.gif" />
+      </div>
+    </div>
+  </div>
+
+  <!-- require cdn assets js -->
+  <% for (var i in htmlWebpackPlugin.options.cdn && htmlWebpackPlugin.options.cdn.js) { %>
+    <script type="text/javascript" src="<%= htmlWebpackPlugin.options.cdn.js[i] %>"></script>
+    <% } %>
+      <!-- built files will be auto injected -->
+</body>
+
+</html>

+ 151 - 0
plg-tms-std-web-vue/public/jq/data/ludiConfig.json

@@ -0,0 +1,151 @@
+{
+  "success": true,
+  "message": "查询成功",
+  "code": "200",
+  "data": [
+    {
+      "hash": "home",
+      "menuId": "m-home",
+      "name": "首页",
+      "parentMenuId": "0",
+      "level": 1,
+      "enable": true,
+      "sort": 0,
+      "imagePath": "icon iconfont p-icon-home",
+      "path": "/ops/pages/home/home",
+      "leaf": true
+    },
+    {
+      "menuId": "m0090001",
+      "name": "注册中心",
+      "parentMenuId": "0",
+      "level": 1,
+      "hash":"eureka",
+      "iframe": true,
+      "path": "/ops/eureka",
+      "enable": true,
+      "sort": 0,
+      "imagePath": "icon iconfont p-icon-jichu",
+      "leaf": true
+    },
+   
+   
+    {
+      "menuId": "m0090_004",
+      "name": "流程定义",
+      "parentMenuId": "m0090_001",
+      "level": 1,
+      "path": "/ops/pages/bpm/activitiDefine",
+      "enable": true,
+      "sort": 0,
+      "imagePath": "icon iconfont p-icon-jichu",
+      "leaf": true
+    },
+    {
+      "menuId": "m0090_005",
+      "name": "流程实例",
+      "parentMenuId": "m0090_001",
+      "level": 1,
+      "path": "/ops/pages/bpm/activitiInstance",
+      "enable": true,
+      "sort": 0,
+      "imagePath": "icon iconfont p-icon-jichu",
+      "leaf": true
+    },
+    {
+      "menuId": "g700",
+      "name": "定时服务",
+      "parentMenuId": "0",
+      "level": 1,
+      "path": "",
+      "enable": true,
+      "sort": 0,
+      "imagePath": "icon iconfont p-icon-dingshinaozhong",
+      "leaf": false
+    },
+    {
+      "menuId": "g701",
+      "name": "定时任务管理",
+      "parentMenuId": "g700",
+      "level": 2,
+      "path": "/ops/pages/timer/timerList",
+      "iframe": false,
+      "enable": true,
+      "imagePath": "icon iconfont p-icon-jichu",
+      "leaf": true
+    },
+
+    {
+      "menuId": "g800",
+      "name": "日志服务",
+      "parentMenuId": "0",
+      "level": 1,
+      "path": "/ops/pages/log/logList",
+      "enable": true,
+      "sort": 0,
+      "imagePath": "icon iconfont p-icon-woderizhi",
+      "leaf": true
+    },
+    {
+      "menuId": "h701",
+      "name": "事务调度中心",
+      "parentMenuId": "0",
+      "level": 1,
+      "path": "",
+      "enable": true,
+      "imagePath": "icon iconfont p-icon-fuwuqi1",
+      "leaf": false
+    },
+    {
+      "menuId": "h702",
+      "name": "LCN事务协调管理器",
+      "parentMenuId": "h701",
+      "level": 2,
+      "path": "/ops/pages/txmanager/mangerType",
+      "enable": true,
+      "imagePath": "icon iconfont p-icon-jichu",
+      "leaf": true
+    },
+    {
+      "menuId": "m8800",
+      "name": "授权中心",
+      "parentMenuId": "0",
+      "level": 1,
+      "path": "",
+      "enable": true,
+      "imagePath": "icon iconfont p-icon-quanxian",
+      "leaf": false
+    },
+    {
+      "menuId": "m8800-3-1",
+      "name": "资源管理",
+      "parentMenuId": "m8800",
+      "level": 1,
+      "path": "/ops/pages/authorization/resource",
+      "enable": true,
+      "leaf": true
+    },
+    {
+      "menuId": "m8800-3-2",
+      "name": "资源组管理",
+      "parentMenuId": "m8800",
+      "level": 1,
+      "path": "/ops/pages/authorization/groupResource",
+      "enable": true,
+      "leaf": true
+    },
+    {
+      "menuId": "m8800-1-1",
+      "name": "客户端管理",
+      "parentMenuId": "m8800",
+      "level": 1,
+      "path": "/ops/pages/authorization/client",
+      "enable": true,
+      "imagePath": "icon iconfont p-icon-jichu",
+      "leaf": true
+    }
+
+
+  ]
+}
+

+ 240 - 0
plg-tms-std-web-vue/public/jq/data/menuData.json

@@ -0,0 +1,240 @@
+
+{
+  "success": true,
+  "message": "查询成功",
+  "code": "200",
+  "data": [
+    {
+      "hash": "home",
+      "menuId": "home",
+      "name": "首页",
+      "parentMenuId": "0",
+      "level": 1,
+      "enable": true,
+      "sort": 0,
+      "imagePath": "icon iconfont p-icon-home",
+      "path": "/ops/pages/home/home",
+      "leaf": true
+    },
+    {
+      "menuId": "m0090001",
+      "name": "注册中心",
+      "parentMenuId": "0",
+      "level": 1,
+      "hash":"eureka",
+      "iframe": true,
+      "path": "/ops/eureka",
+      "enable": true,
+      "sort": 0,
+      "imagePath": "icon iconfont p-icon-jichu",
+      "leaf": true
+    },
+    {
+      "menuId": "m0010-01",
+      "name": "服务器",
+      "setting":"settings",
+      "parentMenuId": "0",
+      "level": 1,
+      "enable": true,
+      "sort": 0,
+      "imagePath": "icon iconfont p-icon-yunweiguanli",
+      "leaf": false
+    },
+     {
+      "menuId": "m0010-02",
+      "name": "服务器信息管理",
+      "hash":"serverSetting",
+      "parentMenuId": "m0010-01",
+      "level": 2,
+      "path": "/ops/pages/settingHome/server",
+      "enable": true,
+      "sort": 0,
+      "leaf": true
+    },
+    {
+      "menuId": "m0010-03",
+      "name": "实例信息配置",
+      "hash":"instanceSetting",
+      "parentMenuId": "m0010-01",
+      "level": 2,
+      "path": "/ops/pages/settingHome/instance",
+      "enable": true,
+      "sort": 0,
+      "leaf": true
+    },
+    {
+      "menuId": "m0090_001",
+      "name": "工作流服务",
+      "parentMenuId": "0",
+      "level": 1,
+      "path": "",
+      "enable": true,
+      "sort": 0,
+      "imagePath": "icon iconfont p-icon-jichu",
+      "leaf": false
+    },
+    {
+      "menuId": "m0090_002",
+      "name": "模型管理页面",
+      "parentMenuId": "m0090_001",
+      "level": 2,
+      "path": "/ops/pages/bpm/activitiModel",
+      "enable": true,
+      "sort": 0,
+      "leaf": true
+    },
+    {
+      "menuId": "m0090_003",
+      "name": "部署信息管理页面",
+      "parentMenuId": "m0090_001",
+      "level": 2,
+      "path": "/ops/pages/bpm/activitiDeployment",
+      "enable": true,
+      "sort": 0,
+      "leaf": true
+    },
+    {
+      "menuId": "m0090_004",
+      "name": "流程定义",
+      "parentMenuId": "m0090_001",
+      "level": 2,
+      "path": "/ops/pages/bpm/activitiDefine",
+      "enable": true,
+      "sort": 0,
+      "leaf": true
+    },
+    {
+      "menuId": "m0090_005",
+      "name": "流程实例",
+      "parentMenuId": "m0090_001",
+      "level": 2,
+      "path": "/ops/pages/bpm/activitiInstance",
+      "enable": true,
+      "sort": 0,
+      "leaf": true
+    },
+    {
+      "menuId": "g700",
+      "name": "定时服务",
+      "parentMenuId": "0",
+      "level": 1,
+      "enable": true,
+      "sort": 0,
+      "imagePath": "icon iconfont p-icon-dingshinaozhong",
+      "leaf": false
+    },
+    {
+      "menuId": "g701",
+      "name": "定时任务管理",
+      "parentMenuId": "g700",
+      "level": 2,
+      "path": "/ops/pages/timer/timerList",
+      "enable": true,
+      "leaf": true
+    },
+    {
+      "menuId": "h801",
+      "name": "消息队列",
+      "parentMenuId": "0",
+      "level": 1,
+      "path": "",
+      "enable": true,
+      "imagePath": "icon iconfont p-icon-xiaoxi",
+      "leaf": false
+    },
+    {
+      "menuId": "h802",
+      "hash": "RabbitMQ",
+      "name": "RabbitMQ",
+      "parentMenuId": "h801",
+      "level": 2,
+      "iframe": true,
+      "path": "/ops/pages/rabbit/index.html",
+      "enable": true,
+      "leaf": true
+    },
+    {
+      "menuId": "g800",
+      "name": "日志服务",
+      "parentMenuId": "0",
+      "level": 1,
+      "path": "/ops/pages/log/logList",
+      "enable": true,
+      "sort": 0,
+      "imagePath": "icon iconfont p-icon-woderizhi",
+      "leaf": true
+    },
+    {
+      "menuId": "h701",
+      "name": "事务调度中心",
+      "parentMenuId": "0",
+      "level": 1,
+      "path": "",
+      "enable": true,
+      "imagePath": "icon iconfont p-icon-fuwuqi1",
+      "leaf": false
+    },
+    {
+      "menuId": "h702",
+      "name": "LCN事务协调管理器",
+      "parentMenuId": "h701",
+      "level": 2,
+      "path": "/ops/pages/txmanager/mangerType",
+      "enable": true,
+      "leaf": true
+    },
+    {
+      "menuId": "m8800",
+      "name": "授权中心",
+      "parentMenuId": "0",
+      "level": 1,
+      "path": "",
+      "enable": true,
+      "imagePath": "icon iconfont p-icon-quanxian",
+      "leaf": false
+    },
+    {
+      "menuId": "m8800-3-1",
+      "name": "资源管理",
+      "parentMenuId": "m8800",
+      "level": 2,
+      "path": "/ops/pages/authorization/resource",
+      "enable": true,
+      "leaf": true
+    },
+    {
+      "menuId": "m8800-3-2",
+      "name": "资源组管理",
+      "parentMenuId": "m8800",
+      "level": 2,
+      "path": "/ops/pages/authorization/groupResource",
+      "enable": true,
+      "leaf": true
+    },
+    {
+      "menuId": "m8800-1-1",
+      "name": "客户端管理",
+      "parentMenuId": "m8800",
+      "level": 2,
+      "path": "/ops/pages/authorization/client",
+      "enable": true,
+      "leaf": true
+    },
+
+
+    {
+      "hash": "languageEdit",
+      "menuId": "languageEdit",
+      "name": "国际化",
+      "parentMenuId": "0",
+      "type": 0,
+      "level": 1,
+      "path": "/ops/pages/languageEdit/index.languageEdit",
+      "enable": true,
+      "operateType": 0,
+      "sort": 0,
+      "imagePath": "icon iconfont p-icon-lang_zh_CN1",
+      "leaf": true
+    }
+  ]
+}

+ 25 - 0
plg-tms-std-web-vue/public/jq/data/mock/groupResource.json

@@ -0,0 +1,25 @@
+
+{
+  "success": true,
+  "message": "查询成功",
+  "code": "200",
+  "data": {
+    "list": [
+      { "id":1,
+        "groupName":"userGroup",
+        "notes":"用户组分配"
+      },
+      {
+        "id":2,
+        "groupName":"systemGroup",
+        "notes":"系统组分配"
+      }
+    ],
+    "totalCount": 24,
+    "pageCount": 3,
+    "pageNum": 1,
+    "pageSize": 10,
+    "startRow": 0,
+    "endRow": 10
+  }
+}

BIN
plg-tms-std-web-vue/public/jq/favicon.ico


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 9 - 0
plg-tms-std-web-vue/public/jq/images/bcy_logo.svg


BIN
plg-tms-std-web-vue/public/jq/images/c_logo.png


BIN
plg-tms-std-web-vue/public/jq/images/c_logo2.png


BIN
plg-tms-std-web-vue/public/jq/images/default_handsome.jpg


BIN
plg-tms-std-web-vue/public/jq/images/h_oder_line.png


BIN
plg-tms-std-web-vue/public/jq/images/h_oders.png


BIN
plg-tms-std-web-vue/public/jq/images/home/ill_instance.png


BIN
plg-tms-std-web-vue/public/jq/images/home/ill_interface.png


BIN
plg-tms-std-web-vue/public/jq/images/home/ill_registration.png


BIN
plg-tms-std-web-vue/public/jq/images/home/ill_service.png


BIN
plg-tms-std-web-vue/public/jq/images/input02.png


BIN
plg-tms-std-web-vue/public/jq/images/inputlog.png


BIN
plg-tms-std-web-vue/public/jq/images/link-first.gif


BIN
plg-tms-std-web-vue/public/jq/images/link-last.gif


BIN
plg-tms-std-web-vue/public/jq/images/link.gif


BIN
plg-tms-std-web-vue/public/jq/images/login/i_pwd.png


BIN
plg-tms-std-web-vue/public/jq/images/login/i_pwd_active.png


BIN
plg-tms-std-web-vue/public/jq/images/login/i_reg.png


BIN
plg-tms-std-web-vue/public/jq/images/login/i_reg_active.png


BIN
plg-tms-std-web-vue/public/jq/images/login/i_usei.png


BIN
plg-tms-std-web-vue/public/jq/images/login/i_usei_active.png


BIN
plg-tms-std-web-vue/public/jq/images/login/icon_exit.png


BIN
plg-tms-std-web-vue/public/jq/images/login/icon_select.png


BIN
plg-tms-std-web-vue/public/jq/images/login/icon_user.png


BIN
plg-tms-std-web-vue/public/jq/images/login/inputlog.png


BIN
plg-tms-std-web-vue/public/jq/images/login/jqfu.png


BIN
plg-tms-std-web-vue/public/jq/images/login/loginBj.jpg


BIN
plg-tms-std-web-vue/public/jq/images/login/logo2.png


BIN
plg-tms-std-web-vue/public/jq/images/login/pcCloud.png


BIN
plg-tms-std-web-vue/public/jq/images/logo.png


BIN
plg-tms-std-web-vue/public/jq/images/output02.png


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 0 - 0
plg-tms-std-web-vue/public/jq/images/user-20181112.svg


BIN
plg-tms-std-web-vue/public/jq/images/图层26.png


BIN
plg-tms-std-web-vue/public/jq/images/形状10.png


BIN
plg-tms-std-web-vue/public/jq/images/服务器.png


BIN
plg-tms-std-web-vue/public/jq/images/端口.png


+ 353 - 0
plg-tms-std-web-vue/public/jq/javascripts/api/index.js

@@ -0,0 +1,353 @@
+"use strict"
+if (!Object.values) Object.values = function (obj) {
+  if (obj !== Object(obj))
+    throw new TypeError('Object.values called on a non-object');
+  var val = [], key;
+  for (key in obj) {
+    if (Object.prototype.hasOwnProperty.call(obj, key)) {
+      val.push(obj[key]);
+    }
+  }
+  return val;
+}
+
+
+var PLG_BUTTON = {
+  value: {
+    addBtn: function () {
+      return '<i class="layui-icon layui-icon-add-1" style="color:#467cfd"></i>' + _t("新增")
+    },
+    delBtn: function () {
+      return '<i class="layui-icon layui-icon-delete"></i>' + _t("删除")
+    },
+    alldelBtn: function () {
+      return '<i class="layui-icon layui-icon-delete"></i>' + _t("批量删除")
+    },
+    logBtn: function () {
+      return '<i class="layui-icon layui-icon-log" style="color:#467cfd"></i>' + _t("日志")
+    },
+    editBtn: function () {
+      return '<i class="layui-icon layui-icon-edit" style="color:#467cfd"></i>' + _t("编辑")
+    },
+    saveBtn: function () {
+      return '<i class="iconfont p-icon-save" style="font-size: 14px;" ></i> ' + _t("保存")
+    },
+    importBtn: function () {
+      return '<i class="iconfont p-icon-daoru" style="color:#467cfd"></i> ' + _t("导入")
+    },
+    exportBtn: function () {
+      return '<i class="iconfont p-icon-daochu" style="color:#467cfd"></i> ' + _t("导出")
+    },
+    downBtn: function () {
+      return '<i class="iconfont p-icon-xiazaimoban" style="color:#467cfd"></i> ' + _t("模版")
+    },
+    searchBtn: function () {
+      return '<i class="layui-icon layui-icon-search" style="color:#467cfd"></i>' + _t("查询")
+    },
+    resetBtn: function () {
+      return '<i class="layui-icon layui-icon-refresh-1" style="color:#467cfd"></i>' + _t("重置")
+    }
+  },
+  warehouseId: {
+    type: "hidden",
+    name: "warehouseId",
+    notToggle: true
+  }
+}
+
+
+var APIS = Object.create({ base_url: '/api' }, {})
+
+//资源管理
+APIS.resource = {
+  //查询资源,添加资源
+  getResource: function () {
+    return this.base_url + "/service-authorization/resource"
+  }.bind(APIS),
+
+  getList: function () {
+    return this.getResource() + "/list"
+  },
+
+  //查询所有服务名【自动加载】
+  getSysNames: function () {
+    return this.getResource() + "/instance/names"
+  },
+  //根据服务名查询所有接口【自动加载】
+  getNameByList: function () {
+    return this.getResource() + "/instance"
+  },
+
+
+  //导入服务接口【自动加载】
+  importInterface: function () {
+    return this.getResource() + "/importinstance"
+  },
+
+  //删除资源
+  delete: function () {
+    return this.getResource() + "/delete"
+  },
+
+  //多个删除资源
+  deleteAll: function () {
+    return this.delete() + "/multiple"
+  },
+
+  //修改资源
+  update: function () {
+    return this.getResource() + "/update"
+  },
+  // 导出Excel数据
+  export: function () {
+    return this.getResource() + "/export"
+  },
+  // 导入模版
+  import: function () {
+    return this.getResource() + "/import"// 【批量导入】
+  },
+  // 下载模版下载
+  download: function () {
+    return this.getResource() + "/download/template"// 【导入模版下载】
+  },
+
+    //没有分配的资源
+  listnotingroup:function(){
+      return this.getResource() + "/listnotingroup"
+    },
+    //分配的资源
+    listbygroup:function(){
+      return this.getResource() + "/listbygroup"
+    },
+  
+      //根据clientid分页查询资源
+  listbyclient: function () {
+    return this.getResource() + "/listbyclient"
+
+  },
+  //根据客户端id查询不包含的资源
+  notlistbyclient: function () {
+    return this.getResource() + "/listnotinclient"
+
+  }
+}
+
+
+//资源组管理
+APIS.groupResource = {
+  getList: function () {
+    //return this.base_url + "/data/mock/resource/groupResource.json"
+    return this.base_url + "/service-authorization/group"
+  }.bind(APIS),
+
+  //添加资源
+  addRes: function () {
+    return this.getList() + "/recources/add"
+
+  },
+   //删除资源
+  removeRes: function () {
+    return this.getList() + "/resource/remove"
+  },
+
+  //添加资源组
+  groupAdd: function () {
+    return this.getList() + "/add"
+  },
+  groupDelete: function () {
+    return this.getList() + "/delete"
+  },
+  update() {
+    return this.getList() + "/update"
+  },
+
+
+      //根据clientid分页查询资源下组
+      listbyclient: function () {
+        return this.getList() + "/listbyclient"
+    
+      },
+      //根据客户端id查询不包含的资源组
+      notlistbyclient: function () {
+        return this.getList() +	"/listothersbyclient"
+    
+      },
+
+  
+};
+
+ //用户资源
+
+ APIS.client={
+
+  authmgr: function () {
+    return this.base_url + "/service-authorization/authmgr"
+  }.bind(APIS),
+  update:function () {
+    return this.authmgr() + "/update"
+  },
+  getAuthmgr:function(){
+    return this.authmgr() + "/like"
+  },
+  addAuthmgr:function(){
+    return this.authmgr() + "/add"
+  },
+  deleteAuthmgr:function(){
+    return this.authmgr() + "/delete"
+  },
+
+
+  //分配资源
+  addResource:function(){
+    return this.authmgr() + "/resource/add"
+
+  },
+
+  //删除资源
+  removeResource:function(){
+    return this.authmgr() + "/resource/remove"
+
+  },
+
+  //分配资源组
+
+  addGroup:function(){
+    return this.authmgr() + "/group/add"
+
+  },
+  //删除资源组
+  removeGroup:function(){
+    return this.authmgr() + "/group/remove"
+  },
+
+  //激活客户端
+  active:function(){
+    return this.authmgr() + "/active"
+  },
+
+  //解冻客户端
+  unfreeze:function(){
+    return this.authmgr() + "/unfreeze"
+  },
+  //冻结客户端
+  freeze:function(){
+    return this.authmgr() + "/freeze"
+  },
+  //重置初始密码
+  resetpassword:function(){
+    return this.authmgr() + "/resetpassword"
+  },
+    //更新密码
+  updatepassword:function(){
+    return this.authmgr() + "/updatepassword"
+  },
+
+    //重置权限
+    refreshauths:function(){
+    return this.authmgr() + "/refreshauths"
+  }
+}
+
+
+APIS.home={
+  
+  statistics: function () {
+    return this.base_url + "/service-authorization/statistics"
+  }.bind(APIS),
+  userStatus:function(){
+    return this.statistics()+"/distribute/auclient"
+  },
+  entry:function(){
+    return this.statistics()+"/entry/resource/count"
+  },
+  service:function(){
+    return this.statistics()+"/entry/service/count"
+  },
+  reginstance:function(){
+    return this.statistics()+"/reg/instance/count"
+  },
+  regService:function(){
+    return this.statistics()+"/reg/service/count"
+  },
+
+  distribute:function(){
+    return this.statistics()+"/distribute/resource"
+  }
+}
+
+//服务器管理
+APIS.settings={
+  server:{
+    serviceDevopsbackstage:function () {
+      return  "/api/service-devopsbackstage"
+    }.bind(APIS),
+    /*请求列表*/
+    serverinfo: function () {
+      return this.serviceDevopsbackstage() + "/serverinfo"
+    },
+    getAllServers:function () {
+      return this.serverinfo()+"/getAllServers"
+    },
+  
+
+
+
+    instanceInfo:function () {
+      return this.serviceDevopsbackstage() + "/instanceInfo"
+
+    },
+    //部署
+    setArrange:function () {
+      return this.instanceInfo()+"/arrange"
+    },
+    //启动容器
+    toggleContainer:function () {
+      return this.instanceInfo()+"/startStopContainer"
+    },
+    
+
+  },
+  
+}
+
+
+
+APIS.languageGroup={
+  zh_CN:"简体中文",
+  en:"English"
+  };
+APIS.lang={
+  baseUrl: function () {
+    return APIS.base_url + "/service-internationalize"
+  },
+  getMenu:function(){
+    return this.baseUrl() + "/menu/getMenu"
+  },
+
+  language:function(){
+    return this.baseUrl() + "/language"
+  },
+  languageDel:function(){
+    return this.baseUrl() + "/language/del"
+  },
+
+
+  languageGetAll:function(){
+    return this.baseUrl() + "/language/getAll"
+  },
+  pageItem:function(){
+    return this.baseUrl() + "/pageItem"
+  },
+  pageItemDel:function(){
+    return this.baseUrl() + "/pageItem/del"
+  },
+
+  pageLanguage:function(){
+    return this.baseUrl() + "/pageLanguage"
+  }
+
+}
+
+
+
+

+ 14 - 0
plg-tms-std-web-vue/public/jq/javascripts/language/en/message.json

@@ -0,0 +1,14 @@
+{
+    "total": {
+        "info": "total has {{count}} apple",
+        "info_plural": "total has {{count}} apples"
+    }
+    , "sold": {
+        "info": "already sold {{count}} apple",
+        "info_plural": "already sold {{count}} apples"
+    }
+    , "unsold": {
+        "info": "unsold {{count}} apple",
+        "info_plural": "unsold {{count}} apples"
+    }
+}

+ 180 - 0
plg-tms-std-web-vue/public/jq/javascripts/language/en/translation.json

@@ -0,0 +1,180 @@
+{
+  "global": {
+    "name": "name",
+    "systemName": "Warehouse Operation Data Management System",
+    "login": "Login",
+    "userLoginImg": "intplog_en",
+    "lenguage": "Lenguage:",
+    "loginErr401": "User name or password error",
+    "请输入用户名": "UserName",
+    "请输入密码": "Password",
+    "用户名不能为空": "The user name cannot be empty",
+    "密码不能为空": "The Password cannot be empty",
+    "请输入":"The input ",
+    "请选择":"The select ",
+    "password_labelWidth":120,
+    "开始":"Start",
+    "结束":"End"  
+  },
+  "提示":"Prompt",
+  "是否删除数据":"Delete or not",
+  "系统信息":"System infor",
+  "版本":"Version",
+  "用户信息":"User infor",
+  "用户名":"User name",
+  "所属组织":"Organisation",
+  "所属仓库":"Warehouse",
+  "手机":"Phone",
+  "登录时间":"Login time",
+  "修改用户密码":"Change user password",
+  "注销":"Cancellation",
+  "展开":"open",
+  "收起":"close",
+  "所有":"All",
+
+  "查找用户信息":"Find user infor",
+  "关闭":"close",
+  "新增记录":  "The new record",
+  "添加用户信息":"Add user infor",
+
+  "可按姓名、工号查询":"Can press name, job number inquiry",
+  "旧密码":" Old password",
+  "新密码":"New password",
+  "确认密码":"Confirm password",
+  "密码提示":"<span style='font-weight: normal;'>Tips: password for 8~20 letters and Numbers composition, case-sensitive!</span>",
+
+
+
+ 
+  "客户投诉":"Complaints",
+  "异常数据":"Error Data",
+  "修改记录":"Edit log",
+  "成功":"Success",
+  "操作成功":"Success",
+  "未设置表单":"No form set",
+  "数据加载中":"Loading",
+
+
+
+    "姓名":"Name",
+    "名称":"Name",
+    "工号":"Work number",
+    "工种类别":"Job category",
+    "合同主体":"contractual",
+    "选择仓库":"Select warehouse",
+    "开始日期":"StartDate",
+    "结束日期":"EndDate",
+    "货主名称":"ShipperName",
+    "有效数据":"Valid",
+    "无效数据":"Invalid",
+    "身份证":"Id card",
+    "仓库":"Warehouse",
+    "仓库id":"Warehouse id",
+    "仓库名称":"Warehouse name",
+    "企业名称":"Company",
+    "企业id":"Company id",
+    "异常类型":"Type error",
+
+    "项目工时":"Project time",
+    "日常工时":"Daily time",
+    "岗位":"Jobs",
+    "考勤日期":"Attendance",
+    "备注":"Note",
+    "日期":"Date",
+    "时间":"Time",
+    "创建":"Create",
+    "商家":"Shops",
+    "月份":"Month",
+    "类型":"Type",
+    "订单号":"Order",
+    "确定":"Sure",
+    "类别":"category",
+    "金额":"Amount",
+    "盘点月份":"Inventory in",
+    "耗材型号":"Material model",
+    "商品条码": "Bar code",
+    "商品ID": "Goods ID",
+    "商品名称": "Goods name",
+    "修改人":"Lastupdate person",
+    "修改日期":"Lastupdate date",
+    "录入人":"Enter person",
+    "录入日期":"Enter date",
+    "设备类型":"Device type",
+    "使用率":"Usage rate",
+    "每月使用时间":"Monthly time",
+    "已使用数量":"in use num",
+    "未使用数量":"Don't use num",
+    "满载数量":"Full num",
+    "投诉日期":"Complaint",
+    "发货日期":"Delivery",
+    "所属岗位":"jbos",
+    "数量":"Number",
+    "型号":"model",
+    
+
+  
+    
+   
+    "保存":"Save",
+    "取消":"Cancel",
+    "新增":"Add",
+    "删除":"Delete",
+    "查看日志":"Log",
+     "编辑":"Edit",
+     "导入":"Import",
+     "导出":"Export",
+     "下载模版":"Down",
+     "查询":"Search",
+     "重置":"Reset",
+
+
+   
+  
+
+   
+
+
+
+    "修改密码": "Password",
+    "请输入关键词":"Please enter keywords",
+    "所有服务":"All menu",
+    "首页":"Home",
+    "考勤数据": "Attendance data",
+    "运营数据": "Operational data",
+    "质量数据": "Quality data",
+    "小时效率": "Hours efficiency",
+    "盘点数据": "Inventory data",
+    "经营数据": "Business data",
+    "预算数据": "Budget data",
+    "耗材数据": "Material data",
+    "设备数据": "Equipment data",
+    "投诉与异常": "Complaints&exceptions",
+    "实物报缺": "Objective to lack",
+    "残品": "order",
+    "QA稽查": "QA inspection",
+    "商品盘点":"Merchandise inventory",
+    "耗材盘点":"Consumable inventory",
+    "仓库业务量":"Warehouse volume",
+    "货主业务量":"Owners volume",
+    "订单生产进度":"Order production schedule",
+    "小时岗位人数":"Number of hourly staff",
+    "收入项":"Income item",
+    "成本项":"Cost item",
+    "设备状态":"Equipment status",
+    "库位状态":"Storage status",
+    "数据分析":"Data analysis",
+    "仓库运营":"Warehouse operation",
+    "全国运营":"Operating",
+    "经营分析":"Business analysis",
+    "效率报告":"Efficiency report",
+    "耗材报告":"Material report",
+    "商家贡献":"Businesses contribute",
+    "质量报告":"Quality report",
+    "资源情况":"Resources",
+    "经营报告":"Business report"
+
+    
+ 
+
+
+}

+ 141 - 0
plg-tms-std-web-vue/public/jq/javascripts/language/index.js

@@ -0,0 +1,141 @@
+(function () {
+
+  //** */辨别移动终端类型
+  var Terminal = {
+
+    platform: function () {
+      var u = navigator.userAgent,
+        app = navigator.appVersion;
+      return {
+        //IE内核
+        windows: u.indexOf('Windows') > -1,
+        //opera内核 
+        presto: u.indexOf('Presto') > -1,
+        //苹果、谷歌内核
+        webKit: u.indexOf('AppleWebKit') > -1,
+        //火狐内核
+        gecko: u.indexOf('Gecko') > -1 && u.indexOf('KHTML') == -1,
+        //是否为移动终端
+        mobile: !!u.match(/AppleWebKit.*Mobile.*/) || !!u.match(/AppleWebKit/),
+        //ios终端
+        ios: !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/),
+        //android终端或者uc浏览器
+        android: u.indexOf('Android') > -1 || u.indexOf('Linux') > -1,
+        //是否iPad
+        iPad: u.indexOf('iPad') > -1,
+        //是否为iPhone或者QQHD浏览器
+        iPhone: u.indexOf('iPhone') > -1,
+        //是否为mac系统
+        Mac: u.indexOf('Macintosh') > -1,
+        //是否web应该程序,没有头部与底部
+        webApp: u.indexOf('Safari') == -1
+      };
+    }(),
+
+    // 辨别移动终端的语言:zh-cn、en-us、ko-kr、ja-jp...
+    language: (navigator.browserLanguage || navigator.language).toLowerCase(),
+
+    init: function () {
+      var sysName;
+      var lagName;
+
+      if (Terminal.platform.android) {
+        sysName = "android";
+      } else if (Terminal.platform.iPhone) {
+        sysName = "iPhone";
+      } else if (Terminal.platform.iPad) {
+        sysName = "iPad";
+      } else if (Terminal.platform.windows) {
+        sysName = "windows";
+      } else if (Terminal.platform.Mac) {
+        sysName = "Mac";
+      } else if (Terminal.platform.gecko) {
+        sysName = "fireFox";
+      } else if (Terminal.platform.mobile) {
+        sysName = "mobile";
+      } else {
+        sysName = "unknown";
+      }
+      switch (Terminal.language) {
+        case 'en':
+          lagName = "en";
+          break;
+        default:
+          lagName = "zh_CN";
+      }
+
+      return {
+         sysName:sysName,
+         lagName:lagName
+      }
+    }
+  }
+  if(!localStorage.getItem("lag")){
+    localStorage.setItem("lag", Terminal.init().lagName);
+}
+  
+
+  var plgLanguage = {
+    debug: false,
+    ns: ['translation','message'],
+    lng:localStorage.getItem("lag"),
+    fallbackLng:"zh_CN",
+    defaultNS:'translation',
+     backend: {
+        loadPath: '/ops/javascripts/language/{{lng}}/{{ns}}.json',
+        crossDomain: false
+    },
+    missingInterpolationHandler:function(text, value){
+      // console.log(text)
+      // console.log(value)
+
+    },
+    parseMissingKeyHandler:function(key){
+     // console.log(key)
+      if(key.indexOf(".") ==-1){
+        return key;
+      }
+      var nk = key.substr(key.lastIndexOf(".")+1);
+      if(i18next.exists(nk)){
+        return i18next.t(nk);
+
+      }
+
+
+
+      return nk;
+
+    }
+  }
+
+  
+  jqueryI18next.init(i18next, $);
+
+  i18next
+  .use(i18nextXHRBackend)
+  .use(i18nextBrowserLanguageDetector)
+  .init(plgLanguage,function () {    
+    console.log(i18next);
+    //updateContent()
+  });
+
+
+  function updateContent() {
+    $(function () {
+      //版本号version
+      $('[name="plg-version"]').append("-v");
+      $(document).localize();
+
+
+    })
+  }
+  i18next.on('languageChanged', function () {
+
+    //Object.getOwnPropertyNames(vipspa).length > 0 && vipspa.reset()
+    updateContent();
+    //console.log(i18next.getFixedT(i18next.language)("提示"))
+  });
+
+})()
+
+

+ 14 - 0
plg-tms-std-web-vue/public/jq/javascripts/language/zh_CN/message.json

@@ -0,0 +1,14 @@
+{
+    "total": {
+        "info": "总共有 {{count}} 个苹果",
+        "info_plural": "总共有 {{count}} 个苹果"
+    }
+    , "sold": {
+        "info": "已出售 {{count}} 个苹果",
+        "info_plural": "已出售 {{count}} 个苹果"
+    }
+    , "unsold": {
+        "info": "未出售 {{count}} 个苹果",
+        "info_plural": "未出售 {{count}} 个苹果"
+    }
+}

+ 166 - 0
plg-tms-std-web-vue/public/jq/javascripts/language/zh_CN/translation.json

@@ -0,0 +1,166 @@
+{
+  "global": {
+    "name": "名称",
+    "systemName": "仓运营数据管理系统",
+    "login": "登录",
+    "userLoginImg": "intplog_zh",
+    "lenguage": "多国语言:",
+    "loginErr401": "用户名或密码错误",
+    "请输入用户名": "请输入用户名",
+    "请输入密码": "请输入密码",
+    "用户名不能为空": "用户名不能为空",
+    "密码不能为空": "密码不能为空",
+    "请输入": "请输入",
+    "请选择": "请选择",
+    "password_labelWidth":80,
+    "开始":"开始",
+    "结束":"结束"
+    
+  },
+  "提示":"提示",
+  "是否删除数据":"是否删除数据",
+  "系统信息":"系统信息",
+  "版本":"版本",
+  "用户信息":"用户信息",
+  "用户名":"用户名",
+  "所属组织":"所属组织",
+  "所属仓库":"所属仓库",
+  "手机":"手机",
+  "登录时间":"登录时间",
+  "修改用户密码":"修改用户密码",
+  "注销":"注销",
+  "展开":"展开",
+  "收起":"收起",
+  "所有":"所有",
+
+  "查找用户信息":"查找用户信息",
+  "关闭":"关闭",
+  "新增记录":  "新增记录",
+  "添加用户信息":"添加用户信息",
+  "可按姓名、工号查询":"可按姓名、工号查询",
+  "旧密码":"旧密码",
+  "新密码":"新密码",
+  "确认密码":"确认密码",
+  "密码提示":"<span style='font-weight: normal;'>温馨提示:密码为 8~20 位的字母和数字组成,区分大小写!</span>",
+  "客户投诉":"客户投诉",
+  "异常数据":"异常数据",
+  "修改记录":"修改记录",
+  "成功":"成功",
+  "操作成功":"操作成功",
+  "未设置表单":"未设置表单",
+  "数据加载中":"数据加载中",
+
+
+
+
+  "姓名": "姓名",
+  "名称": "名称",
+  "工号": "工号",
+  "合同主体": "合同主体",
+  "工种类别": "工种类别",
+  "选择仓库": "选择仓库",
+  "开始日期": "开始时间",
+  "结束日期": "结束时间",
+  "货主名称": "货主名称",
+  "有效数据": "有效数据",
+  "无效数据": "无效数据",
+  "身份证": "身份证",
+  "仓库":"仓库",
+  "仓库id":"仓库id",
+  "仓库名称":"仓库名称",
+  "企业名称":"企业名称",
+  "企业id":"企业id",
+  "异常类型":"异常类型",
+  "金额":"金额",
+
+  
+
+  "项目工时": "项目工时" ,
+  "日常工时":"日常工时",
+  "岗位":"岗位",
+  "考勤日期":"考勤日期",
+  "备注":"备注",
+  "日期":"日期",
+  "时间":"时间",
+  "创建":"创建",
+  "商家":"商家",
+  "月份":"月份",
+  "类型":"类型",
+  "确定":"确定",
+  "订单号":"订单号",
+  "类别":"类别",
+  "盘点月份":"盘点月份",
+  "耗材型号":"耗材型号",
+  "商品条码": "商品条码",
+  "商品ID": "商品ID",
+  "商品名称": "商品名称",
+  "设备类型":"设备类型",
+  "使用率":"使用率",
+  "每月使用时间":"每月使用时间",
+  "已使用数量":"已使用数量",
+  "未使用数量":"未使用数量",
+  "满载数量":"满载数量",
+  "投诉日期":"投诉日期",
+  "发货日期":"发货日期",
+  "所属岗位":"所属岗位",
+  "数量":"数量",
+  "型号":"型号",
+
+
+  "修改人":"修改人",
+  "修改日期":"修改日期",
+  "录入人":"录入人",
+  "录入日期":"录入日期",
+
+  
+  "保存":"保存",
+  "取消":"取消",
+  "新增":"新增",
+  "删除":"删除",
+  "查看日志":"查看日志",
+   "编辑":"编辑",
+   "导入":"导入",
+   "导出":"导出",
+   "下载模版":"下载模版",
+   "查询":"查询",
+   "重置":"重置",
+
+
+  "修改密码": "修改密码",
+  "请输入关键词": "请输入关键词",
+  "所有服务": "所有服务",
+  "首页": "首页",
+  "考勤数据": "考勤数据",
+  "运营数据": "运营数据",
+  "质量数据": "质量数据",
+  "小时效率": "小时效率",
+  "盘点数据": "盘点数据",
+  "经营数据": "经营数据",
+  "预算数据": "预算数据",
+  "耗材数据": "耗材数据",
+  "设备数据": "设备数据",
+  "投诉与异常": "投诉与异常",
+  "实物报缺": "实物报缺",
+  "残品": "残品",
+  "QA稽查": "QA稽查",
+  "商品盘点": "商品盘点",
+  "耗材盘点": "耗材盘点",
+  "仓库业务量": "仓库业务量",
+  "货主业务量": "货主业务量",
+  "订单生产进度":"订单生产进度",
+  "小时岗位人数":"小时岗位人数",
+  "收入项":"收入项",
+  "成本项":"成本项",
+  "设备状态":"设备状态",
+  "库位状态":"库位状态",
+  "数据分析":"数据分析",
+  "仓库运营":"仓库运营",
+  "全国运营":"全国运营",
+  "经营分析":"经营分析",
+  "效率报告":"效率报告",
+  "耗材报告":"耗材报告",
+  "商家贡献":"商家贡献",
+  "质量报告":"质量报告",
+  "资源情况":"资源情况",
+  "经营报告":"经营报告"
+}

+ 660 - 0
plg-tms-std-web-vue/public/jq/javascripts/util.js

@@ -0,0 +1,660 @@
+function setConfig(params) {
+  return Object.assign(
+    {},
+    {
+      skin: 'terrace',
+      multiselect: true,
+      // imagePath: "../../prologui/dist/vendors/dhtmlx/grid/skins/web/imgs",
+      type: 'get', //数据提交方式,默认为get
+      params: (function() {
+        return {
+          //  "warehouseId": getLocalStrongSelectedWarehouseIds().toString(),
+          // //  "company_id": Prolog.getLocalStorage('userinfo').p_organizationid,   // 默认值是0
+          //  "deleteFlag": 0
+        }
+      })(), //查询提交参数,分页参数默认为pageNum,pageSize
+      page: true, //是否启用分页
+      totalCount: 'totalCount', //总记录数字段,默认totalCount
+      toolbar: []
+    },
+    params
+  )
+}
+
+Prolog.download = function(url, fileName, hasAuth) {
+  var xhr = new XMLHttpRequest()
+  xhr.open('GET', url, true) //get请求,请求地址,是否异步
+  if (hasAuth) {
+    xhr.setRequestHeader('Authorization', localStorage.getItem('authorization'))
+  }
+  xhr.responseType = 'blob' // 返回类型blo
+
+  xhr.onload = function() {
+    // 请求完成处理函数
+
+    if (this.status === 200) {
+      var blob = this.response // 获取返回值
+      const a = document.getElementById('down')
+      a.href = URL.createObjectURL(blob)
+      a.download = fileName
+      a.click()
+      //   URL.revokeObjectUrl(blob)
+    }
+  }
+  // 发送ajax请求
+  xhr.send()
+}
+
+/*
+elem	指向容器选择器,如:elem: '#id'。也可以是DOM对象	string/object	-
+url	    服务端上传接口,返回的数据规范请详见下文	string	-
+data	请求上传接口的额外参数。如:data: {id: 'xxx'}
+
+headers	接口的请求头。如:headers: {token: 'sasasas'}。注:该参数为 layui 2.2.6 开始新增
+accept	指定允许上传时校验的文件类型,可选值有:images(图片)、file(所有文件)、video(视频)、audio(音频)	string	images
+acceptMime	规定打开文件选择框时,筛选出的文件类型,值为用逗号隔开的 MIME 类型列表。如:
+            acceptMime: 'image/*'(只显示图片文件)
+            acceptMime: 'image/jpg, image/png'(只显示 jpg 和 png 文件)
+            注:该参数为 layui 2.2.6 开始新增	string	images
+exts	允许上传的文件后缀。一般结合 accept 参数类设定。假设 accept 为 file 类型时,那么你设置 exts: 'zip|rar|7z' 即代表只允许上传压缩格式的文件。如果 accept 未设定,那么限制的就是图片的文件格式	string	jpg|png|gif|bmp|jpeg
+auto	是否选完文件后自动上传。如果设定 false,那么需要设置 bindAction 参数来指向一个其它按钮提交上传	boolean	true
+bindAction	指向一个按钮触发上传,一般配合 auto: false 来使用。值为选择器或DOM对象,如:bindAction: '#btn'	string/object	-
+field	设定文件域的字段名	string	file
+size	设置文件最大可允许上传的大小,单位 KB。不支持ie8/9	number	0(即不限制)
+multiple	是否允许多文件上传。设置 true即可开启。不支持ie8/9	boolean	false
+number	设置同时可上传的文件数量,一般配合 multiple 参数出现。注意:该参数为 layui 2.2.3 开始新增	number	0(即不限制)
+drag	是否接受拖拽的文件上传,设置 false 可禁用。不支持ie8/9	boolean	true
+
+回调
+choose	选择文件后的回调函数。返回一个object参数,详见下文	function	-
+before	文件提交上传前的回调。返回一个object参数(同上),详见下文	function	-
+done	执行上传请求后的回调。返回三个参数,分别为:res(服务端响应信息)、index(当前文件的索引)、upload(重新上传的方法,一般在文件上传失败后使用)。详见下文	function	-
+error	执行上传请求出现异常的回调(一般为网络异常、URL 404等)。返回两个参数,分别为:index(当前文件的索引)、upload(重新上传的方法)。详见下文	function	-
+*/
+Prolog.upload = function(opts, hasAuth) {
+  var upload = layui.upload //得到 upload 对象
+  if (hasAuth) {
+    if (opts.headers) opts.headers['Authorization'] = 'Bearer ' + localStorage.getItem('authorization')
+    else opts.headers = { Authorization: 'Bearer ' + localStorage.getItem('authorization') }
+  }
+
+  //创建一个上传组件
+
+  upload.render(opts)
+}
+
+/**
+ *
+ * @param {function} GridPlant hdw个人使用工厂函数
+ */
+
+function GridPlant(obj) {
+  ;(this.isI18n = window.isI18n || false), //多语言默认false
+    // enableSideBar: true,
+
+    (this.idS = '') //
+  this.rowId = ''
+  this.PlgGridInstance = obj.instance
+  this.addBtnUrl = obj.addBtnUrl
+  this.delBtnUrl = obj.delBtnUrl
+  this.downBtnUrl = obj.downBtnUrl
+  this.exportBtnUrl = obj.exportBtnUrl
+  this.importBtnUrl = obj.importBtnUrl
+  this.fileText = obj.fileText || 'fileText' //中文模块名称
+  this.moduleName = obj.moduleName //查日志使用的英文模块名称
+  this.formDataArea = [750, 350]
+  if (obj.instance.opts.formDataArea && obj.instance.opts.formDataArea.length > 0) {
+    this.formDataArea[0] = obj.instance.opts.formDataArea[0] //弹框width
+    this.formDataArea[1] = obj.instance.opts.formDataArea[1] //弹框height
+  }
+  this.t = (function(is) {
+    if (is) {
+      return (this.t = function(text) {
+        return i18next.t(text)
+      })
+    } else {
+      return (this.t = function(text) {
+        return text
+      })
+    }
+  })(this.isI18n)
+
+  this.logBtn = function() {
+    var _this = this
+
+    if (!this.moduleName) {
+      throw new Error('this.moduleName模块名称没定义')
+    }
+    var popUps = function(id, modulesName, contentContainer) {
+      if (!id || !modulesName || !contentContainer) {
+        throw new Error('当前传递的参数缺少值')
+      }
+
+      layer.open({
+        type: 1, //此处以iframe举例
+        title: `<div class="k-log-title">【${_this.t(modulesName)}】${_this.t('修改记录')}</div>`,
+        area: ['470px', '430px'],
+        shade: 0.3,
+        shadeClose: true,
+        offset: 'auto',
+        content: contentContainer
+      })
+    }
+
+    var paramsObj = {
+      systemId: SYSTEMID, // 系统id
+      bussinessKey1: this.moduleName, // 当前模块名
+      bussinessKey2: this.rowId // 当前记录的id
+    }
+    var clearloading = Prolog.loading2()
+    Prolog.syncAjax({
+      url: APIS.ServiceLog.list + '?' + $.param(paramsObj),
+      type: 'get',
+      before: function() {},
+      success: function(res) {
+        if (res.success) {
+          var obj = res.data
+          var contentContainer = ''
+
+          if (obj.length > 0) {
+            obj.forEach(function(val) {
+              contentContainer += `<li class="layui-timeline-item">
+                  <i class="layui-icon layui-timeline-axis">&#xe63f;</i>
+                    <div class="layui-timeline-content layui-text">
+                      <h4 class="layui-timeline-title" id="updateTime">时间:<span class="k-log-createTime">${val.createTime}</span>----操作人: <span class="k-log-UserName">${val.userName}</span></h4>
+                      <p class="k-log-des">
+                        ${val.description}
+                      </p>
+                    </div>
+                  </li>`
+            })
+          } else {
+            contentContainer = `<li class="layui-timeline-item">
+                <i class="layui-icon layui-timeline-axis">&#xe63f;</i>
+                <div class="layui-timeline-content layui-text">
+                  <h4 class="layui-timeline-title">
+                        暂无日志
+                      </h4>
+                </div>
+              </li>
+                `
+          }
+          popUps(_this.rowId, _this.fileText, contentContainer)
+        } else {
+          console.error(res)
+        }
+
+        clearloading()
+      },
+      error: function(res) {
+        console.error(res)
+        clearloading()
+      }
+    })
+  }
+
+  this.addBtn = function() {
+    this.formatForm(0, 'POST', this.t('新增'), this.addBtnUrl)
+  }
+  this.editBtn = function(type = 'PUT') {
+    this.formatForm(1, type, this.t('编辑'), this.addBtnUrl)
+  }
+  this.delBtn = function(type = 'POST', param) {
+    this.formatForm(3, type, this.t('是否删除数据'), this.delBtnUrl, param)
+  }
+  this.selectAllBtn = function() {
+    this.formatForm(4, 'GET', '', this.addBtnUrl)
+  }
+  this.resetBtn = function() {
+    this.formatForm(5, 'GET', '', this.addBtnUrl)
+  }
+  ;(this.exportBtn = function() {
+    Prolog.download(
+      this.exportBtnUrl + '?' + $.param(this.PlgGridInstance.getParams()),
+      this.fileText + new Date().format('yyyy_MM_dd') + '.xls',
+      true
+    )
+  }),
+    (this.downBtn = function() {
+      Prolog.download(this.downBtnUrl, `${this.fileText}.xls`, true)
+    })
+  this.deleteFlag = function(name, vlaue) {
+    this.selectAllBtn()
+  }
+}
+
+GridPlant.prototype.init = function() {
+  var _this = this
+
+  //分页点击d
+
+  _this.PlgGridInstance.PageBarJump(function(obj, first) {
+    _this.chekIds()
+    _this.getRowId()
+  })
+
+  //注册layuiDate日期挂件
+
+  var closeLoad
+  Prolog.upload(
+    {
+      elem: $('#' + _this.PlgGridInstance.getPanelId() + ' .upload'),
+      url: _this.importBtnUrl,
+      accept: 'file', //普通文件
+      exts: 'xls|xlsx',
+      multiple: true,
+      acceptMime: '.xls,.xlsx',
+      before: function() {
+        closeLoad = Prolog.loading2()
+      },
+      done: function(res, index, upload) {
+        if (res.success) {
+          layer.msg(res.message)
+        } else {
+          layer.open({
+            type: 1,
+            shade: false,
+            title: false, //不显示标题
+            content: res.message
+          })
+        }
+        _this.PlgGridInstance.reload()
+        closeLoad()
+      },
+      error: function(index, upload) {
+        closeLoad()
+        upload()
+      }
+    },
+    true
+  )
+
+  setLayuiDate && setLayuiDate(_this.PlgGridInstance.getToolBarForm(), _this.PlgGridInstance.opts.toolbar, 'time')
+  //注册事件
+  //头部工具条按扭事件
+
+  _this.PlgGridInstance.attachToolBarEvent('onchange', function(name, value) {
+    if (name && _this.hasOwnProperty(name)) {
+      _this[name](name, value)
+    }
+    return _this
+  })
+  //如果有右边栏
+  if (_this.PlgGridInstance.opts.enableSideBar) {
+    _this.PlgGridInstance.attachSideBarEvent('onButtonClick', function(name) {
+      if (name && _this.hasOwnProperty(name)) {
+        _this[name]()
+      }
+    })
+  }
+
+  _this.PlgGridInstance.attachToolBarEvent('onButtonClick', function(name) {
+    if (name && _this.hasOwnProperty(name)) {
+      _this[name]()
+    } else if (name == 'plg-more-001') {
+      _this.PlgGridInstance.resetSize()
+    }
+    return _this
+  })
+  _this.PlgGridInstance.attachEvent('onRowSelect', function(id, ind) {
+    _this.getRowId()
+  })
+
+  _this.PlgGridInstance.attachEvent('onCheck', function(rId, cInd) {
+    _this.chekIds()
+  })
+  _this.PlgGridInstance.attachEvent('onRowDblClicked', function(rId) {
+    if (_this.PlgGridInstance.getSelectedRowData().deleteFlag === 1) {
+      _this.logBtn()
+    } else {
+      _this.editBtn()
+    }
+  })
+  _this.PlgGridInstance.attachEvent('onHeaderClick', function(ind, obj) {
+    if (ind === 1) {
+      _this.chekIds()
+    }
+    return _this
+  })
+  return _this
+}
+
+GridPlant.prototype.beforeRender = function(callback) {
+  if (typeof callback == 'function') {
+    this.beforeRender = callback
+    this.beforeRender()
+    return this
+  }
+}
+//使用layui的data
+function setLayuiDate(GridForm, arr, portName, typeValue) {
+  if (!typeValue) typeValue = 'input'
+  arr.forEach(function(item, index) {
+    if (item.type == typeValue && item.name == portName) {
+      var f = item.dateFormat || 'yyyy/MM/dd',
+        t = item.dateType || 'date'
+
+      GridForm.getInput(portName).setAttribute('readonly', true)
+
+      layui.laydate.render({
+        elem: GridForm.getInput(portName),
+        type: t,
+        lang: i18next.language,
+        format: f,
+        value: item.value,
+        // theme: '#0959a7',
+        //showBottom: false,
+        change: function(value, date, endDate) {
+          $('.layui-laydate-content')
+            .off()
+            .on('click', 'li', function() {
+              value.substring(0, 19)
+              value.replace(/-/g, '/')
+              GridForm.setItemValue(portName, value ? value : '')
+              $('.layui-laydate').remove() //删除
+            })
+        },
+        done: function(value, date, endDate) {
+          value.substring(0, 19)
+          value.replace(/-/g, '/')
+          GridForm.setItemValue(portName, value ? value : '')
+        }
+      })
+      return false
+    } else {
+      if (item.list && item.list.length > 0) {
+        setLayuiDate(GridForm, item.list, portName)
+      }
+      return false
+    }
+  })
+}
+GridPlant.prototype.formatForm = function(
+  num,
+  type,
+  title,
+  protUrl,
+  param = {
+    id: this.idS
+  }
+) {
+  var _this = this
+  //num=0 add num=1 edit num=3 del num=4 搜索 reset=5重制
+  if (num === 3) {
+    //del
+
+    layer.confirm(
+      title,
+      {
+        title: _this.t('提示'),
+        btn: [_this.t('确定'), _this.t('取消')] //按钮
+      },
+      function(index) {
+        var close = PlgDialog.loading2()
+        Prolog.ajax({
+          url: protUrl,
+          type: type,
+          data: param,
+          dataType: 'json',
+          success: function(data) {
+            if (data.success) {
+              _this.PlgGridInstance.reload()
+              _this.chekIds()
+            }
+            layer.msg(_this.t(data.message))
+            close()
+            layer.close(index)
+            _this.delBtnAfter()
+          },
+          error: function() {
+            close()
+          }
+        })
+      },
+      function() {
+        close()
+      }
+    )
+    return
+  } else if (num === 4) {
+    //搜索
+    // var WarehouseIds=getLocalStrongSelectedWarehouseIds();
+    // getLocalStrongSelectedWarehouseIds()&& this.PlgGridInstance.getToolBarForm().setItemValue("warehouseId", WarehouseIds.toString())
+    var fdata = this.PlgGridInstance.getToolBarForm().getFormData()
+
+    if (fdata.startTime && fdata.endTime) {
+      if (fdata.endTime.valueOf() - fdata.startTime.valueOf() < 0) {
+        PlgDialog.msg('结束时间不得早于开始时间,请重新选择')
+        this.PlgGridInstance.getToolBarForm()
+          .getInput('startTime')
+          .select()
+
+        return false
+      }
+    }
+
+    if (fdata['time']) {
+      fdata['time'] = new Date(fdata['time'])
+    }
+
+    var obj = {}
+    for (key in fdata) {
+      if (fdata[key]) {
+        obj[key] = fdata[key]
+      }
+    }
+
+    this.selectAllBtnAfter(obj)
+
+    var getToolBarForm = this.PlgGridInstance.getToolBarForm().getDForm()
+    // //如果是无效数据就把chark隐藏
+    // if (obj.deleteFlag && obj.deleteFlag === 1) {
+    //   this.PlgGridInstance.setColumnHidden(1, true);
+    //   getToolBarForm.hideItem("downBtn")
+    //   getToolBarForm.hideItem("exportBtn")
+    //   getToolBarForm.hideItem("exportBtn")
+    //   getToolBarForm.hideItem("addBtn")
+    //   getToolBarForm.hideItem("importBtn");
+    //   getToolBarForm.hideItem("editBtn");
+    //   getToolBarForm.hideItem("delBtn");
+
+    // } else {
+    //   obj.deleteFlag = 0;
+    //   this.PlgGridInstance.setColumnHidden(1, false);
+    //   getToolBarForm.showItem("downBtn")
+    //   getToolBarForm.showItem("exportBtn")
+    //   getToolBarForm.showItem("exportBtn")
+    //   getToolBarForm.showItem("addBtn")
+    //   getToolBarForm.showItem("importBtn");
+    //   getToolBarForm.showItem("editBtn");
+    //   getToolBarForm.showItem("delBtn");
+
+    // }
+
+    this.PlgGridInstance.setParams(obj)
+    this.PlgGridInstance.reload()
+    this.getRowId()
+    this.chekIds()
+    return
+  } else if (num === 5) {
+    var dform = this.PlgGridInstance.getToolBarForm()
+
+    if (_this.PlgGridInstance.opts.enableSideBar) dform = this.PlgGridInstance.getSideBarForm()
+
+    dform.clear()
+    dform.getDForm().checkItem('deleteFlag', 0)
+    dform.setItemValue('warehouseId', getLocalStrongSelectedWarehouseIds())
+
+    return
+  }
+
+  _this.PlgGridInstance.showDialog(num, title, _this.formDataArea[0], _this.formDataArea[1], {
+    url: protUrl,
+    type: type,
+    saveAfter: function(gridForm, data) {
+      if (data.time && typeof data.time === 'string') {
+        data.time = new Date(data.time)
+      }
+      if (data.id == '') {
+        data.id = 0
+      }
+      if (data.warehouseName == '') {
+        data.warehouseName = WAREHOUSE_CATEGORY.length > 0 && WAREHOUSE_CATEGORY[0].text
+      }
+      if(num==0){
+        if(data.authorizedGrantTypes && data.authorizedGrantTypes.length>0){
+          data.authorizedGrantTypes = data.authorizedGrantTypes.join(",");
+        }else{
+          data.authorizedGrantTypes = 'client_credentials';
+        }
+        
+      }
+      _this.showDialogSaveBtn(gridForm, data)
+
+      return data
+    },
+    resetAfter: _this.showDialogResetBtn
+  })
+  //新增或修改弹出时的From表单
+  var GridForm = _this.PlgGridInstance.getGridForm()
+
+  setLayuiDate && setLayuiDate(GridForm, _this.PlgGridInstance.opts.formData, 'time')
+
+  _this.showDialogAfter && _this.showDialogAfter(GridForm)
+
+  if (num === 1 && type == 'PUT') {
+    _this.editBtnAfter && _this.editBtnAfter(GridForm)
+  }
+
+  GridForm.attachEvent('onchange', function(name, value, state) {
+    if (name == 'warehouseId') {
+      var opt = Array.prototype.slice.call(GridForm.getSelect('warehouseId').children).filter(function(item) {
+        return value == item.value
+      })
+      GridForm.setItemValue('warehouseName', opt[0].text)
+    } else if (name == 'typeId') {
+      var opt = Array.prototype.slice.call(GridForm.getSelect('typeId').children).filter(function(item) {
+        return value == item.value
+      })
+      GridForm.setItemValue('type', opt[0].text)
+    }
+    _this.formOnChange && _this.formOnChange(name, value, GridForm)
+
+    return
+  })
+  return
+}
+GridPlant.prototype.showDialogAfter = function(callback) {
+  if (typeof callback === 'function') {
+    return (this.showDialogAfter = callback)
+  }
+}
+;(GridPlant.prototype.showDialogSaveBtn = function(callback) {
+  if (typeof callback === 'function') {
+    return (this.showDialogSaveBtn = callback)
+  } else {
+    return null
+  }
+}),
+  (GridPlant.prototype.selectAllBtnAfter = function(callback) {
+    if (typeof callback === 'function') {
+      return (this.selectAllBtnAfter = callback)
+    } else {
+      return null
+    }
+  }),
+  (GridPlant.prototype.editBtnAfter = function(callback) {
+    if (typeof callback === 'function') {
+      return (this.editBtnAfter = callback)
+    }
+  })
+
+GridPlant.prototype.delBtnAfter = function(callback) {
+  if (typeof callback === 'function') {
+    return (this.delBtnAfter = callback)
+  } else {
+    return null
+  }
+}
+
+GridPlant.prototype.showDialogResetBtn = function(callback) {
+  if (typeof callback === 'function') {
+    this.showDialogResetBtn = callback
+    return this
+  }
+}
+GridPlant.prototype.formOnChange = function(callback) {
+  if (typeof callback === 'function') {
+    return (this.formOnChange = callback)
+  }
+}
+GridPlant.prototype.getRowId = function() {
+  this.rowId = this.PlgGridInstance.getSelectedRowId()
+  if (this.rowId && this.rowId.indexOf(',') == -1) {
+    this.PlgGridInstance.getToolBarForm().enableItem('logBtn')
+    //如果是无效数据就禁用编辑按钮
+    if (this.PlgGridInstance.getSelectedRowData().deleteFlag !== 1) {
+      this.PlgGridInstance.getToolBarForm().enableItem('editBtn')
+    }
+  } else {
+    this.PlgGridInstance.getToolBarForm().disableItem('logBtn')
+    this.PlgGridInstance.getToolBarForm().disableItem('editBtn')
+  }
+
+  return this
+}
+
+GridPlant.prototype.chekIds = function() {
+  this.idS = this.PlgGridInstance.getCheckedIds()
+  if (this.idS) {
+    this.PlgGridInstance.getToolBarForm().enableItem('delBtn')
+  } else {
+    this.PlgGridInstance.getToolBarForm().disableItem('delBtn')
+  }
+
+  return this
+}
+
+// 获取版本号
+function getVersion() {
+  var version
+  if (!version) {
+    $.ajaxSettings.async = false
+    $.get('/ops/getVersion', function(res) {
+      version = res.version
+    })
+    $.ajaxSettings.async = true
+  }
+
+  return version
+}
+
+//表格圖片配置
+;(Prolog.GridImageBasePath = './prologui/dist/images/PlgGrid/'),
+  (Prolog.reloadToken = function() {
+    Prolog.token = 'Bearer ' + localStorage.getItem('authorization')
+  }),
+  /**
+   * 判断是否已登录(支持携带access_token和expir登录)
+   */
+  (Prolog.isLogined = function() {
+    var tk = null
+    var exp = null
+    var P_GET = Prolog.getRequestParams()
+    if (P_GET['access_token'] && P_GET['expir']) {
+      tk = P_GET['access_token']
+      exp = P_GET['expir']
+      localStorage.setItem('authorization', tk)
+      localStorage.setItem('token_expir', exp)
+    } else {
+      tk = 'Bearer ' + localStorage.getItem('authorization')
+      exp = localStorage.getItem('token_expir')
+    }
+    if (tk != null && tk != '' && exp != null && exp != '') {
+      var expir = parseInt(exp)
+      var b = new Date().getTime() > expir ? false : true
+      return b
+    } else {
+      return false
+    }
+  })

+ 99 - 0
plg-tms-std-web-vue/public/jq/main.html

@@ -0,0 +1,99 @@
+<!DOCTYPE html>
+<html lang="en" id="plg_app">
+<head>
+  <meta charset="UTF-8">
+  <!--     <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ -->
+  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
+
+  <meta http-equiv="X-UA-Compatible" content="ie=edge">
+  <title>菠菜云运维管理平台</title>
+
+  <link rel="stylesheet" href="./prologui/dist/vendors/layui-master/dist/css/layui.rem.css" />
+  <link rel="stylesheet" href="./prologui/dist/css/prolog.all-0.0.1.css" />
+  <!-- 页面上使用css文件 -->
+  <link rel="stylesheet" href="./styles/dist_css/style.css" />
+  <link rel="stylesheet" type="text/css" href="//at.alicdn.com/t/font_799562_g9fbb4vlkl4.css" />
+
+
+  <script src="./prologui/dist/vendors/jquery/jquery-3.3.1.min.js"></script>
+  <script src="./prologui/dist/vendors/echarts/dist/echarts.js"></script>
+  <script src="./prologui/dist/vendors/layui-master/dist/layui.all.js"></script>
+
+
+  <script src="./prologui/dist/vendors/vipspa-master/build/vipspa.js"></script>
+  <script src="./prologui/dist/vendors/dhtmlx/grid/codebase/dhtmlxgrid.js"></script>
+  <script src="./prologui/dist/vendors/dhtmlx/form/codebase/dhtmlxform.js"></script>
+  <script src="./prologui/dist/vendors/zTree_v3/js/jquery.ztree.core.min.js"></script>
+  <script src="./prologui/dist/js/prolog.min-0.0.1.js"></script>
+  <script src="./javascripts/api/index.js"></script>
+  <script src="./javascripts/util.js"></script>
+  <!-- <script src="./javascripts/adminPlant.js"></script> -->
+  <!-- 国际化插件 -->
+  <script src="./prologui/dist/vendors/jquery-i18next/lib/i18next.min.js"></script>
+  <script src="./prologui/dist/vendors/jquery-i18next/lib/i18nextXHRBackend.js"></script>
+  <script src="./prologui/dist/vendors/jquery-i18next/lib/i18nextBrowserLanguageDetector.js"></script>
+  <script src="./prologui/dist/vendors/jquery-i18next/lib/jquery-i18next.min.js"></script>
+  <script src="./javascripts/language/index.js"></script>
+  <script>
+  window.global_fun={}
+  function GetQueryString(param) { //param为要获取的参数名 注:获取不到是为null
+            var currentUrl = window.location.href; //获取当前链接
+            var arr = currentUrl.split("?");//分割域名和参数界限
+            if (arr.length > 1) {
+                arr = arr[1].split("&")//分割参数
+                arr = arr[0].split("=")//分割参数
+                return localStorage.setItem('authorization',arr[1]);
+
+
+            }
+            else {
+                return null;
+            }
+        };
+  var elem=null
+
+    function hashChange(){
+      var path = window.location.hash;
+    if(path){
+      path='../jq/'+path.substring(1);
+      $.ajax({
+        url:path,
+        type:'GET',
+        dataType:'html',
+        data:{},
+        success:function(data){
+          //  console.log(GetQueryString())
+           $("body").append(data);
+        }
+      });
+    }
+    }
+    GetQueryString()
+
+  window.onload=function(){
+     hashChange()
+  }
+
+
+  </script>
+  <style>
+    body{
+      padding:0px;
+      background:rgb(240, 242, 245);
+    }
+    .plg-tab-container{padding: 0px;}
+  </style>
+</head>
+
+<body class="layui-layout-admin">
+</body>
+<script>
+
+
+
+
+</script>
+
+
+</html>

+ 260 - 0
plg-tms-std-web-vue/public/jq/pages/authorization/authUser.html

@@ -0,0 +1,260 @@
+<div id="authUser" class="plg-tab-container">
+  <div id="authUser-grid-1" class="grid-container-full"></div>
+</div>
+<script type="text/javascript">
+  (function () {
+    // cSpell:ignore layui api authmgr augrid microservice multiselect newcolumn prologui fdata cindex layero
+    var BASE_URL = '/api/service-authorization/';
+
+    var opts = {
+      skin: "terrace",
+      columns: [{
+          id: "id",
+          name: "id",
+          type: 'txt',
+          width: "50",
+          hidden: true
+        },
+        {
+          id: "clientId",
+          name: "客户端",
+          type: 'txt',
+          width: "200"
+        },
+        // {
+        //   id: "clientSecret",
+        //   name: "密码",
+        //   type: 'txt',
+        //   width: "200"
+        // },
+        {
+          id: "resourceIds",
+          name: "资源",
+          type: 'txt',
+          width: "*"
+        }
+      ],
+      multiselect: true,
+      toolbar: [{
+          type: "button",
+          name: "deleteBtn",
+          className: "danger plg-toolbar-right",
+          value: "<i class='layui-icon layui-icon-delete'></i>删除"
+        }, {
+          type: "newcolumn"
+        },
+        {
+          type: "button",
+          name: "updateBtn",
+          className: "normal plg-toolbar-right",
+          value: "<i class='layui-icon layui-icon-edit'></i>修改"
+        }, {
+          type: "newcolumn"
+        },
+        {
+          type: "button",
+          name: "addBtn",
+          className: "plg-toolbar-right",
+          value: "<i class='layui-icon layui-icon-add-1'></i>添加"
+        }, {
+          type: "newcolumn"
+        },
+        {
+          type: "input",
+          name: 'clientId',
+          label: '客户端:',
+          width:300,
+          placeholder:"请输入客户端名称"
+        },
+        /*{
+          type: "newcolumn"
+        },
+        {
+          type: "input",
+          name: "authorities",
+          label: "权限:",
+          offsetLeft: 10
+        },*/
+        {
+          type: "newcolumn"
+        },
+        {
+          type: "button",
+          name: "searchBtn",
+          className: "",
+          value: "查询"
+        },
+        {
+          type: "newcolumn"
+        },
+        {
+          type: "button",
+          name: "all",
+          className: "normal",
+          value: "所有"
+        },
+        {
+          type: "newcolumn"
+        }
+      ],
+      formData: [{
+          type: "settings",
+          inputWidth: 280,
+          width: 400,
+          labelWidth: 100,
+          position: "label-left",
+          labelAlign: "left"
+        },
+        {
+          type: "hidden",
+          name: 'id'
+        },
+        {
+          type: "input",
+          name: 'clientId',
+          label: '客户端',
+          required:true,
+          validate:"NotEmpty",
+          placeholder:"请输入客户端名称"
+        },
+        {
+          type: "password",
+          name: "clientSecret",
+          label: "密码",
+          required:true,
+          validate:"NotEmpty",
+          placeholder:"请输入密码"
+        },
+        {
+          type: "hidden",
+          name: "authorizedGrantTypes",
+          label: "授权类型",
+          value:''
+        },
+        {
+          type: "input",
+          name: "scopes",
+          label: "作用域",
+          placeholder:"请输入作用域",
+          value: 'all'
+        },
+        {
+          type: "input",
+          name: "resourceIds",
+          label: "资源(使用','分割)",
+          rows: 3,
+          value:'',
+          note: {text:"可为空"}
+        },
+        {
+          type: "hidden",
+          name: "authorities",
+          value:'',
+          label: "权限(格式:服务名:权限编号,使用','分割)",
+          rows: 3
+        },
+        {
+          type: "hidden",
+          name: "authorityGroups",
+          value:'',
+          label: "权限组(资源组名称,使用','分割)",
+          rows: 3
+        },
+      ],
+      url: BASE_URL + 'authmgr/like', //数据接口
+      type: "get", //数据提交方式,默认为get
+      params: {}, //查询提交参数,分页参数默认为pageNum,pageSize
+      page: true, //是否启用分页
+      pageNum: "pageNo",
+      totalCount: "totalCount" //总记录数字段,默认totalCount
+    };
+
+
+    var augrid = new PlgGrid(opts);
+    augrid.renderTo("authUser-grid-1");
+    augrid.loadData();
+
+
+    // 被迫使用这种无赖的选择,万恶的使用js操作DOM
+    // //console.log("$('#form_container .dhxform_base_nested')::" + $('#form_container .dhxform_base_nested'));
+    // $('#form_container .cus-class').append($('#form_container .dhxform_base_nested'));
+    // $('#form_container .cus-class').find('.topmost').eq(0).css({float: 'left'});
+    // $('#form_container .dhxform_base_nested').css({display: 'inline-block'});
+
+
+    augrid.attachToolBarEvent("onButtonClick", function (name) {
+
+      var operationGroup = {
+        searchBtn: function () {
+
+          var fdata = augrid.getToolBarForm().getFormData();
+          augrid.setParams(fdata);
+          augrid.reload();
+
+        },
+        all: function () {
+          
+          augrid.setParams({});
+          augrid.reload();
+
+        },
+        addBtn: function () {
+
+          augrid.showDialog(0, "添加", 800, 600, {
+
+            url: BASE_URL + 'authmgr/add',
+            type: "post"
+
+          });
+        },
+        updateBtn: function () {
+
+          augrid.showDialog(1, "编辑", 430, 350, {
+            url: BASE_URL + 'authmgr/update',
+            type: "post"
+          });
+        },
+        deleteBtn: function () {
+          var ids = augrid.getCheckedIds();
+
+          ids = (ids == null || ids == "") ? augrid.getSelectedRowData("id") : ids;
+
+          // debugger;
+          if (ids == null) {
+            PlgDialog.msg("请选择行!");
+            return;
+          }
+          var loading = layer.load(0, {
+            shade: false
+          }); //0代表加载的风格,支持0-2
+
+          Prolog.ajax({
+            url: BASE_URL + 'authmgr/delete',
+            type: 'POST',
+            data: {id: ids},
+            dataType: 'json',
+            success: function (data) {
+              layer.close(loading);
+              if (data.success) {
+                augrid.reload();
+              } else {
+                layer.msg(data.message);
+              }
+            }
+          });
+
+        },
+
+      }
+
+      if(name && operationGroup.hasOwnProperty(name)){
+        operationGroup[name]();
+      } 
+
+    });
+
+  }())
+
+  
+
+</script>

+ 689 - 0
plg-tms-std-web-vue/public/jq/pages/authorization/authorization.html

@@ -0,0 +1,689 @@
+<div id="authorization" class="plg-tab-container">
+  <div class="layui-carousel" id="authorization-carousel1">
+    <div carousel-item>
+      <div id="authorization-grid-1" style="min-height:500px;"></div>
+
+      <div style="min-height:500px;">
+        <blockquote class="layui-elem-quote layui-text plg-elem-quote" style="background:#fff;">
+          给客户端<span id="clientId" class="plg-mark"></span>授权<a href="javascript:void(0)" style="margin-left: 15px;" id="authorization_cancel">关闭</a>
+        </blockquote>
+        <blockquote class="layui-elem-quote layui-text plg-elem-quote plg-authorization-style" style="background:#fff;">
+          <div class="layui-form-item" style="margin-bottom: 0px;">
+            <label class="layui-form-label" style="width:60px;padding:9px 0px;">授权类型</label>
+            
+              <!-- <div class="layui-form plg-authorization-list"> -->
+              <form class="layui-form layui-input-block" id="plg-authorization-list" lay-filter="authorization" style="margin-left: 80px">
+                <div class="layui-input-block layui-form">
+                  <input type="checkbox" name="client_credentials" lay-skin="primary" title="客户端模式">
+                  <div data-id="0406eec9-4c7c-4655-99ae-79d9d7813d3a" data-name="client_credentials" class="layui-unselect layui-form-checkbox layui-form-checked" lay-skin="primary"><span>客户端模式</span><i class="layui-icon layui-icon-ok"></i></div>
+                
+                  <input type="checkbox" name="password" lay-skin="primary" title="密码模式" >
+                  <div data-id="0406eec9-4c7c-4655-99ae-79d9d7813d3a" data-name="password" class="layui-unselect layui-form-checkbox " lay-skin="primary"><span>密码模式</span><i class="layui-icon layui-icon-ok"></i></div>
+                
+                  <input type="checkbox" name="authorization_code" lay-skin="primary" title="授权码模式" >
+                  <div data-id="0406eec9-4c7c-4655-99ae-79d9d7813d3a" data-name="authorization_code" class="layui-unselect layui-form-checkbox " lay-skin="primary"><span>授权码模式</span><i class="layui-icon layui-icon-ok"></i></div>
+                
+                  <input type="checkbox" name="implicit" lay-skin="primary" title="授权码简化模式" >
+                  <div data-id="0406eec9-4c7c-4655-99ae-79d9d7813d3a" data-name="implicit" class="layui-unselect layui-form-checkbox layui-form-checked" lay-skin="primary"><span>授权码简化模式</span><i class="layui-icon layui-icon-ok"></i></div>
+                
+                </div>
+              </form>
+            
+          </div>
+        </blockquote>
+
+        <div class="layui-row layui-col-space5" id="plg-main-zone">
+          <div class="layui-col-xs6">
+            <div class="layui-card">
+              <div class="layui-card-header">权限组</div>
+              <div class="layui-card-body" style="height:500px;">
+                <div id="plg-authorization-group" class="layui-form"></div>
+              </div>
+            </div>
+          </div>
+          <div class="layui-col-xs6">
+            <div class="layui-card">
+              <div class="layui-card-header">权限</div>
+              <div class="layui-card-body" style="height:500px;">
+                <div id="plg-authorization" class="layui-form"></div>
+              </div>
+            </div>
+          </div>
+        </div>
+
+      </div>
+    </div>
+  </div>
+</div>
+
+<script type="text/javascript">
+  (function () {
+    // cSpell:ignore layui api authmgr augrid microservice multiselect newcolumn prologui fdata cindex layero
+    var BASE_URL = '/api/service-authorization/';
+    var form = layui.form;
+
+    var opts = {
+      columns: [{
+          id: "id",
+          name: "id",
+          type: 'txt',
+          width: "50",
+          hidden: true
+        },
+        {
+          id:"op",
+          name:"操作",
+          type:"button",
+          width:"80",
+          align:"center",
+          render:function(){return "授权^authorization_grant";}
+        },
+        {
+          id: "clientId",
+          name: "客户端",
+          type: 'txt',
+          width: "150"
+        },
+        {
+          id: "clientSecret",
+          name: "密码",
+          type: 'txt',
+          width: "150"
+        },
+
+        {
+          id: "authorizedGrantTypes",
+          name: "授权类型",
+          type: 'txt',
+          width: "100"
+        },
+        {
+          id: "scopes",
+          name: "作用域",
+          type: 'txt',
+          align:'center',
+          width: "120"
+        },
+        {
+          id: "resourceIds",
+          name: "资源",
+          type: 'txt',
+          width: "*"
+        },
+        {
+          id: "authorities",
+          name: "权限",
+          type: 'txt',
+          hidden: true
+        },
+        {
+          id: "authorityGroups",
+          name: "权限组",
+          type: 'txt',
+          hidden: true
+        }
+      ],
+      multiselect: false,
+      toolbar: [ {
+          type: "newcolumn"
+        },
+        {
+          type: "input",
+          name: 'clientId',
+          label: '客户端:',
+          width: 300,
+          placeholder: '请输入客户端名称'
+        },
+        {
+          type: "newcolumn"
+        },
+        {
+          type: "input",
+          name: "authorities",
+          label: "权限:",
+          width: 300,
+          placeholder: '请输入权限名称',
+          offsetLeft: 10
+        },
+        {
+          type: "newcolumn"
+        },
+        {
+          type: "button",
+          name: "searchBtn",
+          className: "",
+          value: "查询"
+        },
+        {
+          type: "newcolumn"
+        },
+        {
+          type: "button",
+          name: "all",
+          className: "normal",
+          value: "所有"
+        },
+        {
+          type: "newcolumn"
+        }
+      ],
+      imagePath: "../../prologui/assets/PlgGrid",
+      url: BASE_URL + 'authmgr/like', //数据接口
+      type: "get", //数据提交方式,默认为get
+      params: {}, //查询提交参数,分页参数默认为pageNum,pageSize
+      page: true, //是否启用分页
+      pageNum: "pageNo",
+      totalCount: "totalCount" //总记录数字段,默认totalCount
+    };
+
+
+    var augrid = new PlgGrid(opts);
+    augrid.renderTo("authorization-grid-1");
+    augrid.loadData();
+
+    var carousel = layui.carousel;
+    var car = carousel.render({
+      elem: '#authorization-carousel1',
+      autoplay: false,
+      index: 0,
+      arrow: 'none',
+      indicator: 'none',
+      anim: "updown",
+      width: '100%', //设置容器宽度
+      height: '100%'
+    });
+    // 用户点击授权中的
+    var tt = "add";
+
+    function changePanel() {
+      car.slide(tt);
+      tt = tt == "sub" ? "add" : "sub";
+    }
+
+    $("#authorization-carousel1").on("click", "#authorization_cancel", function () {
+      // 点击关闭的时候需要重新刷新页面,在其他页面可能有操作,数据变动了
+      augrid.reload();
+      changePanel()
+    });
+
+
+    var operationGroup = {
+        searchBtn: function () {
+
+          var fdata = augrid.getToolBarForm().getFormData();
+          augrid.setParams(fdata);
+          augrid.reload();
+
+        },
+        all: function () {
+          augrid.getToolBarForm().clear();
+          augrid.setParams({});
+          augrid.reload();
+
+        },
+        grant: function (id,currentData) {
+          // //console.log('授权之前要先选定信息');
+          authorizationInit(currentData);
+          authorizationTypeInit(currentData)
+          form.render();
+          changePanel(); // 切换
+        }
+
+      };
+
+    augrid.attachToolBarEvent("onButtonClick", function (name) {
+      if (name && operationGroup.hasOwnProperty(name)) {
+        operationGroup[name]();
+      }
+    });
+
+    window.authorization_grant = operationGroup["grant"];
+    /*
+      给用户授权初始化信息, 主要是渲染【权限组】【权限】的两个模块
+    */
+    function authorizationInit(data) {
+      //console.log('进入到页面的初始化中来.....');
+      var groupConfig = {
+        //title:"资源管理",
+        columns: [{
+            id: "id",
+            name: "id",
+            type: 'ro',
+            width: "50",
+            hidden: true
+          },
+          {
+            id: "op",
+            name: "操作",
+            align:"center",
+            width: "80",
+            type: "ro",
+            render: function (v, record) {
+              var checked = data["authorityGroups"].indexOf(record["name"]) > -1 ? 'checked=""' : '';
+              return '<input type="checkbox" lay-filter="operatingAuthorizationGroup" ' + checked + ' value="' + record["name"] + '" lay-skin="switch" lay-text="ON|OFF">';
+            
+            }
+          },
+          {
+            id: "name",
+            name: "权限组名称",
+            type: 'ed',
+            width: "120"
+          },
+          {
+            id: "description",
+            name: "备注",
+            type: 'ed',
+            width: "250"
+          }
+         
+        ],
+        multiselect: false,
+        toolbar: [{
+            type: "settings",
+            labelAlign: 'left',
+            labelWidth: 65
+          },
+          {
+            type: "block",
+            id: "bk",
+            blockOffset: 0,
+            list: [
+              {
+                type: "input",
+                name: "name",
+                label: "权限组名称:",
+                offsetLeft: 10,
+                placeholder: '请输入权限组名称',
+                width: 200
+              }, {
+                type: "newcolumn"
+              },
+              {
+                type: "button",
+                name: "searchBtn",
+                value: "查询"
+              }, {
+                type: "newcolumn"
+              }
+            ]
+          }
+        ],
+        imagePath: "../../prologui/assets/PlgGrid",
+        url: "/api/service-authorization/service-resource/resourcegroup", //数据接口
+        type: "GET", //数据提交方式,默认为get
+        //filters:["#text_filter", "#select_filter","#numeric_filter","#text_filter","#text_filter"],
+        pagebar: {
+          type: 'full' //full simple
+        },
+        params: {
+          pageSize: 20,
+          pageNum: 1
+        }, //查询提交参数,分页参数默认为pageNum,pageSize
+        page: true, //是否启用分页
+        pageNum: "pageNum", //设置分页参数页码key值,默认为pageNum
+        totalCount: "totalCount" //总记录数字段,默认totalCount
+      };
+
+      var augridGroup = new PlgGrid(groupConfig);
+      augridGroup.renderTo("plg-authorization-group");
+      augridGroup.loadData(null, function(){
+            form.render();
+      });
+      
+      /*
+        操作权限
+      */
+      form.on('switch(operatingAuthorizationGroup)', function(data){
+        // //console.log('进入操作权限组的阶段');
+        // //console.log('op ....');
+        // //console.log(data);
+        // //console.log('op ....');
+
+
+        var sid = augrid.getSelectedRowId();   // 此处的【id】应该是当前用户的选择进来的id
+        // 进入【添加权限】的阶段
+        if(data.elem.checked){
+          var loading = Prolog.loading2();
+          Prolog.ajax({
+            url: BASE_URL + 'authmgr/authoritygroup/' + sid,
+            type: "POST",
+            data: {"authorityGroup": data.value},
+            success:function(da){
+              loading();
+              if(!da.success){
+                PlgDialog.alert("操作失败,"+da.message);
+              } else {
+                // data.elem.checked = false;
+              }
+            },
+            error:function(){
+              // data.elem.checked = false;
+              loading();
+            }
+          });
+        }
+        // 进入【删除权限组】的阶段
+        if(!data.elem.checked){
+          var loading = Prolog.loading2();
+          Prolog.ajax({
+            url: BASE_URL + 'authmgr/authoritygroup/' + sid,
+            type: "POST",
+            data: {"authorityGroup": data.value, _method: 'delete' },
+            success:function(da){
+              loading();
+              if(!da.success){
+                PlgDialog.alert("操作失败,"+da.message);
+              } else {
+              }
+            },
+            error:function(){
+              loading();
+            }
+          });
+        }
+
+      }); 
+
+      augridGroup.attachToolBarEvent("onButtonClick", function (name) {
+        if (name == "searchBtn") {
+          var fdata = augridGroup.getToolBarForm().getFormData();
+          augridGroup.setParams(fdata);
+          augridGroup.reload();
+        }
+      });
+
+      var cellConfig = {
+        //title:"资源管理",
+        columns: [{
+            id: "id",
+            name: "id",
+            type: 'ro',
+            width: "50",
+            hidden: true
+          },
+          {
+            id: "op",
+            name: "操作",
+            width: "80",
+            align:"center",
+            type: "ro",
+            render: function (v, record) {
+              var checked = '';
+              if(data["authorities"]){
+                  var checked = data["authorities"].indexOf(record["serviceName"] + ":" + record["authNumber"]) >
+                  -1 ? 'checked=""' : '';
+                }
+                return '<input type="checkbox" lay-filter="operatingAuthorization" ' + checked + ' value="' + (record["serviceName"] +
+                  ":" + record["authNumber"]) + '" lay-skin="switch" lay-text="ON|OFF">';
+              }
+          },
+          {
+            id: "serviceName",
+            name: "服务名",
+            type: 'ed',
+            width: "120"
+          },
+          {
+            id: "authNumber",
+            name: "权限编号",
+            type: 'ed',
+            width: "100"
+          },
+          {
+            id: "notes",
+            name: "备注",
+            type: 'ed',
+            width: "200"
+          }
+          
+        ],
+        multiselect: false,
+        toolbar: [{
+            type: "settings",
+            labelAlign: 'left',
+            labelWidth: 65
+          },
+          {
+            type: "block",
+            id: "bk",
+            blockOffset: 0,
+            list: [
+              {
+                type: "input",
+                name: "serviceName",
+                label: "服务名:",
+                offsetLeft: 10,
+                placeholder: '服务名',
+                width: 200
+              }, {
+                type: "newcolumn"
+              },{
+                type: "input",
+                name: "authNumber",
+                label: "权限编号:",
+                offsetLeft: 10,
+                placeholder: '请输入权限编号',
+                width: 200
+              }, {
+                type: "newcolumn"
+              },
+              {
+                type: "button",
+                name: "searchBtn",
+                value: "查询"
+              }, {
+                type: "newcolumn"
+              }
+            ]
+          }
+        ],
+        imagePath: "../../prologui/assets/PlgGrid",
+        url: "/api/service-resource/resource", //数据接口
+        type: "get", //数据提交方式,默认为get
+        pagebar: {
+          type: 'full' //full simple min
+        },
+        params: {
+          pageSize: 10,
+          pageNo: 1
+        }, //查询提交参数,分页参数默认为pageNum,pageSize
+        page: true, //是否启用分页
+        pageNum: "pageNo", //设置分页参数页码key值,默认为pageNum
+        totalCount: "totalCount" //总记录数字段,默认totalCount
+      };
+      
+      var augridCell = new PlgGrid(cellConfig);
+      augridCell.renderTo("plg-authorization");
+      augridCell.loadData(null, function(){
+        form.render();
+      });
+
+      augridCell.attachToolBarEvent("onButtonClick", function (name) {
+        if (name == "searchBtn") {
+          var fdata = augridCell.getToolBarForm().getFormData();
+          augridCell.setParams(fdata);
+          augridCell.reload();
+        }
+      });  
+
+
+
+      /*
+        操作权限
+      */
+      form.on('switch(operatingAuthorization)', function(data){
+        // //console.log('进入添加权限操作');
+        // //console.log('op ....');
+        // //console.log(data);
+        // //console.log(data.value);
+        // //console.log('op ....');
+
+        // 此处获取的id应该是当前选中的id进来的
+        var sid = augrid.getSelectedRowId();  
+        // //console.log('sid::' + sid);
+        // //console.log('data.elem.checked::' + data.elem.checked);
+        // 进入【添加权限】的阶段
+        if(data.elem.checked){
+          var loading = Prolog.loading2();
+          Prolog.ajax({
+            url: BASE_URL + '/authmgr/authority/'+ sid,
+            type: "POST",
+            data: {"authority": data.value},
+            success:function(da){
+              loading();
+              if(!da.success){
+                PlgDialog.alert("操作失败,"+da.message);
+              }
+            },
+            error:function(){
+              loading();
+            }
+          });
+        }
+        // 进入【删除权限】的阶段
+        if(!data.elem.checked){
+          var loading = PlgDialog.loading2();
+          Prolog.ajax({
+            url: BASE_URL + '/authmgr/authority/'+ sid,
+            type:"POST",
+            data:{"authority": data.value, _method: 'delete'},
+            success:function(da){
+              loading();
+              if(!da.success){
+                PlgDialog.alert("操作失败,"+da.message);
+              }
+            },
+            error:function(){
+              loading();
+            }
+          });
+        }
+
+      });  
+    }
+
+    /*
+      给用户授权类型初始化信息
+    */
+    function authorizationTypeInit(data) {
+
+      // 显示用户信息
+      $('#clientId').html(data.clientId);
+
+      // 渲染授权类型
+      var authorizationType = [
+        {
+          text: '客户端模式',
+          name: 'client_credentials'
+        },
+        {
+          text: '密码模式',
+          name: 'password'
+        },
+        {
+          text: '授权码模式',
+          name: 'authorization_code'
+        },
+        {
+          text: '授权码简化模式',
+          name: 'implicit'
+        }
+      ];
+      
+      var authorizedGrantTypeArr =[];
+      if(data.authorizedGrantTypes){
+        authorizedGrantTypeArr = data.authorizedGrantTypes.split(',');
+      }
+
+      authorizationType = authorizationType.map(function (val) {
+        if (authorizedGrantTypeArr.indexOf(val.name) > -1) {
+          val.checked = true;
+        } else {
+          val.checked = false;
+        }
+        return val;
+      });
+
+      var temStr = '',
+      formConfig = {}; // layui_form,初始化,配置参数
+      authorizationType.map(function (val) {
+        temStr +=
+          `
+          <input type="checkbox" name="${ val.name }" lay-skin="primary" title="${ val.text }" >
+          <div class="layui-unselect layui-form-checkbox" lay-skin="primary"><span>${ val.text }</span><i class="layui-icon layui-icon-ok"></i></div>
+        `;
+        formConfig[val.name] = val.checked;
+      })
+
+      $('#plg-authorization-list').html(temStr);
+      
+      //表单初始赋值
+      form.val('authorization', formConfig);
+
+
+      // 监听用户选择授权类型的事件
+      $('.plg-authorization-style').on('click', '.layui-form-checkbox', function () {
+
+        var self = $(this);
+        var currentCell = self.find('span').text();
+        
+        authorizationType.forEach(function(val){
+
+          if(currentCell === val.text){
+            if(val.checked){
+              val.checked = false;
+              updateauthorizationType();
+            } else {
+              val.checked = true;
+              // //console.log('当前元素是未选中的,需要做添加操作');
+              updateauthorizationType();
+            }
+          }
+
+        });
+        
+        // 更新用户的授权类型
+        function updateauthorizationType(){
+          // //console.log('更新用户的授权类型');
+          var temArr = [];
+
+          authorizationType.forEach(function(val){
+            if(val.checked){
+              temArr.push(val.name);
+            }
+          });
+
+          data.authorizedGrantTypes = temArr.join(',');
+          
+          var obj = data,  // 请求更新API的数据
+
+              loading = Prolog.loading2();
+
+          Prolog.ajax({
+            url: BASE_URL + 'authmgr/update',
+            type: 'post',
+            data: obj,
+            dataType: 'json',
+            success: function (data) {
+              loading();
+
+              if (data.success) {
+                
+
+                layer.closeAll(); 
+              } else {
+                PlgDialog.alert(data.message);
+              }
+            }
+          });
+
+        }
+
+      });
+
+
+    }
+
+  }())
+</script>

+ 918 - 0
plg-tms-std-web-vue/public/jq/pages/authorization/client.html

@@ -0,0 +1,918 @@
+<div class="plg-tab-container">
+
+  <div class="layui-carousel" id="res-carousel">
+    <div carousel-item>
+      <div id="client"></div>
+      <div id="newForm">
+
+
+      </div>
+    </div>
+  </div>
+</div>
+
+<script>
+
+  (function () {
+
+    window.global_fun.client={}
+
+    var car = layui.carousel.render({
+      elem: '#res-carousel',
+      autoplay: false,
+      index: 0,
+      arrow: 'none',
+      indicator: 'none',
+      anim: "updown",
+      width: '100%', //设置容器宽度
+      height: '100%'
+    });
+
+
+    /* 此处切换页面 */
+    function changePanel(tt = true, callback) {
+      //点切切换时
+      car.slide(tt);
+      if (tt) {
+        callback && setTimeout(function () {
+          callback()
+        }, 60);
+      } else {
+
+        res_inst.PlgGridInstance.reload();
+        $("#newForm").empty()
+
+
+
+      }
+      tt = !tt;
+    }
+
+    var res_opts = {
+      fixedLast: true,
+      renderer: "client",
+      url: APIS.client.getAuthmgr(),
+      type: "get",
+    };
+
+    res_opts.pagebar = {
+      buttons: [
+        { text: PLG_BUTTON.value.delBtn(), className: "layui-btn-danger plg-btn-height-auto", name: "delBtn" }
+      ]
+    },
+      res_opts.columns = [
+        {
+          name: "id",
+          id: "id",
+          hidden: true
+        },
+        {
+          id: "clientId",
+          name: "用户名称",
+          align: "left",
+          type: "ro",
+          width: 170,
+          render: function (v) {
+            return `<b style="color:#2F4056">${v}</b>`
+          }
+        },
+        {
+          name: "状态",
+          id: "status",
+          align: "center",
+          width: 70,
+          type: "ro",
+          render: function (v) {
+            return getStatus(v)
+          }
+        },
+
+        {
+          name: "授权类型",
+          id: "authorizedGrantTypes",
+          align: "left",
+          type: "ro",
+          render: function (v) {
+
+            var d = v.split(',');
+            d = d.map(function (item) {
+              return `<span style="color:#01AAED">${item}</span>`
+            });
+            return d.join(`<i style="color:#ddd;padding: 0 5px;">|</i>`)
+          }
+        },
+        {
+          name: "授权范围",
+          id: "scopes",
+          align: "center",
+          width: 150,
+          type: "ro"
+        },
+        {
+          name: "接入过期时间",
+          width: 120,
+          id: "accessTokenValiditySeconds",
+          align: "center",
+          type: "ron",
+          render: function (v) {
+            return v + "秒"
+          }
+        },
+        {
+          name: " 刷新过期时间",
+          width: 140,
+          id: "refreshTokenValiditySeconds",
+          align: "center",
+          type: "ron",
+          render: function (v) {
+            return v + "秒"
+          }
+        },
+
+        {
+          name: "说明",
+          id: "notes",
+          align: "left",
+          type: "ro",
+          render: function (v) {
+            return !v && `<span style="color:#999">暂无说明</span>`
+          }
+        },
+        {
+          id: "op",
+          name: "操作",
+          type: 'button',
+          width: "180",
+          align: "center",
+          render: function (v, d) {
+            return '授权^global_fun.client.accreditClick,详情^global_fun.client.detailsClick,删除^global_fun.client.deleteClick';
+          }
+        }
+      ];
+
+    function setMainPanel(callback) {
+
+      var t = callback();
+      var mainOpts = {
+        renderr: "newForm",
+        skin: 0,
+        className: "flex_panel",
+        header: {
+          isShow: true,
+          title: t.title,
+          moreBtn: [
+            {
+              name: `返回 <i class="layui-icon layui-icon-right" style="color:#1E9FFF"></i>`,
+              className: "",
+              style: "margin-right: 10px;",
+              onClick: function (e) {
+                changePanel(false);
+                return false
+              }
+            }
+          ],
+        }
+      }
+      var mainpanel = new PlgPanel(mainOpts);
+      mainpanel.renderBefore(function () {
+        this.appendPanelBody(t.html);
+      });
+
+      mainpanel.renderTo("newForm");
+      mainpanel.getElement.find(".layui-card-body").addClass("plg-flex-column");
+      return mainpanel
+
+    }
+
+    //授权页面
+    window.global_fun.client.accreditClick = function (id) {
+
+      window.global_fun.client.clientId = id;
+      res_inst.PlgGridInstance.selectRowById(window.global_fun.client.clientId);
+
+      changePanel(true, function () {
+
+        window.global_fun.client.clientId = id;
+
+        setMainPanel(function () {
+          return {
+            title: "用户授权",
+            html: `<div class="tip cl">
+                  <span class="text"> <i class="layui-icon layui-icon-about" style="color:#bbb"></i> 重置客户端权限后,所有资源中心将重新请求授权中进行鉴权! </span>
+                      <a class="right layui-btn layui-btn-normal layui-btn-radius" onclick="window.global_fun.client.resetUser(this)" href="javascript:void(0)">
+                      <i class="layui-icon layui-icon-refresh" style="vertical-align: middle;"></i> 重置权限
+                      </a>
+                  </div>
+                  <div id="accreditListTabs" class="plg-flex-column"></div>
+                  `
+          }
+        });
+
+
+        new PlgTabs({
+          renderer: "accreditListTabs",
+          indexActive: 0,
+          className: "flex_tabs",
+          content: [
+            {
+              title: "分配资源权限",
+              url: "./pages/authorization/client.resource.html"
+            },
+            {
+              title: "分配资源组权限",
+              url: "./pages/authorization/client.resourceGroup.html"
+            }
+          ]
+
+        })
+      })
+
+
+    };
+
+    //状态显示 
+    function getStatus(status) {
+      if (status === 1) {
+        return `<span class="layui-badge-dot layui-bg-blue"></span> 正常 `
+      } else if (status === 2) {
+        return `<span class="layui-badge-dot"></span> 冻结`
+
+      } else if (status === 0) {
+        return `<span class="layui-badge-dot layui-bg-orange"></span> 未激活`
+      }
+      return
+    }
+
+
+    //通过状态显示不同的按扭 
+    function resultBtnStatus(dform, status) {
+      var s = ["active", "freeze", "unfreeze"];
+
+      //0 未激活-- 显示激活账号-active
+      //1 正常-- 显示冻结账号-freeze
+      //2 冻结-- 显示解冻账号-unfreeze
+      s.forEach(function (item) {
+        dform.disableItem(item);
+        dform.hideItem(item);
+      });
+      dform.enableItem(s[status]);
+      dform.showItem(s[status]);
+
+      $("#statustemplate").html(getStatus(status))
+
+
+      return dform
+    }
+
+    
+     
+          var statusBtn = {
+          event: function (param, url, callback) {
+            var close = Prolog.loading2();
+            Prolog.ajax({
+              type: "post",
+              url: url,
+              data: param,
+              success: function (response) {
+                if (response) {
+                  callback && callback(response);
+                }
+                PlgDialog.msg(response.message);
+
+              },
+              complete: function () {
+                close()
+              }
+            });
+          },
+        
+        
+
+        };
+
+
+
+
+    //详情
+    window.global_fun.client.detailsClick = function (id, data) {
+      window.global_fun.client.clientId = id;
+      res_inst.PlgGridInstance.selectRowById(window.global_fun.client.clientId);
+      changePanel(true, function () {
+        setMainPanel(function () {
+          return {
+            title: "用户详情",
+            html: `<div class="tip cl" style="border:0;padding: 16px 16px 8px;">  
+                         <div id="client_details"></div>      
+                  </div>
+                  <div class="plg-flex-column">
+                      <div id="detalisForm"></div>
+                    </div>
+                  `
+          }
+        });
+
+        /**详情头部信息*****/
+        var detailsToolbar = new PlgForm({
+          renderer: "client_details",
+          items: [{
+            type: "row",
+            list: [
+              {
+                type: "template",
+                className: "layui-col-md12",
+                format: function () {
+                  return `
+              <div class="avatar bg-secondary">${data.clientId.substring(0, 1).toLocaleUpperCase()}</div>   
+            <div class="u-text" style="display: inline-block;padding-left: 0">
+              <div class="text" style="padding-right:10px;font-size:20px">
+                <b>${data.clientId}</b>
+                </div>
+            </div>`
+                }
+              },
+              {
+
+                label: "状态:",
+                type: "template",
+                className: "left f14 row_list",
+                offsetLeft: 20,
+                format: function (v) {
+                  return `<div id="statustemplate"></div>`
+                }
+              },
+
+              {
+                className: "layui-col-md4 ",
+                type: "block",
+                list: [
+                  {
+                    type: "button",
+                    value: "初始化密码",
+                    name: "resetpassword",
+                    className: " btn-radius"
+                  },
+                  {
+                    type: "newcolumn"
+                  },
+                  {
+                    type: "button",
+                    value: "修改密码",
+                    name: "updatepassword",
+                    className: " btn-radius"
+                  }
+                ]
+              },
+
+              {
+                type: "block",
+                className: "layui-col-md4 right",
+                list: [
+                  {
+                    type: "button",
+                    value: "冻结账号",
+                    className: "btn-danger btn-radius",
+                    name: "freeze",
+                    hidden: true,
+                    diasbled: true
+                  },
+
+                  {
+                    type: "button",
+                    value: "解冻账号",
+                    className: "btn-warm btn-radius",
+                    name: "unfreeze",
+                    hidden: true,
+                    diasbled: true
+                  },
+
+                  {
+                    type: "button",
+                    value: "激活账号",
+                    className: "btn-success btn-radius",
+                    name: "active",
+                    hidden: true,
+                    diasbled: true
+                  },
+                ]
+              },
+
+            ]
+          }]
+        });
+        
+        //0 未激活-- 显示激活账号-active
+        //1 正常-- 显示冻结账号-freeze
+        //2 冻结-- 显示解冻账号-unfreeze
+
+        statusBtn.active= function () {
+            statusBtn.event({id:window.global_fun.client.clientId}, APIS.client.active(), function (data) {
+              resultBtnStatus(detailsToolbar, 1);
+            })
+          };
+        statusBtn.freeze= function () {
+          statusBtn.event({id:window.global_fun.client.clientId}, APIS.client.freeze(), function (data) {
+              resultBtnStatus(detailsToolbar, 2);
+            })
+          };
+        statusBtn.unfreeze= function () {
+          statusBtn.event({id:window.global_fun.client.clientId}, APIS.client.unfreeze(), function (data) {
+              resultBtnStatus(detailsToolbar, 1);
+            })
+          };
+        statusBtn.resetpassword= function () {
+          statusBtn.event({id:window.global_fun.client.clientId}, APIS.client.resetpassword())
+          };
+        statusBtn.updatepassword= function () {
+          var form1 = null;
+            var winoptions = {
+              id: "wnd_001",
+              title: _t("修改用户密码"),
+              type: 1,
+              closeBtn: 1,
+              resize: true,
+              tipsMore: true,
+              btnAlign: 'c',
+              btn: [_t("保存"), _t("取消")],
+              btn1: function (index, layero) {
+                var b = form1.validate();
+                if (!b) return false;
+                var close = PlgDialog.loading2();
+                var fd = form1.getFormData();
+                if (fd.newPassword == fd.oldPassword) {
+                  PlgDialog.msg("新密码与旧密码相同", {
+                    type: 1
+                  });
+                  close()
+                  return;
+                }
+                if (fd.newPassword != fd.conwPwd) {
+                  PlgDialog.msg("两次输入的密码不相同", {
+                    type: 1
+                  });
+                  close()
+                  return;
+                };
+                statusBtn.event(fd , APIS.client.updatepassword(),function(){
+                  PlgDialog.close(index);
+                });
+
+              },
+              btn2: function (index, layero) {
+                 PlgDialog.close(index);
+              },
+              area: ['400px', '300px'],
+              content: '<div id="edit_password"></div>',
+              success: function (layero, index) {
+                var formcfg = {
+                  renderer: "edit_password",
+                  items: [
+                    {
+                      type: "row",
+                      className: "row_list layui-col-md12",
+                      list: [
+                        { 
+                          type: "settings",
+                          labelAlign: "right",
+                          labelWidth: 80
+                        },
+                        {
+                          type: "hidden",
+                          name: "id",
+                          value:window.global_fun.client.clientId
+                        },
+                        {
+                          type: "password",
+                          name: "oldPassword",
+                          label: "旧密码:",
+                          validate: "NotEmpty",
+                          required: true
+                        },
+                        {
+                          type: "password",
+                          name: "newPassword",
+                          label: "新密码:",
+                          validate: "NotEmpty",
+                          required: true
+                        },
+                        {
+                          type: "password",
+                          name: "conwPwd",
+                          label: "确认密码:",
+                          validate: "NotEmpty",
+                          required: true
+                        },
+                        {
+                          type: "label",
+                          name: "msg",
+                          label: "温馨提示:密码为 8~20 位的字母和数字组成,区分大小写!",
+                          labelWidth: 350,
+                        }
+                      ]
+                    },
+                  ]
+                };
+                form1 = new PlgForm(formcfg);
+              }
+            };
+            PlgDialog.open(winoptions);
+          };
+      
+      
+      
+
+        resultBtnStatus(detailsToolbar, data.status);
+
+        detailsToolbar.on("onButtonClick", function (name) {
+          if (statusBtn[name]) {
+            statusBtn[name]()
+          }
+        })
+
+
+     //下面的详情表单
+        var baseForm = new PlgForm({
+          renderer: "detalisForm",
+          items: [{
+            type: "row",
+            width: 500,
+            className: "row_list",
+            list: [
+              {
+                type: "settings",
+                labelAlign: "right",
+                labelWidth: 100,
+              },
+              {
+               type: "hidden",
+                name: "id",
+               value:window.global_fun.client.clientId
+               },
+               {
+                type: "multiselect",
+                name: "authorizedGrantTypes",
+                label: "授权类型",
+                inputHeight:100,
+                value:data.authorizedGrantTypes,
+                required: true,
+                options: [{
+                  value: "authorization_code",
+                  text: "authorization_code"
+                },
+                {
+                  value: "implicit",
+                  text: "implicit"
+                }, {
+                  value: "password",
+                  text: "password"
+                },
+                {
+                  value: "client_credentials",
+                  text: "client_credentials",
+                  selected: true
+                },
+                {
+                  value: "refresh_token",
+                  text: "refresh_token"
+                }
+                ],
+              },
+              
+              {
+                className: "layui-col-md12",
+                type: "input",
+                name: "scopes",
+                required: true,
+                validate: "NotEmpty",
+                label: "授权范围:",
+                value: data.scopes,
+                placeholder: _t("请输入授权范围"),
+              },
+              {
+                className: "layui-col-md12",
+                type: "input",
+                name: "accessTokenValiditySeconds",
+                label: "接入过期时间:",
+                value: data.accessTokenValiditySeconds,
+                required: true,
+                validate: "NotEmpty,ValidNumeric",
+                placeholder: _t("请输入过期时间秒"),
+                numberFormat: ["0 秒", "."],
+              },
+              {
+                className: "layui-col-md12",
+                type: "input",
+                name: "refreshTokenValiditySeconds",
+                label: "刷新过期时间:",
+                value: data.refreshTokenValiditySeconds,
+                required: true,
+                validate: "NotEmpty,ValidNumeric",
+                placeholder: _t("请输入过期时间秒"),
+                numberFormat: ["0 秒", "."]
+              },
+              {
+                className: "layui-col-md12",
+                type: "input",
+                name: "notes",
+                label: "说明:",
+                rows: 3,
+                labelTop: -20,
+                value:data.notes
+              
+              },
+              {
+                offsetTop: 20,
+                className: "btn-border-link btn-lx layui-col-md6 flex_item_right",
+                type: "button",
+                value: "返回",
+                name: "back",
+                width: 150
+              },
+              {
+                offsetTop: 20,
+                className: "btn-normal btn-lx layui-col-md6",
+                type: "button",
+                name: "save",
+                value: "保存",
+                width: 150
+              }
+            ]
+          }
+          ]
+        });
+
+
+        baseForm.on("onButtonClick", function (name) {
+          if (name == "back") {
+            changePanel(false);
+          } else if (name == "save") {
+            var dform=baseForm.getFormData();
+            var d = dform.authorizedGrantTypes;
+            if(d && d.length>0){
+              dform.authorizedGrantTypes = d.join(",");
+            }else{
+              Prolog.message("授权类型不能为空")
+              return;
+            }
+            
+            statusBtn.event(dform, APIS.client.update(),function(data){
+              changePanel(false);
+            })
+
+          }
+        });
+
+
+      })
+    };
+
+
+
+    window.global_fun.client.resetUser = function () {
+      layer.confirm("是否重置权限?", function (index) { 
+              statusBtn.event({id:window.global_fun.client.clientId}, APIS.client.refreshauths())
+            });
+     };
+
+    window.global_fun.client.deleteClick = function (id) {
+      res_inst.PlgGridInstance.selectRowById(id);
+      res_inst.delBtn({ id: id });
+    };
+
+    res_opts.toolbar = [{
+      type: 'row',
+      blockOffset: 0,
+      className: "layui-col-md12",
+      list: [
+        {
+          type: "row",
+          className: "layui-col-md6",
+          blockOffset: 0,
+          list: [{
+            className: "layui-col-md4",
+            type: "input",
+            name: "likeMap",
+            label: "搜索",
+            placeholder: "用户名/状态"
+          },
+          {
+            type: "button",
+            className: "left",
+            name: "selectAllBtn",
+            value: PLG_BUTTON.value.searchBtn()
+          },
+          {
+            type: "button",
+            name: "resetBtn",
+            className: "left",
+            value: PLG_BUTTON.value.resetBtn()
+          },
+          ]
+        },
+        {
+          type: "block",
+          className: "layui-col-md6 right",
+          blockOffset: 0,
+          list: [
+            {
+              type: "button",
+              name: "addBtn",
+              value: PLG_BUTTON.value.addBtn() + "用户"
+            }
+        
+          ]
+        }]
+    }];
+
+
+    res_opts.formData = [{
+      type: "block",
+      width: 680,
+      list: [{
+        type: "settings",
+        labelWidth: 120,
+        width:200,
+        position: "label-left",
+        labelAlign: "right"
+      },
+      {
+        type: "hidden",
+        name: "id",
+        label: "id",
+        value: 0,
+      },
+      {
+        type: "input",
+        name: "clientId",
+        label: "用户名称",
+        width:200,
+        required: true,
+        validate: 'NotEmpty',
+        placeholder: _t("请输入用户名称")
+      },
+      {
+        type: "password",
+        name: "inPwd",
+        label: "输入密码",
+        width:200,
+        required: true,
+        validate: 'NotEmpty',
+        placeholder: _t("请输入密码")
+      },
+      {
+        type: "password",
+        name: "clientSecret",
+        width:200,
+        label: "确认密码",
+        required: true,
+        validate: 'NotEmpty',
+        placeholder: _t("请再次输入确认密码")
+      },
+      {
+        type: "input",
+        name: "accessTokenValiditySeconds",
+        label: "接入过期时间",
+        width:200,
+        required: true,
+        validate: "NotEmpty,ValidNumeric",
+        value: 43200,
+        placeholder: _t("请输入过期时间秒"),
+        numberFormat: ["0 秒", "."],
+      },
+      {
+        type: "input",
+        name: "refreshTokenValiditySeconds",
+        label: "刷新过期时间",
+        width:200,
+        required: true,
+        validate: "NotEmpty,ValidNumeric",
+        value: 2592000,
+        placeholder: _t("请输入过期时间秒"),
+        numberFormat: ["0 秒", "."],
+      },
+      {type: "newcolumn"},
+      {
+        type: "multiselect",
+        name: "authorizedGrantTypes",
+        label: "授权类型",
+        inputHeight:100,
+        width:200,
+        required: true,
+        options: [{
+          value: "authorization_code",
+          text: "authorization_code"
+        },
+        {
+          value: "implicit",
+          text: "implicit"
+        }, {
+          value: "password",
+          text: "password"
+        },
+        {
+          value: "client_credentials",
+          text: "client_credentials",
+          selected: true
+        },
+        {
+          value: "refresh_token",
+          text: "refresh_token"
+        }
+        ],
+      },
+      {
+        type: "input",
+        name: "scopes",
+        label: "授权范围",
+        required: true,
+        width:200,
+        validate: "NotEmpty",
+        value: "all",
+        placeholder: _t("授权范围,多个使用逗号分隔")
+      },
+      {
+        type: "input",
+        name: "notes",
+        //  validate: 'NotEmpty',
+        //   required: true, 
+        label: "说明:",
+        width:200,
+        rows: 3,
+        labelTop: -20,
+        placeholder: "请填写说明"
+      }
+
+      ]
+    }
+    ]
+
+    var res_inst = new GridPlant({
+      instance: new PlgGrid(setConfig(res_opts)).loadData(null, function () {
+        window.global_fun.client.clientId && res_inst.PlgGridInstance.selectRowById(window.global_fun.client.clientId);
+      }),
+      addBtnUrl: APIS.client.addAuthmgr(),
+      editBtnUrl: APIS.client.addAuthmgr(),
+      delBtnUrl: APIS.client.deleteAuthmgr(),
+      downBtnUrl: APIS.client.addAuthmgr(),
+      importBtnUrl: APIS.client.addAuthmgr(),
+      onRowDblClicked: false,
+    }).init();
+
+    res_inst.selectAllBtnAfter(function (obj) {
+      var likeMap = res_inst.PlgGridInstance.getToolBarForm().getItemValue("likeMap");
+      obj.clientId = likeMap
+      obj.status = likeMap
+      delete obj.likeMap
+
+    })
+
+    res_inst.PlgGridInstance.attachPageBarEvent(function (v) {
+      res_inst.delBtn();
+    });
+
+    //删除方法
+    res_inst.delBtn = function (paramsObj = null) {
+      this.formatForm(3, "POST", _t("是否删除数据"), this.delBtnUrl, paramsObj)
+    };
+
+    //新加用户弹出框的回调
+    res_inst.showDialogAfter(function (gridForm) {
+      var DForm = gridForm.getDForm();
+
+      DForm.setValidation("clientSecret",function(v){
+
+        var is = (v === gridForm.getItemValue("inPwd"));
+        setTimeout(function () {
+          if (!is) {
+            DForm.setNote("clientSecret", { text: "两组密码不一致,请重新输入", width: "auto" });
+            DForm.getInput("clientSecret").parentNode.parentNode.classList.add("validate_error")
+          } else {
+            DForm.clearNote("clientSecret");
+            DForm.getInput("clientSecret").parentNode.parentNode.classList.remove("validate_error")
+          }
+        }, 0)
+        return is
+      })
+
+
+      gridForm.attachEvent("onBlur", function (name, value) {
+        if (name === "clientSecret") {
+          DForm.validateItem(name);
+        }
+      })
+      return gridForm
+    })
+
+
+    res_inst.showDialogSaveBtn(function (gridForm, data) {
+      //    data.clientSecret=data.outPwd;
+      delete data.inPwd
+
+
+    })
+
+
+
+
+  })()
+
+</script>

+ 306 - 0
plg-tms-std-web-vue/public/jq/pages/authorization/client.resource.html

@@ -0,0 +1,306 @@
+<div class="plg-flex">
+
+  <div id="notclientRes" class="plg-flex-item" style="flex:1; height: 100%"></div>
+
+  <div class="plg-flex-item" style="height: 100%; flex: 0 0 auto;width:80px;">
+
+    <div class="btnForm">
+      <a id="notclientResBtn" href="javascript:void(0)" class="disable">
+        <i class="layui-icon layui-icon-right" style="font-size: 28px;"></i>
+      </a>
+      <a id="clientResBtn" href="javascript:void(0)" class="disable">
+        <i class="layui-icon layui-icon-left" style="font-size: 28px;"></i>
+      </a>
+    </div>
+  </div>
+
+  <div id="clientRes" class="plg-flex-item" style="flex:1;height: 100%;">2</div>
+
+</div>
+
+
+<script>
+        window.global_fun.clientResource={}
+
+  //分配资源权限
+  !function () {
+
+    var notGroupOpts = {
+      renderer: "notclientRes",
+      skin: 2,
+      className: "flex_panel",
+      header: {
+        isShow: true,
+        title: "未分配资源",
+      },
+      url: APIS.resource.notlistbyclient(),
+      params: { clientId: window.global_fun.clientResource.clientId },
+      toolbar: [{
+        type: "row",
+        name: "tool",
+        list: [
+          {
+            type: "row",
+            className: "layui-col-md12",
+            list: [
+              {
+                className: "layui-col-md7",
+                type: "input",
+                name: "likeMap",
+                placeholder: "服务名/地址",
+              },
+              {
+                type: "button",
+                className: "left",
+                name: "selectAllBtn",
+                value: PLG_BUTTON.value.searchBtn(),
+              },
+              {
+                type: "checkbox",
+                className: "right",
+                name: "isAll",
+                labelWidth: "auto",
+                labelAlign: "left",
+                position: "label-right",
+                label: "全选",
+                disabled: true
+
+              }
+            ]
+          }
+        ]
+      }],
+      listFormData: [{
+        type: "row",
+        name: "res_panel_notgroup",
+        list: [
+          {
+            name: "notData",
+            type: "template",
+            className: "layui-col-md12 ",
+            format: function () {
+              return `<span>暂无数据</span>`
+            }
+          }
+
+        ]
+      }
+      ]
+    }
+
+
+    var GroupOpts = Object.assign({}, notGroupOpts, {
+      renderer: "clientRes",
+      url: APIS.resource.listbyclient(),
+      params: { clientId: window.global_fun.clientResource.clientId },
+      skin: 1,
+      header: {
+        isShow: true,
+        title: "已分配资源",
+      },
+    });
+
+    var notGroupList = new PlgPanel(notGroupOpts);
+    var GroupList = new PlgPanel(GroupOpts);
+
+    notGroupList.groupBtn = document.getElementById("notclientResBtn");
+    notGroupList.groupBtnText = "添加资源";
+    notGroupList.resUrl = APIS.client.addResource();
+
+    GroupList.groupBtn = document.getElementById("clientResBtn");
+    GroupList.groupBtnText = "删除资源";
+    GroupList.resUrl = APIS.client.removeResource();
+
+
+
+
+    var grouparr = [notGroupList, GroupList];
+
+    grouparr.forEach(function (groupitem) {
+      //请求列表数据的回掉
+      groupitem.done(function (self, data) {
+
+        if (data.list.length > 0) {
+
+          self.getListForm.hideItem("notData");
+          self.getToolbar.getDForm().uncheckItem("isAll");
+          self.page = true;
+          self.getToolbar.enableItem("isAll");
+          data.list.forEach(function (item) {
+            self.getListForm.getDForm().addItem("res_panel_notgroup",
+              {
+                type: "row",
+                className: "layui-col-md12 accr_list",
+                list: [
+                  {
+                    className: "layui-col-md7 lab-bold",
+                    name: "_check-" + item.id,
+                    type: "checkbox",
+                    labelWidth: "auto",
+                    labelAlign: "left",
+                    position: "label-right",
+                    label: item.serviceName,
+                  },
+                  {
+                    className: "layui-col-md3",
+                    name: "model",
+                    type: "template",
+                    value: item.method,
+                    style: "text-align: center"
+                  },
+                  {
+                    className: "right link layui-col-md2",
+                    type: "button",
+                    value: groupitem.groupBtnText,
+                    name: "id-" + item.id
+                  },
+                  {
+                    className: "layui-col-md12 color-999 mt-10",
+                    type: "template",
+                    value: item.source,
+                  }
+                ]
+              })
+          });
+          return setEventList(groupitem)
+        }
+
+        self.page = false;
+        self.getToolbar.disableItem("isAll");
+      });
+
+
+      groupitem.getToolbar.on("onButtonClick", function (name) {
+        if (name == "selectAllBtn") {
+          var linkMap = groupitem.getToolbar.getItemValue("likeMap");
+          groupitem.listReload({ serviceName: linkMap, source: linkMap, method: linkMap })
+        }
+      });
+
+      groupitem.getToolbar.on("onChange", function (name) {
+        if (name == "isAll") {
+          this.checkIds = [];
+          this.getListForm.forEachItem(function (names) {
+            if (names.indexOf("_check") !== -1) {
+              if (this.getToolbar.getDForm().isItemChecked(name)) {
+                this.getListForm.getDForm().checkItem(names);
+                this.checkIds.push(names.substr(7))
+                this.groupBtn.classList.remove("disable")
+              } else {
+                this.getListForm.getDForm().uncheckItem(names);
+                this.groupBtn.classList.add("disable");
+              }
+            }
+          }.bind(this))
+        }
+      }.bind(groupitem));
+
+      groupitem.groupBtn.onclick = function (e) {
+        if (this.classList.value == "disable" && groupitem.checkId.length > 0) return false
+        addResByGroup(groupitem.resUrl,groupitem.params.clientId, groupitem.checkIds.join(","))
+        groupitem.checkIds = [];
+        groupitem.getToolbar.getDForm().uncheckItem("isAll");
+        this.classList.add("disable");
+      }
+
+    })
+
+
+
+    function setEventList(paramsGropu) {
+      var getDForm = paramsGropu.getListForm.getDForm();
+      paramsGropu.getListForm.on("onButtonClick", function (name) {
+
+        if (name.indexOf("id") !== -1) {
+
+          getDForm.checkItem("_check-" + name.substr(3));
+
+          layer.confirm("是否" + paramsGropu.groupBtnText + "?", {
+            btn: [_t("确定"), _t("取消")],
+            btn1: function (index) { 
+              addResByGroup(paramsGropu.resUrl, paramsGropu.params.clientId, name.substr(3));
+            },
+            btn2: function (index) {
+              getDForm.uncheckItem("_check-" + name.substr(3));
+
+            }
+          })
+        }
+      });
+      paramsGropu.getListForm.on("onChange", function (name) {
+        paramsGropu.checkIds = [];
+
+        if (name.indexOf("_check-") !== -1) {
+          this.checkIds = [];
+          var index = 0;
+          this.getListForm.forEachItem(function (names) {
+            if (names.indexOf("_check") !== -1) {
+              index += 1
+              var Checkname = names.substr(7);
+              var checkItem = getDForm.isItemChecked(names)
+              if (checkItem) {
+                this.checkIds.push(Checkname)
+              }
+            }
+
+          }.bind(this))
+
+          if (this.checkIds.length > 0) {
+
+            if (this.checkIds.length === index) {
+              this.getToolbar.getDForm().checkItem("isAll");
+
+            } else {
+              this.getToolbar.getDForm().uncheckItem("isAll");
+
+            }
+            this.groupBtn.classList.remove("disable")
+
+          } else {
+            this.groupBtn.classList.add("disable");
+          }
+        }
+        //console.log(this.checkIds)
+
+      }.bind(paramsGropu))
+
+    }
+
+
+
+
+
+    //分配资源给资源组方法
+    function addResByGroup(url, ids, resIds) {
+
+      Prolog.ajax({
+        url: url,
+        type: "post",
+        data: {
+          id: ids,
+          resourceIds: resIds
+        },
+        success: function (resource) {
+          if (resource.success) {
+            PlgDialog.msg("分配成功");
+            GroupList.listReload();
+            notGroupList.listReload();
+          } else {
+            PlgDialog.msg(resource.message);
+
+          }
+        }
+      })
+    }
+
+
+
+
+
+
+
+
+
+  }()
+
+</script>

+ 296 - 0
plg-tms-std-web-vue/public/jq/pages/authorization/client.resourceGroup.html

@@ -0,0 +1,296 @@
+<div class="plg-flex">
+
+    <div id="notclientGrulp" class="plg-flex-item" style="flex:1; height: 100%"></div>
+  
+    <div class="plg-flex-item" style="height: 100%; flex: 0 0 auto;width:80px;">
+  
+      <div class="btnForm">
+        <a id="notclientGrulpBtn" href="javascript:void(0)" class="disable">
+          <i class="layui-icon layui-icon-right" style="font-size: 28px;"></i>
+        </a>
+        <a id="clientGroupBtn" href="javascript:void(0)" class="disable">
+          <i class="layui-icon layui-icon-left" style="font-size: 28px;"></i>
+        </a>
+      </div>
+    </div>
+  
+    <div id="clientGroup" class="plg-flex-item" style="flex:1;height: 100%;">2</div>
+  
+  </div>
+  
+  
+  <script>
+    //分配资源权限
+    !function () {
+
+      window.global_fun.clientResourceGroup={}
+  
+      var notGroupOpts = {
+        renderer: "notclientGrulp",
+        skin: 2,
+        className: "flex_panel",
+        header: {
+          isShow: true,
+          title: "未分配资源组",
+        },
+        url: APIS.groupResource.notlistbyclient(),
+        params: { clientId: window.global_fun.clientResourceGroup.clientId },
+        toolbar: [{
+          type: "row",
+          name: "tool",
+          list: [
+            {
+              type: "row",
+              className: "layui-col-md12",
+              list: [
+                {
+                  className: "layui-col-md7",
+                  type: "input",
+                  name: "likeMap",
+                  placeholder: "服务名/地址",
+                },
+                {
+                  type: "button",
+                  className: "left",
+                  name: "selectAllBtn",
+                  value: PLG_BUTTON.value.searchBtn(),
+                },
+                {
+                  type: "checkbox",
+                  className: "right",
+                  name: "isAll",
+                  labelWidth: "auto",
+                  labelAlign: "left",
+                  position: "label-right",
+                  label: "全选",
+                  disabled: true
+  
+                }
+              ]
+            }
+          ]
+        }],
+        listFormData: [{
+          type: "row",
+          name: "res_panel_notgroup",
+          list: [
+            {
+              name: "notData",
+              type: "template",
+              className: "layui-col-md12 ",
+              format: function () {
+                return `<span>暂无数据</span>`
+              }
+            }
+  
+          ]
+        }
+        ]
+      }
+  
+  
+      var GroupOpts = Object.assign({}, notGroupOpts, {
+        renderer: "clientGroup",
+        url: APIS.groupResource.listbyclient(),
+        params: { clientId: window.global_fun.clientResourceGroup.clientId },
+        skin: 1,
+        header: {
+          isShow: true,
+          title: "已分配资源组",
+        },
+      });
+  
+      var notGroupList = new PlgPanel(notGroupOpts);
+      var GroupList = new PlgPanel(GroupOpts);
+  
+      notGroupList.groupBtn = document.getElementById("notclientGrulpBtn");
+      notGroupList.groupBtnText = "添加资源组";
+      notGroupList.resUrl = APIS.client.addGroup();
+  
+      GroupList.groupBtn = document.getElementById("clientGroupBtn");
+      GroupList.groupBtnText = "删除资源组";
+      GroupList.resUrl = APIS.client.removeGroup();
+  
+  
+  
+  
+      var grouparr = [notGroupList, GroupList];
+  
+      grouparr.forEach(function (groupitem) {
+        //请求列表数据的回掉
+        groupitem.done(function (self, data) {
+  
+          if (data.list.length > 0) {
+  
+            self.getListForm.hideItem("notData");
+            self.getToolbar.getDForm().uncheckItem("isAll");
+            self.page = true;
+            self.getToolbar.enableItem("isAll");
+            data.list.forEach(function (item) {
+              self.getListForm.getDForm().addItem("res_panel_notgroup",
+                {
+                  type: "row",
+                  className: "layui-col-md12 accr_list",
+                  list: [
+                    {
+                      className: "layui-col-md7 lab-bold",
+                      name: "_check-" + item.id,
+                      type: "checkbox",
+                      labelWidth: "auto",
+                      labelAlign: "left",
+                      position: "label-right",
+                      label: item.name,
+                    },
+                  
+                    {
+                      className: "right link layui-col-md2",
+                      type: "button",
+                      value: groupitem.groupBtnText,
+                      name: "id-" + item.id
+                    },
+                    {
+                      className: "layui-col-md12 color-999 mt-10",
+                      type: "template",
+                      value: item.notes,
+                    }
+                  ]
+                })
+            });
+            return setEventList(groupitem)
+          }
+  
+          self.page = false;
+          self.getToolbar.disableItem("isAll");
+        });
+  
+  
+        groupitem.getToolbar.on("onButtonClick", function (name) {
+          if (name == "selectAllBtn") {
+            var linkMap = groupitem.getToolbar.getItemValue("likeMap");
+            groupitem.listReload({ serviceName: linkMap, source: linkMap, method: linkMap })
+          }
+        });
+  
+        groupitem.getToolbar.on("onChange", function (name) {
+          if (name == "isAll") {
+            this.checkIds = [];
+            this.getListForm.forEachItem(function (names) {
+              if (names.indexOf("_check") !== -1) {
+                if (this.getToolbar.getDForm().isItemChecked(name)) {
+                  this.getListForm.getDForm().checkItem(names);
+                  this.checkIds.push(names.substr(7))
+                  this.groupBtn.classList.remove("disable")
+                } else {
+                  this.getListForm.getDForm().uncheckItem(names);
+                  this.groupBtn.classList.add("disable");
+                }
+              }
+            }.bind(this))
+          }
+        }.bind(groupitem));
+  
+        groupitem.groupBtn.onclick = function (e) {
+          if (this.classList.value == "disable" && groupitem.checkId.length > 0) return false
+          addResByGroup(groupitem.resUrl,groupitem.params.clientId, groupitem.checkIds.join(","))
+          groupitem.checkIds = [];
+          groupitem.getToolbar.getDForm().uncheckItem("isAll");
+          this.classList.add("disable");
+        }
+  
+      })
+  
+  
+  
+      function setEventList(paramsGropu) {
+        var getDForm = paramsGropu.getListForm.getDForm();
+        paramsGropu.getListForm.on("onButtonClick", function (name) {
+  
+          if (name.indexOf("id") !== -1) {
+  
+            getDForm.checkItem("_check-" + name.substr(3));
+  
+            layer.confirm("是否" + paramsGropu.groupBtnText + "?", {
+              btn: [_t("确定"), _t("取消")],
+              btn1: function (index) { 
+                addResByGroup(paramsGropu.resUrl, paramsGropu.params.clientId, name.substr(3));
+              },
+              btn2: function (index) {
+                getDForm.uncheckItem("_check-" + name.substr(3));
+  
+              }
+            })
+          }
+        });
+        paramsGropu.getListForm.on("onChange", function (name) {
+          paramsGropu.checkIds = [];
+  
+          if (name.indexOf("_check-") !== -1) {
+            this.checkIds = [];
+            var index = 0;
+            this.getListForm.forEachItem(function (names) {
+              if (names.indexOf("_check") !== -1) {
+                index += 1
+                var Checkname = names.substr(7);
+                var checkItem = getDForm.isItemChecked(names)
+                if (checkItem) {
+                  this.checkIds.push(Checkname)
+                }
+              }
+  
+            }.bind(this))
+  
+            if (this.checkIds.length > 0) {
+  
+              if (this.checkIds.length === index) {
+                this.getToolbar.getDForm().checkItem("isAll");
+  
+              } else {
+                this.getToolbar.getDForm().uncheckItem("isAll");
+  
+              }
+              this.groupBtn.classList.remove("disable")
+  
+            } else {
+              this.groupBtn.classList.add("disable");
+            }
+          }
+          //console.log(this.checkIds)
+  
+        }.bind(paramsGropu))
+  
+      }
+  
+  
+  
+  
+  
+      //分配资源给资源组方法
+      function addResByGroup(url, ids, resIds) {
+  
+        Prolog.ajax({
+          url: url,
+          type: "post",
+          data: {
+            id: ids,
+            groupIds: resIds
+          },
+          success: function (resource) {
+            if (resource.success) {
+              PlgDialog.msg("分配成功");
+              GroupList.listReload();
+              notGroupList.listReload();
+            } else {
+              PlgDialog.msg(resource.message);
+  
+            }
+          }
+        })
+      }
+  
+  
+  
+
+  
+    }()
+  
+  </script>

+ 501 - 0
plg-tms-std-web-vue/public/jq/pages/authorization/groupResource.html

@@ -0,0 +1,501 @@
+<div class="plg-tab-container ">
+  <div class="plg-flex" style="height: 100%">
+    <div class="layui-card plg-flex-item" style="flex: 0 0 auto;width: 33vw;">
+      <div class="layui-card-header">资源组列表</div>
+      <div class="layui-card-body" style="height: calc(100% - 0.42rem);">
+        <div id="group_list"></div>
+      </div>
+    </div>
+
+    <div class="layui-card plg-flex-item">
+      <div class="layui-card-header">分配资源信息</div>
+      <div class="layui-card-body plg-flex" style="height: calc(100% - 0.42rem); overflow: auto;">
+
+        <div id="notGrouplist" class="plg-flex-item" style="flex:1; height: 100%"></div>
+        <div class="plg-flex-item" style="height: 100%; flex: 0 0 auto;width:50px;">
+
+          <div class="btnForm">
+            <a id="notGroupListBtn" href="javascript:void(0)" class="disable">
+              <i class="layui-icon layui-icon-right"></i>
+            </a>
+            <a id="GroupListBtn" href="javascript:void(0)" class="disable">
+              <i class="layui-icon layui-icon-left"></i>
+            </a>
+          </div>
+        </div>
+
+        <div id="Grouplist" class="plg-flex-item" style="flex:1;height: 100%;"></div>
+
+      </div>
+    </div>
+
+
+
+
+  </div>
+
+
+</div>
+
+
+<style>
+</style>
+
+<script>
+
+  (function () {
+     window.global_fun.groupResource = {};
+
+    var res_opts = {
+      fixedLast: true,
+      renderer: "group_list",
+      url: APIS.groupResource.getList(),
+      type: "get",
+      formDataArea: [430, 250]
+      //pageNum: "pageNo",//设置分页参数页码key值,默认为pageNum
+    };
+
+
+    res_opts.columns = [
+      {
+        name: "id",
+        id: "id",
+        hidden: true
+      },
+      {
+        name: "资源组",
+        id: "name",
+        align: "left",
+        type: "ro"
+      },
+      {
+        name: "说明",
+        id: "notes",
+        align: "left",
+        type: "ro"
+      },
+      {
+        id: "op",
+        name: "操作",
+        type: 'button',
+        width: "120",
+        align: "center",
+        render: function (v, d) {
+          return '修改^global_fun.groupResource.editClick,删除^global_fun.groupResource.deleteClick';
+        }
+      }
+    ];
+
+
+
+    res_opts.toolbar = [{
+      type: 'row',
+      blockOffset: 0,
+      className: "layui-col-md12",
+      list: [
+        {
+          type: "row",
+          className: "layui-col-md7",
+          blockOffset: 0,
+          list: [{
+            className: "layui-col-md8",
+            type: "input",
+            name: "likeMap",
+            label: "",
+            placeholder: "服务名/地址"
+          },
+          {
+            type: "button",
+            className: "left",
+            name: "selectAllBtn",
+            value: PLG_BUTTON.value.searchBtn()
+          },
+          ]
+        },
+        {
+          type: "block",
+          className: "layui-col-md5 right",
+          blockOffset: 0,
+          list: [
+            {
+              type: "button",
+              name: "addBtn",
+              value: PLG_BUTTON.value.addBtn()
+            },
+            {
+              type: "newcolumn"
+            },
+            {
+              type: "button",
+              name: "delBtn",
+              className: "danger",
+              value: PLG_BUTTON.value.alldelBtn(),
+              disabled: true
+            }
+          ]
+        }]
+    }];
+    res_opts.formData = [{
+      type: "row",
+      list: [{
+        type: "settings",
+        labelWidth: 90,
+        position: "label-left",
+        labelAlign: "right"
+      },
+      {
+        type: "hidden",
+        name: "id",
+        label: "id",
+        value: 0,
+      },
+      {
+        type: "input",
+        name: "name",
+        label: "资源组",
+        //    disable:true,
+        required: true,
+        validate: 'NotEmpty',
+        placeholder: _t("请输入资源组名称")
+      },
+      { type: "input", name: "notes", validate: 'NotEmpty', required: true, label: "说明:", rows: 3, labelTop: -20, placeholder: "请填写这个服务是干什么用的" }
+      ]
+    }
+    ]
+
+
+    var res_inst = new GridPlant({
+      instance: new PlgGrid(setConfig(res_opts)).loadData(),
+      addBtnUrl: APIS.groupResource.groupAdd(),
+      editBtnUrl: APIS.groupResource.update(),
+      delBtnUrl: APIS.groupResource.groupDelete(),
+      downBtnUrl: APIS.resource.download(),
+      importBtnUrl: APIS.resource.import(),
+    }).init();
+
+    res_inst.delBtn = function (paramsObj = { ids: res_inst.idS }) {
+      res_inst.formatForm(3, "POST", _t("是否删除数据"), res_inst.delBtnUrl, paramsObj)
+    };
+
+    res_inst.selectAllBtnAfter(function (obj) {
+      var likeMap = res_inst.PlgGridInstance.getToolBarForm().getItemValue("likeMap");
+      obj.name = likeMap
+      obj.notes = likeMap
+      delete obj.likeMap
+
+    })
+    //单击行分配资源
+    res_inst.PlgGridInstance.on("onRowSelect",function(id){
+
+      
+      res_inst.PlgGridInstance.selectRowById(id);
+
+      notGroupList.url = APIS.resource.listnotingroup(),
+      notGroupList.params.groupId =id;
+      notGroupList.listReload();
+
+
+
+      GroupList.url = APIS.resource.listbygroup();
+      GroupList.params.groupId =id;
+      GroupList.listReload();
+      
+
+    })
+    res_inst.editBtnAfter(function (dform) {
+      dform.disableItem("name")
+    });
+
+
+    window.global_fun.groupResource.deleteClick = function () {
+      res_inst.PlgGridInstance.selectRowById(arguments[0]);
+      res_inst.delBtn()
+    };
+    window.global_fun.groupResource.editClick = function () {
+      res_inst.PlgGridInstance.selectRowById(arguments[0]);
+      res_inst.editBtn();
+    };
+
+
+
+    //分配资源给资源组方法
+    function addResByGroup(url, ids, resIds) {
+
+      Prolog.ajax({
+        url: url,
+        type: "post",
+        data: {
+          id: ids,
+          resourceIds: resIds
+
+        },
+        success: function (resource) {
+          if (resource.success) {
+            PlgDialog.msg("分配成功");
+            GroupList.listReload();
+            notGroupList.listReload();
+          } else {
+            PlgDialog.msg(resource.message);
+
+          }
+        }
+      })
+    }
+
+
+    var notGroupOpts = {
+      renderer: "notGrouplist",
+      skin: 2,
+      className: "flex_panel",
+      header: {
+        isShow: true,
+        title: "未分配资源",
+      },
+      // defaultBody: `<div id="listFrom_A"></div>`,
+      //page: true,
+      //  url: APIS.resource.getList(),
+      toolbar: [{
+        type: "row",
+        name: "tool",
+        list: [
+          {
+            type: "row",
+            className: "layui-col-md12",
+            list: [
+              {
+                className: "layui-col-md7",
+                type: "input",
+                name: "likeMap",
+                placeholder: "服务名/地址",
+              },
+              {
+                type: "button",
+                className: "left",
+                name: "selectAllBtn",
+                value: PLG_BUTTON.value.searchBtn(),
+              },
+              {
+                type: "checkbox",
+                className: "right",
+                name: "isAll",
+                labelWidth: "auto",
+                labelAlign: "left",
+                position: "label-right",
+                label: "全选",
+                disabled: true
+
+              }
+            ]
+          }
+        ]
+      }],
+      listFormData: [{
+        type: "row",
+        name: "res_panel_notgroup",
+        list: [
+          {
+            name: "notData",
+            type: "template",
+            className: "layui-col-md12 ",
+            format: function () {
+              return `<span>暂无数据</span>`
+            }
+          }
+
+        ]
+      }
+      ]
+    }
+    
+    
+    var GroupOpts = Object.assign({}, notGroupOpts, {
+      renderer: "Grouplist",
+      skin: 1,
+      header: {
+        isShow: true,
+        title: "已分配资源",
+      },
+    });
+    var notGroupList = new PlgPanel(notGroupOpts);
+    var GroupList = new PlgPanel(GroupOpts);
+
+
+    notGroupList.groupBtn = document.getElementById("notGroupListBtn");
+    notGroupList.groupBtnText = "添加资源";
+    notGroupList.resUrl = APIS.groupResource.addRes();
+
+    GroupList.groupBtn = document.getElementById("GroupListBtn");
+    GroupList.groupBtnText = "删除资源";
+    GroupList.resUrl = APIS.groupResource.removeRes();
+
+    var grouparr = [notGroupList, GroupList];
+
+    grouparr.forEach(function (groupitem) {
+
+      //请求列表数据的回掉
+      groupitem.done(function (self, data) {
+
+        if (data.list.length > 0) {
+
+          self.getListForm.hideItem("notData");
+          self.getToolbar.getDForm().uncheckItem("isAll");
+          self.page = true;
+          self.getToolbar.enableItem("isAll");
+          data.list.forEach(function (item) {
+            self.getListForm.getDForm().addItem("res_panel_notgroup",
+              {
+                type: "row",
+                className: "layui-col-md12 accr_list",
+                list: [
+                  {
+                    className: "layui-col-md7 lab-bold",
+                    name: "_check-" + item.id,
+                    type: "checkbox",
+                    labelWidth: "auto",
+                    labelAlign: "left",
+                    position: "label-right",
+                    label: item.serviceName,
+                  },
+                  {
+                    className: "layui-col-md3",
+                    name: "model",
+                    type: "template",
+                    value: item.method,
+                    style: "text-align: center"
+                  },
+                  {
+                    className: "right link layui-col-md2",
+                    type: "button",
+                    value: groupitem.groupBtnText,
+                    name: "id-" + item.id
+                  },
+                  {
+                    className: "layui-col-md12 color-999 mt-10",
+                    type: "template",
+                    value: item.source,
+                  }
+                ]
+              })
+          });
+          return setEventList(groupitem)
+        }
+
+        self.page = false;
+        self.getToolbar.disableItem("isAll");
+      });
+
+
+
+      groupitem.getToolbar.on("onButtonClick", function (name) {
+        if (name == "selectAllBtn") {
+          var linkMap = groupitem.getToolbar.getItemValue("likeMap");
+          groupitem.listReload({ serviceName: linkMap, source: linkMap, method: linkMap })
+        }
+      });
+
+      groupitem.getToolbar.on("onChange", function (name) {
+        if (name == "isAll") {
+          this.checkIds = [];
+          this.getListForm.forEachItem(function (names) {
+            if (names.indexOf("_check") !== -1) {
+              if (this.getToolbar.getDForm().isItemChecked(name)) {
+                this.getListForm.getDForm().checkItem(names);
+                this.checkIds.push(names.substr(7))
+                this.groupBtn.classList.remove("disable")
+              } else {
+                this.getListForm.getDForm().uncheckItem(names);
+                this.groupBtn.classList.add("disable");
+              }
+            }
+          }.bind(this))
+          console.log(this.checkIds)
+        }
+      }.bind(groupitem));
+
+
+
+      groupitem.groupBtn.onclick = function (e) {
+        if (this.classList.value == "disable" && groupitem.checkId.length > 0) return false
+        addResByGroup(groupitem.resUrl, groupitem.params.groupId, groupitem.checkIds.join(","))
+        groupitem.checkIds = [];
+        groupitem.getToolbar.getDForm().uncheckItem("isAll");
+        this.classList.add("disable");
+      }
+
+    })
+
+
+
+
+
+    function setEventList(paramsGropu) {
+      var getDForm = paramsGropu.getListForm.getDForm()
+      paramsGropu.getListForm.on("onButtonClick", function (name) {
+
+        if (name.indexOf("id") !== -1) {
+
+          getDForm.checkItem("_check-" + name.substr(3));
+
+          layer.confirm("是否" + paramsGropu.groupBtnText + "?", {
+            btn: [_t("确定"), _t("取消")],
+            btn1: function (index) {
+              addResByGroup(paramsGropu.resUrl, paramsGropu.params.groupId, name.substr(3));
+            },
+            btn2: function (index) {
+              getDForm.uncheckItem("_check-" + name.substr(3));
+
+            }
+          })
+        }
+      });
+      paramsGropu.getListForm.on("onChange", function (name) {
+        paramsGropu.checkIds = [];
+
+        if (name.indexOf("_check-") !== -1) {
+          this.checkIds = [];
+          var index = 0;
+          this.getListForm.forEachItem(function (names) {
+            if (names.indexOf("_check") !== -1) {
+              index += 1
+              var Checkname = names.substr(7);
+              var checkItem = getDForm.isItemChecked(names)
+              if (checkItem) {
+                this.checkIds.push(Checkname)
+              }
+            }
+
+          }.bind(this))
+
+          if (this.checkIds.length > 0) {
+
+            if (this.checkIds.length === index) {
+              this.getToolbar.getDForm().checkItem("isAll");
+
+            } else {
+              this.getToolbar.getDForm().uncheckItem("isAll");
+
+            }
+            this.groupBtn.classList.remove("disable")
+
+          } else {
+            this.groupBtn.classList.add("disable");
+          }
+        }
+        //console.log(this.checkIds)
+
+      }.bind(paramsGropu))
+
+    }
+
+
+
+
+
+
+
+
+
+  })()
+
+
+</script>

+ 375 - 0
plg-tms-std-web-vue/public/jq/pages/authorization/resource.html

@@ -0,0 +1,375 @@
+<div class="plg-tab-container">
+  <div class="plg-flex" style="height: 100%">
+      <div class="flex_item" id="resource">
+
+        
+      </div>
+</div>
+
+</div>
+
+
+<style>
+</style>
+
+<script>
+
+  (function () {
+    
+    window.global_fun.resource={}
+ 
+    var res_opts = {
+      fixedLast: true,
+      renderer: "resource",
+      url: APIS.resource.getList(),
+      type: "get",
+      // pageNum: "pageNo",//设置分页参数页码key值,默认为pageNum
+
+    };
+
+    res_opts.pagebar = {
+      buttons: [
+        { text: PLG_BUTTON.value.delBtn(), className: "layui-btn-danger plg-btn-height-auto", name: "delBtn" }
+      ]
+    },
+      res_opts.columns = [
+        {
+          name: "id",
+          id: "id",
+          hidden: true
+        },
+        {
+          name: "服务名称",
+          id: "serviceName",
+          align: "center",
+          type: "ro",
+          width:200
+        },
+        {
+          name: "请求访式",
+          id: "method",
+          align: "center",
+          type: "ro",
+          width:150
+        },
+
+        {
+          name: "地址路径",
+          id: "source",
+          align: "left",
+          type: "ro",
+          width:350
+        },
+        {
+          name: "说明",
+          id: "notes",
+          align: "left",
+          type: "ro",
+        },
+        {
+          id: "op",
+          name: "操作",
+          type: 'button',
+          width: 180,
+          align: "center",
+          render: function (v, d) {
+            return '修改^global_fun.resource.editClick,删除^global_fun.resource.deleteClick';
+          }
+        }
+      ];
+
+
+    res_opts.toolbar = [{
+      type: 'row',
+      blockOffset: 0,
+      className: "layui-col-md12",
+      list: [
+        {
+          type: "row",
+          className: "layui-col-md6",
+          blockOffset: 0,
+          list: [{
+            className: "layui-col-md4",
+            type: "input",
+            name: "likeMap",
+            label: "搜索",
+            placeholder: "服务名/请求方式/地址"
+          },
+          {
+            type: "button",
+            className: "left",
+            name: "selectAllBtn",
+            value: PLG_BUTTON.value.searchBtn()
+          },
+          {
+            type: "button",
+            name: "resetBtn",
+            className: "left",
+            value: PLG_BUTTON.value.resetBtn()
+          },
+          ]
+        },
+        {
+          type: "block",
+          className: "layui-col-md6 right",
+          blockOffset: 0,
+          list: [
+            {
+              type: "button",
+              name: "addBtn",
+              value: PLG_BUTTON.value.addBtn()
+            },
+            {
+              type: "newcolumn"
+            },
+            {
+              className: "upload",
+              type: "button",
+              name: "importBtn",
+              value: PLG_BUTTON.value.importBtn()
+            },
+  
+            {
+              type: "newcolumn"
+            },
+            {
+              type: "button",
+              name: "downBtn",
+              value: PLG_BUTTON.value.downBtn()
+            },
+            {
+              type: "newcolumn"
+            },
+            {
+              type: "button",
+              name: "aotuLoadBtn",
+              value: "加载资源"
+            }
+          ]
+        }]
+    }];
+
+
+    res_opts.formData = [{
+      type: "row",
+      list: [{
+        type: "settings",
+        labelWidth: 90,
+        position: "label-left",
+        labelAlign: "right"
+      },
+      {
+        type: "hidden",
+        name: "id",
+        label: "id",
+        value: 0,
+      },
+      {
+        type: "input",
+        name: "serviceName",
+        label: "服务名",
+        required: true,
+        validate: 'NotEmpty',
+        placeholder: _t("请输入服务名")
+      },
+      {
+        type: "input",
+        name: "source",
+        label: "接口地址",
+        required: true,
+        validate: "NotEmpty",
+        placeholder: _t("请输入接口地址")
+      },
+      {
+        type: "select",
+        name: "method",
+        label: "提交方式",
+        required: true,
+        options: [
+          { value: "GET", text: "GET", selected: true },
+          { value: "POST", text: "POST" },
+          { value: "PUT", text: "PUT" },
+          { value: "DELETE", text: "DELETE" }
+        ]
+      },
+      { type: "input", name: "notes", validate: 'NotEmpty', required: true, label: "说明:", rows: 3, labelTop: -20, placeholder: "请填写这个服务是干什么用的" }
+
+      ]
+    }
+    ]
+
+    var res_inst = new GridPlant({
+      instance: new PlgGrid(setConfig(res_opts)).loadData(),
+      addBtnUrl: APIS.resource.getResource(),
+      editBtnUrl: APIS.resource.update(),
+      delBtnUrl: APIS.resource.deleteAll(),
+      downBtnUrl: APIS.resource.download(),
+      importBtnUrl: APIS.resource.import(),
+    }).init();
+
+    
+    res_inst.selectAllBtnAfter(function (obj) {
+      var likeMap = res_inst.PlgGridInstance.getToolBarForm().getItemValue("likeMap");
+      obj.serviceName = likeMap
+      obj.method = likeMap
+      obj.source = likeMap
+      delete obj.likeMap
+
+    })
+
+
+    res_inst.PlgGridInstance.attachPageBarEvent(function () {
+      
+      this.delBtn({ids:this.idS});
+    }.bind(res_inst))
+
+    window.global_fun.resource.editClick = function () {
+      res_inst.PlgGridInstance.selectRowById(arguments[0]);
+      res_inst.editBtn();
+    }
+
+    window.global_fun.resource.deleteClick = function () {
+      res_inst.PlgGridInstance.selectRowById(arguments[0]);
+      res_inst.formatForm(3, "POST", _t("是否删除当前数据"), APIS.resource.delete(), { id: arguments[0] })
+    }
+
+    //自动加载配制
+    var aotu_opts = {
+      sysOpts: null,
+      renderer: Prolog.createRandomId(),
+      url: APIS.resource.getNameByList(),
+      type: "get",
+      page: false,
+      multiselect: false,
+      params: { serviceName: "" }
+    };
+    aotu_opts.toolbar = [
+      {
+        type: "row",
+        className: "layui-col-md12",
+        list: [
+          {
+            className: "layui-col-md12",
+            type: "combo",
+            name: "serviceName",
+            label: "选择服务",
+            remote: {
+              url: APIS.resource.getSysNames(),
+              type: "GET",
+              success: function (da) {
+
+                if (da.success && da.data != null && da.data.length > 0) {
+                  var myForm = res_inst.autoLoadInsta.getToolBarForm();
+                  var myCombo = myForm.getCombo("serviceName");
+                  myCombo.clearAll(false);
+                  var array = new Array();
+                  da.data.map(x => { array.push([x, x]) });
+                  myCombo.addOption(array);
+                  myCombo.setComboValue(da.data[0]);
+                }
+
+              }
+            },
+            options: null
+          }
+        ]
+      }
+    ]
+
+    aotu_opts.columns = [{
+      name: "id",
+      id: "id",
+      hidden: true
+    },
+    {
+      name: "服务名",
+      id: "serviceName",
+      align: "left",
+      type: "ro",
+      width:140,
+    },
+    {
+      name: "请求访式",
+      width:60,
+      id: "method",
+      align: "center",
+      type: "ro"
+    },
+
+    {
+      name: "地址路径",
+      id: "source",
+      align: "left",
+      type: "ro"
+    },
+    {
+      name: "说明",
+      id: "notes",
+      align: "left",
+      type: "ro"
+    }]
+
+
+    res_inst.aotuLoadBtn = function () {
+      var _this = this;
+      var v = ""
+      var winoptions = {
+        title: "加载资源",
+        closeBtn: 1,
+        closeBtn: 1,
+        type: 1,
+        resize: true,
+        tipsMore: true,
+        btn: [_t("加载"), _t("取消")],
+        btn1: function (index) {  
+          var close = PlgDialog.loading2();
+          Prolog.ajax({
+            type: "post",
+            url: APIS.resource.importInterface(),
+            data: { serviceName: v },
+            success: function (response) {
+              if (response.success) {
+                res_inst.PlgGridInstance.reload()
+                PlgDialog.close(index);
+                PlgDialog.msg("加载成功")
+              } else {
+                PlgDialog.msg(response.message)
+              }
+            },
+            complete :function(){
+              close()
+            }
+          });
+
+
+
+
+
+        },
+        btn2: function (param) { },
+        area: [800 + 'px', 600 + 'px'],
+        content: '<div id="' + aotu_opts.renderer + '"></div>',
+        success: function (lyaer, index) {
+          res_inst.autoLoadInsta = new PlgGrid(setConfig(aotu_opts));
+          var myForm = res_inst.autoLoadInsta.getToolBarForm();
+          var myCombo = myForm.getCombo("serviceName");
+          res_inst.autoLoadInsta.getToolBarForm().on("onChange", function () {
+            v = myCombo.getSelectedValue();
+            res_inst.autoLoadInsta.setParams({ serviceName: v });
+            res_inst.autoLoadInsta.reload();
+          })
+
+          myForm.loadComboData("serviceName");
+
+        }
+
+
+      }
+
+      PlgDialog.open(winoptions);
+    }
+
+
+  })()
+
+</script>

+ 440 - 0
plg-tms-std-web-vue/public/jq/pages/authorization/resourcegroup.html

@@ -0,0 +1,440 @@
+<div id="resourcegroup" class="plg-tab-container">
+	 
+	 <div class="layui-carousel plg-bgc-transparent" id="resourcegroup-carousel1">
+		  <div carousel-item>
+		  	<!--
+          作者:chenyongchao1027@163.com
+          时间:2018-11-29
+          描述:主页面
+        -->
+        <div class="layui-row layui-col-space5" id="plg-main-zone">
+          <div class="layui-col-xs8">
+            <div class="layui-card">
+                <div class="layui-card-header">权限组</div>
+                <div class="layui-card-body" style="height:calc(100vh - 167px);">
+                  <div id="resourcegroup-grid-1"></div>
+                </div>
+              </div>
+          </div>
+          <div class="layui-col-xs4">
+            <div class="layui-card">
+                <div class="layui-card-header">权限</div>
+                <div class="layui-card-body" style="height:calc(100vh - 167px);">
+                  <div id="resourcegroup-grid-2"></div>
+                </div>
+              </div>
+          </div>
+        </div>
+
+        <div>
+          <blockquote class="layui-elem-quote layui-text plg-elem-quote" style="background:#fff;">
+          为权限组<span id="resourceGroupName" class="plg-mark">Plg</span>分配权限<a href="javascript:void(0)" style="margin-left: 15px;" id="resourcegroup_details_cancel">关闭</a>
+          </blockquote>
+          <div id="resourcegroup-resource-grid-1" style="height:500px;" class="layui-form">
+          </div>
+        </div>
+		  	
+		</div>
+	</div>	
+</div>
+
+<div>
+<script>
+  (function () {
+    // cSpell:ignore layui api resourcegroup sourcegroup sourcegroup closetting pagebar confire makesure multiselect newcolumn prologui fdata cindex layero
+    var BASE_URL = '/api/service-authorization/group';
+    var myf = null;
+    var opts = {
+      columns: [{
+          id: "id",
+          name: "id",
+          type: 'ro',
+          width: "50",
+          hidden: true
+        },
+        {
+          id: "name",
+          name: "权限组名称",
+          type: 'ed',
+          width: "300"
+        },
+        {
+          id: "description",
+          name: "备注",
+          type: 'ed',
+          width: "*"
+        },
+        {id:"op",name:"操作",type:'button',align:"center",width:"150",render:function(v,record){
+   				return "选择权限^resourcegroup_detailClick";
+   		}}
+      ],
+      multiselect: false,
+      toolbar: [
+        {
+          type: "button",
+          name: "deleteBtn",
+          className: "danger plg-toolbar-right",
+          value: "<i class='layui-icon layui-icon-delete'></i>删除"
+        }, {
+          type: "newcolumn"
+        },
+        {
+          type: "button",
+          name: "updateBtn",
+          className: "normal plg-toolbar-right",
+          value: "<i class='layui-icon layui-icon-edit'></i>修改"
+        }, {
+          type: "newcolumn"
+        },
+        {
+          type: "button",
+          name: "addBtn",
+          offsetLeft: 10,
+          className: "plg-toolbar-right",
+          value: "<i class='layui-icon layui-icon-add-1'></i>添加"
+        }, {
+          type: "newcolumn"
+        },
+        {
+          type: "input",
+          name: 'name',
+          label: '权限组名称:',
+          width:300,
+          placeholder:'请输入权限组名称'
+        }, {
+          type: "newcolumn"
+        },
+        {
+          type: "button",
+          name: "searchBtn",
+          value: "查询"
+        }, {
+          type: "newcolumn"
+        },
+        {
+          type: "button",
+          name: "all",
+          className:'normal',
+          value: "所有"
+        }, {
+          type: "newcolumn"
+        }
+      ],
+      formData: [{
+          type: "settings",
+          inputWidth: 300,
+          width: 400,
+          labelWidth: 80,
+          position: "label-left",
+          labelAlign: "left"
+        },
+        {
+          type: "hidden",
+          name: "_method",
+          value: "put"
+        },
+        {
+          type: "hidden",
+          name: "id",
+          value: ""
+        },
+        {
+          type: "input",
+          name: 'name',
+          label: '权限组名称:',
+          placeholder: '请输入权限组名称',
+          editable: false,
+          validate: 'NotEmpty',
+          required: true
+        },
+        {
+          type: "hidden",
+          name: 'resourceIds',
+          value:" "
+        },
+        {
+          type: "input",
+          name: "description",
+          label: "备注:",
+          rows: 3,
+          validate: 'NotEmpty',
+          required: true,
+          note: {text:"请尽可能以功能来命名"}
+        }
+      ],
+      imagePath: "../../prologui/assets/PlgGrid",
+      url: BASE_URL, //数据接口
+      type: "get", //数据提交方式,默认为get
+      //filters:["#text_filter", "#select_filter","#numeric_filter","#text_filter","#text_filter"],
+      pagebar: {
+        type: 'full' //full simple
+      },
+      params: {
+        pageSize: 20,
+        pageNum: 1
+      }, //查询提交参数,分页参数默认为pageNum,pageSize
+      page: true, //是否启用分页
+      pageNum: "pageNum", //设置分页参数页码key值,默认为pageNum
+      totalCount: "totalCount" //总记录数字段,默认totalCount
+    };
+
+    var sourcegroup = new PlgGrid(opts);
+    sourcegroup.renderTo("resourcegroup-grid-1");
+    sourcegroup.loadData();
+
+    sourcegroup.attachToolBarEvent("onButtonClick", function (name) {
+      function deleteData() {
+
+        var cindex = layer.confirm('确认要删除选中记录吗?', {
+          title: "",
+          btn: ['确认删除', '取消'] //可以无限个按钮
+        }, function (index, layero) {
+          
+          var loading = PlgDialog.load();
+          Prolog.ajax({
+            url: BASE_URL+'/delete',
+            data: {
+              id: sourcegroup.getSelectedRowId()
+            },
+            type: "POST",
+            success: function (data) {
+              if (data.success) {
+                sourcegroup.reload();
+              } else {
+                layer.msg(data.message);
+              }
+              PlgDialog.close(loading);
+              PlgDialog.close(index);
+            },
+            error: function () {
+              PlgDialog.close(loading);
+              PlgDialog.close(index);
+            }
+          });
+        }, function () {PlgDialog.close(index);});
+      }
+
+      var operationGroup = {
+        searchBtn: function () {
+          var fdata = sourcegroup.getToolBarForm().getFormData();
+          sourcegroup.setParams(fdata);
+          sourcegroup.reload();
+        },
+        all: function () {
+          sourcegroup.getToolBarForm().clear();
+          sourcegroup.setParams({});
+          sourcegroup.reload();
+        },
+        addBtn: function () {
+          //console.log('添加权限组');
+          sourcegroup.showDialog(0, "添加", 430, 270, {
+            url: BASE_URL+'/add',
+            type: "post"
+          });
+          var gform = sourcegroup.getGridForm();
+          gform.setItemValue("_method","post");
+        },
+        updateBtn: function () {
+          sourcegroup.showDialog(1, "编辑", 430, 350, {
+            url: BASE_URL+'/update',
+            type: "post"
+          });
+        },
+        deleteBtn: function () {
+          deleteData();
+        },
+        columns: function () {
+          sourcegroup.showColsSettingDialog(".closetting");
+        }
+      }
+
+      if (name && operationGroup.hasOwnProperty(name)) {
+        operationGroup[name]();
+      }
+    })
+
+    // window.resource_editClick = function (rid, data) {
+    //   ////console.log(JSON.stringify(data));
+    //   sourcegroup.selectRowById(rid);
+    //   sourcegroup.showDialog(1, "编辑", 430, 350, {
+    //     url: BASE_URL,
+    //     type: "put"
+    //   });
+    //   return false;
+    // }
+
+    //window.resource_deleteClick = deleteData;
+   //权限
+   var list_options={
+	   		columns:[
+	   				{id:"id",name:"序列",hidden:true},
+	   	   			{id:"serviceName",name:"服务名"},
+	   	   			{id:"resource",name:"权限"}
+	   	   			],
+			page:true,
+			filters:["","#select_filter","#text_filter"],
+			pagebar:{
+	   			type:'simple' //full simple min
+	   		},
+			imagePath:"../codebase/images/",
+			toolbar:[]
+   	
+   };
+   var plgList = $("#resourcegroup-grid-2").initPlgGrid(list_options);
+   //plgList.loadData();
+   sourcegroup.on("onRowSelect",function(id){
+       var rids = sourcegroup.getSelectedRowData()["resourceIds"];
+       if(!rids){
+         return;
+       }
+   		console.log("tttt",rids);
+   		var res = rids.split(",");
+   		var ay = new Array();
+   		for(var i=0;i<res.length;i++){
+   			var data ={};
+   			var tp = res[i];
+   			data["id"] = i+1;
+   			data["serviceName"] = tp.substring(0,tp.indexOf(":"));
+   			data["resource"] = tp.substring(tp.indexOf(":")+1);
+   			ay.push(data);
+   		}
+   		plgList.setParams({pageSize: res.length,pageNum:1});
+   		plgList.reload({"success":true,"message":"","data":{"list":ay,"totalCount":res.length}});
+   });
+   
+   
+  var tt = "add";
+	function changePanel(){
+		car.slide(tt);
+		tt = tt=="sub"?"add":"sub";
+  }
+	$("#resourcegroup").on("click", "#resourcegroup_details_cancel", function(){
+    //console.log('监听返回');
+		sourcegroup.reload();
+		changePanel();
+  });
+  
+	window.resourcegroup_detailClick = function(id,data){
+		sourcegroup.selectRowById(id);
+		changePanel();
+		var selectData = sourcegroup.getSelectedRowData();
+		initResourcGrid(selectData);
+    $('#resourceGroupName').html(selectData.name);
+	}
+	
+	var carousel = layui.carousel;
+  	var car = carousel.render({
+    	elem: '#resourcegroup-carousel1',
+    	autoplay:false,
+    	index:0,
+    	arrow:'none',
+    	indicator:'none',
+    	anim:"updown",
+    	width: '100%', //设置容器宽度
+    	height:'100%'
+  	});
+  	
+  	function initResourcGrid(selectData){
+  		var opts00 = {
+			//title:"权限管理",
+	   		columns:[
+           {id:"id",name:"id",type:'ro',width:"50",hidden:true},
+           {id:"op",name:"选择",width:"90",type:"ro",align:"center",render:function(v,record){
+            // 选中的数据格式 001,002,20181203002test:002 
+            var rids = selectData["resourceIds"];
+            var checked = '';
+            if(rids && rids.indexOf(record["id"])>-1){
+              checked = 'checked=""';
+            }
+	   				return '<input type="checkbox" lay-filter="op" '+ checked +' value="'+(record["id"])+'" lay-skin="switch" lay-text="ON|OFF">';
+	   			}},
+	   			{id:"serviceName",name:"服务名",type:'ed',width:"200"},
+	   			{id:"authNumber",name:"权限编号",type:'ed',width:"200"},
+	   			{id:"source",name:"资源地址",type:'ed',width:"100"},
+	   			{id:"method",name:"提交方式",type:'ed',width:"100"},
+	   			{id:"notes",name:"备注",type:'ed',width:"*"}
+	   			],
+	   		multiselect:false,
+	   		toolbar:[
+	   			{type: "settings", labelAlign:'left', labelWidth: 65},
+	   			{type:"block",id:"bk",blockOffset:0,list:[
+	   				{type: "input", name: 'serviceName', label: '服务名称:',offsetLeft:5,placeholder:'请输入服务名称', width:300},{type: "newcolumn"},
+			          {type:"input", name:"authNumber", label:"权限编号:",offsetLeft:10,placeholder:'请输入权限编号', width:300},{type: "newcolumn"},
+			          {type:"input", name:"source", label:"资源地址:",offsetLeft:10,placeholder:'请输入资源地址', width:300,hidden:true},{type: "newcolumn"},
+			          {type:"button", name:"searchBtn", value:"查询"}, {type: "newcolumn"},
+			          {type:"button", name:"all", value:"重置",className:"normal"},{type: "newcolumn"},
+			          {type:"button", name:"more2", value:"展开",className:"link toggle"}
+	   			]}
+	   		],
+	   		imagePath:"../../prologui/assets/PlgGrid",
+	   		url:"/api/service-authorization/resource/list",//数据接口
+	   		type:"get",//数据提交方式,默认为get
+	   		pagebar:{
+	   			type:'full' //full simple min
+	   		},
+			params:{pageSize:10,pageNum:1},//查询提交参数,分页参数默认为pageNum,pageSize
+			page:true, //是否启用分页
+			pageNum:"pageNum",//设置分页参数页码key值,默认为pageNum
+			totalCount:"totalCount" //总记录数字段,默认totalCount
+	  	};
+
+      var augrid00 = new PlgGrid(opts00);
+      augrid00.renderTo("resourcegroup-resource-grid-1");
+      augrid00.loadData(null,function(){
+        form.render();
+      });
+      augrid00.attachToolBarEvent("onButtonClick",function(name){
+        if(name=="searchBtn"){
+          var fdata = augrid00.getToolBarForm().getFormData();
+          augrid00.setParams(fdata);
+          augrid00.reload();
+        }
+      });
+  	}
+  	
+  var form = layui.form;
+  form.on('switch(op)', function(data){
+
+      var sid = sourcegroup.getSelectedRowId();
+      
+      // //console.log('sid::' + sid);
+      //console.log(data);
+  		if(data.elem.checked){
+  			var ld = PlgDialog.load();
+  			Prolog.ajax({
+  				url:"/api/service-authorization/group/recources/add",
+  				type:"post",
+  				data:{"id":sid,"resourceIds":data.value},
+  				success:function(da){
+  					PlgDialog.close(ld);
+  					if(!da.success){
+  						PlgDialog.alert("操作失败,"+da.message);
+  					}
+  				},
+  				error:function(){
+  					PlgDialog.close(ld);
+  				}
+  			});
+  			////console.log(data.value); //开关value值,也可以通过data.elem.value得到
+  		}else{
+  			var ld = PlgDialog.load();
+  			Prolog.ajax({
+  				url:"/api/service-authorization/service-resource/resourcegroup/"+sid+"/removeresource ",
+  				type:"post",
+  				data:{"resource":data.value},
+  				success:function(da){
+  					PlgDialog.close(ld);
+  					if(!da.success){
+  						PlgDialog.alert("操作失败,"+da.message);
+  					}
+  				},
+  				error:function(){
+  					PlgDialog.close(ld);
+  				}
+  			});
+  		}
+	}); 
+  	
+  }());
+</script>
+</div>

+ 119 - 0
plg-tms-std-web-vue/public/jq/pages/bpm/activitiDefine.html

@@ -0,0 +1,119 @@
+<div id="activitiDefineDIV" class="plg-tab-container">
+	<div id="activitiDefine"  class="grid-container-full"></div>
+</div>
+			<script type="text/javascript">
+				var $ = layui.jquery,
+					upload = layui.upload;
+
+				var opts = {
+					skin: "terrace",
+					columns: [
+						{
+							id: "processDefineId",
+							name: "processDefineId",
+							type: 'txt',
+							hidden: true
+						},
+						{
+							id: "processDefineName",
+							name: "流程实例定义名称",
+							type: 'ro',
+							width: 150
+						},
+						{
+							id: "processDefineKey",
+							name: "key值",
+							type: 'ro',
+							width: 200
+						},
+						{
+							id: "description",
+							name: "描述",
+							type: 'ro',
+							width: 150
+                        },
+                        {
+							id: "resourceName",
+							name: "xml文件名",
+							type: 'ro',
+							width: 150
+                        },
+                        {
+							id: "diagramResourceName",
+							name: "png文件名",
+							type: 'ro',
+							width: '*'
+						}
+						// {
+						// 	id: "",
+						// 	name: "操作",
+						// 	type: 'ro',
+						// 	width: 160,
+						// 	render: function(v, d) {
+						// 		return '<a href="javascript:void(0);" style="color: dodgerblue;" onclick="delactivitiDeployment(\'' + d["id"] + '\')">删除</a>';
+						// 	}
+						// }
+					],
+					imagePath: "/prologui/assets/PlgGrid",
+					url: "/api/service-activiti/activiti/processDefine", //数据接口
+					type: "get", //数据提交方式,默认为get
+					params: {
+						pageNum: 1,
+						pageSize: 10,
+						defineName: null
+					}, //查询提交参数,分页参数默认为pageNum,pageSize
+					multiselect: false, //是否支持多选
+					page: true, //是否启用分页
+					toolbar:[
+						{type: "input", name: 'defineName', label: '流程定义名称:',placeholder: '请输入流程定义名称'},{type: "newcolumn"}
+						,{type:"button", name:"searchBtn", value:"查询", offsetLeft:10},{type: "newcolumn"}   
+					],
+					totalCount: "totalCount" //总记录数字段,默认totalCount
+					  
+				};
+				var activitiDefine = new PlgGrid(opts);
+				activitiDefine.renderTo("activitiDefine");
+				activitiDefine.loadData(); 
+				
+				activitiDefine.attachToolBarEvent("onButtonClick", function(name){
+					if(name == "searchBtn"){
+						search();
+					}
+				});
+
+				function search(){
+					// var defineName = $("#defineName").val();
+					// var am = activitiDefine.getParams();
+					// am.defineName = defineName;
+					// activitiDefine.loadData();
+
+					var defineName = $("input[name='defineName']").val();
+					var am = activitiDefine.getParams();
+					am.defineName = defineName;
+					activitiDefine.reload();
+				}
+
+				function delactivitiDeployment(deploymentId) {
+
+					layer.confirm('确定删除?', {
+						btn: ['确定', '取消'],
+
+					}, function(index, layero) {
+						//按钮【按钮一】的回调
+						$.ajax({
+							type: 'GET',
+							url: "/api/service-activiti/activiti/deldeploy",
+							data: {
+                                deploymentId : deploymentId
+							},
+							async: false,
+							success: function(data) {
+								activitiDefine.reload();
+								alert(data.message);
+							}
+						});
+						layer.close(index)
+					});
+
+				};
+			</script>

+ 104 - 0
plg-tms-std-web-vue/public/jq/pages/bpm/activitiDeployment.html

@@ -0,0 +1,104 @@
+<div id="activitiDeployment" class="plg-tab-container">
+	<div id="activitiDeployment-grid-1"  class="grid-container-full"></div>
+</div>
+
+			<script type="text/javascript">
+				var $ = layui.jquery,
+					upload = layui.upload;
+
+				var opts = {
+					skin: "terrace",
+					columns: [
+						{
+							id: "id",
+							name: "id",
+							type: 'txt',
+							hidden: true
+						},
+						{
+							id: "name",
+							name: "部署名称",
+							type: 'ro',
+							width: 200
+						},
+						{
+							id: "category",
+							name: "部署类目",
+							type: 'ro',
+							width: 200
+						},
+						{
+							id: "deploymentTime",
+							name: "部署时间",
+							type: 'ro',
+							width: '*'
+						}
+					],
+					imagePath: "/prologui/assets/PlgGrid",
+					url: "/api/service-activiti/model/deployment", //数据接口
+					type: "get", //数据提交方式,默认为get
+					params: {
+						pageNum: 1,
+						pageSize: 10,
+						deployName: null
+					}, //查询提交参数,分页参数默认为pageNum,pageSize
+					multiselect: false, //是否支持多选
+					page: true, //是否启用分页
+					toolbar:[
+						{type:"button", name:"deleteBtn", className: "danger", value:"<i class='layui-icon layui-icon-delete'></i>删除"},{type: "newcolumn"},
+						{type: "input", name: 'deployName', label: '部署名称:', placeholder: '请输入部署名称', offsetLeft:20},{type: "newcolumn"}
+						,{type:"button", name:"searchBtn", value:"查询"},{type: "newcolumn"}   
+					],
+					totalCount: "totalCount" //总记录数字段,默认totalCount
+					  
+				};
+				var activitiDeployment = new PlgGrid(opts);
+				activitiDeployment.renderTo("activitiDeployment-grid-1");
+				activitiDeployment.loadData();  
+
+				activitiDeployment.attachToolBarEvent("onButtonClick", function(name){
+					if(name == "deleteBtn"){
+						delactivitiDeployment();
+					}else if(name == "searchBtn"){
+						search();
+					}
+				});
+
+				function search(){
+					var deployName = $("input[name='deployName']").val();
+					var am = activitiDeployment.getParams();
+					am.deployName = deployName;
+					activitiDeployment.reload();
+				}
+
+				function delactivitiDeployment() {
+
+					var deploymentId = activitiDeployment.getSelectedRowId();
+
+					if(!deploymentId){
+						layer.msg("请选择一条数据");
+						return;
+					}
+					layer.confirm('确定删除?', {
+						btn: ['确定', '取消'],
+
+					}, function(index, layero) {
+						//按钮【按钮一】的回调
+						$.ajax({
+							type: 'GET',
+							url: "/api/service-activiti/activiti/deldeploy",
+							data: {
+                                deploymentId : deploymentId
+							},
+							async: false,
+							success: function(data) {
+								activitiDeployment.reload();
+								alert(data.message);
+							}
+						});
+						layer.close(index)
+					});
+
+				};
+			</script>
+

+ 66 - 0
plg-tms-std-web-vue/public/jq/pages/bpm/activitiExample.html

@@ -0,0 +1,66 @@
+<div id="activitiExample" class="plg-tab-container">
+	<blockquote class="layui-elem-quote layui-text plg-elem-quote" style="background:#fff;">
+    流程实例使用教程
+  </blockquote>
+
+  <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
+    <legend>示列:用户请假表单</legend>
+  </fieldset>
+   
+  <form class="layui-form" action="">
+    <div class="layui-form-item">
+      <label class="layui-form-label">请假人</label>
+      <div class="layui-input-block">
+        <input type="text" name="username" autocomplete="off" lay-verify="required" placeholder="请输入请假人名称" class="layui-input">
+      </div>
+    </div>
+    <div class="layui-form-item">
+      <label class="layui-form-label">时间</label>
+      <div class="layui-input-block">
+        <input type="text" name="day" lay-verify="required" placeholder="请输入请假天数" autocomplete="off" class="layui-input">
+      </div>
+    </div>
+    <div class="layui-form-item layui-form-text">
+      <label class="layui-form-label">请假原因</label>
+      <div class="layui-input-block">
+        <textarea name="reason" lay-verify="required" placeholder="请输入请假原因" class="layui-textarea"></textarea>
+      </div>
+    </div>
+    
+    <div class="layui-form-item">
+      <div class="layui-input-block">
+        <button class="layui-btn" lay-submit="" lay-filter="demo1">立即提交</button>
+        <button type="reset" class="layui-btn layui-btn-primary">重置</button>
+      </div>
+    </div>
+  </form>
+</div>
+
+<script>
+$(function(){
+  var form = layui.form,
+  layer = layui.layer;
+  
+  //监听提交
+  form.on('submit(demo1)', function(data){
+//  layer.alert(JSON.stringify(data.field), {
+//    title: '最终的提交信息'
+//  })
+    //请求后台
+    Prolog.ajax({
+            url: "/api/askforleave-service/askforleave/employ",
+            type: "POST",
+            data: {
+            	"employName":data.field.username,
+				"holidaytime":data.field.day,
+				"reason":data.field.reason
+            },
+            success:function(da){
+                alert(da.data);
+            }
+         });
+	return false;
+  });
+  
+});
+  </script>

+ 257 - 0
plg-tms-std-web-vue/public/jq/pages/bpm/activitiInstance.html

@@ -0,0 +1,257 @@
+
+<div class="plg-tab-container">
+<div id="activitiInstance">
+
+			<!-- <img id="bpmn"> -->
+		
+		<div id="activitiProcessInstanceDIV" style="height:600px;">
+			<div id="activitiProcessInstance" ></div>
+		</div>
+		
+	      
+		<form id="form1" style="display: none;margin-top: 10px;">
+				<div class="layui-form-item">
+					<div class="layui-input-block">
+						<input type="text" value="删除原因"><input type="text" id="reason" name="reason" lay-verify="required" placeholder="必填" autocomplete="off" class="layui-input">
+					</div>
+				</div>
+		</form>
+
+		<!--实例详情-->
+			<div id="test111" style="display: none;height: 100%;width: 100%;">
+				<div id="AIdetailinfo" ></div>
+				<div>
+					<img id="png">
+				</div>
+			</div>
+			
+		</div>
+
+  </div>
+
+	<script type="text/javascript">
+
+	(function($){
+
+		var parent=	$("#activitiInstance");
+		var form=parent.find("#form1");
+		
+
+		//渲染流程实例信息页面
+		var opts = {
+			skin: "terrace",
+			columns: [
+				{id: "id",name: "状态",type: 'ro',width: 150,render:function(v,record){
+					
+					if(record.endTime == null || record.endTime ==''){
+						return "进行中";
+					}else{
+						return "已完成";
+					}
+				}},
+				{id: "id",name: "id",type: "txt",width: 150},
+				{id: "name",name: "流程实例名称",type: "ro",width: 150},
+				{id: "businessKey",name: "业务键",type: 'ro',width: 150},
+				{id: "processDefinitionId",name: "流程定义id",type: 'ro',width: 150},
+				{id: "processDefinitionName",name: "流程定义名称",type: 'ro',width: 150},
+				{id: "processDefinitionKey",name: "流程定义key",type: 'ro',width: 150},
+				{id: "processDefinitionVersion",name: "流程定义版本",type: 'ro',width: 150},
+				{id: "startTime",name: "流程开始时间",type: 'ro',width: 150},
+				{id: "endTime",name: "流程结束时间",type: 'ro',width: 150},
+				{id: "deleteReason",name: "删除原因",type: 'ro',width: 150},
+				{id: "description",name: "描述",type: 'ro',width: 150}
+			],
+			imagePath: "/prologui/assets/PlgGrid",
+			url: "/api/service-activiti/activiti/historyInstanceAll", //数据接口
+			type: "get", //数据提交方式,默认为get
+			params: {
+						pageNum: 1,
+						pageSize: 10,
+						instanceName: null,
+						status:null
+					}, //查询提交参数,分页参数默认为pageNum,pageSize
+			multiselect: false, //是否支持多选
+			page: true, //是否启用分页
+			toolbar:[
+        {type:"button", name:"detailBtn", className: "normal", value:"<i class='layui-icon layui-icon-form'></i>详情"},{type: "newcolumn"},
+        {type:"button", name:"downLoad", className: "normal", value:"<i class='layui-icon layui-icon-download-circle'></i>下载bpmn"},{type: "newcolumn"},
+        {type:"button", name:"delBtn", className: "danger", value:"<i class='layui-icon layui-icon-delete'></i>删除"},{type: "newcolumn"},
+        {type: "input", name: 'instanceName', label: '流程定义名称:', placeholder: '请输入流程定义名称', offsetLeft:10},{type: "newcolumn"},
+        {type: "select", name: "status", label: "完成状态", options:[
+            {value: "", text: ""},
+            {value: "running", text: "未完成"},
+            {value: "over", text: "已完成"}
+          ], offsetLeft:10},{type: "newcolumn"},
+        {type:"button", name:"searchBtn", value:"查询", offsetLeft:10 },{type: "newcolumn"}
+      ],
+			totalCount: "totalCount" //总记录数字段,默认totalCount
+		}
+
+		var activitiProcessInstance = new PlgGrid(opts);
+		activitiProcessInstance.renderTo("activitiProcessInstance");
+		activitiProcessInstance.loadData();
+
+		activitiProcessInstance.attachToolBarEvent("onButtonClick", function(name){
+					if(name == "delBtn"){
+						delInstance();
+					}else if(name == "detailBtn"){
+						detail();
+					}else if(name == "searchBtn"){
+						search();
+					}else if(name == "downLoad"){
+						downLoadBPMN();
+					}
+		});
+		
+		function downLoadBPMN(){
+			var processInstanceId = activitiProcessInstance.getSelectedRowId();
+
+			if(!processInstanceId){
+				layer.msg("请选择一条数据");
+				return;
+			}
+			window.location.href = "/api/service-activiti/activiti/resource?modelId="+processInstanceId;
+//			$.ajax({
+//              url:"/api/service-activiti/activiti/resource?modelId="+processInstanceId,
+//              type:"get",
+//              success:function(res){
+//                  layer.msg("成功");
+//                      },
+//              error:function(e){
+//                  layer.msg("error");
+//              }
+//          });
+		}
+
+		function delInstance(){
+			var processInstanceId = activitiProcessInstance.getSelectedRowId();
+
+			if(!processInstanceId){
+				layer.msg("请选择一条数据");
+				return;
+			}
+			
+			
+		  layer.prompt({title: '请输入删除原因', formType: 2}, function(text, index){
+		    layer.close(index);
+		    $.ajax({
+					type: 'POST',
+					url: "/api/service-activiti/activiti/deleteInstance",
+					data: {
+						processInstanceId:processInstanceId,
+						deleteReason:text
+					},
+					async: false,
+					success: function(data) {
+						layer.closeAll();
+						activitiProcessInstance.reload();
+						layer.msg(data.message);
+				}
+			});
+		  });
+			
+			
+		}
+
+		var detailOpt = {
+				skin: "terrace",
+				columns: [
+//					{id: "taskDefinitionKey",name: "流程活动",type: "txt",width: 50}, 
+					{id: "taskId",name: "id",type: "txt",width: 50}, 
+					{id: "taskName",name: "流程活动名称",type: 'ro',width: 150},
+					{id: "assignee",name: "流程活动定义的处理人",type: 'ro',width: 150},
+					{id: "startTime",name: "开始时间",type: 'ro',width: 150},
+					{id: "endTime",name: "结束时间",type: 'ro',width: 150},
+					{id: "description",name: "描述",type: 'ro',width: '*'}
+				],
+				imagePath: "/prologui/assets/PlgGrid",
+				url: "/api/service-activiti/activiti/activityInstance", //数据接口
+				type: "get", //数据提交方式,默认为get
+				params: {
+						instanceId:null
+						}, //查询提交参数,分页参数默认为pageNum,pageSize
+				multiselect: false, //是否支持多选
+				page: true, //是否启用分页
+				totalCount: "totalCount" //总记录数字段,默认totalCount
+			}
+			
+		//双击
+		activitiProcessInstance.on("onRowDblClicked",function(){
+			detail();
+		});	
+				
+		//查看流程实例详情信息
+		function detail(){
+			
+			var processInstanceId = activitiProcessInstance.getSelectedRowId();
+			var detailForm = parent.find("#AIdetailinfo");
+			if(!processInstanceId){
+				layer.msg("请选择一条数据");
+				return;
+			}
+
+			//获取png图片路径
+			var png = null;
+			$.ajax({
+					type: 'get',
+					url: "/api/service-activiti/activiti/png",
+					data: {
+						instanceId:processInstanceId,
+					},
+					async: false,
+					success: function(data) {
+						// alert(data.data);
+						png = data.data;
+						//$("#png").attr('src',"file://"+pngsrc);
+						//$("#png").attr('src',"data:image/png;base64,"+png);
+					}
+			});
+			layer.open({
+				type:1,
+				title: '详情页'
+				,content: `<div id="activitiInstance-alert-from" style="height:50%;"></div> <div id="png" style="display: inline-block; margin-top: 40px; width: 100%; height: 100%; overflow: auto;"><img id="activitipng" style="height:100%;"></div>`
+				,area: ['900px', '600px']
+				,anim: 2
+				,shadeClose: true
+				,success :function(index, layero){
+					
+						detailOpt.params={
+							instanceId:processInstanceId
+						}
+						//console.log(index)
+						var detailV9 = new PlgGrid(detailOpt);
+						detailV9.renderTo("activitiInstance-alert-from");
+						detailV9.loadData();
+
+						//加载图片
+						$("#activitipng").attr('src',"data:image/png;base64,"+png);
+				},
+				yes:function(index, layero){
+					layer.close(index);
+				}
+				
+				
+			}); 
+		}
+
+		function downpng(){
+			
+		}
+
+		function search(){
+			// var instanceName = parent.find("#instanceName").val();
+			// var am = activitiProcessInstance.getParams();
+			// am.deployName = deployName;
+			// activitiProcessInstance.loadData();
+			var instanceName = $("input[name='instanceName']").val();
+			var status = $("select[name='status']").val();
+			var am = activitiProcessInstance.getParams();
+			am.instanceName = instanceName;
+			if(!(status == null || status == "")){
+				am.status = status;
+			}
+			activitiProcessInstance.reload();
+		}
+
+		})($)			
+	</script>

+ 349 - 0
plg-tms-std-web-vue/public/jq/pages/bpm/activitiModel.html

@@ -0,0 +1,349 @@
+
+
+		<div id="activitiModel" class="plg-tab-container">
+			<div style="display: none;">
+				<button type="button" class="layui-btn layui-btn-sm" id="test3"><i class="layui-icon"></i>上传文件</button>
+			</div>
+			<div id="activitiModel-table"  class="grid-container-full"></div>
+
+			<form id="form1" style="display: none;margin-top: 10px;">
+				<input id="id" name="id" type="hidden" />
+				<div class="layui-form-item">
+					<label class="layui-form-label">模型名称</label>
+					<div class="layui-input-block">
+						<input type="text" id="name" name="name" lay-verify="required" placeholder="必填" autocomplete="off" class="layui-input">
+					</div>
+				</div>
+				<div class="layui-form-item">
+					<label class="layui-form-label">key值</label>
+					<div class="layui-input-block">
+						<input type="text" id="key" name="key" lay-verify="required" placeholder="必填" autocomplete="off" class="layui-input">
+					</div>
+				</div>
+				<div class="layui-form-item">
+					<label class="layui-form-label">类目</label>
+					<div class="layui-input-block">
+						<input type="text" id="category" name="category" lay-verify="required" placeholder="必填" autocomplete="off" class="layui-input">
+					</div>
+				</div>
+				<div class="layui-form-item">
+					<label class="layui-form-label">描述</label>
+					<div class="layui-input-block">
+						<input type="text" id="desc" name="desc" lay-verify="required" placeholder="选填" autocomplete="off" class="layui-input">
+					</div>
+				</div>
+			</form>
+			</div>
+
+			<script type="text/javascript">
+
+		(function($){
+			
+			var PopupsData = {
+			toolbar: [
+			  {type: "settings", labelAlign:'left', labelWidth: 65},
+			  {type: "input", name: 'serviceName', label: '服务名称:',offsetLeft:5,placeholder:'请输入服务名称', width:300},{type: "newcolumn"},
+			  {type:"button", name:"searchBtn", value:"查询"}
+			],
+			columns:[
+			  {id:"id",name:"id",type:'ro',width:"50",hidden:true},
+			  {id:"serviceName",name:"服务名",type:'ed',width:"200"},
+			  {id:"authNumber",name:"权限编号",type:'ed',width:"200"},
+			  {id:"source",name:"资源",type:'ed',width:"100"},
+			  {id:"method",name:"提交方式",type:'ed',width:"100"}
+			],
+			multiselect:false,
+			imagePath:"../../prologui/assets/PlgGrid",
+			url:"/api/service-authorization/resource/list",//数据接口
+			type:"get",//数据提交方式,默认为get
+			pagebar:{
+			  type:'simple' //full simple min
+			},
+			params:{ pageSize:8, pageNum:1},//查询提交参数,分页参数默认为pageNum,pageSize
+			page:true, //是否启用分页
+			beforeLoad:function(t){
+				t.params.pageSize=2;
+			},
+			pageNum: "pageNum",//设置分页参数页码key值,默认为pageNum
+			totalCount:"totalCount" //总记录数字段,默认totalCount
+		};
+
+					var parent=	$("#activitiModel");
+					var form=parent.find("#form1")	
+
+				var $ = layui.jquery,
+					upload = layui.upload;
+
+				var opts = {
+					skin: "terrace",
+					columns: [
+						{id: "id",name: "id",type: 'txt',hidden: true},
+						{
+							id: "name",
+							name: "模型名称",
+							type: 'ro',
+							width: 150
+						},
+						{
+							id: "key",
+							name: "key值",
+							type: 'ro',
+							width: 150
+						},
+						{
+							id: "category",
+							name: "类目",
+							type: 'ro',
+							width: 120
+						},
+						{
+							id: "createTime",
+							name: "创建时间",
+							type: 'ro',
+							width: 120
+						},
+						{
+							id: "span",
+							name: "dd",
+							type: 'selectTable',
+							table:PopupsData,
+							fieldText:"serviceName",
+							fieldValue:["serviceName","source"],
+							width: '*'
+						}
+//						,
+//						{
+//							id: "editorSourceValueId",
+//							name: "editorSourceValueId",
+//							type: 'txt',
+//							hidden: true
+//						}
+						// ,
+						// {
+						// 	id: "",
+						// 	name: "操作",
+						// 	type: 'ro',
+						// 	width: 160,
+						// 	render: function(v, d) {
+						// 		return '<a href="javascript:void(0);" style="color: dodgerblue;" onclick="delActivitiModel(\'' + d["id"] + '\')">删除</a>'
+						// 			+ ' | <a href="javascript:void(0);" style="color: dodgerblue;" onclick="deployActivitiModel(\'' + d["id"] + '\')">部署</a>';
+						// 	}
+						// }
+					],
+					imagePath: "/prologui/assets/PlgGrid",
+					url: "/api/service-activiti/model/model", //数据接口
+					type: "get", //数据提交方式,默认为get
+					params: {
+						pageNum: 1,
+						pageSize: 10,
+						modelName: null
+					}, //查询提交参数,分页参数默认为pageNum,pageSize
+					multiselect: false, //是否支持多选
+					page: true, //是否启用分页
+					toolbar:[
+						{type:"button", name:"addBtn", value:"<i class='layui-icon layui-icon-add-1 layui-anim-scale'></i>添加"},{type: "newcolumn"},
+//						{type:"button", name:"updateBtn",  value:"<i class='layui-icon layui-icon-edit'></i>修改"},{type: "newcolumn"},
+						{type:"button", name:"upload", className: "normal", value:"<i class='layui-icon layui-icon-upload-circle'></i>上传"},{type: "newcolumn"},
+						{type:"button", name:"deployBtn", className: "normal", value:"<i class='layui-icon layui-icon-engine'></i>部署"},{type: "newcolumn"},
+						{type:"button", name:"deleteBtn", className: "danger", value:"<i class='layui-icon layui-icon-delete'></i>删除"},{type: "newcolumn"},
+
+//						{type:"button", name:"download", value:"<i class='layui-icon layui-icon-download-circle'></i>下载"},{type: "newcolumn"},
+						{type: "input", name: 'modelName', label: '模型名称:', placeholder:'请输入模型名称', offsetLeft:20},{type: "newcolumn"}
+						,{type:"button", name:"searchBtn",  value:"查询"},{type: "newcolumn"}   
+					],
+					formData:[
+						{type:"settings",inputWidth :300,width:400,labelWidth:80,position:"label-left",labelAlign:"left"},
+					 	{type: "hidden", name:"id", value:""},
+            {type: "input", name: 'name', label: '名称:',validate:"NotEmpty", required: true, placeholder:'请输入名称', editable:false},
+            {type:"input", name:"key", label:"模型key:",validate:"NotEmpty", required: true, placeholder:'请输入模型key'},
+            {type:"input", name:"category", label:"分类:",validate:"NotEmpty", required: true, placeholder:'请输入模型类型'},
+            {type:"input", name:"desc", label:"描述:", rows:3}
+					],
+					totalCount: "totalCount" //总记录数字段,默认totalCount
+					  
+				};
+				var activitiModel = new PlgGrid(opts);
+				activitiModel.renderTo("activitiModel-table");
+				activitiModel.loadData();
+				//activitiModel.getGrid().enableEditEvents(true,false,false);
+
+				activitiModel.attachToolBarEvent("onButtonClick", function(name){
+					if(name == "addBtn"){
+						//addActivitiModel();
+						activitiModel.showDialog(0,"添加",430,350,{url:"/api/service-activiti/model",type:"post"});
+					}else if(name == "deleteBtn"){
+						delActivitiModel();
+					}else if(name == "deployBtn"){
+						deployActivitiModel();
+					}else if(name == "updateBtn"){
+						updateModel();
+					}else if(name == "searchBtn"){
+						search();
+					}else if(name == "upload"){
+						$("#test3").click();
+					}else if(name == "download"){
+                        download();
+                    }
+				});
+
+				function download(){
+                              var modelId = activitiModel.getSelectedRowId();
+                              if(!modelId){
+                                    layer.msg("请选择一条数据");
+                                    return;
+                              }
+                              
+                              window.location.href = "/api/service-activiti/activiti/resource?modelId="+modelId;
+//                            $.ajax({
+//                              url:"/api/service-activiti/activiti/resource?modelId="+modelId,
+//                              type:"get",
+//                              success:function(res){
+//                                  layer.msg("成功");
+//                                      },
+//                              error:function(e){
+//                                  layer.msg("error");
+//                              }
+//                          });
+                        }
+
+				function updateModel(){
+					layer.open({
+						title: '修改模型'
+						,content: '开发中'
+					}); 
+				}
+				
+				function search(){
+					var modelName = $("input[name='modelName']").val();
+					var am = activitiModel.getParams();
+					am.modelName = modelName;
+					activitiModel.reload();
+					
+				}
+				
+				//上传bpmn文件
+				upload.render({
+				    elem: '#test3'
+				    ,url: '/api/service-activiti/model/upload'
+					,accept: 'file' //普通文件
+					,data: {
+						modelId: function(){
+							return activitiModel.getSelectedRowId();
+						}
+					}
+					,before:function(){
+					
+					}
+				    ,done: function(res){
+				    	alert(res.message);
+				      	//console.log(res);
+				    }
+				 });
+				
+				function deployActivitiModel(){
+					var modelId = activitiModel.getSelectedRowId();
+
+					if(!modelId){
+						layer.msg("请选择一条数据");
+						return;
+					}
+
+					layer.confirm('确定部署?', {
+						btn: ['确定', '取消'],
+
+					}, function(index, layero) {
+						//按钮【按钮一】的回调
+						$.ajax({
+							type: 'POST',
+							url: "/api/service-activiti/model/deploy",
+							data: {
+								modelId:modelId
+							},
+							async: false,
+							success: function(data) {
+								activitiModel.reload();
+								alert(data.message);
+							}
+						});
+						layer.close(index)
+					});
+				}
+
+				function delActivitiModel() {
+					var modelId = activitiModel.getSelectedRowId();
+
+					if(!modelId){
+						layer.msg("请选择一条数据");
+						return;
+					}
+
+					layer.confirm('确定删除?', {
+						btn: ['确定', '取消'],
+
+					}, function(index, layero) {
+						//按钮【按钮一】的回调
+						$.ajax({
+							type: 'GET',
+							url: "/api/service-activiti/model/model/" + modelId,
+							data: {
+
+							},
+							async: false,
+							success: function(data) {
+								// activitiModel.reload();
+								activitiModel.reload();
+								// alert(data.message);
+							}
+						});
+						layer.close(index)
+					});
+
+				};
+
+				function addActivitiModel() {
+					$("#id").val("");
+					$("#name").val("");
+					$("#description").val("");
+					var index = layer.open({
+						type: 1,
+						title: '新增页',
+						area: ['1000px', '550px'],
+						shade: 0.5,
+						maxmin: true,
+						content: form,
+						id: 'add1',
+						closeBtn: 1,
+						btn: ['确定', '关闭'],
+						yes: function(index, layero) {
+							var d =form.serialize();
+							$.ajax({
+								type: 'post',
+								async: false,
+								url: "/api/service-activiti/model",
+								data: d,
+								dataType: "json",
+								success: function(data) {
+									if(data.success == false) {
+										alert("操作失败")
+									} else {
+										// alert(data.message);
+										// activitiModel.reload();
+										activitiModel.reload();
+										form.hide();
+										layer.closeAll();
+									}
+								}
+							});
+						},
+						zIndex: layer.zIndex,
+						end: function() {
+							form.hide();
+							layer.closeAll();
+						}
+					});
+				}
+
+
+				})($)
+			</script>
+

+ 59 - 0
plg-tms-std-web-vue/public/jq/pages/bpm/leader.html

@@ -0,0 +1,59 @@
+<div id="leader" class="plg-tab-container">
+	<blockquote class="layui-elem-quote layui-text plg-elem-quote" style="background:#fff;">
+    流程实例使用教程
+  </blockquote>
+
+  <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
+    <legend>示列:直属领导审批</legend>
+  </fieldset>
+   
+  <form class="layui-form" action="">
+    <div class="layui-form-item">
+      <label class="layui-form-label">直属领导</label>
+      <div class="layui-input-block">
+        <input type="text" name="username" autocomplete="off" lay-verify="required" placeholder="请输入名称" class="layui-input">
+      </div>
+    </div>
+    <div class="layui-form-item layui-form-text">
+      <label class="layui-form-label">批文</label>
+      <div class="layui-input-block">
+        <textarea name="reason" autocomplete="off" lay-verify="required" placeholder="请输入" class="layui-textarea"></textarea>
+      </div>
+    </div>
+    
+    <div class="layui-form-item">
+      <div class="layui-input-block">
+        <button class="layui-btn" lay-submit="" lay-filter="demo1">立即提交</button>
+        <button type="reset" class="layui-btn layui-btn-primary">重置</button>
+      </div>
+    </div>
+  </form>
+</div>
+
+<script>
+$(function(){
+  var form = layui.form,
+  layer = layui.layer;
+  
+  //监听提交
+  form.on('submit(demo1)', function(data){
+//  layer.alert(JSON.stringify(data.field), {
+//    title: '最终的提交信息'
+//  })
+    //请求后台
+    Prolog.ajax({
+            url: "/api/askforleave-service/askforleave/leader",
+            type: "POST",
+            data: {
+            	"leaderName":data.field.username,
+				"leaderreason":data.field.reason
+            },
+            success:function(da){
+                alert(da.data);
+            }
+         });
+	return false;
+  });
+  
+});
+  </script>

+ 59 - 0
plg-tms-std-web-vue/public/jq/pages/bpm/manager.html

@@ -0,0 +1,59 @@
+<div id="manager" class="plg-tab-container">
+	<blockquote class="layui-elem-quote layui-text plg-elem-quote" style="background:#fff;">
+    流程实例使用教程
+  </blockquote>
+
+  <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
+    <legend>示列:总经理</legend>
+  </fieldset>
+   
+  <form class="layui-form" action="">
+    <div class="layui-form-item">
+      <label class="layui-form-label">总经理</label>
+      <div class="layui-input-block">
+        <input type="text" name="username" autocomplete="off" lay-verify="required" placeholder="请输入名称" class="layui-input">
+      </div>
+    </div>
+    <div class="layui-form-item layui-form-text">
+      <label class="layui-form-label">批文</label>
+      <div class="layui-input-block">
+        <textarea name="reason" autocomplete="off" lay-verify="required" placeholder="请输入" class="layui-textarea"></textarea>
+      </div>
+    </div>
+    
+    <div class="layui-form-item">
+      <div class="layui-input-block">
+        <button class="layui-btn" lay-submit="" lay-filter="demo1">立即提交</button>
+        <button type="reset" class="layui-btn layui-btn-primary">重置</button>
+      </div>
+    </div>
+  </form>
+</div>
+
+<script>
+$(function(){
+  var form = layui.form,
+  layer = layui.layer;
+  
+  //监听提交
+  form.on('submit(demo1)', function(data){
+//  layer.alert(JSON.stringify(data.field), {
+//    title: '最终的提交信息'
+//  })
+    //请求后台
+    Prolog.ajax({
+            url: "/api/askforleave-service/askforleave/leader",
+            type: "POST",
+            data: {
+            	"leaderName":data.field.username,
+				"leaderreason":data.field.reason
+            },
+            success:function(da){
+                alert(da.data);
+            }
+         });
+	return false;
+  });
+  
+});
+  </script>

+ 32 - 0
plg-tms-std-web-vue/public/jq/pages/configcenter/configcenter.html

@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+    <meta charset="UTF-8">
+    <title>登录RabbitMQ</title>
+</head>
+
+<body>
+    <form action="http://192.168.10.167:8070" method="post" id="loginform">
+    <div id="login-status"></div>
+    <table class="form">
+      <tbody><tr>
+        <th><label>Username:</label></th>
+        <td><input type="text" name="username" value="apollo"></td>
+      </tr>
+      <tr>
+        <th><label>Password:</label></th>
+        <td><input type="password" name="password" value="admin"></td>
+      </tr>
+      <tr>
+        <th>&nbsp;<input type="hidden" name="_method" value="PUT"></th>
+        <td><input type="submit" value="Login"></td>
+      </tr>
+    </tbody></table>
+  </form>
+</body>
+<script type="text/javascript">
+	//var form = document.getElementById('loginform');
+	//form.submit();
+</script>
+</html>

+ 65 - 0
plg-tms-std-web-vue/public/jq/pages/home/css/home.css

@@ -0,0 +1,65 @@
+[home] h3 {
+  color: #888;
+  font-size: 0.18rem;
+  font-weight: bold;
+}
+[home] .home-grid {
+  padding: 0.15rem;
+  width: 100%;
+  height: 100%;
+  display: grid;
+  grid-gap: 0.2rem;
+  grid-template-columns: 1fr 1fr 1fr;
+  grid-template-rows: 1fr 1fr 2fr;
+}
+[home] .home-grid .home-grid-item {
+  background: #fff;
+}
+[home] .home-grid .home-grid-item .plg-flex {
+  height: 100%;
+  align-items: center;
+  justify-content: space-between;
+}
+[home] .home-grid .home-grid-item-wrap {
+  width: 50%;
+  display: inline-block;
+}
+[home] .home-grid .home-grid-item-wrap .title {
+  flex: 0 0 0;
+  padding: 0 0 20px 0;
+}
+[home] .home-grid .home-grid-item-wrap .value {
+  font-size: 0.38rem;
+  font-weight: bold;
+}
+[home] .home-grid .user-map {
+  grid-column: 3 / 4;
+  grid-row: 1 / 3;
+}
+[home] .home-grid .port-map {
+  grid-column: 1 / 4;
+  grid-row: 3 / 3;
+}
+[home] [class^="home-icon-"] {
+  margin-left: 25%;
+  display: inline-block;
+  width: 0.8rem;
+  height: 0.8rem;
+  background: no-repeat center center;
+  background-size: cover;
+}
+[home] .home-icon-a {
+  background-image: url(/ops/images/home/ill_registration.png);
+}
+[home] .home-icon-b {
+  background-image: url(/ops/images/home/ill_service.png);
+}
+[home] .home-icon-c {
+  background-image: url(/ops/images/home/ill_instance.png);
+}
+[home] .home-icon-d {
+  background-image: url(/ops/images/home/ill_interface.png);
+}
+[home] .title {
+  padding: 0.15rem;
+}

+ 1 - 0
plg-tms-std-web-vue/public/jq/pages/home/css/home.css.map

@@ -0,0 +1 @@
+{"version":3,"sources":["home.less"],"names":[],"mappings":"AAAA,UAKM,WACA,iBACA,gBAAA,CAPN,kBAWM,eACA,WACA,YACA,aACA,eACA,kCACA,8BAAA,CAjBN,kCA0BQ,eAAA,CA1BR,4CA4BU,YACA,yBACA,AADA,mBACA,yBAAA,6BAAA,CAEF,uCACE,UACA,oBAAA,CAFF,8CAII,mBAEA,AAFA,WAEA,kBAAA,CANJ,8CASI,iBACA,gBAAA,CA1CZ,4BAkDO,kBACA,cAAA,CAnDP,4BAuDQ,kBACA,cAAA,CAxDR,6BA8DM,gBACA,qBACA,YACA,aACA,mCACA,qBAAA,CAnEN,oBAwEM,uDAAA,CAxEN,oBA4EM,kDAAA,CA5EN,oBAgFM,mDAAA,CAhFN,oBAoFM,oDAAA,CApFN,cA0FM,cAAA,CAAA","file":"to.css","sourcesContent":[null]}

+ 97 - 0
plg-tms-std-web-vue/public/jq/pages/home/css/home.less

@@ -0,0 +1,97 @@
+[home]{
+    @blue:#1890ff;
+    @main-color: #3da0e3;
+    @row-height:290/100rem;
+    h3{
+      color: #888;
+      font-size: 0.18rem;
+      font-weight: bold;
+    }
+
+    .home-grid{
+      padding: 0.15rem;
+      width: 100%;
+      height: 100%;
+      display: grid;     
+      grid-gap: 0.2rem;
+      grid-template-columns:  1fr 1fr 1fr; 
+      grid-template-rows:   1fr 1fr 2fr;
+
+      // grid-template-areas: ". . user-map"
+      //                      ". . user-map"
+      //                      "port-map port-map port-map"
+      //                      "port-map port-map port-map";
+
+      
+      .home-grid-item{
+        background: #fff;
+        .plg-flex{
+          height: 100%;
+          align-items: center;
+          justify-content: space-between;
+        }
+        &-wrap{
+          width: 50%;
+          display: inline-block;
+          .title{
+            flex: 0 0 0;
+       
+            padding:0 0 20px 0;
+          }
+          .value{
+            font-size:0.38rem;
+            font-weight: bold;
+          }
+        }
+
+
+      }
+      .user-map{
+       // grid-area:user-map;
+       grid-column: ~"3 / 4";
+       grid-row: ~"1 / 3";
+      }
+      .port-map{
+        //grid-area:port-map
+        grid-column: 1 e("/") 4;
+        grid-row: ~"3 / 3";
+      }
+
+    };
+
+    [class^="home-icon-"]{
+      margin-left: 25%;
+      display: inline-block;
+      width: 0.80rem;
+      height: 0.80rem;
+      background: no-repeat center center;
+      background-size: cover;
+ 
+     
+    }
+    .home-icon-a{
+      background-image: url(/ops/images/home/ill_registration.png)
+    }
+    
+    .home-icon-b{
+      background-image: url(/ops/images/home/ill_service.png)
+    }
+    
+    .home-icon-c{
+      background-image: url(/ops/images/home/ill_instance.png)
+    }
+    
+    .home-icon-d{
+      background-image: url(/ops/images/home/ill_interface.png)
+
+    }
+    
+
+    .title{
+      padding: 15/100rem
+  }
+
+
+
+
+}

+ 483 - 0
plg-tms-std-web-vue/public/jq/pages/home/home.html

@@ -0,0 +1,483 @@
+<link rel="stylesheet" type="text/css" href="/ops/pages/home/css/home.css" />
+<script src="/jq/prologui/dist/vendors/echarts/dist/echarts.js"></script>
+<script src="/jq/prologui/dist/vendors/echarts/dist/echarts.js"></script>
+
+
+<div id="home" home>
+  <div class="plg-tab-container ">
+
+
+    <div class="home-grid">
+      <div class="home-grid-item">
+        <div class="plg-flex">
+          <i class="home-icon-a"></i>
+          <div class="home-grid-item-wrap">
+            <div class="title">
+              <h3>登记服务</h3>
+            </div>
+            <div class="v-count value">0</div>
+          </div>
+        </div>
+      </div>
+      <div class="home-grid-item">
+        <div class="plg-flex">
+          <i class="home-icon-d"></i>
+          <div class="home-grid-item-wrap">
+            <div class="title">
+              <h3>登记接口</h3>
+            </div>
+            <div class="v-count value">0</div>
+          </div>
+        </div>
+
+
+      </div>
+      <div class="home-grid-item">
+        <div class="plg-flex">
+          <i class="home-icon-b"></i>
+          <div class="home-grid-item-wrap">
+            <div class="title">
+              <h3>在线服务</h3>
+            </div>
+            <div class="v-count value">0</div>
+          </div>
+        </div>
+      </div>
+      <div class="home-grid-item">
+        <div class="plg-flex">
+          <i class="home-icon-c"></i>
+          <div class="home-grid-item-wrap">
+            <div class="title">
+              <h3>在线实例</h3>
+            </div>
+            <div class="v-count value">0</div>
+          </div>
+        </div>
+      </div>
+
+      <div class="home-grid-item user-map">
+        <div class="plg-flex" style="flex-direction: column;align-items:normal">
+          <div class="title">
+            <h3>用户状态</h3>
+          </div>
+          <div id="userMap" class="plg-flex-item"></div>
+        </div>
+
+      </div>
+      <div class="home-grid-item port-map">
+        <div class="plg-flex" style="flex-direction: column;align-items:normal">
+          <div class="title">
+            <h3>接口分布</h3>
+          </div>
+          <div id="portMap" class="plg-flex-item"></div>
+
+        </div>
+      </div>
+    </div>
+  </div>
+
+</div>
+
+
+
+<script>
+
+  (function () {
+    //页面全部加载完成
+
+
+    var dataList = [
+      {
+        color: '#ffb800',
+        value: 0,
+        name: '末激活'
+      },
+      {
+        color: '#1e9fff',
+        value: 0,
+        name: '正常'
+      },
+      {
+        color: '#ff5722',
+        value: 0,
+        name: '冻结'
+      },
+
+    ]
+
+
+
+
+
+
+
+    $(document).ready(function () {
+
+
+      /*4个模块*/
+      var dom = document.querySelectorAll(".v-count");
+      [APIS.home.service(), APIS.home.entry(), APIS.home.regService(), APIS.home.reginstance()]
+        .forEach(function (item, index) {
+          Prolog.ajax({
+            url: item,
+            type: "get",
+            success: function (resolve) {
+              if (resolve.success) {
+                var sp = 10;
+                var tiem = setInterval(function () {
+                  if (dom[index].innerText == resolve.data) return clearInterval(tiem)
+                  dom[index].innerText = Number(dom[index].innerText) + 1;
+                }, sp += 10)
+              }
+            }
+          })
+        })
+
+
+
+      /*用户状态*/
+      Prolog.ajax({
+        url: APIS.home.userStatus(),
+        type: "get",
+        success: function (resolve) {
+          if (resolve.success) {
+            var n = 0;
+            resolve.data.forEach(function (item) {
+              n += item.count;
+              switch (item.status) {
+                case 0: dataList[0].value = item.count
+                  return
+                case 1: dataList[1].value = item.count
+                  return
+                case 2: dataList[2].value = item.count
+                  return
+              }
+            })
+            var userMapOption = {
+              title: {
+                text: n,
+                subtext: '全部',
+                x: 'center',
+                y: 'center',
+                textStyle: {
+                  fontSize: 30,
+                  fontWeight: 'normal',
+                  color: "#666",
+                },
+                subtextStyle: {
+                  color: '#666',
+                  fontSize: 16
+                },
+              },
+              grid: {
+                bottom: 130,
+                left: 0,
+                right: '10%'
+              },
+              legend: {
+                show: false,
+                orient: 'vertical',
+                top: "middle",
+                right: "5%",
+                textStyle: {
+                  color: '#f2f2f2',
+                  fontSize: 25,
+
+                },
+                icon: 'roundRect'
+              },
+              series: [
+                // 主要展示层的
+                {
+                  radius: ['35%', '71%'],
+                  center: ['50%', '50%'],
+                  type: 'pie',
+                  itemStyle: {
+                    normal: {
+
+                      color: function (params) {
+                        return dataList[params.dataIndex].color
+                      }
+                    }
+                  },
+                  labelLine: {
+                    normal: {
+                      show: true,
+                      length: 20,
+                      length2: 40,
+                      lineStyle: {
+                        color: '#d3d3d3'
+                      },
+                      align: 'right'
+                    },
+                    color: "#000",
+                    emphasis: {
+                      show: true
+                    }
+                  },
+                  label: {
+                    normal: {
+                      formatter: function (params) {
+                        var str = '';
+                        switch (params.name) {
+                          case '末激活':
+                            str = '\n{nameStyle|末激活 }' + '{a|' + params.value + '}';
+                            break;
+                          case '正常':
+                            str = '\n{nameStyle|正常 }' + '{b|' + params.value + '}';
+                            break;
+                          case '冻结':
+                            str = '\n{nameStyle|冻结 }' + '{c|' + params.value + '}';
+                            break;
+
+                        }
+
+                        return str
+                      },
+                      padding: [0, 0],
+                      height: 40,
+                      rich: {
+
+                        nameStyle: {
+                          fontSize: 14,
+                          color: "#555",
+                          align: 'left'
+                        },
+                        a: {
+                          align: 'left',
+                          fontSize: 20,
+                          color: dataList[0].color,
+                        },
+                        b: {
+                          fontSize: 20,
+                          align: 'left',
+                          color: dataList[1].color,
+
+                        },
+                        c: {
+                          fontSize: 20,
+                          align: 'left',
+                          color: dataList[2].color,
+
+                        },
+
+                      }
+                    }
+                  },
+                  data: [
+                    {
+                      value: dataList[0].value,
+                      name: '末激活'
+                    },
+                    {
+                      value: dataList[1].value,
+                      name: '正常',
+                    },
+                    {
+                      value: dataList[2].value,
+                      name: '冻结'
+                    }
+
+                  ],
+                },
+                // 边框的设置
+                {
+
+                  radius: ['65%', '71%'],
+                  center: ['50%', '50%'],
+                  type: 'pie',
+                  label: {
+                    normal: {
+                      show: false
+                    },
+                    emphasis: {
+                      show: false
+                    }
+                  },
+                  labelLine: {
+                    normal: {
+                      show: false
+                    },
+                    emphasis: {
+                      show: false
+                    }
+                  },
+                  animation: false,
+                  tooltip: {
+                    show: false
+                  },
+                  itemStyle: {
+                    normal: {
+                      color: 'rgba(250,250,250,0.5)'
+                    }
+                  },
+                  data: [{
+                    value: 1,
+                  }],
+                }
+              ]
+            };
+            echarts.init(document.getElementById("userMap")).setOption(userMapOption);
+
+          }
+        }
+      });
+
+
+
+
+      /*接口分布*/
+
+      Prolog.ajax({
+        url: APIS.home.distribute(),
+        type: "get",
+        success: function (resolve) {
+          if (resolve.success) {
+            var jkdata= resolve.data;
+            var workOption = {
+              tooltip: {
+                show: true,
+                trigger: 'axis',
+                axisPointer: {
+
+                  animation: false
+                },
+                axisPointer: {
+                  type: 'cross',
+                  label: {
+                    backgroundColor: "#6a7985"
+                  }
+                }
+              },
+              grid: {
+                top: '10%',
+                left: '2%',
+                right: '5%',
+                bottom: '5%',
+                containLabel: true,
+                borderWidth: 0,
+              },
+              xAxis: [{
+                type: 'category',
+                boundaryGap: true,
+                axisLine: {
+                  show: true,
+                  lineStyle: {
+                    color: 'rgba(0,0,0,0)'
+                  }
+                },
+                splitLine: {
+                  show: true,
+                  lineStyle: {
+                    color: 'rgba(0,0,0,0.1)',
+                  }
+                },
+                data: (function () {
+                  var res =[];
+                   jkdata.filter(function(item){
+                   return res.push(item.serviceName)
+                  });
+                  return res
+
+                })(),
+                axisLabel: {
+                  //rotate :45,
+                  show: true,
+                  textStyle: {
+                    color: '#666'
+                  }
+                }
+              }],
+
+              yAxis: [{
+                type: 'value',
+                min: 0,
+               // max: 100,
+                name: "数量",
+                position: "left",
+                nameTextStyle: {
+                  color: "#666"
+                },
+                axisLine: {
+                  show: true,
+                  lineStyle: {
+                    color: 'rgba(0,0,0,0.1)'
+                  }
+                },
+                axisLabel: {
+                  show: true,
+                  textStyle: {
+                    color: '#666'
+                  }
+                }
+              }],
+              series: [{
+              //  name: 'CPU占用率',
+                type: 'bar',
+               // barWidth:20,
+                animation: true,
+                areaStyle: {
+                  color: 'rgba(51, 204, 255,0.6)'
+                },
+                color: 'rgb(51, 204, 255)',
+                data: (function(){
+                  var res =[];
+                   jkdata.filter(function(item){
+                   return res.push(item.count)
+                  });
+                  return res
+                })(),
+                smooth: true,
+                boundaryGap: true,
+
+              },
+
+
+              ]
+            };
+            echarts.init(document.getElementById("portMap")).setOption(workOption);
+
+          }
+
+
+
+        }
+
+      })
+
+
+
+
+
+    })
+
+
+
+
+
+
+
+    // Promise.resolve(UserDom).then(function(element){
+    //     debugger
+
+
+
+
+    // })
+    //       window.addEventListener('DOMContentLoaded', (event) => {
+    //     console.log('DOM fully loaded and parsed');
+    //     debugger
+    // });
+    // addEventListener("load",function(){
+    //   console.log("load")
+    //   debugger
+    // })
+
+
+
+
+
+
+  })()
+
+</script>

+ 135 - 0
plg-tms-std-web-vue/public/jq/pages/mail/mailList.html

@@ -0,0 +1,135 @@
+<div id="mailList" class="plg-tab-container">
+	<div id="mail" class="grid-container-full"></div>
+</div>
+<div id="mailList_mywin" style="display: none;height: 550px;">
+	<div id="mailList_g1"></div>
+</div>
+<style type="text/css">
+	.layui-form-label{width:210px;}
+  .layui-input{width:66%;}
+  .plg-btn-height-auto, .plg-btn-normal, .plg-btn-normal:hover {
+    height: auto!important;
+  }
+  .plg-btn-normal, .plg-btn-normal:hover {
+    border-radius: 4px;
+    box-shadow: 0 2px 0 rgba(0, 0, 0, 0.015);
+    color: rgba(0, 0, 0, 0.65);
+    background-color: #fff;
+    border-color: #d9d9d9;
+  }
+  .plg-btn-normal {   
+    border: 1px solid rgb(217, 217, 217)!important;
+  }
+  .plg-btn-normal:hover {
+    border: 1px solid #3da0e3!important;
+  }
+</style>
+
+<script type="text/javascript">
+(function(){
+	
+	var form=$("#mailList #form1");
+				
+	var opts = {
+   		skin:"terrace",
+   		columns:[
+			{id:"id",name:"id",type:'txt',width:100,hidden:true},
+			{id:"toAddress",name:"收件人邮箱",type:'ro',width:150},
+			{id:"subject",name:"邮件标题",type:'ro',width:200},
+			{id:"content",name:"邮件内容",type:'ro',width:"*"},
+			{id:"attachment",name:"附件",type:'ro',width:150, hidden:true},
+			{id:"fromName",name:"发件人名称",type:'ro',width:120},
+			{id:"createTime",name:"创建时间",type:'ro',width:200},
+			{id:"host",name:"邮件服务器",type:'ro',width:150, hidden:true},
+			{id:"fromAddress",name:"发件人邮箱",type:'ro',width:150,hidden:true}
+//			{id:"systemId",name:"系统id",type:'ro',width:150,hidden:true}
+		],
+		toolbar:[
+			{type:"combo", name:"systemId", label:"系统id:", width:140},{type: "newcolumn"},
+			{type:"button", name:"addBtn", className:"plg-toolbar-right",value:"<i class='layui-icon layui-icon-add-1'></i>写邮件"},{type: "newcolumn"},
+			{type:"input", name:"toAddress", label:"收件人邮箱:",offsetLeft:10, placeholder: '请输入收件人邮箱'},{type: "newcolumn"},
+			{type:"input", name:"content", label:"邮件内容:",offsetLeft:10, placeholder: '请输入邮件内容'},{type: "newcolumn"},
+	   		{type:"button", name:"searchBtn", className:"", value:"查询"},{type: "newcolumn"},
+		    {type:"button", name:"all", className:"normal", value:"所有"}
+		],
+		formData:[
+			{type:"settings",inputWidth :300,width:400,labelWidth:80,position:"label-left",labelAlign:"left"},
+		 	{type: "hidden", name:"id", value:""},
+	        {type: "input", name: "toAddress", label: "收件人邮箱:", validate: 'NotEmpty', required: true, placeholder: '多收件人请用";"分隔'},
+	        {type: "input", name:"subject", label:"邮件标题:", validate: 'NotEmpty', required: true, placeholder: '请输入邮件标题'},
+	        {type: "input", name:"fromName", label:"发件人名称:"},
+	        {type: "combo", name: "systemId", width:300, label: "系统id:", remote:{url:'/api/service-users/sys/getSelectSystem/v1.0',data:{},valueField:"val",textField:"val",method:"get"}},
+	        {type: "input", name:"content", label:"邮件内容:", validate: 'NotEmpty', required: true, placeholder: '请输入邮件内容',rows: 5}
+		],
+		pagebar:{
+			buttons:[
+			{text:"<i class='layui-icon layui-icon-delete '></i>删除",className:"layui-btn-danger plg-btn-height-auto",name:"delete"}
+			]
+		},
+   		url:"/api/service-mail/mail",//数据接口
+   		type:"get",//数据提交方式,默认为get
+		params:{pageNum:1,pageSize:10},//查询提交参数,分页参数默认为pageNum,pageSize
+		page:true, //是否启用分页
+		multiselect:true,//是否支持多选
+		imagePath:"../../prologui/assets/PlgGrid/",
+		totalCount:"totalCount" //总记录数字段,默认totalCount
+  	};
+	var mail = new PlgGrid(opts);	
+	mail.renderTo("mail");
+	mail.loadData();
+	
+	mail.attachToolBarEvent("onButtonClick", function(name,ids){
+		if(name=="searchBtn"){
+			var fdata = mail.getToolBarForm().getFormData();
+			mail.setParams(fdata);
+			mail.reload();
+		}else if(name=="all"){
+			mail.setParams({pageNum:1,pageSize:10,systemId:"",name:""});
+			mail.reload();
+		}else if(name=="addBtn"){
+			mailList_add();
+		}
+	});
+	
+	mail.attachPageBarEvent(function(name,ids){
+		if(name=="delete"){
+			if(ids==""){
+				return;
+			}
+			PlgDialog.confirm('确定删除?', {
+	        title:'删除提示',
+	        btnAlign:'c',
+	        btn: ['确定', '取消'] //可以无限个按钮
+	    	}, function(index, layero){
+		        $.ajax({ 
+					url: '/api/service-mail/mail/del', 
+					type: 'post', 
+					data:{id:ids},
+					success:function (data) {
+						PlgDialog.close(index);
+					    mail.reload();
+					    PlgDialog.msg(data.message);
+					}
+				});
+	    	});
+		}
+	});
+
+	function mailList_add(){
+		mail.showDialog(0,"写邮件",450,400,{url:"/api/service-mail/mail/sendMail",type:"post",contentType:"application/x-www-form-urlencoded"});
+		var g = mail.getGridForm();
+		g.loadComboData("systemId",{url:'/api/service-users/sys/getSelectSystem/v1.0',data:{},valueField:"val",textField:"val",method:"get"});
+	}
+	
+//	mail.on("onRowDblClicked",function(){
+//		mail.showDialog(1,"编辑",450,300,{url:"/api/service-quartz/mail",type:"put",contentType:"application/json"});
+//	});
+	
+	var f = mail.getToolBarForm();
+	f.loadComboData("systemId",{url:'/api/service-users/sys/getSelectSystem/v1.0',data:{},valueField:"val",textField:"val",method:"get"});
+
+})()
+
+
+	
+</script>

+ 814 - 0
plg-tms-std-web-vue/public/jq/pages/microservice/microservice.html

@@ -0,0 +1,814 @@
+<div class="plg-tab-container">
+  <div id="grid" class="grid-container-full"></div>
+</div>
+
+<script>
+  (function () {
+    // cSpell:ignore layui api microservice multiselect newcolumn prologui fdata cindex layero
+    // var BASE_URL = '/api/';
+    var BASE_URL = '/api/service-microservice/';
+    var RUN_STATUS = {
+      '0': {
+        text: '待发布',
+        className: 'plg-edit'
+      },
+      '1': {
+        text: '发布',
+        className: 'plg-public'
+      },
+      '2': {
+        text: '运行',
+        className: 'plg-run'
+      },
+      '3': {
+        text: '禁用',
+        className: 'plg-stop'
+      },
+      '4': {
+        text: '启动中...',
+        className: 'plg-starting'
+      },
+      '5': {
+        text: '失败',
+        className: 'plg-start-fail'
+      },
+      '6': {
+        text: '待上传',
+        className: 'plg-wait-upload'
+      }
+    };
+    
+    // 【0】基础服务,【1】公共服务,【2】行业服务,【3】物流服务 
+    var SERVER_CATEGORY = {
+      '0': '基础服务',
+      '1': '公共服务',
+      '2': '行业服务',
+      '3': '物流服务'
+    };
+
+    var opts = {
+      skin: "terrace",
+      multiselect: false,
+      columns: [{
+          id: "id",
+          name: "id",
+          type: 'txt',
+          width: "40",
+          align: "center",
+          hidden: true
+        },
+        {
+          id: "name",
+          name: "名称",
+          type: 'txt',
+          width: "120",
+          align: "center"
+
+        },
+        {
+          id: "instanceId",
+          name: "实例",
+          type: 'txt',
+          width: "120",
+          align: "center"
+        },
+        {
+          id: "host",
+          name: "地址",
+          type: 'txt',
+          width: "200",
+          align: "center",
+          hidden: true
+        },
+        {
+          id: "port",
+          name: "端口",
+          type: 'txt',
+          width: "80",
+          align: "center",
+          hidden: true
+        },
+        {
+          id: "status",
+          name: "状态",
+          type: 'txt',
+          width: "100",
+          align: "center",
+          render:function(v,record){
+            return `<span class="${RUN_STATUS[v].className}"> ${RUN_STATUS[v].text} </span>`;
+          }
+        },
+        {
+          id: "currentVersion",
+          name: "版本",
+          type: 'txt',
+          width: "80",
+          align: "center"
+        },
+        {
+          id: "category",
+          name: "服务分类",
+          type: 'txt',
+          width: "120",
+          align: "center",
+          render:function(v,record){
+            return SERVER_CATEGORY[v];
+          }
+        },
+        {
+          id: "creator",
+          name: "服务创建者",
+          type: 'txt',
+          width: "100",
+          align: "center",
+          hidden: true
+        },
+        {
+          id: "createTime",
+          name: "服务创建时间",
+          type: 'txt',
+          width: "120",
+          align: "center",
+          hidden: true
+        },
+        {
+          id: "lastModifier",
+          name: "服务变更人",
+          type: 'txt',
+          width: "120",
+          align: "center",
+          hidden: true
+        },
+        {
+          id: "lastModifiedTime",
+          name: "服务变更时间",
+          type: 'txt',
+          width: "120",
+          align: "center",
+          hidden: true
+        },
+        {id:"op",name:"操作",type:'button',align:"center",width:"250",render: function(v,record){
+          
+          switch(record.status){
+            case 0:
+   				    return "发布^microservice_publish,<span class='layui-disabled'>启动</span>^,<span class='layui-disabled'>下载日志</span>^,<span class='layui-disabled'>查看日志</span>^";
+            case 1: 
+   				    return "<span class='layui-disabled'>发布</span>^,启动^microservice_start,<span class='layui-disabled'>下载日志</span>^,<span class='layui-disabled'>查看日志</span>^";
+            case 2: 
+   				    return "<span class='layui-disabled'>发布</span>^,停止^microservice_uninstall,下载日志^microservice_downloadlog,<span>查看日志</span>^microservice_readlog";
+            case 3: 
+   				    return "<span class='layui-disabled'>发布</span>^,启动^microservice_start,下载日志^microservice_downloadlog,<span>查看日志</span>^microservice_readlog";
+            case 4: 
+   				    return "<span class='layui-disabled'>发布</span>^,<span class='layui-disabled'>停止</span>^,下载日志^microservice_downloadlog,<span>查看日志</span>^microservice_readlog";
+            case 5:
+   				    return "<span class='layui-disabled'>发布</span>^,停止^microservice_uninstall,<span>下载日志</span>^microservice_downloadlog,<span>查看日志</span>^microservice_readlog";
+            case 6:
+   				    return "<span class='layui-disabled'>发布</span>^,<span class='layui-disabled'>启动</span>^,<span class='layui-disabled'>下载日志</span>^,<span class='layui-disabled'>查看日志</span>^";
+          }
+
+   			}},
+        {
+          id: "description",
+          name: "描述",
+          type: 'txt',
+          width: "200",
+          align: "left"
+        }
+
+      ],
+      toolbar: [
+        {type:"block", blockOffset:0, offsetTop:10, list:[
+          {
+            type: "input",
+            name: 'name',
+            label: '服务名称:',
+            placeholder:"请输入服务名称",
+            width:300
+          },
+          {
+            type: "newcolumn"
+          },
+					{
+            type: "select",
+            name: "category",
+            label: "服务分类:",
+            width:300,
+            options: [
+              {
+                value: '',
+                text: '请选择服务分类'
+              },
+              {
+                value: '0',
+                text: '基础服务'
+              },
+              {
+                value: '1',
+                text: '公共服务'
+              },
+              {
+                value: '2',
+                text: '行业服务'
+              },
+              {
+                value: '3',
+                text: '物流服务'
+              }
+            ]
+          },
+          {
+            type: "newcolumn"
+          },
+          {
+            type: "input",
+            name: "creator",
+            label: "服务创建者:",
+            placeholder:"请输入服务创建者",
+            width:300,
+            hidden: true
+          },
+          {
+            type: "newcolumn"
+          },
+          {
+            type: "input",
+            name: "status",
+            label: "服务状态:",
+            placeholder:"请输入服务状态",
+            width:300,
+            hidden: true,
+            offsetLeft: 10
+          },
+          {
+            type: "newcolumn"
+          },
+          {
+            type: "button",
+            name: "searchBtn",
+            className: "",
+            value: "查询"
+          },
+          {
+            type: "newcolumn"
+          },
+          {
+            type: "button",
+            name: "all",
+            className: "normal",
+            value: "所有"
+          },
+          {
+            type: "newcolumn"
+          },
+          {type:"button", name:"more2", value:"展开",className:"link toggle"},
+        ]},
+        {type:"block", blockOffset:0,offsetTop:10,list:[{
+          type: "button",
+          name: "deleteBtn",
+          className: "danger plg-toolbar-right",
+          value: "<i class='layui-icon layui-icon-delete'></i>删除"
+        }, {
+          type: "newcolumn"
+        },
+        
+        
+        {
+          type: "button",
+          name: "downFile",
+          className: "normal plg-toolbar-right download",
+          value: "<i class='layui-icon layui-icon-download-circle'></i>下载"
+        }, {
+          type: "newcolumn"
+        },
+        {
+          type: "button",
+          name: "upFile",
+          offsetLeft: 10,
+          className: "normal plg-toolbar-right upload",
+          value: "<i class='layui-icon layui-icon-upload'></i>上传"
+        },
+        {
+          type: "newcolumn"
+        },
+        {
+          type: "button",
+          name: "updateBtn",
+          className: "normal plg-toolbar-right",
+          value: "<i class='layui-icon layui-icon-edit'></i>编辑"
+        }, 
+        {
+          type: "newcolumn"
+        },
+        {
+          type: "button",
+          name: "addBtn",
+          className: "plg-toolbar-right",
+          value: "<i class='layui-icon layui-icon-add-1'></i>添加"
+        }
+        ]}
+      ],
+      formData: [{
+          type: "settings",
+          inputWidth: 300,
+          width: 400,
+          labelWidth: 80,
+          position: "label-left",
+          labelAlign: "left"
+        },
+        {
+          type: "input",
+          name: 'name',
+          label: '服务名',
+          placeholder:"请输入服务名",
+          editable: false,
+          validate: 'NotEmpty',
+          required: true
+        },
+        {
+          type: "input",
+          name: "instanceId",
+          label: "实例",
+          placeholder:"请输入实例名",
+          validate: 'NotEmpty',
+          required: true
+        },
+        {
+          type: "input",
+          name: "port",
+          label: "端口",
+          placeholder:"请输入端口号",
+          validate: 'NotEmpty,ValidNumeric',
+          required: true
+        },
+        {
+          type: "select",
+          name: "category",
+          label: "服务分类",
+          options: [{
+              value: '0',
+              text: '基础服务'
+            },
+            {
+              value: '1',
+              text: '公共服务'
+            },
+            {
+              value: '2',
+              text: '行业服务'
+            },
+            {
+              value: '3',
+              text: '物流服务'
+            }
+          ],
+          validate: 'NotEmpty',
+          required: true
+        },
+        {
+          type: "input",
+          name: "lastModifier",
+          label: "变更人名称",
+          placeholder:"请输入变更人名称"
+        },
+        {
+          type: "input",
+          name: "description",
+          label: "服务变更描述",
+          placeholder:"请输入服务变更描述",
+          rows: 3,
+          validate: 'NotEmpty',
+          required: true
+        }
+
+      ],
+      imagePath: "../../prologui/assets/PlgGrid/",
+      url: BASE_URL + 'microservice', //数据接口
+      type: "get", //数据提交方式,默认为get
+      params: {}, //查询提交参数,分页参数默认为pageNum,pageSize
+      page: true, //是否启用分页
+      totalCount: "totalCount" //总记录数字段,默认totalCount
+    };
+
+    //分页参数 pageSize pageNum
+    var grid = new PlgGrid(opts);
+    grid.renderTo("grid");
+    grid.loadData();
+
+    grid.on("onRowDblClicked", function () {
+      grid.showDialog(1, "编辑", 430, 350, {
+        url: BASE_URL + 'microservice',
+        type: "PUT"
+      });
+    });
+    
+
+    // 【操作--发布】
+    window.microservice_publish = function (id, data) {
+      // 发布之前要先判断用户是否已经上传了Jar包
+      //console.log('发布之前要先判断用户是否已经上传了Jar包');
+      //console.log(data);
+      //console.log('发布之前要先判断用户是否已经上传了Jar包');
+
+
+      // 前置条件,需要拿到版本号列表
+      // String host,String microId,String version,String regServer,String packagePort)
+      // 1. id  【microId】
+      // 2. 版本号列表   【version】-- 传递给后台的属性名
+      // 3. 服务地址 【host】
+      // 4. 注册地址地址 【regServer】
+      // 5. 端口号。默认值是添加的时候的端口号 【packagePort】
+
+      // 此处是一个弹窗
+      var type = 'auto';
+      var microVersionList = data.microVersionList;
+      var temStr = '';
+
+      microVersionList.map(function(val){
+        temStr +=`<option value="${val.version_}">${val.version_}</option>`
+      })
+      
+      var text = `
+      <form class="layui-form layui-form-pane1 plg-form-public">
+        <div class="layui-form-item">
+          <label class="layui-form-label plg-unset-box-sizing">服务地址</label>
+          <div class="layui-input-block">
+            <input type="text" name="host" lay-filter="host" lay-verify="required" placeholder="请输入" autocomplete="off" class="layui-input">
+          </div>
+        </div>
+        <div class="layui-form-item">
+          <label class="layui-form-label plg-unset-box-sizing">启动后缀</label>
+          <div class="layui-input-block">
+            <input type="text" name="packagePort" lay-filter="packagePort" lay-verify="required" placeholder="例:--server.port=1234,注意空格" autocomplete="off" class="layui-input">
+          </div>
+        </div>
+        <div class="layui-form-item">
+          <label class="layui-form-label plg-unset-box-sizing">版本号</label>
+          <div class="layui-input-block">
+            <select name="version" lay-filter="version">
+              <option value=""></option>
+              ${temStr}
+            </select>
+          </div>
+        </div>    
+      </form>
+      `;
+      
+      var currentVersion,  // 用户选择的版本号
+        host, // 用户的服务器地址
+        regServer, // 用户的注册服务器地址
+        packagePort; // 用户的注册服务器端口号
+           
+      layer.open({
+        type: 1,
+        title: '发布【' + data.name + '】' //不显示标题栏
+        ,offset: type //具体配置参考:http://www.layui.com/doc/modules/layer.html#offset
+        ,id: 'layerDemo'+ type //防止重复弹出
+        ,content: '<div>'+ text +'</div>'
+        ,btn: '确认'
+        ,btnAlign: 'c' //按钮居中
+        ,shade: 0 //不显示遮罩
+        ,success: function(){
+          layui.use('form', function(){
+              var form = layui.form;
+              form.render('select'); //刷新select选择框渲染
+              form.on('select(version)', function(data){
+                currentVersion = data.value;
+              });
+            });
+        }
+        ,yes: function(){
+          var obj = {
+            host: $("input[name='host']").val(),
+//          regServer: $("input[name='regServer']").val(),		这里注册地址不要同意填在packagePort里面,要注意格式。
+            variable: $("input[name='packagePort']").val(),
+            microId: data.id,
+            version: currentVersion
+          }
+          // //console.log('传递给后台的参数');
+          // //console.log(obj);
+          // //console.log('传递给后台的参数');
+
+          var loading = Prolog.loading2();
+          Prolog.ajax({
+            url: BASE_URL + 'microservice/public',
+            type: 'post',
+            data: obj,
+            dataType: 'json',
+            success: function (data) {
+              loading();
+
+              if (data.success) {
+                grid.reload();
+
+                layer.closeAll(); 
+              } else {
+                PlgDialog.alert(data.message);
+              }
+            }
+          });
+        }
+
+      });
+    }
+
+    // XXX 
+    // 【操作--启动】
+    window.microservice_start = function (id, data) {
+      // 此处是一个弹窗
+      // 1. id  【microId】
+
+      var type = 'auto';
+      
+      var microVersionList = data.microVersionList;
+      
+      var temStr = '';
+      microVersionList.map(function(val){
+        temStr +=`<option value="${val.version_}">${val.version_}</option>`
+      })
+      
+      var text = `
+      <form class="layui-form layui-form-pane1">
+        <div class="layui-form-item">
+          <label class="layui-form-label">选择框</label>
+          <div class="layui-input-block">
+            <select name="version" lay-filter="version">
+              <option value=""></option>
+              ${temStr}
+            </select>
+          </div>
+        </div>
+      </form>
+      `;
+      
+      var currentVersion;
+      layer.open({
+        type: 1,
+        title: '部署【' + data.name + '】' //不显示标题栏
+        ,offset: type //具体配置参考:http://www.layui.com/doc/modules/layer.html#offset
+        ,id: 'layerDemo'+type //防止重复弹出
+        ,content: '<div style="padding: 20px 100px;">'+ text +'</div>'
+        ,btn: '确认'
+        ,btnAlign: 'c' //按钮居中
+        ,shade: 0 //不显示遮罩
+        ,success: function(){
+          layui.use('form', function(){
+              var form = layui.form;
+              form.render('select'); //刷新select选择框渲染
+              form.on('select(version)', function(data){
+                currentVersion = data.value;
+              });
+                
+            });
+
+        }
+        ,yes: function(){
+          // //console.log('currentVersion::' + currentVersion);
+          // //console.log('点击确认了');
+          var obj = {
+            microId: data.id,
+            version: currentVersion
+          }
+          var loading = Prolog.loading2();
+          Prolog.ajax({
+            url: BASE_URL + 'microservice/deploy',
+            type: 'post',
+            data: obj,
+            dataType: 'json',
+            success: function (data) {
+              loading();
+
+              if (data.success) {
+                grid.reload();
+
+                layer.closeAll(); 
+              } else {
+                PlgDialog.alert(data.message);
+              }
+            }
+          });
+
+        }
+      });
+    }
+
+    // 【操作--卸载】
+    window.microservice_uninstall = function (rid, data) {
+      
+      //console.log('卸载之前要先判断用户是否已经上传了Jar包');
+      //console.log(data);
+      //console.log('卸载之前要先判断用户是否已经上传了Jar包');
+
+      // 【microId】
+      var obj = {
+        microId: data.id,
+        version: data.currentVersion
+      }
+      var loading = Prolog.loading2();
+      Prolog.ajax({
+        url: BASE_URL + 'microservice/undeploy',
+        type: 'post',
+        data: obj,
+        dataType: 'json',
+        success: function (data) {
+          loading();
+
+          if (data.success) {
+            grid.reload();
+          } else {
+            PlgDialog.alert(data.message);
+          }
+        }
+      });
+
+    }
+
+    window.microservice_downloadlog = function(id, data){
+      // //console.log('下载日志之前要先判断用户是否已经上传了Jar包');
+      // //console.log(data);
+      // //console.log('下载日志之前要先判断用户是否已经上传了Jar包');
+      window.location.href = BASE_URL + 'microservice/downLoadLogInfo?microId=' + id;
+    }
+
+    window.microservice_readlog = function(id, data){
+      // //console.log('下载日志之前要先判断用户是否已经上传了Jar包');
+      // //console.log(data);
+      // //console.log('下载日志之前要先判断用户是否已经上传了Jar包');
+      
+      var aId = 'plg' + id;
+      var temTemplate = `<a id="${aId}" target="_blank"; style="display: none;">点击跳转</a>`;
+      $('body').append(temTemplate);
+
+      var openwin = function (url) {   
+        var obj = document.getElementById(aId);
+        obj.href = url;   
+        obj.click();   
+      }
+      openwin(BASE_URL + 'microservice/downLoadLogInfoOnline?microId=' + id);
+      // window.location.href = BASE_URL + 'microservice/downLoadLogInfoOnline?microId=' + id;
+    }
+
+    grid.attachToolBarEvent("onButtonClick", function (name) {
+
+      // 用户点击右上角的操作按钮组对应的事件
+      var operationGroup = {
+        _getIds: function () {
+          var ids = grid.getCheckedIds() || grid.getSelectedRowData("id");
+
+          if (!ids) {
+
+            PlgDialog.msg("请选择行!");
+
+          }
+
+          return ids;
+        },
+        searchBtn: function () {
+          var fdata = grid.getToolBarForm().getFormData();
+          grid.setParams(fdata);
+          grid.reload();
+        },
+        all: function () {
+          grid.setParams({});
+          grid.reload();
+        },
+        downFile: function () {
+          
+          var version = grid.getSelectedRowData('currentVersion');
+          
+          var ids = this._getIds();
+          if (!ids) {
+            return;
+          }
+
+          // 这里是文件下载并非跳转
+          window.location.href = BASE_URL + 'microservice/downLoad?microId=' + ids+'&version=' + version;
+
+        },
+        upFile: function () {
+          var ids = this._getIds();
+
+          if (!ids) {
+            return;
+          }
+
+          //console.log('>>>>>>');
+          //console.log(Boolean($('.upload').attr('id')));
+          //console.log('>>>>>>');
+
+          if (!$('.upload').attr('id')) {
+            $('.upload').attr({
+              'id': 'upload'
+            });
+          }
+         
+          var loading;
+          layui.upload.render({
+            elem: '#upload',
+            url: BASE_URL + 'microservice/upload',
+            accept: 'file', //普通文件
+            data: {
+              microId: ids
+            },
+            before: function () {
+              loading = Prolog.loading2();
+            },
+            done: function (res) {
+              console.log('done ....');
+              loading();
+              layer.msg(res.message);
+              //console.log(res);
+              grid.setParams({});
+              grid.reload();
+            },
+            error: function (res) {
+              console.log('error ....');
+              loading();
+              //console.log('请求异常');
+              layer.msg(res.message);
+            }
+          });
+
+        },
+        addBtn: function () {
+          grid.showDialog(0, "添加", 430, 450, {
+            url: BASE_URL + 'microservice',
+            type: "POST"
+          });
+        },
+        updateBtn: function () {
+          grid.showDialog(1, "编辑", 430, 450, {
+            url: BASE_URL + 'microservice',
+            type: "PUT"
+          });
+        },
+        deleteBtn: function () {
+          var ids = this._getIds();
+          var currentStatus = grid.getSelectedRowData().status;
+          console.log('currentStatus::' + currentStatus);
+          var canDeleteStatus = [0, 3, 6];
+
+          if(!(canDeleteStatus.indexOf(currentStatus) > -1)){
+
+            PlgDialog.alert('当前状态不可删除!');
+
+            return false;
+          }
+
+          if (!ids) {
+
+            return;
+
+          }
+          
+          var confirmText = `<div style="padding: 10px; line-height: 22px; font-size: 18px; color: red; font-weight: 500;">
+            <span class="layui-icon layui-icon-tips"></span>是否确认删除么?<br>
+            </div>`;
+
+          var dialog = layer.open({
+            type: 1
+            ,title: false //不显示标题栏
+            ,closeBtn: false
+            ,area: '300px;'
+            ,shade: 0.8
+            ,id: 'LAY_layuipro' //设定一个id,防止重复弹出
+            ,btn: ['确认', '取消']
+            ,btnAlign: 'c'
+            ,moveType: 1 //拖拽模式,0或者1
+            ,content: confirmText
+            ,yes: function() {
+              //console.log('确认删除');
+              layer.close(dialog); //关闭信息框
+              var loading = Prolog.loading2();
+              Prolog.ajax({
+                url: BASE_URL + 'microservice' + '/' + ids,
+                type: 'DELETE',
+                dataType: 'json',
+                success: function (data) {
+                  loading();
+
+                  if (data.success) {
+                    grid.reload();
+                  } else {
+                    PlgDialog.alert(data.message);
+                  }
+                }
+              });
+            }
+            ,btn2: function() {
+              //console.log('取消删除');
+            }
+          });
+        
+        }
+
+      };
+
+      if (name && operationGroup.hasOwnProperty(name)) {
+        operationGroup[name]();
+      }
+
+
+    });
+
+  }());
+</script>

+ 89 - 0
plg-tms-std-web-vue/public/jq/pages/microservice/websockettest.html

@@ -0,0 +1,89 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+    <title>My WebSocket</title>
+</head>
+
+<body>
+Welcome<br/>
+<input id="text" type="text" /><button onclick="send()">Send</button>    <button onclick="closeWebSocket()">Close</button>
+<div id="message">
+</div>
+</body>
+
+<script type="text/javascript">
+	
+	function freshpage(){
+		//获取总高度
+		var heigh = document.body.scrollHeight;
+		window.scrollTo(0,heigh);
+	}
+	
+	
+    var websocket = null;
+    
+//  var ipAdress = getUrlParms("ipAdress");
+    var fileName = getUrlParms("fileName");
+	var host = getUrlParms("ipAdress");
+    //判断当前浏览器是否支持WebSocket
+    if('WebSocket' in window){
+        websocket = new WebSocket("ws://" + host + ":7771/webSocket/"+fileName);
+//      websocket = new WebSocket("ws://localhost:7771/webSocket/"+"入参");
+    }
+    else{
+        alert('Not support websocket')
+    }
+
+    //连接发生错误的回调方法
+    websocket.onerror = function(){
+        setMessageInnerHTML("error");
+    };
+
+    //连接成功建立的回调方法
+    websocket.onopen = function(event){
+        setMessageInnerHTML("open");
+    }
+
+    //接收到消息的回调方法
+    websocket.onmessage = function(event){
+        setMessageInnerHTML(event.data);
+        freshpage();
+    }
+
+    //连接关闭的回调方法
+    websocket.onclose = function(){
+        setMessageInnerHTML("close");
+    }
+
+    //监听窗口关闭事件,当窗口关闭时,主动去关闭websocket连接,防止连接还没断开就关闭窗口,server端会抛异常。
+    window.onbeforeunload = function(){
+        websocket.close();
+    }
+
+    //将消息显示在网页上
+    function setMessageInnerHTML(innerHTML){
+        document.getElementById('message').innerHTML += innerHTML + '<br/>';
+    }
+
+    //关闭连接
+    function closeWebSocket(){
+        websocket.close();
+    }
+
+    //发送消息
+    function send(){
+        var message = document.getElementById('text').value;
+        websocket.send(message);
+    }
+    
+    //获取地址栏参数,name:参数名称
+ function getUrlParms(name){
+   var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)");
+   var r = window.location.search.substr(1).match(reg);
+   if(r!=null)
+   return unescape(r[2]);
+   return null;
+   }
+    
+</script>
+</html>

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 0 - 0
plg-tms-std-web-vue/public/jq/pages/rabbit/css/app.f077487f.css


+ 1 - 0
plg-tms-std-web-vue/public/jq/pages/rabbit/css/chunk-1b35494c.c139bcad.css

@@ -0,0 +1 @@
+.test[data-v-49167ac0]{color:pink}

+ 1 - 0
plg-tms-std-web-vue/public/jq/pages/rabbit/css/chunk-67b2743a.33568435.css

@@ -0,0 +1 @@
+.ant-tabs-bar{margin:0!important}.ant-tabs-nav-scroll{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;padding-left:30px}.ant-tabs-nav .ant-tabs-tab-active{font-size:14px;color:#1890ff;letter-spacing:0;text-align:left;line-height:22px}

+ 1 - 0
plg-tms-std-web-vue/public/jq/pages/rabbit/css/chunk-77d5b6e2.fa082d99.css

@@ -0,0 +1 @@
+.test[data-v-8540b4fa]{color:pink}

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 0 - 0
plg-tms-std-web-vue/public/jq/pages/rabbit/css/chunk-vendors.b9c32c10.css


BIN
plg-tms-std-web-vue/public/jq/pages/rabbit/favicon.ico


+ 1 - 0
plg-tms-std-web-vue/public/jq/pages/rabbit/index.html

@@ -0,0 +1 @@
+<!DOCTYPE html><html lang=en><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1"><link rel=icon href=/ops/pages/rabbit/favicon.ico><title>rabbit</title><link href=/ops/pages/rabbit/css/chunk-1b35494c.c139bcad.css rel=prefetch><link href=/ops/pages/rabbit/css/chunk-67b2743a.33568435.css rel=prefetch><link href=/ops/pages/rabbit/css/chunk-77d5b6e2.fa082d99.css rel=prefetch><link href=/ops/pages/rabbit/js/chunk-0b36b6a5.34c0e2cc.js rel=prefetch><link href=/ops/pages/rabbit/js/chunk-1b35494c.34a684aa.js rel=prefetch><link href=/ops/pages/rabbit/js/chunk-1c5aa540.d84d3c35.js rel=prefetch><link href=/ops/pages/rabbit/js/chunk-1cb40ddb.ca0f13c9.js rel=prefetch><link href=/ops/pages/rabbit/js/chunk-2d0b2eda.b528f240.js rel=prefetch><link href=/ops/pages/rabbit/js/chunk-58732a7e.7d381c32.js rel=prefetch><link href=/ops/pages/rabbit/js/chunk-67b2743a.c4cc8ede.js rel=prefetch><link href=/ops/pages/rabbit/js/chunk-77d5b6e2.507c6972.js rel=prefetch><link href=/ops/pages/rabbit/js/chunk-9c5f4bce.c7d4f529.js rel=prefetch><link href=/ops/pages/rabbit/js/chunk-d38cd5e6.5903547b.js rel=prefetch><link href=/ops/pages/rabbit/css/app.f077487f.css rel=preload as=style><link href=/ops/pages/rabbit/css/chunk-vendors.b9c32c10.css rel=preload as=style><link href=/ops/pages/rabbit/js/app.bcfc8d6f.js rel=preload as=script><link href=/ops/pages/rabbit/js/chunk-vendors.ead238f9.js rel=preload as=script><link href=/ops/pages/rabbit/css/chunk-vendors.b9c32c10.css rel=stylesheet><link href=/ops/pages/rabbit/css/app.f077487f.css rel=stylesheet></head><body><noscript><strong>We're sorry but rabbit doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id=app></div><script src=/ops/pages/rabbit/js/chunk-vendors.ead238f9.js></script><script src=/ops/pages/rabbit/js/app.bcfc8d6f.js></script></body></html>

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 0 - 0
plg-tms-std-web-vue/public/jq/pages/rabbit/js/app.bcfc8d6f.js


Vissa filer visades inte eftersom för många filer har ändrats