Explorar el Código

feat: 初始化项目基础结构和配置

新增项目基础文件结构、配置文件和静态资源
添加公共组件、工具函数、API接口和路由配置
引入Vue3、Vite、Element Plus等基础技术栈
配置环境变量、Git忽略规则和构建脚本
huoyi hace 1 día
commit
b15a7f8923
Se han modificado 100 ficheros con 3859 adiciones y 0 borrados
  1. 8 0
      .env.development
  2. 11 0
      .env.production
  3. 11 0
      .env.staging
  4. 24 0
      .gitignore
  5. 20 0
      LICENSE
  6. 108 0
      README.md
  7. 12 0
      bin/build.bat
  8. 12 0
      bin/package.bat
  9. 12 0
      bin/run-web.bat
  10. 46 0
      html/ie.html
  11. 215 0
      index.html
  12. 71 0
      package.json
  13. BIN
      public/favicon.ico
  14. 512 0
      script/deploy.mjs
  15. 15 0
      src/App.vue
  16. 197 0
      src/api/assistant/assistant.js
  17. 44 0
      src/api/attendance/attendanceRecord.js
  18. 44 0
      src/api/attendance/checkRecord.js
  19. 72 0
      src/api/attendance/postRecord.js
  20. 44 0
      src/api/attendance/record.js
  21. 27 0
      src/api/attendance/shiftScheduling.js
  22. 69 0
      src/api/check/checkCorrection.js
  23. 44 0
      src/api/check/checkRecord.js
  24. 39 0
      src/api/check/checkTask.js
  25. 28 0
      src/api/examManage/trainingPerformance.js
  26. 371 0
      src/api/item/items.js
  27. 44 0
      src/api/item/record.js
  28. 180 0
      src/api/largeScreen/largeScreen.js
  29. 60 0
      src/api/login.js
  30. 9 0
      src/api/menu.js
  31. 57 0
      src/api/monitor/cache.js
  32. 71 0
      src/api/monitor/job.js
  33. 26 0
      src/api/monitor/jobLog.js
  34. 34 0
      src/api/monitor/logininfor.js
  35. 18 0
      src/api/monitor/online.js
  36. 26 0
      src/api/monitor/operlog.js
  37. 9 0
      src/api/monitor/server.js
  38. 26 0
      src/api/performance/performance.js
  39. 43 0
      src/api/system/app.js
  40. 44 0
      src/api/system/category.js
  41. 44 0
      src/api/system/checkCategory.js
  42. 14 0
      src/api/system/common.js
  43. 60 0
      src/api/system/config.js
  44. 52 0
      src/api/system/dept.js
  45. 52 0
      src/api/system/dict/data.js
  46. 60 0
      src/api/system/dict/type.js
  47. 44 0
      src/api/system/generator.js
  48. 44 0
      src/api/system/item.js
  49. 60 0
      src/api/system/menu.js
  50. 44 0
      src/api/system/notice.js
  51. 44 0
      src/api/system/point.js
  52. 44 0
      src/api/system/position.js
  53. 52 0
      src/api/system/post.js
  54. 44 0
      src/api/system/project.js
  55. 134 0
      src/api/system/role.js
  56. 53 0
      src/api/system/sql.js
  57. 153 0
      src/api/system/user.js
  58. 41 0
      src/api/system/workDocu.js
  59. 85 0
      src/api/tool/gen.js
  60. BIN
      src/assets/401_images/401.gif
  61. BIN
      src/assets/404_images/404.png
  62. BIN
      src/assets/404_images/404_cloud.png
  63. BIN
      src/assets/icons/danger.png
  64. BIN
      src/assets/icons/duoren.png
  65. BIN
      src/assets/icons/one.png
  66. BIN
      src/assets/icons/shang.png
  67. BIN
      src/assets/icons/sousuo.png
  68. 1 0
      src/assets/icons/svg/404.svg
  69. 1 0
      src/assets/icons/svg/bug.svg
  70. 1 0
      src/assets/icons/svg/build.svg
  71. 1 0
      src/assets/icons/svg/button.svg
  72. 1 0
      src/assets/icons/svg/cascader.svg
  73. 1 0
      src/assets/icons/svg/chart.svg
  74. 1 0
      src/assets/icons/svg/checkbox.svg
  75. 1 0
      src/assets/icons/svg/clipboard.svg
  76. 1 0
      src/assets/icons/svg/code.svg
  77. 1 0
      src/assets/icons/svg/color.svg
  78. 1 0
      src/assets/icons/svg/component.svg
  79. 1 0
      src/assets/icons/svg/dashboard.svg
  80. 1 0
      src/assets/icons/svg/date-range.svg
  81. 1 0
      src/assets/icons/svg/date.svg
  82. 1 0
      src/assets/icons/svg/dict.svg
  83. 1 0
      src/assets/icons/svg/documentation.svg
  84. 1 0
      src/assets/icons/svg/download.svg
  85. 1 0
      src/assets/icons/svg/drag.svg
  86. 1 0
      src/assets/icons/svg/druid.svg
  87. 1 0
      src/assets/icons/svg/edit.svg
  88. 1 0
      src/assets/icons/svg/education.svg
  89. 1 0
      src/assets/icons/svg/email.svg
  90. 1 0
      src/assets/icons/svg/enter.svg
  91. 1 0
      src/assets/icons/svg/example.svg
  92. 1 0
      src/assets/icons/svg/excel.svg
  93. 1 0
      src/assets/icons/svg/exit-fullscreen.svg
  94. 1 0
      src/assets/icons/svg/eye-open.svg
  95. 1 0
      src/assets/icons/svg/eye.svg
  96. 1 0
      src/assets/icons/svg/form.svg
  97. 1 0
      src/assets/icons/svg/fullscreen.svg
  98. 1 0
      src/assets/icons/svg/github.svg
  99. 1 0
      src/assets/icons/svg/guide.svg
  100. 0 0
      src/assets/icons/svg/icon.svg

+ 8 - 0
.env.development

@@ -0,0 +1,8 @@
1
+# 页面标题
2
+VITE_APP_TITLE = 安检分级质控系统-管理端
3
+
4
+# 开发环境配置
5
+VITE_APP_ENV = 'development'
6
+
7
+# 安检分级质控系统-管理端/开发环境
8
+VITE_APP_BASE_API = '/dev-api'

+ 11 - 0
.env.production

@@ -0,0 +1,11 @@
1
+# 页面标题
2
+VITE_APP_TITLE = 安检分级质控系统-管理端
3
+
4
+# 生产环境配置
5
+VITE_APP_ENV = 'production'
6
+
7
+# 安检分级质控系统-管理端/生产环境
8
+VITE_APP_BASE_API = '/prod-api'
9
+
10
+# 是否在打包时开启压缩,支持 gzip 和 brotli
11
+VITE_BUILD_COMPRESS = gzip

+ 11 - 0
.env.staging

@@ -0,0 +1,11 @@
1
+# 页面标题
2
+VITE_APP_TITLE = 安检分级质控系统-管理端
3
+
4
+# 生产环境配置
5
+VITE_APP_ENV = 'staging'
6
+
7
+# 安检分级质控系统-管理端/生产环境
8
+VITE_APP_BASE_API = '/stage-api'
9
+
10
+# 是否在打包时开启压缩,支持 gzip 和 brotli
11
+VITE_BUILD_COMPRESS = gzip

+ 24 - 0
.gitignore

@@ -0,0 +1,24 @@
1
+.DS_Store
2
+node_modules/
3
+dist/
4
+dist.zip
5
+npm-debug.log*
6
+yarn-debug.log*
7
+yarn-error.log*
8
+**/*.log
9
+
10
+tests/**/coverage/
11
+tests/e2e/reports
12
+selenium-debug.log
13
+
14
+# Editor directories and files
15
+.idea
16
+.vscode
17
+*.suo
18
+*.ntvs*
19
+*.njsproj
20
+*.sln
21
+*.local
22
+
23
+package-lock.json
24
+yarn.lock

+ 20 - 0
LICENSE

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

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 108 - 0
README.md


+ 12 - 0
bin/build.bat

@@ -0,0 +1,12 @@
1
+@echo off
2
+echo.
3
+echo [信息] 打包Web工程,生成dist文件。
4
+echo.
5
+
6
+%~d0
7
+cd %~dp0
8
+
9
+cd ..
10
+yarn build:prod
11
+
12
+pause

+ 12 - 0
bin/package.bat

@@ -0,0 +1,12 @@
1
+@echo off
2
+echo.
3
+echo [信息] 安装Web工程,生成node_modules文件。
4
+echo.
5
+
6
+%~d0
7
+cd %~dp0
8
+
9
+cd ..
10
+yarn --registry=https://registry.npmmirror.com
11
+
12
+pause

+ 12 - 0
bin/run-web.bat

@@ -0,0 +1,12 @@
1
+@echo off
2
+echo.
3
+echo [信息] 使用 Vite 命令运行 Web 工程。
4
+echo.
5
+
6
+%~d0
7
+cd %~dp0
8
+
9
+cd ..
10
+yarn dev
11
+
12
+pause

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 46 - 0
html/ie.html


+ 215 - 0
index.html

@@ -0,0 +1,215 @@
1
+<!DOCTYPE html>
2
+<html>
3
+
4
+<head>
5
+  <meta charset="utf-8">
6
+  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
7
+  <meta name="renderer" content="webkit">
8
+  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
9
+  <link rel="icon" href="/favicon.ico">
10
+  <title>安检分级质控系统-管理端</title>
11
+  <!--[if lt IE 11]><script>window.location.href='/html/ie.html';</script><![endif]-->
12
+  <style>
13
+    html,
14
+    body,
15
+    #app {
16
+      height: 100%;
17
+      margin: 0px;
18
+      padding: 0px;
19
+    }
20
+
21
+    .chromeframe {
22
+      margin: 0.2em 0;
23
+      background: #ccc;
24
+      color: #000;
25
+      padding: 0.2em 0;
26
+    }
27
+
28
+    #loader-wrapper {
29
+      position: fixed;
30
+      top: 0;
31
+      left: 0;
32
+      width: 100%;
33
+      height: 100%;
34
+      z-index: 999999;
35
+    }
36
+
37
+    #loader {
38
+      display: block;
39
+      position: relative;
40
+      left: 50%;
41
+      top: 50%;
42
+      width: 150px;
43
+      height: 150px;
44
+      margin: -75px 0 0 -75px;
45
+      border-radius: 50%;
46
+      border: 3px solid transparent;
47
+      border-top-color: #FFF;
48
+      -webkit-animation: spin 2s linear infinite;
49
+      -ms-animation: spin 2s linear infinite;
50
+      -moz-animation: spin 2s linear infinite;
51
+      -o-animation: spin 2s linear infinite;
52
+      animation: spin 2s linear infinite;
53
+      z-index: 1001;
54
+    }
55
+
56
+    #loader:before {
57
+      content: "";
58
+      position: absolute;
59
+      top: 5px;
60
+      left: 5px;
61
+      right: 5px;
62
+      bottom: 5px;
63
+      border-radius: 50%;
64
+      border: 3px solid transparent;
65
+      border-top-color: #FFF;
66
+      -webkit-animation: spin 3s linear infinite;
67
+      -moz-animation: spin 3s linear infinite;
68
+      -o-animation: spin 3s linear infinite;
69
+      -ms-animation: spin 3s linear infinite;
70
+      animation: spin 3s linear infinite;
71
+    }
72
+
73
+    #loader:after {
74
+      content: "";
75
+      position: absolute;
76
+      top: 15px;
77
+      left: 15px;
78
+      right: 15px;
79
+      bottom: 15px;
80
+      border-radius: 50%;
81
+      border: 3px solid transparent;
82
+      border-top-color: #FFF;
83
+      -moz-animation: spin 1.5s linear infinite;
84
+      -o-animation: spin 1.5s linear infinite;
85
+      -ms-animation: spin 1.5s linear infinite;
86
+      -webkit-animation: spin 1.5s linear infinite;
87
+      animation: spin 1.5s linear infinite;
88
+    }
89
+
90
+
91
+    @-webkit-keyframes spin {
92
+      0% {
93
+        -webkit-transform: rotate(0deg);
94
+        -ms-transform: rotate(0deg);
95
+        transform: rotate(0deg);
96
+      }
97
+
98
+      100% {
99
+        -webkit-transform: rotate(360deg);
100
+        -ms-transform: rotate(360deg);
101
+        transform: rotate(360deg);
102
+      }
103
+    }
104
+
105
+    @keyframes spin {
106
+      0% {
107
+        -webkit-transform: rotate(0deg);
108
+        -ms-transform: rotate(0deg);
109
+        transform: rotate(0deg);
110
+      }
111
+
112
+      100% {
113
+        -webkit-transform: rotate(360deg);
114
+        -ms-transform: rotate(360deg);
115
+        transform: rotate(360deg);
116
+      }
117
+    }
118
+
119
+
120
+    #loader-wrapper .loader-section {
121
+      position: fixed;
122
+      top: 0;
123
+      width: 51%;
124
+      height: 100%;
125
+      background: #7171C6;
126
+      z-index: 1000;
127
+      -webkit-transform: translateX(0);
128
+      -ms-transform: translateX(0);
129
+      transform: translateX(0);
130
+    }
131
+
132
+    #loader-wrapper .loader-section.section-left {
133
+      left: 0;
134
+    }
135
+
136
+    #loader-wrapper .loader-section.section-right {
137
+      right: 0;
138
+    }
139
+
140
+
141
+    .loaded #loader-wrapper .loader-section.section-left {
142
+      -webkit-transform: translateX(-100%);
143
+      -ms-transform: translateX(-100%);
144
+      transform: translateX(-100%);
145
+      -webkit-transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1.000);
146
+      transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1.000);
147
+    }
148
+
149
+    .loaded #loader-wrapper .loader-section.section-right {
150
+      -webkit-transform: translateX(100%);
151
+      -ms-transform: translateX(100%);
152
+      transform: translateX(100%);
153
+      -webkit-transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1.000);
154
+      transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1.000);
155
+    }
156
+
157
+    .loaded #loader {
158
+      opacity: 0;
159
+      -webkit-transition: all 0.3s ease-out;
160
+      transition: all 0.3s ease-out;
161
+    }
162
+
163
+    .loaded #loader-wrapper {
164
+      visibility: hidden;
165
+      -webkit-transform: translateY(-100%);
166
+      -ms-transform: translateY(-100%);
167
+      transform: translateY(-100%);
168
+      -webkit-transition: all 0.3s 1s ease-out;
169
+      transition: all 0.3s 1s ease-out;
170
+    }
171
+
172
+    .no-js #loader-wrapper {
173
+      display: none;
174
+    }
175
+
176
+    .no-js h1 {
177
+      color: #222222;
178
+    }
179
+
180
+    #loader-wrapper .load_title {
181
+      font-family: 'Open Sans';
182
+      color: #FFF;
183
+      font-size: 19px;
184
+      width: 100%;
185
+      text-align: center;
186
+      z-index: 9999999999999;
187
+      position: absolute;
188
+      top: 60%;
189
+      opacity: 1;
190
+      line-height: 30px;
191
+    }
192
+
193
+    #loader-wrapper .load_title span {
194
+      font-weight: normal;
195
+      font-style: italic;
196
+      font-size: 13px;
197
+      color: #FFF;
198
+      opacity: 0.5;
199
+    }
200
+  </style>
201
+</head>
202
+
203
+<body>
204
+  <div id="app">
205
+    <div id="loader-wrapper">
206
+      <div id="loader"></div>
207
+      <div class="loader-section section-left"></div>
208
+      <div class="loader-section section-right"></div>
209
+      <div class="load_title">正在加载系统资源,请耐心等待</div>
210
+    </div>
211
+  </div>
212
+  <script type="module" src="/src/main.js"></script>
213
+</body>
214
+
215
+</html>

