完成基本接口调用

This commit is contained in:
xiaozhang 2024-03-22 10:49:42 +08:00
parent 6465951ed8
commit 31121a54d0
23 changed files with 854 additions and 128 deletions

371
package-lock.json generated
View File

@ -10,6 +10,8 @@
"dependencies": {
"@types/xml2js": "^0.4.14",
"axios": "^1.6.7",
"element-plus": "^2.6.1",
"lib-flexible": "^0.3.2",
"qrcode": "^1.5.3",
"vue": "^3.4.15",
"vue-router": "^4.2.5",
@ -32,6 +34,22 @@
"node": ">=6.0.0"
}
},
"node_modules/@ctrl/tinycolor": {
"version": "3.6.1",
"resolved": "https://registry.npmmirror.com/@ctrl/tinycolor/-/tinycolor-3.6.1.tgz",
"integrity": "sha512-SITSV6aIXsuVNV3f3O0f2n/cgyEDWoSqtZMYiAmcsYHydcKrOz3gUxB/iXd/Qf08+IZX4KpgNbvUdMBmWz+kcA==",
"engines": {
"node": ">=10"
}
},
"node_modules/@element-plus/icons-vue": {
"version": "2.3.1",
"resolved": "https://registry.npmmirror.com/@element-plus/icons-vue/-/icons-vue-2.3.1.tgz",
"integrity": "sha512-XxVUZv48RZAd87ucGS48jPf6pKu0yV5UCg9f4FFwtrYxXOwWuVJo6wOvSLKEoMQKjv8GsX/mhP6UsC1lRwbUWg==",
"peerDependencies": {
"vue": "^3.2.0"
}
},
"node_modules/@esbuild/aix-ppc64": {
"version": "0.19.12",
"resolved": "https://registry.npmmirror.com/@esbuild/aix-ppc64/-/aix-ppc64-0.19.12.tgz",
@ -400,11 +418,39 @@
"node": ">=12"
}
},
"node_modules/@floating-ui/core": {
"version": "1.6.0",
"resolved": "https://registry.npmmirror.com/@floating-ui/core/-/core-1.6.0.tgz",
"integrity": "sha512-PcF++MykgmTj3CIyOQbKA/hDzOAiqI3mhuoN44WRCopIs1sgoDoU4oty4Jtqaj/y3oDU6fnVSm4QG0a3t5i0+g==",
"dependencies": {
"@floating-ui/utils": "^0.2.1"
}
},
"node_modules/@floating-ui/dom": {
"version": "1.6.3",
"resolved": "https://registry.npmmirror.com/@floating-ui/dom/-/dom-1.6.3.tgz",
"integrity": "sha512-RnDthu3mzPlQ31Ss/BTwQ1zjzIhr3lk1gZB1OC56h/1vEtaXkESrOqL5fQVMfXpwGtRwX+YsZBdyHtJMQnkArw==",
"dependencies": {
"@floating-ui/core": "^1.0.0",
"@floating-ui/utils": "^0.2.0"
}
},
"node_modules/@floating-ui/utils": {
"version": "0.2.1",
"resolved": "https://registry.npmmirror.com/@floating-ui/utils/-/utils-0.2.1.tgz",
"integrity": "sha512-9TANp6GPoMtYzQdt54kfAyMmz1+osLlXdg2ENroU7zzrtflTLrrC/lgrIfaSe+Wu0b89GKccT7vxXA0MoAIO+Q=="
},
"node_modules/@jridgewell/sourcemap-codec": {
"version": "1.4.15",
"resolved": "https://registry.npmmirror.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz",
"integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg=="
},
"node_modules/@popperjs/core": {
"name": "@sxzz/popperjs-es",
"version": "2.11.7",
"resolved": "https://registry.npmmirror.com/@sxzz/popperjs-es/-/popperjs-es-2.11.7.tgz",
"integrity": "sha512-Ccy0NlLkzr0Ex2FKvh2X+OyERHXJ88XJ1MXtsI9y9fGexlaXaVTPzBCRBwIxFkORuOb+uBqeu+RqnpgYTEZRUQ=="
},
"node_modules/@rollup/rollup-android-arm-eabi": {
"version": "4.12.0",
"resolved": "https://registry.npmmirror.com/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.12.0.tgz",
@ -580,6 +626,19 @@
"integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==",
"dev": true
},
"node_modules/@types/lodash": {
"version": "4.17.0",
"resolved": "https://registry.npmmirror.com/@types/lodash/-/lodash-4.17.0.tgz",
"integrity": "sha512-t7dhREVv6dbNj0q17X12j7yDG4bD/DHYX7o5/DbDxobP0HnGPgpRz2Ej77aL7TZT3DSw13fqUTj8J4mMnqa7WA=="
},
"node_modules/@types/lodash-es": {
"version": "4.17.12",
"resolved": "https://registry.npmmirror.com/@types/lodash-es/-/lodash-es-4.17.12.tgz",
"integrity": "sha512-0NgftHUcV4v34VhXm8QBSftKVXtbkBG3ViCjs6+eJ5a6y6Mi/jiFGPc1sC7QK+9BFhWrURE3EOggmWaSxL9OzQ==",
"dependencies": {
"@types/lodash": "*"
}
},
"node_modules/@types/node": {
"version": "20.11.19",
"resolved": "https://registry.npmmirror.com/@types/node/-/node-20.11.19.tgz",
@ -588,6 +647,11 @@
"undici-types": "~5.26.4"
}
},
"node_modules/@types/web-bluetooth": {
"version": "0.0.16",
"resolved": "https://registry.npmmirror.com/@types/web-bluetooth/-/web-bluetooth-0.0.16.tgz",
"integrity": "sha512-oh8q2Zc32S6gd/j50GowEjKLoOVOwHP/bWVjKJInBwQqdOYMdPrf1oVlelTlyfFK3CKxL1uahMDAr+vy8T7yMQ=="
},
"node_modules/@types/xml2js": {
"version": "0.4.14",
"resolved": "https://registry.npmmirror.com/@types/xml2js/-/xml2js-0.4.14.tgz",
@ -704,6 +768,74 @@
"resolved": "https://registry.npmmirror.com/@vue/shared/-/shared-3.4.19.tgz",
"integrity": "sha512-/KliRRHMF6LoiThEy+4c1Z4KB/gbPrGjWwJR+crg2otgrf/egKzRaCPvJ51S5oetgsgXLfc4Rm5ZgrKHZrtMSw=="
},
"node_modules/@vueuse/core": {
"version": "9.13.0",
"resolved": "https://registry.npmmirror.com/@vueuse/core/-/core-9.13.0.tgz",
"integrity": "sha512-pujnclbeHWxxPRqXWmdkKV5OX4Wk4YeK7wusHqRwU0Q7EFusHoqNA/aPhB6KCh9hEqJkLAJo7bb0Lh9b+OIVzw==",
"dependencies": {
"@types/web-bluetooth": "^0.0.16",
"@vueuse/metadata": "9.13.0",
"@vueuse/shared": "9.13.0",
"vue-demi": "*"
}
},
"node_modules/@vueuse/core/node_modules/vue-demi": {
"version": "0.14.7",
"resolved": "https://registry.npmmirror.com/vue-demi/-/vue-demi-0.14.7.tgz",
"integrity": "sha512-EOG8KXDQNwkJILkx/gPcoL/7vH+hORoBaKgGe+6W7VFMvCYJfmF2dGbvgDroVnI8LU7/kTu8mbjRZGBU1z9NTA==",
"hasInstallScript": true,
"bin": {
"vue-demi-fix": "bin/vue-demi-fix.js",
"vue-demi-switch": "bin/vue-demi-switch.js"
},
"engines": {
"node": ">=12"
},
"peerDependencies": {
"@vue/composition-api": "^1.0.0-rc.1",
"vue": "^3.0.0-0 || ^2.6.0"
},
"peerDependenciesMeta": {
"@vue/composition-api": {
"optional": true
}
}
},
"node_modules/@vueuse/metadata": {
"version": "9.13.0",
"resolved": "https://registry.npmmirror.com/@vueuse/metadata/-/metadata-9.13.0.tgz",
"integrity": "sha512-gdU7TKNAUVlXXLbaF+ZCfte8BjRJQWPCa2J55+7/h+yDtzw3vOoGQDRXzI6pyKyo6bXFT5/QoPE4hAknExjRLQ=="
},
"node_modules/@vueuse/shared": {
"version": "9.13.0",
"resolved": "https://registry.npmmirror.com/@vueuse/shared/-/shared-9.13.0.tgz",
"integrity": "sha512-UrnhU+Cnufu4S6JLCPZnkWh0WwZGUp72ktOF2DFptMlOs3TOdVv8xJN53zhHGARmVOsz5KqOls09+J1NR6sBKw==",
"dependencies": {
"vue-demi": "*"
}
},
"node_modules/@vueuse/shared/node_modules/vue-demi": {
"version": "0.14.7",
"resolved": "https://registry.npmmirror.com/vue-demi/-/vue-demi-0.14.7.tgz",
"integrity": "sha512-EOG8KXDQNwkJILkx/gPcoL/7vH+hORoBaKgGe+6W7VFMvCYJfmF2dGbvgDroVnI8LU7/kTu8mbjRZGBU1z9NTA==",
"hasInstallScript": true,
"bin": {
"vue-demi-fix": "bin/vue-demi-fix.js",
"vue-demi-switch": "bin/vue-demi-switch.js"
},
"engines": {
"node": ">=12"
},
"peerDependencies": {
"@vue/composition-api": "^1.0.0-rc.1",
"vue": "^3.0.0-0 || ^2.6.0"
},
"peerDependenciesMeta": {
"@vue/composition-api": {
"optional": true
}
}
},
"node_modules/@xmldom/xmldom": {
"version": "0.8.10",
"resolved": "https://registry.npmmirror.com/@xmldom/xmldom/-/xmldom-0.8.10.tgz",
@ -731,6 +863,11 @@
"node": ">=8"
}
},
"node_modules/async-validator": {
"version": "4.2.5",
"resolved": "https://registry.npmmirror.com/async-validator/-/async-validator-4.2.5.tgz",
"integrity": "sha512-7HhHjtERjqlNbZtqNqy2rckN/SpOOlmDliet+lP7k+eKZEjPk3DgyeU9lIXLdeLz0uBbbVp+9Qdow9wJWgwwfg=="
},
"node_modules/asynckit": {
"version": "0.4.0",
"resolved": "https://registry.npmmirror.com/asynckit/-/asynckit-0.4.0.tgz",
@ -796,6 +933,11 @@
"resolved": "https://registry.npmmirror.com/csstype/-/csstype-3.1.3.tgz",
"integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw=="
},
"node_modules/dayjs": {
"version": "1.11.10",
"resolved": "https://registry.npmmirror.com/dayjs/-/dayjs-1.11.10.tgz",
"integrity": "sha512-vjAczensTgRcqDERK0SR2XMwsF/tSvnvlv6VcF2GIhg6Sx4yOIt/irsr1RDJsKiIyBzJDpCoXiWWq28MqH2cnQ=="
},
"node_modules/decamelize": {
"version": "1.2.0",
"resolved": "https://registry.npmmirror.com/decamelize/-/decamelize-1.2.0.tgz",
@ -817,6 +959,31 @@
"resolved": "https://registry.npmmirror.com/dijkstrajs/-/dijkstrajs-1.0.3.tgz",
"integrity": "sha512-qiSlmBq9+BCdCA/L46dw8Uy93mloxsPSbwnm5yrKn2vMPiy8KyAskTF6zuV/j5BMsmOGZDPs7KjU+mjb670kfA=="
},
"node_modules/element-plus": {
"version": "2.6.1",
"resolved": "https://registry.npmmirror.com/element-plus/-/element-plus-2.6.1.tgz",
"integrity": "sha512-6VRpLjwtIVdtUuITJPPKtpOH1NM6nuAkRE3q5O4Lrx0N1bYMhTkiqb2Jy7zfQuDPbOIkkF2OABTzegpNnzgsnQ==",
"dependencies": {
"@ctrl/tinycolor": "^3.4.1",
"@element-plus/icons-vue": "^2.3.1",
"@floating-ui/dom": "^1.0.1",
"@popperjs/core": "npm:@sxzz/popperjs-es@^2.11.7",
"@types/lodash": "^4.14.182",
"@types/lodash-es": "^4.17.6",
"@vueuse/core": "^9.1.0",
"async-validator": "^4.2.5",
"dayjs": "^1.11.3",
"escape-html": "^1.0.3",
"lodash": "^4.17.21",
"lodash-es": "^4.17.21",
"lodash-unified": "^1.0.2",
"memoize-one": "^6.0.0",
"normalize-wheel-es": "^1.2.0"
},
"peerDependencies": {
"vue": "^3.2.0"
}
},
"node_modules/emoji-regex": {
"version": "8.0.0",
"resolved": "https://registry.npmmirror.com/emoji-regex/-/emoji-regex-8.0.0.tgz",
@ -873,6 +1040,11 @@
"@esbuild/win32-x64": "0.19.12"
}
},
"node_modules/escape-html": {
"version": "1.0.3",
"resolved": "https://registry.npmmirror.com/escape-html/-/escape-html-1.0.3.tgz",
"integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow=="
},
"node_modules/estree-walker": {
"version": "2.0.2",
"resolved": "https://registry.npmmirror.com/estree-walker/-/estree-walker-2.0.2.tgz",
@ -946,6 +1118,11 @@
"node": ">=8"
}
},
"node_modules/lib-flexible": {
"version": "0.3.2",
"resolved": "https://registry.npmmirror.com/lib-flexible/-/lib-flexible-0.3.2.tgz",
"integrity": "sha512-9yowMWA70tKhKdCJDaltY0mNQG4OWo7pWKScnTp9aiSxS7s20ZYlwBRE3335nweOf5qKXVC7sDxJwMPM8/MFZg=="
},
"node_modules/locate-path": {
"version": "5.0.0",
"resolved": "https://registry.npmmirror.com/locate-path/-/locate-path-5.0.0.tgz",
@ -957,6 +1134,26 @@
"node": ">=8"
}
},
"node_modules/lodash": {
"version": "4.17.21",
"resolved": "https://registry.npmmirror.com/lodash/-/lodash-4.17.21.tgz",
"integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg=="
},
"node_modules/lodash-es": {
"version": "4.17.21",
"resolved": "https://registry.npmmirror.com/lodash-es/-/lodash-es-4.17.21.tgz",
"integrity": "sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw=="
},
"node_modules/lodash-unified": {
"version": "1.0.3",
"resolved": "https://registry.npmmirror.com/lodash-unified/-/lodash-unified-1.0.3.tgz",
"integrity": "sha512-WK9qSozxXOD7ZJQlpSqOT+om2ZfcT4yO+03FuzAHD0wF6S0l0090LRPDx3vhTTLZ8cFKpBn+IOcVXK6qOcIlfQ==",
"peerDependencies": {
"@types/lodash-es": "*",
"lodash": "*",
"lodash-es": "*"
}
},
"node_modules/magic-string": {
"version": "0.30.7",
"resolved": "https://registry.npmmirror.com/magic-string/-/magic-string-0.30.7.tgz",
@ -968,6 +1165,11 @@
"node": ">=12"
}
},
"node_modules/memoize-one": {
"version": "6.0.0",
"resolved": "https://registry.npmmirror.com/memoize-one/-/memoize-one-6.0.0.tgz",
"integrity": "sha512-rkpe71W0N0c0Xz6QD0eJETuWAJGnJ9afsl1srmwPrI+yBCkge5EycXXbYRyvL29zZVUWQCY7InPRCv3GDXuZNw=="
},
"node_modules/mime-db": {
"version": "1.52.0",
"resolved": "https://registry.npmmirror.com/mime-db/-/mime-db-1.52.0.tgz",
@ -998,6 +1200,11 @@
"node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1"
}
},
"node_modules/normalize-wheel-es": {
"version": "1.2.0",
"resolved": "https://registry.npmmirror.com/normalize-wheel-es/-/normalize-wheel-es-1.2.0.tgz",
"integrity": "sha512-Wj7+EJQ8mSuXr2iWfnujrimU35R2W4FAErEyTmJoJ7ucwTn2hOUSsRehMb5RSYkxXGTM7Y9QpvPmp++w5ftoJw=="
},
"node_modules/p-limit": {
"version": "2.3.0",
"resolved": "https://registry.npmmirror.com/p-limit/-/p-limit-2.3.0.tgz",
@ -1350,6 +1557,17 @@
"resolved": "https://registry.npmmirror.com/@babel/parser/-/parser-7.23.9.tgz",
"integrity": "sha512-9tcKgqKbs3xGJ+NtKF2ndOBBLVwPjl1SHxPQkd36r3Dlirw3xWUeGaTbqr7uGZcTaxkVNwc+03SVP7aCdWrTlA=="
},
"@ctrl/tinycolor": {
"version": "3.6.1",
"resolved": "https://registry.npmmirror.com/@ctrl/tinycolor/-/tinycolor-3.6.1.tgz",
"integrity": "sha512-SITSV6aIXsuVNV3f3O0f2n/cgyEDWoSqtZMYiAmcsYHydcKrOz3gUxB/iXd/Qf08+IZX4KpgNbvUdMBmWz+kcA=="
},
"@element-plus/icons-vue": {
"version": "2.3.1",
"resolved": "https://registry.npmmirror.com/@element-plus/icons-vue/-/icons-vue-2.3.1.tgz",
"integrity": "sha512-XxVUZv48RZAd87ucGS48jPf6pKu0yV5UCg9f4FFwtrYxXOwWuVJo6wOvSLKEoMQKjv8GsX/mhP6UsC1lRwbUWg==",
"requires": {}
},
"@esbuild/aix-ppc64": {
"version": "0.19.12",
"resolved": "https://registry.npmmirror.com/@esbuild/aix-ppc64/-/aix-ppc64-0.19.12.tgz",
@ -1511,11 +1729,38 @@
"dev": true,
"optional": true
},
"@floating-ui/core": {
"version": "1.6.0",
"resolved": "https://registry.npmmirror.com/@floating-ui/core/-/core-1.6.0.tgz",
"integrity": "sha512-PcF++MykgmTj3CIyOQbKA/hDzOAiqI3mhuoN44WRCopIs1sgoDoU4oty4Jtqaj/y3oDU6fnVSm4QG0a3t5i0+g==",
"requires": {
"@floating-ui/utils": "^0.2.1"
}
},
"@floating-ui/dom": {
"version": "1.6.3",
"resolved": "https://registry.npmmirror.com/@floating-ui/dom/-/dom-1.6.3.tgz",
"integrity": "sha512-RnDthu3mzPlQ31Ss/BTwQ1zjzIhr3lk1gZB1OC56h/1vEtaXkESrOqL5fQVMfXpwGtRwX+YsZBdyHtJMQnkArw==",
"requires": {
"@floating-ui/core": "^1.0.0",
"@floating-ui/utils": "^0.2.0"
}
},
"@floating-ui/utils": {
"version": "0.2.1",
"resolved": "https://registry.npmmirror.com/@floating-ui/utils/-/utils-0.2.1.tgz",
"integrity": "sha512-9TANp6GPoMtYzQdt54kfAyMmz1+osLlXdg2ENroU7zzrtflTLrrC/lgrIfaSe+Wu0b89GKccT7vxXA0MoAIO+Q=="
},
"@jridgewell/sourcemap-codec": {
"version": "1.4.15",
"resolved": "https://registry.npmmirror.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz",
"integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg=="
},
"@popperjs/core": {
"version": "npm:@sxzz/popperjs-es@2.11.7",
"resolved": "https://registry.npmmirror.com/@sxzz/popperjs-es/-/popperjs-es-2.11.7.tgz",
"integrity": "sha512-Ccy0NlLkzr0Ex2FKvh2X+OyERHXJ88XJ1MXtsI9y9fGexlaXaVTPzBCRBwIxFkORuOb+uBqeu+RqnpgYTEZRUQ=="
},
"@rollup/rollup-android-arm-eabi": {
"version": "4.12.0",
"resolved": "https://registry.npmmirror.com/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.12.0.tgz",
@ -1613,6 +1858,19 @@
"integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==",
"dev": true
},
"@types/lodash": {
"version": "4.17.0",
"resolved": "https://registry.npmmirror.com/@types/lodash/-/lodash-4.17.0.tgz",
"integrity": "sha512-t7dhREVv6dbNj0q17X12j7yDG4bD/DHYX7o5/DbDxobP0HnGPgpRz2Ej77aL7TZT3DSw13fqUTj8J4mMnqa7WA=="
},
"@types/lodash-es": {
"version": "4.17.12",
"resolved": "https://registry.npmmirror.com/@types/lodash-es/-/lodash-es-4.17.12.tgz",
"integrity": "sha512-0NgftHUcV4v34VhXm8QBSftKVXtbkBG3ViCjs6+eJ5a6y6Mi/jiFGPc1sC7QK+9BFhWrURE3EOggmWaSxL9OzQ==",
"requires": {
"@types/lodash": "*"
}
},
"@types/node": {
"version": "20.11.19",
"resolved": "https://registry.npmmirror.com/@types/node/-/node-20.11.19.tgz",
@ -1621,6 +1879,11 @@
"undici-types": "~5.26.4"
}
},
"@types/web-bluetooth": {
"version": "0.0.16",
"resolved": "https://registry.npmmirror.com/@types/web-bluetooth/-/web-bluetooth-0.0.16.tgz",
"integrity": "sha512-oh8q2Zc32S6gd/j50GowEjKLoOVOwHP/bWVjKJInBwQqdOYMdPrf1oVlelTlyfFK3CKxL1uahMDAr+vy8T7yMQ=="
},
"@types/xml2js": {
"version": "0.4.14",
"resolved": "https://registry.npmmirror.com/@types/xml2js/-/xml2js-0.4.14.tgz",
@ -1728,6 +1991,46 @@
"resolved": "https://registry.npmmirror.com/@vue/shared/-/shared-3.4.19.tgz",
"integrity": "sha512-/KliRRHMF6LoiThEy+4c1Z4KB/gbPrGjWwJR+crg2otgrf/egKzRaCPvJ51S5oetgsgXLfc4Rm5ZgrKHZrtMSw=="
},
"@vueuse/core": {
"version": "9.13.0",
"resolved": "https://registry.npmmirror.com/@vueuse/core/-/core-9.13.0.tgz",
"integrity": "sha512-pujnclbeHWxxPRqXWmdkKV5OX4Wk4YeK7wusHqRwU0Q7EFusHoqNA/aPhB6KCh9hEqJkLAJo7bb0Lh9b+OIVzw==",
"requires": {
"@types/web-bluetooth": "^0.0.16",
"@vueuse/metadata": "9.13.0",
"@vueuse/shared": "9.13.0",
"vue-demi": "*"
},
"dependencies": {
"vue-demi": {
"version": "0.14.7",
"resolved": "https://registry.npmmirror.com/vue-demi/-/vue-demi-0.14.7.tgz",
"integrity": "sha512-EOG8KXDQNwkJILkx/gPcoL/7vH+hORoBaKgGe+6W7VFMvCYJfmF2dGbvgDroVnI8LU7/kTu8mbjRZGBU1z9NTA==",
"requires": {}
}
}
},
"@vueuse/metadata": {
"version": "9.13.0",
"resolved": "https://registry.npmmirror.com/@vueuse/metadata/-/metadata-9.13.0.tgz",
"integrity": "sha512-gdU7TKNAUVlXXLbaF+ZCfte8BjRJQWPCa2J55+7/h+yDtzw3vOoGQDRXzI6pyKyo6bXFT5/QoPE4hAknExjRLQ=="
},
"@vueuse/shared": {
"version": "9.13.0",
"resolved": "https://registry.npmmirror.com/@vueuse/shared/-/shared-9.13.0.tgz",
"integrity": "sha512-UrnhU+Cnufu4S6JLCPZnkWh0WwZGUp72ktOF2DFptMlOs3TOdVv8xJN53zhHGARmVOsz5KqOls09+J1NR6sBKw==",
"requires": {
"vue-demi": "*"
},
"dependencies": {
"vue-demi": {
"version": "0.14.7",
"resolved": "https://registry.npmmirror.com/vue-demi/-/vue-demi-0.14.7.tgz",
"integrity": "sha512-EOG8KXDQNwkJILkx/gPcoL/7vH+hORoBaKgGe+6W7VFMvCYJfmF2dGbvgDroVnI8LU7/kTu8mbjRZGBU1z9NTA==",
"requires": {}
}
}
},
"@xmldom/xmldom": {
"version": "0.8.10",
"resolved": "https://registry.npmmirror.com/@xmldom/xmldom/-/xmldom-0.8.10.tgz",
@ -1746,6 +2049,11 @@
"color-convert": "^2.0.1"
}
},
"async-validator": {
"version": "4.2.5",
"resolved": "https://registry.npmmirror.com/async-validator/-/async-validator-4.2.5.tgz",
"integrity": "sha512-7HhHjtERjqlNbZtqNqy2rckN/SpOOlmDliet+lP7k+eKZEjPk3DgyeU9lIXLdeLz0uBbbVp+9Qdow9wJWgwwfg=="
},
"asynckit": {
"version": "0.4.0",
"resolved": "https://registry.npmmirror.com/asynckit/-/asynckit-0.4.0.tgz",
@ -1802,6 +2110,11 @@
"resolved": "https://registry.npmmirror.com/csstype/-/csstype-3.1.3.tgz",
"integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw=="
},
"dayjs": {
"version": "1.11.10",
"resolved": "https://registry.npmmirror.com/dayjs/-/dayjs-1.11.10.tgz",
"integrity": "sha512-vjAczensTgRcqDERK0SR2XMwsF/tSvnvlv6VcF2GIhg6Sx4yOIt/irsr1RDJsKiIyBzJDpCoXiWWq28MqH2cnQ=="
},
"decamelize": {
"version": "1.2.0",
"resolved": "https://registry.npmmirror.com/decamelize/-/decamelize-1.2.0.tgz",
@ -1817,6 +2130,28 @@
"resolved": "https://registry.npmmirror.com/dijkstrajs/-/dijkstrajs-1.0.3.tgz",
"integrity": "sha512-qiSlmBq9+BCdCA/L46dw8Uy93mloxsPSbwnm5yrKn2vMPiy8KyAskTF6zuV/j5BMsmOGZDPs7KjU+mjb670kfA=="
},
"element-plus": {
"version": "2.6.1",
"resolved": "https://registry.npmmirror.com/element-plus/-/element-plus-2.6.1.tgz",
"integrity": "sha512-6VRpLjwtIVdtUuITJPPKtpOH1NM6nuAkRE3q5O4Lrx0N1bYMhTkiqb2Jy7zfQuDPbOIkkF2OABTzegpNnzgsnQ==",
"requires": {
"@ctrl/tinycolor": "^3.4.1",
"@element-plus/icons-vue": "^2.3.1",
"@floating-ui/dom": "^1.0.1",
"@popperjs/core": "npm:@sxzz/popperjs-es@^2.11.7",
"@types/lodash": "^4.14.182",
"@types/lodash-es": "^4.17.6",
"@vueuse/core": "^9.1.0",
"async-validator": "^4.2.5",
"dayjs": "^1.11.3",
"escape-html": "^1.0.3",
"lodash": "^4.17.21",
"lodash-es": "^4.17.21",
"lodash-unified": "^1.0.2",
"memoize-one": "^6.0.0",
"normalize-wheel-es": "^1.2.0"
}
},
"emoji-regex": {
"version": "8.0.0",
"resolved": "https://registry.npmmirror.com/emoji-regex/-/emoji-regex-8.0.0.tgz",
@ -1863,6 +2198,11 @@
"@esbuild/win32-x64": "0.19.12"
}
},
"escape-html": {
"version": "1.0.3",
"resolved": "https://registry.npmmirror.com/escape-html/-/escape-html-1.0.3.tgz",
"integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow=="
},
"estree-walker": {
"version": "2.0.2",
"resolved": "https://registry.npmmirror.com/estree-walker/-/estree-walker-2.0.2.tgz",
@ -1909,6 +2249,11 @@
"resolved": "https://registry.npmmirror.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
"integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg=="
},
"lib-flexible": {
"version": "0.3.2",
"resolved": "https://registry.npmmirror.com/lib-flexible/-/lib-flexible-0.3.2.tgz",
"integrity": "sha512-9yowMWA70tKhKdCJDaltY0mNQG4OWo7pWKScnTp9aiSxS7s20ZYlwBRE3335nweOf5qKXVC7sDxJwMPM8/MFZg=="
},
"locate-path": {
"version": "5.0.0",
"resolved": "https://registry.npmmirror.com/locate-path/-/locate-path-5.0.0.tgz",
@ -1917,6 +2262,22 @@
"p-locate": "^4.1.0"
}
},
"lodash": {
"version": "4.17.21",
"resolved": "https://registry.npmmirror.com/lodash/-/lodash-4.17.21.tgz",
"integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg=="
},
"lodash-es": {
"version": "4.17.21",
"resolved": "https://registry.npmmirror.com/lodash-es/-/lodash-es-4.17.21.tgz",
"integrity": "sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw=="
},
"lodash-unified": {
"version": "1.0.3",
"resolved": "https://registry.npmmirror.com/lodash-unified/-/lodash-unified-1.0.3.tgz",
"integrity": "sha512-WK9qSozxXOD7ZJQlpSqOT+om2ZfcT4yO+03FuzAHD0wF6S0l0090LRPDx3vhTTLZ8cFKpBn+IOcVXK6qOcIlfQ==",
"requires": {}
},
"magic-string": {
"version": "0.30.7",
"resolved": "https://registry.npmmirror.com/magic-string/-/magic-string-0.30.7.tgz",
@ -1925,6 +2286,11 @@
"@jridgewell/sourcemap-codec": "^1.4.15"
}
},
"memoize-one": {
"version": "6.0.0",
"resolved": "https://registry.npmmirror.com/memoize-one/-/memoize-one-6.0.0.tgz",
"integrity": "sha512-rkpe71W0N0c0Xz6QD0eJETuWAJGnJ9afsl1srmwPrI+yBCkge5EycXXbYRyvL29zZVUWQCY7InPRCv3GDXuZNw=="
},
"mime-db": {
"version": "1.52.0",
"resolved": "https://registry.npmmirror.com/mime-db/-/mime-db-1.52.0.tgz",
@ -1943,6 +2309,11 @@
"resolved": "https://registry.npmmirror.com/nanoid/-/nanoid-3.3.7.tgz",
"integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g=="
},
"normalize-wheel-es": {
"version": "1.2.0",
"resolved": "https://registry.npmmirror.com/normalize-wheel-es/-/normalize-wheel-es-1.2.0.tgz",
"integrity": "sha512-Wj7+EJQ8mSuXr2iWfnujrimU35R2W4FAErEyTmJoJ7ucwTn2hOUSsRehMb5RSYkxXGTM7Y9QpvPmp++w5ftoJw=="
},
"p-limit": {
"version": "2.3.0",
"resolved": "https://registry.npmmirror.com/p-limit/-/p-limit-2.3.0.tgz",

View File

@ -11,6 +11,8 @@
"dependencies": {
"@types/xml2js": "^0.4.14",
"axios": "^1.6.7",
"element-plus": "^2.6.1",
"lib-flexible": "^0.3.2",
"qrcode": "^1.5.3",
"vue": "^3.4.15",
"vue-router": "^4.2.5",

BIN
src/assets/icon/专员.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

BIN
src/assets/icon/企业.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

BIN
src/assets/icon/政策.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

BIN
src/assets/img/index1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 680 KiB

BIN
src/assets/img/index2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

BIN
src/assets/img/index3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 487 KiB

43
src/assets/js/flexible.js Normal file
View File

@ -0,0 +1,43 @@
(function flexible(window, document) {
var docEl = document.documentElement;
var dpr = window.devicePixelRatio || 1;
// adjust body font size
function setBodyFontSize() {
if (document.body) {
document.body.style.fontSize = 12 * dpr + "px";
} else {
document.addEventListener("DOMContentLoaded", setBodyFontSize);
}
}
setBodyFontSize();
// set 1rem = viewWidth / 10
function setRemUnit() {
var rem = docEl.clientWidth / 24;
docEl.style.fontSize = rem + "px";
}
setRemUnit();
// reset rem unit on page resize
window.addEventListener("resize", setRemUnit);
window.addEventListener("pageshow", function(e) {
if (e.persisted) {
setRemUnit();
}
});
// detect 0.5px supports
if (dpr >= 2) {
var fakeBody = document.createElement("body");
var testElement = document.createElement("div");
testElement.style.border = ".5px solid transparent";
fakeBody.appendChild(testElement);
docEl.appendChild(fakeBody);
if (testElement.offsetHeight === 1) {
docEl.classList.add("hairlines");
}
docEl.removeChild(fakeBody);
}
})(window, document);

View File

@ -1,12 +1,14 @@
import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import 'lib-flexible/flexible'//全局引入自适应
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
const app = createApp(App)
app.use(router)
app.use(ElementPlus)
app.mount('#app')

View File

@ -5,7 +5,7 @@ const router = createRouter({
history: createWebHistory(import.meta.env.BASE_URL),
routes: [
{
path: '/',
path: '/hoem',
name: 'home',
component: () => import('../views/home.vue')
},
@ -17,17 +17,26 @@ const router = createRouter({
{
path: '/show',
name: 'show',
component: () => import('../views/show.vue')
component: () => import('../views/show.vue'),
props: route => ({ id: route.query.id }) // 将查询参数 id 作为 props 传递给组件
},
{
path: '/test',
name: 'test',
component: () => import('../views/test.vue')
component: () => import('../views/test.vue'),
props: route => ({ id: route.query.id }) // 将查询参数 id 作为 props 传递给组件
},
{
path: '/xmltojson',
name: 'xmltojson',
component: () => import('../views/xmltojson.vue')
path: '/', //企业列表
name: 'companyListModule',
component: () => import('../views/companyListModule.vue'),
props: route => ({ id: route.query.id }) // 将查询参数 id 作为 props 传递给组件
},
{
path: '/corporateInfo', //企业详情
name: 'corporateInfo',
component: () => import('../views/corporateInfo.vue'),
props: route => ({ id: route.query.id }) // 将查询参数 id 作为 props 传递给组件
}
]
})

View File

@ -0,0 +1,80 @@
<template>
<div class="background">
<p class="company-name" @click="">企业列表</p>
<div v-if="jsonData">
<div v-for="(item, index) in jsonData.root.kczy.row" :key="index">
<!-- 使用 router-link 来实现路由导航 -->
<router-link :to="{ name: 'corporateInfo', query: { id: item.ID } }" class="router-link">
<p style="font-size: 18px;">{{ item.FIELD0001 }}</p>
</router-link>
</div>
</div>
</div>
</template>
<script setup>
import { ref } from 'vue';
import axios from 'axios';
import { fetchToken } from '../utils/getToken';
import x2js from 'x2js';
// 使 x2js
const x2jsInstance = new x2js();
//
const token = ref('');
const data = ref('');
const jsonData = ref(null);
// fetchToken
fetchToken().then((response) => {
if (response) {
token.value = response;
// token fetchData
fetchData(response);
}
});
// token
const fetchData = async (token) => {
try {
const response = await axios.get(`api/seeyon/rest/dee/task/getMineral?token=${token.id}`);
data.value = response.data;
// XMLJSON data.value
jsonData.value = x2jsInstance.xml2js(data.value);
// console.log(jsonData.value);
} catch (error) {
console.error(error);
}
};
</script>
<style scoped>
.background {
background-image: url("../assets/img/index3.png");
background-size: 100% 100%;
background-position: center;
height: 100vh; /* 设置高度为视口高度 */
/* 其他样式属性 */
}
* {
margin: 0;
padding: 0;
}
.company-name {
color: blue;
font-size: 24px;
text-align: center;
/* 设置文本内容距离顶部的距离为 50 像素 */
padding-top: 110px;
font-weight: bold;
}
.router-link {
text-decoration: none; /* 去掉下划线 */
color: inherit; /* 继承父元素的颜色,这里是指定的字体颜色 */
}
.router-link:hover {
color: inherit; /* 继承父元素的颜色,鼠标悬停时颜色不变 */
}
</style>

179
src/views/corporateInfo.vue Normal file
View File

@ -0,0 +1,179 @@
<template>
<div class="bg">
<div>
<div v-if="companyData" :key="companyData.ID">
<p class="company-name">{{ companyData.FIELD0001 }}</p>
<div class="icon-container">
<i class="fas fa-icon1"></i>
<i class="fas fa-icon2"></i>
<i class="fas fa-icon3"></i>
<i class="fas fa-icon4"></i>
</div><br>
<p><span style="color: orangered; font-weight:bold">名称</span>{{ companyData.FIELD0001 }}</p>
<p><span style="color: orangered; font-weight:bold">联系人</span>{{ companyData.FIELD0035 }}</p>
<p><span style="color: orangered; font-weight:bold">联系电话</span>{{ companyData.FIELD0037 }}</p>
<p>企业介绍{{ companyData.FIELD0006 }}</p>
<p>企业介绍{{ companyData.FIELD0007 }}</p>
<p>企业介绍{{ companyData.FIELD0008 }}</p>
<p>企业介绍{{ companyData.FIELD0022 }}</p>
<div>
<el-descriptions
title="基础信息"
direction="vertical"
:column="2"
border
v-if="companyData" :key="companyData.ID"
>
<el-descriptions-item label="Username">{{ companyData.FIELD0001 }}</el-descriptions-item>
<el-descriptions-item label="Telephone">{{ companyData.FIELD0035 }}</el-descriptions-item>
<el-descriptions-item label="Place" :span="2">{{ companyData.FIELD0006 }}</el-descriptions-item>
<el-descriptions-item label="Remarks">
<el-tag size="small">{{ companyData.FIELD0037 }}</el-tag>
</el-descriptions-item>
<el-descriptions-item label="Address">
{{ companyData.FIELD0006 }}
</el-descriptions-item>
<el-descriptions-item label="Remarks">
<el-tag size="small">{{ companyData.FIELD0037 }}</el-tag>
</el-descriptions-item>
<el-descriptions-item label="Address">
{{ companyData.FIELD0006 }}
</el-descriptions-item>
</el-descriptions>
</div>
<!-- <div>
<el-table :data="tableData" height="250" style="width: 100%">
<el-table-column prop="date" label="Date" width="180" />
<el-table-column prop="name" label="Name" width="180" />
<el-table-column prop="address" label="Address" />
</el-table>
</div> -->
</div>
<div>
<img :src="qrCodeUrls[0].qrCodeUrl" class="custom-qr-code" />
</div>
</div>
</div>
</template>
<script setup lang="ts">
import { ref, onMounted } from 'vue';
import axios from 'axios';
// fetchToken
import { fetchToken } from '../utils/getToken';
import { useRoute } from 'vue-router';
import x2js from 'x2js';
import useQRCodeGenerator from '../utils/QRCodeGenerator';// useQRCodeGenerator
const x2jsInstance = new x2js();
const route = useRoute();
const token = ref('');
const data = ref('');
const jsonData = ref(null);
const companyData = ref(null);
//
const qrCodeUrls = ref([
useQRCodeGenerator('https://zwy.guizhoujc.com/wh/show-wh.html?id=' + companyData.ID)
]);
//
onMounted(() => {
qrCodeUrls.value.forEach((generator) => {
generator.generateQRCode(generator.initialUrl);
});
});
// fetchToken
fetchToken().then((response) => {
if (response) {
token.value = response;
// token fetchData
fetchData(response);
}
});
// token
const fetchData = async (token) => {
try {
const response = await axios.get(`api/seeyon/rest/dee/task/getMineral?token=${token.id}`);
data.value = response.data;
//xmljson
jsonData.value = x2jsInstance.xml2js(data.value);
console.log(jsonData.value);
const id = route.query.id; // id
// jsonDataID
const selectedCompany = jsonData.value.root.kczy.row.find(company => company.ID === id);
if (selectedCompany) {
companyData.value = selectedCompany;
} else {
console.log('Company not found for ID:', id);
}
} catch (error) {
console.error(error);
}
};
</script>
<style scoped>
.bg {
min-width: 100%;
min-height: 100vh;
}
/* 在屏幕大于900px时设置背景颜色 */
@media screen and (min-width: 1080px) {
.bg {
background-image: url('../assets/img/index3.png'); /* 设置背景图片路径 */
background-size: cover;
background-repeat: no-repeat;
}
}
/* 在屏幕小于900px时显示背景图片 */
@media screen and (max-width: 1080px) {
.bg {
background-image: url('../assets/img/index1.png'); /* 设置背景图片路径 */
background-size: contain;
background-repeat: no-repeat;
}
}
*{
margin: 0;
padding: 0;
}
.company-name {
color: blue;
font-size: 24px;
text-align: center;
padding-top: 110px;
font-weight: bold;
}
.icon-container {
display: flex;
justify-content: space-around;
margin-top: 20px;
}
.fa-icon1::before {
content: url('../assets/icon/企业.png');
}
.fa-icon2::before {
content: url('../assets/icon/专员.png');
}
.fa-icon3::before {
content: url('../assets/icon/政策.png');
}
.fa-icon4::before {
content: url('../assets/icon/服务需求.png');
}
.el-descriptions {
margin-top: 20px;
}
</style>

View File

@ -1,11 +1,9 @@
<template>
<div class="background">
<p class="company-name">贵州智信云科技有限公司</p>
<div v-if="jsonData" style="padding-top: 20px;">
<div v-if="fieldLabels" v-for="fieldName in Object.keys(fieldLabels)" :key="fieldName">
<p v-if="fieldLabels[fieldName]">{{ fieldLabels[fieldName] }}: {{ jsonData.root.kczy.row[0][fieldName]['#text'] }}</p>
<div>
{{ jsonData.root.kczy.row[0]}}
</div>
</div>
<div>
<img :src="qrCodeUrls[0].qrCodeUrl" class="custom-qr-code" />
</div>
@ -16,24 +14,16 @@
import { ref, onMounted } from 'vue';
import axios from 'axios';
import { fetchToken } from '../utils/getToken'; // fetchToken
import { xmlToJson } from '../utils/xmlToJson'; // xmlToJson
import useQRCodeGenerator from '../utils/QRCodeGenerator';// useQRCodeGenerator
import x2js from 'x2js';
// 使 x2js
const x2jsInstance = new x2js();
const token = ref('');
const data = ref('');
const jsonData = ref(null);
//
const fieldLabels = {
FIELD0035: '联系人',
FIELD0037: '电话',
FIELD0033: '地址',
FIELD0013: '规划 ',
FIELD0006: '建设条件',
FIELD0007: '产业条件',
ID: 'id',
//
}
//
const qrCodeUrls = ref([
useQRCodeGenerator('https://zwy.guizhoujc.com/inc/xmtzk/kc/show-kc.html?id=974420865978944870')
@ -60,9 +50,8 @@ const fetchData = async (token) => {
const response = await axios.get(`api/seeyon/rest/dee/task/getMineral?token=${token.id}`);
data.value = response.data;
// console.log(data.value);
//xmljson
const json = xmlToJson(response.data);
jsonData.value = json;
//xmljson
jsonData.value = x2jsInstance.xml2js(data.value);
console.log(jsonData.value);
} catch (error) {
console.error(error);

View File

@ -1,10 +1,8 @@
<template>
<div class="background">
<p class="company-name">贵州智信云科技有限公司</p>
<div v-if="companyData" style="padding-top: 20px;">
<div v-for="fieldName in Object.keys(fieldLabels)" :key="fieldName">
<p v-if="fieldLabels[fieldName]">{{ fieldLabels[fieldName] }}: {{ companyData[fieldName]['#text'] }}</p>
</div>
<div>
</div>
<div>
<img :src="qrCodeUrls[0].qrCodeUrl" class="custom-qr-code" />
@ -22,17 +20,7 @@ import useQRCodeGenerator from '../utils/QRCodeGenerator'; // 导入二维码生
const token = ref('');
const companyData = ref(null);
//
const fieldLabels = {
FIELD0035: '联系人',
FIELD0037: '电话',
FIELD0033: '地址',
FIELD0013: '规划 ',
FIELD0006: '建设条件',
FIELD0007: '产业条件',
ID: 'id',
//
};
//
const qrCodeUrls = ref([

View File

@ -1,80 +1,75 @@
<template>
<div class="background">
<p class="company-name">贵州智信云科技有限公司</p>
<div>
<span>{{ jsonData }}</span>
</div>
<div>
<img :src="qrCodeUrls[0].qrCodeUrl" class="custom-qr-code" />
</div>
<div class="background">
<p class="company-name">贵州智信云科技有限公司</p>
<div v-if="companyData">
<p>公司名称{{ companyData.FIELD0001 }}</p>
<p>介绍{{ companyData.FIELD0006 }}</p>
</div>
</template>
<script setup>
import { ref, onMounted } from 'vue';
import axios from 'axios';
import { fetchToken } from '../utils/getToken'; // fetchToken
import useQRCodeGenerator from '../utils/QRCodeGenerator';// useQRCodeGenerator
import x2js from 'x2js'; //
</div>
</template>
const x2jsInstance = new x2js(); // 使 x2js
const token = ref('');
const data = ref('');
const jsonData = ref(null);
//
const qrCodeUrls = ref([
useQRCodeGenerator('https://zwy.guizhoujc.com/inc/xmtzk/kc/show-kc.html?id=974420865978944870')
]);
<script setup>
import { ref } from 'vue';
import axios from 'axios';
import { fetchToken } from '../utils/getToken'; // fetchToken
import { useRoute } from 'vue-router';
import x2js from 'x2js';
//
onMounted(() => {
qrCodeUrls.value.forEach((generator) => {
generator.generateQRCode(generator.initialUrl);
});
});
// fetchToken
fetchToken().then((response) => {
if (response) {
token.value = response;
fetchData(response); // token fetchData
}
});
// token
const fetchData = async (token) => {
try {
const response = await axios.get(`api/seeyon/rest/dee/task/getMineral?token=${token.id}`);
data.value = response.data;
//xmljson
jsonData.value = x2jsInstance.xml2js(data.value);
console.log(jsonData.value);
} catch (error) {
console.error(error);
}
};
</script>
const x2jsInstance = new x2js();
const route = useRoute();
<style scoped>
.background {
background-image: url("../assets/img/index.png");
background-size:100% 100%;
background-position: center;
/* 其他样式属性 */
const token = ref('');
const data = ref('');
const jsonData = ref(null);
const companyData = ref(null);
// fetchToken
fetchToken().then((response) => {
if (response) {
token.value = response;
// token fetchData
fetchData(response);
}
});
// token
const fetchData = async (token) => {
try {
const id = route.query.id; // id
const response = await axios.get(`api/seeyon/rest/dee/task/getMineral?token=${token.id}`);
data.value = response.data;
//xmljson
jsonData.value = x2jsInstance.xml2js(data.value);
// jsonDataID
const selectedCompany = jsonData.value.root.kczy.row.find(company => company.ID === id);
if (selectedCompany) {
companyData.value = selectedCompany;
} else {
console.log('Company not found for ID:', id);
}
} catch (error) {
console.error(error);
}
};
</script>
<style scoped>
.background {
background-image: url("../assets/img/index.png");
background-size:100% 100%;
background-position: center;
}
*{
margin: 0;
padding: 0;
}
.company-name {
color: blue;
font-size: 24px;
text-align: center;
padding-top: 110px; /* 设置文本内容距离顶部的距离为 50 像素 */
font-weight: bold;
}
</style>
margin: 0;
padding: 0;
}
.company-name {
color: blue;
font-size: 24px;
text-align: center;
padding-top: 110px;
font-weight: bold;
}
</style>

54
src/views/test.html Normal file
View File

@ -0,0 +1,54 @@
<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title></title>
</head>
<style type="text/css">
*{
margin: 0;
padding: 0;
}
#bg{
background-image: url('../assets/img/index1.png');
/*
background-size: cover;
缩放背景图片以完全覆盖背景区,可能背景图片部分看不见。和 contain 值相反cover 值尽可能大的缩放背景图像并保持图像的宽高比例(图像不会被压扁)。该背景图以它的全部宽或者高覆盖所在容器。当容器和背景图大小不同时,背景图的 左/右 或者 上/下 部分会被裁剪。
*/
background-size: cover;
/* 背景图片不重复 */
background-repeat: no-repeat;
/* 最小宽度为100% */
min-width: 100%;
/* 最小高度为100vh vh: 就等于 视窗的高度 1vh = 视窗的高度的1%*/
min-height: 100vh;
}
/* 因为图片屏幕宽度的变化,可能图片的内容会被遮挡,这时我们可以通过媒体查询的方式来控制响应式 */
/* 下面只是一个展示,具体根据自己的图片进行设置,屏幕宽度到什么尺寸遮挡 发送什么变化 */
/*
background-size: contain;
缩放背景图片以完全装入背景区可能背景区部分空白。contain 尽可能的缩放背景并保持图像的宽高比例(图像不会被压缩)。该背景图会填充所在的容器。当背景图和容器的大小的不同时,容器的空白区域(上/下或者左/右)会显示由 background-color 设置的背景颜色。
意思就是自适应图片,图片随着屏幕的宽度而做出调整
*/
/* 媒体查询 */
/* 当屏幕小于1500px的时候 */
@media screen and (max-width: 1500px){
/* 当屏幕小于1500px的时候 id为bg的元素 进行改变 */
#bg{
background-size: contain;
}
}
</style>
<body>
<div id="bg"></div>
</body>
</html>

View File

@ -1,23 +1,27 @@
<template>
<div class="background">
<p class="company-name">企业列表</p>
<div>
{{ jsonData }}
<p class="company-name" @click="">企业列表</p>
<div v-if="jsonData">
<div v-for="(item, index) in jsonData.root.kczy.row" :key="index">
<!-- 使用 router-link 来实现路由导航 -->
<router-link :to="{ name: 'show', query: { id: item.ID } }" class="router-link">
<p style="font-size: 18px;">{{ item.FIELD0001 }}</p>
</router-link>
</div>
</div>
</div>
</template>
<script setup>
import { ref } from 'vue';
import { useRouter } from 'vue-router'; // 使 useRouter router
import axios from 'axios';
import { fetchToken } from '../utils/getToken'; // fetchToken
import x2js from 'x2js'; //
import { fetchToken } from '../utils/getToken';
import x2js from 'x2js';
const x2jsInstance = new x2js(); // 使 x2js
const router = useRouter(); // 使 useRouter router
// 使 x2js
const x2jsInstance = new x2js();
//
const token = ref('');
const data = ref('');
const jsonData = ref(null);
@ -26,7 +30,8 @@ const jsonData = ref(null);
fetchToken().then((response) => {
if (response) {
token.value = response;
fetchData(response); // token fetchData
// token fetchData
fetchData(response);
}
});
@ -35,7 +40,7 @@ const fetchData = async (token) => {
try {
const response = await axios.get(`api/seeyon/rest/dee/task/getMineral?token=${token.id}`);
data.value = response.data;
// XMLJSON data.value data
// XMLJSON data.value
jsonData.value = x2jsInstance.xml2js(data.value);
console.log(jsonData.value);
} catch (error) {
@ -51,7 +56,7 @@ const fetchData = async (token) => {
background-position: center;
/* 其他样式属性 */
}
*{
* {
margin: 0;
padding: 0;
}
@ -59,7 +64,16 @@ const fetchData = async (token) => {
color: blue;
font-size: 24px;
text-align: center;
padding-top: 110px; /* 设置文本内容距离顶部的距离为 50 像素 */
/* 设置文本内容距离顶部的距离为 50 像素 */
padding-top: 110px;
font-weight: bold;
}
.router-link {
text-decoration: none; /* 去掉下划线 */
color: inherit; /* 继承父元素的颜色,这里是指定的字体颜色 */
}
.router-link:hover {
color: inherit; /* 继承父元素的颜色,鼠标悬停时颜色不变 */
}
</style>