fix: 修改初始化页面菜单数据
This commit is contained in:
parent
e01ab75de9
commit
9cbabbeab3
|
@ -24,7 +24,8 @@
|
||||||
"unplugin-auto-import": "^0.12.1",
|
"unplugin-auto-import": "^0.12.1",
|
||||||
"unplugin-vue-components": "^0.22.12",
|
"unplugin-vue-components": "^0.22.12",
|
||||||
"vue": "^3.2.45",
|
"vue": "^3.2.45",
|
||||||
"vue-router": "^4.1.6"
|
"vue-router": "^4.1.6",
|
||||||
|
"vue3-markdown-it": "^1.0.10"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@commitlint/cli": "^17.4.1",
|
"@commitlint/cli": "^17.4.1",
|
||||||
|
@ -1481,6 +1482,12 @@
|
||||||
"resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.0.tgz",
|
||||||
"integrity": "sha512-WulqXMDUTYAXCjZnk6JtIHPigp55cVtDgDrO2gHRwhyJto21+1zbVCtOYB2L1F9w4qCQ0rOGWBnBe0FNTiEJIQ=="
|
"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": {
|
"node_modules/@types/lodash": {
|
||||||
"version": "4.14.191",
|
"version": "4.14.191",
|
||||||
"resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.191.tgz",
|
"resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.191.tgz",
|
||||||
|
@ -1496,6 +1503,22 @@
|
||||||
"@types/lodash": "*"
|
"@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": {
|
"node_modules/@types/minimist": {
|
||||||
"version": "1.2.2",
|
"version": "1.2.2",
|
||||||
"resolved": "https://registry.npmmirror.com/@types/minimist/-/minimist-1.2.2.tgz",
|
"resolved": "https://registry.npmmirror.com/@types/minimist/-/minimist-1.2.2.tgz",
|
||||||
|
@ -1998,8 +2021,7 @@
|
||||||
"node_modules/argparse": {
|
"node_modules/argparse": {
|
||||||
"version": "2.0.1",
|
"version": "2.0.1",
|
||||||
"resolved": "https://registry.npmmirror.com/argparse/-/argparse-2.0.1.tgz",
|
"resolved": "https://registry.npmmirror.com/argparse/-/argparse-2.0.1.tgz",
|
||||||
"integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==",
|
"integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q=="
|
||||||
"dev": true
|
|
||||||
},
|
},
|
||||||
"node_modules/array-ify": {
|
"node_modules/array-ify": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
|
@ -3883,6 +3905,14 @@
|
||||||
"tslib": "^2.0.3"
|
"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": {
|
"node_modules/homedir-polyfill": {
|
||||||
"version": "1.0.3",
|
"version": "1.0.3",
|
||||||
"resolved": "https://registry.npmmirror.com/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz",
|
"resolved": "https://registry.npmmirror.com/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz",
|
||||||
|
@ -5465,6 +5495,14 @@
|
||||||
"integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==",
|
"integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==",
|
||||||
"dev": true
|
"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": {
|
"node_modules/lint-staged": {
|
||||||
"version": "13.1.0",
|
"version": "13.1.0",
|
||||||
"resolved": "https://registry.npmmirror.com/lint-staged/-/lint-staged-13.1.0.tgz",
|
"resolved": "https://registry.npmmirror.com/lint-staged/-/lint-staged-13.1.0.tgz",
|
||||||
|
@ -5741,6 +5779,11 @@
|
||||||
"integrity": "sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==",
|
"integrity": "sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==",
|
||||||
"dev": true
|
"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": {
|
"node_modules/lodash.isfunction": {
|
||||||
"version": "3.0.9",
|
"version": "3.0.9",
|
||||||
"resolved": "https://registry.npmmirror.com/lodash.isfunction/-/lodash.isfunction-3.0.9.tgz",
|
"resolved": "https://registry.npmmirror.com/lodash.isfunction/-/lodash.isfunction-3.0.9.tgz",
|
||||||
|
@ -5952,6 +5995,99 @@
|
||||||
"node": ">=8"
|
"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": {
|
"node_modules/meow": {
|
||||||
"version": "8.1.2",
|
"version": "8.1.2",
|
||||||
"resolved": "https://registry.npmmirror.com/meow/-/meow-8.1.2.tgz",
|
"resolved": "https://registry.npmmirror.com/meow/-/meow-8.1.2.tgz",
|
||||||
|
@ -7943,6 +8079,11 @@
|
||||||
"node": ">=4.2.0"
|
"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": {
|
"node_modules/ufo": {
|
||||||
"version": "1.0.1",
|
"version": "1.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/ufo/-/ufo-1.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/ufo/-/ufo-1.0.1.tgz",
|
||||||
|
@ -8499,6 +8640,26 @@
|
||||||
"vue": "^3.0.0"
|
"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": {
|
"node_modules/warning": {
|
||||||
"version": "4.0.3",
|
"version": "4.0.3",
|
||||||
"resolved": "https://registry.npmjs.org/warning/-/warning-4.0.3.tgz",
|
"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",
|
"resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.0.tgz",
|
||||||
"integrity": "sha512-WulqXMDUTYAXCjZnk6JtIHPigp55cVtDgDrO2gHRwhyJto21+1zbVCtOYB2L1F9w4qCQ0rOGWBnBe0FNTiEJIQ=="
|
"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": {
|
"@types/lodash": {
|
||||||
"version": "4.14.191",
|
"version": "4.14.191",
|
||||||
"resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.191.tgz",
|
"resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.191.tgz",
|
||||||
|
@ -9781,6 +9948,22 @@
|
||||||
"@types/lodash": "*"
|
"@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": {
|
"@types/minimist": {
|
||||||
"version": "1.2.2",
|
"version": "1.2.2",
|
||||||
"resolved": "https://registry.npmmirror.com/@types/minimist/-/minimist-1.2.2.tgz",
|
"resolved": "https://registry.npmmirror.com/@types/minimist/-/minimist-1.2.2.tgz",
|
||||||
|
@ -10216,8 +10399,7 @@
|
||||||
"argparse": {
|
"argparse": {
|
||||||
"version": "2.0.1",
|
"version": "2.0.1",
|
||||||
"resolved": "https://registry.npmmirror.com/argparse/-/argparse-2.0.1.tgz",
|
"resolved": "https://registry.npmmirror.com/argparse/-/argparse-2.0.1.tgz",
|
||||||
"integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==",
|
"integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q=="
|
||||||
"dev": true
|
|
||||||
},
|
},
|
||||||
"array-ify": {
|
"array-ify": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
|
@ -11742,6 +11924,11 @@
|
||||||
"tslib": "^2.0.3"
|
"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": {
|
"homedir-polyfill": {
|
||||||
"version": "1.0.3",
|
"version": "1.0.3",
|
||||||
"resolved": "https://registry.npmmirror.com/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz",
|
"resolved": "https://registry.npmmirror.com/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz",
|
||||||
|
@ -12976,6 +13163,14 @@
|
||||||
"integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==",
|
"integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==",
|
||||||
"dev": true
|
"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": {
|
"lint-staged": {
|
||||||
"version": "13.1.0",
|
"version": "13.1.0",
|
||||||
"resolved": "https://registry.npmmirror.com/lint-staged/-/lint-staged-13.1.0.tgz",
|
"resolved": "https://registry.npmmirror.com/lint-staged/-/lint-staged-13.1.0.tgz",
|
||||||
|
@ -13183,6 +13378,11 @@
|
||||||
"integrity": "sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==",
|
"integrity": "sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==",
|
||||||
"dev": true
|
"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": {
|
"lodash.isfunction": {
|
||||||
"version": "3.0.9",
|
"version": "3.0.9",
|
||||||
"resolved": "https://registry.npmmirror.com/lodash.isfunction/-/lodash.isfunction-3.0.9.tgz",
|
"resolved": "https://registry.npmmirror.com/lodash.isfunction/-/lodash.isfunction-3.0.9.tgz",
|
||||||
|
@ -13363,6 +13563,95 @@
|
||||||
"integrity": "sha512-hdN1wVrZbb29eBGiGjJbeP8JbKjq1urkHJ/LIP/NY48MZ1QVXUsQBV1G1zvYFHn1XE06cwjBsOI2K3Ulnj1YXQ==",
|
"integrity": "sha512-hdN1wVrZbb29eBGiGjJbeP8JbKjq1urkHJ/LIP/NY48MZ1QVXUsQBV1G1zvYFHn1XE06cwjBsOI2K3Ulnj1YXQ==",
|
||||||
"dev": true
|
"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": {
|
"meow": {
|
||||||
"version": "8.1.2",
|
"version": "8.1.2",
|
||||||
"resolved": "https://registry.npmmirror.com/meow/-/meow-8.1.2.tgz",
|
"resolved": "https://registry.npmmirror.com/meow/-/meow-8.1.2.tgz",
|
||||||
|
@ -14934,6 +15223,11 @@
|
||||||
"integrity": "sha512-Uz+dTXYzxXXbsFpM86Wh3dKCxrQqUcVMxwU54orwlJjOpO3ao8L7j5lH+dWfTwgCwIuM9GQ2kvVotzYJMXTBZg==",
|
"integrity": "sha512-Uz+dTXYzxXXbsFpM86Wh3dKCxrQqUcVMxwU54orwlJjOpO3ao8L7j5lH+dWfTwgCwIuM9GQ2kvVotzYJMXTBZg==",
|
||||||
"devOptional": true
|
"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": {
|
"ufo": {
|
||||||
"version": "1.0.1",
|
"version": "1.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/ufo/-/ufo-1.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/ufo/-/ufo-1.0.1.tgz",
|
||||||
|
@ -15351,6 +15645,26 @@
|
||||||
"is-plain-object": "3.0.1"
|
"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": {
|
"warning": {
|
||||||
"version": "4.0.3",
|
"version": "4.0.3",
|
||||||
"resolved": "https://registry.npmjs.org/warning/-/warning-4.0.3.tgz",
|
"resolved": "https://registry.npmjs.org/warning/-/warning-4.0.3.tgz",
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -17,7 +17,6 @@ export interface formState {
|
||||||
basePath: string; // 系统后台访问的URL
|
basePath: string; // 系统后台访问的URL
|
||||||
logo: string; // 系统logo
|
logo: string; // 系统logo
|
||||||
icon: string; // 浏览器页签
|
icon: string; // 浏览器页签
|
||||||
rulesFrom: Record<string, Rule[]>;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -18,15 +18,15 @@
|
||||||
</template>
|
</template>
|
||||||
<a-form
|
<a-form
|
||||||
layout="vertical"
|
layout="vertical"
|
||||||
ref="formBasicRef"
|
|
||||||
:rules="rulesFrom"
|
|
||||||
:model="form"
|
:model="form"
|
||||||
|
ref="formBasicRef"
|
||||||
>
|
>
|
||||||
<a-row :span="24" :gutter="24">
|
<a-row :span="24" :gutter="24">
|
||||||
<a-col :span="10">
|
<a-col :span="10">
|
||||||
<a-form-item
|
<a-form-item
|
||||||
label="系统名称"
|
label="系统名称"
|
||||||
name="title"
|
name="title"
|
||||||
|
v-bind="validateInfos.title"
|
||||||
>
|
>
|
||||||
<a-input
|
<a-input
|
||||||
v-model:value="form.title"
|
v-model:value="form.title"
|
||||||
|
@ -37,6 +37,9 @@
|
||||||
<a-form-item
|
<a-form-item
|
||||||
label="主题色"
|
label="主题色"
|
||||||
name="headerTheme"
|
name="headerTheme"
|
||||||
|
v-bind="
|
||||||
|
validateInfos.headerTheme
|
||||||
|
"
|
||||||
>
|
>
|
||||||
<a-select
|
<a-select
|
||||||
v-model:value="
|
v-model:value="
|
||||||
|
@ -74,7 +77,10 @@
|
||||||
placeholder="请输入高德API Key"
|
placeholder="请输入高德API Key"
|
||||||
/>
|
/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item>
|
<a-form-item
|
||||||
|
name="basePath"
|
||||||
|
v-bind="validateInfos.basePath"
|
||||||
|
>
|
||||||
<template #label>
|
<template #label>
|
||||||
<span>base-path</span>
|
<span>base-path</span>
|
||||||
<a-tooltip
|
<a-tooltip
|
||||||
|
@ -721,7 +727,11 @@
|
||||||
type="primary"
|
type="primary"
|
||||||
class="btn-style"
|
class="btn-style"
|
||||||
@click="submitData"
|
@click="submitData"
|
||||||
:loading="isSucessBasic || isSucessInit || isSucessRole"
|
:loading="
|
||||||
|
isSucessBasic === 2 ||
|
||||||
|
isSucessInit === 2 ||
|
||||||
|
isSucessRole === 2
|
||||||
|
"
|
||||||
>确定</a-button
|
>确定</a-button
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
|
@ -742,7 +752,6 @@ import type {
|
||||||
FormInstance,
|
FormInstance,
|
||||||
UploadChangeParam,
|
UploadChangeParam,
|
||||||
UploadProps,
|
UploadProps,
|
||||||
Form,
|
|
||||||
} from 'ant-design-vue';
|
} from 'ant-design-vue';
|
||||||
import { modalState, formState, logoState } from './data/interface';
|
import { modalState, formState, logoState } from './data/interface';
|
||||||
import BaseMenu from './data/baseMenu';
|
import BaseMenu from './data/baseMenu';
|
||||||
|
@ -761,48 +770,56 @@ import {
|
||||||
saveDevice,
|
saveDevice,
|
||||||
changeDeploy,
|
changeDeploy,
|
||||||
deployDevice,
|
deployDevice,
|
||||||
|
saveInit,
|
||||||
} from '@/api/initHome';
|
} from '@/api/initHome';
|
||||||
import { BASE_API_PATH, TOKEN_KEY } from '@/utils/variable';
|
import { BASE_API_PATH, TOKEN_KEY } from '@/utils/variable';
|
||||||
import { LocalStore } from '@/utils/comm';
|
import { LocalStore } from '@/utils/comm';
|
||||||
import { message } from 'ant-design-vue';
|
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 formRef = ref();
|
||||||
const menuRef = ref();
|
const menuRef = ref();
|
||||||
const formBasicRef = ref();
|
const formBasicRef = ref();
|
||||||
|
const useForm = Form.useForm;
|
||||||
/**
|
/**
|
||||||
* 表单数据
|
* 表单数据
|
||||||
*/
|
*/
|
||||||
const form = reactive<formState>({
|
const form = ref<formState>({
|
||||||
title: '',
|
title: '',
|
||||||
headerTheme: 'light',
|
headerTheme: 'light',
|
||||||
apikey: '',
|
apikey: '',
|
||||||
basePath: `${window.location.origin}/api`,
|
basePath: `${window.location.origin}/api`,
|
||||||
logo: '',
|
logo: '',
|
||||||
icon: '',
|
icon: '',
|
||||||
rulesFrom: {
|
|
||||||
title: [
|
|
||||||
{
|
|
||||||
required: true,
|
|
||||||
message: '请选择本地地址',
|
|
||||||
trigger: 'blur',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
headerTheme: [
|
|
||||||
{
|
|
||||||
required: true,
|
|
||||||
message: '请选择主题色',
|
|
||||||
trigger: 'blur',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
basePath: [
|
|
||||||
{
|
|
||||||
required: true,
|
|
||||||
message: '请输入base-path',
|
|
||||||
trigger: 'blur',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
const { rulesFrom } = toRefs(form);
|
|
||||||
|
const rulesFrom = ref({
|
||||||
|
title: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: '请输入系统名称',
|
||||||
|
trigger: 'blur',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
headerTheme: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: '请选择主题色',
|
||||||
|
trigger: 'blur',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
basePath: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: '请输入base-path',
|
||||||
|
trigger: 'blur',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
});
|
||||||
|
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格式校验
|
* logo格式校验
|
||||||
*/
|
*/
|
||||||
beforeLogoUpload: (file) => {
|
beforeLogoUpload: (file) => {
|
||||||
const isType = logoData.imageTypes.includes(file.type);
|
const isType: any = logoData.imageTypes.includes(file.type);
|
||||||
if (!isType) {
|
if (!isType) {
|
||||||
message.error(`请上传.jpg.png.jfif.pjp.pjpeg.jpeg格式的图片`);
|
message.error(`请上传.jpg.png.jfif.pjp.pjpeg.jpeg格式的图片`);
|
||||||
return false;
|
return false;
|
||||||
|
@ -1033,58 +1054,58 @@ const {
|
||||||
* 提交基础表单
|
* 提交基础表单
|
||||||
*/
|
*/
|
||||||
const basicData = reactive({
|
const basicData = reactive({
|
||||||
isSucessBasic: false,
|
isSucessBasic: 0,
|
||||||
/**
|
/**
|
||||||
* 提交基础表单数据
|
* 提交基础表单数据
|
||||||
*/
|
*/
|
||||||
saveBasicInfo: async () => {
|
saveBasicInfo: async () => {
|
||||||
// return new Promise(async (resolve) => {
|
validate()
|
||||||
const vaild = await formBasicRef.value.validate();
|
.then(async () => {
|
||||||
console.log(vaild, 'vaild ');
|
const item = [
|
||||||
if (vaild) {
|
{
|
||||||
const item = [
|
scope: 'front',
|
||||||
{
|
properties: {
|
||||||
scope: 'front',
|
...form,
|
||||||
properties: {
|
apikey: '',
|
||||||
...form,
|
'base-path': '',
|
||||||
apikey: '',
|
},
|
||||||
'base-path': '',
|
|
||||||
},
|
},
|
||||||
},
|
{
|
||||||
{
|
scope: 'amap',
|
||||||
scope: 'amap',
|
properties: {
|
||||||
properties: {
|
api: form.apikey,
|
||||||
api: form.apikey,
|
},
|
||||||
},
|
},
|
||||||
},
|
{
|
||||||
{
|
scope: 'paths',
|
||||||
scope: 'paths',
|
properties: {
|
||||||
properties: {
|
'base-path': form.basePath,
|
||||||
'base-path': form.basePath,
|
},
|
||||||
},
|
},
|
||||||
},
|
];
|
||||||
];
|
const res = await save(item);
|
||||||
const res = await save(item);
|
if (res.status === 200) {
|
||||||
if (res.status === 200) {
|
const ico: any = document.querySelector('link[rel="icon"]');
|
||||||
const ico: any = document.querySelector('link[rel="icon"]');
|
if (ico !== null) {
|
||||||
if (ico !== null) {
|
ico.href = form.icon;
|
||||||
ico.href = form.icon;
|
}
|
||||||
|
basicData.isSucessBasic = 3;
|
||||||
|
} else {
|
||||||
|
basicData.isSucessBasic = 2;
|
||||||
}
|
}
|
||||||
} else {
|
})
|
||||||
basicData.isSucessBasic = true;
|
.catch((error: ValidateErrorEntity<formState>) => {
|
||||||
}
|
basicData.isSucessBasic = 2;
|
||||||
} else {
|
});
|
||||||
basicData.isSucessBasic = true;
|
|
||||||
}
|
|
||||||
// });
|
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
const { isSucessBasic } = toRefs(basicData);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 提交角色数据
|
* 提交角色数据
|
||||||
*/
|
*/
|
||||||
const roleData = reactive({
|
const roleData = reactive({
|
||||||
isSucessRole: false,
|
isSucessRole: 0,
|
||||||
/**
|
/**
|
||||||
* 根据菜单找角色
|
* 根据菜单找角色
|
||||||
*/
|
*/
|
||||||
|
@ -1158,7 +1179,7 @@ const roleData = reactive({
|
||||||
}
|
}
|
||||||
} else if (index === keys.value.length - 1) {
|
} else if (index === keys.value.length - 1) {
|
||||||
resolve(Count === keys.value.length);
|
resolve(Count === keys.value.length);
|
||||||
roleData.isSucessRole = true;
|
roleData.isSucessRole = 2;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -1222,7 +1243,7 @@ const { count } = toRefs(menuDatas);
|
||||||
* 提交初始化数据
|
* 提交初始化数据
|
||||||
*/
|
*/
|
||||||
const initialization = reactive({
|
const initialization = reactive({
|
||||||
isSucessInit: false,
|
isSucessInit: 0,
|
||||||
optionPorts: [],
|
optionPorts: [],
|
||||||
/**
|
/**
|
||||||
* 查询端口数据
|
* 查询端口数据
|
||||||
|
@ -1244,74 +1265,74 @@ const initialization = reactive({
|
||||||
*/
|
*/
|
||||||
|
|
||||||
saveCurrentData: async () => {
|
saveCurrentData: async () => {
|
||||||
// return new Promise(async (resolve) => {
|
formRef.value
|
||||||
const valid = await formRef.value.validate();
|
.validate()
|
||||||
console.log(valid, 'valid');
|
.then(async () => {
|
||||||
// if (valid) {
|
try {
|
||||||
// try {
|
// 新增网络组件
|
||||||
// // 新增网络组件
|
const network = await saveNetwork({
|
||||||
// const network = await saveNetwork({
|
type: 'MQTT_SERVER',
|
||||||
// type: 'MQTT_SERVER',
|
shareCluster: true,
|
||||||
// shareCluster: true,
|
name: 'MQTT网络组件',
|
||||||
// name: 'MQTT网络组件',
|
configuration: {
|
||||||
// configuration: {
|
host: '0.0.0.0',
|
||||||
// host: '0.0.0.0',
|
secure: false,
|
||||||
// secure: false,
|
port: modalForm.port,
|
||||||
// port: modalForm.port,
|
publicHost: modalForm.publicHost,
|
||||||
// publicHost: modalForm.publicHost,
|
publicPort: modalForm.publicPort,
|
||||||
// publicPort: modalForm.publicPort,
|
},
|
||||||
// },
|
});
|
||||||
// });
|
// 保存协议
|
||||||
// // 保存协议
|
const protocol = await saveProtocol();
|
||||||
// const protocol = await saveProtocol();
|
let protocolItem: any = undefined;
|
||||||
// let protocolItem: any = undefined;
|
if (protocol.status === 200) {
|
||||||
// if (protocol.status === 200) {
|
const proid = await getProtocol();
|
||||||
// const proid = await getProtocol();
|
if (proid.status === 200) {
|
||||||
// if (proid.status === 200) {
|
protocolItem = (proid?.result || []).find(
|
||||||
// protocolItem = (proid?.result || []).find(
|
(it: any) => it.name === 'JetLinks官方协议',
|
||||||
// (it: any) => it.name === 'JetLinks官方协议',
|
);
|
||||||
// );
|
}
|
||||||
// }
|
}
|
||||||
// }
|
// 新增设备接入网关
|
||||||
// // 新增设备接入网关
|
const accessConfig = await saveAccessConfig({
|
||||||
// const accessConfig = await saveAccessConfig({
|
name: 'MQTT类型设备接入网关',
|
||||||
// name: 'MQTT类型设备接入网关',
|
provider: 'mqtt-server-gateway',
|
||||||
// provider: 'mqtt-server-gateway',
|
protocol: protocolItem?.id,
|
||||||
// protocol: protocolItem?.id,
|
transport: 'MQTT',
|
||||||
// transport: 'MQTT',
|
channel: 'network',
|
||||||
// channel: 'network',
|
channelId: network?.result?.id,
|
||||||
// channelId: network?.result?.id,
|
});
|
||||||
// });
|
// 新增产品
|
||||||
// // 新增产品
|
const product = await saveProduct({
|
||||||
// const product = await saveProduct({
|
name: 'MQTT产品',
|
||||||
// name: 'MQTT产品',
|
messageProtocol: protocolItem?.id,
|
||||||
// messageProtocol: protocolItem?.id,
|
protocolName: protocolItem?.name,
|
||||||
// protocolName: protocolItem?.name,
|
transportProtocol: 'MQTT',
|
||||||
// transportProtocol: 'MQTT',
|
deviceType: 'device',
|
||||||
// deviceType: 'device',
|
accessId: accessConfig.result?.id,
|
||||||
// accessId: accessConfig.result?.id,
|
accessName: accessConfig.result?.name,
|
||||||
// accessName: accessConfig.result?.name,
|
accessProvider: 'mqtt-server-gateway',
|
||||||
// accessProvider: 'mqtt-server-gateway',
|
});
|
||||||
// });
|
// 新增设备
|
||||||
// // 新增设备
|
const device = await saveDevice({
|
||||||
// const device = await saveDevice({
|
name: 'MQTT设备',
|
||||||
// name: 'MQTT设备',
|
productId: product?.result?.id,
|
||||||
// productId: product?.result?.id,
|
productName: product?.result?.name,
|
||||||
// productName: product?.result?.name,
|
});
|
||||||
// });
|
if (device.status === 200) {
|
||||||
// if (device.status === 200) {
|
await changeDeploy(product.result.id);
|
||||||
// changeDeploy(product.result.id);
|
await deployDevice(device.result.id);
|
||||||
// deployDevice(device.result.id);
|
}
|
||||||
// }
|
flag.value = true;
|
||||||
|
visible.value = false;
|
||||||
// flag.value = true;
|
initialization.isSucessInit = 3;
|
||||||
// visible.value = false;
|
} catch (e) {
|
||||||
// } catch (e) {
|
initialization.isSucessInit = 2;
|
||||||
// initialization.isSucessInit = true;
|
}
|
||||||
// // resolve(false);
|
})
|
||||||
// }
|
.catch((error: ValidateErrorEntity<modalState>) => {
|
||||||
// }
|
initialization.isSucessInit = 2;
|
||||||
initialization.isSucessInit = true;
|
});
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
const { optionPorts, saveCurrentData, isSucessInit } = toRefs(initialization);
|
const { optionPorts, saveCurrentData, isSucessInit } = toRefs(initialization);
|
||||||
|
@ -1321,13 +1342,33 @@ const { optionPorts, saveCurrentData, isSucessInit } = toRefs(initialization);
|
||||||
*/
|
*/
|
||||||
menuDatas.getSystemPermissionData();
|
menuDatas.getSystemPermissionData();
|
||||||
initialization.getCurrentPort();
|
initialization.getCurrentPort();
|
||||||
|
/**
|
||||||
|
* 跳转首页
|
||||||
|
*/
|
||||||
|
const jump = () => {
|
||||||
|
window.location.href = '/';
|
||||||
|
};
|
||||||
/**
|
/**
|
||||||
* 提交所有数据
|
* 提交所有数据
|
||||||
*/
|
*/
|
||||||
const submitData = () => {
|
const submitData = async () => {
|
||||||
initialization.saveCurrentData();
|
if (keys.value.length > 0) {
|
||||||
roleData.addRoleData();
|
roleData.addRoleData();
|
||||||
|
}
|
||||||
basicData.saveBasicInfo();
|
basicData.saveBasicInfo();
|
||||||
|
// 当前数据是否成功提交
|
||||||
|
if (
|
||||||
|
basicData.isSucessBasic === 3 &&
|
||||||
|
roleData.isSucessRole === 3 &&
|
||||||
|
initialization.isSucessInit === 3
|
||||||
|
) {
|
||||||
|
message.success('保存成功');
|
||||||
|
// 记录初始化数据,跳转首页
|
||||||
|
const res = await saveInit();
|
||||||
|
if (res.status === 200) {
|
||||||
|
jump();
|
||||||
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style scoped lang="less">
|
<style scoped lang="less">
|
||||||
|
|
Loading…
Reference in New Issue