+ 71 - 0
package.json

@@ -0,0 +1,71 @@
1
+{
2
+  "name": "airport-web",
3
+  "version": "3.9.0",
4
+  "description": "安检分级质控系统-管理端",
5
+  "author": "sundot",
6
+  "license": "MIT",
7
+  "type": "module",
8
+  "scripts": {
9
+    "dev": "vite",
10
+    "build:prod": "vite build",
11
+    "build:stage": "vite build --mode staging",
12
+    "preview": "vite preview",
13
+    "build": "vite build",
14
+    "deploy": "node script/deploy.mjs --env dev",
15
+    "deploy:prod": "node script/deploy.mjs --env prod"
16
+  },
17
+  "repository": {
18
+    "type": "git",
19
+    "url": "http://git.sundot.cn/airport/airport-web.git"
20
+  },
21
+  "dependencies": {
22
+    "@babel/runtime": "^7.28.6",
23
+    "@codemirror/basic-setup": "^0.20.0",
24
+    "@codemirror/lang-sql": "^6.9.0",
25
+    "@codemirror/language": "^6.11.1",
26
+    "@codemirror/state": "^6.5.2",
27
+    "@codemirror/view": "^6.37.2",
28
+    "@element-plus/icons-vue": "2.3.1",
29
+    "@vueup/vue-quill": "1.2.0",
30
+    "@vueuse/core": "13.3.0",
31
+    "axios": "1.9.0",
32
+    "clipboard": "2.0.11",
33
+    "codemirror-editor-vue3": "^2.8.0",
34
+    "docx": "^9.5.1",
35
+    "echarts": "5.6.0",
36
+    "element-plus": "2.9.9",
37
+    "file-saver": "^2.0.5",
38
+    "fuse.js": "6.6.2",
39
+    "html2canvas": "^1.4.1",
40
+    "js-beautify": "1.14.11",
41
+    "js-cookie": "3.0.5",
42
+    "jsencrypt": "3.3.2",
43
+    "jspdf": "^4.1.0",
44
+    "jspdf-autotable": "^5.0.7",
45
+    "moment": "^2.30.1",
46
+    "nprogress": "0.2.0",
47
+    "pinia": "3.0.2",
48
+    "splitpanes": "4.0.4",
49
+    "vue": "3.5.16",
50
+    "vue-cropper": "1.1.1",
51
+    "vue-router": "4.5.1",
52
+    "vue3-scroll-seamless": "^1.0.6",
53
+    "vuedraggable": "4.1.0",
54
+    "wow.js": "^1.2.2"
55
+  },
56
+  "devDependencies": {
57
+    "@vitejs/plugin-vue": "5.2.4",
58
+    "cli-progress": "^3.12.0",
59
+    "less": "^4.3.0",
60
+    "sass-embedded": "1.89.1",
61
+    "ssh2-sftp-client": "^12.0.1",
62
+    "unplugin-auto-import": "0.18.6",
63
+    "unplugin-vue-setup-extend-plus": "1.0.1",
64
+    "vite": "6.3.5",
65
+    "vite-plugin-compression": "0.5.1",
66
+    "vite-plugin-svg-icons": "2.0.1"
67
+  },
68
+  "overrides": {
69
+    "quill": "2.0.2"
70
+  }
71
+}

BIN
public/favicon.ico


+ 512 - 0
script/deploy.mjs

@@ -0,0 +1,512 @@
1
+#!/usr/bin/env node
2
+
3
+import sftpClient from 'ssh2-sftp-client'
4
+import {
5
+  readFileSync,
6
+  existsSync,
7
+  statSync,
8
+  readdirSync,
9
+  unlinkSync,
10
+  createReadStream,
11
+  writeFileSync
12
+} from 'fs'
13
+import { join, dirname } from 'path'
14
+import { fileURLToPath } from 'url'
15
+import { SingleBar } from 'cli-progress'
16
+import { exec, spawn } from 'child_process'
17
+import { promisify } from 'util'
18
+import { Command } from 'commander'
19
+const program = new Command();
20
+program.option('-n --env <env>', '发布环境', 'dev')
21
+program.parse(process.argv);
22
+const options = program.opts();
23
+
24
+const __filename = fileURLToPath(import.meta.url)
25
+const __dirname = dirname(__filename)
26
+const projectRoot = join(__dirname, '..')
27
+
28
+// 配置 测试环境 : 
29
+const config = options.env === 'prod' ? {
30
+  host: '60.205.166.0',
31
+  username: 'root',
32
+  password: 'U/N$$XBv', // 运行时输入
33
+  remotePath: '/opt/data/airport-web/dist',
34
+  localPath: join(projectRoot, 'dist'),
35
+  accessLocation: 'http://airport.samsundot.com:9011'
36
+} : {
37
+  host: '192.168.3.221',
38
+  username: 'root',
39
+  password: 'root', // 运行时输入
40
+  remotePath: '/opt/data/airport-web/dist',
41
+  localPath: join(projectRoot, 'dist')
42
+}
43
+
44
+// 颜色输出
45
+const colors = {
46
+  reset: '\x1b[0m',
47
+  bright: '\x1b[1m',
48
+  red: '\x1b[31m',
49
+  green: '\x1b[32m',
50
+  yellow: '\x1b[33m',
51
+  blue: '\x1b[34m',
52
+  magenta: '\x1b[35m',
53
+  cyan: '\x1b[36m'
54
+}
55
+
56
+function log (message, color = 'reset') {
57
+  console.log(`${colors[ color ]}${message}${colors.reset}`)
58
+}
59
+
60
+// 获取密码
61
+async function getPassword () {
62
+  const readline = await import('readline')
63
+  const rl = readline.createInterface({
64
+    input: process.stdin,
65
+    output: process.stdout
66
+  })
67
+
68
+  return new Promise(resolve => {
69
+    rl.question('🔐 请输入服务器密码: ', password => {
70
+      rl.close()
71
+      resolve(password)
72
+    })
73
+  })
74
+}
75
+
76
+// 检查并构建 dist 目录
77
+async function checkAndBuildDist () {
78
+  if (!existsSync(config.localPath)) {
79
+    log('⚠️  dist 目录不存在,开始自动构建...', 'yellow')
80
+
81
+    // 检查 package.json 是否存在
82
+    const packageJsonPath = join(projectRoot, 'package.json')
83
+    if (!existsSync(packageJsonPath)) {
84
+      log('❌ package.json 不存在', 'red')
85
+      process.exit(1)
86
+    }
87
+
88
+    // 检查是否有 build 脚本
89
+    const packageJson = JSON.parse(readFileSync(packageJsonPath, 'utf8'))
90
+    if (!packageJson.scripts || !packageJson.scripts.build) {
91
+      log('❌ package.json 中没有找到 build 脚本', 'red')
92
+      process.exit(1)
93
+    }
94
+
95
+    // 执行构建
96
+    log('🔨 正在执行构建命令...', 'cyan')
97
+    const execAsync = promisify(exec)
98
+
99
+    try {
100
+      // 优先使用 yarn,如果没有则使用 npm
101
+      let buildCommand = 'npm run build'
102
+      let packageManager = 'npm'
103
+
104
+      // 检查是否有 yarn
105
+      try {
106
+        await execAsync('yarn --version', { cwd: projectRoot })
107
+        buildCommand = 'yarn build'
108
+        packageManager = 'yarn'
109
+        log(`使用 ${packageManager} 构建...`, 'cyan')
110
+      } catch (yarnError) {
111
+        log('yarn 不可用,使用 npm 构建...', 'yellow')
112
+      }
113
+
114
+      await execAsync(buildCommand, { cwd: projectRoot })
115
+
116
+      // 再次检查构建结果
117
+      if (!existsSync(config.localPath)) {
118
+        log('❌ 构建失败,dist 目录仍未生成', 'red')
119
+        process.exit(1)
120
+      }
121
+
122
+      log(`✅ 构建完成!(使用 ${packageManager})`, 'green')
123
+    } catch (error) {
124
+      log(`❌ 构建失败: ${error.message}`, 'red')
125
+      process.exit(1)
126
+    }
127
+  } else {
128
+    const stats = statSync(config.localPath)
129
+    if (!stats.isDirectory()) {
130
+      log('❌ dist 不是目录', 'red')
131
+      process.exit(1)
132
+    }
133
+    log('✅ dist 目录检查通过', 'green')
134
+  }
135
+}
136
+
137
+// 计算目录大小
138
+function getDirectorySize (dirPath) {
139
+  let totalSize = 0
140
+  const files = readdirSync(dirPath, { withFileTypes: true })
141
+
142
+  for (const file of files) {
143
+    const fullPath = join(dirPath, file.name)
144
+    if (file.isDirectory()) {
145
+      totalSize += getDirectorySize(fullPath)
146
+    } else {
147
+      totalSize += statSync(fullPath).size
148
+    }
149
+  }
150
+
151
+  return totalSize
152
+}
153
+
154
+// 格式化文件大小
155
+function formatSize (bytes) {
156
+  const units = [ 'B', 'KB', 'MB', 'GB' ]
157
+  let size = bytes
158
+  let unitIndex = 0
159
+
160
+  while (size >= 1024 && unitIndex < units.length - 1) {
161
+    size /= 1024
162
+    unitIndex++
163
+  }
164
+
165
+  return `${size.toFixed(1)}${units[ unitIndex ]}`
166
+}
167
+
168
+// 创建压缩包
169
+async function createArchive () {
170
+  const execAsync = promisify(exec)
171
+
172
+  const archivePath = join(projectRoot, 'dist.tar.gz')
173
+
174
+  log('📦 正在创建压缩包...', 'yellow')
175
+  try {
176
+    // 使用 tar 创建压缩包,排除 macOS 扩展属性
177
+    await execAsync(`tar --no-xattrs -czf "${archivePath}" -C "${config.localPath}" .`)
178
+
179
+    const stats = statSync(archivePath)
180
+    log(`✅ 压缩包创建完成,大小: ${formatSize(stats.size)}`, 'green')
181
+
182
+    return archivePath
183
+  } catch (error) {
184
+    log(`❌ 创建压缩包失败: ${error.message}`, 'red')
185
+    throw error
186
+  }
187
+}
188
+
189
+// 获取用户选择
190
+async function getUserChoice (question) {
191
+  const readline = await import('readline')
192
+  const rl = readline.createInterface({
193
+    input: process.stdin,
194
+    output: process.stdout
195
+  })
196
+
197
+  return new Promise(resolve => {
198
+    rl.question(question, answer => {
199
+      rl.close()
200
+      resolve(answer.toLowerCase().trim())
201
+    })
202
+  })
203
+}
204
+
205
+// 主部署函数
206
+async function deploy () {
207
+  let archivePath = null
208
+
209
+  try {
210
+    log('🚀 开始 Node.js 部署...', 'cyan')
211
+
212
+    // 检查并构建 dist 目录
213
+    await checkAndBuildDist()
214
+
215
+    if (!config.password) {
216
+      // 获取密码
217
+      config.password = await getPassword()
218
+    }
219
+
220
+    // 计算总大小
221
+    const totalSize = getDirectorySize(config.localPath)
222
+    log(`📊 总大小: ${formatSize(totalSize)}`, 'blue')
223
+
224
+    // 检查是否已有压缩包,支持断点续传
225
+    const existingArchivePath = join(projectRoot, 'dist.tar.gz')
226
+    if (existsSync(existingArchivePath)) {
227
+      log('📦 发现已存在的压缩包,跳过打包步骤', 'yellow')
228
+      archivePath = existingArchivePath
229
+    } else {
230
+      // 创建压缩包
231
+      archivePath = await createArchive()
232
+    }
233
+
234
+    // 连接 SFTP
235
+    log('🔌 正在连接服务器...', 'yellow')
236
+    const sftp = new sftpClient()
237
+    await sftp.connect({
238
+      host: config.host,
239
+      username: config.username,
240
+      password: config.password
241
+    })
242
+    log('✅ SFTP 连接成功', 'green')
243
+
244
+    // 创建远程目录
245
+    log('📁 创建远程目录...', 'yellow')
246
+    await sftp.mkdir(config.remotePath, true) // true 表示递归创建
247
+
248
+    // 检查服务器是否已存在压缩包
249
+    const remoteArchivePath = '/opt/data/airport-web/dist.tar.gz'
250
+    let needUpload = true
251
+
252
+    try {
253
+      await sftp.stat(remoteArchivePath)
254
+      log('📦 服务器已存在压缩包', 'yellow')
255
+
256
+      // 询问用户是否续传
257
+      const choice = await getUserChoice('是否续传?(y/n): ')
258
+      if (choice === 'y' || choice === 'yes') {
259
+        log('📦 跳过上传步骤,使用现有压缩包', 'green')
260
+        needUpload = false
261
+      } else {
262
+        log('🗑️  删除服务器压缩包,重新上传...', 'yellow')
263
+        await sftp.unlink(remoteArchivePath)
264
+        log('📤 开始上传新压缩包...', 'yellow')
265
+      }
266
+    } catch (error) {
267
+      // 文件不存在,需要上传
268
+      log('📤 服务器不存在压缩包,开始上传...', 'yellow')
269
+    }
270
+
271
+    if (needUpload) {
272
+      // 上传压缩包
273
+      log('📤 正在上传压缩包...', 'yellow')
274
+
275
+      // 显示上传进度
276
+      const fileSize = statSync(archivePath).size
277
+      log(`📊 文件大小: ${formatSize(fileSize)}`, 'blue')
278
+
279
+      // 创建进度条
280
+      const progressBar = new SingleBar({
281
+        format: '📤 上传进度 |{bar}| {percentage}% | {value}/{total} Bytes | {speed}',
282
+        barCompleteChar: '█',
283
+        barIncompleteChar: '░',
284
+        hideCursor: true
285
+      })
286
+
287
+      progressBar.start(fileSize, 0)
288
+
289
+      try {
290
+        // 使用流的方式上传,获得实时进度
291
+        const readStream = createReadStream(archivePath)
292
+        const writeStream = await sftp.createWriteStream(remoteArchivePath)
293
+
294
+        let uploadedBytes = 0
295
+        const startTime = Date.now()
296
+
297
+        // 监听数据流,实时更新进度
298
+        readStream.on('data', chunk => {
299
+          uploadedBytes += chunk.length
300
+          const elapsedTime = (Date.now() - startTime) / 1000
301
+          const speed = elapsedTime > 0 ? (uploadedBytes / elapsedTime).toFixed(2) : '0'
302
+          progressBar.update(uploadedBytes, { speed: `${speed} B/s` })
303
+        })
304
+
305
+        // 处理流事件
306
+        readStream.pipe(writeStream)
307
+
308
+        // 等待上传完成
309
+        await new Promise((resolve, reject) => {
310
+          writeStream.on('close', () => {
311
+            progressBar.stop()
312
+            log('✅ 压缩包上传完成', 'green')
313
+            resolve()
314
+          })
315
+
316
+          writeStream.on('error', err => {
317
+            progressBar.stop()
318
+            reject(err)
319
+          })
320
+
321
+          readStream.on('error', err => {
322
+            progressBar.stop()
323
+            reject(err)
324
+          })
325
+        })
326
+      } catch (error) {
327
+        progressBar.stop()
328
+        throw error
329
+      }
330
+    }
331
+
332
+    // 在服务器端解压
333
+    log('📦 正在服务器端解压...', 'yellow')
334
+
335
+    // 检测操作系统
336
+    const isWindows = process.platform === 'win32'
337
+    const execAsync = promisify(exec)
338
+
339
+
340
+    // 转义密码(关键步骤!)
341
+    function escapeForExpect (password) {
342
+      return password
343
+        .replace(/\\/g, "\\\\") // 转义反斜杠 \
344
+        .replace(/\$/g, "\\$"); // 转义 $
345
+    }
346
+
347
+    if (isWindows) {
348
+      // Windows 系统:使用 PowerShell 脚本(单次密码输入)
349
+      log('🪟  Windows 系统检测到,使用 PowerShell 脚本', 'yellow')
350
+      const runPowerShellScript = (scriptPath) => {
351
+        return new Promise((resolve, reject) => {
352
+          const child = spawn('powershell', [
353
+            '-ExecutionPolicy',
354
+            'Bypass',
355
+            '-File',
356
+            scriptPath
357
+          ], {
358
+            stdio: 'inherit'
359
+          });
360
+
361
+          child.on('close', (code) => {
362
+            if (code === 0) {
363
+              resolve();
364
+            } else {
365
+              reject(new Error(`PowerShell 脚本执行失败,退出码: ${code}`));
366
+            }
367
+          });
368
+
369
+          child.on('error', (error) => {
370
+            reject(new Error(`无法启动 PowerShell: ${error.message}`));
371
+          });
372
+        });
373
+      };
374
+      const powershellScript = `
375
+        $username = "${config.username}"
376
+        $hostname = "${config.host}"
377
+        $remotePath = "${config.remotePath}"
378
+        $archivePath = "${remoteArchivePath}"
379
+        $safePath = [System.Management.Automation.WildcardPattern]::Escape($remotePath)
380
+        $safeArchive = [System.Management.Automation.WildcardPattern]::Escape($archivePath)
381
+
382
+        # 创建 SSH 命令
383
+        $combinedCommand = "cd '$safePath' && tar -xzf '$safeArchive' && rm '$safeArchive' && chmod -R 755 '$safePath'"
384
+
385
+        Write-Host "=== 部署脚本 ===" -ForegroundColor Green
386
+        Write-Host "目标服务器: $username@$hostname" -ForegroundColor Yellow
387
+        Write-Host "远程路径: $remotePath" -ForegroundColor Yellow
388
+        Write-Host ""
389
+
390
+        Write-Host "🔑 请输入 SSH 密码 密码:${config.password}" -ForegroundColor Cyan
391
+        Write-Host ""
392
+
393
+        try {
394
+            # 执行合并命令
395
+            Write-Host "🚀 正在执行部署操作..." -ForegroundColor Cyan
396
+            ssh -o StrictHostKeyChecking=no $username@$hostname $combinedCommand
397
+            
398
+            Write-Host "✅ 所有操作完成!" -ForegroundColor Green
399
+            
400
+        } catch {
401
+            Write-Host "❌ 执行失败: $_" -ForegroundColor Red
402
+            Write-Host ""
403
+            Write-Host "请手动执行以下命令:" -ForegroundColor Yellow
404
+            Write-Host "ssh $username@$hostname \"cd '$remotePath' && tar -xzf '$archivePath' && rm '$archivePath' && chmod -R 755 '$remotePath'\"" -ForegroundColor Cyan
405
+            exit 1
406
+        }`
407
+      const psScriptPath = join(projectRoot, 'temp_deploy.ps1');
408
+      writeFileSync(psScriptPath, powershellScript);
409
+      try {
410
+        // 执行 PowerShell 脚本
411
+        log('ℹ️  即将执行部署命令,请根据提示输入密码...', 'blue');
412
+        await runPowerShellScript(psScriptPath)
413
+        log('✅ 部署完成', 'green');
414
+      } catch (error) {
415
+        log('⚠️  执行失败,请手动执行以下命令:', 'yellow');
416
+        log(`ssh ${config.username}@${config.host} "cd '${config.remotePath}' && tar -xzf '${remoteArchivePath}' && rm '${remoteArchivePath}' && chmod -R 755 '${config.remotePath}'"`, 'cyan');
417
+
418
+        // 等待用户确认
419
+        const readline = await import('readline');
420
+        const rl = readline.createInterface({
421
+          input: process.stdin,
422
+          output: process.stdout
423
+        });
424
+
425
+        await new Promise(resolve => {
426
+          rl.question('执行完成后按回车键继续...', () => {
427
+            rl.close();
428
+            resolve();
429
+          });
430
+        });
431
+      } finally {
432
+        if (existsSync(psScriptPath)) {
433
+          unlinkSync(psScriptPath);
434
+        }
435
+      }
436
+    } else {
437
+      // Unix/Linux/macOS 系统:使用 expect 脚本
438
+      const expectScript = `#!/usr/bin/expect -f
439
+        set timeout 30
440
+        set password {${config.password}}
441
+        spawn ssh -o StrictHostKeyChecking=no ${config.username}@${config.host} "cd ${config.remotePath} && tar -xzf ${remoteArchivePath} && rm ${remoteArchivePath}"
442
+        expect "password:"
443
+        send "$password\r"
444
+        expect eof
445
+      `
446
+
447
+      const expectScriptPath = join(projectRoot, 'temp_expect.sh')
448
+      writeFileSync(expectScriptPath, expectScript)
449
+
450
+      try {
451
+        await execAsync(`chmod +x ${expectScriptPath}`)
452
+        await execAsync(expectScriptPath)
453
+        log('✅ 解压完成', 'green')
454
+      } finally {
455
+        if (existsSync(expectScriptPath)) {
456
+          unlinkSync(expectScriptPath)
457
+        }
458
+      }
459
+
460
+      // 设置权限
461
+      log('🔧 设置文件权限...', 'yellow')
462
+
463
+      const chmodExpectScript = `#!/usr/bin/expect -f
464
+        set timeout 30
465
+        set password {${config.password}}
466
+        spawn ssh -o StrictHostKeyChecking=no ${config.username}@${config.host} "chmod -R 755 ${config.remotePath}"
467
+        expect "password:"
468
+        send "$password\r"
469
+        expect eof
470
+      `
471
+
472
+      const chmodScriptPath = join(projectRoot, 'temp_chmod.sh')
473
+      writeFileSync(chmodScriptPath, chmodExpectScript)
474
+
475
+      try {
476
+        await execAsync(`chmod +x ${chmodScriptPath}`)
477
+        await execAsync(chmodScriptPath)
478
+        log('✅ 权限设置完成', 'green')
479
+      } finally {
480
+        if (existsSync(chmodScriptPath)) {
481
+          unlinkSync(chmodScriptPath)
482
+        }
483
+      }
484
+    }
485
+
486
+    // 清理服务器上的压缩包
487
+    log('🗑️  清理服务器压缩包...', 'yellow')
488
+    try {
489
+      await sftp.unlink(remoteArchivePath)
490
+      log('✅ 服务器压缩包已清理', 'green')
491
+    } catch (error) {
492
+      log('⚠️  服务器压缩包清理失败(可能已被删除)', 'yellow')
493
+    }
494
+
495
+    // 关闭连接
496
+    await sftp.end()
497
+    log('🗑️  清理本地压缩包...', 'yellow')
498
+    if (archivePath && existsSync(archivePath)) {
499
+      unlinkSync(archivePath)
500
+    }
501
+
502
+    log('🎉 部署成功!', 'green')
503
+    config.accessLocation ? log(`🌐 访问地址: ${config.accessLocation}`, 'cyan') : log(`🌐 访问地址: http://${config.host}`, 'cyan')
504
+  } catch (error) {
505
+    log(`❌ 部署失败: ${error.message}`, 'red')
506
+    console.error(error)
507
+    process.exit(1)
508
+  }
509
+}
510
+
511
+// 运行部署
512
+deploy()

