Browse Source

完成大部分项目管理模块接口

hzj18279462576@163.com 1 year ago
parent
commit
ee50c0f0e0

+ 75 - 44
package-lock.json

@@ -11,7 +11,7 @@
         "@easydarwin/easyplayer": "^5.0.7",
         "@easydarwin/easyplayer": "^5.0.7",
         "@element-plus/icons-vue": "^2.0.10",
         "@element-plus/icons-vue": "^2.0.10",
         "@liveqing/liveplayer-v3": "^3.7.10",
         "@liveqing/liveplayer-v3": "^3.7.10",
-        "@vue-office/docx": "^1.6.1",
+        "@vue-office/docx": "^1.6.2",
         "@wangeditor/editor": "^5.1.23",
         "@wangeditor/editor": "^5.1.23",
         "@wangeditor/editor-for-vue": "^5.1.12",
         "@wangeditor/editor-for-vue": "^5.1.12",
         "axios": "^1.3.2",
         "axios": "^1.3.2",
@@ -19,7 +19,7 @@
         "dayjs": "^1.11.8",
         "dayjs": "^1.11.8",
         "echarts": "^5.2.0",
         "echarts": "^5.2.0",
         "echarts-gl": "^2.0.9",
         "echarts-gl": "^2.0.9",
-        "element-plus": "^2.2.29",
+        "element-plus": "^2.9.0",
         "fast-glob": "^3.3.2",
         "fast-glob": "^3.3.2",
         "hls.js": "^1.3.4",
         "hls.js": "^1.3.4",
         "jsencrypt": "^3.3.1",
         "jsencrypt": "^3.3.1",
@@ -28,6 +28,7 @@
         "sass": "^1.58.0",
         "sass": "^1.58.0",
         "sass-loader": "^13.2.0",
         "sass-loader": "^13.2.0",
         "terser": "^5.16.5",
         "terser": "^5.16.5",
+        "v-viewer": "^3.0.11",
         "vite-plugin-svg-icons": "^2.0.1",
         "vite-plugin-svg-icons": "^2.0.1",
         "vue": "^3.2.45",
         "vue": "^3.2.45",
         "vue-demi": "^0.14.7",
         "vue-demi": "^0.14.7",
@@ -65,9 +66,9 @@
       }
       }
     },
     },
     "node_modules/@ctrl/tinycolor": {
     "node_modules/@ctrl/tinycolor": {
-      "version": "3.5.0",
-      "resolved": "https://registry.npmmirror.com/@ctrl/tinycolor/-/tinycolor-3.5.0.tgz",
-      "integrity": "sha512-tlJpwF40DEQcfR/QF+wNMVyGMaO9FQp6Z1Wahj4Gk3CJQYHwA2xVG7iKDFdW6zuxZY9XWOpGcfNCTsX4McOsOg==",
+      "version": "3.6.1",
+      "resolved": "https://registry.npmmirror.com/@ctrl/tinycolor/-/tinycolor-3.6.1.tgz",
+      "integrity": "sha512-SITSV6aIXsuVNV3f3O0f2n/cgyEDWoSqtZMYiAmcsYHydcKrOz3gUxB/iXd/Qf08+IZX4KpgNbvUdMBmWz+kcA==",
       "engines": {
       "engines": {
         "node": ">=10"
         "node": ">=10"
       }
       }
@@ -78,9 +79,9 @@
       "integrity": "sha512-cKsvrUwFN1ZmYR+grhTKiOUp6QG1mgu64XGPjeASsAWCc03TygKQBsKCHPndafotjCXFFwuG9g1HatOiNvd3dQ=="
       "integrity": "sha512-cKsvrUwFN1ZmYR+grhTKiOUp6QG1mgu64XGPjeASsAWCc03TygKQBsKCHPndafotjCXFFwuG9g1HatOiNvd3dQ=="
     },
     },
     "node_modules/@element-plus/icons-vue": {
     "node_modules/@element-plus/icons-vue": {
-      "version": "2.0.10",
-      "resolved": "https://registry.npmmirror.com/@element-plus/icons-vue/-/icons-vue-2.0.10.tgz",
-      "integrity": "sha512-ygEZ1mwPjcPo/OulhzLE7mtDrQBWI8vZzEWSNB2W/RNCRjoQGwbaK4N8lV4rid7Ts4qvySU3njMN7YCiSlSaTQ==",
+      "version": "2.3.1",
+      "resolved": "https://registry.npmmirror.com/@element-plus/icons-vue/-/icons-vue-2.3.1.tgz",
+      "integrity": "sha512-XxVUZv48RZAd87ucGS48jPf6pKu0yV5UCg9f4FFwtrYxXOwWuVJo6wOvSLKEoMQKjv8GsX/mhP6UsC1lRwbUWg==",
       "peerDependencies": {
       "peerDependencies": {
         "vue": "^3.2.0"
         "vue": "^3.2.0"
       }
       }
@@ -416,18 +417,27 @@
       }
       }
     },
     },
     "node_modules/@floating-ui/core": {
     "node_modules/@floating-ui/core": {
-      "version": "1.2.0",
-      "resolved": "https://registry.npmmirror.com/@floating-ui/core/-/core-1.2.0.tgz",
-      "integrity": "sha512-GHUXPEhMEmTpnpIfesFA2KAoMJPb1SPQw964tToQwt+BbGXdhqTCWT1rOb0VURGylsxsYxiGMnseJ3IlclVpVA=="
+      "version": "1.6.8",
+      "resolved": "https://registry.npmmirror.com/@floating-ui/core/-/core-1.6.8.tgz",
+      "integrity": "sha512-7XJ9cPU+yI2QeLS+FCSlqNFZJq8arvswefkZrYI1yQBbftw6FyrZOxYSh+9S7z7TpeWlRt9zJ5IhM1WIL334jA==",
+      "dependencies": {
+        "@floating-ui/utils": "^0.2.8"
+      }
     },
     },
     "node_modules/@floating-ui/dom": {
     "node_modules/@floating-ui/dom": {
-      "version": "1.2.0",
-      "resolved": "https://registry.npmmirror.com/@floating-ui/dom/-/dom-1.2.0.tgz",
-      "integrity": "sha512-QXzg57o1cjLz3cGETzKXjI3kx1xyS49DW9l7kV2jw2c8Yftd434t2hllX0sVGn2Q8MtcW/4pNm8bfE1/4n6mng==",
+      "version": "1.6.12",
+      "resolved": "https://registry.npmmirror.com/@floating-ui/dom/-/dom-1.6.12.tgz",
+      "integrity": "sha512-NP83c0HjokcGVEMeoStg317VD9W7eDlGK7457dMBANbKA6GJZdc7rjujdgqzTaz93jkGgc5P/jeWbaCHnMNc+w==",
       "dependencies": {
       "dependencies": {
-        "@floating-ui/core": "^1.2.0"
+        "@floating-ui/core": "^1.6.0",
+        "@floating-ui/utils": "^0.2.8"
       }
       }
     },
     },
+    "node_modules/@floating-ui/utils": {
+      "version": "0.2.8",
+      "resolved": "https://registry.npmmirror.com/@floating-ui/utils/-/utils-0.2.8.tgz",
+      "integrity": "sha512-kym7SodPp8/wloecOpcmSnWJsK7M0E5Wg8UcFA+uO4B9s5d0ywXOEro/8HM9x0rW+TljRzul/14UYz3TleT3ig=="
+    },
     "node_modules/@jridgewell/gen-mapping": {
     "node_modules/@jridgewell/gen-mapping": {
       "version": "0.3.5",
       "version": "0.3.5",
       "resolved": "https://registry.npmmirror.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz",
       "resolved": "https://registry.npmmirror.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz",
@@ -521,7 +531,11 @@
       "name": "@sxzz/popperjs-es",
       "name": "@sxzz/popperjs-es",
       "version": "2.11.7",
       "version": "2.11.7",
       "resolved": "https://registry.npmmirror.com/@sxzz/popperjs-es/-/popperjs-es-2.11.7.tgz",
       "resolved": "https://registry.npmmirror.com/@sxzz/popperjs-es/-/popperjs-es-2.11.7.tgz",
-      "integrity": "sha512-Ccy0NlLkzr0Ex2FKvh2X+OyERHXJ88XJ1MXtsI9y9fGexlaXaVTPzBCRBwIxFkORuOb+uBqeu+RqnpgYTEZRUQ=="
+      "integrity": "sha512-Ccy0NlLkzr0Ex2FKvh2X+OyERHXJ88XJ1MXtsI9y9fGexlaXaVTPzBCRBwIxFkORuOb+uBqeu+RqnpgYTEZRUQ==",
+      "funding": {
+        "type": "opencollective",
+        "url": "https://opencollective.com/popperjs"
+      }
     },
     },
     "node_modules/@transloadit/prettier-bytes": {
     "node_modules/@transloadit/prettier-bytes": {
       "version": "0.0.7",
       "version": "0.0.7",
@@ -574,14 +588,14 @@
       "peer": true
       "peer": true
     },
     },
     "node_modules/@types/lodash": {
     "node_modules/@types/lodash": {
-      "version": "4.14.191",
-      "resolved": "https://registry.npmmirror.com/@types/lodash/-/lodash-4.14.191.tgz",
-      "integrity": "sha512-BdZ5BCCvho3EIXw6wUCXHe7rS53AIDPLE+JzwgT+OsJk53oBfbSmZZ7CX4VaRoN78N+TJpFi9QPlfIVNmJYWxQ=="
+      "version": "4.17.13",
+      "resolved": "https://registry.npmmirror.com/@types/lodash/-/lodash-4.17.13.tgz",
+      "integrity": "sha512-lfx+dftrEZcdBPczf9d0Qv0x+j/rfNCMuC6OcfXmO8gkfeNAY88PgKUbvG56whcN23gc27yenwF6oJZXGFpYxg=="
     },
     },
     "node_modules/@types/lodash-es": {
     "node_modules/@types/lodash-es": {
-      "version": "4.17.6",
-      "resolved": "https://registry.npmmirror.com/@types/lodash-es/-/lodash-es-4.17.6.tgz",
-      "integrity": "sha512-R+zTeVUKDdfoRxpAryaQNRKk3105Rrgx2CFRClIgRGaqDTdjsm8h6IYA8ir584W3ePzkZfst5xIgDwYrlh9HLg==",
+      "version": "4.17.12",
+      "resolved": "https://registry.npmmirror.com/@types/lodash-es/-/lodash-es-4.17.12.tgz",
+      "integrity": "sha512-0NgftHUcV4v34VhXm8QBSftKVXtbkBG3ViCjs6+eJ5a6y6Mi/jiFGPc1sC7QK+9BFhWrURE3EOggmWaSxL9OzQ==",
       "dependencies": {
       "dependencies": {
         "@types/lodash": "*"
         "@types/lodash": "*"
       }
       }
@@ -671,9 +685,9 @@
       }
       }
     },
     },
     "node_modules/@vue-office/docx": {
     "node_modules/@vue-office/docx": {
-      "version": "1.6.1",
-      "resolved": "https://registry.npmmirror.com/@vue-office/docx/-/docx-1.6.1.tgz",
-      "integrity": "sha512-DKB0F7b5tv4MvZO/nYdKiUUGXAD3LmZeHLQLodYg+c4Rap8w1EeU1DTJxXumq88xCggVrM69Qx+ocVIpq4eSYQ==",
+      "version": "1.6.2",
+      "resolved": "https://registry.npmmirror.com/@vue-office/docx/-/docx-1.6.2.tgz",
+      "integrity": "sha512-OHAoUHeY8nHjhWvwDhlPx+/rmRkxmqLpvPgtfCEOZ4H1c1LCdJ6eDbdV3152ww8dcdZ7fgGQu3fmSSaI7JwdpQ==",
       "hasInstallScript": true,
       "hasInstallScript": true,
       "peerDependencies": {
       "peerDependencies": {
         "@vue/composition-api": "^1.7.1",
         "@vue/composition-api": "^1.7.1",
@@ -794,13 +808,13 @@
       "integrity": "sha512-BHGyyGN3Q97EZx0taMQ+OLNuZcW3d37ZEVmEAyeoA9ERdGvm9Irc/0Fua8SNyOtV1w6BS4q25wbMzJujO9HIfQ=="
       "integrity": "sha512-BHGyyGN3Q97EZx0taMQ+OLNuZcW3d37ZEVmEAyeoA9ERdGvm9Irc/0Fua8SNyOtV1w6BS4q25wbMzJujO9HIfQ=="
     },
     },
     "node_modules/@vueuse/core": {
     "node_modules/@vueuse/core": {
-      "version": "9.12.0",
-      "resolved": "https://registry.npmmirror.com/@vueuse/core/-/core-9.12.0.tgz",
-      "integrity": "sha512-h/Di8Bvf6xRcvS/PvUVheiMYYz3U0tH3X25YxONSaAUBa841ayMwxkuzx/DGUMCW/wHWzD8tRy2zYmOC36r4sg==",
+      "version": "9.13.0",
+      "resolved": "https://registry.npmmirror.com/@vueuse/core/-/core-9.13.0.tgz",
+      "integrity": "sha512-pujnclbeHWxxPRqXWmdkKV5OX4Wk4YeK7wusHqRwU0Q7EFusHoqNA/aPhB6KCh9hEqJkLAJo7bb0Lh9b+OIVzw==",
       "dependencies": {
       "dependencies": {
         "@types/web-bluetooth": "^0.0.16",
         "@types/web-bluetooth": "^0.0.16",
-        "@vueuse/metadata": "9.12.0",
-        "@vueuse/shared": "9.12.0",
+        "@vueuse/metadata": "9.13.0",
+        "@vueuse/shared": "9.13.0",
         "vue-demi": "*"
         "vue-demi": "*"
       },
       },
       "funding": {
       "funding": {
@@ -808,17 +822,17 @@
       }
       }
     },
     },
     "node_modules/@vueuse/metadata": {
     "node_modules/@vueuse/metadata": {
-      "version": "9.12.0",
-      "resolved": "https://registry.npmmirror.com/@vueuse/metadata/-/metadata-9.12.0.tgz",
-      "integrity": "sha512-9oJ9MM9lFLlmvxXUqsR1wLt1uF7EVbP5iYaHJYqk+G2PbMjY6EXvZeTjbdO89HgoF5cI6z49o2zT/jD9SVoNpQ==",
+      "version": "9.13.0",
+      "resolved": "https://registry.npmmirror.com/@vueuse/metadata/-/metadata-9.13.0.tgz",
+      "integrity": "sha512-gdU7TKNAUVlXXLbaF+ZCfte8BjRJQWPCa2J55+7/h+yDtzw3vOoGQDRXzI6pyKyo6bXFT5/QoPE4hAknExjRLQ==",
       "funding": {
       "funding": {
         "url": "https://github.com/sponsors/antfu"
         "url": "https://github.com/sponsors/antfu"
       }
       }
     },
     },
     "node_modules/@vueuse/shared": {
     "node_modules/@vueuse/shared": {
-      "version": "9.12.0",
-      "resolved": "https://registry.npmmirror.com/@vueuse/shared/-/shared-9.12.0.tgz",
-      "integrity": "sha512-TWuJLACQ0BVithVTRbex4Wf1a1VaRuSpVeyEd4vMUWl54PzlE0ciFUshKCXnlLuD0lxIaLK4Ypj3NXYzZh4+SQ==",
+      "version": "9.13.0",
+      "resolved": "https://registry.npmmirror.com/@vueuse/shared/-/shared-9.13.0.tgz",
+      "integrity": "sha512-UrnhU+Cnufu4S6JLCPZnkWh0WwZGUp72ktOF2DFptMlOs3TOdVv8xJN53zhHGARmVOsz5KqOls09+J1NR6sBKw==",
       "dependencies": {
       "dependencies": {
         "vue-demi": "*"
         "vue-demi": "*"
       },
       },
@@ -1826,9 +1840,9 @@
       }
       }
     },
     },
     "node_modules/dayjs": {
     "node_modules/dayjs": {
-      "version": "1.11.8",
-      "resolved": "https://registry.npmmirror.com/dayjs/-/dayjs-1.11.8.tgz",
-      "integrity": "sha512-LcgxzFoWMEPO7ggRv1Y2N31hUf2R0Vj7fuy/m+Bg1K8rr+KAs1AEy4y9jd5DXe8pbHgX+srkHNS7TH6Q6ZhYeQ=="
+      "version": "1.11.13",
+      "resolved": "https://registry.npmmirror.com/dayjs/-/dayjs-1.11.13.tgz",
+      "integrity": "sha512-oaMBel6gjolK862uaPQOVTA7q3TZhuSvuMQAAglQDOWYO9A91IrAOUJEyKVlqJlHE0vq5p5UXxzdPfMH/x6xNg=="
     },
     },
     "node_modules/debug": {
     "node_modules/debug": {
       "version": "4.3.7",
       "version": "4.3.7",
@@ -2007,19 +2021,19 @@
       "peer": true
       "peer": true
     },
     },
     "node_modules/element-plus": {
     "node_modules/element-plus": {
-      "version": "2.2.29",
-      "resolved": "https://registry.npmmirror.com/element-plus/-/element-plus-2.2.29.tgz",
-      "integrity": "sha512-g4dcrURrKkR5uUX8n5RVnnqGnimoki9HfqS4yHHG6XwCHBkZGozdq4x+478BzeWUe31h++BO+7dakSx4VnM8RQ==",
+      "version": "2.9.0",
+      "resolved": "https://registry.npmmirror.com/element-plus/-/element-plus-2.9.0.tgz",
+      "integrity": "sha512-ccOFXKsauo2dtokAr4OX7gZsb7TuAoVxA2zGRZo5o2yyDDBLBaZxOoFQPoxITSLcHbBfQuNDGK5Iag5hnyKkZA==",
       "dependencies": {
       "dependencies": {
         "@ctrl/tinycolor": "^3.4.1",
         "@ctrl/tinycolor": "^3.4.1",
-        "@element-plus/icons-vue": "^2.0.6",
+        "@element-plus/icons-vue": "^2.3.1",
         "@floating-ui/dom": "^1.0.1",
         "@floating-ui/dom": "^1.0.1",
         "@popperjs/core": "npm:@sxzz/popperjs-es@^2.11.7",
         "@popperjs/core": "npm:@sxzz/popperjs-es@^2.11.7",
         "@types/lodash": "^4.14.182",
         "@types/lodash": "^4.14.182",
         "@types/lodash-es": "^4.17.6",
         "@types/lodash-es": "^4.17.6",
         "@vueuse/core": "^9.1.0",
         "@vueuse/core": "^9.1.0",
         "async-validator": "^4.2.5",
         "async-validator": "^4.2.5",
-        "dayjs": "^1.11.3",
+        "dayjs": "^1.11.13",
         "escape-html": "^1.0.3",
         "escape-html": "^1.0.3",
         "lodash": "^4.17.21",
         "lodash": "^4.17.21",
         "lodash-es": "^4.17.21",
         "lodash-es": "^4.17.21",
@@ -5541,6 +5555,18 @@
       "resolved": "https://registry.npmmirror.com/util-deprecate/-/util-deprecate-1.0.2.tgz",
       "resolved": "https://registry.npmmirror.com/util-deprecate/-/util-deprecate-1.0.2.tgz",
       "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw=="
       "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw=="
     },
     },
+    "node_modules/v-viewer": {
+      "version": "3.0.11",
+      "resolved": "https://registry.npmmirror.com/v-viewer/-/v-viewer-3.0.11.tgz",
+      "integrity": "sha512-E8LOdAxhzuktt4HB3PswVCccQ1Q1sYHYnLsS6zaJISpb5EvmAFs5sYNfXnDLFxVb5DQ82v4ZlGxkYlseXwWRJw==",
+      "dependencies": {
+        "lodash": "^4.17.21",
+        "viewerjs": "^1.9.0"
+      },
+      "peerDependencies": {
+        "vue": "^3.0.0"
+      }
+    },
     "node_modules/vary": {
     "node_modules/vary": {
       "version": "1.1.2",
       "version": "1.1.2",
       "resolved": "https://registry.npmmirror.com/vary/-/vary-1.1.2.tgz",
       "resolved": "https://registry.npmmirror.com/vary/-/vary-1.1.2.tgz",
@@ -5549,6 +5575,11 @@
         "node": ">= 0.8"
         "node": ">= 0.8"
       }
       }
     },
     },
