2 Commits 83777844e0 ... f1decfb6df

Author SHA1 Message Date
  cm f1decfb6df merage 1 year ago
  cm fac33089b7 更新协议 1 year ago

+ 153 - 23
package-lock.json

@@ -36,6 +36,7 @@
         "sass": "^1.54.0",
         "splitpanes": "^3.1.1",
         "svg-sprite-loader": "^6.0.11",
+        "terser": "^5.21.0",
         "vue": "^3.2.39",
         "vue-cropper": "^1.0.3",
         "vue-cropperjs": "^5.0.0",
@@ -671,26 +672,53 @@
       "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==",
       "dev": true
     },
+    "node_modules/@jridgewell/gen-mapping": {
+      "version": "0.3.3",
+      "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz",
+      "integrity": "sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==",
+      "dependencies": {
+        "@jridgewell/set-array": "^1.0.1",
+        "@jridgewell/sourcemap-codec": "^1.4.10",
+        "@jridgewell/trace-mapping": "^0.3.9"
+      },
+      "engines": {
+        "node": ">=6.0.0"
+      }
+    },
     "node_modules/@jridgewell/resolve-uri": {
       "version": "3.1.0",
       "resolved": "https://r.cnpmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz",
       "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==",
-      "dev": true,
       "engines": {
         "node": ">=6.0.0"
       }
     },
+    "node_modules/@jridgewell/set-array": {
+      "version": "1.1.2",
+      "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz",
+      "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==",
+      "engines": {
+        "node": ">=6.0.0"
+      }
+    },
+    "node_modules/@jridgewell/source-map": {
+      "version": "0.3.5",
+      "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.5.tgz",
+      "integrity": "sha512-UTYAUj/wviwdsMfzoSJspJxbkH5o1snzwX0//0ENX1u/55kkZZkcTZP6u9bwKGkv+dkk9at4m1Cpt0uY80kcpQ==",
+      "dependencies": {
+        "@jridgewell/gen-mapping": "^0.3.0",
+        "@jridgewell/trace-mapping": "^0.3.9"
+      }
+    },
     "node_modules/@jridgewell/sourcemap-codec": {
       "version": "1.4.14",
       "resolved": "https://r.cnpmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz",
-      "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==",
-      "dev": true
+      "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw=="
     },
     "node_modules/@jridgewell/trace-mapping": {
       "version": "0.3.9",
       "resolved": "https://r.cnpmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz",
       "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==",
-      "dev": true,
       "dependencies": {
         "@jridgewell/resolve-uri": "^3.0.3",
         "@jridgewell/sourcemap-codec": "^1.4.10"
@@ -1476,10 +1504,9 @@
       }
     },
     "node_modules/acorn": {
-      "version": "8.8.0",
-      "resolved": "https://registry.npmmirror.com/acorn/-/acorn-8.8.0.tgz",
-      "integrity": "sha512-QOxyigPVrpZ2GXT+PFyZTl6TtOFc5egxHIP9IlQ+RbupQuX4RkT/Bee4/kQuC02Xkzg84JcT7oLYtDIQxp+v7w==",
-      "dev": true,
+      "version": "8.10.0",
+      "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.10.0.tgz",
+      "integrity": "sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==",
       "bin": {
         "acorn": "bin/acorn"
       },
@@ -1898,6 +1925,11 @@
         "node": "*"
       }
     },
+    "node_modules/buffer-from": {
+      "version": "1.1.2",
+      "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz",
+      "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ=="
+    },
     "node_modules/buffer-indexof-polyfill": {
       "version": "1.0.2",
       "resolved": "https://registry.npmmirror.com/buffer-indexof-polyfill/-/buffer-indexof-polyfill-1.0.2.tgz",
@@ -7723,6 +7755,23 @@
         "urix": "^0.1.0"
       }
     },
+    "node_modules/source-map-support": {
+      "version": "0.5.21",
+      "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz",
+      "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==",
+      "dependencies": {
+        "buffer-from": "^1.0.0",
+        "source-map": "^0.6.0"
+      }
+    },
+    "node_modules/source-map-support/node_modules/source-map": {
+      "version": "0.6.1",
+      "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
+      "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
+      "engines": {
+        "node": ">=0.10.0"
+      }
+    },
     "node_modules/source-map-url": {
       "version": "0.4.1",
       "resolved": "https://registry.npmmirror.com/source-map-url/-/source-map-url-0.4.1.tgz",
@@ -8247,6 +8296,28 @@
         "node": ">=6"
       }
     },