+ 15 - 0
src/App.vue

@@ -0,0 +1,15 @@
1
+<template>
2
+  <router-view />
3
+</template>
4
+
5
+<script setup>
6
+import useSettingsStore from '@/store/modules/settings'
7
+import { handleThemeStyle } from '@/utils/theme'
8
+
9
+onMounted(() => {
10
+  nextTick(() => {
11
+    // 初始化主题样式
12
+    handleThemeStyle(useSettingsStore().theme)
13
+  })
14
+})
15
+</script>

+ 197 - 0
src/api/assistant/assistant.js

@@ -0,0 +1,197 @@
1
+import request from '@/utils/request'
2
+// 质控活动
3
+export function getAnalysisReport(data) {
4
+  return request({
5
+    url: '/system/analysisReport/check',
6
+    method: 'post',
7
+    data: data
8
+  })
9
+}
10
+//出勤人次分析
11
+export function getCalculate(data) {
12
+  return request({
13
+    url: '/quality/attendance/calculate',
14
+    method: 'post',
15
+    data: data
16
+  })
17
+}
18
+//出勤人次趋势数据
19
+export function getCalculateTrendData(data) {
20
+  return request({
21
+    url: '/quality/attendance/trend-data',
22
+    method: 'post',
23
+    data: data
24
+  })
25
+}
26
+//获取资质等级分布饼状图数据
27
+export function getQualificationPieChart(query) {
28
+  return request({
29
+    url: '/statistics/qualification/pie-chart',
30
+    method: 'get',
31
+    params: query
32
+  })
33
+}
34
+//获取资质等级分布柱状图数据
35
+export function getQualificationBarChart(query) {
36
+  return request({
37
+    url: '/statistics/qualification/bar-chart',
38
+    method: 'get',
39
+    params: query
40
+  })
41
+}
42
+
43
+
44
+
45
+//获取物品分类统计
46
+export function getCategoryStats(query) {
47
+  return request({
48
+    url: '/quality/item-category-stats/category-stats',
49
+    method: 'get',
50
+    params: query
51
+  })
52
+}
53
+//获取查获时段趋势图
54
+export function getSeizureTimeTrend(query) {
55
+  return request({
56
+    url: '/quality/item-category-stats/seizure-time-trend',
57
+    method: 'get',
58
+    params: query
59
+  })
60
+}
61
+//获取隐匿夹带部位分布统计
62
+export function getConcealmentPositionStats(query) {
63
+  return request({
64
+    url: '/quality/item-category-stats/concealment-position-stats',
65
+    method: 'get',
66
+    params: query
67
+  })
68
+}
69
+//获取岗位分类统计
70
+export function getPostCategoryStats(query) {
71
+  return request({
72
+    url: '/quality/item-category-stats/post-category-stats',
73
+    method: 'get',
74
+    params: query
75
+  })
76
+}
77
+//获取通道排名统计
78
+export function getChannelRankingStats(query) {
79
+  return request({
80
+    url: '/quality/item-category-stats/channel-ranking-stats',
81
+    method: 'get',
82
+    params: query
83
+  })
84
+}
85
+//获取各科室查获排名
86
+export function getDepartmentRanking(query) {
87
+  return request({
88
+    url: '/quality/item-category-stats/brigade-ranking',
89
+    method: 'get',
90
+    params: query
91
+  })
92
+}
93
+
94
+//基于时间维度的绩效统计查询趋势图
95
+export function getCalculateByTime(data) {
96
+  return request({
97
+    url: '/performance/dimension/calculate-by-time',
98
+    method: 'post',
99
+    data: data
100
+  })
101
+}
102
+//基于时间维度的绩效统计查询列表
103
+export function getCalculateByTimeList(data) {
104
+  return request({
105
+    url: '/performance/dimension/calculate-by-time-list',
106
+    method: 'post',
107
+    data: data
108
+  })
109
+}
110
+
111
+
112
+
113
+//使用报告
114
+export function getUsageReport(query) {
115
+  return request({
116
+    url: '/system/usageReport/report',
117
+    method: 'get',
118
+    params: query
119
+  })
120
+}
121
+// 抽问抽答完成趋势
122
+export function getCompletionTrend(params = {}) {
123
+  return request({
124
+    url: '/v1/cs/app/daily-exam/completion-comparison',
125
+    method: 'get',
126
+    params
127
+  })
128
+}
129
+
130
+// 错题分析 - 总体问题分布
131
+export function getWrongAnalysisOverview(params = {}) {
132
+  return request({
133
+    url: '/v1/cs/app/daily-exam/wrong-analysis/pc-overview',
134
+    method: 'get',
135
+    params
136
+  })
137
+}
138
+
139
+// 错题分析 - 问题分布对比(雷达图)
140
+export function getWrongAnalysisRadar(params = {}) {
141
+  return request({
142
+    url: '/v1/cs/app/daily-exam/wrong-analysis/pc-radar',
143
+    method: 'get',
144
+    params
145
+  })
146
+}
147
+
148
+//移交公安数据
149
+export function getPoliceData(params = {}) {
150
+  return request({
151
+    url: '/quality/item-category-stats/police-data',
152
+    method: 'get',
153
+    params
154
+  })
155
+}
156
+//移交公安数据统计
157
+export function getPoliceDataStats(params = {}) {
158
+  return request({
159
+    url: '/quality/item-category-stats/police-stats',
160
+    method: 'get',
161
+    params
162
+  })
163
+}
164
+
165
+//X 光机漏检数据
166
+export function getXrayMissCheck(params = {}) {
167
+  return request({
168
+    url: '/quality/item-category-stats/xray-miss-check',
169
+    method: 'get',
170
+    params
171
+  })
172
+}
173
+//X 光机漏检人员统计 TOP3
174
+export function getXrayMissCheckStats(params = {}) {
175
+  return request({
176
+    url: '/quality/item-category-stats/xray-miss-check-top3',
177
+    method: 'get',
178
+    params
179
+  })
180
+}
181
+
182
+//异常查获数据
183
+export function getAbnormalSeizureData(params = {}) {
184
+  return request({
185
+    url: '/quality/item-category-stats/abnormal-seizure-data',
186
+    method: 'get',
187
+    params
188
+  })
189
+}
190
+//异常查获数据 TOP3
191
+export function getAbnormalSeizureStats(params = {}) {
192
+  return request({
193
+    url: '/quality/item-category-stats/abnormal-seizure-data-top3',
194
+    method: 'get',
195
+    params
196
+  })
197
+}

+ 44 - 0
src/api/attendance/attendanceRecord.js

