fix: 修改初始化页面菜单数据

This commit is contained in:
xiongqian 2023-01-18 10:44:42 +08:00
parent e01ab75de9
commit 9cbabbeab3
5 changed files with 4941 additions and 4350 deletions

324
package-lock.json generated
View File

@ -24,7 +24,8 @@
"unplugin-auto-import": "^0.12.1",
"unplugin-vue-components": "^0.22.12",
"vue": "^3.2.45",
"vue-router": "^4.1.6"
"vue-router": "^4.1.6",
"vue3-markdown-it": "^1.0.10"
},
"devDependencies": {
"@commitlint/cli": "^17.4.1",
@ -1481,6 +1482,12 @@
"resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.0.tgz",
"integrity": "sha512-WulqXMDUTYAXCjZnk6JtIHPigp55cVtDgDrO2gHRwhyJto21+1zbVCtOYB2L1F9w4qCQ0rOGWBnBe0FNTiEJIQ=="
},
"node_modules/@types/linkify-it": {
"version": "3.0.2",
"resolved": "https://registry.npmmirror.com/@types/linkify-it/-/linkify-it-3.0.2.tgz",
"integrity": "sha512-HZQYqbiFVWufzCwexrvh694SOim8z2d+xJl5UNamcvQFejLY/2YUtzXHYi3cHdI7PMlS8ejH2slRAOJQ32aNbA==",
"peer": true
},
"node_modules/@types/lodash": {
"version": "4.14.191",
"resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.191.tgz",
@ -1496,6 +1503,22 @@
"@types/lodash": "*"
}
},
"node_modules/@types/markdown-it": {
"version": "12.2.3",
"resolved": "https://registry.npmmirror.com/@types/markdown-it/-/markdown-it-12.2.3.tgz",
"integrity": "sha512-GKMHFfv3458yYy+v/N8gjufHO6MSZKCOXpZc5GXIWWy8uldwfmPn98vp81gZ5f9SVw8YYBctgfJ22a2d7AOMeQ==",
"peer": true,
"dependencies": {
"@types/linkify-it": "*",
"@types/mdurl": "*"
}
},
"node_modules/@types/mdurl": {
"version": "1.0.2",
"resolved": "https://registry.npmmirror.com/@types/mdurl/-/mdurl-1.0.2.tgz",
"integrity": "sha512-eC4U9MlIcu2q0KQmXszyn5Akca/0jrQmwDRgpAMJai7qBWq4amIQhZyNau4VYGtCeALvW1/NtjzJJ567aZxfKA==",
"peer": true
},
"node_modules/@types/minimist": {
"version": "1.2.2",
"resolved": "https://registry.npmmirror.com/@types/minimist/-/minimist-1.2.2.tgz",
@ -1998,8 +2021,7 @@
"node_modules/argparse": {
"version": "2.0.1",
"resolved": "https://registry.npmmirror.com/argparse/-/argparse-2.0.1.tgz",
"integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==",
"dev": true
"integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q=="
},
"node_modules/array-ify": {
"version": "1.0.0",
@ -3883,6 +3905,14 @@
"tslib": "^2.0.3"
}
},
"node_modules/highlight.js": {
"version": "11.7.0",
"resolved": "https://registry.npmmirror.com/highlight.js/-/highlight.js-11.7.0.tgz",
"integrity": "sha512-1rRqesRFhMO/PRF+G86evnyJkCgaZFOI+Z6kdj15TA18funfoqJXvgPCLSf0SWq3SRfg1j3HlDs8o4s3EGq1oQ==",
"engines": {
"node": ">=12.0.0"
}
},
"node_modules/homedir-polyfill": {
"version": "1.0.3",
"resolved": "https://registry.npmmirror.com/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz",
@ -5465,6 +5495,14 @@
"integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==",
"dev": true
},
"node_modules/linkify-it": {
"version": "3.0.3",
"resolved": "https://registry.npmmirror.com/linkify-it/-/linkify-it-3.0.3.tgz",
"integrity": "sha512-ynTsyrFSdE5oZ/O9GEf00kPngmOfVwazR5GKDq6EYfhlpFug3J2zybX56a2PRRpc9P+FuSoGNAwjlbDs9jJBPQ==",
"dependencies": {
"uc.micro": "^1.0.1"
}
},
"node_modules/lint-staged": {
"version": "13.1.0",
"resolved": "https://registry.npmmirror.com/lint-staged/-/lint-staged-13.1.0.tgz",
@ -5741,6 +5779,11 @@
"integrity": "sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==",
"dev": true
},
"node_modules/lodash.flow": {
"version": "3.5.0",
"resolved": "https://registry.npmmirror.com/lodash.flow/-/lodash.flow-3.5.0.tgz",
"integrity": "sha512-ff3BX/tSioo+XojX4MOsOMhJw0nZoUEF011LX8g8d3gvjVbxd89cCio4BCXronjxcTUIJUoqKEUA+n4CqvvRPw=="
},
"node_modules/lodash.isfunction": {
"version": "3.0.9",
"resolved": "https://registry.npmmirror.com/lodash.isfunction/-/lodash.isfunction-3.0.9.tgz",
@ -5952,6 +5995,99 @@
"node": ">=8"
}
},
"node_modules/markdown-it": {
"version": "12.3.2",
"resolved": "https://registry.npmmirror.com/markdown-it/-/markdown-it-12.3.2.tgz",
"integrity": "sha512-TchMembfxfNVpHkbtriWltGWc+m3xszaRD0CZup7GFFhzIgQqxIfn3eGj1yZpfuflzPvfkt611B2Q/Bsk1YnGg==",
"dependencies": {
"argparse": "^2.0.1",
"entities": "~2.1.0",
"linkify-it": "^3.0.1",
"mdurl": "^1.0.1",
"uc.micro": "^1.0.5"
},
"bin": {
"markdown-it": "bin/markdown-it.js"
}
},
"node_modules/markdown-it-abbr": {
"version": "1.0.4",
"resolved": "https://registry.npmmirror.com/markdown-it-abbr/-/markdown-it-abbr-1.0.4.tgz",
"integrity": "sha512-ZeA4Z4SaBbYysZap5iZcxKmlPL6bYA8grqhzJIHB1ikn7njnzaP8uwbtuXc4YXD5LicI4/2Xmc0VwmSiFV04gg=="
},
"node_modules/markdown-it-anchor": {
"version": "8.6.6",
"resolved": "https://registry.npmmirror.com/markdown-it-anchor/-/markdown-it-anchor-8.6.6.tgz",
"integrity": "sha512-jRW30YGywD2ESXDc+l17AiritL0uVaSnWsb26f+68qaW9zgbIIr1f4v2Nsvc0+s0Z2N3uX6t/yAw7BwCQ1wMsA==",
"peerDependencies": {
"@types/markdown-it": "*",
"markdown-it": "*"
}
},
"node_modules/markdown-it-deflist": {
"version": "2.1.0",
"resolved": "https://registry.npmmirror.com/markdown-it-deflist/-/markdown-it-deflist-2.1.0.tgz",
"integrity": "sha512-3OuqoRUlSxJiuQYu0cWTLHNhhq2xtoSFqsZK8plANg91+RJQU1ziQ6lA2LzmFAEes18uPBsHZpcX6We5l76Nzg=="
},
"node_modules/markdown-it-emoji": {
"version": "2.0.2",
"resolved": "https://registry.npmmirror.com/markdown-it-emoji/-/markdown-it-emoji-2.0.2.tgz",
"integrity": "sha512-zLftSaNrKuYl0kR5zm4gxXjHaOI3FAOEaloKmRA5hijmJZvSjmxcokOLlzycb/HXlUFWzXqpIEoyEMCE4i9MvQ=="
},
"node_modules/markdown-it-footnote": {
"version": "3.0.3",
"resolved": "https://registry.npmmirror.com/markdown-it-footnote/-/markdown-it-footnote-3.0.3.tgz",
"integrity": "sha512-YZMSuCGVZAjzKMn+xqIco9d1cLGxbELHZ9do/TSYVzraooV8ypsppKNmUJ0fVH5ljkCInQAtFpm8Rb3eXSrt5w=="
},
"node_modules/markdown-it-highlightjs": {
"version": "3.6.0",
"resolved": "https://registry.npmmirror.com/markdown-it-highlightjs/-/markdown-it-highlightjs-3.6.0.tgz",
"integrity": "sha512-ex+Lq3cVkprh0GpGwFyc53A/rqY6GGzopPCG1xMsf8Ya3XtGC8Uw9tChN1rWbpyDae7tBBhVHVcMM29h4Btamw==",
"dependencies": {
"highlight.js": "^11.3.1",
"lodash.flow": "^3.5.0"
}
},
"node_modules/markdown-it-ins": {
"version": "3.0.1",
"resolved": "https://registry.npmmirror.com/markdown-it-ins/-/markdown-it-ins-3.0.1.tgz",
"integrity": "sha512-32SSfZqSzqyAmmQ4SHvhxbFqSzPDqsZgMHDwxqPzp+v+t8RsmqsBZRG+RfRQskJko9PfKC2/oxyOs4Yg/CfiRw=="
},
"node_modules/markdown-it-mark": {
"version": "3.0.1",
"resolved": "https://registry.npmmirror.com/markdown-it-mark/-/markdown-it-mark-3.0.1.tgz",
"integrity": "sha512-HyxjAu6BRsdt6Xcv6TKVQnkz/E70TdGXEFHRYBGLncRE9lBFwDNLVtFojKxjJWgJ+5XxUwLaHXy+2sGBbDn+4A=="
},
"node_modules/markdown-it-sub": {
"version": "1.0.0",
"resolved": "https://registry.npmmirror.com/markdown-it-sub/-/markdown-it-sub-1.0.0.tgz",
"integrity": "sha512-z2Rm/LzEE1wzwTSDrI+FlPEveAAbgdAdPhdWarq/ZGJrGW/uCQbKAnhoCsE4hAbc3SEym26+W2z/VQB0cQiA9Q=="
},
"node_modules/markdown-it-sup": {
"version": "1.0.0",
"resolved": "https://registry.npmmirror.com/markdown-it-sup/-/markdown-it-sup-1.0.0.tgz",
"integrity": "sha512-E32m0nV9iyhRR7CrhnzL5msqic7rL1juWre6TQNxsnApg7Uf+F97JOKxUijg5YwXz86lZ0mqfOnutoryyNdntQ=="
},
"node_modules/markdown-it-task-lists": {
"version": "2.1.1",
"resolved": "https://registry.npmmirror.com/markdown-it-task-lists/-/markdown-it-task-lists-2.1.1.tgz",
"integrity": "sha512-TxFAc76Jnhb2OUu+n3yz9RMu4CwGfaT788br6HhEDlvWfdeJcLUsxk1Hgw2yJio0OXsxv7pyIPmvECY7bMbluA=="
},
"node_modules/markdown-it-toc-done-right": {
"version": "4.2.0",
"resolved": "https://registry.npmmirror.com/markdown-it-toc-done-right/-/markdown-it-toc-done-right-4.2.0.tgz",
"integrity": "sha512-UB/IbzjWazwTlNAX0pvWNlJS8NKsOQ4syrXZQ/C72j+jirrsjVRT627lCaylrKJFBQWfRsPmIVQie8x38DEhAQ=="
},
"node_modules/markdown-it/node_modules/entities": {
"version": "2.1.0",
"resolved": "https://registry.npmmirror.com/entities/-/entities-2.1.0.tgz",
"integrity": "sha512-hCx1oky9PFrJ611mf0ifBLBRW8lUUVRlFolb5gWRfIELabBlbp9xZvrqZLZAs+NxFnbfQoeGd8wDkygjg7U85w=="
},
"node_modules/mdurl": {
"version": "1.0.1",
"resolved": "https://registry.npmmirror.com/mdurl/-/mdurl-1.0.1.tgz",
"integrity": "sha512-/sKlQJCBYVY9Ers9hqzKou4H6V5UWc/M59TH2dvkt+84itfnq7uFOMLpOiOS4ujvHP4etln18fmIxA5R5fll0g=="
},
"node_modules/meow": {
"version": "8.1.2",
"resolved": "https://registry.npmmirror.com/meow/-/meow-8.1.2.tgz",
@ -7943,6 +8079,11 @@
"node": ">=4.2.0"
}
},
"node_modules/uc.micro": {
"version": "1.0.6",
"resolved": "https://registry.npmmirror.com/uc.micro/-/uc.micro-1.0.6.tgz",
"integrity": "sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA=="
},
"node_modules/ufo": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/ufo/-/ufo-1.0.1.tgz",
@ -8499,6 +8640,26 @@
"vue": "^3.0.0"
}
},
"node_modules/vue3-markdown-it": {
"version": "1.0.10",
"resolved": "https://registry.npmmirror.com/vue3-markdown-it/-/vue3-markdown-it-1.0.10.tgz",
"integrity": "sha512-mTvHu0zl7jrh7ojgaZ+tTpCLiS4CVg4bTgTu4KGhw/cRRY5YgIG8QgFAPu6kCzSW6Znc9a52Beb6hFvF4hSMkQ==",
"dependencies": {
"markdown-it": "^12.3.2",
"markdown-it-abbr": "^1.0.4",
"markdown-it-anchor": "^8.4.1",
"markdown-it-deflist": "^2.1.0",
"markdown-it-emoji": "^2.0.0",
"markdown-it-footnote": "^3.0.3",
"markdown-it-highlightjs": "^3.6.0",
"markdown-it-ins": "^3.0.1",
"markdown-it-mark": "^3.0.1",
"markdown-it-sub": "^1.0.0",
"markdown-it-sup": "^1.0.0",
"markdown-it-task-lists": "^2.1.1",
"markdown-it-toc-done-right": "^4.2.0"
}
},
"node_modules/warning": {
"version": "4.0.3",
"resolved": "https://registry.npmjs.org/warning/-/warning-4.0.3.tgz",
@ -9766,6 +9927,12 @@
"resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.0.tgz",
"integrity": "sha512-WulqXMDUTYAXCjZnk6JtIHPigp55cVtDgDrO2gHRwhyJto21+1zbVCtOYB2L1F9w4qCQ0rOGWBnBe0FNTiEJIQ=="
},
"@types/linkify-it": {
"version": "3.0.2",
"resolved": "https://registry.npmmirror.com/@types/linkify-it/-/linkify-it-3.0.2.tgz",
"integrity": "sha512-HZQYqbiFVWufzCwexrvh694SOim8z2d+xJl5UNamcvQFejLY/2YUtzXHYi3cHdI7PMlS8ejH2slRAOJQ32aNbA==",
"peer": true
},
"@types/lodash": {
"version": "4.14.191",
"resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.191.tgz",
@ -9781,6 +9948,22 @@
"@types/lodash": "*"
}
},
"@types/markdown-it": {
"version": "12.2.3",
"resolved": "https://registry.npmmirror.com/@types/markdown-it/-/markdown-it-12.2.3.tgz",
"integrity": "sha512-GKMHFfv3458yYy+v/N8gjufHO6MSZKCOXpZc5GXIWWy8uldwfmPn98vp81gZ5f9SVw8YYBctgfJ22a2d7AOMeQ==",
"peer": true,
"requires": {
"@types/linkify-it": "*",
"@types/mdurl": "*"
}
},
"@types/mdurl": {
"version": "1.0.2",
"resolved": "https://registry.npmmirror.com/@types/mdurl/-/mdurl-1.0.2.tgz",
"integrity": "sha512-eC4U9MlIcu2q0KQmXszyn5Akca/0jrQmwDRgpAMJai7qBWq4amIQhZyNau4VYGtCeALvW1/NtjzJJ567aZxfKA==",
"peer": true
},
"@types/minimist": {
"version": "1.2.2",
"resolved": "https://registry.npmmirror.com/@types/minimist/-/minimist-1.2.2.tgz",
@ -10216,8 +10399,7 @@
"argparse": {
"version": "2.0.1",
"resolved": "https://registry.npmmirror.com/argparse/-/argparse-2.0.1.tgz",
"integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==",
"dev": true
"integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q=="
},
"array-ify": {
"version": "1.0.0",
@ -11742,6 +11924,11 @@
"tslib": "^2.0.3"
}
},
"highlight.js": {
"version": "11.7.0",
"resolved": "https://registry.npmmirror.com/highlight.js/-/highlight.js-11.7.0.tgz",
"integrity": "sha512-1rRqesRFhMO/PRF+G86evnyJkCgaZFOI+Z6kdj15TA18funfoqJXvgPCLSf0SWq3SRfg1j3HlDs8o4s3EGq1oQ=="
},
"homedir-polyfill": {
"version": "1.0.3",
"resolved": "https://registry.npmmirror.com/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz",
@ -12976,6 +13163,14 @@
"integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==",
"dev": true
},
"linkify-it": {
"version": "3.0.3",
"resolved": "https://registry.npmmirror.com/linkify-it/-/linkify-it-3.0.3.tgz",
"integrity": "sha512-ynTsyrFSdE5oZ/O9GEf00kPngmOfVwazR5GKDq6EYfhlpFug3J2zybX56a2PRRpc9P+FuSoGNAwjlbDs9jJBPQ==",
"requires": {
"uc.micro": "^1.0.1"
}
},
"lint-staged": {
"version": "13.1.0",
"resolved": "https://registry.npmmirror.com/lint-staged/-/lint-staged-13.1.0.tgz",
@ -13183,6 +13378,11 @@
"integrity": "sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==",
"dev": true
},
"lodash.flow": {
"version": "3.5.0",
"resolved": "https://registry.npmmirror.com/lodash.flow/-/lodash.flow-3.5.0.tgz",
"integrity": "sha512-ff3BX/tSioo+XojX4MOsOMhJw0nZoUEF011LX8g8d3gvjVbxd89cCio4BCXronjxcTUIJUoqKEUA+n4CqvvRPw=="
},
"lodash.isfunction": {
"version": "3.0.9",
"resolved": "https://registry.npmmirror.com/lodash.isfunction/-/lodash.isfunction-3.0.9.tgz",
@ -13363,6 +13563,95 @@
"integrity": "sha512-hdN1wVrZbb29eBGiGjJbeP8JbKjq1urkHJ/LIP/NY48MZ1QVXUsQBV1G1zvYFHn1XE06cwjBsOI2K3Ulnj1YXQ==",
"dev": true
},
"markdown-it": {
"version": "12.3.2",
"resolved": "https://registry.npmmirror.com/markdown-it/-/markdown-it-12.3.2.tgz",
"integrity": "sha512-TchMembfxfNVpHkbtriWltGWc+m3xszaRD0CZup7GFFhzIgQqxIfn3eGj1yZpfuflzPvfkt611B2Q/Bsk1YnGg==",
"requires": {
"argparse": "^2.0.1",
"entities": "~2.1.0",
"linkify-it": "^3.0.1",
"mdurl": "^1.0.1",
"uc.micro": "^1.0.5"
},
"dependencies": {
"entities": {
"version": "2.1.0",
"resolved": "https://registry.npmmirror.com/entities/-/entities-2.1.0.tgz",
"integrity": "sha512-hCx1oky9PFrJ611mf0ifBLBRW8lUUVRlFolb5gWRfIELabBlbp9xZvrqZLZAs+NxFnbfQoeGd8wDkygjg7U85w=="
}
}
},
"markdown-it-abbr": {
"version": "1.0.4",
"resolved": "https://registry.npmmirror.com/markdown-it-abbr/-/markdown-it-abbr-1.0.4.tgz",
"integrity": "sha512-ZeA4Z4SaBbYysZap5iZcxKmlPL6bYA8grqhzJIHB1ikn7njnzaP8uwbtuXc4YXD5LicI4/2Xmc0VwmSiFV04gg=="
},
"markdown-it-anchor": {
"version": "8.6.6",
"resolved": "https://registry.npmmirror.com/markdown-it-anchor/-/markdown-it-anchor-8.6.6.tgz",
"integrity": "sha512-jRW30YGywD2ESXDc+l17AiritL0uVaSnWsb26f+68qaW9zgbIIr1f4v2Nsvc0+s0Z2N3uX6t/yAw7BwCQ1wMsA==",
"requires": {}
},
"markdown-it-deflist": {
"version": "2.1.0",
"resolved": "https://registry.npmmirror.com/markdown-it-deflist/-/markdown-it-deflist-2.1.0.tgz",
"integrity": "sha512-3OuqoRUlSxJiuQYu0cWTLHNhhq2xtoSFqsZK8plANg91+RJQU1ziQ6lA2LzmFAEes18uPBsHZpcX6We5l76Nzg=="
},
"markdown-it-emoji": {
"version": "2.0.2",
"resolved": "https://registry.npmmirror.com/markdown-it-emoji/-/markdown-it-emoji-2.0.2.tgz",
"integrity": "sha512-zLftSaNrKuYl0kR5zm4gxXjHaOI3FAOEaloKmRA5hijmJZvSjmxcokOLlzycb/HXlUFWzXqpIEoyEMCE4i9MvQ=="
},
"markdown-it-footnote": {
"version": "3.0.3",
"resolved": "https://registry.npmmirror.com/markdown-it-footnote/-/markdown-it-footnote-3.0.3.tgz",
"integrity": "sha512-YZMSuCGVZAjzKMn+xqIco9d1cLGxbELHZ9do/TSYVzraooV8ypsppKNmUJ0fVH5ljkCInQAtFpm8Rb3eXSrt5w=="
},
"markdown-it-highlightjs": {
"version": "3.6.0",
"resolved": "https://registry.npmmirror.com/markdown-it-highlightjs/-/markdown-it-highlightjs-3.6.0.tgz",
"integrity": "sha512-ex+Lq3cVkprh0GpGwFyc53A/rqY6GGzopPCG1xMsf8Ya3XtGC8Uw9tChN1rWbpyDae7tBBhVHVcMM29h4Btamw==",
"requires": {
"highlight.js": "^11.3.1",
"lodash.flow": "^3.5.0"
}
},
"markdown-it-ins": {
"version": "3.0.1",
"resolved": "https://registry.npmmirror.com/markdown-it-ins/-/markdown-it-ins-3.0.1.tgz",
"integrity": "sha512-32SSfZqSzqyAmmQ4SHvhxbFqSzPDqsZgMHDwxqPzp+v+t8RsmqsBZRG+RfRQskJko9PfKC2/oxyOs4Yg/CfiRw=="
},
"markdown-it-mark": {
"version": "3.0.1",
"resolved": "https://registry.npmmirror.com/markdown-it-mark/-/markdown-it-mark-3.0.1.tgz",
"integrity": "sha512-HyxjAu6BRsdt6Xcv6TKVQnkz/E70TdGXEFHRYBGLncRE9lBFwDNLVtFojKxjJWgJ+5XxUwLaHXy+2sGBbDn+4A=="
},
"markdown-it-sub": {
"version": "1.0.0",
"resolved": "https://registry.npmmirror.com/markdown-it-sub/-/markdown-it-sub-1.0.0.tgz",
"integrity": "sha512-z2Rm/LzEE1wzwTSDrI+FlPEveAAbgdAdPhdWarq/ZGJrGW/uCQbKAnhoCsE4hAbc3SEym26+W2z/VQB0cQiA9Q=="
},
"markdown-it-sup": {
"version": "1.0.0",
"resolved": "https://registry.npmmirror.com/markdown-it-sup/-/markdown-it-sup-1.0.0.tgz",
"integrity": "sha512-E32m0nV9iyhRR7CrhnzL5msqic7rL1juWre6TQNxsnApg7Uf+F97JOKxUijg5YwXz86lZ0mqfOnutoryyNdntQ=="
},
"markdown-it-task-lists": {
"version": "2.1.1",
"resolved": "https://registry.npmmirror.com/markdown-it-task-lists/-/markdown-it-task-lists-2.1.1.tgz",
"integrity": "sha512-TxFAc76Jnhb2OUu+n3yz9RMu4CwGfaT788br6HhEDlvWfdeJcLUsxk1Hgw2yJio0OXsxv7pyIPmvECY7bMbluA=="
},
"markdown-it-toc-done-right": {
"version": "4.2.0",
"resolved": "https://registry.npmmirror.com/markdown-it-toc-done-right/-/markdown-it-toc-done-right-4.2.0.tgz",
"integrity": "sha512-UB/IbzjWazwTlNAX0pvWNlJS8NKsOQ4syrXZQ/C72j+jirrsjVRT627lCaylrKJFBQWfRsPmIVQie8x38DEhAQ=="
},
"mdurl": {
"version": "1.0.1",
"resolved": "https://registry.npmmirror.com/mdurl/-/mdurl-1.0.1.tgz",
"integrity": "sha512-/sKlQJCBYVY9Ers9hqzKou4H6V5UWc/M59TH2dvkt+84itfnq7uFOMLpOiOS4ujvHP4etln18fmIxA5R5fll0g=="
},
"meow": {
"version": "8.1.2",
"resolved": "https://registry.npmmirror.com/meow/-/meow-8.1.2.tgz",
@ -14934,6 +15223,11 @@
"integrity": "sha512-Uz+dTXYzxXXbsFpM86Wh3dKCxrQqUcVMxwU54orwlJjOpO3ao8L7j5lH+dWfTwgCwIuM9GQ2kvVotzYJMXTBZg==",
"devOptional": true
},
"uc.micro": {
"version": "1.0.6",
"resolved": "https://registry.npmmirror.com/uc.micro/-/uc.micro-1.0.6.tgz",
"integrity": "sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA=="
},
"ufo": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/ufo/-/ufo-1.0.1.tgz",
@ -15351,6 +15645,26 @@
"is-plain-object": "3.0.1"
}
},
"vue3-markdown-it": {
"version": "1.0.10",
"resolved": "https://registry.npmmirror.com/vue3-markdown-it/-/vue3-markdown-it-1.0.10.tgz",
"integrity": "sha512-mTvHu0zl7jrh7ojgaZ+tTpCLiS4CVg4bTgTu4KGhw/cRRY5YgIG8QgFAPu6kCzSW6Znc9a52Beb6hFvF4hSMkQ==",
"requires": {
"markdown-it": "^12.3.2",
"markdown-it-abbr": "^1.0.4",
"markdown-it-anchor": "^8.4.1",
"markdown-it-deflist": "^2.1.0",
"markdown-it-emoji": "^2.0.0",
"markdown-it-footnote": "^3.0.3",
"markdown-it-highlightjs": "^3.6.0",
"markdown-it-ins": "^3.0.1",
"markdown-it-mark": "^3.0.1",
"markdown-it-sub": "^1.0.0",
"markdown-it-sup": "^1.0.0",
"markdown-it-task-lists": "^2.1.1",
"markdown-it-toc-done-right": "^4.2.0"
}
},
"warning": {
"version": "4.0.3",
"resolved": "https://registry.npmjs.org/warning/-/warning-4.0.3.tgz",

File diff suppressed because it is too large Load Diff

View File

@ -17,7 +17,6 @@ export interface formState {
basePath: string; // 系统后台访问的URL
logo: string; // 系统logo
icon: string; // 浏览器页签
rulesFrom: Record<string, Rule[]>;
}
/**

View File

@ -18,15 +18,15 @@
</template>
<a-form
layout="vertical"
ref="formBasicRef"
:rules="rulesFrom"
:model="form"
ref="formBasicRef"
>
<a-row :span="24" :gutter="24">
<a-col :span="10">
<a-form-item
label="系统名称"
name="title"
v-bind="validateInfos.title"
>
<a-input
v-model:value="form.title"
@ -37,6 +37,9 @@
<a-form-item
label="主题色"
name="headerTheme"
v-bind="
validateInfos.headerTheme
"
>
<a-select
v-model:value="
@ -74,7 +77,10 @@
placeholder="请输入高德API Key"
/>
</a-form-item>
<a-form-item>
<a-form-item
name="basePath"
v-bind="validateInfos.basePath"
>
<template #label>
<span>base-path</span>
<a-tooltip
@ -721,7 +727,11 @@
type="primary"
class="btn-style"
@click="submitData"
:loading="isSucessBasic || isSucessInit || isSucessRole"
:loading="
isSucessBasic === 2 ||
isSucessInit === 2 ||
isSucessRole === 2
"
>确定</a-button
>
</div>
@ -742,7 +752,6 @@ import type {
FormInstance,
UploadChangeParam,
UploadProps,
Form,
} from 'ant-design-vue';
import { modalState, formState, logoState } from './data/interface';
import BaseMenu from './data/baseMenu';
@ -761,28 +770,34 @@ import {
saveDevice,
changeDeploy,
deployDevice,
saveInit,
} from '@/api/initHome';
import { BASE_API_PATH, TOKEN_KEY } from '@/utils/variable';
import { LocalStore } from '@/utils/comm';
import { message } from 'ant-design-vue';
import { Form } from 'ant-design-vue';
import { ValidateErrorEntity } from 'ant-design-vue/es/form/interface';
const formRef = ref();
const menuRef = ref();
const formBasicRef = ref();
const useForm = Form.useForm;
/**
* 表单数据
*/
const form = reactive<formState>({
const form = ref<formState>({
title: '',
headerTheme: 'light',
apikey: '',
basePath: `${window.location.origin}/api`,
logo: '',
icon: '',
rulesFrom: {
});
const rulesFrom = ref({
title: [
{
required: true,
message: '请选择本地地址',
message: '请输入系统名称',
trigger: 'blur',
},
],
@ -800,9 +815,11 @@ const form = reactive<formState>({
trigger: 'blur',
},
],
},
});
const { rulesFrom } = toRefs(form);
const { resetFields, validate, validateInfos } = useForm(
form.value,
rulesFrom.value,
);
/**
* 校验官网地址
*/
@ -871,6 +888,10 @@ const rulesModle = ref({
],
});
// const { resetFields, validate, validateInfos } = useForm(
// modalForm.value,
// rulesModle.value,
// );
/**
* 默认打开第一个初始菜单
*/
@ -928,7 +949,7 @@ const logoData = reactive<logoState>({
* logo格式校验
*/
beforeLogoUpload: (file) => {
const isType = logoData.imageTypes.includes(file.type);
const isType: any = logoData.imageTypes.includes(file.type);
if (!isType) {
message.error(`请上传.jpg.png.jfif.pjp.pjpeg.jpeg格式的图片`);
return false;
@ -1033,15 +1054,13 @@ const {
* 提交基础表单
*/
const basicData = reactive({
isSucessBasic: false,
isSucessBasic: 0,
/**
* 提交基础表单数据
*/
saveBasicInfo: async () => {
// return new Promise(async (resolve) => {
const vaild = await formBasicRef.value.validate();
console.log(vaild, 'vaild ');
if (vaild) {
validate()
.then(async () => {
const item = [
{
scope: 'front',
@ -1070,21 +1089,23 @@ const basicData = reactive({
if (ico !== null) {
ico.href = form.icon;
}
basicData.isSucessBasic = 3;
} else {
basicData.isSucessBasic = true;
basicData.isSucessBasic = 2;
}
} else {
basicData.isSucessBasic = true;
}
// });
})
.catch((error: ValidateErrorEntity<formState>) => {
basicData.isSucessBasic = 2;
});
},
});
const { isSucessBasic } = toRefs(basicData);
/**
* 提交角色数据
*/
const roleData = reactive({
isSucessRole: false,
isSucessRole: 0,
/**
* 根据菜单找角色
*/
@ -1158,7 +1179,7 @@ const roleData = reactive({
}
} else if (index === keys.value.length - 1) {
resolve(Count === keys.value.length);
roleData.isSucessRole = true;
roleData.isSucessRole = 2;
}
});
});
@ -1222,7 +1243,7 @@ const { count } = toRefs(menuDatas);
* 提交初始化数据
*/
const initialization = reactive({
isSucessInit: false,
isSucessInit: 0,
optionPorts: [],
/**
* 查询端口数据
@ -1244,74 +1265,74 @@ const initialization = reactive({
*/
saveCurrentData: async () => {
// return new Promise(async (resolve) => {
const valid = await formRef.value.validate();
console.log(valid, 'valid');
// if (valid) {
// try {
// //
// const network = await saveNetwork({
// type: 'MQTT_SERVER',
// shareCluster: true,
// name: 'MQTT',
// configuration: {
// host: '0.0.0.0',
// secure: false,
// port: modalForm.port,
// publicHost: modalForm.publicHost,
// publicPort: modalForm.publicPort,
// },
// });
// //
// const protocol = await saveProtocol();
// let protocolItem: any = undefined;
// if (protocol.status === 200) {
// const proid = await getProtocol();
// if (proid.status === 200) {
// protocolItem = (proid?.result || []).find(
// (it: any) => it.name === 'JetLinks',
// );
// }
// }
// //
// const accessConfig = await saveAccessConfig({
// name: 'MQTT',
// provider: 'mqtt-server-gateway',
// protocol: protocolItem?.id,
// transport: 'MQTT',
// channel: 'network',
// channelId: network?.result?.id,
// });
// //
// const product = await saveProduct({
// name: 'MQTT',
// messageProtocol: protocolItem?.id,
// protocolName: protocolItem?.name,
// transportProtocol: 'MQTT',
// deviceType: 'device',
// accessId: accessConfig.result?.id,
// accessName: accessConfig.result?.name,
// accessProvider: 'mqtt-server-gateway',
// });
// //
// const device = await saveDevice({
// name: 'MQTT',
// productId: product?.result?.id,
// productName: product?.result?.name,
// });
// if (device.status === 200) {
// changeDeploy(product.result.id);
// deployDevice(device.result.id);
// }
// flag.value = true;
// visible.value = false;
// } catch (e) {
// initialization.isSucessInit = true;
// // resolve(false);
// }
// }
initialization.isSucessInit = true;
formRef.value
.validate()
.then(async () => {
try {
//
const network = await saveNetwork({
type: 'MQTT_SERVER',
shareCluster: true,
name: 'MQTT网络组件',
configuration: {
host: '0.0.0.0',
secure: false,
port: modalForm.port,
publicHost: modalForm.publicHost,
publicPort: modalForm.publicPort,
},
});
//
const protocol = await saveProtocol();
let protocolItem: any = undefined;
if (protocol.status === 200) {
const proid = await getProtocol();
if (proid.status === 200) {
protocolItem = (proid?.result || []).find(
(it: any) => it.name === 'JetLinks官方协议',
);
}
}
//
const accessConfig = await saveAccessConfig({
name: 'MQTT类型设备接入网关',
provider: 'mqtt-server-gateway',
protocol: protocolItem?.id,
transport: 'MQTT',
channel: 'network',
channelId: network?.result?.id,
});
//
const product = await saveProduct({
name: 'MQTT产品',
messageProtocol: protocolItem?.id,
protocolName: protocolItem?.name,
transportProtocol: 'MQTT',
deviceType: 'device',
accessId: accessConfig.result?.id,
accessName: accessConfig.result?.name,
accessProvider: 'mqtt-server-gateway',
});
//
const device = await saveDevice({
name: 'MQTT设备',
productId: product?.result?.id,
productName: product?.result?.name,
});
if (device.status === 200) {
await changeDeploy(product.result.id);
await deployDevice(device.result.id);
}
flag.value = true;
visible.value = false;
initialization.isSucessInit = 3;
} catch (e) {
initialization.isSucessInit = 2;
}
})
.catch((error: ValidateErrorEntity<modalState>) => {
initialization.isSucessInit = 2;
});
},
});
const { optionPorts, saveCurrentData, isSucessInit } = toRefs(initialization);
@ -1321,13 +1342,33 @@ const { optionPorts, saveCurrentData, isSucessInit } = toRefs(initialization);
*/
menuDatas.getSystemPermissionData();
initialization.getCurrentPort();
/**
* 跳转首页
*/
const jump = () => {
window.location.href = '/';
};
/**
* 提交所有数据
*/
const submitData = () => {
initialization.saveCurrentData();
const submitData = async () => {
if (keys.value.length > 0) {
roleData.addRoleData();
}
basicData.saveBasicInfo();
//
if (
basicData.isSucessBasic === 3 &&
roleData.isSucessRole === 3 &&
initialization.isSucessInit === 3
) {
message.success('保存成功');
//
const res = await saveInit();
if (res.status === 200) {
jump();
}
}
};
</script>
<style scoped lang="less">

7933
yarn.lock

File diff suppressed because it is too large Load Diff