+    "node_modules/viewerjs": {
+      "version": "1.11.7",
+      "resolved": "https://registry.npmmirror.com/viewerjs/-/viewerjs-1.11.7.tgz",
+      "integrity": "sha512-0JuVqOmL5v1jmEAlG5EBDR3XquxY8DWFQbFMprOXgaBB0F7Q/X9xWdEaQc59D8xzwkdUgXEMSSknTpriq95igg=="
+    },
     "node_modules/vite": {
     "node_modules/vite": {
       "version": "4.1.1",
       "version": "4.1.1",
       "resolved": "https://registry.npmmirror.com/vite/-/vite-4.1.1.tgz",
       "resolved": "https://registry.npmmirror.com/vite/-/vite-4.1.1.tgz",

+ 3 - 2
package.json

@@ -12,7 +12,7 @@
     "@easydarwin/easyplayer": "^5.0.7",
     "@easydarwin/easyplayer": "^5.0.7",
     "@element-plus/icons-vue": "^2.0.10",
     "@element-plus/icons-vue": "^2.0.10",
     "@liveqing/liveplayer-v3": "^3.7.10",
     "@liveqing/liveplayer-v3": "^3.7.10",
-    "@vue-office/docx": "^1.6.1",
+    "@vue-office/docx": "^1.6.2",
     "@wangeditor/editor": "^5.1.23",
     "@wangeditor/editor": "^5.1.23",
     "@wangeditor/editor-for-vue": "^5.1.12",
     "@wangeditor/editor-for-vue": "^5.1.12",
     "axios": "^1.3.2",
     "axios": "^1.3.2",
@@ -20,7 +20,7 @@
     "dayjs": "^1.11.8",
     "dayjs": "^1.11.8",
     "echarts": "^5.2.0",
     "echarts": "^5.2.0",
     "echarts-gl": "^2.0.9",
     "echarts-gl": "^2.0.9",
-    "element-plus": "^2.2.29",
+    "element-plus": "^2.9.0",
     "fast-glob": "^3.3.2",
     "fast-glob": "^3.3.2",
     "hls.js": "^1.3.4",
     "hls.js": "^1.3.4",
     "jsencrypt": "^3.3.1",
     "jsencrypt": "^3.3.1",
@@ -29,6 +29,7 @@
     "sass": "^1.58.0",
     "sass": "^1.58.0",
     "sass-loader": "^13.2.0",
     "sass-loader": "^13.2.0",
     "terser": "^5.16.5",
     "terser": "^5.16.5",
+    "v-viewer": "^3.0.11",
     "vite-plugin-svg-icons": "^2.0.1",
     "vite-plugin-svg-icons": "^2.0.1",
     "vue": "^3.2.45",
     "vue": "^3.2.45",
     "vue-demi": "^0.14.7",
     "vue-demi": "^0.14.7",

+ 1 - 0
src/App.vue

@@ -30,4 +30,5 @@ onBeforeMount(() => {
   // margin: 0;
   // margin: 0;
   // padding: 0;
   // padding: 0;
 }
 }
+
 </style>
 </style>

+ 279 - 0
src/assets/files/viewer.properties

@@ -0,0 +1,279 @@
+# Copyright 2012 Mozilla Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Main toolbar buttons (tooltips and alt text for images)
+previous.title=上一页
+previous_label=上一页
+next.title=下一页
+next_label=下一页
+
+# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input.
+page.title=页面
+# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number
+# representing the total number of pages in the document.
+of_pages=/ {{pagesCount}}
+# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}"
+# will be replaced by a number representing the currently visible page,
+# respectively a number representing the total number of pages in the document.
+page_of_pages=({{pageNumber}} / {{pagesCount}})
+
+zoom_out.title=缩小
+zoom_out_label=缩小
+zoom_in.title=放大
+zoom_in_label=放大
+zoom.title=缩放
+presentation_mode.title=切换到演示模式
+presentation_mode_label=演示模式
+open_file.title=打开文件
+open_file_label=打开
+print.title=打印
+print_label=打印
+download.title=下载
+download_label=下载
+bookmark.title=当前在看的内容(复制或在新窗口中打开)
+bookmark_label=当前在看
+
+save.title=保存
+save_label=保存
+bookmark1.title=当前页面(在当前页面查看 URL)
+bookmark1_label=当前页面
+
+# Secondary toolbar and context menu
+tools.title=工具
+tools_label=工具
+first_page.title=转到第一页
+first_page_label=转到第一页
+last_page.title=转到最后一页
+last_page_label=转到最后一页
+page_rotate_cw.title=顺时针旋转
+page_rotate_cw_label=顺时针旋转
+page_rotate_ccw.title=逆时针旋转
+page_rotate_ccw_label=逆时针旋转
+
+cursor_text_select_tool.title=启用文本选择工具
+cursor_text_select_tool_label=文本选择工具
+cursor_hand_tool.title=启用手形工具
+cursor_hand_tool_label=手形工具
+
+scroll_page.title=使用页面滚动
+scroll_page_label=页面滚动
+scroll_vertical.title=使用垂直滚动
+scroll_vertical_label=垂直滚动
+scroll_horizontal.title=使用水平滚动
+scroll_horizontal_label=水平滚动
+scroll_wrapped.title=使用平铺滚动
+scroll_wrapped_label=平铺滚动
+
+spread_none.title=不加入衔接页
+spread_none_label=单页视图
+spread_odd.title=加入衔接页使奇数页作为起始页
+spread_odd_label=双页视图
+spread_even.title=加入衔接页使偶数页作为起始页
+spread_even_label=书籍视图
+
+# Document properties dialog box
+document_properties.title=文档属性…
+document_properties_label=文档属性…
+document_properties_file_name=文件名:
+document_properties_file_size=文件大小:
+# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in kilobytes, respectively in bytes.
+document_properties_kb={{size_kb}} KB ({{size_b}} 字节)
+# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in megabytes, respectively in bytes.
+document_properties_mb={{size_mb}} MB ({{size_b}} 字节)
+document_properties_title=标题:
+document_properties_author=作者:
+document_properties_subject=主题:
+document_properties_keywords=关键词:
+document_properties_creation_date=创建日期:
+document_properties_modification_date=修改日期:
+# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}"
+# will be replaced by the creation/modification date, and time, of the PDF file.
+document_properties_date_string={{date}}, {{time}}
+document_properties_creator=创建者:
+document_properties_producer=PDF 生成器:
+document_properties_version=PDF 版本:
+document_properties_page_count=页数:
+document_properties_page_size=页面大小:
+document_properties_page_size_unit_inches=英寸
+document_properties_page_size_unit_millimeters=毫米
+document_properties_page_size_orientation_portrait=纵向
+document_properties_page_size_orientation_landscape=横向
+document_properties_page_size_name_a3=A3
+document_properties_page_size_name_a4=A4
+document_properties_page_size_name_letter=文本
+document_properties_page_size_name_legal=法律
+# LOCALIZATION NOTE (document_properties_page_size_dimension_string):
+# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement and orientation, of the (current) page.
+document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}}({{orientation}})
+# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string):
+# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement, name, and orientation, of the (current) page.
+document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}}({{name}},{{orientation}})
+# LOCALIZATION NOTE (document_properties_linearized): The linearization status of
+# the document; usually called "Fast Web View" in English locales of Adobe software.
+document_properties_linearized=快速 Web 视图:
+document_properties_linearized_yes=是
+document_properties_linearized_no=否
+document_properties_close=关闭
+
+print_progress_message=正在准备打印文档…
+# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by
+# a numerical per cent value.
+print_progress_percent={{progress}}%
+print_progress_close=取消
+
+# Tooltips and alt text for side panel toolbar buttons
+# (the _label strings are alt text for the buttons, the .title strings are
+# tooltips)
+toggle_sidebar.title=切换侧栏
+toggle_sidebar_notification2.title=切换侧栏(文档所含的大纲/附件/图层)
+toggle_sidebar_label=切换侧栏
+document_outline.title=显示文档大纲(双击展开/折叠所有项)
+document_outline_label=文档大纲
+attachments.title=显示附件
+attachments_label=附件
+layers.title=显示图层(双击即可将所有图层重置为默认状态)
+layers_label=图层
+thumbs.title=显示缩略图
+thumbs_label=缩略图
+current_outline_item.title=查找当前大纲项目
+current_outline_item_label=当前大纲项目
+findbar.title=在文档中查找
+findbar_label=查找
+
+additional_layers=其他图层
+# LOCALIZATION NOTE (page_landmark): "{{page}}" will be replaced by the page number.
+page_landmark=第 {{page}} 页
+# Thumbnails panel item (tooltip and alt text for images)
+# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page
+# number.
+thumb_page_title=第 {{page}} 页
+# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page
+# number.
+thumb_page_canvas=页面 {{page}} 的缩略图
+
+# Find panel button title and messages
+find_input.title=查找
+find_input.placeholder=在文档中查找…
+find_previous.title=查找词语上一次出现的位置
+find_previous_label=上一页
+find_next.title=查找词语后一次出现的位置
+find_next_label=下一页
+find_highlight=全部高亮显示
+find_match_case_label=区分大小写
+find_match_diacritics_label=匹配变音符号
+find_entire_word_label=全词匹配
+find_reached_top=到达文档开头,从末尾继续
+find_reached_bottom=到达文档末尾,从开头继续
+# LOCALIZATION NOTE (find_match_count): The supported plural forms are
+# [one|two|few|many|other], with [other] as the default value.
+# "{{current}}" and "{{total}}" will be replaced by a number representing the
+# index of the currently active find result, respectively a number representing
+# the total number of matches in the document.
+find_match_count={[ plural(total) ]}
+find_match_count[one]=第 {{current}} 项,共匹配 {{total}} 项
+find_match_count[two]=第 {{current}} 项,共匹配 {{total}} 项
+find_match_count[few]=第 {{current}} 项,共匹配 {{total}} 项
+find_match_count[many]=第 {{current}} 项,共匹配 {{total}} 项
+find_match_count[other]=第 {{current}} 项,共匹配 {{total}} 项
+# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are
+# [zero|one|two|few|many|other], with [other] as the default value.
+# "{{limit}}" will be replaced by a numerical value.
+find_match_count_limit={[ plural(limit) ]}
+find_match_count_limit[zero]=超过 {{limit}} 项匹配
+find_match_count_limit[one]=超过 {{limit}} 项匹配
+find_match_count_limit[two]=超过 {{limit}} 项匹配
+find_match_count_limit[few]=超过 {{limit}} 项匹配
+find_match_count_limit[many]=超过 {{limit}} 项匹配
+find_match_count_limit[other]=超过 {{limit}} 项匹配
+find_not_found=找不到指定词语
+
+# Error panel labels
+error_more_info=更多信息
+error_less_info=更少信息
+error_close=关闭
+# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be
+# replaced by the PDF.JS version and build ID.
+error_version_info=PDF.js v{{version}} (build: {{build}})
+# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an
+# english string describing the error.
+error_message=信息:{{message}}
+# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack
+# trace.
+error_stack=堆栈:{{stack}}
+# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename
+error_file=文件:{{file}}
+# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number
+error_line=行号:{{line}}
+
+# Predefined zoom values
+page_scale_width=适合页宽
+page_scale_fit=适合页面
+page_scale_auto=自动缩放
+page_scale_actual=实际大小
+# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a
+# numerical scale value.
+page_scale_percent={{scale}}%
+
+# Loading indicator messages
+loading=正在加载…
+
+# Loading indicator messages
+loading_error=加载 PDF 时发生错误。
+invalid_file_error=无效或损坏的 PDF 文件。
+missing_file_error=缺少 PDF 文件。
+unexpected_response_error=意外的服务器响应。
+
+rendering_error=渲染页面时发生错误。
+
+# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be
+# replaced by the modification date, and time, of the annotation.
+annotation_date_string={{date}},{{time}}
+
+# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip.
+# "{{type}}" will be replaced with an annotation type from a list defined in
+# the PDF spec (32000-1:2008 Table 169 – Annotation types).
+# Some common types are e.g.: "Check", "Text", "Comment", "Note"
+text_annotation_type.alt=[{{type}} 注释]
+password_label=输入密码以打开此 PDF 文件。
+password_invalid=密码无效。请重试。
+password_ok=确定
+password_cancel=取消
+
+printing_not_supported=警告:此浏览器尚未完整支持打印功能。
+printing_not_ready=警告:此 PDF 未完成加载,无法打印。
+web_fonts_disabled=Web 字体已被禁用:无法使用嵌入的 PDF 字体。
+
+# Editor
+editor_free_text2.title=文本
+editor_free_text2_label=文本
+editor_ink2.title=绘图
+editor_ink2_label=绘图
+
+free_text2_default_content=开始输入…
+
+# Editor Parameters
+editor_free_text_color=颜色
+editor_free_text_size=字号
+editor_ink_color=颜色
+editor_ink_thickness=粗细
+editor_ink_opacity=不透明度
+
+# Editor aria
+editor_free_text2_aria_label=文本编辑器
+editor_ink2_aria_label=绘图编辑器
+editor_ink_canvas_aria_label=用户创建图像

BIN
src/assets/images/noRole.png


+ 163 - 0
src/components/PDFViewer.vue