@@ -0,0 +1,44 @@
1
+import request from '@/utils/request'
2
+
3
+// 查询考勤记录列表
4
+export function listAttendanceRecord(query) {
5
+  return request({
6
+    url: '/attendance/attendanceRecord/list',
7
+    method: 'get',
8
+    params: query
9
+  })
10
+}
11
+
12
+// 查询考勤记录详细
13
+export function getAttendanceRecord(id) {
14
+  return request({
15
+    url: '/attendance/attendanceRecord/' + id,
16
+    method: 'get'
17
+  })
18
+}
19
+
20
+// 新增考勤记录
21
+export function addAttendanceRecord(data) {
22
+  return request({
23
+    url: '/attendance/attendanceRecord',
24
+    method: 'post',
25
+    data: data
26
+  })
27
+}
28
+
29
+// 修改考勤记录
30
+export function updateAttendanceRecord(data) {
31
+  return request({
32
+    url: '/attendance/attendanceRecord',
33
+    method: 'put',
34
+    data: data
35
+  })
36
+}
37
+
38
+// 删除考勤记录
39
+export function delAttendanceRecord(id) {
40
+  return request({
41
+    url: '/attendance/attendanceRecord/' + id,
42
+    method: 'delete'
43
+  })
44
+}

+ 44 - 0
src/api/attendance/checkRecord.js

@@ -0,0 +1,44 @@
1
+import request from '@/utils/request'
2
+
3
+// 查询打卡记录列表
4
+export function listCheckRecord(query) {
5
+  return request({
6
+    url: '/attendance/checkRecord/list',
7
+    method: 'get',
8
+    params: query
9
+  })
10
+}
11
+
12
+// 查询打卡记录详细
13
+export function getCheckRecord(id) {
14
+  return request({
15
+    url: '/attendance/checkRecord/' + id,
16
+    method: 'get'
17
+  })
18
+}
19
+
20
+// 新增打卡记录
21
+export function addCheckRecord(data) {
22
+  return request({
23
+    url: '/attendance/checkRecord',
24
+    method: 'post',
25
+    data: data
26
+  })
27
+}
28
+
29
+// 修改打卡记录
30
+export function updateCheckRecord(data) {
31
+  return request({
32
+    url: '/attendance/checkRecord',
33
+    method: 'put',
34
+    data: data
35
+  })
36
+}
37
+
38
+// 删除打卡记录
39
+export function delCheckRecord(id) {
40
+  return request({
41
+    url: '/attendance/checkRecord/' + id,
42
+    method: 'delete'
43
+  })
44
+}

+ 72 - 0
src/api/attendance/postRecord.js

@@ -0,0 +1,72 @@
1
+import request from '@/utils/request'
2
+
3
+// 查询上岗记录列表
4
+export function listPostRecord(query) {
5
+  return request({
6
+    url: '/attendance/postRecord/list',
7
+    method: 'get',
8
+    params: query
9
+  })
10
+}
11
+
12
+// 查询上岗记录详细
13
+export function getPostRecord(id) {
14
+  return request({
15
+    url: '/attendance/postRecord/' + id,
16
+    method: 'get'
17
+  })
18
+}
19
+
20
+// 新增上岗记录
21
+export function addPostRecord(data) {
22
+  return request({
23
+    url: '/attendance/postRecord',
24
+    method: 'post',
25
+    data: data
26
+  })
27
+}
28
+
29
+// 修改上岗记录
30
+export function updatePostRecord(data) {
31
+  return request({
32
+    url: '/attendance/postRecord',
33
+    method: 'put',
34
+    data: data
35
+  })
36
+}
37
+
38
+// 删除上岗记录
39
+export function delPostRecord(id) {
40
+  return request({
41
+    url: '/attendance/postRecord/' + id,
42
+    method: 'delete'
43
+  })
44
+}
45
+
46
+// 查询位置信息
47
+export function positionList(data) {
48
+  return request({
49
+    url: '/attendance/postRecord/positionList',
50
+    method: 'post',
51
+    data: data
52
+  })
53
+}
54
+
55
+// 查询班组信息
56
+export function teamList(data) {
57
+  return request({
58
+    url: '/system/dept/teamList',
59
+    method: 'post',
60
+    data: data
61
+  })
62
+}
63
+
64
+
65
+//查询用户列表
66
+export function selectUserListByCondition(data) {
67
+  return request({
68
+    url: '/system/user/selectUserListByCondition',
69
+    method: 'post',
70
+    data: data
71
+  })
72
+}

+ 44 - 0
src/api/attendance/record.js

@@ -0,0 +1,44 @@
1
+import request from '@/utils/request'
2
+
3
+// 查询考勤班组成员列表
4
+export function listRecord(query) {
5
+  return request({
6
+    url: '/attendance/record/pageList',
7
+    method: 'get',
8
+    params: query
9
+  })
10
+}
11
+
12
+// 查询考勤班组成员详细
13
+export function getRecord(userId) {
14
+  return request({
15
+    url: '/attendance/record/' + userId,
16
+    method: 'get'
17
+  })
18
+}
19
+
20
+// 新增考勤班组成员
21
+export function addRecord(data) {
22
+  return request({
23
+    url: '/attendance/record',
24
+    method: 'post',
25
+    data: data
26
+  })
27
+}
28
+
29
+// 修改考勤班组成员
30
+export function updateRecord(data) {
31
+  return request({
32
+    url: '/attendance/record',
33
+    method: 'put',
34
+    data: data
35
+  })
36
+}
37
+
38
+// 删除考勤班组成员
39
+export function delRecord(userId) {
40
+  return request({
41
+    url: '/attendance/record/' + userId,
42
+    method: 'delete'
43
+  })
44
+}

+ 27 - 0
src/api/attendance/shiftScheduling.js

@@ -0,0 +1,27 @@
1
+import request from '@/utils/request'
2
+
3
+// 查询排班列表
4
+export function listShiftScheduling(query) {
5
+  return request({
6
+    url: '/item/simpleDutySchedule/list',
7
+    method: 'get',
8
+    params: query
9
+  })
10
+}
11
+
12
+//生成统一排班计划(支持单班、两班倒、多班倒等模式)
13
+export function generateUnifiedSchedule(data) {
14
+  return request({
15
+    url: '/item/simpleDutySchedule/generateUnifiedSchedule',
16
+    method: 'post',
17
+    data: data
18
+  })
19
+}
20
+
21
+//删除值班安排
22
+export function delSimpleDutySchedule(scheduleIds) {
23
+  return request({
24
+    url: `/item/simpleDutySchedule/${scheduleIds}`,
25
+    method: 'delete'
26
+  })
27
+}

+ 69 - 0
src/api/check/checkCorrection.js

@@ -0,0 +1,69 @@
1
+import request from '@/utils/request'
2
+
3
+// 查询检查记录列表
4
+export function checkCorrection(query) {
5
+  return request({
6
+    url: '/check/checkCorrection/list',
7
+    method: 'get',
8
+    params: query
9
+  })
10
+}
11
+
12
+// 查询检查记录详细
13
+export function getCheckCorrection(id) {
14
+  return request({
15
+    url: `/check/checkCorrection/${id}`,
16
+    method: 'get'
17
+  })
18
+}
19
+
20
+// 新增检查记录
21
+export function addCheckRecord(data) {
22
+  return request({
23
+    url: '/check/checkCorrection',
24
+    method: 'post',
25
+    data: data
26
+  })
27
+}
28
+
29
+// 修改检查记录
30
+export function updateCheckRecord(data) {
31
+  return request({
32
+    url: '/check/checkCorrection',
33
+    method: 'put',
34
+    data: data
35
+  })
36
+}
37
+
38
+// 删除检查记录
39
+export function delCheckRecord(ids) {
40
+  return request({
41
+    url: `/check/checkCorrection/${ids}`,
42
+    method: 'delete'
43
+  })
44
+}
45
+
46
+export function historyInstance (id) {
47
+  return request({
48
+    url: `/system/check/approval/history/instance/${id}`,
49
+    method: 'get'
50
+  })
51
+}
52
+
53
+// 同意检查记录
54
+export function approveTask (data) {
55
+  return request({
56
+    url: `/check/checkCorrection/approveTask`,
57
+    method: 'post',
58
+    data
59
+  })
60
+}
61
+// 驳回检查记录
62
+export function rejectTask(data) {
63
+  return request({
64
+    url: `/check/checkCorrection/rejectTask`,
65
+    method: 'post',
66
+    data
67
+  })
68
+}
69
+

+ 44 - 0
src/api/check/checkRecord.js

@@ -0,0 +1,44 @@
1
+import request from '@/utils/request'
2
+
3
+// 查询检查记录列表
4
+export function listCheckRecord(query) {
5
+  return request({
6
+    url: '/check/checkRecord/list',
7
+    method: 'get',
8
+    params: query
9
+  })
10
+}
11
+
12
+// 查询检查记录详细
13
+export function getCheckRecord(id) {
14
+  return request({
15
+    url: '/check/checkRecord/' + id,
16
+    method: 'get'
17
+  })
18
+}
19
+
20
+// 新增检查记录
21
+export function addCheckRecord(data) {
22
+  return request({
23
+    url: '/check/checkRecord',
24
+    method: 'post',
25
+    data: data
26
+  })
27
+}
28
+
29
+// 修改检查记录
30
+export function updateCheckRecord(data) {
31
+  return request({
32
+    url: '/check/checkRecord',
33
+    method: 'put',
34
+    data: data
35
+  })
36
+}
37
+
38
+// 删除检查记录
39
+export function delCheckRecord(id) {
40
+  return request({
41
+    url: '/check/checkRecord/' + id,
42
+    method: 'delete'
43
+  })
44
+}

+ 39 - 0
src/api/check/checkTask.js

@@ -0,0 +1,39 @@
1
+import request from '@/utils/request'
2
+
3
+// 查询检查任务列表
4
+export function listCheckTask(query) {
5
+  return request({
6
+    url: '/check/checkTask/list',
7
+    method: 'get',
8
+    params: query
9
+  })
10
+}
11
+//新增检查任务
12
+export function addCheckTask(data) {
13
+  return request({
14
+    url: '/check/checkTask',
15
+    method: 'post',
16
+    data: data
17
+  })
18
+}
19
+//获取检查任务详细信息
20
+export function getCheckTask(id) {
21
+  return request({
22
+    url: '/check/checkTask/' + id,
23
+    method: 'get'
24
+  })
25
+}
26
+//删除检查任务
27
+export function delCheckTask(id) {
28
+  return request({
29
+    url: '/check/checkTask/' + id,
30
+    method: 'delete'
31
+  })
32
+}
33
+//根据被检查级别查询检查项目列表
34
+export function getCheckProjectItemList(checkLevel) {
35
+  return request({
36
+    url: '/system/project/listByCheckLevel/' + checkLevel,
37
+    method: 'get'
38
+  })
39
+}

+ 28 - 0
src/api/examManage/trainingPerformance.js

@@ -0,0 +1,28 @@
1
+import request from '@/utils/request'
2
+
3
+// 查询培训绩效列表
4
+export function getGrowthList(query) {
5
+  return request({
6
+    url: '/system/growth/list',
7
+    method: 'get',
8
+    params: query
9
+  })
10
+}
11
+
12
+///导入数据
13
+export function importData(data) {
14
+  return request({
15
+    url: '/system/growth/importData',
16
+    method: 'post',
17
+    data: data
18
+  })
19
+}
20
+
21
+//下载模板
22
+export function downloadTemplate() {
23
+  return request({
24
+    url: '/system/growth/importTemplate',
25
+    method: 'get',
26
+    responseType: 'blob'
27
+  })
28
+}

+ 371 - 0
src/api/item/items.js