+    "node_modules/terser": {
+      "version": "5.21.0",
+      "resolved": "https://registry.npmjs.org/terser/-/terser-5.21.0.tgz",
+      "integrity": "sha512-WtnFKrxu9kaoXuiZFSGrcAvvBqAdmKx0SFNmVNYdJamMu9yyN3I/QF0FbH4QcqJQ+y1CJnzxGIKH0cSj+FGYRw==",
+      "dependencies": {
+        "@jridgewell/source-map": "^0.3.3",
+        "acorn": "^8.8.2",
+        "commander": "^2.20.0",
+        "source-map-support": "~0.5.20"
+      },
+      "bin": {
+        "terser": "bin/terser"
+      },
+      "engines": {
+        "node": ">=10"
+      }
+    },
+    "node_modules/terser/node_modules/commander": {
+      "version": "2.20.3",
+      "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz",
+      "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ=="
+    },
     "node_modules/text-extensions": {
       "version": "1.9.0",
       "resolved": "https://r2.cnpmjs.org/text-extensions/-/text-extensions-1.9.0.tgz",
@@ -9401,9 +9472,9 @@
       }
     },
     "node_modules/word-wrap": {
-      "version": "1.2.3",
-      "resolved": "https://registry.npmmirror.com/word-wrap/-/word-wrap-1.2.3.tgz",
-      "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==",
+      "version": "1.2.5",
+      "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz",
+      "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==",
       "dev": true,
       "engines": {
         "node": ">=0.10.0"
@@ -10055,23 +10126,44 @@
       "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==",
       "dev": true
     },
+    "@jridgewell/gen-mapping": {
+      "version": "0.3.3",
+      "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz",
+      "integrity": "sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==",
+      "requires": {
+        "@jridgewell/set-array": "^1.0.1",
+        "@jridgewell/sourcemap-codec": "^1.4.10",
+        "@jridgewell/trace-mapping": "^0.3.9"
+      }
+    },
     "@jridgewell/resolve-uri": {
       "version": "3.1.0",
       "resolved": "https://r.cnpmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz",
-      "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==",
-      "dev": true
+      "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w=="
+    },
+    "@jridgewell/set-array": {
+      "version": "1.1.2",
+      "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz",
+      "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw=="
+    },
+    "@jridgewell/source-map": {
+      "version": "0.3.5",
+      "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.5.tgz",
+      "integrity": "sha512-UTYAUj/wviwdsMfzoSJspJxbkH5o1snzwX0//0ENX1u/55kkZZkcTZP6u9bwKGkv+dkk9at4m1Cpt0uY80kcpQ==",
+      "requires": {
+        "@jridgewell/gen-mapping": "^0.3.0",
+        "@jridgewell/trace-mapping": "^0.3.9"
+      }
     },
     "@jridgewell/sourcemap-codec": {
       "version": "1.4.14",
       "resolved": "https://r.cnpmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz",
-      "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==",
-      "dev": true
+      "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw=="
     },
     "@jridgewell/trace-mapping": {
       "version": "0.3.9",
       "resolved": "https://r.cnpmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz",
       "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==",
-      "dev": true,
       "requires": {
         "@jridgewell/resolve-uri": "^3.0.3",
         "@jridgewell/sourcemap-codec": "^1.4.10"
@@ -10678,10 +10770,9 @@
       "requires": {}
     },
     "acorn": {
-      "version": "8.8.0",
-      "resolved": "https://registry.npmmirror.com/acorn/-/acorn-8.8.0.tgz",
-      "integrity": "sha512-QOxyigPVrpZ2GXT+PFyZTl6TtOFc5egxHIP9IlQ+RbupQuX4RkT/Bee4/kQuC02Xkzg84JcT7oLYtDIQxp+v7w==",
-      "dev": true
+      "version": "8.10.0",
+      "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.10.0.tgz",
+      "integrity": "sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw=="
     },
     "acorn-jsx": {
       "version": "5.3.2",
@@ -11011,6 +11102,11 @@
       "resolved": "https://registry.npmmirror.com/buffer-crc32/-/buffer-crc32-0.2.13.tgz",
       "integrity": "sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ=="
     },
+    "buffer-from": {
+      "version": "1.1.2",
+      "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz",
+      "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ=="
+    },
     "buffer-indexof-polyfill": {
       "version": "1.0.2",
       "resolved": "https://registry.npmmirror.com/buffer-indexof-polyfill/-/buffer-indexof-polyfill-1.0.2.tgz",
@@ -15574,6 +15670,22 @@
         "urix": "^0.1.0"
       }
     },
+    "source-map-support": {
+      "version": "0.5.21",
+      "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz",
+      "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==",
+      "requires": {
+        "buffer-from": "^1.0.0",
+        "source-map": "^0.6.0"
+      },
+      "dependencies": {
+        "source-map": {
+          "version": "0.6.1",
+          "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
+          "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g=="
+        }
+      }
+    },
     "source-map-url": {
       "version": "0.4.1",
       "resolved": "https://registry.npmmirror.com/source-map-url/-/source-map-url-0.4.1.tgz",
@@ -16007,6 +16119,24 @@
         "readable-stream": "^3.1.1"
       }
     },
+    "terser": {
+      "version": "5.21.0",
+      "resolved": "https://registry.npmjs.org/terser/-/terser-5.21.0.tgz",
+      "integrity": "sha512-WtnFKrxu9kaoXuiZFSGrcAvvBqAdmKx0SFNmVNYdJamMu9yyN3I/QF0FbH4QcqJQ+y1CJnzxGIKH0cSj+FGYRw==",
+      "requires": {
+        "@jridgewell/source-map": "^0.3.3",
+        "acorn": "^8.8.2",
+        "commander": "^2.20.0",
+        "source-map-support": "~0.5.20"
+      },
+      "dependencies": {
+        "commander": {
+          "version": "2.20.3",
+          "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz",
+          "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ=="
+        }
+      }
+    },
     "text-extensions": {
       "version": "1.9.0",
       "resolved": "https://r2.cnpmjs.org/text-extensions/-/text-extensions-1.9.0.tgz",
@@ -16854,9 +16984,9 @@
       "integrity": "sha512-OELeY0Q61OXpdUfTp+oweA/vtLVg5VDOXh+3he3PNzLGG/y0oylSOC1xRVj0+l4vQ3tj/bB1HVHv1ocXkQceFA=="
     },
     "word-wrap": {
-      "version": "1.2.3",
-      "resolved": "https://registry.npmmirror.com/word-wrap/-/word-wrap-1.2.3.tgz",
-      "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==",
+      "version": "1.2.5",
+      "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz",
+      "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==",
       "dev": true
     },
     "wrap-ansi": {

+ 2 - 1
package.json

@@ -3,7 +3,7 @@
   "private": true,
   "version": "0.0.0",
   "scripts": {
-    "dev": "vite",
+    "dev": "vite --port 3000",
     "build:dev": "vite build --mode development",
     "build:test": "vite build --mode test",
     "build:prod": "vite build --mode production",
@@ -43,6 +43,7 @@
     "sass": "^1.54.0",
     "splitpanes": "^3.1.1",
     "svg-sprite-loader": "^6.0.11",
+    "terser": "^5.21.0",
     "vue": "^3.2.39",
     "vue-cropper": "^1.0.3",
     "vue-cropperjs": "^5.0.0",

+ 13 - 0
src/api/player.ts

@@ -156,4 +156,17 @@ export default {
             data
         });
     },
+    copeRole(data) {
+        return request({
+            url: '/player/copeRole',
+            method: 'post',
+            data
+        });
+    },
+    getSrvList() {
+        return request({
+            url: '/server/getSrvList',
+            method: 'get'
+        });
+    },
 }