@@ -0,0 +1,163 @@
+<template>
+    <!-- viewer.properties: 该文件已放置本地,使用相对路径引入,亦可放置cdn上,使用网络路径引入 -->
+    <link
+      rel="resource"
+      type="application/l10n"
+      href="/src/assets/files/viewer.properties"
+    />
+    <VuePdfApp
+      :page-scale="pageScale"
+      :theme="theme"
+      :style="`width: ${viewerWidth}; height: ${viewerHeight};`"
+      :pdf="src"
+      :fileName="fileName"
+      @pages-rendered="pagesRendered"
+      v-bind="$attrs"
+    ></VuePdfApp>
+  </template>
+  <script setup>
+  import { computed } from "vue";
+  import VuePdfApp from "vue3-pdf-app";
+  import "vue3-pdf-app/dist/icons/main.css";
+  // interface Props {
+  //   src: '', // pdf地址
+  //   width:'', // 预览容器宽度
+  //   height:'', // 预览容器高度
+  //   pageScale:'', // 页面默认缩放规则,可选 'page-actual'|'page-width'|'page-height'|'page-fit'|'auto'
+  //   theme:'', // 预览主题 可选 dark | light
+  //   fileName:'' // 覆盖pdf文件名
+  // }
+  const props = defineProps({
+    src: "",
+    width: "100%",
+    height: "100vh",
+    pageScale: "page-fit", // 默认自适应展示一页
+    theme: "dark",
+    fileName: "",
+  });
+  const viewerWidth = computed(() => {
+    if (typeof props.width === "number") {
+      return props.width + "px";
+    } else {
+      return props.width;
+    }
+  });
+  const viewerHeight = computed(() => {
+    if (typeof props.height === "number") {
+      return props.height + "px";
+    } else {
+      return props.height;
+    }
+  });
+  // emitted only once when Pdfjs library is binded to vue component
+  // Can be used to set Pdfjs config before pdf document opening.
+  // function afterCreated (pdfApp: any) {
+  //   console.log('afterCreated pdfApp:', pdfApp)
+  // }
+  // emitted when pdf is opened but pages are not rendered
+  // function openHandler (pdfApp: any) {
+  //   console.log('open pdfApp:', pdfApp)
+  // }
+  const emit = defineEmits(["loaded"]);
+  // emitted when pdf document pages are rendered. Can be used to set default pages scale
+  function pagesRendered(pdfApp) {
+    // console.log("pagesRendered pdfApp:", pdfApp);
+    emit("loaded", pdfApp);
+  }
+  </script>
+  <style lang="scss" scoped>
+  @themeColor: #1677ff;
+  :deep(*) {
+    box-sizing: content-box;
+  }
+  // 定制化主题色
+  .pdf-app.dark {
+    --pdf-app-background-color: rgb(83, 86, 89);
+    --pdf-sidebar-content-color: rgb(51, 54, 57);
+    --pdf-toolbar-sidebar-color: #24364e;
+    --pdf-toolbar-color: rgb(50, 54, 57);
+    --pdf-loading-bar-color: #606c88;
+    --pdf-loading-bar-secondary-color: @themeColor;
+    --pdf-find-results-count-color: #d9d9d9;
+    --pdf-find-results-count-font-color: #525252;
+    --pdf-find-message-font-color: #a6b7d0;
+    --pdf-not-found-color: #f66;
+    --pdf-split-toolbar-button-separator-color: #fff;
+    --pdf-toolbar-font-color: #d9d9d9;
+    --pdf-button-hover-font-color: @themeColor;
+    --pdf-button-toggled-color: #606c88;
+    --pdf-horizontal-toolbar-separator-color: #fff;
+    --pdf-input-color: #606c88;
+    --pdf-input-font-color: #d9d9d9;
+    --pdf-find-input-placeholder-font-color: @themeColor;
+    --pdf-thumbnail-selection-ring-color: hsla(0, 0%, 100%, 0.15);
+    --pdf-thumbnail-selection-ring-selected-color: rgb(147, 179, 242);
+    --pdf-error-wrapper-color: #f55;
+    --pdf-error-more-info-color: #d9d9d9;
+    --pdf-error-more-info-font-color: #000;
+    --pdf-overlay-container-color: rgba(0, 0, 0, 0.2);
+    --pdf-overlay-container-dialog-color: #24364e;
+    --pdf-overlay-container-dialog-font-color: #d9d9d9;
+    --pdf-overlay-container-dialog-separator-color: #fff;
+    --pdf-dialog-button-font-color: #d9d9d9;
+    --pdf-dialog-button-color: #606c88;
+    :deep(.thumbnail.selected > .thumbnailSelectionRing) {
+      background-color: rgb(147, 179, 242);
+    }
+  }
+  /* for light theme */
+  .pdf-app.light {
+    --pdf-app-background-color: rgb(245, 245, 245);
+    --pdf-sidebar-content-color: rgb(245, 245, 245);
+    --pdf-toolbar-sidebar-color: rgb(190, 190, 190);
+    --pdf-toolbar-color: rgb(225, 225, 225);
+    --pdf-loading-bar-color: #3f4b5b;
+    --pdf-loading-bar-secondary-color: #666;
+    --pdf-find-results-count-color: #3f4b5b;
+    --pdf-find-results-count-font-color: hsla(0, 0%, 100%, 0.87);
+    --pdf-find-message-font-color: hsla(0, 0%, 100%, 0.87);
+    --pdf-not-found-color: brown;
+    --pdf-split-toolbar-button-separator-color: #000;
+    --pdf-toolbar-font-color: rgb(142, 142, 142);
+    --pdf-button-hover-font-color: #666;
+    --pdf-button-toggled-color: #3f4b5b;
+    --pdf-horizontal-toolbar-separator-color: #000;
+    --pdf-input-color: #3f4b5b;
+    --pdf-input-font-color: #d9d9d9;
+    --pdf-find-input-placeholder-font-color: #666;
+    --pdf-thumbnail-selection-ring-color: hsla(208, 7%, 46%, 0.7);
+    --pdf-thumbnail-selection-ring-selected-color: #3f4b5b;
+    --pdf-error-wrapper-color: #f55;
+    --pdf-error-more-info-color: #d9d9d9;
+    --pdf-error-more-info-font-color: #000;
+    --pdf-overlay-container-color: hsla(208, 7%, 46%, 0.7);
+    --pdf-overlay-container-dialog-color: #6c757d;
+    --pdf-overlay-container-dialog-font-color: #d9d9d9;
+    --pdf-overlay-container-dialog-separator-color: #000;
+    --pdf-dialog-button-font-color: #d9d9d9;
+    --pdf-dialog-button-color: #3f4b5b;
+    :deep(.thumbnail.selected > .thumbnailSelectionRing) {
+      background-color: rgb(105, 105, 105);
+    }
+  }
+  #vuePdfApp {
+    :deep(#mainContainer) {
+      #toolbarViewer {
+        #toolbarViewerRight {
+          // border: 1px solid red;
+          #openFile{
+            display: none;
+          }
+          #print{
+            display: none;
+          }
+          #viewBookmark{
+            display: none;
+          }
+          
+        }
+      }
+    }
+  }
+  </style>
+  

+ 25 - 0
src/components/wordViewer.vue

@@ -0,0 +1,25 @@
+<script setup>
+import VueOfficeDocx from "@vue-office/docx";
+import "@vue-office/docx/lib/index.css";
+import { ref } from "vue";
+// 也可以直接是在线地址
+// let docxSrc = ref("https://github.com/vue-office/vue-office/raw/main/examples/public/test.docx");
+let docxSrc = ref("");
+let handleChange = (e) => {
+  let files = e.target.files[0];
+  let reader = new FileReader();
+  reader.readAsArrayBuffer(files);
+  reader.onload = function () {
+    docxSrc.value = reader.result;
+  };
+};
+</script>
+ 
+<template>
+  <div>
+    <input type="file" @change="handleChange" />
+    <VueOfficeDocx :src="docxSrc" />
+  </div>
+</template>
+ 
+<style scoped></style>

+ 14 - 0
src/layout/index.vue

@@ -102,6 +102,15 @@ onBeforeMount(async () => {
     }
     }
   }
   }
 }
 }
+.el-dialog {
+  padding: 0;
+}
+.el-dialog__header{
+  padding: 0 0 0 20px;
+  height: 48px !important;
+  display: flex;
+  align-items: center;
+}
 
 
 .el-dialog__body {
 .el-dialog__body {
   .el-input {
   .el-input {
@@ -162,4 +171,9 @@ onBeforeMount(async () => {
   height: 0;
   height: 0;
   width: 0;
   width: 0;
 }
 }
+
+.el-button{
+  // border: none  !important;
+  outline: none !important;
+}
 </style>
 </style>

+ 13 - 28
src/layout/sidebar/Navbar.vue

@@ -37,7 +37,7 @@
         />
         />
       </el-badge> -->
       </el-badge> -->
 
 
-      <div class="flex flex-wrap items-center" style="cursor: pointer">
+      <!-- <div class="flex flex-wrap items-center" style="cursor: pointer">
         <el-dropdown :hide-on-click="false" trigger="click">
         <el-dropdown :hide-on-click="false" trigger="click">
           <el-avatar :size="20">
           <el-avatar :size="20">
             <el-icon :size="20" color=""><QuestionFilled /></el-icon>
             <el-icon :size="20" color=""><QuestionFilled /></el-icon>
@@ -125,14 +125,6 @@
                     >
                     >
                   </el-form-item>
                   </el-form-item>
                 </el-form>
                 </el-form>
-                <!-- <template #footer>
-                  <span class="dialog-footer">
-                    <el-button @click="dialogVisible = false">取消</el-button>
-                    <el-button type="primary" @click="dialogVisible = false">
-                      确定
-                    </el-button>
-                  </span>
-                </template> -->
               </el-dialog>
               </el-dialog>
 
 
               <el-dialog
               <el-dialog
@@ -220,8 +212,9 @@
             </el-dropdown-menu>
             </el-dropdown-menu>
           </template>
           </template>
         </el-dropdown>
         </el-dropdown>
-      </div>
-      <div class="flex flex-wrap items-center" style="cursor: pointer">
+      </div> -->
+      
+      <!-- <div class="flex flex-wrap items-center" style="cursor: pointer">
         <el-dropdown :hide-on-click="false" trigger="click">
         <el-dropdown :hide-on-click="false" trigger="click">
           <el-avatar :size="30">
           <el-avatar :size="30">
             <img
             <img
@@ -296,14 +289,6 @@
                     >
                     >
                   </el-form-item>
                   </el-form-item>
                 </el-form>
                 </el-form>
-                <!-- <template #footer>
-                  <span class="dialog-footer">
-                    <el-button @click="dialogVisible = false">取消</el-button>
-                    <el-button type="primary" @click="dialogVisible = false">
-                      确定
-                    </el-button>
-                  </span>
-                </template> -->
               </el-dialog>
               </el-dialog>
               <el-dropdown-item @click="loginOut">
               <el-dropdown-item @click="loginOut">
                 <el-icon class="switchButton" :size="20" color="#000">
                 <el-icon class="switchButton" :size="20" color="#000">
@@ -314,8 +299,8 @@
             </el-dropdown-menu>
             </el-dropdown-menu>
           </template>
           </template>
         </el-dropdown>
         </el-dropdown>
-      </div>
-      <span class="name">{{ username }}</span>
+      </div> -->
+      <!-- <span class="name">{{ username }}</span> -->
     </div>
     </div>
   </el-menu>
   </el-menu>
 </template>
 </template>
@@ -453,7 +438,7 @@ const submitForm = async (formEl) => {
         method: "post",
         method: "post",
         url: api.value + "/login/ChangePassword",
         url: api.value + "/login/ChangePassword",
         headers: {
         headers: {
-          token: sessionStorage.getItem("token"),
+          tokenP: sessionStorage.getItem("tokenP"),
           user_head: sessionStorage.getItem("userhead"),
           user_head: sessionStorage.getItem("userhead"),
         },
         },
         data: data,
         data: data,
@@ -465,9 +450,9 @@ const submitForm = async (formEl) => {
           message: resUpdata.data.message,
           message: resUpdata.data.message,
           center: true,
           center: true,
         });
         });
-        sessionStorage.removeItem("token");
+        sessionStorage.removeItem("tokenP");
         sessionStorage.removeItem("userName");
         sessionStorage.removeItem("userName");
-        sessionStorage.removeItem("token");
+        sessionStorage.removeItem("tokenP");
         sessionStorage.removeItem("roleId");
         sessionStorage.removeItem("roleId");
         sessionStorage.removeItem("userhead");
         sessionStorage.removeItem("userhead");
         sessionStorage.removeItem("provinceId");
         sessionStorage.removeItem("provinceId");
@@ -515,7 +500,7 @@ const operateClick = async () => {
     method: "get",
     method: "get",
     url: api.value + "/login/operatingInstructions",
     url: api.value + "/login/operatingInstructions",
     headers: {
     headers: {
-      token: sessionStorage.getItem("token"),
+      tokenP: sessionStorage.getItem("tokenP"),
       user_head: sessionStorage.getItem("userhead"),
       user_head: sessionStorage.getItem("userhead"),
     },
     },
   });
   });