@@ -0,0 +1,371 @@
1
+import request from '@/utils/request'
2
+
3
+// 查询查获物品明细列表
4
+export function listItems(query) {
5
+  return request({
6
+    url: '/item/items/list',
7
+    method: 'get',
8
+    params: query
9
+  })
10
+}
11
+
12
+// 查询查获物品明细详细
13
+export function getItems(id) {
14
+  return request({
15
+    url: '/item/items/' + id,
16
+    method: 'get'
17
+  })
18
+}
19
+
20
+// 新增查获物品明细
21
+export function addItems(data) {
22
+  return request({
23
+    url: '/item/items',
24
+    method: 'post',
25
+    data: data
26
+  })
27
+}
28
+
29
+// 修改查获物品明细
30
+export function updateItems(data) {
31
+  return request({
32
+    url: '/item/items',
33
+    method: 'put',
34
+    data: data
35
+  })
36
+}
37
+
38
+// 删除查获物品明细
39
+export function delItems(id) {
40
+  return request({
41
+    url: '/item/items/' + id,
42
+    method: 'delete'
43
+  })
44
+}
45
+
46
+//查获总数量+移交公安数量+故意隐匿数量
47
+export function getTotalSome (params = {}) {
48
+  return request({
49
+    url: '/item/largeScreen/getAppTotalSome',
50
+    method: 'get',
51
+    params
52
+  })
53
+}
54
+
55
+//获取当天所有用户统计数据
56
+export function getDailyAllUsersRanking(params = {}) {
57
+  return request({
58
+    url: '/exam/daily/statistics/dashboard/all-users-ranking',
59
+    method: 'get',
60
+    params
61
+  })
62
+}
63
+
64
+//巡检执行
65
+export function getExecutionStatusTotal(params) {
66
+  return request({
67
+    url: '/check/largeScreen/inspectionExecute',
68
+    method: 'get',
69
+    params: params
70
+  })
71
+}
72
+
73
+// 获取通道统计
74
+export function getChannelStatistics(status) {
75
+  return request({
76
+    url: '/attendance/postRecord/count?regionalStatus='+status,
77
+    method: 'post',
78
+  })
79
+}
80
+
81
+// 答题个人排行
82
+export function userRanking() {
83
+  return request({
84
+    url: '/exam/daily/statistics/dashboard/user-ranking?timeRange=today&topN=10&sortBy=completionRate',
85
+    method: 'get',
86
+  })
87
+}
88
+// 获取通道统计
89
+export function deptRanking() {
90
+  return request({
91
+    url: '/exam/daily/statistics/dashboard/dept-ranking?timeRange=today&topN=10&sortBy=completionRate',
92
+    method: 'get',
93
+  })
94
+}
95
+
96
+
97
+// 获取总体问题分布
98
+export function problemDistribution(params = {}) {
99
+  return request({
100
+    url: '/check/largeScreen/problemDistribution',
101
+    method: 'get',
102
+    params
103
+  })
104
+}
105
+
106
+// 获取问题分布对比
107
+export function problemComparison(params = {}) {
108
+  return request({
109
+    url: '/check/largeScreen/problemComparison',
110
+    method: 'get',
111
+    params
112
+  })
113
+}
114
+
115
+// 获取计划安排总览
116
+export function planOverview(params={}) {
117
+  return request({
118
+    url: '/check/largeScreen/planOverview',
119
+    method: 'get',
120
+    params
121
+  })
122
+}
123
+// 获取日常任务检查指标累计分布
124
+export function planDistribution(params={}) {
125
+  return request({
126
+    url: '/check/largeScreen/planDistribution',
127
+    method: 'get',
128
+    params
129
+  })
130
+}
131
+// 获取任务明细统计
132
+export function planStatistics(params={}) {
133
+  return request({
134
+    url: '/check/largeScreen/planStatistics',
135
+    method: 'get',
136
+    params
137
+  })
138
+}
139
+
140
+// 查获总览
141
+export function getAppTotalSome(params = {}) {
142
+  return request({
143
+    url: '/item/largeScreen/getAppTotalSome',
144
+    method: 'get',
145
+    params
146
+  })
147
+}
148
+// 违禁品类别
149
+export function category(params = {}) {
150
+  return request({
151
+    url: '/item/largeScreen/category',
152
+    method: 'get',
153
+    params: {
154
+      levelType: 1,
155
+      ...params,
156
+    }
157
+  })
158
+}
159
+// 违禁品查获部位
160
+export function appPosition(params = {}) {
161
+  return request({
162
+    url: '/item/largeScreen/appPosition',
163
+    method: 'get',
164
+    params: {
165
+      levelType: 1,
166
+      ...params,
167
+    }
168
+  })
169
+}
170
+// 查获岗位
171
+export function largeScreenPost(params = {}) {
172
+  return request({
173
+    url: '/item/largeScreen/post',
174
+    method: 'get',
175
+    params
176
+  })
177
+}
178
+// 查获时间分布
179
+export function appTimeSpan(params = {}) {
180
+  return request({
181
+    url: '/item/largeScreen/appTimeSpan',
182
+    method: 'get',
183
+    params
184
+  })
185
+}
186
+
187
+// 问题整改统计
188
+export function correction(params = {}) {
189
+  return request({
190
+    url: '/check/largeScreen/correction',
191
+    method: 'get',
192
+    params
193
+  })
194
+}
195
+// 问题整改分布
196
+export function correctionDistribution(params = {}) {
197
+  return request({
198
+    url: '/check/largeScreen/correctionDistribution',
199
+    method: 'get',
200
+    params
201
+  })
202
+}
203
+
204
+//工作画像--查获审批时长统计(柱状图)
205
+export function getDurationChart (params) {
206
+  return request({
207
+    url: '/item/user-ranking/seizure-approval/duration',
208
+    method: 'get',
209
+    params: params
210
+  });
211
+}
212
+
213
+
214
+//获取站级别抽问抽答完成率
215
+export function getStationLevelRate (params = {}) {
216
+  return request({
217
+    url: '/exam/daily/site-profile/daily-completion-rate',
218
+    method: 'get',
219
+    params: params
220
+  });
221
+}
222
+//获取部门抽问抽答完成率
223
+export function getDepartmentLevelRate (params = {}) {
224
+  return request({
225
+    url: '/exam/daily/dept-profile/daily-completion-rate',
226
+    method: 'get',
227
+    params: params
228
+  });
229
+}
230
+//工作画像--查获趋势图,获取有效查获趋势数据(默认近90天)
231
+export function getSeizureTrendChart (params = {}) {
232
+  return request({
233
+    url: '/item/user-ranking/seizure-trend',
234
+    method: 'get',
235
+    params: params
236
+  });
237
+}
238
+
239
+//工作画像--通道开放趋势图(折线图)
240
+export function getChannelOpenTrendChart (params = {}) {
241
+  return request({
242
+    url: '/attendance/stats/channel/open/trend',
243
+    method: 'get',
244
+    params: params
245
+  });
246
+}
247
+
248
+export function getDeptList() {
249
+  return request({
250
+    url: '/system/user/deptTree',
251
+    method: 'get'
252
+  })
253
+}
254
+
255
+//能力画像-协同配合
256
+export function getCollaborationProfile(params) {
257
+  return request({
258
+    url: '/system/user/cooperation',
259
+    method: 'get',
260
+    params: params
261
+  })
262
+}
263
+//能力画像-明细
264
+export function getDetailProfile(params) {
265
+  return request({
266
+    url: '/system/user/detail',
267
+    method: 'get',
268
+    params: params
269
+  })
270
+}
271
+
272
+// 查获取指定模块的指标值
273
+export function getModuleMetrics(params) {
274
+  return request({
275
+    url: '/user/basic/portrait/module/info',
276
+    method: 'get',
277
+    params: params
278
+  })
279
+}
280
+//总体概览接口
281
+export function getOverview(params) {
282
+  return request({
283
+    url: '/system/user/population',
284
+    method: 'get',
285
+    params: params
286
+  })
287
+}
288
+
289
+//计算站级考勤工作统计
290
+export function getAttendanceStatistics (params) {
291
+  return request({
292
+    url: `/attendance/stats/station`,
293
+    method: 'get',
294
+    params: params  
295
+  })
296
+}
297
+//计算站级查获统计
298
+export function getSiteStatistics(params) {
299
+  return request({
300
+    url: `/item/user-ranking/station`,
301
+    method: 'get',
302
+    params: params
303
+  })
304
+}
305
+//能力画像-学习成长
306
+export function getGrowthPortrait(params) {
307
+  return request({
308
+    url: '/system/growth/portrait',
309
+    method: 'get',
310
+    params: params
311
+  })
312
+}
313
+
314
+//获取指定用户画像
315
+export function getUserProfile(params) {
316
+  return request({
317
+    url: '/exam/daily/user-profile',
318
+    method: 'get',
319
+    params: params
320
+  })
321
+}
322
+
323
+//获取班组和科室画像
324
+export function getDeptProfile(params) {
325
+  return request({
326
+    url: '/exam/daily/dept-profile',
327
+    method: 'get',
328
+    params: params
329
+  })
330
+}
331
+//获取站级画像
332
+export function getSiteProfile(params) {
333
+  return request({
334
+    url: '/exam/daily/site-profile',
335
+    method: 'get',
336
+    params: params
337
+  })
338
+}
339
+
340
+//巡检画像
341
+export function getPortrait(params) {
342
+  return request({
343
+    url: '/check/largeScreen/portrait',
344
+    method: 'get',
345
+    params: params
346
+  })
347
+}
348
+
349
+//获取所有部门和班组下人员
350
+export function getDeptUserTree(params) {
351
+  return request({
352
+    url: '/system/user/deptUserTree',
353
+    method: 'get',
354
+    params: params
355
+  })
356
+}
357
+//获取用户在指定层级的详细排名信息
358
+export function getRankInfo(params) {
359
+  return request({
360
+    url: '/item/user-ranking/ranking-detail',
361
+    method: 'get',
362
+    params: params
363
+  })
364
+}
365
+//根据用户ID查询用户信息
366
+export function getUserInfoById(userId) {
367
+  return request({
368
+    url: `/system/user/${userId}`,
369
+    method: 'get',
370
+  })
371
+}

+ 44 - 0
src/api/item/record.js

@@ -0,0 +1,44 @@
1
+import request from '@/utils/request'
2
+
3
+// 查询查获记录列表
4
+export function listRecord(query) {
5
+  return request({
6
+    url: '/item/record/list',
7
+    method: 'get',
8
+    params: query
9
+  })
10
+}
11
+
12
+// 查询查获记录详细
13
+export function getRecord(id) {
14
+  return request({
15
+    url: '/item/record/' + id,
16
+    method: 'get'
17
+  })
18
+}
19
+
20
+// 新增查获记录
21
+export function addRecord(data) {
22
+  return request({
23
+    url: '/item/record',
24
+    method: 'post',
25
+    data: data
26
+  })
27
+}
28
+
29
+// 修改查获记录
30
+export function updateRecord(data) {
31
+  return request({
32
+    url: '/item/record',
33
+    method: 'put',
34
+    data: data
35
+  })
36
+}
37
+
38
+// 删除查获记录
39
+export function delRecord(id) {
40
+  return request({
41
+    url: '/item/record/' + id,
42
+    method: 'delete'
43
+  })
44
+}

+ 180 - 0
src/api/largeScreen/largeScreen.js

@@ -0,0 +1,180 @@
1
+import request from '@/utils/request'
2
+
3
+// 移交公安情况
4
+export function getPolice(params = {}) {
5
+  return request({
6
+    url: '/item/largeScreen/police',
7
+    method: 'get',
8
+    params
9
+  })
10
+}
11
+// 故意隐匿情况
12
+export function getConceal(params = {}) {
13
+  return request({
14
+    url: '/item/largeScreen/conceal',
15
+    method: 'get',
16
+    params
17
+  })
18
+}
19
+//查获类别分布
20
+export function getCategory(params = {}) {
21
+  return request({
22
+    url: '/item/largeScreen/category',
23
+    method: 'get',
24
+    params
25
+  })
26
+}
27
+
28
+//查获岗位分布
29
+export function getPost(params = {}) {
30
+  return request({
31
+    url: '/item/largeScreen/post',
32
+    method: 'get',
33
+    params
34
+  })
35
+} 
36
+
37
+//查获总数量+移交公安数量+故意隐匿数量
38
+export function getTotalSome(params = {}) {
39
+  return request({
40
+    url: '/item/largeScreen/getTotalSome',
41
+    method: 'get',
42
+    params
43
+  })
44
+}
45
+//查获排名
46
+export function getRank(params = {}) {
47
+  return request({
48
+    url: '/item/largeScreen/rank',
49
+    method: 'get',
50
+    params
51
+  })
52
+}
53
+//查获时段分布
54
+export function getTimeSpan(params = {}) {
55
+  return request({
56
+    url: '/item/largeScreen/timeSpan',
57
+    method: 'get',
58
+    params
59
+  })
60
+}
61
+//查获位置分布
62
+export function getPosition(params = {}) {
63
+  return request({
64
+    url: '/item/largeScreen/position',
65
+    method: 'get',
66
+    params
67
+  })
68
+}
69
+//查获通道分布
70
+export function getChannel(params = {}) {
71
+  return request({
72
+    url: '/item/largeScreen/channel',
73
+    method: 'get',
74
+    params
75
+  })
76
+}
77
+
78
+
79
+
80
+
81
+
82
+
83
+// 新增检查记录
84
+export function addCheckRecord(data) {
85
+  return request({
86
+    url: '/check/checkRecord',
87
+    method: 'post',
88
+    data: data
89
+  })
90
+}
91
+
92
+// 查询我的任务列表(当天有效任务)shudong
93
+export function getHomePage(params) {
94
+  return request({
95
+    url: '/check/largeScreen/homePage',
96
+    method: 'get',
97
+    params: params
98
+  })
99
+}
100
+//获取查获上报数据  xiaoxiong
101
+export function getSeizureReport(params) {
102
+  return request({
103
+    url: '/system/check/seizureReport/data',
104
+    method: 'get',
105
+    params: params
106
+  })
107
+}
108
+
109
+//获取考勤统计数据   binge
110
+export function getAttendanceStats(params) {
111
+  return request({
112
+    url: '/attendance/stats/getAttendanceStats',
113
+    method: 'get',
114
+    params: params
115
+  })
116
+}
117
+
118
+//抽问抽答,首页   binge
119
+export function getAccuracyStatistics(params) {
120
+  return request({
121
+    url: '/exam/daily/accuracy-statistics',
122
+    method: 'get',
123
+    params: params
124
+  })
125
+}
126
+
127
+//根据角色获取查获排名  xiaoxiong
128
+export function getSeizureRanking(data) {
129
+  return request({
130
+    url: '/item/seizure/ranking/getRankingByRole',
131
+    method: 'post',
132
+    data: data
133
+  })
134
+}
135
+
136
+
137
+//获取检查排名  shudong
138
+export function getCheckRanking(params) {
139
+  return request({
140
+    url: '/system/homePage/homePageRanking',
141
+    method: 'get',
142
+    params: params
143
+  })
144
+}
145
+
146
+//首页-整体   shudong binge xiaoxiong
147
+export function getHomePageWhole(params) {
148
+  return request({
149
+    url: '/system/homePage/homePageWhole',
150
+    method: 'get',
151
+    params: params
152
+  })
153
+}
154
+//首页-明细(能力对比) shudong binge xiaoxiong
155
+export function getHomePageDetail(data) {
156
+  return request({
157
+    url: '/system/homePage/homePageDetail',
158
+    method: 'post',
159
+    data: data
160
+  })
161
+}
162
+
163
+//根据角色标识查询今日上岗用户列表
164
+export function selectUserListByRoleKey(data) {
165
+  return request({
166
+    url: '/attendance/postRecord/selectUserListByRoleKey',
167
+    method: 'post',
168
+    data: data
169
+  })
170
+}
171
+
172
+//首页报表-下载
173
+export function getHomeReportDownload(params) {
174
+  return request({
175
+    url: '/system/homeReport/download',
176
+    method: 'get',
177
+    params: params,
178
+    responseType: 'blob'
179
+  })
180
+}

+ 60 - 0
src/api/login.js

@@ -0,0 +1,60 @@
1
+import request from '@/utils/request'
2
+
3
+// 登录方法
4
+export function login(username, password, code, uuid) {
5
+  const data = {
6
+    username,
7
+    password,
8
+    code,
9
+    uuid
10
+  }
11
+  return request({
12
+    url: '/login',
13
+    headers: {
14
+      isToken: false,
15
+      repeatSubmit: false
16
+    },
17
+    method: 'post',
18
+    data: data
19
+  })
20
+}
21
+
22
+// 注册方法
23
+export function register(data) {
24
+  return request({
25
+    url: '/register',
26
+    headers: {
27
+      isToken: false
28
+    },
29
+    method: 'post',
30
+    data: data
31
+  })
32
+}
33
+
34
+// 获取用户详细信息
35
+export function getInfo() {
36
+  return request({
37
+    url: '/getInfo',
38
+    method: 'get'
39
+  })
40
+}
41
+
42
+// 退出方法
43
+export function logout() {
44
+  return request({
45
+    url: '/logout',
46
+    method: 'post'
47
+  })
48
+}
49
+
50
+// 获取验证码
51
+export function getCodeImg() {
52
+  return request({
53
+    url: '/captchaImage',
54
+    headers: {
55
+      isToken: false
56
+    },
57
+    method: 'get',
58
+    timeout: 20000
59
+  })
60
+}

+ 9 - 0
src/api/menu.js

@@ -0,0 +1,9 @@
1
+import request from '@/utils/request'
2
+
3
+// 获取路由
4
+export const getRouters = () => {
5
+  return request({
6
+    url: '/getRouters',
7
+    method: 'get'
8
+  })
9
+}

+ 57 - 0
src/api/monitor/cache.js

@@ -0,0 +1,57 @@
1
+import request from '@/utils/request'
2
+
3
+// 查询缓存详细
4
+export function getCache() {
5
+  return request({
6
+    url: '/monitor/cache',
7
+    method: 'get'
8
+  })
9
+}
10
+
11
+// 查询缓存名称列表
12
+export function listCacheName() {
13
+  return request({
14
+    url: '/monitor/cache/getNames',
15
+    method: 'get'
16
+  })
17
+}
18
+
19
+// 查询缓存键名列表
20
+export function listCacheKey(cacheName) {
21
+  return request({
22
+    url: '/monitor/cache/getKeys/' + cacheName,
23
+    method: 'get'
24
+  })
25
+}
26
+
27
+// 查询缓存内容
28
+export function getCacheValue(cacheName, cacheKey) {
29
+  return request({
30
+    url: '/monitor/cache/getValue/' + cacheName + '/' + cacheKey,
31
+    method: 'get'
32
+  })
33
+}
34
+
35
+// 清理指定名称缓存
36
+export function clearCacheName(cacheName) {
37
+  return request({
38
+    url: '/monitor/cache/clearCacheName/' + cacheName,
39
+    method: 'delete'
40
+  })
41
+}
42
+
43
+// 清理指定键名缓存
44
+export function clearCacheKey(cacheKey) {
45
+  return request({
46
+    url: '/monitor/cache/clearCacheKey/' + cacheKey,
47
+    method: 'delete'
48
+  })
49
+}
50
+
51
+// 清理全部缓存
52
+export function clearCacheAll() {
53
+  return request({
54
+    url: '/monitor/cache/clearCacheAll',
55
+    method: 'delete'
56
+  })
57
+}