+ 4 - 0
src/api/request.ts

@@ -5,8 +5,12 @@ import { useUserStore } from "@/store/modules/user"
 const service = axios.create({
     // 默认请求地址,根据环境的不同可在.env 文件中进行修改
     // baseURL: import.meta.env.VUE_APP_BASE_
+<<<<<<< HEAD
+    baseURL: "http://127.0.0.1:8001",
+=======
     // baseURL: "http://192.168.123.216:8001",
     baseURL: "http://localhost:8001",
+>>>>>>> 83777844e09988e24905ecf02745f7a18b021ade
     // 设置接口访问超时时间
     timeout: 3000000, // request timeout,
     // 跨域时候允许携带凭证

+ 2 - 2
src/components/Theme/index.vue

@@ -1,6 +1,6 @@
 <template>
   <div>
-    <div class="m-setting-fix">
+    <!-- <div class="m-setting-fix">
       <div class="item">
         <div class="item-child" @click="operator(1)">
           <el-icon size="30" color="#3698fd" style="margin-bottom: 8px"><brush /></el-icon>
@@ -11,7 +11,7 @@
           源码拷贝
         </div>
       </div>
-    </div>
+    </div> -->
     <el-drawer
         v-model="drawer" title="主题配置" size="300px">
       <div class="theme-item">

+ 9 - 4
src/components/player/BPInfo/index.vue

@@ -159,7 +159,8 @@ const addBps = () => {
 const editBps = (row: any) => {
     let data = {
         playerId: props.ruleForm.id,
-        bluePrintId: row.bid
+        bluePrintId: row.bid,
+        srvI:props.ruleForm.gId
     }
 
     playerApi.makeBps(data).then((resp) => {
@@ -184,7 +185,8 @@ const saveBps = () => {
     if (addDisabled.value) { //默认添加图纸
         let data = {
             playerId: props.ruleForm.id,
-            bluePrintId: bpsId.value
+            bluePrintId: bpsId.value,
+            srvId:props.ruleForm.gId
         }
 
         playerApi.addBps(data).then((resp) => {
@@ -201,7 +203,8 @@ const saveBps = () => {
             playerId: props.ruleForm.id,
             heroID: hrsId.value,
             heroLv: hrsLv.value,
-            heroAlv: hrsAlv.value
+            heroAlv: hrsAlv.value,
+            srvId:props.ruleForm.gId
         }
 
         playerApi.editHrs(data).then((resp) => {
@@ -233,7 +236,8 @@ const delBps = (row: any) => {
     }).then(() => {
         let data = {
             playerId: props.ruleForm.id,
-            bluePrintId: row.bid
+            bluePrintId: row.bid,
+            srvId:props.ruleForm.gId
         }
 
         playerApi.delBps(data).then((resp) => {
@@ -323,6 +327,7 @@ const handleSizeChange = (e) => {
     width: 200px;
     justify-content: space-between;
     align-items: center;
+    margin-bottom: 10px; /* 设置向下间距为 10 像素 */
 }
 
 .container .el-input {

+ 9 - 6
src/components/player/heroInfo/index.vue

@@ -12,7 +12,7 @@
         <el-table-column prop="id" label="ID" class="centered-content" align="center" />
         <!-- <el-table-column prop="name" label="英雄名称" class="centered-content" align="center"/> -->
         <el-table-column prop="lv" label="英雄等级" class="centered-content" align="center" />
-        <el-table-column prop="alv" label="英雄级" class="centered-content" align="center" />
+        <el-table-column prop="alv" label="英雄觉醒等级" class="centered-content" align="center" />
 
         <el-table-column label="操作" width="180" align="center">
             <template #default="scope" >
@@ -49,11 +49,11 @@
                 style="width: 200px;position: relative; left: 28px;" />
         </el-form-item> -->
         <el-form-item label="英雄等级">
-            <el-input v-model="hrsLv" placeholder="输入英雄等级" :disabled="addDisabled" :maxlength="5"
+            <el-input-number v-model="hrsLv" placeholder="输入英雄等级" :disabled="addDisabled" :max="100" :min="1" :maxlength="5"
                 style="width: 200px;position: relative; left: 28px;" />
         </el-form-item>
         <el-form-item label="英雄觉醒等级">
-            <el-input v-model="hrsAlv" placeholder="输入英雄觉醒等级" :disabled="addDisabled" :maxlength="5" style="width: 200px" />
+            <el-input-number v-model="hrsAlv" placeholder="输入英雄觉醒等级"  :disabled="addDisabled" :max="19" :min="1" style="width: 200px" />
         </el-form-item>
 
 
@@ -168,7 +168,8 @@ const saveHrs = () => {
     if (addDisabled.value) { //默认添加英雄
         let data = {
             playerId: props.ruleForm.id,
-            heroID: hrsId.value
+            heroID: hrsId.value,
+            srvId:props.ruleForm.gId
         }
 
         playerApi.addHrs(data).then((resp) => {
@@ -186,7 +187,8 @@ const saveHrs = () => {
             playerId: props.ruleForm.id,
             heroID: hrsId.value,
             heroLv: hrsLv.value,
-            heroAlv: hrsAlv.value
+            heroAlv: hrsAlv.value,
+            srvId:props.ruleForm.gId
         }
 
         playerApi.editHrs(data).then((resp) => {
@@ -218,7 +220,8 @@ const delHrs = (row: any) => {
     }).then(() => {
         let data = {
             playerId: props.ruleForm.id,
-            heroID: row.id
+            heroID: row.id,
+            srvId:props.ruleForm.gId
         }
 
         playerApi.delHrs(data).then((resp) => {

+ 18 - 9
src/components/player/itemInfo/index.vue

@@ -20,7 +20,7 @@
                 <template v-else>
                     <div class="con">
                         <div class="input-container">
-                            <el-input v-model="scope.row.count" placeholder="count" />
+                            <el-input-number v-model="scope.row.tempCount" placeholder="count" />
                         </div>
                         <div class="button-container">
                             <el-button @click="handleSaveClick(scope.row)" type="success" :icon="Check" circle />
@@ -44,7 +44,7 @@
     <el-dialog :title="dialogTitle" v-model="showModal" @close="closeModal" width="350px">
 
         <el-form-item label="道具ID">
-            <el-input v-model="itemId" placeholder="输入道具ID" :maxlength="5"
+            <el-input v-model="itemId" placeholder="输入道具ID" :maxlength="10"
                 style="width: 200px;position: relative; left: 41.219px;" />
         </el-form-item>
         <el-form-item label="道具数量">
@@ -102,7 +102,7 @@ const tableData = () => {
         state.total = its.length;
 
     }
-    
+
     return its.filter(
         (item, index) =>
             index < state.page * state.limit &&
@@ -120,9 +120,12 @@ const editItem = (row: any) => {
         let data = {
             playerId: props.ruleForm.id,
             itemId: row.id,
-            itemNum: row.count
+            itemNum: row.count,
+            srvId: props.ruleForm.gId
         }
 
+        console.log(data);
+        
         let resp = playerApi.delPlayerItem(data);
 
         ElMessage({
@@ -152,14 +155,16 @@ const saveItem = () => {
     let data = {
         playerId: props.ruleForm.id,
         itemId: itemId.value,
-        itemNum: itemNum.value
+        itemNum: itemNum.value,
+        srvId: props.ruleForm.gId
     }
-
+    
     playerApi.addPlayerItem(data).then((resp) => {
         let data = resp.data.result;
-        if (data === '道具添加失败') {
+
+        if (data === '道具添加失败' || data === '已拥有该道具') {
             ElMessage({
-                message: "道具添加失败",
+                message: data,
                 type: 'error',
                 duration: 3000
             });
@@ -183,6 +188,7 @@ const handleSizeChange = (e) => {
 // 道具修改
 const handlEditClick = (row: any) => {
     row.editing = true;
+    row.tempCount = row.count;
 };
 
 const handleSaveClick = (row: any) => {
@@ -196,11 +202,13 @@ const handleSaveClick = (row: any) => {
         let data = {
             playerId: props.ruleForm.id,
             itemId: row.id,
-            itemNum: row.count
+            itemNum: row.tempCount,
+            srvId: props.ruleForm.gId
         }
 
         let resp = playerApi.editPlayerItem(data);
 
+        row.count = row.tempCount;
         ElMessage({
             message: "修改成功",
             type: 'info',
@@ -211,6 +219,7 @@ const handleSaveClick = (row: any) => {
 
 const handleCancelClick = (row: any) => {
     row.editing = false;
+    row.tempCount = row.count;
 };
 </script>
 

+ 63 - 15
src/components/player/msaInfo/index.vue

@@ -1,8 +1,11 @@
 <template>
-    <div class="container">
+    <div class="msaContainer">
         <!-- 搜索框 -->
         <el-input v-model="search" placeholder="输入关键字" :maxlength="20" />
-
+        <el-select v-model="msaTyp" placeholder="关卡类型" @change="tableData" class="searchButton">
+            <el-option v-for="option in msaOptions" :key="option.value" :label="option.label"
+                :value="option.value"></el-option>
+        </el-select>
         <el-button class="searchButton" @click="tableData()" type="primary">搜索</el-button>
         <el-button class="addButton" @click="showModal = true" type="primary">添加关卡</el-button>
     </div>
@@ -20,6 +23,9 @@
         <el-table-column prop="sty" label="关卡类型" class="centered-content" align="center">
             <template #default="scope">
                 <span v-if="scope.row.sty === 1">主线关卡</span>
+                <span v-else-if="scope.row.sty === 2">支线关卡</span>
+                <span v-else-if="scope.row.sty === 10">藏宝图</span>
+                <span v-else-if="scope.row.sty === 11">RogueLike</span>
                 <span v-else>支线关卡</span>
             </template>
         </el-table-column>
@@ -63,7 +69,7 @@
                 style="width: 200px;position: relative; left: 41.219px;" />
 
         </el-form-item>
-    
+
         <span slot="footer" class="dialog-footer" style="position: absolute; right: 20px; bottom: 10px;">
             <el-button type="primary" @click="addUsa">保存</el-button>
             <el-button @click="closeModal">关闭</el-button>
@@ -90,7 +96,26 @@ const props = defineProps({
 });
 
 const showModal = ref<Boolean>(false);
-
+const msaTyp = ref(0);
+const msaOptions = [{
+    'label': "未选择",
+    'value': 0
+}, {
+    'label': "主线关卡",
+    'value': 1
+}, {
+    'label': "支线关卡",
+    'value': 2
+
+},{
+    'label': "藏宝图",
+    'value': 10
+
+},{
+    'label': "Rogue",
+    'value': 11
+
+}];
 const search = ref("");
 
 const msaId = ref("");
@@ -103,19 +128,36 @@ const state = reactive({
 
 
 
-const tableData = () => {
+const tableData = () => {    
     let msa: any = [];
-    if (search.value == "") {
+    let checkTyp = msaTyp.value;
+    if (search.value == "" && checkTyp == 0) {
         state.total = props.msa.length;
         msa = props.msa;
-    } else {
+    } else if (search.value == "" && checkTyp != 0) {
+        const regex = new RegExp(`^${checkTyp}$`, 'i');
+        msa = props.msa.filter(
+            (item: { id: string, sty: string }, index) => {
+                return regex.test(item.sty);
+            }
+        );
+        state.total = msa.length;
+    } else if (search.value != "" && checkTyp == 0) {
         const regex = new RegExp(search.value, 'i');
         msa = props.msa.filter(
-            (item: { id: string }, index) => {
+            (item: { id: string, sty: string }, index) => {
                 return regex.test(item.id);
             }
         );
         state.total = msa.length;
+    } else {
+        const regex = new RegExp(search.value, 'i');
+        msa = props.msa.filter(
+            (item: { id: string, sty: string }, index) => {
+                return regex.test(item.id) && (item.sty == checkTyp + "");
+            }
+        );
+        state.total = msa.length;
 
     }
 
@@ -149,7 +191,8 @@ const addUsa = () => {
     if (uhs != "" || uhs != null) {
         let data = {
             playerId: props.ruleForm.id,
-            uhs: uhs
+            uhs: uhs,
+            srvId:props.ruleForm.gId
         }
 
         playerApi.addMsa(data).then((resp) => {
@@ -176,7 +219,8 @@ const completeMsa = (row: any) => {
     }).then(() => {
         let data = {
             playerId: props.ruleForm.id,
-            msaId: row.id
+            msaId: row.id,
+            srvId:props.ruleForm.gId
         }
 
         let resp = playerApi.completeMsa(data);
@@ -200,7 +244,8 @@ const resetMsa = (row: any) => {
     }).then(() => {
         let data = {
             playerId: props.ruleForm.id,
-            uhs: row.id
+            uhs: row.id,
+            srvId:props.ruleForm.gId
         }
 
         let resp = playerApi.resetMsa(data);
@@ -223,7 +268,8 @@ const delMsa = (row: any) => {
     }).then(() => {
         let data = {
             playerId: props.ruleForm.id,
-            index: row.id
+            index: row.id,
+            srvId:props.ruleForm.gId
         }
 
         let resp = playerApi.delMsa(data);
@@ -274,7 +320,8 @@ const handleSizeChange = (e) => {
 }
 
 .searchButton {
-    margin-right: 20px;
+    margin-right: 10px;
+    margin-left: 10px;
     /* 调整搜索按钮的右侧间距 */
 }
 
@@ -292,12 +339,13 @@ const handleSizeChange = (e) => {
     margin-right: 0;
 }
 
-.container {
+.msaContainer {
     display: flex;
     align-items: center;
-    width: 200px;
+    width: 400px;
     justify-content: space-between;
     align-items: center;
+    margin-bottom: 10px; /* 设置向下间距为 10 像素 */
 }
 
 .edit-button {

+ 52 - 27
src/components/player/playerInfo/index.vue

@@ -2,89 +2,85 @@
     <div style="max-width: 1700px;">
         <el-form ref="ruleFormRef" :model="ruleForm" :rules="rules" label-width="70px" class="demo-ruleForm"
             :size="formSize">
-            <el-form-item :inline="true">
+            <el-form-item :inline="true" class="inputStyle">
                 <el-form-item label="玩家ID" prop="id">
-                    <el-input v-model="ruleForm.id" style="width: 120px;" :disabled="true" />
+                    <el-input v-model="ruleForm.id" :disabled="true" />
                 </el-form-item>
 
                 <el-form-item label="账号ID" prop="aId">
-                    <el-input v-model="ruleForm.aId" style="width: 120px;" :disabled="true" />
+                    <el-input v-model="ruleForm.aId" :disabled="true" />
                 </el-form-item>
 
                 <el-form-item label="角色名" prop="nm">
-                    <el-input v-model="ruleForm.nm" style="width: 120px;" />
+                    <el-input v-model="ruleForm.nm" />
                 </el-form-item>
 
                 <el-form-item label="游戏服" prop="gId">
-                    <el-input v-model="ruleForm.gId" style="width: 120px;" :disabled="true" />
+                    <el-input v-model="ruleForm.gId" :disabled="true" />
                 </el-form-item>
 
                 <el-form-item label="等级" prop="lv">
-                    <el-input v-model="ruleForm.lv" style="width: 120px;" />
+                    <el-input v-model="ruleForm.lv" />
                 </el-form-item>
 
                 <el-form-item label="vip等级" prop="vLv">
-                    <el-input v-model="ruleForm.vLv" style="width: 120px;" :disabled="true" />
+                    <el-input v-model="ruleForm.vLv" :disabled="true" />
                 </el-form-item>
 
                 <el-form-item label="战斗力" prop="tmp">
-                    <el-input v-model="ruleForm.tmp" style="width: 120px;" :disabled="true" />
+                    <el-input v-model="ruleForm.tmp" :disabled="true" />
                 </el-form-item>
 
                 <el-form-item label="总充值" prop="atu">
-                    <el-input v-model="ruleForm.atu" style="width: 120px;" :disabled="true" />
+                    <el-input v-model="ruleForm.atu" :disabled="true" />
                 </el-form-item>
-            </el-form-item>
 
-            <el-form-item :inline="true">
                 <el-form-item label="公会" prop="gld">
-                    <el-input v-model="ruleForm.gld" style="width: 120px;" :disabled="true" />
+                    <el-input v-model="ruleForm.gld" :disabled="true" />
                 </el-form-item>
 
                 <el-form-item label="封号截至" prop="btm">
-                    <el-input v-model="ruleForm.btm" style="width: 120px;" :disabled="true" />
+                    <el-input v-model="ruleForm.btm" :disabled="true" />
                 </el-form-item>
 
                 <el-form-item label="封号理由" prop="btn">
-                    <el-input v-model="ruleForm.btn" style="width: 120px;" :disabled="true" />
+                    <el-input v-model="ruleForm.btn" :disabled="true" />
                 </el-form-item>
 
                 <el-form-item label="禁言截止" prop="stm">
-                    <el-input v-model="ruleForm.stm" style="width: 120px;" :disabled="true" />
+                    <el-input v-model="ruleForm.stm" :disabled="true" />
                 </el-form-item>
 
                 <el-form-item label="禁言理由" prop="stn">
-                    <el-input v-model="ruleForm.stn" style="width: 120px;" :disabled="true" />
+                    <el-input v-model="ruleForm.stn" :disabled="true" />
                 </el-form-item>
 
                 <el-form-item label="深渊层数" prop="aby">
-                    <el-input v-model="ruleForm.aby" style="width: 120px;" :disabled="true" />
+                    <el-input v-model="ruleForm.aby" :disabled="true" />
                 </el-form-item>
 
                 <el-form-item label="注册时间" prop="ctm">
-                    <el-input v-model="ruleForm.ctm" style="width: 120px;" :disabled="true" />
+                    <el-input v-model="ruleForm.ctm" :disabled="true" />
                 </el-form-item>
 
                 <el-form-item label="最近登录" prop="llTm">
-                    <el-input v-model="ruleForm.llTm" style="width: 120px;" :disabled="true" />
+                    <el-input v-model="ruleForm.llTm" :disabled="true" />
                 </el-form-item>
-            </el-form-item>
 
-            <el-form-item :inline="true">
                 <el-form-item label="最近登出" prop="luTm">
-                    <el-input v-model="ruleForm.luTm" style="width: 120px;" :disabled="true" />
+                    <el-input v-model="ruleForm.luTm" :disabled="true" />
                 </el-form-item>
-
             </el-form-item>
 
             <el-form-item>
-                <el-button type="primary" style="" @click="submitForm()" round>保存信息</el-button>
+                <el-button type="primary" class="saveButton" @click="submitForm()" round>保存信息</el-button>
             </el-form-item>
         </el-form>
     </div>
 </template>
 
 <script lang="ts" setup name="inline-table">
+import { ElMessage } from 'element-plus';
 import { reactive, ref } from 'vue'
 import playerApi from '@/api/player'
 
@@ -100,11 +96,40 @@ const submitForm = () => {
     let data = {
         playerId: props.ruleForm.id,
         name: props.ruleForm.nm,
-        playerLv: props.ruleForm.lv
+        playerLv: props.ruleForm.lv,
+        srvId:props.ruleForm.gId
     }
-    playerApi.editPlayerInfo(data);
+    playerApi.editPlayerInfo(data).then((resp) => {
+        let result = resp.data.result + "";
+        let jsonData = JSON.parse(result);
+        if (jsonData.msg === '修改角色信息失败' || jsonData.msg === '参数错误') {
+            ElMessage({
+                message: jsonData.msg + "",
+                type: 'error',
+                duration: 3000
+            });
+        } else {
+            ElMessage({
+                message: jsonData.msg + "",
+                type: 'success',
+                duration: 3000
+            });
+        }
+    });
 }
 
 const formSize = ref('default')
 
-</script>
+</script>
+
+<style>
+.inputStyle .el-input {
+    margin-bottom: 10px;
+    width: 155px;
+}
+
+.saveButton {
+    position: absolute;
+    right: 50px;
+}
+</style>

+ 28 - 17
src/components/player/relicInfo/index.vue

@@ -337,7 +337,7 @@ const rdm4Dis = ref<Boolean>(false); // 副词条4
 const rdmOpenType = ref<Number>(0);
 const existRdm = reactive([]);  // 已存在的副词条属性
 
-const rdmTyp = ref("");
+const rdmTyp = ref<Number>(0);
 const rdmVal = ref<Number>(0);
 const rdmsTs = ref<Number>(0);
 const rdmOptions = reactive([]);
@@ -440,7 +440,8 @@ const tableData = () => {
 
 const inputChange = (val) => {
     let data = {
-        itemID: val + ""
+        itemID: val + "",
+        srvId:props.ruleForm.gId
     }
 
     playerApi.getRls(data).then((resp) => {
@@ -485,7 +486,8 @@ const inputChange = (val) => {
 const lvChange = (val) => {
     let data = {
         itemID: rlsiId.value,
-        changeLv: val + ""
+        changeLv: val + "",
+        srvId:props.ruleForm.gId
     }
     if (val > 0) {
         playerApi.rlsChangeLv(data).then((resp) => {
@@ -518,7 +520,8 @@ const openModal = (row, item, index, event) => {
     rdmOptions.splice(0, rdmOptions.length);
     // 获取部位能选择的参数
     let data = {
-        partType: row.etp
+        partType: row.etp,
+        srvId:props.ruleForm.gId
     }
 
     // 移除已经存在的词条
@@ -557,8 +560,8 @@ const editRdm1 = () => {
     rdmModal.value = true;
 
     rdmTyp.value = parseInt(item[0]);
-    rdmVal.value = item[1];
-    rdmsTs.value = item[2];
+    rdmVal.value = parseInt(item[1]);
+    rdmsTs.value = parseInt(item[2]);
     let option = {
         'label': attrJson[rdmTyp.value],
         'value': rdmTyp.value
@@ -578,8 +581,8 @@ const editRdm2 = () => {
     rdmModal.value = true;
 
     rdmTyp.value = parseInt(item[0]);
-    rdmVal.value = item[1];
-    rdmsTs.value = item[2];
+    rdmVal.value = parseInt(item[1]);
+    rdmsTs.value = parseInt(item[2]);
 }
 
 const editRdm3 = () => {
@@ -590,8 +593,8 @@ const editRdm3 = () => {
     rdmModal.value = true;
 
     rdmTyp.value = parseInt(item[0]);
-    rdmVal.value = item[1];
-    rdmsTs.value = item[2];
+    rdmVal.value = parseInt(item[1]);
+    rdmsTs.value = parseInt(item[2]);
 }
 
 const editRdm4 = () => {
@@ -603,8 +606,8 @@ const editRdm4 = () => {
     console.log(item);
 
     rdmTyp.value = parseInt(item[0]);
-    rdmVal.value = item[1];
-    rdmsTs.value = item[2];
+    rdmVal.value = parseInt(item[1]);
+    rdmsTs.value = parseInt(item[2]);
 }
 
 const openRlsModal = () => {
@@ -656,7 +659,8 @@ const saveRdm = () => {
         rdmVal: rdmVal.value,
         rdmsTs: rdmsTs.value,
         rlsId: rlsId.value,
-        rdmIndex: rdmIndex.value
+        rdmIndex: rdmIndex.value,
+        srvId:props.ruleForm.gId
     }
 
     if (rdmOpenType.value == 1) {
@@ -717,6 +721,9 @@ const closeModal = () => {
     rlsiId.value = null
     rlsLv.value = null
     rlsAlv.value = null
+    rlsExp.value = null;
+    rlsAttr.value = null;
+    rlsAttrV.value = null;
     rdm1.value = null;
     rdm2.value = null;
     rdm3.value = null;
@@ -799,7 +806,8 @@ const editrls = (row: any) => {
     }
 
     let data = {
-        partType: row.etp
+        partType: row.etp,
+        srvId:props.ruleForm.gId
     }
 
     playerApi.getPart(data).then((resp) => {
@@ -853,7 +861,8 @@ const saverls = () => {
                 rdm2: rdm2.value,
                 rdm3: rdm3.value,
                 rdm4: rdm4.value,
-                relicNum: rlsCount.value
+                relicNum: rlsCount.value,
+                srvId:props.ruleForm.gId
             }
 
             playerApi.addRelic(data).then((resp) => {
@@ -885,7 +894,8 @@ const saverls = () => {
             rdm1: rdm1.value,
             rdm2: rdm2.value,
             rdm3: rdm3.value,
-            rdm4: rdm4.value
+            rdm4: rdm4.value,
+            srvId:props.ruleForm.gId
         }
 
         playerApi.editRelic(data).then((resp) => {
@@ -916,7 +926,8 @@ const delRls = (row: any) => {
     }).then(() => {
         let data = {
             playerId: props.ruleForm.id,
-            relicId: row.id
+            relicId: row.id,
+            srvId:props.ruleForm.gId
         }
 
         playerApi.delRls(data).then((resp) => {

+ 1 - 1
src/layout/components/Header/ToolRight.vue

@@ -2,7 +2,7 @@
   <div class="m-tool-right">
     <GlobalComSize class="item-children"/>
     <HeaderSearch class="item-children"/>
-    <Remind class="item-children"/>
+    <!-- <Remind class="item-children"/> -->
     <ScreenFull class="item-children"/>
     <Setting class="item-children"/>
     <Avatar/>

+ 1 - 1
src/layout/components/Sidebar/components/Logo.vue

@@ -6,7 +6,7 @@
       </router-link>
       <router-link v-else key="expand" class="sidebar-logo-link" to="/">
         <img src="@/assets/image/logo.png" class="sidebar-logo">
-        <h1 class="sidebar-title">Vue Admin Perfect</h1>
+        <h1 class="sidebar-title">  Fort23 GM Tools</h1>
       </router-link>
     </transition>
   </div>

+ 15 - 0
src/routers/modules/operation.ts

@@ -47,6 +47,20 @@ const operationRouter = [{
             name: 'whitelist',
             meta: { title: '白名单', keepAlive: true , icon: 'User'}
         },
+<<<<<<< HEAD
+        // {
+        //     path: '/operation/sendmail',
+        //     component: () => import('@/views/operation/sendmail/index.vue'),
+        //     name: 'sendmail',
+        //     meta: { title: '发送邮件', keepAlive: true , icon: 'MenuIcon'}
+        // },
+        // {
+        //     path: '/operation/notice',
+        //     component: () => import('@/views/operation/notice/index.vue'),
+        //     name: 'notice',
+        //     meta: { title: '游戏公告', keepAlive: true  , icon: 'MenuIcon'}
+        // },
+=======
         {
             path: '/operation/gmmail',
             component: () => import('@/views/operation/gmmail/index.vue'),
@@ -65,6 +79,7 @@ const operationRouter = [{
           name: 'sendcmd',
           meta: { title: '发送命令', keepAlive: true  , icon: 'Monitor'}
       },
+>>>>>>> 83777844e09988e24905ecf02745f7a18b021ade
     ]
 }]
 

+ 77 - 6
src/views/player/index.vue

@@ -3,11 +3,17 @@
     <div class="header">
       <el-form :inline="true" :model="formInline1">
         <el-form-item label="玩家Id">
-          <el-input v-model="formInline1.playerId" placeholder="请输入玩家ID" />
+          <el-input v-model="formInline1.playerId" placeholder="请输入玩家ID" @keyup.enter="onSubmit" />
         </el-form-item>
+
+
         <el-form-item>
           <el-button type="primary" @click="onSubmit">查询</el-button>
         </el-form-item>
+
+        <el-form-item>
+          <el-button type="primary" @click="cpPlayer">复制账号</el-button>
+        </el-form-item>
       </el-form>
     </div>
 
@@ -34,6 +40,24 @@
       </el-collapse>
     </div>
   </div>
+
+  <!-- 模态框 -->
+  <el-dialog title="复制账号" v-model="showModal" @close="closeModal" width="350px">
+    <el-form-item label="复制玩家">
+      <el-input v-model="fromPlayerID" placeholder="输入复制玩家ID" :maxlength="8"
+        style="width: 200px;position: relative; left: 20px;" />
+    </el-form-item>
+    <el-form-item label="目标玩家">
+      <el-input v-model="toPlayerID" placeholder="输入目标玩家ID" :maxlength="8"
+        style="width: 200px;position: relative; left: 20px;" />
+    </el-form-item>
+
+
+    <span slot="footer" class="dialog-footer" style="position: absolute; right: 20px; bottom: 10px;">
+      <el-button type="primary" @click="savePlayer">复制</el-button>
+      <el-button @click="closeModal">关闭</el-button>
+    </span>
+  </el-dialog>
 </template>
 
 <script lang="ts" setup name="inline-table">
@@ -44,15 +68,19 @@ import heroInfo from "@/components/player/heroInfo/index.vue"
 import bpInfo from "@/components/player/BPInfo/index.vue"
 import relicInfo from "@/components/player/relicInfo/index.vue"
 import { reactive, ref, toRefs, defineEmits } from 'vue'
-import { FormInstance } from 'element-plus'
+import { FormInstance, ElMessage } from 'element-plus'
 import playerApi from '@/api/player'
 import { formatDate } from '../../common/date'
 
 const formInline1 = reactive({
-  playerId: '',
+  playerId: ''
 })
 
+const fromPlayerID = ref("");
+const toPlayerID = ref("");
 const collapse = ref('0');
+const showModal = ref<Boolean>(false);
+
 
 const ruleForm = reactive({
   id: '',
@@ -74,7 +102,6 @@ const ruleForm = reactive({
   luTm: ''
 });
 
-// const page = ref(1);
 const its = reactive([]);
 
 const msa = reactive([]);
@@ -108,12 +135,18 @@ const onSubmit = async () => {
     ruleForm.aby = jsonData.aby == null ? 0 : jsonData.aby;
     ruleForm.ctm = jsonData.ctm == null ? '无' : formatDate(new Date(jsonData.ctm * 1000), 'yyyy-MM-dd hh:mm:ss');
     ruleForm.llTm = jsonData.llTm == null ? '无' : formatDate(new Date(jsonData.llTm * 1000), 'yyyy-MM-dd hh:mm:ss');
-    ruleForm.luTm = jsonData.luTm == null ? '无' : formatDate(new Date(jsonData.luTm * 1000), 'yyyy-MM-dd hh:mm:ss');
+    if (jsonData.luTm == 0) {
+      ruleForm.luTm = '在线'
+    } else {
+      ruleForm.luTm = jsonData.luTm == null ? '无' : formatDate(new Date(jsonData.luTm * 1000), 'yyyy-MM-dd hh:mm:ss');
+    }
+
 
     const itemKeys = Object.keys(jsonData.its);
     for (let i = 0; i < itemKeys.length; i++) {
       const json = jsonData.its[itemKeys[i]];
       json['editing'] = false;
+      json['tempCount'] = json['count'];
       json['id'] = itemKeys[i];
     }
     console.log(jsonData);
@@ -153,14 +186,52 @@ const onSubmit = async () => {
   }
 }
 
+const cpPlayer = () => {
+  showModal.value = true;
+}
+
+const savePlayer = () => {
+  let data = {
+    fromPlayerID: fromPlayerID.value,
+    toPlayerID: toPlayerID.value,
+    srvI:ruleForm.gId
+  }
+
+  playerApi.copeRole(data).then((resp) => {
+    let msg = resp.data.result;
+    if (msg === '角色拷贝成功') {
+      ElMessage({
+        message: "角色拷贝成功",
+        type: 'success',
+        duration: 3000
+      });
+      showModal.value = false;
+    } else {
+      ElMessage({
+        message: "角色拷贝失败",
+        type: 'error',
+        duration: 3000
+      });
+    }
+  });
+}
+
+const closeModal = () => {
+  fromPlayerID.value = "";
+  toPlayerID.value = "";
+  showModal.value = false;
+}
+
 const handleCustomEvent = (data: string) => {
   msa.push(JSON.parse(data));
 }
 
 const addItem = (data: any) => {
   let jsonData = JSON.parse(data);
+  const count = jsonData['count'];
+  jsonData['count'] = count['$numberLong']
+  jsonData['tempCount'] = count['$numberLong']
   its.push(jsonData);
-  console.log(jsonData);
 }
 
 const bpsEvent = (data: string) => {

+ 38 - 34
vite.config.ts

@@ -1,4 +1,4 @@
-import { defineConfig,ConfigEnv, UserConfig,loadEnv  } from 'vite'
+import { defineConfig, ConfigEnv, UserConfig, loadEnv } from 'vite'
 import path from 'path'
 // vite.config.ts中无法使用import.meta.env 所以需要引入
 import vue from '@vitejs/plugin-vue'
@@ -12,7 +12,7 @@ import viteCompression from 'vite-plugin-compression'
 // import Components from 'unplugin-vue-components/vite'
 //import { ElementPlusResolver } from 'unplugin-vue-components/resolvers'
 
-function resolve (dir) {
+function resolve(dir) {
   return path.join(__dirname, '.', dir)
 }
 
@@ -20,28 +20,28 @@ function resolve (dir) {
 export default defineConfig(({ mode }: ConfigEnv): UserConfig => {
   return {
     plugins: [vue(),
-      vueSetupExtend(),
-      // AutoImport({
-      //   resolvers: [ElementPlusResolver()],
-      // }),
-      // Components({
-      //   resolvers: [ElementPlusResolver()],
-      // }),
-      // * 使用 svg 图标
-      createSvgIconsPlugin({
-        // 指定需要缓存的图标文件夹
-        iconDirs: [path.resolve(process.cwd(), 'src/icons/svg')],
-        // 指定symbolId格式
-        symbolId: 'icon-[dir]-[name]',
-      }),
-      // gzip压缩 生产环境生成 .gz 文件
-      mode==='production'&&viteCompression({
-         verbose: true,
-         disable: false,
-         threshold: 10240,
-         algorithm: 'gzip',
-         ext: '.gz',
-       }),
+    vueSetupExtend(),
+    // AutoImport({
+    //   resolvers: [ElementPlusResolver()],
+    // }),
+    // Components({
+    //   resolvers: [ElementPlusResolver()],
+    // }),
+    // * 使用 svg 图标
+    createSvgIconsPlugin({
+      // 指定需要缓存的图标文件夹
+      iconDirs: [path.resolve(process.cwd(), 'src/icons/svg')],
+      // 指定symbolId格式
+      symbolId: 'icon-[dir]-[name]',
+    }),
+    // gzip压缩 生产环境生成 .gz 文件
+    mode === 'production' && viteCompression({
+      verbose: true,
+      disable: false,
+      threshold: 10240,
+      algorithm: 'gzip',
+      ext: '.gz',
+    }),
     ],
     css: {
       preprocessorOptions: {
@@ -53,8 +53,8 @@ export default defineConfig(({ mode }: ConfigEnv): UserConfig => {
     // 配置别名
     resolve: {
       alias: {
-        '@':resolve('src'),
-        'static':resolve('public/static'),
+        '@': resolve('src'),
+        'static': resolve('public/static'),
       },
       // 忽略后缀名的配置选项, 添加 .vue 选项时要记得原本默认忽略的选项也要手动写入
       extensions: ['.mjs', '.js', '.ts', '.jsx', '.tsx', '.json', '.vue'],
@@ -82,14 +82,18 @@ export default defineConfig(({ mode }: ConfigEnv): UserConfig => {
     //   pure:mode==='production' ? ["console.log", "debugger"] : []
     // },
 
-    // build: {
-    //   terserOptions: {
-    //     compress: {
-    //       drop_console: true,
-    //       drop_debugger: true,
-    //     },
-    //   },
-    // },
+    build: {
+      minify:"terser",
+      outDir: 'dist',
+      assetsDir: 'assets',
+      sourcemap: false,
+      terserOptions: {
+        compress: {
+          drop_console: true,
+          drop_debugger: true,
+        },
+      },
+    },
   }
 
 })