@@ -579,9 +564,9 @@ const loginOut = () => {
     type: "warning",
     type: "warning",
   })
   })
     .then(() => {
     .then(() => {
-      sessionStorage.removeItem("token");
+      sessionStorage.removeItem("tokenP");
       sessionStorage.removeItem("userName");
       sessionStorage.removeItem("userName");
-      sessionStorage.removeItem("token");
+      sessionStorage.removeItem("tokenP");
       sessionStorage.removeItem("roleId");
       sessionStorage.removeItem("roleId");
       sessionStorage.removeItem("userhead");
       sessionStorage.removeItem("userhead");
       sessionStorage.removeItem("provinceId");
       sessionStorage.removeItem("provinceId");
@@ -649,7 +634,7 @@ onMounted(() => {
     top: 17px;
     top: 17px;
 
 
     .dateTime {
     .dateTime {
-      margin-right: 0px;
+      margin-right: 20px;
     }
     }
     .el-badge {
     .el-badge {
       display: flex;
       display: flex;

+ 5 - 5
src/layout/sidebar/NavbarBG.vue

@@ -255,7 +255,7 @@ const submitForm = async (formEl) => {
         method: "post",
         method: "post",
         url: api.value + "/login/ChangePassword",
         url: api.value + "/login/ChangePassword",
         headers: {
         headers: {
-          token: sessionStorage.getItem("token"),
+          tokenP: sessionStorage.getItem("tokenP"),
           user_head: sessionStorage.getItem("userhead"),
           user_head: sessionStorage.getItem("userhead"),
         },
         },
         data: data,
         data: data,
@@ -267,9 +267,9 @@ const submitForm = async (formEl) => {
           message: resUpdata.data.message,
           message: resUpdata.data.message,
           center: true,
           center: true,
         });
         });
-        sessionStorage.removeItem("token");
+        sessionStorage.removeItem("tokenP");
         sessionStorage.removeItem("userName");
         sessionStorage.removeItem("userName");
-        sessionStorage.removeItem("token");
+        sessionStorage.removeItem("tokenP");
         sessionStorage.removeItem("roleId");
         sessionStorage.removeItem("roleId");
         sessionStorage.removeItem("userhead");
         sessionStorage.removeItem("userhead");
         sessionStorage.removeItem("provinceId");
         sessionStorage.removeItem("provinceId");
@@ -317,9 +317,9 @@ const loginOut = () => {
     type: "warning",
     type: "warning",
   })
   })
     .then(() => {
     .then(() => {
-      sessionStorage.removeItem("token");
+      sessionStorage.removeItem("tokenP");
       sessionStorage.removeItem("userName");
       sessionStorage.removeItem("userName");
-      sessionStorage.removeItem("token");
+      sessionStorage.removeItem("tokenP");
       sessionStorage.removeItem("roleId");
       sessionStorage.removeItem("roleId");
       sessionStorage.removeItem("userhead");
       sessionStorage.removeItem("userhead");
       sessionStorage.removeItem("provinceId");
       sessionStorage.removeItem("provinceId");

+ 26 - 3
src/main.js

@@ -9,9 +9,13 @@ import App from "./App.vue";
 import router from "@/router";
 import router from "@/router";
 import store from "@/store";
 import store from "@/store";
 
 
-import SvgIcon from '@/components/SvgIcon.vue'
+import SvgIcon from "@/components/SvgIcon.vue";
 //引入注册脚本
 //引入注册脚本
-import 'virtual:svg-icons-register';
+import "virtual:svg-icons-register";
+
+// 预览图片插件
+import Viewer from "v-viewer";
+import "viewerjs/dist/viewer.css";
 
 
 const app = createApp(App);
 const app = createApp(App);
 for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
 for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
@@ -25,7 +29,26 @@ app.use(router);
 app.use(store);
 app.use(store);
 
 
 // 注册全局SvgIcon组件
 // 注册全局SvgIcon组件
-app.component('SvgIcon',SvgIcon)
+app.component("SvgIcon", SvgIcon);
+
+app.use(Viewer, {
+  Options: {
+    inline: true,
+    button: true, //右上角按钮
+    navbar: true, //底部缩略图
+    title: true, //当前图片标题
+    toolbar: true, //底部工具栏
+    tooltip: true, //显示缩放百分比
+    movable: true, //是否可以移动
+    zoomable: true, //是否可以缩放
+    rotatable: true, //是否可旋转
+    scalable: true, //是否可翻转
+    transition: true, //使用 CSS3 过度
+    fullscreen: true, //播放时是否全屏
+    keyboard: true, //是否支持键盘
+    url: "data-source",
+  },
+});
 
 
 app.mount("#app");
 app.mount("#app");
 app.config.devtools = true;
 app.config.devtools = true;

+ 14 - 1
src/router/index.js

@@ -40,6 +40,12 @@ const routes = [
         meta: { title: "角色管理", icon: "role" },
         meta: { title: "角色管理", icon: "role" },
       },
       },
       {
       {
+        path: "menu",
+        name: "menu",
+        component: () => import("@/views/menu/menu.vue"),
+        meta: { title: "菜单管理", icon: "menu" },
+      },
+      {
         path: "user",
         path: "user",
         name: "user",
         name: "user",
         component: () => import("@/views/user/user.vue"),
         component: () => import("@/views/user/user.vue"),
@@ -51,8 +57,15 @@ const routes = [
         component: () => import("@/views/system/system.vue"),
         component: () => import("@/views/system/system.vue"),
         meta: { title: "系统管理", icon: "system" },
         meta: { title: "系统管理", icon: "system" },
       },
       },
+     
     ],
     ],
   },
   },
+  {
+    path: "/process/error",
+    name: "error",
+    component: () => import("@/views/error/error.vue"),
+    meta: { title: "无权限页面", icon: "error" },
+  },
 ];
 ];
 
 
 const router = createRouter({
 const router = createRouter({
@@ -61,7 +74,7 @@ const router = createRouter({
 });
 });
 export default router;
 export default router;
 router.beforeEach(async (to, from, next) => {
 router.beforeEach(async (to, from, next) => {
-  const token = sessionStorage.getItem("token");
+  const token = sessionStorage.setItem("tokenP",'VEdULTMxNTkyMy0xY08yOVRRRVlmYWN5b3dNSmt0RXM3a1l1UGNlSDdlckNRZGp5aERubmhVd2hFWHdKYi16ZnNvZnQuY29tIzEz');
   const userhead = sessionStorage.getItem("userhead");
   const userhead = sessionStorage.getItem("userhead");
   let hasRoutes = store.state.user.hasRoutes;
   let hasRoutes = store.state.user.hasRoutes;
   next()
   next()

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

@@ -8,7 +8,7 @@ const state = {
   activeIndex: "", // 记录当前路由
   activeIndex: "", // 记录当前路由
   username: "",
   username: "",
   password: "",
   password: "",
-  api: "/jgcloudApi/jgcloud/api", // 线上
+  api: "/kpi/template", // 线上
   // api: "/jgcloudApi/jgcloud/api", // 测试
   // api: "/jgcloudApi/jgcloud/api", // 测试
   roleList: [
   roleList: [
     {
     {
@@ -30,6 +30,12 @@ const state = {
       meta: { title: "角色管理", icon: "role" },
       meta: { title: "角色管理", icon: "role" },
     },
     },
     {
     {
+      path: "menu",
+      name: "menu",
+      component: () => import("@/views/menu/menu.vue"),
+      meta: { title: "菜单管理", icon: "menu" },
+    },
+    {
       path: "user",
       path: "user",
       name: "user",
       name: "user",
       component: () => import("@/views/user/user.vue"),
       component: () => import("@/views/user/user.vue"),

+ 120 - 0
src/views/error/error.vue

@@ -0,0 +1,120 @@
+<template>
+  <div class="content-box">
+    <div class="noRole">
+        <span>无权限访问</span>
+      <img src="../../assets/images/noRole.png" alt="" />
+    </div>
+  </div>
+</template>
+
+<script setup>
+import {
+  ref,
+  reactive,
+  nextTick,
+  onMounted,
+  watch,
+  onBeforeMount,
+  onUnmounted,
+} from "vue";
+import COS from "cos-js-sdk-v5";
+import { useRouter } from "vue-router";
+import { genFileId, ElMessage, ElMessageBox } from "element-plus";
+import { Calendar } from "@element-plus/icons-vue";
+import { dayjs } from "element-plus";
+import lodash, { reduce } from "lodash";
+import axios from "axios";
+import { useStore } from "vuex";
+
+const store = useStore();
+const router = useRouter();
+
+const tableData = reactive({
+  list: [{}],
+});
+
+const searchInput = reactive({
+  name: "", // 项目名称
+  createTime: "", // 创建时间
+}); // 搜索按钮数据
+
+const currentPage = ref(1); // 当前页
+const pageSize = ref(10);
+const total = ref(40); // 当前总数
+const selectData = reactive({
+  list: [],
+}); // 多选框选择的数据
+const api = ref("");
+
+// 获取账户列表
+const getList = async () => {
+  loading.value = true;
+  let data = {
+    currentPage: currentPage.value, // 当前页
+    pageCount: pageSize.value, // 一页数据条数
+    projectName: searchInput.name,
+    pageType: 1,
+    permitNum: searchInput.LicenseCode, // 施工许可证编码
+    projectUnit: searchInput.unit, // 建设单位
+    projectPurpose: searchInput.purpose, // 项目用途
+    structureType: searchInput.structureType, // 结构类型
+    projectType: searchInput.projectType, // 项目类型
+  };
+
+  if (searchInput.createTime) {
+    data.startDate = searchInput.createTime[0];
+    data.endDate = searchInput.createTime[1];
+  }
+  let res = await axios({
+    method: "get",
+    url: api.value + "/jgcloudProject/queryPageJgcloudProject",
+    headers: {
+      tokenP: sessionStorage.getItem("tokenP"),
+      user_head: sessionStorage.getItem("userhead"),
+    },
+    params: data,
+  });
+  console.log(res, "项目分页数据");
+  if (res.data.code == 200) {
+    tableData.list = res.data.data.list;
+    total.value = res.data.data.totalCount;
+    loading.value = false;
+  } else {
+    loading.value = false;
+    ElMessage({
+      type: "error",
+      showClose: true,
+      message: res.data.message,
+      center: true,
+    });
+  }
+};
+
+onBeforeMount(() => {
+  api.value = store.state.user.api;
+});
+onUnmounted(() => {
+  // document.removeEventListener("keyup", Enters);
+});
+</script>
+
+<style scoped lang="scss">
+.content-box {
+  width: calc(100vw);
+  height: calc(100vh);
+  background-color: #fff;
+  .noRole {
+    width: 100%;
+    height: 100%;
+    display: flex;
+    flex-direction: column;
+    align-items: center;
+    justify-content: center;
+  }
+  span{
+    font-size: 28px;
+    font-weight: 800;
+    color: rgb(191, 212, 250);
+  }
+}
+</style>

+ 3 - 3
src/views/home/home.vue

@@ -1622,7 +1622,7 @@ const getList = async () => {
     method: "get",
     method: "get",
     url: api.value + "/jgcloudProject/queryPageJgcloudProject",
     url: api.value + "/jgcloudProject/queryPageJgcloudProject",
     headers: {
     headers: {
-      token: sessionStorage.getItem("token"),
+      tokenP: sessionStorage.getItem("tokenP"),
       user_head: sessionStorage.getItem("userhead"),
       user_head: sessionStorage.getItem("userhead"),
     },
     },
     params: data,
     params: data,
@@ -1698,7 +1698,7 @@ const confirmProject = (formEl) => {
       //     method: "post",
       //     method: "post",
       //     url: api.value + "/jgcloudAccount/updateJgcloudAccount",
       //     url: api.value + "/jgcloudAccount/updateJgcloudAccount",
       //     headers: {
       //     headers: {
-      //       token: sessionStorage.getItem("token"),
+      //       tokenP: sessionStorage.getItem("tokenP"),
       //       user_head: sessionStorage.getItem("userhead"),
       //       user_head: sessionStorage.getItem("userhead"),
       //     },
       //     },
       //     data: data,
       //     data: data,
@@ -1708,7 +1708,7 @@ const confirmProject = (formEl) => {
       //     method: "post",
       //     method: "post",
       //     url: api.value + "/jgcloudAccount/insertJgcloudAccount",
       //     url: api.value + "/jgcloudAccount/insertJgcloudAccount",
       //     headers: {
       //     headers: {
-      //       token: sessionStorage.getItem("token"),
+      //       tokenP: sessionStorage.getItem("tokenP"),
       //       user_head: sessionStorage.getItem("userhead"),
       //       user_head: sessionStorage.getItem("userhead"),
       //     },
       //     },
       //     data: data,
       //     data: data,

+ 1 - 1
src/views/login/index.vue

@@ -156,7 +156,7 @@ const getList = async () => {
     method: "get",
     method: "get",
     url: api.value + "/jgcloudFile/queryHomePageJgcloudFiles",
     url: api.value + "/jgcloudFile/queryHomePageJgcloudFiles",
     headers: {
     headers: {
-      token: sessionStorage.getItem("token"),
+      tokenP: sessionStorage.getItem("tokenP"),
       user_head: sessionStorage.getItem("userhead"),
       user_head: sessionStorage.getItem("userhead"),
     },
     },
     params: data,
     params: data,

+ 833 - 0
src/views/menu/menu.vue

@@ -0,0 +1,833 @@
+<template>
+  <div class="content-box">
+    <div class="left">
+      <!-- <el-icon :size="23" class="camera"><VideoCameraFilled /></el-icon> -->
+      <span class="cameratxt">菜单管理</span>
+    </div>
+    <div class="middle">
+      <div class="filter">
+        <div class="condition">
+          <span>姓名 </span>
+          <el-input
+            clearable
+            v-model="searchInput.name"
+            @clear="searchBtn"
+            class="w-50 m-2"
+            placeholder="请输入姓名"
+            style="width: 250px"
+          />
+        </div>
+        <div class="condition">
+          <span>角色 </span>
+          <el-input
+            clearable
+            v-model="searchInput.role"
+            @clear="searchBtn"
+            class="w-50 m-2"
+            placeholder="请输入角色"
+            style="width: 250px"
+          />
+        </div>
+        <div class="condition">
+          <span>创建时间 </span>
+          <el-date-picker
+            v-model="searchInput.createTime"
+            type="daterange"
+            unlink-panels
+            range-separator="-"
+            start-placeholder="起始时间"
+            end-placeholder="截止时间"
+            format="YYYY-MM-DD"
+            value-format="YYYY-MM-DD"
+            :prefix-icon="Calendar"
+            placeholder="请选择日期"
+            style="width: 280px"
+            @change="searchBtn"
+          />
+        </div>
+        <div class="condition">
+          <span>部门 </span>
+          <el-select
+            v-model="searchInput.department"
+            placeholder="请选择部门"
+            style="width: 220px"
+            clearable
+            @clear="searchBtn"
+          >
+            <el-option
+              v-for="item in departmentData"
+              :key="item.value"
+              :label="item.oname"
+              :value="item.id"
+            />
+          </el-select>
+        </div>
+        <el-button
+          style="margin-left: 20px"
+          type="primary"
+          class="search"
+          @click="searchBtn"
+          >查询</el-button
+        >
+      </div>
+      <!-- 按钮列表 -->
+      <div class="gongneng">
+        <el-button @click="addProjectbtn(1)" class="add"
+          ><el-icon> <CirclePlus /> </el-icon><span>添加菜单</span></el-button
+        >
+        <el-button @click="projectImportBtn" class="imp"
+          ><span>更新</span></el-button
+        >
+        <!-- <el-button @click="projectExportBtn" class="add"
+          ><el-icon><Download /></el-icon><span>项目导出</span></el-button
+        > -->
+      </div>
+    </div>
+    <div class="scroll">
+      <div class="footer" v-loading="loading">
+        <el-table
+          border 
+          :data="tableData.list"
+          :header-cell-style="{
+            background: 'rgba(240, 243, 247, 1)',
+            height: '45px',
+            border: 0,
+          }"
+          row-key="id"
+          :tree-props="{ children: 'menuLists', hasChildren: 'hasChildren' }"
+        >
+          <el-table-column prop="menuName" label="名称" />
+          <el-table-column prop="sort" label="排序号" />
+          <el-table-column prop="url" label="菜单URL" />
+          <el-table-column align="center" label="操作" width="220">
+            <template #default="scope">
+              <div class="options">
+                <div class="reset" v-if="scope.row.pid==0" @click="addProjectbtn(2,scope.row)">添加</div>
+                <div class="look" @click="edit(scope.row)">编辑</div>
+                <el-popconfirm
+                  width="220"
+                  confirm-button-text="确认"
+                  cancel-button-text="取消"
+                  :icon="InfoFilled"
+                  icon-color="#f89626"
+                  title="是否删除此数据?"
+                  @confirm="del(scope.row)"
+                  @cancel="cancelEvent"
+                >
+                  <template #reference>
+                    <div class="del">删除</div>
+                  </template>
+                </el-popconfirm>
+              </div>
+            </template>
+          </el-table-column>
+        </el-table>
+
+        <!-- 新增账号 -->
+        <el-dialog
+          class="account"
+          v-model="accountVisible"
+          :close-on-click-modal="false"
+          :close-on-press-escape="false"
+          :title="accountTitle"
+          align-center
+          width="600"
+          :before-close="cancelAccount"
+        >
+          <el-form
+            ref="accountRef"
+            :model="accountRuleForm"
+            :rules="accountRules"
+            class="demo-ruleForm"
+            label-width="80px"
+            :size="formSize"
+            label-position="right"
+            status-icon
+          >
+            <el-form-item label="菜单名称" prop="menuName">
+              <el-input
+                v-model="accountRuleForm.menuName"
+                placeholder="请输入菜单名称"
+                clearable
+                style="width: 220px"
+              />
+            </el-form-item>
+            <el-form-item label="菜单链接" prop="url">
+              <el-input
+                v-model="accountRuleForm.url"
+                placeholder="请输入菜单链接"
+                clearable
+                style="width: 220px"
+              />
+            </el-form-item>
+            <el-form-item label="排序" prop="sort">
+              <el-input
+                v-model="accountRuleForm.sort"
+                placeholder="请输入排序"
+                clearable
+                style="width: 220px"
+              />
+            </el-form-item>
+            <el-form-item class="options">
+              <el-button
+                class="queding"
+                type="primary"
+                @click="confirmAccount(accountRef)"
+              >
+                &nbsp;&nbsp;确认&nbsp;&nbsp;
+              </el-button>
+              <el-button class="quxiao" @click="cancelAccount"
+                >&nbsp;&nbsp;取消&nbsp;&nbsp;</el-button
+              >
+            </el-form-item>
+          </el-form>
+        </el-dialog>
+
+        <!-- 项目导入 -->
+        <el-dialog
+          class="projectImport"
+          v-model="projectImportVisible"
+          :close-on-click-modal="false"
+          :close-on-press-escape="false"
+          title="项目导入"
+          align-center
+          width="600"
+          :before-close="cancelProjectImport"
+        >
+          <p class="title">当前只支持项目类型为“非装配式建筑项目”的项目导入</p>
+          <p class="down">
+            <span>非装配式建筑项目导入模板</span
+            ><span @click="templateDown">模板下载</span>
+          </p>
+          <el-upload
+            class="avatar-uploader"
+            action="#"
+            :auto-upload="false"
+            :on-remove="projectImportRemove"
+            :on-change="projectImportChange"
+            :before-upload="beforeAvatarProImport"
+            ref="projectRef"
+            :limit="1"
+            :on-exceed="projectImportExceed"
+          >
+            <template #trigger>
+              <el-button class="queding" type="primary">
+                &nbsp;&nbsp;导入项目&nbsp;&nbsp;
+              </el-button>
+            </template>
+          </el-upload>
+          <div class="options">
+            <el-button
+              color="rgba(9, 101, 98, 1)"
+              class="queding"
+              type="primary"
+              @click="projectImportConfirm(projectRef)"
+            >
+              &nbsp;&nbsp;确认导入&nbsp;&nbsp;
+            </el-button>
+            <el-button @click="cancelProjectImport"
+              >&nbsp;&nbsp;取消导入&nbsp;&nbsp;</el-button
+            >
+          </div>
+        </el-dialog>
+      </div>
+
+      <!-- 分页组件 -->
+      <!-- <el-pagination
+        background
+        v-model:current-page="currentPage"
+        v-model:page-size="pageSize"
+        :page-sizes="[10, 20, 30, 40]"
+        layout="total,sizes, prev, pager, next, jumper, slot"
+        :total="total"
+        @size-change="handleSizeChange"
+        @current-change="handleCurrentChange"
+      /> -->
+    </div>
+  </div>
+</template>
+
+<script setup>
+import {
+  ref,
+  reactive,
+  nextTick,
+  onMounted,
+  watch,
+  onBeforeMount,
+  onUnmounted,
+} from "vue";
+import COS from "cos-js-sdk-v5";
+import { useRouter } from "vue-router";
+import { genFileId, ElMessage, ElMessageBox } from "element-plus";
+import { Calendar } from "@element-plus/icons-vue";
+import { dayjs } from "element-plus";
+import lodash, { reduce } from "lodash";
+import axios from "axios";
+import { useStore } from "vuex";
+
+const store = useStore();
+const router = useRouter();
+
+const loading = ref(false);
+const tableData = reactive({
+  list: [{}],
+});
+
+const searchInput = reactive({
+  name: "", // 名称
+  role: "", // 角色
+  department: "", // 部门
+  createTime: "", // 创建时间
+}); // 搜索按钮数据
+const departmentData = ref(); // 部门数据
+
+const currentPage = ref(1); // 当前页
+const pageSize = ref(10);
+const total = ref(40); // 当前总数
+const selectData = reactive({
+  list: [],
+}); // 多选框选择的数据
+const api = ref("");
+
+// 新增账号 (--------------------------------------------------------)
+const accountVisible = ref(false);
+const accountTitle = ref();
+const accountRef = ref();
+
+const accountRuleForm = reactive({
+  menuName: "", 
+  url: "",
+  sort: "",
+  pid:'',
+  id: "",
+});
+// 新增账号表单验证
+const accountRules = reactive({
+  menuName: [{ required: true, message: "菜单名称不能为空", trigger: "blur" }],
+  url: [{ required: true, message: "菜单链接不能为空", trigger: "blur" }],
+  sort: [
+    { required: true, message: "排序不能为空", trigger: "blur" },
+  ],
+});
+
+// 项目导入
+const projectImportVisible = ref(false);
+const projectRef = ref();
+const projectFile = ref();
+
+// 获取账户列表
+const getList = async () => {
+  let res = await axios({
+    method: "post",
+    url: api.value + "/api/sysMenu/QueryMenuTreeRecords",
+    headers: {
+      tokenP: sessionStorage.getItem("tokenP"),
+      user_head: sessionStorage.getItem("userhead"),
+    },
+  });
+  console.log(res, "查看菜单");
+  if (res.data.code == 200) {
+    tableData.list = res.data.data;
+  } else {
+    ElMessage({
+      type: "error",
+      showClose: true,
+      message: res.data.message,
+      center: true,
+    });
+  }
+};
+// 部门数据
+const departmentList = async () => {
+  let res = await axios({
+    method: "post",
+    url: api.value + "/api/Organize/query",
+    headers: {
+      tokenP: sessionStorage.getItem("tokenP"),
+      user_head: sessionStorage.getItem("userhead"),
+    },
+  });
+  console.log(res, "部门数据");
+  if (res.data.code == 200) {
+    departmentData.value = res.data.data;
+  } else {
+    ElMessage({
+      type: "error",
+      showClose: true,
+      message: res.data.message,
+      center: true,
+    });
+  }
+};
+
+// 搜索功能
+const searchBtn = lodash.debounce(async () => {
+  getList();
+}, 300);
+
+// 角色新增
+const addProjectbtn = (ind,row) => {
+  console.log(ind,row);
+  
+  accountVisible.value = true;
+  accountTitle.value = "菜单新增";
+  accountRuleForm.menuName = "";
+  accountRuleForm.url = "";
+  accountRuleForm.sort = "";
+  if(ind==1){
+    accountRuleForm.pid = 0
+  }else if(ind==2){
+    accountRuleForm.pid = row.id
+  }
+  accountRuleForm.id = "";
+};
+// 取消角色新增
+const cancelAccount = () => {
+  accountRef.value.resetFields();
+  accountVisible.value = false;
+  accountRuleForm.menuName = "";
+  accountRuleForm.url = "";
+  accountRuleForm.sort = "";
+  accountRuleForm.pid = ""
+  accountRuleForm.id = "";
+};
+// 确定新建项目
+const confirmAccount = (formEl) => {
+  if (!formEl) return;
+  formEl.validate(async (valid, fields) => {
+    if (valid) {
+      // 判断是否有id存在,有则是修改账号
+      let data = {
+        pid:accountRuleForm.pid,
+        menuName: accountRuleForm.menuName,
+        url:accountRuleForm.url,
+        sort: accountRuleForm.sort,
+      };
+      let res=""
+      if (accountRuleForm.id) {
+        data.id = accountRuleForm.id;
+        res = await axios({
+          method: "post",
+          url: api.value + "/api/sysMenu/update",
+          headers: {
+            tokenP: sessionStorage.getItem("tokenP"),
+            user_head: sessionStorage.getItem("userhead"),
+          },
+          data: data,
+        });
+      } else {
+        res = await axios({
+          method: "post",
+          url: api.value + "/api/sysMenu/add",
+          headers: {
+            tokenP: sessionStorage.getItem("tokenP"),
+            user_head: sessionStorage.getItem("userhead"),
+          },
+          data: data,
+        });
+      }
+      console.log(res, "新增菜单数据");
+      if (res.data.code == 200) {
+        accountVisible.value = false;
+        getList();
+        accountRef.value.resetFields();
+        ElMessage({
+          type: "success",
+          showClose: true,
+          message: res.data.message,
+          center: true,
+        });
+      } else {
+        ElMessage({
+          type: "error",
+          showClose: true,
+          message: res.data.message,
+          center: true,
+        });
+      }
+    }
+  });
+};
+//编辑项目
+const edit = (row) => {
+  accountVisible.value = true;
+  accountTitle.value = "编辑菜单";
+  accountRuleForm.menuName = row.menuName;
+  accountRuleForm.url = row.url;
+  accountRuleForm.sort = row.sort;
+  accountRuleForm.pid = row.pid;
+  accountRuleForm.id = row.id;
+  console.log(row);
+};
+const del = async (row) => {
+  let data = new FormData();
+  data.append("id", row.id);
+  let res = await axios({
+    method: "post",
+    url: api.value + "/api/sysMenu/del",
+    headers: {
+      tokenP: sessionStorage.getItem("tokenP"),
+      user_head: sessionStorage.getItem("userhead"),
+    },
+    data: data,
+  });
+  if (res.data.code == 200) {
+    getList();
+    ElMessage({
+      type: "success",
+      showClose: true,
+      message: res.data.message,
+      center: true,
+    });
+  } else {
+    ElMessage({
+      type: "error",
+      showClose: true,
+      message: res.data.message,
+      center: true,
+    });
+  }
+};
+
+// 多选框功能
+const handleSelectionChange = (val) => {
+  console.log(val);
+  selectData.list = val;
+};
+
+// 表格斑马纹颜色修改
+const tableRowClassName = ({ row, rowIndex }) => {
+  if (rowIndex % 2 === 0) {
+    return "even";
+  } else if (rowIndex % 2 !== 0) {
+    return "odd";
+  }
+  return "";
+};
+// 每页显示条数
+const handleSizeChange = (value) => {
+  console.log(value, "每页显示条数");
+  pageSize.value = value;
+  getList();
+};
+// 分页
+const handleCurrentChange = (value) => {
+  console.log(value, "分页");
+  currentPage.value = value;
+  getList();
+};
+
+onBeforeMount(() => {
+  api.value = store.state.user.api;
+  getList();
+  departmentList();
+});
+onUnmounted(() => {
+  // document.removeEventListener("keyup", Enters);
+});
+</script>
+
+<style scoped lang="scss">
+.content-box {
+  min-width: 1000px;
+  width: calc(100vw - 260px);
+  height: calc(100vh - 105px);
+  margin: 20px auto;
+  background-color: #fff;
+  color: #fff;
+  display: flex;
+  flex-direction: column;
+  box-shadow: 0px 3px 10px rgba(0, 97, 255, 0.2);
+
+  .left {
+    // width: calc(100wh - 40px);
+    display: flex;
+    align-items: center;
+    height: 60px;
+    margin: 0 30px;
+    border-bottom: 1px solid #ccc;
+    color: #000;
+    font-size: 18px;
+    font-weight: 600;
+
+    .cameratxt {
+      display: block;
+      height: 60px;
+      line-height: 60px;
+    }
+  }
+  .middle {
+    width: 96%;
+    margin: 0 auto;
+
+    color: #000;
+
+    // border-bottom: 1px solid rgb(231, 231, 231);
+    .filter {
+      display: flex;
+      flex-wrap: wrap;
+      align-items: center;
+      margin: 10px 0 0 0;
+
+      .search {
+        margin-left: 0 !important;
+        color: #fff;
+        background: linear-gradient(
+          90deg,
+          rgba(33, 107, 255, 1) 0%,
+          rgba(102, 182, 255, 1) 100%
+        );
+        border: none;
+      }
+
+      .reset {
+        border: 1px solid rgba(38, 151, 255, 1);
+        color: rgba(38, 151, 255, 1);
+      }
+
+      .condition {
+        display: flex;
+        align-items: center;
+        margin: 10px 30px 10px 0;
+
+        :deep(.el-input .el-input__inner) {
+          font-size: 14px;
+        }
+
+        span {
+          margin: 0 10px 0 0;
+        }
+      }
+    }
+
+    .gongneng {
+      margin: 10px 0;
+
+      .el-button {
+        color: #fff;
+        border: none;
+      }
+      .add {
+        background: linear-gradient(
+          90deg,
+          rgba(33, 107, 255, 1) 0%,
+          rgba(102, 182, 255, 1) 100%
+        );
+      }
+      .imp {
+        background: #fff;
+        border: 1px solid rgba(33, 107, 255, 1);
+        color: rgba(33, 107, 255, 1);
+      }
+    }
+  }
+  .scroll {
+    flex: 1;
+    overflow: auto;
+  }
+  .footer {
+    width: 96%;
+    height: calc(100% - 82px);
+    margin: 10px auto 10px;
+
+    .el-table--fit {
+      height: 100%;
+      :deep(.el-table__header-wrapper) {
+        background-color: #000;
+        font-size: 14px;
+        color: #000;
+
+        .cell {
+          color: #000;
+        }
+      }
+
+      :deep(.el-table__row) {
+        height: 50px;
+        font-size: 14px;
+        color: #000;
+      }
+
+      :deep(.el-table__row td) {
+        padding: 0;
+        // border: 0;
+      }
+
+      .el-button--primary {
+        margin-left: 5px;
+      }
+
+      :deep(.el-table__body .even) {
+        background-color: #fff;
+      }
+
+      :deep(.el-table__body .odd) {
+        background-color: rgba(240, 243, 247, 1);
+      }
+
+      :deep(.options) {
+        display: flex;
+        justify-content: center;
+        align-items: center;
+
+        .reset {
+          margin-right: 15px;
+          color: rgba(30, 125, 251, 1);
+          cursor: pointer;
+        }
+
+        .look {
+          margin-right: 15px;
+          color: rgba(30, 125, 251, 1);
+          cursor: pointer;
+        }
+
+        .del {
+          color: rgba(212, 48, 48, 1);
+          cursor: pointer;
+        }
+      }
+    }
+
+    // 项目新增样式
+    :deep(.account) {
+      // height: 300px;
+      border-radius: 11px;
+
+      .el-dialog__header {
+        border-radius: 11px 11px 0 0;
+        background: rgba(237, 241, 245, 1);
+        font-weight: 600;
+        margin: 0;
+        height: 32px;
+
+        .el-dialog__headerbtn {
+          outline: none;
+        }
+      }
+
+      .el-dialog__body {
+        padding: 30px 30px 0 30px;
+        .el-form {
+          .formLi {
+            width: 100%;
+            margin-bottom: 5px;
+            display: flex;
+            .el-form-item {
+              .el-input {
+                width: 120px;
+              }
+              &:nth-child(2) {
+                .el-form-item__label {
+                  display: none;
+                }
+                .el-form-item__content {
+                  margin-left: 10px !important;
+                }
+              }
+              &:nth-child(3) {
+                .el-form-item__label {
+                  display: none;
+                }
+                .el-form-item__content {
+                  margin-left: 10px !important;
+                }
+              }
+            }
+          }
+          .resetPassword {
+            color: rgba(43, 151, 252, 1);
+            padding-left: 40px;
+            display: inline-block;
+            margin-bottom: 15px;
+          }
+          .options {
+            margin: 60px 0 40px 0;
+            .el-form-item__content {
+              display: flex;
+              flex-direction: row-reverse;
+              .queding {
+                margin-left: 20px;
+                background: linear-gradient(
+                  90deg,
+                  rgba(33, 107, 255, 1) 0%,
+                  rgba(102, 182, 255, 1) 100%
+                );
+                border: none;
+              }
+              .quxiao {
+                border: 1px solid rgba(43, 151, 252, 1);
+                color: rgba(43, 151, 252, 1);
+              }
+            }
+          }
+        }
+      }
+    }
+  }
+
+  .el-pagination {
+    width: calc(100vw - 300px);
+    margin: 20px auto;
+    justify-content: flex-end;
+    :deep(.el-pagination__total) {
+      color: #000;
+    }
+
+    :deep(.el-pagination__goto) {
+      color: #000;
+    }
+
+    :deep(.el-pagination__classifier) {
+      color: #000;
+    }
+
+    :deep(.el-input__wrapper) {
+      // border: 1px solid rgba(0, 0, 0, 1);
+      // border-radius: 5px;
+      // box-shadow: none;
+      width: 100px;
+    }
+
+    :deep(.el-pager li) {
+      margin: 0 5px;
+      border: 1px solid rgba(0, 0, 0, 1);
+      border-radius: 5px;
+      background-color: transparent;
+    }
+
+    :deep(.el-pager li.is-active) {
+      // background-color: rgba(111, 182, 184, 1);
+      color: rgba(0, 149, 255, 1);
+      border: 1px solid rgba(0, 149, 255, 1);
+    }
+
+    :deep(.btn-prev) {
+      margin-right: 5px;
+      border: 1px solid rgba(0, 0, 0, 1);
+      border-radius: 5px;
+      background-color: transparent;
+    }
+
+    :deep(.btn-next) {
+      margin-left: 5px;
+      border: 1px solid rgba(0, 0, 0, 1);
+      border-radius: 5px;
+      background-color: transparent;
+    }
+  }
+}
+
+.el-input {
+  width: 192px;
+}
+</style>
+<style lang="scss">
+.usePrefabricate {
+  height: 488px;
+  .el-select-dropdown__wrap {
+    max-height: 100%;
+  }
+}
+</style>

File diff suppressed because it is too large
+ 1441 - 253
src/views/project/project.vue


+ 318 - 393
src/views/role/role.vue

@@ -10,7 +10,7 @@
           <span>角色名称 </span>
           <span>角色名称 </span>
           <el-input
           <el-input
             clearable
             clearable
-            v-model="searchInput.name"
+            v-model="searchInput.pname"
             @clear="searchBtn"
             @clear="searchBtn"
             class="w-50 m-2"
             class="w-50 m-2"
             placeholder="请输入角色名称"
             placeholder="请输入角色名称"
@@ -75,10 +75,15 @@
           }"
           }"
         >
         >
           <!-- <el-table-column type="selection" width="55" /> -->
           <!-- <el-table-column type="selection" width="55" /> -->
-          <el-table-column align="center" prop="createTime" label="序号" />
-          <el-table-column align="center" prop="createTime" label="角色级别" />
-          <el-table-column align="center" prop="createUser" label="父级角色" />
-          <el-table-column align="center" prop="createUser" label="角色名称" />
+          <el-table-column
+            align="center"
+            type="index"
+            label="序号"
+            width="80"
+          />
+          <el-table-column align="center" prop="roleLevel" label="角色级别" />
+          <el-table-column align="center" prop="pname" label="父级角色" />
+          <el-table-column align="center" prop="roleName" label="角色名称" />
           <el-table-column align="center" prop="createTime" label="创建时间" />
           <el-table-column align="center" prop="createTime" label="创建时间" />
           <el-table-column align="center" label="操作" width="220">
           <el-table-column align="center" label="操作" width="220">
             <template #default="scope">
             <template #default="scope">
@@ -103,70 +108,94 @@
             </template>
             </template>
           </el-table-column>
           </el-table-column>
         </el-table>
         </el-table>
+      </div>
 
 
-        <!-- 添加角色 -->
-        <el-dialog
-          class="addRoles"
-          v-model="addRolesVisible"
-          :close-on-click-modal="false"
-          :close-on-press-escape="false"
-          :title="addRolesTitle"
-          align-center
-          width="900"
-          :before-close="cancelAddRoles"
-        >
-          <div class="rolesNames">
-            <span>角色名称: &nbsp;&nbsp;</span>
-            <el-input
-              :clearable="true"
-              v-model.trim="addRoleName"
-              class="w-50 m-2"
-              style="width: 450px"
-              placeholder="请输入角色名称"
-            />
-          </div>
-          <div class="rolesName">
-            <div class="rolePermission">角色权限: &nbsp;&nbsp;</div>
-            <div>
-              <!-- <el-table
-              :row-class-name="tableRowClassName"
-              :data="addRolesData.list"
-              style="width: 100%"
-              :span-method="arraySpanMethod"
-              :header-cell-style="{
-                background: 'rgba(240, 243, 247, 1)',
-                height: '50px',
-              }"
-            >
-              <el-table-column align="center" prop="one" label="一级" />
-              <el-table-column align="center" prop="two" label="二级" />
-              <el-table-column width="600" label="功能">
-                <template #default="{ row }">
-                  <div class="checkBoxSel">
-                    <el-tree
-                      :ref="`addRolesData${row.four}`"
-                      style="max-width: 600px"
-                      :data="row.three"
-                      show-checkbox
-                      node-key="id"
-                      :props="defaultProps"
-                      default-expand-all
-                      @check="
-                        (data, nodes) => editMemberCheckChange(data, nodes, row)
-                      "
-                    />
-                  </div>
-                </template></el-table-column
-              >
-            </el-table> -->
-
-              <table cellspacing="0" border-collapse="collapse">
+      <!-- 分页组件 -->
+      <el-pagination
+        background
+        v-model:current-page="currentPage"
+        v-model:page-size="pageSize"
+        :page-sizes="[10, 20, 30, 40]"
+        layout="total,sizes, prev, pager, next, jumper, slot"
+        :total="total"
+        @size-change="handleSizeChange"
+        @current-change="handleCurrentChange"
+      />
+    </div>
+    <!-- 添加角色 -->
+    <el-dialog
+      class="addRoles"
+      v-model="addRolesVisible"
+      :close-on-click-modal="false"
+      :close-on-press-escape="false"
+      :title="addRolesTitle"
+      align-center
+      width="900"
+      :before-close="cancelAddRoles"
+    >
+      <div class="rolesNames">
+        <span>角色名称: &nbsp;&nbsp;</span>
+        <el-input
+          :clearable="true"
+          v-model.trim="addRoleName"
+          class="w-50 m-2"
+          style="width: 450px"
+          placeholder="请输入角色名称"
+        />
+      </div>
+      <div class="rolesName">
+        <div>
+          <el-tree
+            ref="treeRef"
+            style="max-width: 600px"
+            :data="addtableData.list"
+            show-checkbox
+            default-expand-all
+            node-key="id"
+            highlight-current
+            :props="defaultProps"
+          />
+          <!-- <el-table
+            :data="addtableData.list"
+            @selection-change="handleSelectionChange"
+            :header-cell-style="{
+              background: 'rgba(240, 243, 247, 1)',
+              height: '45px',
+              border: 0,
+            }"
+            row-key="id"
+            :tree-props="{ children: 'menuLists', hasChildren: 'hasChildren' }"
+          >
+            <el-table-column prop="menuName" label="名称" />
+            <el-table-column prop="sort" label="排序号" />
+            <el-table-column label="权限">
+              <template #default="scope">
+                <el-switch
+                  v-model="scope.row.isRead"
+                  active-text="可读"
+                  inactive-text="不可读"
+                  active-value="1"
+                  inactive-value="0"
+                />
+                <br />
+                <el-switch
+                  v-model="scope.row.isWrite"
+                  active-text="可写"
+                  inactive-text="不可写"
+                  active-value="1"
+                  inactive-value="0"
+                />
+              </template>
+            </el-table-column>
+            <el-table-column prop="url" label="菜单URL" />
+          </el-table> -->
+
+          <!-- <table cellspacing="0" border-collapse="collapse">
                 <tr align="center">
                 <tr align="center">
                   <td>一级</td>
                   <td>一级</td>
                   <td>二级</td>
                   <td>二级</td>
                   <td>功能</td>
                   <td>功能</td>
                 </tr>
                 </tr>
-                <!-- 房态管理 1 -->
                 <tr align="center">
                 <tr align="center">
                   <td>房态管理</td>
                   <td>房态管理</td>
                   <td>/</td>
                   <td>/</td>
@@ -186,7 +215,6 @@
                     />
                     />
                   </td>
                   </td>
                 </tr>
                 </tr>
-                <!-- 楼栋单元管理 2 -->
                 <tr align="center">
                 <tr align="center">
                   <td :rowspan="4">房间管理</td>
                   <td :rowspan="4">房间管理</td>
                   <td>楼栋单元管理</td>
                   <td>楼栋单元管理</td>
@@ -206,85 +234,71 @@
                     />
                     />
                   </td>
                   </td>
                 </tr>
                 </tr>
-              </table>
-            </div>
-          </div>
-          <div class="options">
-            <div class="btn">
-              <el-button
-                color="rgba(41, 109, 227, 1)"
-                class="queding"
-                type="primary"
-                @click="confirmEdit"
-              >
-                确定
-              </el-button>
-              <el-button @click="cancelAddRoles">取消</el-button>
-            </div>
-          </div>
-        </el-dialog>
-
-        <!-- 项目导入 -->
-        <el-dialog
-          class="projectImport"
-          v-model="projectImportVisible"
-          :close-on-click-modal="false"
-          :close-on-press-escape="false"
-          title="项目导入"
-          align-center
-          width="600"
-          :before-close="cancelProjectImport"
-        >
-          <p class="title">当前只支持项目类型为“非装配式建筑项目”的项目导入</p>
-          <p class="down">
-            <span>非装配式建筑项目导入模板</span
-            ><span @click="templateDown">模板下载</span>
-          </p>
-          <el-upload
-            class="avatar-uploader"
-            action="#"
-            :auto-upload="false"
-            :on-remove="projectImportRemove"
-            :on-change="projectImportChange"
-            :before-upload="beforeAvatarProImport"
-            ref="projectRef"
-            :limit="1"
-            :on-exceed="projectImportExceed"
+              </table> -->
+        </div>
+      </div>
+      <div class="options">
+        <div class="btn">
+          <el-button
+            color="rgba(41, 109, 227, 1)"
+            class="queding"
+            type="primary"
+            @click="confirmEdit"
           >
           >
-            <template #trigger>
-              <el-button class="queding" type="primary">
-                &nbsp;&nbsp;导入项目&nbsp;&nbsp;
-              </el-button>
-            </template>
-          </el-upload>
-          <div class="options">
-            <el-button
-              color="rgba(9, 101, 98, 1)"
-              class="queding"
-              type="primary"
-              @click="projectImportConfirm(projectRef)"
-            >
-              &nbsp;&nbsp;确认导入&nbsp;&nbsp;
-            </el-button>
-            <el-button @click="cancelProjectImport"
-              >&nbsp;&nbsp;取消导入&nbsp;&nbsp;</el-button
-            >
-          </div>
-        </el-dialog>
+            确定
+          </el-button>
+          <el-button @click="cancelAddRoles">取消</el-button>
+        </div>
       </div>
       </div>
-
-      <!-- 分页组件 -->
-      <el-pagination
-        background
-        v-model:current-page="currentPage"
-        v-model:page-size="pageSize"
-        :page-sizes="[10, 20, 30, 40]"
-        layout="total,sizes, prev, pager, next, jumper, slot"
-        :total="total"
-        @size-change="handleSizeChange"
-        @current-change="handleCurrentChange"
-      />
-    </div>
+    </el-dialog>
+
+    <!-- 项目导入 -->
+    <el-dialog
+      class="projectImport"
+      v-model="projectImportVisible"
+      :close-on-click-modal="false"
+      :close-on-press-escape="false"
+      title="项目导入"
+      align-center
+      width="600"
+      :before-close="cancelProjectImport"
+    >
+      <p class="title">当前只支持项目类型为“非装配式建筑项目”的项目导入</p>
+      <p class="down">
+        <span>非装配式建筑项目导入模板</span
+        ><span @click="templateDown">模板下载</span>
+      </p>
+      <el-upload
+        class="avatar-uploader"
+        action="#"
+        :auto-upload="false"
+        :on-remove="projectImportRemove"
+        :on-change="projectImportChange"
+        :before-upload="beforeAvatarProImport"
+        ref="projectRef"
+        :limit="1"
+        :on-exceed="projectImportExceed"
+      >
+        <template #trigger>
+          <el-button class="queding" type="primary">
+            &nbsp;&nbsp;导入项目&nbsp;&nbsp;
+          </el-button>
+        </template>
+      </el-upload>
+      <div class="options">
+        <el-button
+          color="rgba(9, 101, 98, 1)"
+          class="queding"
+          type="primary"
+          @click="projectImportConfirm(projectRef)"
+        >
+          &nbsp;&nbsp;确认导入&nbsp;&nbsp;
+        </el-button>
+        <el-button @click="cancelProjectImport"
+          >&nbsp;&nbsp;取消导入&nbsp;&nbsp;</el-button
+        >
+      </div>
+    </el-dialog>
   </div>
   </div>
 </template>
 </template>
 
 
@@ -310,12 +324,13 @@ import { useStore } from "vuex";
 const store = useStore();
 const store = useStore();
 const router = useRouter();
 const router = useRouter();
 
 
+const loading = ref();
 const tableData = reactive({
 const tableData = reactive({
   list: [{}],
   list: [{}],
 });
 });
 
 
 const searchInput = reactive({
 const searchInput = reactive({
-  name: "", // 项目名称
+  pname: "", // 项目名称
   createTime: "", // 创建时间
   createTime: "", // 创建时间
 }); // 搜索按钮数据
 }); // 搜索按钮数据
 
 
@@ -327,71 +342,17 @@ const selectData = reactive({
 }); // 多选框选择的数据
 }); // 多选框选择的数据
 const api = ref("");
 const api = ref("");
 
 
-// 新增账号 (--------------------------------------------------------)
+// 新增角色 (--------------------------------------------------------)
 const addRolesVisible = ref(false);
 const addRolesVisible = ref(false);
 const addRolesTitle = ref();
 const addRolesTitle = ref();
-const addRolesData = ref();
-const defaultProps = ref({
-  children: "children",
-  label: "name",
-});
-
-const addRoleName=ref()
-const addRolesData1 = ref(); // 房态管理
-const addRolesList1 = reactive({
-  one: "房态管理",
-  two: "/",
-  three: [
-    {
-      name: "全部",
-      id: 0,
-      children: [
-        { name: "预定", id: 1 },
-        { name: "退房", id: 2 },
-        { name: "维修", id: 3 },
-        { name: "关房", id: 4 },
-        { name: "置脏", id: 5 },
-        { name: "置净", id: 6 },
-        { name: "退款", id: 7 },
-        { name: "入住", id: 8 },
-        { name: "锁房", id: 9 },
-        // { name: "日志", id: 10 },
-        { name: "换房", id: 11 },
-        { name: "开房", id: 12 },
-        // { name: "门锁管理", id: 13 },
-        { name: "查看界面", id: 14 },
-        { name: "开电", id: 15 },
-        { name: "关电", id: 16 },
-        { name: "取消预定", id: 17 },
-        { name: "取消维修", id: 18 },
-        { name: "查看密码", id: 19 },
-        { name: "退款", id: 20 },
-      ],
-    },
-  ],
-  four: "1",
-  checkedSel: [],
-});
-
-const addRolesData2 = ref(); // 楼栋单元管理
-const addRolesList2 = reactive({
-  one: "房间管理",
-  two: "楼栋单元管理",
-  three: [
-    {
-      name: "全部",
-      id: 0,
-      children: [
-        { name: "添加", id: 1 },
-        { name: "编辑", id: 2 },
-        { name: "删除", id: 3 },
-        { name: "查看界面", id: 4 },
-      ],
-    },
-  ],
-  four: "2",
-  checkedSel: [],
+const addRoleName = ref();
+const addtableData = reactive({
+  list: [],
 });
 });
+const defaultProps = {
+  children: "menuLists",
+  label: "menuName",
+};
 
 
 // 项目导入
 // 项目导入
 const projectImportVisible = ref(false);
 const projectImportVisible = ref(false);
@@ -402,34 +363,29 @@ const projectFile = ref();
 const getList = async () => {
 const getList = async () => {
   loading.value = true;
   loading.value = true;
   let data = {
   let data = {
-    currentPage: currentPage.value, // 当前页
-    pageCount: pageSize.value, // 一页数据条数
-    projectName: searchInput.name,
-    pageType: 1,
-    permitNum: searchInput.LicenseCode, // 施工许可证编码
-    projectUnit: searchInput.unit, // 建设单位
-    projectPurpose: searchInput.purpose, // 项目用途
-    structureType: searchInput.structureType, // 结构类型
-    projectType: searchInput.projectType, // 项目类型
+    page: currentPage.value, // 当前页
+    rows: pageSize.value, // 一页数据条数
   };
   };
-
-  if (searchInput.createTime) {
-    data.startDate = searchInput.createTime[0];
-    data.endDate = searchInput.createTime[1];
-  }
+  // if (searchInput.createTime) {
+  //   data.startDate = searchInput.createTime[0];
+  //   data.endDate = searchInput.createTime[1];
+  // }
   let res = await axios({
   let res = await axios({
-    method: "get",
-    url: api.value + "/jgcloudProject/queryPageJgcloudProject",
+    method: "post",
+    url: api.value + "/api/sysRole/queryPageSysRole",
     headers: {
     headers: {
-      token: sessionStorage.getItem("token"),
+      tokenP: sessionStorage.getItem("tokenP"),
       user_head: sessionStorage.getItem("userhead"),
       user_head: sessionStorage.getItem("userhead"),
     },
     },
     params: data,
     params: data,
+    data: {
+      pname: searchInput.pname,
+    },
   });
   });
-  console.log(res, "项目分页数据");
+  console.log(res, "查询角色分页数据");
   if (res.data.code == 200) {
   if (res.data.code == 200) {
-    tableData.list = res.data.data.list;
-    total.value = res.data.data.totalCount;
+    tableData.list = res.data.data.rows;
+    total.value = res.data.data.total;
     loading.value = false;
     loading.value = false;
   } else {
   } else {
     loading.value = false;
     loading.value = false;
@@ -448,14 +404,32 @@ const searchBtn = lodash.debounce(async () => {
 }, 300);
 }, 300);
 
 
 // 角色新增
 // 角色新增
-const addProjectbtn = () => {
+const addProjectbtn = async () => {
   addRolesVisible.value = true;
   addRolesVisible.value = true;
   addRolesTitle.value = "角色新增";
   addRolesTitle.value = "角色新增";
+  let res = await axios({
+    method: "post",
+    url: api.value + "/api/sysMenu/QueryMenuTreeRecords",
+    headers: {
+      tokenP: sessionStorage.getItem("tokenP"),
+      user_head: sessionStorage.getItem("userhead"),
+    },
+  });
+  console.log(res, "查看菜单");
+  if (res.data.code == 200) {
+    addtableData.list = res.data.data;
+  } else {
+    ElMessage({
+      type: "error",
+      showClose: true,
+      message: res.data.message,
+      center: true,
+    });
+  }
 };
 };
 // 取消角色新增
 // 取消角色新增
 const cancelAddRoles = () => {
 const cancelAddRoles = () => {
   addRolesVisible.value = false;
   addRolesVisible.value = false;
-  accountRef.value.resetFields();
 };
 };
 
 
 //编辑项目
 //编辑项目
@@ -476,7 +450,7 @@ const projectImportConfirm = async () => {
     method: "POST",
     method: "POST",
     url: api.value + "/jgcloudProject/importExcelProject",
     url: api.value + "/jgcloudProject/importExcelProject",
     headers: {
     headers: {
-      token: sessionStorage.getItem("token"),
+      tokenP: sessionStorage.getItem("tokenP"),
       user_head: sessionStorage.getItem("userhead"),
       user_head: sessionStorage.getItem("userhead"),
     },
     },
     data: data,
     data: data,
@@ -508,17 +482,6 @@ const cancelProjectImport = () => {
   projectImportVisible.value = false;
   projectImportVisible.value = false;
 };
 };
 
 
-// (--------------------------------------------------)
-// cos桶中地址栏中中文地址乱码转换为中文
-const pdfName = (value) => {
-  // console.log(decodeURIComponent(value));
-  // console.log(decodeURIComponent(value).length);
-  let index = decodeURIComponent(value).lastIndexOf("/") + 1;
-  let name = decodeURIComponent(value).slice(index, value.length);
-  console.log(name);
-  return name;
-};
-
 // 多选框功能
 // 多选框功能
 const handleSelectionChange = (val) => {
 const handleSelectionChange = (val) => {
   console.log(val);
   console.log(val);
@@ -542,13 +505,13 @@ const handleSizeChange = (value) => {
 };
 };
 // 分页
 // 分页
 const handleCurrentChange = (value) => {
 const handleCurrentChange = (value) => {
-  console.log(value, "分页");
   currentPage.value = value;
   currentPage.value = value;
   getList();
   getList();
 };
 };
 
 
 onBeforeMount(() => {
 onBeforeMount(() => {
   api.value = store.state.user.api;
   api.value = store.state.user.api;
+  getList();
 });
 });
 onUnmounted(() => {
 onUnmounted(() => {
   // document.removeEventListener("keyup", Enters);
   // document.removeEventListener("keyup", Enters);
@@ -716,160 +679,6 @@ onUnmounted(() => {
         }
         }
       }
       }
     }
     }
-
-    // 添加角色
-    :deep(.addRoles) {
-      //   height: 420px;
-      border-radius: 11px;
-      .el-dialog__header {
-        border-radius: 11px 11px 0 0;
-        background: rgba(237, 241, 245, 1);
-        font-weight: 600;
-        margin: 0;
-        .el-dialog__headerbtn {
-          outline: none;
-        }
-      }
-      .el-dialog__body {
-        padding: 20px 30px 10px 30px;
-
-        .rolesName {
-          margin: 15px 0;
-          color: #000;
-          height: 600px;
-          overflow: auto;
-          .rolePermission {
-            margin: 10px 0;
-          }
-        }
-        .el-table--fit {
-          height: 600px;
-
-          .el-table__header-wrapper {
-            background-color: #000;
-            font-size: 16px;
-            tr {
-              color: #000;
-              th {
-                border-left: 1px solid #dcdfe6 !important;
-                &:last-child {
-                  border-right: 1px solid #dcdfe6 !important;
-                }
-                .cell {
-                  text-align: center;
-                }
-              }
-            }
-          }
-
-          .el-table__row {
-            height: 50px;
-            font-size: 16px;
-            color: #000;
-            .el-tree-node__children {
-              display: flex;
-              flex-wrap: wrap;
-              .el-tree-node {
-                width: 140px;
-                .el-tree-node__content {
-                  padding-left: 0 !important;
-                }
-              }
-              // border: 1px solid red;
-            }
-          }
-
-          .el-table__row td {
-            padding: 0;
-            // border: 0;
-          }
-          td {
-            border-left: 1px solid #dcdfe6;
-            .checkBoxSel {
-              padding-left: 20px;
-              .el-checkbox {
-                .el-checkbox__label {
-                  color: #000;
-                }
-              }
-            }
-            &:last-child {
-              border-right: 1px solid #dcdfe6;
-            }
-          }
-          .el-table__row:hover {
-            td {
-              background-color: #ffffff !important;
-            }
-          }
-
-          .el-button--primary {
-            margin-left: 5px;
-          }
-
-          // .el-table__body .even {
-          //   background-color: #fff;
-          // }
-
-          // .el-table__body .odd {
-          //   background-color: rgba(240, 243, 247, 1);
-          // }
-        }
-        table {
-          width: 840px;
-          // height: 600px;
-          tr {
-            td {
-              border-top: 1px solid #7c7c7c;
-              border-left: 1px solid #7c7c7c;
-            }
-            td:nth-child(1) {
-              width: 120px;
-            }
-            td:last-child {
-              border-right: 1px solid #7c7c7c;
-              padding: 10px 0;
-              .el-tree {
-                .el-tree-node__children {
-                  display: flex;
-                  flex-wrap: wrap;
-                  .el-tree-node {
-                    width: 140px;
-                    .el-tree-node__content {
-                      padding-left: 0 !important;
-                    }
-                  }
-                  // border: 1px solid red;
-                }
-              }
-            }
-          }
-          tr:nth-child(1) {
-            td {
-              height: 40px;
-            }
-          }
-          tr:last-child {
-            td {
-              border-bottom: 1px solid #7c7c7c;
-            }
-          }
-        }
-
-        .options {
-          margin: 10px 20px 10px 0;
-          width: 100%;
-          .btn {
-            display: flex;
-            flex-direction: row-reverse;
-          }
-          .queding {
-            color: #fff;
-            margin-left: 15px;
-          }
-        }
-      }
-    }
   }
   }
 
 
   .el-pagination {
   .el-pagination {
@@ -922,6 +731,122 @@ onUnmounted(() => {
       background-color: transparent;
       background-color: transparent;
     }
     }
   }
   }
+
+  // 添加角色
+  :deep(.addRoles) {
+    //   height: 420px;
+    border-radius: 11px;
+    .el-dialog__header {
+      border-radius: 11px 11px 0 0;
+      background: rgba(237, 241, 245, 1);
+      font-weight: 600;
+      margin: 0;
+      .el-dialog__headerbtn {
+        outline: none;
+      }
+    }
+    .el-dialog__body {
+      padding: 20px 30px 10px 30px;
+
+      .rolesName {
+        margin: 15px 0;
+        color: #000;
+        height: 600px;
+        overflow: auto;
+        .rolePermission {
+          margin: 10px 0;
+        }
+      }
+      .el-table--fit {
+        height: 100%;
+        :deep(.el-table__header-wrapper) {
+          background-color: #000;
+          font-size: 14px;
+          color: #000;
+
+          .cell {
+            color: #000;
+          }
+        }
+
+        .el-table__row {
+          height: 45px;
+          font-size: 14px;
+          color: #000;
+        }
+
+        .el-table__row td {
+          // padding: 0;
+          // border: 0;
+        }
+
+        .el-button--primary {
+          margin-left: 5px;
+        }
+
+        :deep(.el-table__body .even) {
+          background-color: #fff;
+        }
+
+        :deep(.el-table__body .odd) {
+          background-color: rgba(240, 243, 247, 1);
+        }
+      }
+      // table {
+      //   width: 840px;
+      //   // height: 600px;
+      //   tr {
+      //     td {
+      //       border-top: 1px solid #7c7c7c;
+      //       border-left: 1px solid #7c7c7c;
+      //     }
+      //     td:nth-child(1) {
+      //       width: 120px;
+      //     }
+      //     td:last-child {
+      //       border-right: 1px solid #7c7c7c;
+      //       padding: 10px 0;
+      //       .el-tree {
+      //         .el-tree-node__children {
+      //           display: flex;
+      //           flex-wrap: wrap;
+      //           .el-tree-node {
+      //             width: 140px;
+      //             .el-tree-node__content {
+      //               padding-left: 0 !important;
+      //             }
+      //           }
+      //           // border: 1px solid red;
+      //         }
+      //       }
+      //     }
+      //   }
+      //   tr:nth-child(1) {
+      //     td {
+      //       height: 40px;
+      //     }
+      //   }
+      //   tr:last-child {
+      //     td {
+      //       border-bottom: 1px solid #7c7c7c;
+      //     }
+      //   }
+      // }
+
+      .options {
+        margin: 10px 20px 10px 0;
+        width: 100%;
+        .btn {
+          display: flex;
+          flex-direction: row-reverse;
+        }
+        .queding {
+          color: #fff;
+          margin-left: 15px;
+        }
+      }
+    }
+  }
 }
 }
 
 
 .el-input {
 .el-input {

+ 132 - 86
src/views/system/system.vue

@@ -47,9 +47,9 @@
           }"
           }"
         >
         >
           <!-- <el-table-column type="selection" width="55" /> -->
           <!-- <el-table-column type="selection" width="55" /> -->
-          <el-table-column align="center" prop="createTime" label="维度名称" />
-          <el-table-column align="center" prop="createTime" label="维度权重" />
-          <el-table-column align="center" prop="createUser" label="创建人" />
+          <el-table-column align="center" prop="configKey" label="维度名称" />
+          <el-table-column align="center" prop="configValue" label="维度权重" />
+          <el-table-column align="center" prop="createBy" label="创建人" />
           <el-table-column align="center" label="操作" width="220">
           <el-table-column align="center" label="操作" width="220">
             <template #default="scope">
             <template #default="scope">
               <div class="options">
               <div class="options">
@@ -105,9 +105,9 @@
             label-position="right"
             label-position="right"
             status-icon
             status-icon
           >
           >
-            <el-form-item label="维度名称" prop="user">
+            <el-form-item label="维度名称" prop="configKey">
               <el-input
               <el-input
-                v-model="accountRuleForm.user"
+                v-model="accountRuleForm.configKey"
                 placeholder="请输入维度名称"
                 placeholder="请输入维度名称"
                 clearable
                 clearable
                 style="width: 220px"
                 style="width: 220px"
@@ -116,18 +116,18 @@
             <!-- <span class="resetPassword"
             <!-- <span class="resetPassword"
               >注:建设单位时用户名可填写单位名称</span
               >注:建设单位时用户名可填写单位名称</span
             > -->
             > -->
-            <el-form-item label="权重" prop="contacts">
+            <el-form-item label="权重" prop="configValue">
               <el-input
               <el-input
-                v-model="accountRuleForm.contacts"
+                v-model="accountRuleForm.configValue"
                 placeholder="请输入权重"
                 placeholder="请输入权重"
                 clearable
                 clearable
                 style="width: 220px"
                 style="width: 220px"
               />
               />
             </el-form-item>
             </el-form-item>
-            <el-form-item label="是否属于进度" prop="account">
-              <el-radio-group v-model="radio1">
-                <el-radio value="1" size="large">质量</el-radio>
-                <el-radio value="2" size="large">进度</el-radio>
+            <el-form-item label="是否属于进度" prop="isSpeed">
+              <el-radio-group v-model="accountRuleForm.isSpeed">
+                <el-radio :value="0" size="large">非进度</el-radio>
+                <el-radio :value="1" size="large">进度</el-radio>
               </el-radio-group>
               </el-radio-group>
             </el-form-item>
             </el-form-item>
             <el-form-item class="options">
             <el-form-item class="options">
@@ -186,18 +186,10 @@ const router = useRouter();
 const tableData = reactive({
 const tableData = reactive({
   list: [{}],
   list: [{}],
 });
 });
-
-const searchInput = reactive({
-  name: "", // 项目名称
-  createTime: "", // 创建时间
-}); // 搜索按钮数据
-
 const currentPage = ref(1); // 当前页
 const currentPage = ref(1); // 当前页
 const pageSize = ref(10);
 const pageSize = ref(10);
 const total = ref(40); // 当前总数
 const total = ref(40); // 当前总数
-const selectData = reactive({
-  list: [],
-}); // 多选框选择的数据
+
 const api = ref("");
 const api = ref("");
 
 
 // 新增账号 (--------------------------------------------------------)
 // 新增账号 (--------------------------------------------------------)
@@ -206,60 +198,37 @@ const accountTitle = ref();
 const accountRef = ref();
 const accountRef = ref();
 
 
 const accountRuleForm = reactive({
 const accountRuleForm = reactive({
-  role: "", // 角色
-  user: "", // 用户名
-  contacts: "", // 联系人
-  phone: "", // 联系电话
-  account: "", // 账号
+  configKey: "", // 名称
+  configValue: "", // 权重
+  isSpeed: "1", // 是否进度
   id: "",
   id: "",
 });
 });
 // 新增账号表单验证
 // 新增账号表单验证
 const accountRules = reactive({
 const accountRules = reactive({
-  role: [{ required: true, message: "角色不能为空", trigger: "blur" }],
-  user: [{ required: true, message: "用户名不能为空", trigger: "blur" }],
-  contacts: [{ required: true, message: "账号不能为空", trigger: "blur" }],
+  configKey: [{ required: true, message: "维度名称不能为空", trigger: "blur" }],
+  configValue: [{ required: true, message: "权重不能为空", trigger: "blur" }],
+  isSpeed: [{ required: true, message: "进度不能为空", trigger: "blur" }],
 });
 });
 
 
-// 项目导入
-const projectImportVisible = ref(false);
-const projectRef = ref();
-const projectFile = ref();
-
 // 获取账户列表
 // 获取账户列表
 const getList = async () => {
 const getList = async () => {
-  loading.value = true;
   let data = {
   let data = {
-    currentPage: currentPage.value, // 当前页
-    pageCount: pageSize.value, // 一页数据条数
-    projectName: searchInput.name,
-    pageType: 1,
-    permitNum: searchInput.LicenseCode, // 施工许可证编码
-    projectUnit: searchInput.unit, // 建设单位
-    projectPurpose: searchInput.purpose, // 项目用途
-    structureType: searchInput.structureType, // 结构类型
-    projectType: searchInput.projectType, // 项目类型
+    page: currentPage.value, // 当前页
+    rows: pageSize.value, // 一页数据条数
   };
   };
-
-  if (searchInput.createTime) {
-    data.startDate = searchInput.createTime[0];
-    data.endDate = searchInput.createTime[1];
-  }
   let res = await axios({
   let res = await axios({
-    method: "get",
-    url: api.value + "/jgcloudProject/queryPageJgcloudProject",
+    method: "post",
+    url: api.value + "/api/sysConfig/queryPage",
     headers: {
     headers: {
-      token: sessionStorage.getItem("token"),
+      tokenP: sessionStorage.getItem("tokenP"),
       user_head: sessionStorage.getItem("userhead"),
       user_head: sessionStorage.getItem("userhead"),
     },
     },
-    params: data,
+    params:data
   });
   });
-  console.log(res, "项目分页数据");
+  console.log(res, "考核维度管理");
   if (res.data.code == 200) {
   if (res.data.code == 200) {
-    tableData.list = res.data.data.list;
-    total.value = res.data.data.totalCount;
-    loading.value = false;
+    tableData.list = res.data.data.rows;
   } else {
   } else {
-    loading.value = false;
     ElMessage({
     ElMessage({
       type: "error",
       type: "error",
       showClose: true,
       showClose: true,
@@ -269,38 +238,126 @@ const getList = async () => {
   }
   }
 };
 };
 
 
-// 搜索功能
-const searchBtn = lodash.debounce(async () => {
-  getList();
-}, 300);
-
 // 添加考核维度
 // 添加考核维度
 const addProjectbtn = () => {
 const addProjectbtn = () => {
   accountVisible.value = true;
   accountVisible.value = true;
   accountTitle.value = "添加考核维度";
   accountTitle.value = "添加考核维度";
+  accountRuleForm.configKey = "";
+  accountRuleForm.configValue = "";
+  accountRuleForm.isSpeed = "";
+  accountRuleForm.id = "";
 };
 };
 // 取消添加考核维度
 // 取消添加考核维度
 const cancelAccount = () => {
 const cancelAccount = () => {
   accountVisible.value = false;
   accountVisible.value = false;
+  accountRuleForm.configKey = "";
+  accountRuleForm.configValue = "";
+  accountRuleForm.isSpeed = "";
+  accountRuleForm.id = "";
   accountRef.value.resetFields();
   accountRef.value.resetFields();
 };
 };
 
 
-//编辑项目
+//编辑考核维度
 const edit = (row) => {
 const edit = (row) => {
   accountVisible.value = true;
   accountVisible.value = true;
   accountTitle.value = "编辑考核维度";
   accountTitle.value = "编辑考核维度";
+  accountRuleForm.configKey = row.configKey;
+  accountRuleForm.configValue = row.configValue;
+  accountRuleForm.isSpeed = row.isSpeed;
+  accountRuleForm.id = row.id;
   console.log(row);
   console.log(row);
 };
 };
+// 确定考核维度
+const confirmAccount = (formEl) => {
+  if (!formEl) return;
+  formEl.validate(async (valid, fields) => {
+    if (valid) {
+      let data = {
+        configKey: accountRuleForm.configKey,
+        isSpeed: accountRuleForm.isSpeed, // 是否属于进度
+        configValue: accountRuleForm.configValue,
+        remark: "",
+      };
+      let res = "";
+
+      // 判断是否有id存在,有则是修改账号
+      if (accountRuleForm.id) {
+        data.id = accountRuleForm.id;
+        res = await axios({
+          method: "post",
+          url: api.value + "/api/sysConfig/update",
+          headers: {
+            tokenP: sessionStorage.getItem("tokenP"),
+            user_head: sessionStorage.getItem("userhead"),
+          },
+          data: data,
+        });
+      } else {
+        res = await axios({
+          method: "post",
+          url: api.value + "/api/sysConfig/add",
+          headers: {
+            tokenP: sessionStorage.getItem("tokenP"),
+            user_head: sessionStorage.getItem("userhead"),
+          },
+          data: data,
+        });
+      }
+      console.log(res, "考核维度管理");
+      if (res.data.code == 200) {
+        nextTick(() => {
+          accountRef.value.resetFields();
+        });
+        accountVisible.value = false;
+        getList();
+
+        ElMessage({
+          type: "success",
+          showClose: true,
+          message: res.data.message,
+          center: true,
+        });
+      } else {
+        ElMessage({
+          type: "error",
+          showClose: true,
+          message: res.data.message,
+          center: true,
+        });
+      }
+    }
+  });
+};
 
 
-// (--------------------------------------------------)
-// cos桶中地址栏中中文地址乱码转换为中文
-const pdfName = (value) => {
-  // console.log(decodeURIComponent(value));
-  // console.log(decodeURIComponent(value).length);
-  let index = decodeURIComponent(value).lastIndexOf("/") + 1;
-  let name = decodeURIComponent(value).slice(index, value.length);
-  console.log(name);
-  return name;
+// 删除考核维度
+const del = async (row) => {
+  let data=new FormData();
+  data.append('id',row.id)
+  let res = await axios({
+    method: "post",
+    url: api.value + "/api/sysConfig/del",
+    headers: {
+      tokenP: sessionStorage.getItem("tokenP"),
+      user_head: sessionStorage.getItem("userhead"),
+    },
+    data:data
+  });
+  if (res.data.code == 200) {
+    getList();
+    ElMessage({
+      type: "success",
+      showClose: true,
+      message: res.data.message,
+      center: true,
+    });
+  } else {
+    ElMessage({
+      type: "error",
+      showClose: true,
+      message: res.data.message,
+      center: true,
+    });
+  }
 };
 };
 
 
 // 多选框功能
 // 多选框功能
@@ -318,21 +375,10 @@ const tableRowClassName = ({ row, rowIndex }) => {
   }
   }
   return "";
   return "";
 };
 };
-// 每页显示条数
-const handleSizeChange = (value) => {
-  console.log(value, "每页显示条数");
-  pageSize.value = value;
-  getList();
-};
-// 分页
-const handleCurrentChange = (value) => {
-  console.log(value, "分页");
-  currentPage.value = value;
-  getList();
-};
 
 
 onBeforeMount(() => {
 onBeforeMount(() => {
   api.value = store.state.user.api;
   api.value = store.state.user.api;
+  getList();
 });
 });
 onUnmounted(() => {
 onUnmounted(() => {
   // document.removeEventListener("keyup", Enters);
   // document.removeEventListener("keyup", Enters);
@@ -376,7 +422,7 @@ onUnmounted(() => {
     .roles {
     .roles {
       padding: 10px 0 10px 0;
       padding: 10px 0 10px 0;
       font-weight: 600;
       font-weight: 600;
-      letter-spacing:1px;
+      letter-spacing: 1px;
     }
     }
     // border-bottom: 1px solid rgb(231, 231, 231);
     // border-bottom: 1px solid rgb(231, 231, 231);
     .filter {
     .filter {
@@ -437,7 +483,7 @@ onUnmounted(() => {
       }
       }
 
 
       :deep(.el-table__row) {
       :deep(.el-table__row) {
-        height: 35px;
+        height: 40px;
         font-size: 14px;
         font-size: 14px;
         color: #000;
         color: #000;
       }
       }

+ 220 - 87
src/views/user/user.vue

@@ -19,14 +19,19 @@
         </div>
         </div>
         <div class="condition">
         <div class="condition">
           <span>角色 </span>
           <span>角色 </span>
-          <el-input
-            clearable
+          <el-select
             v-model="searchInput.role"
             v-model="searchInput.role"
-            @clear="searchBtn"
-            class="w-50 m-2"
-            placeholder="请输入角色"
+            placeholder="请选择角色"
             style="width: 250px"
             style="width: 250px"
-          />
+            @change="searchBtn"
+          >
+            <el-option
+              v-for="item in roleData"
+              :key="item.id"
+              :label="item.roleName"
+              :value="item.id"
+            />
+          </el-select>
         </div>
         </div>
         <div class="condition">
         <div class="condition">
           <span>创建时间 </span>
           <span>创建时间 </span>
@@ -57,7 +62,7 @@
             <el-option
             <el-option
               v-for="item in departmentData"
               v-for="item in departmentData"
               :key="item.value"
               :key="item.value"
-              :label="item.name"
+              :label="item.oname"
               :value="item.id"
               :value="item.id"
             />
             />
           </el-select>
           </el-select>
@@ -97,12 +102,18 @@
           }"
           }"
         >
         >
           <!-- <el-table-column type="selection" width="55" /> -->
           <!-- <el-table-column type="selection" width="55" /> -->
-          <el-table-column align="center" prop="createTime" label="序号" />
-          <el-table-column align="center" prop="createTime" label="姓名" />
-          <el-table-column align="center" prop="createUser" label="工号" />
-          <el-table-column align="center" prop="createUser" label="角色" />
-          <el-table-column align="center" prop="createUser" label="部门" />
-          <el-table-column align="center" prop="createUser" label="手机号码" />
+          <el-table-column
+            align="center"
+            type="index"
+            label="序号"
+            width="80"
+          />
+          <el-table-column align="center" prop="userName" label="姓名" />
+          <el-table-column align="center" prop="userCode" label="正方工号" />
+          <el-table-column align="center" prop="cardNumber" label="微校卡号" />
+          <el-table-column align="center" prop="roleName" label="角色" />
+          <el-table-column align="center" prop="department" label="部门" />
+          <el-table-column align="center" prop="mobile" label="手机号码" />
           <el-table-column align="center" prop="createTime" label="创建时间" />
           <el-table-column align="center" prop="createTime" label="创建时间" />
           <el-table-column align="center" label="操作" width="220">
           <el-table-column align="center" label="操作" width="220">
             <template #default="scope">
             <template #default="scope">
@@ -151,33 +162,41 @@
             <!-- <span class="resetPassword"
             <!-- <span class="resetPassword"
               >注:建设单位时用户名可填写单位名称</span
               >注:建设单位时用户名可填写单位名称</span
             > -->
             > -->
-            <el-form-item label="姓名" prop="">
+            <el-form-item label="姓名" prop="userName">
               <el-input
               <el-input
-                v-model="accountRuleForm.contacts"
+                v-model="accountRuleForm.userName"
                 placeholder="请输入姓名"
                 placeholder="请输入姓名"
                 clearable
                 clearable
                 style="width: 220px"
                 style="width: 220px"
               />
               />
             </el-form-item>
             </el-form-item>
-            <el-form-item label="工号" prop="account">
+            <el-form-item label="正方工号" prop="userCode">
+              <el-input
+                v-model="accountRuleForm.userCode"
+                placeholder="请输入正方工号"
+                clearable
+                style="width: 220px"
+              />
+            </el-form-item>
+            <el-form-item label="微校卡号" prop="cardNumber">
               <el-input
               <el-input
-                v-model="accountRuleForm.account"
-                placeholder="请输入工号"
+                v-model="accountRuleForm.cardNumber"
+                placeholder="请输入微校卡号"
                 clearable
                 clearable
                 style="width: 220px"
                 style="width: 220px"
               />
               />
             </el-form-item>
             </el-form-item>
-            <el-form-item label="手机号码" prop="">
+            <el-form-item label="手机号码" prop="mobile">
               <el-input
               <el-input
-                v-model="accountRuleForm.phone"
+                v-model="accountRuleForm.mobile"
                 placeholder="请输入手机号码"
                 placeholder="请输入手机号码"
                 clearable
                 clearable
                 style="width: 220px"
                 style="width: 220px"
               />
               />
             </el-form-item>
             </el-form-item>
-            <el-form-item label="角色" prop="role">
+            <el-form-item label="角色" prop="roleId">
               <el-select
               <el-select
-                v-model="accountRuleForm.role"
+                v-model="accountRuleForm.roleId"
                 placeholder="请选择"
                 placeholder="请选择"
                 style="width: 220px"
                 style="width: 220px"
                 @change="roleChange"
                 @change="roleChange"
@@ -185,23 +204,23 @@
                 <el-option
                 <el-option
                   v-for="item in roleData"
                   v-for="item in roleData"
                   :key="item.id"
                   :key="item.id"
-                  :label="item.name"
+                  :label="item.roleName"
                   :value="item.id"
                   :value="item.id"
                 />
                 />
               </el-select>
               </el-select>
             </el-form-item>
             </el-form-item>
-            <el-form-item label="部门" prop="role">
+            <el-form-item label="部门" prop="department">
               <el-select
               <el-select
-                v-model="accountRuleForm.role"
+                v-model="accountRuleForm.department"
                 placeholder="请选择"
                 placeholder="请选择"
                 style="width: 220px"
                 style="width: 220px"
                 @change="roleChange"
                 @change="roleChange"
               >
               >
                 <el-option
                 <el-option
-                  v-for="item in roleData"
+                  v-for="item in departmentData"
                   :key="item.id"
                   :key="item.id"
-                  :label="item.name"
-                  :value="item.id"
+                  :label="item.oname"
+                  :value="item.oname"
                 />
                 />
               </el-select>
               </el-select>
             </el-form-item>
             </el-form-item>
@@ -306,6 +325,7 @@ import { useStore } from "vuex";
 const store = useStore();
 const store = useStore();
 const router = useRouter();
 const router = useRouter();
 
 
+const loading = ref(false);
 const tableData = reactive({
 const tableData = reactive({
   list: [{}],
   list: [{}],
 });
 });
@@ -317,6 +337,7 @@ const searchInput = reactive({
   createTime: "", // 创建时间
   createTime: "", // 创建时间
 }); // 搜索按钮数据
 }); // 搜索按钮数据
 const departmentData = ref(); // 部门数据
 const departmentData = ref(); // 部门数据
+const roleData = ref(); // 角色数据
 
 
 const currentPage = ref(1); // 当前页
 const currentPage = ref(1); // 当前页
 const pageSize = ref(10);
 const pageSize = ref(10);
@@ -332,18 +353,24 @@ const accountTitle = ref();
 const accountRef = ref();
 const accountRef = ref();
 
 
 const accountRuleForm = reactive({
 const accountRuleForm = reactive({
-  role: "", // 角色
-  user: "", // 用户名
-  contacts: "", // 联系人
-  phone: "", // 联系电话
-  account: "", // 账号
+  userName: "", // 姓名
+  userCode: "", //正方工号
+  cardNumber: "", // 微校卡号
+  roleId: "", // 角色
+  mobile: "", // 联系电话
+  department: "", // 部门
   id: "",
   id: "",
 });
 });
 // 新增账号表单验证
 // 新增账号表单验证
 const accountRules = reactive({
 const accountRules = reactive({
-  role: [{ required: true, message: "角色不能为空", trigger: "blur" }],
-  user: [{ required: true, message: "用户名不能为空", trigger: "blur" }],
-  account: [{ required: true, message: "账号不能为空", trigger: "blur" }],
+  userName: [{ required: true, message: "姓名不能为空", trigger: "blur" }],
+  userCode: [{ required: true, message: "正方工号不能为空", trigger: "blur" }],
+  cardNumber: [
+    { required: true, message: "微校卡号不能为空", trigger: "blur" },
+  ],
+  roleId: [{ required: true, message: "角色不能为空", trigger: "blur" }],
+  mobile: [{ required: true, message: "手机号码不能为空", trigger: "blur" }],
+  department: [{ required: true, message: "部门不能为空", trigger: "blur" }],
 });
 });
 
 
 // 项目导入
 // 项目导入
@@ -355,34 +382,30 @@ const projectFile = ref();
 const getList = async () => {
 const getList = async () => {
   loading.value = true;
   loading.value = true;
   let data = {
   let data = {
-    currentPage: currentPage.value, // 当前页
-    pageCount: pageSize.value, // 一页数据条数
-    projectName: searchInput.name,
-    pageType: 1,
-    permitNum: searchInput.LicenseCode, // 施工许可证编码
-    projectUnit: searchInput.unit, // 建设单位
-    projectPurpose: searchInput.purpose, // 项目用途
-    structureType: searchInput.structureType, // 结构类型
-    projectType: searchInput.projectType, // 项目类型
+    page: currentPage.value, // 当前页
+    rows: pageSize.value, // 一页数据条数
   };
   };
 
 
-  if (searchInput.createTime) {
-    data.startDate = searchInput.createTime[0];
-    data.endDate = searchInput.createTime[1];
-  }
+  // if (searchInput.createTime) {
+  //   data.startDate = searchInput.createTime[0];
+  //   data.endDate = searchInput.createTime[1];
+  // }
   let res = await axios({
   let res = await axios({
-    method: "get",
-    url: api.value + "/jgcloudProject/queryPageJgcloudProject",
+    method: "post",
+    url: api.value + "/api/sysUser/queryPage",
     headers: {
     headers: {
-      token: sessionStorage.getItem("token"),
+      tokenP: sessionStorage.getItem("tokenP"),
       user_head: sessionStorage.getItem("userhead"),
       user_head: sessionStorage.getItem("userhead"),
     },
     },
     params: data,
     params: data,
+    data: {
+      userName: searchInput.name,
+    },
   });
   });
-  console.log(res, "项目分页数据");
+  console.log(res, "用户管理数据");
   if (res.data.code == 200) {
   if (res.data.code == 200) {
-    tableData.list = res.data.data.list;
-    total.value = res.data.data.totalCount;
+    tableData.list = res.data.data.rows;
+    total.value = res.data.data.total;
     loading.value = false;
     loading.value = false;
   } else {
   } else {
     loading.value = false;
     loading.value = false;
@@ -394,6 +417,58 @@ const getList = async () => {
     });
     });
   }
   }
 };
 };
+// 部门数据
+const departmentList = async () => {
+  let res = await axios({
+    method: "post",
+    url: api.value + "/api/Organize/query",
+    headers: {
+      tokenP: sessionStorage.getItem("tokenP"),
+      user_head: sessionStorage.getItem("userhead"),
+    },
+  });
+  console.log(res, "部门数据");
+  if (res.data.code == 200) {
+    departmentData.value = res.data.data;
+  } else {
+    ElMessage({
+      type: "error",
+      showClose: true,
+      message: res.data.message,
+      center: true,
+    });
+  }
+};
+
+// 部门数据
+const roleList = async () => {
+  let res = await axios({
+    method: "post",
+    url: api.value + "/api/sysRole/queryPageSysRole",
+    headers: {
+      tokenP: sessionStorage.getItem("tokenP"),
+      user_head: sessionStorage.getItem("userhead"),
+    },
+    params: {
+      page: 1, // 当前页
+      rows: 100, // 一页数据条数
+    },
+    data: {
+      pname: "",
+    },
+  });
+  console.log(res, "角色数据");
+  if (res.data.code == 200) {
+    roleData.value = res.data.data.rows;
+  } else {
+    ElMessage({
+      type: "error",
+      showClose: true,
+      message: res.data.message,
+      center: true,
+    });
+  }
+};
 
 
 // 搜索功能
 // 搜索功能
 const searchBtn = lodash.debounce(async () => {
 const searchBtn = lodash.debounce(async () => {
@@ -404,43 +479,113 @@ const searchBtn = lodash.debounce(async () => {
 const addProjectbtn = () => {
 const addProjectbtn = () => {
   accountVisible.value = true;
   accountVisible.value = true;
   accountTitle.value = "用户新增";
   accountTitle.value = "用户新增";
+  accountRuleForm.userName = "";
+  accountRuleForm.userCode = "";
+  accountRuleForm.cardNumber = "";
+  accountRuleForm.roleId = "";
+  accountRuleForm.mobile = "";
+  accountRuleForm.department = "";
+  accountRuleForm.id = "";
 };
 };
 // 取消角色新增
 // 取消角色新增
 const cancelAccount = () => {
 const cancelAccount = () => {
-  accountVisible.value = false;
   accountRef.value.resetFields();
   accountRef.value.resetFields();
+  accountVisible.value = false;
+  accountRuleForm.userName = "";
+  accountRuleForm.userCode = "";
+  accountRuleForm.cardNumber = "";
+  accountRuleForm.roleId = "";
+  accountRuleForm.mobile = "";
+  accountRuleForm.department = "";
+  accountRuleForm.id = "";
+};
+// 确定新建项目
+const confirmAccount = (formEl) => {
+  if (!formEl) return;
+  formEl.validate(async (valid, fields) => {
+    if (valid) {
+      // 判断是否有id存在,有则是修改账号
+      let data = {
+        userName: accountRuleForm.userName,
+        userCode: accountRuleForm.userCode,
+        cardNumber: accountRuleForm.cardNumber,
+        roleId: accountRuleForm.roleId,
+        department: accountRuleForm.department,
+        mobile: accountRuleForm.mobile,
+      };
+      let res = "";
+      if (accountRuleForm.id) {
+        data.id = accountRuleForm.id;
+        res = await axios({
+          method: "post",
+          url: api.value + "/api/sysUser/update",
+          headers: {
+            tokenP: sessionStorage.getItem("tokenP"),
+            user_head: sessionStorage.getItem("userhead"),
+          },
+          data: data,
+        });
+      } else {
+        res = await axios({
+          method: "post",
+          url: api.value + "/api/sysUser/add",
+          headers: {
+            tokenP: sessionStorage.getItem("tokenP"),
+            user_head: sessionStorage.getItem("userhead"),
+          },
+          data: data,
+        });
+      }
+      console.log(data, "参数");
+      console.log(res, "回调数据");
+      if (res.data.code == 200) {
+        accountVisible.value = false;
+        getList();
+        accountRef.value.resetFields();
+        ElMessage({
+          type: "success",
+          showClose: true,
+          message: res.data.message,
+          center: true,
+        });
+      } else {
+        ElMessage({
+          type: "error",
+          showClose: true,
+          message: res.data.message,
+          center: true,
+        });
+      }
+    }
+  });
 };
 };
-
 //编辑项目
 //编辑项目
 const edit = (row) => {
 const edit = (row) => {
   accountVisible.value = true;
   accountVisible.value = true;
   accountTitle.value = "用户编辑";
   accountTitle.value = "用户编辑";
+  accountRuleForm.userName = row.userName;
+  accountRuleForm.userCode = row.userCode;
+  accountRuleForm.cardNumber = row.cardNumber;
+  accountRuleForm.roleId = row.roleId;
+  accountRuleForm.mobile = row.mobile;
+  accountRuleForm.department = row.department;
+  accountRuleForm.id = row.id;
   console.log(row);
   console.log(row);
 };
 };
-// 删除pdf文件 (装配式相关附件)
-const pdfDel = (value, uid) => {};
-
-// 导入项目
-const projectImportConfirm = async () => {
+const del = async (row) => {
   let data = new FormData();
   let data = new FormData();
-  data.set("file", projectFile.value);
-  data.set("pageType", 1);
+  data.append("id", row.id);
   let res = await axios({
   let res = await axios({
-    method: "POST",
-    url: api.value + "/jgcloudProject/importExcelProject",
+    method: "post",
+    url: api.value + "/api/sysUser/del",
     headers: {
     headers: {
-      token: sessionStorage.getItem("token"),
+      tokenP: sessionStorage.getItem("tokenP"),
       user_head: sessionStorage.getItem("userhead"),
       user_head: sessionStorage.getItem("userhead"),
     },
     },
     data: data,
     data: data,
   });
   });
-  console.log(res, "导入项目");
   if (res.data.code == 200) {
   if (res.data.code == 200) {
-    projectImportVisible.value = false;
     getList();
     getList();
-    if (projectRef.value) {
-      projectRef.value.clearFiles();
-    }
     ElMessage({
     ElMessage({
       type: "success",
       type: "success",
       showClose: true,
       showClose: true,
@@ -456,21 +601,6 @@ const projectImportConfirm = async () => {
     });
     });
   }
   }
 };
 };
-const cancelProjectImport = () => {
-  projectRef.value.clearFiles();
-  projectImportVisible.value = false;
-};
-
-// (--------------------------------------------------)
-// cos桶中地址栏中中文地址乱码转换为中文
-const pdfName = (value) => {
-  // console.log(decodeURIComponent(value));
-  // console.log(decodeURIComponent(value).length);
-  let index = decodeURIComponent(value).lastIndexOf("/") + 1;
-  let name = decodeURIComponent(value).slice(index, value.length);
-  console.log(name);
-  return name;
-};
 
 
 // 多选框功能
 // 多选框功能
 const handleSelectionChange = (val) => {
 const handleSelectionChange = (val) => {
@@ -502,6 +632,9 @@ const handleCurrentChange = (value) => {
 
 
 onBeforeMount(() => {
 onBeforeMount(() => {
   api.value = store.state.user.api;
   api.value = store.state.user.api;
+  getList();
+  departmentList();
+  roleList();
 });
 });
 onUnmounted(() => {
 onUnmounted(() => {
   // document.removeEventListener("keyup", Enters);
   // document.removeEventListener("keyup", Enters);

+ 4 - 4
vite.config.js

@@ -35,11 +35,11 @@ export default defineConfig({
       //   changeOrigin: true,
       //   changeOrigin: true,
       //   rewrite: (path) => path.replace(/^\/jgcloudApi\/jgcloud\/api/, ""),
       //   rewrite: (path) => path.replace(/^\/jgcloudApi\/jgcloud\/api/, ""),
       // },
       // },
-      "/jgcloudApi/jgcloud/api": {
-        // target: "http://192.168.161.220:8080/jgcloud/api/", // 正式环境
-        target: "http://jxzp.jxjzcjzx.cn:6080/jgcloudApi/jgcloud/api", // 正式环境
+      "/kpi/template": {
+        // target: "https://docs.apipost.cn/preview/ff665803e4a4abe7/8315c012118fbccd", // 正式环境
+        target: "https://chtech.ncjti.edu.cn/kpi/template", // 正式环境
         changeOrigin: true,
         changeOrigin: true,
-        rewrite: (path) => path.replace(/^\/jgcloudApi\/jgcloud\/api/, ""),
+        rewrite: (path) => path.replace(/^\/kpi\/template/, ""),
       },
       },
     },
     },
   },
   },