+ 71 - 0
src/api/monitor/job.js

@@ -0,0 +1,71 @@
1
+import request from '@/utils/request'
2
+
3
+// 查询定时任务调度列表
4
+export function listJob(query) {
5
+  return request({
6
+    url: '/monitor/job/list',
7
+    method: 'get',
8
+    params: query
9
+  })
10
+}
11
+
12
+// 查询定时任务调度详细
13
+export function getJob(jobId) {
14
+  return request({
15
+    url: '/monitor/job/' + jobId,
16
+    method: 'get'
17
+  })
18
+}
19
+
20
+// 新增定时任务调度
21
+export function addJob(data) {
22
+  return request({
23
+    url: '/monitor/job',
24
+    method: 'post',
25
+    data: data
26
+  })
27
+}
28
+
29
+// 修改定时任务调度
30
+export function updateJob(data) {
31
+  return request({
32
+    url: '/monitor/job',
33
+    method: 'put',
34
+    data: data
35
+  })
36
+}
37
+
38
+// 删除定时任务调度
39
+export function delJob(jobId) {
40
+  return request({
41
+    url: '/monitor/job/' + jobId,
42
+    method: 'delete'
43
+  })
44
+}
45
+
46
+// 任务状态修改
47
+export function changeJobStatus(jobId, status) {
48
+  const data = {
49
+    jobId,
50
+    status
51
+  }
52
+  return request({
53
+    url: '/monitor/job/changeStatus',
54
+    method: 'put',
55
+    data: data
56
+  })
57
+}
58
+
59
+
60
+// 定时任务立即执行一次
61
+export function runJob(jobId, jobGroup) {
62
+  const data = {
63
+    jobId,
64
+    jobGroup
65
+  }
66
+  return request({
67
+    url: '/monitor/job/run',
68
+    method: 'put',
69
+    data: data
70
+  })
71
+}

+ 26 - 0
src/api/monitor/jobLog.js

@@ -0,0 +1,26 @@
1
+import request from '@/utils/request'
2
+
3
+// 查询调度日志列表
4
+export function listJobLog(query) {
5
+  return request({
6
+    url: '/monitor/jobLog/list',
7
+    method: 'get',
8
+    params: query
9
+  })
10
+}
11
+
12
+// 删除调度日志
13
+export function delJobLog(jobLogId) {
14
+  return request({
15
+    url: '/monitor/jobLog/' + jobLogId,
16
+    method: 'delete'
17
+  })
18
+}
19
+
20
+// 清空调度日志
21
+export function cleanJobLog() {
22
+  return request({
23
+    url: '/monitor/jobLog/clean',
24
+    method: 'delete'
25
+  })
26
+}

+ 34 - 0
src/api/monitor/logininfor.js

@@ -0,0 +1,34 @@
1
+import request from '@/utils/request'
2
+
3
+// 查询登录日志列表
4
+export function list(query) {
5
+  return request({
6
+    url: '/monitor/logininfor/list',
7
+    method: 'get',
8
+    params: query
9
+  })
10
+}
11
+
12
+// 删除登录日志
13
+export function delLogininfor(infoId) {
14
+  return request({
15
+    url: '/monitor/logininfor/' + infoId,
16
+    method: 'delete'
17
+  })
18
+}
19
+
20
+// 解锁用户登录状态
21
+export function unlockLogininfor(userName) {
22
+  return request({
23
+    url: '/monitor/logininfor/unlock/' + userName,
24
+    method: 'get'
25
+  })
26
+}
27
+
28
+// 清空登录日志
29
+export function cleanLogininfor() {
30
+  return request({
31
+    url: '/monitor/logininfor/clean',
32
+    method: 'delete'
33
+  })
34
+}

+ 18 - 0
src/api/monitor/online.js

@@ -0,0 +1,18 @@
1
+import request from '@/utils/request'
2
+
3
+// 查询在线用户列表
4
+export function list(query) {
5
+  return request({
6
+    url: '/monitor/online/list',
7
+    method: 'get',
8
+    params: query
9
+  })
10
+}
11
+
12
+// 强退用户
13
+export function forceLogout(tokenId) {
14
+  return request({
15
+    url: '/monitor/online/' + tokenId,
16
+    method: 'delete'
17
+  })
18
+}

+ 26 - 0
src/api/monitor/operlog.js

@@ -0,0 +1,26 @@
1
+import request from '@/utils/request'
2
+
3
+// 查询操作日志列表
4
+export function list(query) {
5
+  return request({
6
+    url: '/monitor/operlog/list',
7
+    method: 'get',
8
+    params: query
9
+  })
10
+}
11
+
12
+// 删除操作日志
13
+export function delOperlog(operId) {
14
+  return request({
15
+    url: '/monitor/operlog/' + operId,
16
+    method: 'delete'
17
+  })
18
+}
19
+
20
+// 清空操作日志
21
+export function cleanOperlog() {
22
+  return request({
23
+    url: '/monitor/operlog/clean',
24
+    method: 'delete'
25
+  })
26
+}

+ 9 - 0
src/api/monitor/server.js

@@ -0,0 +1,9 @@
1
+import request from '@/utils/request'
2
+
3
+// 获取服务信息
4
+export function getServer() {
5
+  return request({
6
+    url: '/monitor/server',
7
+    method: 'get'
8
+  })
9
+}

+ 26 - 0
src/api/performance/performance.js

@@ -0,0 +1,26 @@
1
+import request from '@/utils/request'
2
+//绩效查询
3
+export function getPerformanceList(query) {
4
+  return request({
5
+    url: '/item/indicators/query',
6
+    method: 'get',
7
+    params: query
8
+  })
9
+}
10
+//获取绩效矩阵参数配置
11
+export function getMatrixConfig(query) {
12
+  return request({
13
+    url: '/item/indicators/matrix/config',
14
+    method: 'get',
15
+    params: query
16
+  })
17
+}
18
+//保存绩效矩阵
19
+export function saveMatrixConfig(query) {
20
+  return request({
21
+    url: '/item/indicators/matrix/add',
22
+    method: 'get',
23
+    params: query
24
+  })
25
+}
26
+

+ 43 - 0
src/api/system/app.js

@@ -0,0 +1,43 @@
1
+import request from '@/utils/request'
2
+
3
+// 查询应用列表
4
+export function listApp(query) {
5
+    return request({
6
+        url: '/system/app/list',
7
+        method: 'get',
8
+        params: query
9
+    })
10
+}
11
+//获取应用详细信息
12
+export function getApp(id) {
13
+    return request({
14
+        url: '/system/app/' + id,
15
+        method: 'get'
16
+    })
17
+}
18
+//新增应用
19
+export function addApp(data) {
20
+    return request({
21
+        url: '/system/app',
22
+        method: 'post',
23
+        data: data
24
+    })
25
+}
26
+//修改应用
27
+export function updateApp(data) {
28
+    return request({
29
+        url: '/system/app',
30
+        method: 'put',
31
+        data: data
32
+    })
33
+}
34
+//删除应用
35
+export function deleteApp(id) {
36
+    return request({
37
+        url: '/system/app/' + id,
38
+        method: 'delete'
39
+    })
40
+}
41
+
42
+
43
+

+ 44 - 0
src/api/system/category.js

@@ -0,0 +1,44 @@
1
+import request from '@/utils/request'
2
+
3
+// 查询查获物品分类列表
4
+export function listCategory(query) {
5
+  return request({
6
+    url: '/system/category/list',
7
+    method: 'get',
8
+    params: query
9
+  })
10
+}
11
+
12
+// 查询查获物品分类详细
13
+export function getCategory(id) {
14
+  return request({
15
+    url: '/system/category/' + id,
16
+    method: 'get'
17
+  })
18
+}
19
+
20
+// 新增查获物品分类
21
+export function addCategory(data) {
22
+  return request({
23
+    url: '/system/category',
24
+    method: 'post',
25
+    data: data
26
+  })
27
+}
28
+
29
+// 修改查获物品分类
30
+export function updateCategory(data) {
31
+  return request({
32
+    url: '/system/category',
33
+    method: 'put',
34
+    data: data
35
+  })
36
+}
37
+
38
+// 删除查获物品分类
39
+export function delCategory(id) {
40
+  return request({
41
+    url: '/system/category/' + id,
42
+    method: 'delete'
43
+  })
44
+}

+ 44 - 0
src/api/system/checkCategory.js

@@ -0,0 +1,44 @@
1
+import request from '@/utils/request'
2
+
3
+// 查询检查项分类列表
4
+export function listCheckCategory(query) {
5
+  return request({
6
+    url: '/system/checkCategory/list',
7
+    method: 'get',
8
+    params: query
9
+  })
10
+}
11
+
12
+// 查询检查项分类详细
13
+export function getCheckCategory(id) {
14
+  return request({
15
+    url: '/system/checkCategory/' + id,
16
+    method: 'get'
17
+  })
18
+}
19
+
20
+// 新增检查项分类
21
+export function addCheckCategory(data) {
22
+  return request({
23
+    url: '/system/checkCategory',
24
+    method: 'post',
25
+    data: data
26
+  })
27
+}
28
+
29
+// 修改检查项分类
30
+export function updateCheckCategory(data) {
31
+  return request({
32
+    url: '/system/checkCategory',
33
+    method: 'put',
34
+    data: data
35
+  })
36
+}
37
+
38
+// 删除检查项分类
39
+export function delCheckCategory(id) {
40
+  return request({
41
+    url: '/system/checkCategory/' + id,
42
+    method: 'delete'
43
+  })
44
+}

+ 14 - 0
src/api/system/common.js

@@ -0,0 +1,14 @@
1
+import request from '@/utils/request'
2
+
3
+/*
4
+ * 查询分类下拉树结构
5
+ * @param {*} treeType ITEM_CATEGORY  查获物品分类   POSITION  位置   CHECK_POINT 检查部位  CHECK_CATEGORY 检查分类
6
+ * @returns 
7
+ */
8
+export function treeSelectByType(treeType,maxLevel,lable) {
9
+    return request({
10
+      url: '/dataConfig/dataConfigTree',
11
+      method: 'get',
12
+      params: {treeType,lable,maxLevel}
13
+    })
14
+  }

+ 60 - 0
src/api/system/config.js

@@ -0,0 +1,60 @@
1
+import request from '@/utils/request'
2
+
3
+// 查询参数列表
4
+export function listConfig(query) {
5
+  return request({
6
+    url: '/system/config/list',
7
+    method: 'get',
8
+    params: query
9
+  })
10
+}
11
+
12
+// 查询参数详细
13
+export function getConfig(configId) {
14
+  return request({
15
+    url: '/system/config/' + configId,
16
+    method: 'get'
17
+  })
18
+}
19
+
20
+// 根据参数键名查询参数值
21
+export function getConfigKey(configKey) {
22
+  return request({
23
+    url: '/system/config/configKey/' + configKey,
24
+    method: 'get'
25
+  })
26
+}
27
+
28
+// 新增参数配置
29
+export function addConfig(data) {
30
+  return request({
31
+    url: '/system/config',
32
+    method: 'post',
33
+    data: data
34
+  })
35
+}
36
+
37
+// 修改参数配置
38
+export function updateConfig(data) {
39
+  return request({
40
+    url: '/system/config',
41
+    method: 'put',
42
+    data: data
43
+  })
44
+}
45
+
46
+// 删除参数配置
47
+export function delConfig(configId) {
48
+  return request({
49
+    url: '/system/config/' + configId,
50
+    method: 'delete'
51
+  })
52
+}
53
+
54
+// 刷新参数缓存
55
+export function refreshCache() {
56
+  return request({
57
+    url: '/system/config/refreshCache',
58
+    method: 'delete'
59
+  })
60
+}

+ 52 - 0
src/api/system/dept.js

@@ -0,0 +1,52 @@
1
+import request from '@/utils/request'
2
+
3
+// 查询部门列表
4
+export function listDept(query) {
5
+  return request({
6
+    url: '/system/dept/list',
7
+    method: 'get',
8
+    params: query
9
+  })
10
+}
11
+
12
+// 查询部门列表(排除节点)
13
+export function listDeptExcludeChild(deptId) {
14
+  return request({
15
+    url: '/system/dept/list/exclude/' + deptId,
16
+    method: 'get'
17
+  })
18
+}
19
+
20
+// 查询部门详细
21
+export function getDept(deptId) {
22
+  return request({
23
+    url: '/system/dept/' + deptId,
24
+    method: 'get'
25
+  })
26
+}
27
+
28
+// 新增部门
29
+export function addDept(data) {
30
+  return request({
31
+    url: '/system/dept',
32
+    method: 'post',
33
+    data: data
34
+  })
35
+}
36
+
37
+// 修改部门
38
+export function updateDept(data) {
39
+  return request({
40
+    url: '/system/dept',
41
+    method: 'put',
42
+    data: data
43
+  })
44
+}
45
+
46
+// 删除部门
47
+export function delDept(deptId) {
48
+  return request({
49
+    url: '/system/dept/' + deptId,
50
+    method: 'delete'
51
+  })
52
+}

+ 52 - 0
src/api/system/dict/data.js

@@ -0,0 +1,52 @@
1
+import request from '@/utils/request'
2
+
3
+// 查询字典数据列表
4
+export function listData(query) {
5
+  return request({
6
+    url: '/system/dict/data/list',
7
+    method: 'get',
8
+    params: query
9
+  })
10
+}
11
+
12
+// 查询字典数据详细
13
+export function getData(dictCode) {
14
+  return request({
15
+    url: '/system/dict/data/' + dictCode,
16
+    method: 'get'
17
+  })
18
+}
19
+
20
+// 根据字典类型查询字典数据信息
21
+export function getDicts(dictType) {
22
+  return request({
23
+    url: '/system/dict/data/type/' + dictType,
24
+    method: 'get'
25
+  })
26
+}
27
+
28
+// 新增字典数据
29
+export function addData(data) {
30
+  return request({
31
+    url: '/system/dict/data',
32
+    method: 'post',
33
+    data: data
34
+  })
35
+}
36
+
37
+// 修改字典数据
38
+export function updateData(data) {
39
+  return request({
40
+    url: '/system/dict/data',
41
+    method: 'put',
42
+    data: data
43
+  })
44
+}
45
+
46
+// 删除字典数据
47
+export function delData(dictCode) {
48
+  return request({
49
+    url: '/system/dict/data/' + dictCode,
50
+    method: 'delete'
51
+  })
52
+}

+ 60 - 0
src/api/system/dict/type.js

@@ -0,0 +1,60 @@
1
+import request from '@/utils/request'
2
+
3
+// 查询字典类型列表
4
+export function listType(query) {
5
+  return request({
6
+    url: '/system/dict/type/list',
7
+    method: 'get',
8
+    params: query
9
+  })
10
+}
11
+
12
+// 查询字典类型详细
13
+export function getType(dictId) {
14
+  return request({
15
+    url: '/system/dict/type/' + dictId,
16
+    method: 'get'
17
+  })
18
+}
19
+
20
+// 新增字典类型
21
+export function addType(data) {
22
+  return request({
23
+    url: '/system/dict/type',
24
+    method: 'post',
25
+    data: data
26
+  })
27
+}
28
+
29
+// 修改字典类型
30
+export function updateType(data) {
31
+  return request({
32
+    url: '/system/dict/type',
33
+    method: 'put',
34
+    data: data
35
+  })
36
+}
37
+
38
+// 删除字典类型
39
+export function delType(dictId) {
40
+  return request({
41
+    url: '/system/dict/type/' + dictId,
42
+    method: 'delete'
43
+  })
44
+}
45
+
46
+// 刷新字典缓存
47
+export function refreshCache() {
48
+  return request({
49
+    url: '/system/dict/type/refreshCache',
50
+    method: 'delete'
51
+  })
52
+}
53
+
54
+// 获取字典选择框列表
55
+export function optionselect() {
56
+  return request({
57
+    url: '/system/dict/type/optionselect',
58
+    method: 'get'
59
+  })
60
+}

+ 44 - 0
src/api/system/generator.js

@@ -0,0 +1,44 @@
1
+import request from '@/utils/request'
2
+
3
+// 查询编码code自增列表
4
+export function listGenerator(query) {
5
+  return request({
6
+    url: '/system/generator/list',
7
+    method: 'get',
8
+    params: query
9
+  })
10
+}
11
+
12
+// 查询编码code自增详细
13
+export function getGenerator(id) {
14
+  return request({
15
+    url: '/system/generator/' + id,
16
+    method: 'get'
17
+  })
18
+}
19
+
20
+// 新增编码code自增
21
+export function addGenerator(data) {
22
+  return request({
23
+    url: '/system/generator',
24
+    method: 'post',
25
+    data: data
26
+  })
27
+}
28
+
29
+// 修改编码code自增
30
+export function updateGenerator(data) {
31
+  return request({
32
+    url: '/system/generator',
33
+    method: 'put',
34
+    data: data
35
+  })
36
+}
37
+
38
+// 删除编码code自增
39
+export function delGenerator(id) {
40
+  return request({
41
+    url: '/system/generator/' + id,
42
+    method: 'delete'
43
+  })
44
+}

+ 44 - 0
src/api/system/item.js

@@ -0,0 +1,44 @@
1
+import request from '@/utils/request'
2
+
3
+// 查询查获物品列表
4
+export function listItem(query) {
5
+  return request({
6
+    url: '/system/item/list',
7
+    method: 'get',
8
+    params: query
9
+  })
10
+}
11
+
12
+// 查询查获物品详细
13
+export function getItem(id) {
14
+  return request({
15
+    url: '/system/item/' + id,
16
+    method: 'get'
17
+  })
18
+}
19
+
20
+// 新增查获物品
21
+export function addItem(data) {
22
+  return request({
23
+    url: '/system/item',
24
+    method: 'post',
25
+    data: data
26
+  })
27
+}
28
+
29
+// 修改查获物品
30
+export function updateItem(data) {
31
+  return request({
32
+    url: '/system/item',
33
+    method: 'put',
34
+    data: data
35
+  })
36
+}
37
+
38
+// 删除查获物品
39
+export function delItem(id) {
40
+  return request({
41
+    url: '/system/item/' + id,
42
+    method: 'delete'
43
+  })
44
+}

+ 60 - 0
src/api/system/menu.js

@@ -0,0 +1,60 @@
1
+import request from '@/utils/request'
2
+
3
+// 查询菜单列表
4
+export function listMenu(query) {
5
+  return request({
6
+    url: '/system/menu/list',
7
+    method: 'get',
8
+    params: query
9
+  })
10
+}
11
+
12
+// 查询菜单详细
13
+export function getMenu(menuId) {
14
+  return request({
15
+    url: '/system/menu/' + menuId,
16
+    method: 'get'
17
+  })
18
+}
19
+
20
+// 查询菜单下拉树结构
21
+export function treeselect() {
22
+  return request({
23
+    url: '/system/menu/treeselect',
24
+    method: 'get'
25
+  })
26
+}
27
+
28
+// 根据角色ID查询菜单下拉树结构
29
+export function roleMenuTreeselect(roleId) {
30
+  return request({
31
+    url: '/system/menu/roleMenuTreeselect/' + roleId,
32
+    method: 'get'
33
+  })
34
+}
35
+
36
+// 新增菜单
37
+export function addMenu(data) {
38
+  return request({
39
+    url: '/system/menu',
40
+    method: 'post',
41
+    data: data
42
+  })
43
+}
44
+
45
+// 修改菜单
46
+export function updateMenu(data) {
47
+  return request({
48
+    url: '/system/menu',
49
+    method: 'put',
50
+    data: data
51
+  })
52
+}
53
+
54
+// 删除菜单
55
+export function delMenu(menuId) {
56
+  return request({
57
+    url: '/system/menu/' + menuId,
58
+    method: 'delete'
59
+  })
60
+}

+ 44 - 0
src/api/system/notice.js

@@ -0,0 +1,44 @@
1
+import request from '@/utils/request'
2
+
3
+// 查询公告列表
4
+export function listNotice(query) {
5
+  return request({
6
+    url: '/system/notice/list',
7
+    method: 'get',
8
+    params: query
9
+  })
10
+}
11
+
12
+// 查询公告详细
13
+export function getNotice(noticeId) {
14
+  return request({
15
+    url: '/system/notice/' + noticeId,
16
+    method: 'get'
17
+  })
18
+}
19
+
20
+// 新增公告
21
+export function addNotice(data) {
22
+  return request({
23
+    url: '/system/notice',
24
+    method: 'post',
25
+    data: data
26
+  })
27
+}
28
+
29
+// 修改公告
30
+export function updateNotice(data) {
31
+  return request({
32
+    url: '/system/notice',
33
+    method: 'put',
34
+    data: data
35
+  })
36
+}
37
+
38
+// 删除公告
39
+export function delNotice(noticeId) {
40
+  return request({
41
+    url: '/system/notice/' + noticeId,
42
+    method: 'delete'
43
+  })
44
+}

+ 44 - 0
src/api/system/point.js

@@ -0,0 +1,44 @@
1
+import request from '@/utils/request'
2
+
3
+// 查询检查部位列表
4
+export function listPoint(query) {
5
+  return request({
6
+    url: '/system/point/list',
7
+    method: 'get',
8
+    params: query
9
+  })
10
+}
11
+
12
+// 查询检查部位详细
13
+export function getPoint(id) {
14
+  return request({
15
+    url: '/system/point/' + id,
16
+    method: 'get'
17
+  })
18
+}
19
+
20
+// 新增检查部位
21
+export function addPoint(data) {
22
+  return request({
23
+    url: '/system/point',
24
+    method: 'post',
25
+    data: data
26
+  })
27
+}
28
+
29
+// 修改检查部位
30
+export function updatePoint(data) {
31
+  return request({
32
+    url: '/system/point',
33
+    method: 'put',
34
+    data: data
35
+  })
36
+}
37
+
38
+// 删除检查部位
39
+export function delPoint(id) {
40
+  return request({
41
+    url: '/system/point/' + id,
42
+    method: 'delete'
43
+  })
44
+}

+ 44 - 0
src/api/system/position.js

@@ -0,0 +1,44 @@
1
+import request from '@/utils/request'
2
+
3
+// 查询位置列表
4
+export function listPosition(query) {
5
+  return request({
6
+    url: '/system/position/list',
7
+    method: 'get',
8
+    params: query
9
+  })
10
+}
11
+
12
+// 查询位置详细
13
+export function getPosition(id) {
14
+  return request({
15
+    url: '/system/position/' + id,
16
+    method: 'get'
17
+  })
18
+}
19
+
20
+// 新增位置
21
+export function addPosition(data) {
22
+  return request({
23
+    url: '/system/position',
24
+    method: 'post',
25
+    data: data
26
+  })
27
+}
28
+
29
+// 修改位置
30
+export function updatePosition(data) {
31
+  return request({
32
+    url: '/system/position',
33
+    method: 'put',
34
+    data: data
35
+  })
36
+}
37
+
38
+// 删除位置
39
+export function delPosition(id) {
40
+  return request({
41
+    url: '/system/position/' + id,
42
+    method: 'delete'
43
+  })
44
+}

+ 52 - 0
src/api/system/post.js

@@ -0,0 +1,52 @@
1
+import request from '@/utils/request'
2
+
3
+// 查询岗位列表
4
+export function listPost(query) {
5
+  return request({
6
+    url: '/system/post/list',
7
+    method: 'get',
8
+    params: query
9
+  })
10
+}
11
+
12
+// 查询岗位详细
13
+export function getPost(postId) {
14
+  return request({
15
+    url: '/system/post/' + postId,
16
+    method: 'get'
17
+  })
18
+}
19
+
20
+// 新增岗位
21
+export function addPost(data) {
22
+  return request({
23
+    url: '/system/post',
24
+    method: 'post',
25
+    data: data
26
+  })
27
+}
28
+
29
+// 修改岗位
30
+export function updatePost(data) {
31
+  return request({
32
+    url: '/system/post',
33
+    method: 'put',
34
+    data: data
35
+  })
36
+}
37
+
38
+// 删除岗位
39
+export function delPost(postId) {
40
+  return request({
41
+    url: '/system/post/' + postId,
42
+    method: 'delete'
43
+  })
44
+}
45
+
46
+
47
+export function listAllTree () {
48
+  return request({
49
+    url: '/system/post/listAllTree',
50
+    method: 'get'
51
+  })
52
+}

+ 44 - 0
src/api/system/project.js

@@ -0,0 +1,44 @@
1
+import request from '@/utils/request'
2
+
3
+// 查询检查项目列表
4
+export function listProject(query) {
5
+  return request({
6
+    url: '/system/project/list',
7
+    method: 'get',
8
+    params: query
9
+  })
10
+}
11
+
12
+// 查询检查项目详细
13
+export function getProject(id) {
14
+  return request({
15
+    url: '/system/project/' + id,
16
+    method: 'get'
17
+  })
18
+}
19
+
20
+// 新增检查项目
21
+export function addProject(data) {
22
+  return request({
23
+    url: '/system/project',
24
+    method: 'post',
25
+    data: data
26
+  })
27
+}
28
+
29
+// 修改检查项目
30
+export function updateProject(data) {
31
+  return request({
32
+    url: '/system/project',
33
+    method: 'put',
34
+    data: data
35
+  })
36
+}
37
+
38
+// 删除检查项目
39
+export function delProject(id) {
40
+  return request({
41
+    url: '/system/project/' + id,
42
+    method: 'delete'
43
+  })
44
+}

+ 134 - 0
src/api/system/role.js

@@ -0,0 +1,134 @@
1
+import request from '@/utils/request'
2
+
3
+// 查询角色列表
4
+export function listRole(query) {
5
+  return request({
6
+    url: '/system/role/list',
7
+    method: 'get',
8
+    params: query
9
+  })
10
+}
11
+
12
+// 查询角色详细
13
+export function getRole(roleId) {
14
+  return request({
15
+    url: '/system/role/' + roleId,
16
+    method: 'get'
17
+  })
18
+}
19
+
20
+// 新增角色
21
+export function addRole(data) {
22
+  return request({
23
+    url: '/system/role',
24
+    method: 'post',
25
+    data: data
26
+  })
27
+}
28
+
29
+// 修改角色
30
+export function updateRole(data) {
31
+  return request({
32
+    url: '/system/role',
33
+    method: 'put',
34
+    data: data
35
+  })
36
+}
37
+
38
+// 角色数据权限
39
+export function dataScope(data) {
40
+  return request({
41
+    url: '/system/role/dataScope',
42
+    method: 'put',
43
+    data: data
44
+  })
45
+}
46
+
47
+// 角色状态修改
48
+export function changeRoleStatus(roleId, status) {
49
+  const data = {
50
+    roleId,
51
+    status
52
+  }
53
+  return request({
54
+    url: '/system/role/changeStatus',
55
+    method: 'put',
56
+    data: data
57
+  })
58
+}
59
+
60
+// 删除角色
61
+export function delRole(roleId) {
62
+  return request({
63
+    url: '/system/role/' + roleId,
64
+    method: 'delete'
65
+  })
66
+}
67
+
68
+// 查询角色已授权用户列表
69
+export function allocatedUserList(query) {
70
+  return request({
71
+    url: '/system/role/authUser/allocatedList',
72
+    method: 'get',
73
+    params: query
74
+  })
75
+}
76
+
77
+// 查询角色未授权用户列表
78
+export function unallocatedUserList(query) {
79
+  return request({
80
+    url: '/system/role/authUser/unallocatedList',
81
+    method: 'get',
82
+    params: query
83
+  })
84
+}
85
+
86
+// 取消用户授权角色
87
+export function authUserCancel(data) {
88
+  return request({
89
+    url: '/system/role/authUser/cancel',
90
+    method: 'put',
91
+    data: data
92
+  })
93
+}
94
+
95
+// 批量取消用户授权角色
96
+export function authUserCancelAll(data) {
97
+  return request({
98
+    url: '/system/role/authUser/cancelAll',
99
+    method: 'put',
100
+    params: data
101
+  })
102
+}
103
+
104
+// 授权用户选择
105
+export function authUserSelectAll(data) {
106
+  return request({
107
+    url: '/system/role/authUser/selectAll',
108
+    method: 'put',
109
+    params: data
110
+  })
111
+}
112
+
113
+// 根据角色ID查询部门树结构
114
+export function deptTreeSelect(roleId) {
115
+  return request({
116
+    url: '/system/role/deptTree/' + roleId,
117
+    method: 'get'
118
+  })
119
+}
120
+
121
+//查询全部应用列表
122
+export function listAllApp() {
123
+  return request({
124
+    url: '/system/app/listAll',
125
+    method: 'get'
126
+  })
127
+}
128
+//根据角色ID查询应用列表
129
+export function listAppByRoleId(roleId) {
130
+  return request({
131
+    url: '/system/app/roleAppSelect/' + roleId,
132
+    method: 'get'
133
+  })
134
+}

+ 53 - 0
src/api/system/sql.js

@@ -0,0 +1,53 @@
1
+import request from '@/utils/request'
2
+
3
+// 查询动态sql执行config列表
4
+export function listSql(query) {
5
+  return request({
6
+    url: '/system/sql/list',
7
+    method: 'get',
8
+    params: query
9
+  })
10
+}
11
+
12
+// 查询动态sql执行config详细
13
+export function getSql(id) {
14
+  return request({
15
+    url: '/system/sql/' + id,
16
+    method: 'get'
17
+  })
18
+}
19
+
20
+// 新增动态sql执行config
21
+export function addSql(data) {
22
+  return request({
23
+    url: '/system/sql',
24
+    method: 'post',
25
+    data: data
26
+  })
27
+}
28
+
29
+// 修改动态sql执行config
30
+export function updateSql(data) {
31
+  return request({
32
+    url: '/system/sql',
33
+    method: 'put',
34
+    data: data
35
+  })
36
+}
37
+
38
+// 删除动态sql执行config
39
+export function delSql(id) {
40
+  return request({
41
+    url: '/system/sql/' + id,
42
+    method: 'delete'
43
+  })
44
+}
45
+
46
+
47
+export function executeSqlByKeyAndParam(sqlKey, param){
48
+  return request({
49
+    url: '/system/sql/executeSqlByKeyAndParam/' + sqlKey,
50
+    method: 'post',
51
+    data: param
52
+  })
53
+}

+ 153 - 0
src/api/system/user.js

@@ -0,0 +1,153 @@
1
+import request from '@/utils/request'
2
+import { parseStrEmpty } from "@/utils/ruoyi";
3
+
4
+// 查询用户列表
5
+export function listUser(query) {
6
+  return request({
7
+    url: '/system/user/list',
8
+    method: 'get',
9
+    params: query
10
+  })
11
+}
12
+
13
+// 查询用户详细
14
+export function getUser(userId) {
15
+  return request({
16
+    url: '/system/user/' + parseStrEmpty(userId),
17
+    method: 'get'
18
+  })
19
+}
20
+
21
+// 新增用户
22
+export function addUser(data) {
23
+  return request({
24
+    url: '/system/user',
25
+    method: 'post',
26
+    data: data
27
+  })
28
+}
29
+
30
+// 修改用户
31
+export function updateUser(data) {
32
+  return request({
33
+    url: '/system/user',
34
+    method: 'put',
35
+    data: data
36
+  })
37
+}
38
+
39
+// 查询所有用户
40
+export function listAllUser(query) {
41
+  return request({
42
+    url: '/system/user/listAll',
43
+    method: 'get',
44
+    params: query
45
+  })
46
+}
47
+
48
+// 删除用户
49
+export function delUser(userId) {
50
+  return request({
51
+    url: '/system/user/' + userId,
52
+    method: 'delete'
53
+  })
54
+}
55
+
56
+// 用户密码重置
57
+export function resetUserPwd(userId, password) {
58
+  const data = {
59
+    userId,
60
+    password
61
+  }
62
+  return request({
63
+    url: '/system/user/resetPwd',
64
+    method: 'put',
65
+    data: data
66
+  })
67
+}
68
+
69
+// 用户状态修改
70
+export function changeUserStatus(userId, status) {
71
+  const data = {
72
+    userId,
73
+    status
74
+  }
75
+  return request({
76
+    url: '/system/user/changeStatus',
77
+    method: 'put',
78
+    data: data
79
+  })
80
+}
81
+
82
+// 查询用户个人信息
83
+export function getUserProfile() {
84
+  return request({
85
+    url: '/system/user/profile',
86
+    method: 'get'
87
+  })
88
+}
89
+
90
+// 修改用户个人信息
91
+export function updateUserProfile(data) {
92
+  return request({
93
+    url: '/system/user/profile',
94
+    method: 'put',
95
+    data: data
96
+  })
97
+}
98
+
99
+// 用户密码重置
100
+export function updateUserPwd(oldPassword, newPassword) {
101
+  const data = {
102
+    oldPassword,
103
+    newPassword
104
+  }
105
+  return request({
106
+    url: '/system/user/profile/updatePwd',
107
+    method: 'put',
108
+    data: data
109
+  })
110
+}
111
+
112
+// 用户头像上传
113
+export function uploadAvatar(data) {
114
+  return request({
115
+    url: '/system/user/profile/avatar',
116
+    method: 'post',
117
+    headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
118
+    data: data
119
+  })
120
+}
121
+
122
+// 查询授权角色
123
+export function getAuthRole(userId) {
124
+  return request({
125
+    url: '/system/user/authRole/' + userId,
126
+    method: 'get'
127
+  })
128
+}
129
+
130
+// 保存授权角色
131
+export function updateAuthRole(data) {
132
+  return request({
133
+    url: '/system/user/authRole',
134
+    method: 'put',
135
+    params: data
136
+  })
137
+}
138
+
139
+// 查询部门下拉树结构
140
+export function deptTreeSelect() {
141
+  return request({
142
+    url: '/system/user/deptTree',
143
+    method: 'get'
144
+  })
145
+}
146
+//获取所有部门和班组下人员
147
+export function getDeptUserTree(params) {
148
+  return request({
149
+    url: '/system/user/deptUserTree',
150
+    method: 'get',
151
+    params: params
152
+  })
153
+}

+ 41 - 0
src/api/system/workDocu.js

@@ -0,0 +1,41 @@
1
+import request from '@/utils/request'
2
+
3
+// 查询工作文档列表
4
+export function listWorkDocu(query) {
5
+    return request({
6
+        url: '/system/workingDocument/list',
7
+        method: 'get',
8
+        params: query
9
+    })
10
+}
11
+
12
+// 新增工作文档
13
+export function addWorkDocu(data) {
14
+    return request({
15
+        url: '/system/workingDocument',
16
+        method: 'post',
17
+        data: data
18
+    })
19
+}
20
+//修改工作文档
21
+export function updateWorkDocu(data) {
22
+    return request({
23
+        url: '/system/workingDocument',
24
+        method: 'put',
25
+        data: data
26
+    })
27
+}
28
+//删除工作文档
29
+export function deleteWorkDocu(id) {
30
+    return request({
31
+        url: '/system/workingDocument/' + id,
32
+        method: 'delete'
33
+    })
34
+}
35
+//获取工作文档详细信息
36
+export function getWorkDocu(id) {
37
+    return request({
38
+        url: '/system/workingDocument/' + id,
39
+        method: 'get'
40
+    })
41
+}

+ 85 - 0
src/api/tool/gen.js

@@ -0,0 +1,85 @@
1
+import request from '@/utils/request'
2
+
3
+// 查询生成表数据
4
+export function listTable(query) {
5
+  return request({
6
+    url: '/tool/gen/list',
7
+    method: 'get',
8
+    params: query
9
+  })
10
+}
11
+// 查询db数据库列表
12
+export function listDbTable(query) {
13
+  return request({
14
+    url: '/tool/gen/db/list',
15
+    method: 'get',
16
+    params: query
17
+  })
18
+}
19
+
20
+// 查询表详细信息
21
+export function getGenTable(tableId) {
22
+  return request({
23
+    url: '/tool/gen/' + tableId,
24
+    method: 'get'
25
+  })
26
+}
27
+
28
+// 修改代码生成信息
29
+export function updateGenTable(data) {
30
+  return request({
31
+    url: '/tool/gen',
32
+    method: 'put',
33
+    data: data
34
+  })
35
+}
36
+
37
+// 导入表
38
+export function importTable(data) {
39
+  return request({
40
+    url: '/tool/gen/importTable',
41
+    method: 'post',
42
+    params: data
43
+  })
44
+}
45
+
46
+// 创建表
47
+export function createTable(data) {
48
+  return request({
49
+    url: '/tool/gen/createTable',
50
+    method: 'post',
51
+    params: data
52
+  })
53
+}
54
+
55
+// 预览生成代码
56
+export function previewTable(tableId) {
57
+  return request({
58
+    url: '/tool/gen/preview/' + tableId,
59
+    method: 'get'
60
+  })
61
+}
62
+
63
+// 删除表数据
64
+export function delTable(tableId) {
65
+  return request({
66
+    url: '/tool/gen/' + tableId,
67
+    method: 'delete'
68
+  })
69
+}
70
+
71
+// 生成代码(自定义路径)
72
+export function genCode(tableName) {
73
+  return request({
74
+    url: '/tool/gen/genCode/' + tableName,
75
+    method: 'get'
76
+  })
77
+}
78
+
79
+// 同步数据库
80
+export function synchDb(tableName) {
81
+  return request({
82
+    url: '/tool/gen/synchDb/' + tableName,
83
+    method: 'get'
84
+  })
85
+}

BIN
src/assets/401_images/401.gif


BIN
src/assets/404_images/404.png


BIN
src/assets/404_images/404_cloud.png


BIN
src/assets/icons/danger.png


BIN
src/assets/icons/duoren.png


BIN
src/assets/icons/one.png


BIN
src/assets/icons/shang.png


BIN
src/assets/icons/sousuo.png


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 1 - 0
src/assets/icons/svg/404.svg


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 1 - 0
src/assets/icons/svg/bug.svg


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 1 - 0
src/assets/icons/svg/build.svg


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 1 - 0
src/assets/icons/svg/button.svg


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 1 - 0
src/assets/icons/svg/cascader.svg


+ 1 - 0
src/assets/icons/svg/chart.svg

@@ -0,0 +1 @@
1
+<svg width="128" height="128" xmlns="http://www.w3.org/2000/svg"><path d="M0 54.857h36.571V128H0V54.857zM91.429 27.43H128V128H91.429V27.429zM45.714 0h36.572v128H45.714V0z"/></svg>

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 1 - 0
src/assets/icons/svg/checkbox.svg


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 1 - 0
src/assets/icons/svg/clipboard.svg


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 1 - 0
src/assets/icons/svg/code.svg


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 1 - 0
src/assets/icons/svg/color.svg


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 1 - 0
src/assets/icons/svg/component.svg


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 1 - 0
src/assets/icons/svg/dashboard.svg


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 1 - 0
src/assets/icons/svg/date-range.svg


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 1 - 0
src/assets/icons/svg/date.svg


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 1 - 0
src/assets/icons/svg/dict.svg


+ 1 - 0
src/assets/icons/svg/documentation.svg

@@ -0,0 +1 @@
1
+<svg width="128" height="128" xmlns="http://www.w3.org/2000/svg"><path d="M71.984 44.815H115.9L71.984 9.642v35.173zM16.094.05h63.875l47.906 38.37v76.74c0 3.392-1.682 6.645-4.677 9.044-2.995 2.399-7.056 3.746-11.292 3.746H16.094c-4.236 0-8.297-1.347-11.292-3.746-2.995-2.399-4.677-5.652-4.677-9.044V12.84C.125 5.742 7.23.05 16.094.05zm71.86 102.32V89.58h-71.86v12.79h71.86zm23.952-25.58V64H16.094v12.79h95.812z"/></svg>

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 1 - 0
src/assets/icons/svg/download.svg


+ 1 - 0
src/assets/icons/svg/drag.svg

@@ -0,0 +1 @@
1
+<svg width="128" height="128" xmlns="http://www.w3.org/2000/svg"><path d="M73.137 29.08h-9.209 29.7L63.886.093 34.373 29.08h20.49v27.035H27.238v17.948h27.625v27.133h18.274V74.063h27.41V56.115h-27.41V29.08zm-9.245 98.827l27.518-26.711H36.59l27.302 26.71zM.042 64.982l27.196 27.029V38.167L.042 64.982zm100.505-26.815V92.01l27.41-27.029-27.41-26.815z"/></svg>

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 1 - 0
src/assets/icons/svg/druid.svg


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 1 - 0
src/assets/icons/svg/edit.svg


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 1 - 0
src/assets/icons/svg/education.svg


+ 1 - 0
src/assets/icons/svg/email.svg

@@ -0,0 +1 @@
1
+<svg width="128" height="96" xmlns="http://www.w3.org/2000/svg"><path d="M64.125 56.975L120.188.912A12.476 12.476 0 0 0 115.5 0h-103c-1.588 0-3.113.3-4.513.838l56.138 56.137z"/><path d="M64.125 68.287l-62.3-62.3A12.42 12.42 0 0 0 0 12.5v71C0 90.4 5.6 96 12.5 96h103c6.9 0 12.5-5.6 12.5-12.5v-71a12.47 12.47 0 0 0-1.737-6.35L64.125 68.287z"/></svg>

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 1 - 0
src/assets/icons/svg/enter.svg


+ 1 - 0
src/assets/icons/svg/example.svg

@@ -0,0 +1 @@
1
+<svg width="128" height="128" xmlns="http://www.w3.org/2000/svg"><path d="M96.258 57.462h31.421C124.794 27.323 100.426 2.956 70.287.07v31.422a32.856 32.856 0 0 1 25.971 25.97zm-38.796-25.97V.07C27.323 2.956 2.956 27.323.07 57.462h31.422a32.856 32.856 0 0 1 25.97-25.97zm12.825 64.766v31.421c30.46-2.885 54.507-27.253 57.713-57.712H96.579c-2.886 13.466-13.146 23.726-26.292 26.291zM31.492 70.287H.07c2.886 30.46 27.253 54.507 57.713 57.713V96.579c-13.466-2.886-23.726-13.146-26.291-26.292z"/></svg>

+ 1 - 0
src/assets/icons/svg/excel.svg

@@ -0,0 +1 @@
1
+<svg width="128" height="128" xmlns="http://www.w3.org/2000/svg"><path d="M78.208 16.576v8.384h38.72v5.376h-38.72v8.704h38.72v5.376h-38.72v8.576h38.72v5.376h-38.72v8.576h38.72v5.376h-38.72v8.576h38.72v5.376h-38.72v8.512h38.72v5.376h-38.72v11.136H128v-94.72H78.208zM0 114.368L72.128 128V0L0 13.632v100.736z"/><path d="M28.672 82.56h-11.2l14.784-23.488-14.08-22.592h11.52l8.192 14.976 8.448-14.976h11.136l-14.08 22.208L58.368 82.56H46.656l-8.768-15.68z"/></svg>

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 1 - 0
src/assets/icons/svg/exit-fullscreen.svg


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 1 - 0
src/assets/icons/svg/eye-open.svg


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 1 - 0
src/assets/icons/svg/eye.svg


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 1 - 0
src/assets/icons/svg/form.svg


+ 1 - 0
src/assets/icons/svg/fullscreen.svg

@@ -0,0 +1 @@
1
+<svg width="128" height="128" xmlns="http://www.w3.org/2000/svg"><path d="M38.47 52L52 38.462l-23.648-23.67L43.209 0H.035L0 43.137l14.757-14.865L38.47 52zm74.773 47.726L89.526 76 76 89.536l23.648 23.672L84.795 128h43.174L128 84.863l-14.757 14.863zM89.538 52l23.668-23.648L128 43.207V.038L84.866 0 99.73 14.76 76 38.472 89.538 52zM38.46 76L14.792 99.651 0 84.794v43.173l43.137.033-14.865-14.757L52 89.53 38.46 76z"/></svg>

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 1 - 0
src/assets/icons/svg/github.svg


+ 1 - 0
src/assets/icons/svg/guide.svg

@@ -0,0 +1 @@
1
+<svg width="128" height="128" xmlns="http://www.w3.org/2000/svg"><path d="M1.482 70.131l36.204 16.18 69.932-65.485-61.38 70.594 46.435 18.735c1.119.425 2.397-.17 2.797-1.363v-.085L127.998.047 1.322 65.874c-1.12.597-1.519 1.959-1.04 3.151.32.511.72.937 1.2 1.107zm44.676 57.821L64.22 107.26l-18.062-7.834v28.527z"/></svg>

+ 0 - 0
src/assets/icons/svg/icon.svg


Algunos archivos no se mostraron porque demasiados archivos cambiaron en este cambio