Commit 698028d4 by 张晓玮

Merge branch 'v1.9.0' into 'master'

V1.9.0

See merge request !4
2 parents 45195ca4 7ef939f2
...@@ -14,12 +14,12 @@ ...@@ -14,12 +14,12 @@
"babel-plugin-import": "^1.13.5", "babel-plugin-import": "^1.13.5",
"clipboard": "^2.0.11", "clipboard": "^2.0.11",
"core-js": "^3.8.3", "core-js": "^3.8.3",
"element-plus": "^2.2.9",
"moment": "^2.29.1", "moment": "^2.29.1",
"svg-sprite-loader": "^6.0.11", "svg-sprite-loader": "^6.0.11",
"vant": "^3.5.2", "vant": "^3.5.2",
"vue": "^3.2.13", "vue": "^3.2.13",
"vue-router": "^4.0.3", "vue-router": "^4.0.3",
"vue-slider-component": "^4.1.0-beta.1",
"vuex": "^4.0.0" "vuex": "^4.0.0"
}, },
"devDependencies": { "devDependencies": {
...@@ -1726,22 +1726,6 @@ ...@@ -1726,22 +1726,6 @@
"node": ">=6.9.0" "node": ">=6.9.0"
} }
}, },
"node_modules/@ctrl/tinycolor": {
"version": "3.4.1",
"resolved": "https://registry.npmjs.org/@ctrl/tinycolor/-/tinycolor-3.4.1.tgz",
"integrity": "sha512-ej5oVy6lykXsvieQtqZxCOaLT+xD4+QNarq78cIYISHmZXshCvROLudpQN3lfL8G0NL7plMSSK+zlyvCaIJ4Iw==",
"engines": {
"node": ">=10"
}
},
"node_modules/@element-plus/icons-vue": {
"version": "2.0.6",
"resolved": "https://registry.npmjs.org/@element-plus/icons-vue/-/icons-vue-2.0.6.tgz",
"integrity": "sha512-lPpG8hYkjL/Z97DH5Ei6w6o22Z4YdNglWCNYOPcB33JCF2A4wye6HFgSI7hEt9zdLyxlSpiqtgf9XcYU+m5mew==",
"peerDependencies": {
"vue": "^3.2.0"
}
},
"node_modules/@eslint/eslintrc": { "node_modules/@eslint/eslintrc": {
"version": "0.4.3", "version": "0.4.3",
"resolved": "https://registry.npmmirror.com/@eslint/eslintrc/-/eslintrc-0.4.3.tgz", "resolved": "https://registry.npmmirror.com/@eslint/eslintrc/-/eslintrc-0.4.3.tgz",
...@@ -1792,19 +1776,6 @@ ...@@ -1792,19 +1776,6 @@
"node": ">=10" "node": ">=10"
} }
}, },
"node_modules/@floating-ui/core": {
"version": "0.7.3",
"resolved": "https://registry.npmjs.org/@floating-ui/core/-/core-0.7.3.tgz",
"integrity": "sha512-buc8BXHmG9l82+OQXOFU3Kr2XQx9ys01U/Q9HMIrZ300iLc8HLMgh7dcCqgYzAzf4BkoQvDcXf5Y+CuEZ5JBYg=="
},
"node_modules/@floating-ui/dom": {
"version": "0.5.4",
"resolved": "https://registry.npmjs.org/@floating-ui/dom/-/dom-0.5.4.tgz",
"integrity": "sha512-419BMceRLq0RrmTSDxn8hf9R3VCJv2K9PUfugh5JyEFmdjzDo+e8U5EdR8nzKq8Yj1htzLm3b6eQEEam3/rrtg==",
"dependencies": {
"@floating-ui/core": "^0.7.3"
}
},
"node_modules/@hapi/hoek": { "node_modules/@hapi/hoek": {
"version": "9.3.0", "version": "9.3.0",
"resolved": "https://registry.npmmirror.com/@hapi/hoek/-/hoek-9.3.0.tgz", "resolved": "https://registry.npmmirror.com/@hapi/hoek/-/hoek-9.3.0.tgz",
...@@ -2205,19 +2176,6 @@ ...@@ -2205,19 +2176,6 @@
"integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==", "integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==",
"dev": true "dev": true
}, },
"node_modules/@types/lodash": {
"version": "4.14.182",
"resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.182.tgz",
"integrity": "sha512-/THyiqyQAP9AfARo4pF+aCGcyiQ94tX/Is2I7HofNRqoYLgN1PBoOWu2/zTA5zMxzP5EFutMtWtGAFRKUe961Q=="
},
"node_modules/@types/lodash-es": {
"version": "4.17.6",
"resolved": "https://registry.npmjs.org/@types/lodash-es/-/lodash-es-4.17.6.tgz",
"integrity": "sha512-R+zTeVUKDdfoRxpAryaQNRKk3105Rrgx2CFRClIgRGaqDTdjsm8h6IYA8ir584W3ePzkZfst5xIgDwYrlh9HLg==",
"dependencies": {
"@types/lodash": "*"
}
},
"node_modules/@types/mime": { "node_modules/@types/mime": {
"version": "1.3.2", "version": "1.3.2",
"resolved": "https://registry.npmmirror.com/@types/mime/-/mime-1.3.2.tgz", "resolved": "https://registry.npmmirror.com/@types/mime/-/mime-1.3.2.tgz",
...@@ -2294,11 +2252,6 @@ ...@@ -2294,11 +2252,6 @@
"@types/node": "*" "@types/node": "*"
} }
}, },
"node_modules/@types/web-bluetooth": {
"version": "0.0.14",
"resolved": "https://registry.npmjs.org/@types/web-bluetooth/-/web-bluetooth-0.0.14.tgz",
"integrity": "sha512-5d2RhCard1nQUC3aHcq/gHzWYO6K0WJmAbjO7mQJgCQKtZpgXxv1rOM6O/dBDhDYYVutk1sciOgNSe+5YyfM8A=="
},
"node_modules/@types/ws": { "node_modules/@types/ws": {
"version": "8.5.3", "version": "8.5.3",
"resolved": "https://registry.npmmirror.com/@types/ws/-/ws-8.5.3.tgz", "resolved": "https://registry.npmmirror.com/@types/ws/-/ws-8.5.3.tgz",
...@@ -3022,88 +2975,6 @@ ...@@ -3022,88 +2975,6 @@
"integrity": "sha512-Iu8Tbg3f+emIIMmI2ycSI8QcEuAUgPTgHwesDU1eKMLE4YC/c/sFbGc70QgMq31ijRftV0R7vCm9co6rldCeOA==", "integrity": "sha512-Iu8Tbg3f+emIIMmI2ycSI8QcEuAUgPTgHwesDU1eKMLE4YC/c/sFbGc70QgMq31ijRftV0R7vCm9co6rldCeOA==",
"dev": true "dev": true
}, },
"node_modules/@vueuse/core": {
"version": "8.9.1",
"resolved": "https://registry.npmjs.org/@vueuse/core/-/core-8.9.1.tgz",
"integrity": "sha512-a7goYb/gJxjXRBw4Fr/jEACiN33ghwM1ohJVu+Zwsr3lNL4qCQ1nU+ogta98lNg5hXJxWj7mYEmQDjjyWOu5nA==",
"dependencies": {
"@types/web-bluetooth": "^0.0.14",
"@vueuse/metadata": "8.9.1",
"@vueuse/shared": "8.9.1",
"vue-demi": "*"
},
"funding": {
"url": "https://github.com/sponsors/antfu"
},
"peerDependencies": {
"@vue/composition-api": "^1.1.0",
"vue": "^2.6.0 || ^3.2.0"
},
"peerDependenciesMeta": {
"@vue/composition-api": {
"optional": true
},
"vue": {
"optional": true
}
}
},
"node_modules/@vueuse/core/node_modules/@vueuse/shared": {
"version": "8.9.1",
"resolved": "https://registry.npmjs.org/@vueuse/shared/-/shared-8.9.1.tgz",
"integrity": "sha512-klZfn7ijI3juqVgpfQVrrlBh4uTFajwSCWm8Cdt45Kg26b1LZ9jn9n7J6GhmkFay5016GnjjivQoekQSMeJNUg==",
"dependencies": {
"vue-demi": "*"
},
"funding": {
"url": "https://github.com/sponsors/antfu"
},
"peerDependencies": {
"@vue/composition-api": "^1.1.0",
"vue": "^2.6.0 || ^3.2.0"
},
"peerDependenciesMeta": {
"@vue/composition-api": {
"optional": true
},
"vue": {
"optional": true
}
}
},
"node_modules/@vueuse/core/node_modules/vue-demi": {
"version": "0.13.2",
"resolved": "https://registry.npmjs.org/vue-demi/-/vue-demi-0.13.2.tgz",
"integrity": "sha512-41ukrclEbMddAyP7PvxMSYqnOSzPV6r7GNnyTSKSCNTaz19GehxmTiXyP9kwHSUv2+Dr6hHqiUiF7L1VAw2KdQ==",
"hasInstallScript": true,
"bin": {
"vue-demi-fix": "bin/vue-demi-fix.js",
"vue-demi-switch": "bin/vue-demi-switch.js"
},
"engines": {
"node": ">=12"
},
"funding": {
"url": "https://github.com/sponsors/antfu"
},
"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": "8.9.1",
"resolved": "https://registry.npmjs.org/@vueuse/metadata/-/metadata-8.9.1.tgz",
"integrity": "sha512-6LADOlyl3oENHa9dsoY7LXjU1Mh14DnpM6ztETI3hpm5ZffOMIG5CB2Q6aEZfIvYr1lkJVmG2L82wFKk7VRfIA==",
"funding": {
"url": "https://github.com/sponsors/antfu"
}
},
"node_modules/@webassemblyjs/ast": { "node_modules/@webassemblyjs/ast": {
"version": "1.11.1", "version": "1.11.1",
"resolved": "https://registry.npmmirror.com/@webassemblyjs/ast/-/ast-1.11.1.tgz", "resolved": "https://registry.npmmirror.com/@webassemblyjs/ast/-/ast-1.11.1.tgz",
...@@ -3560,11 +3431,6 @@ ...@@ -3560,11 +3431,6 @@
"lodash": "^4.17.14" "lodash": "^4.17.14"
} }
}, },
"node_modules/async-validator": {
"version": "4.2.5",
"resolved": "https://registry.npmjs.org/async-validator/-/async-validator-4.2.5.tgz",
"integrity": "sha512-7HhHjtERjqlNbZtqNqy2rckN/SpOOlmDliet+lP7k+eKZEjPk3DgyeU9lIXLdeLz0uBbbVp+9Qdow9wJWgwwfg=="
},
"node_modules/asynckit": { "node_modules/asynckit": {
"version": "0.4.0", "version": "0.4.0",
"resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
...@@ -5038,11 +4904,6 @@ ...@@ -5038,11 +4904,6 @@
"integrity": "sha512-Cp+jOa8QJef5nXS5hU7M1DWzXPEIoVR3kbV0dQuVGwROZg8bGf1DcCnkmajBTnvghTtSNMUdRrPjgaT6ZQucbw==", "integrity": "sha512-Cp+jOa8QJef5nXS5hU7M1DWzXPEIoVR3kbV0dQuVGwROZg8bGf1DcCnkmajBTnvghTtSNMUdRrPjgaT6ZQucbw==",
"dev": true "dev": true
}, },
"node_modules/dayjs": {
"version": "1.11.3",
"resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.3.tgz",
"integrity": "sha512-xxwlswWOlGhzgQ4TKzASQkUhqERI3egRNqgV4ScR8wlANA/A9tZ7miXa44vTTKEq5l7vWoL5G57bG3zA+Kow0A=="
},
"node_modules/debug": { "node_modules/debug": {
"version": "4.3.4", "version": "4.3.4",
"resolved": "https://registry.npmmirror.com/debug/-/debug-4.3.4.tgz", "resolved": "https://registry.npmmirror.com/debug/-/debug-4.3.4.tgz",
...@@ -5442,41 +5303,6 @@ ...@@ -5442,41 +5303,6 @@
"integrity": "sha512-yDoFfTJnqBAB6hSiPvzmsBJSrjOXJtHSJoqJdI/zSIh7DYupYnIOHt/bbPw/WE31BJjNTybDdNAs21gCMnTh0Q==", "integrity": "sha512-yDoFfTJnqBAB6hSiPvzmsBJSrjOXJtHSJoqJdI/zSIh7DYupYnIOHt/bbPw/WE31BJjNTybDdNAs21gCMnTh0Q==",
"dev": true "dev": true
}, },
"node_modules/element-plus": {
"version": "2.2.9",
"resolved": "https://registry.npmjs.org/element-plus/-/element-plus-2.2.9.tgz",
"integrity": "sha512-jYbL0JkCdv95rkT6trZJjCAizLPySa0qcd2cgq+57SKQnCZAcNDDq4GbTuFRnNavdoeCJnuM3HIficTIUpsMOQ==",
"dependencies": {
"@ctrl/tinycolor": "^3.4.1",
"@element-plus/icons-vue": "^2.0.6",
"@floating-ui/dom": "^0.5.4",
"@popperjs/core": "npm:@sxzz/popperjs-es@^2.11.7",
"@types/lodash": "^4.14.182",
"@types/lodash-es": "^4.17.6",
"@vueuse/core": "^8.7.5",
"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.1.2"
},
"peerDependencies": {
"vue": "^3.2.0"
}
},
"node_modules/element-plus/node_modules/@popperjs/core": {
"name": "@sxzz/popperjs-es",
"version": "2.11.7",
"resolved": "https://registry.npmjs.org/@sxzz/popperjs-es/-/popperjs-es-2.11.7.tgz",
"integrity": "sha512-Ccy0NlLkzr0Ex2FKvh2X+OyERHXJ88XJ1MXtsI9y9fGexlaXaVTPzBCRBwIxFkORuOb+uBqeu+RqnpgYTEZRUQ==",
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/popperjs"
}
},
"node_modules/emoji-regex": { "node_modules/emoji-regex": {
"version": "8.0.0", "version": "8.0.0",
"resolved": "https://registry.npmmirror.com/emoji-regex/-/emoji-regex-8.0.0.tgz", "resolved": "https://registry.npmmirror.com/emoji-regex/-/emoji-regex-8.0.0.tgz",
...@@ -5576,7 +5402,8 @@ ...@@ -5576,7 +5402,8 @@
"node_modules/escape-html": { "node_modules/escape-html": {
"version": "1.0.3", "version": "1.0.3",
"resolved": "https://registry.npmmirror.com/escape-html/-/escape-html-1.0.3.tgz", "resolved": "https://registry.npmmirror.com/escape-html/-/escape-html-1.0.3.tgz",
"integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==" "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==",
"dev": true
}, },
"node_modules/escape-string-regexp": { "node_modules/escape-string-regexp": {
"version": "1.0.5", "version": "1.0.5",
...@@ -8108,22 +7935,8 @@ ...@@ -8108,22 +7935,8 @@
"node_modules/lodash": { "node_modules/lodash": {
"version": "4.17.21", "version": "4.17.21",
"resolved": "https://registry.npmmirror.com/lodash/-/lodash-4.17.21.tgz", "resolved": "https://registry.npmmirror.com/lodash/-/lodash-4.17.21.tgz",
"integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==",
}, "dev": true
"node_modules/lodash-es": {
"version": "4.17.21",
"resolved": "https://registry.npmjs.org/lodash-es/-/lodash-es-4.17.21.tgz",
"integrity": "sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw=="
},
"node_modules/lodash-unified": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/lodash-unified/-/lodash-unified-1.0.2.tgz",
"integrity": "sha512-OGbEy+1P+UT26CYi4opY4gebD8cWRDxAT6MAObIVQMiqYdxZr1g3QHWCToVsm31x2NkLS4K3+MC2qInaRMa39g==",
"peerDependencies": {
"@types/lodash-es": "*",
"lodash": "*",
"lodash-es": "*"
}
}, },
"node_modules/lodash.debounce": { "node_modules/lodash.debounce": {
"version": "4.0.8", "version": "4.0.8",
...@@ -8453,11 +8266,6 @@ ...@@ -8453,11 +8266,6 @@
"node": ">= 4.0.0" "node": ">= 4.0.0"
} }
}, },
"node_modules/memoize-one": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/memoize-one/-/memoize-one-6.0.0.tgz",
"integrity": "sha512-rkpe71W0N0c0Xz6QD0eJETuWAJGnJ9afsl1srmwPrI+yBCkge5EycXXbYRyvL29zZVUWQCY7InPRCv3GDXuZNw=="
},
"node_modules/merge-descriptors": { "node_modules/merge-descriptors": {
"version": "1.0.1", "version": "1.0.1",
"resolved": "https://registry.npmmirror.com/merge-descriptors/-/merge-descriptors-1.0.1.tgz", "resolved": "https://registry.npmmirror.com/merge-descriptors/-/merge-descriptors-1.0.1.tgz",
...@@ -8982,11 +8790,6 @@ ...@@ -8982,11 +8790,6 @@
"node": ">=10" "node": ">=10"
} }
}, },
"node_modules/normalize-wheel-es": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/normalize-wheel-es/-/normalize-wheel-es-1.1.2.tgz",
"integrity": "sha512-scX83plWJXYH1J4+BhAuIHadROzxX0UBF3+HuZNY2Ks8BciE7tSTQ+5JhTsvzjaO0/EJdm4JBGrfObKxFf3Png=="
},
"node_modules/npm-run-path": { "node_modules/npm-run-path": {
"version": "2.0.2", "version": "2.0.2",
"resolved": "https://registry.npmmirror.com/npm-run-path/-/npm-run-path-2.0.2.tgz", "resolved": "https://registry.npmmirror.com/npm-run-path/-/npm-run-path-2.0.2.tgz",
...@@ -13303,6 +13106,11 @@ ...@@ -13303,6 +13106,11 @@
"vue": "^3.2.0" "vue": "^3.2.0"
} }
}, },
"node_modules/vue-slider-component": {
"version": "4.1.0-beta.1",
"resolved": "https://registry.npmjs.org/vue-slider-component/-/vue-slider-component-4.1.0-beta.1.tgz",
"integrity": "sha512-BAuoa+6d68vzua638CWlBL063/uiGnsKyVuKhXWWceaFLmB2oMMpw/hUiiABsbxkGxG+Ry1QniADSzylk8D+vg=="
},
"node_modules/vue-style-loader": { "node_modules/vue-style-loader": {
"version": "4.1.3", "version": "4.1.3",
"resolved": "https://registry.npmmirror.com/vue-style-loader/-/vue-style-loader-4.1.3.tgz", "resolved": "https://registry.npmmirror.com/vue-style-loader/-/vue-style-loader-4.1.3.tgz",
...@@ -15227,17 +15035,6 @@ ...@@ -15227,17 +15035,6 @@
"to-fast-properties": "^2.0.0" "to-fast-properties": "^2.0.0"
} }
}, },
"@ctrl/tinycolor": {
"version": "3.4.1",
"resolved": "https://registry.npmjs.org/@ctrl/tinycolor/-/tinycolor-3.4.1.tgz",
"integrity": "sha512-ej5oVy6lykXsvieQtqZxCOaLT+xD4+QNarq78cIYISHmZXshCvROLudpQN3lfL8G0NL7plMSSK+zlyvCaIJ4Iw=="
},
"@element-plus/icons-vue": {
"version": "2.0.6",
"resolved": "https://registry.npmjs.org/@element-plus/icons-vue/-/icons-vue-2.0.6.tgz",
"integrity": "sha512-lPpG8hYkjL/Z97DH5Ei6w6o22Z4YdNglWCNYOPcB33JCF2A4wye6HFgSI7hEt9zdLyxlSpiqtgf9XcYU+m5mew==",
"requires": {}
},
"@eslint/eslintrc": { "@eslint/eslintrc": {
"version": "0.4.3", "version": "0.4.3",
"resolved": "https://registry.npmmirror.com/@eslint/eslintrc/-/eslintrc-0.4.3.tgz", "resolved": "https://registry.npmmirror.com/@eslint/eslintrc/-/eslintrc-0.4.3.tgz",
...@@ -15278,19 +15075,6 @@ ...@@ -15278,19 +15075,6 @@
} }
} }
}, },
"@floating-ui/core": {
"version": "0.7.3",
"resolved": "https://registry.npmjs.org/@floating-ui/core/-/core-0.7.3.tgz",
"integrity": "sha512-buc8BXHmG9l82+OQXOFU3Kr2XQx9ys01U/Q9HMIrZ300iLc8HLMgh7dcCqgYzAzf4BkoQvDcXf5Y+CuEZ5JBYg=="
},
"@floating-ui/dom": {
"version": "0.5.4",
"resolved": "https://registry.npmjs.org/@floating-ui/dom/-/dom-0.5.4.tgz",
"integrity": "sha512-419BMceRLq0RrmTSDxn8hf9R3VCJv2K9PUfugh5JyEFmdjzDo+e8U5EdR8nzKq8Yj1htzLm3b6eQEEam3/rrtg==",
"requires": {
"@floating-ui/core": "^0.7.3"
}
},
"@hapi/hoek": { "@hapi/hoek": {
"version": "9.3.0", "version": "9.3.0",
"resolved": "https://registry.npmmirror.com/@hapi/hoek/-/hoek-9.3.0.tgz", "resolved": "https://registry.npmmirror.com/@hapi/hoek/-/hoek-9.3.0.tgz",
...@@ -15640,19 +15424,6 @@ ...@@ -15640,19 +15424,6 @@
"integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==", "integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==",
"dev": true "dev": true
}, },
"@types/lodash": {
"version": "4.14.182",
"resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.182.tgz",
"integrity": "sha512-/THyiqyQAP9AfARo4pF+aCGcyiQ94tX/Is2I7HofNRqoYLgN1PBoOWu2/zTA5zMxzP5EFutMtWtGAFRKUe961Q=="
},
"@types/lodash-es": {
"version": "4.17.6",
"resolved": "https://registry.npmjs.org/@types/lodash-es/-/lodash-es-4.17.6.tgz",
"integrity": "sha512-R+zTeVUKDdfoRxpAryaQNRKk3105Rrgx2CFRClIgRGaqDTdjsm8h6IYA8ir584W3ePzkZfst5xIgDwYrlh9HLg==",
"requires": {
"@types/lodash": "*"
}
},
"@types/mime": { "@types/mime": {
"version": "1.3.2", "version": "1.3.2",
"resolved": "https://registry.npmmirror.com/@types/mime/-/mime-1.3.2.tgz", "resolved": "https://registry.npmmirror.com/@types/mime/-/mime-1.3.2.tgz",
...@@ -15729,11 +15500,6 @@ ...@@ -15729,11 +15500,6 @@
"@types/node": "*" "@types/node": "*"
} }
}, },
"@types/web-bluetooth": {
"version": "0.0.14",
"resolved": "https://registry.npmjs.org/@types/web-bluetooth/-/web-bluetooth-0.0.14.tgz",
"integrity": "sha512-5d2RhCard1nQUC3aHcq/gHzWYO6K0WJmAbjO7mQJgCQKtZpgXxv1rOM6O/dBDhDYYVutk1sciOgNSe+5YyfM8A=="
},
"@types/ws": { "@types/ws": {
"version": "8.5.3", "version": "8.5.3",
"resolved": "https://registry.npmmirror.com/@types/ws/-/ws-8.5.3.tgz", "resolved": "https://registry.npmmirror.com/@types/ws/-/ws-8.5.3.tgz",
...@@ -16326,38 +16092,6 @@ ...@@ -16326,38 +16092,6 @@
"integrity": "sha512-Iu8Tbg3f+emIIMmI2ycSI8QcEuAUgPTgHwesDU1eKMLE4YC/c/sFbGc70QgMq31ijRftV0R7vCm9co6rldCeOA==", "integrity": "sha512-Iu8Tbg3f+emIIMmI2ycSI8QcEuAUgPTgHwesDU1eKMLE4YC/c/sFbGc70QgMq31ijRftV0R7vCm9co6rldCeOA==",
"dev": true "dev": true
}, },
"@vueuse/core": {
"version": "8.9.1",
"resolved": "https://registry.npmjs.org/@vueuse/core/-/core-8.9.1.tgz",
"integrity": "sha512-a7goYb/gJxjXRBw4Fr/jEACiN33ghwM1ohJVu+Zwsr3lNL4qCQ1nU+ogta98lNg5hXJxWj7mYEmQDjjyWOu5nA==",
"requires": {
"@types/web-bluetooth": "^0.0.14",
"@vueuse/metadata": "8.9.1",
"@vueuse/shared": "8.9.1",
"vue-demi": "*"
},
"dependencies": {
"@vueuse/shared": {
"version": "8.9.1",
"resolved": "https://registry.npmjs.org/@vueuse/shared/-/shared-8.9.1.tgz",
"integrity": "sha512-klZfn7ijI3juqVgpfQVrrlBh4uTFajwSCWm8Cdt45Kg26b1LZ9jn9n7J6GhmkFay5016GnjjivQoekQSMeJNUg==",
"requires": {
"vue-demi": "*"
}
},
"vue-demi": {
"version": "0.13.2",
"resolved": "https://registry.npmjs.org/vue-demi/-/vue-demi-0.13.2.tgz",
"integrity": "sha512-41ukrclEbMddAyP7PvxMSYqnOSzPV6r7GNnyTSKSCNTaz19GehxmTiXyP9kwHSUv2+Dr6hHqiUiF7L1VAw2KdQ==",
"requires": {}
}
}
},
"@vueuse/metadata": {
"version": "8.9.1",
"resolved": "https://registry.npmjs.org/@vueuse/metadata/-/metadata-8.9.1.tgz",
"integrity": "sha512-6LADOlyl3oENHa9dsoY7LXjU1Mh14DnpM6ztETI3hpm5ZffOMIG5CB2Q6aEZfIvYr1lkJVmG2L82wFKk7VRfIA=="
},
"@webassemblyjs/ast": { "@webassemblyjs/ast": {
"version": "1.11.1", "version": "1.11.1",
"resolved": "https://registry.npmmirror.com/@webassemblyjs/ast/-/ast-1.11.1.tgz", "resolved": "https://registry.npmmirror.com/@webassemblyjs/ast/-/ast-1.11.1.tgz",
...@@ -16742,11 +16476,6 @@ ...@@ -16742,11 +16476,6 @@
"lodash": "^4.17.14" "lodash": "^4.17.14"
} }
}, },
"async-validator": {
"version": "4.2.5",
"resolved": "https://registry.npmjs.org/async-validator/-/async-validator-4.2.5.tgz",
"integrity": "sha512-7HhHjtERjqlNbZtqNqy2rckN/SpOOlmDliet+lP7k+eKZEjPk3DgyeU9lIXLdeLz0uBbbVp+9Qdow9wJWgwwfg=="
},
"asynckit": { "asynckit": {
"version": "0.4.0", "version": "0.4.0",
"resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
...@@ -17955,11 +17684,6 @@ ...@@ -17955,11 +17684,6 @@
"integrity": "sha512-Cp+jOa8QJef5nXS5hU7M1DWzXPEIoVR3kbV0dQuVGwROZg8bGf1DcCnkmajBTnvghTtSNMUdRrPjgaT6ZQucbw==", "integrity": "sha512-Cp+jOa8QJef5nXS5hU7M1DWzXPEIoVR3kbV0dQuVGwROZg8bGf1DcCnkmajBTnvghTtSNMUdRrPjgaT6ZQucbw==",
"dev": true "dev": true
}, },
"dayjs": {
"version": "1.11.3",
"resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.3.tgz",
"integrity": "sha512-xxwlswWOlGhzgQ4TKzASQkUhqERI3egRNqgV4ScR8wlANA/A9tZ7miXa44vTTKEq5l7vWoL5G57bG3zA+Kow0A=="
},
"debug": { "debug": {
"version": "4.3.4", "version": "4.3.4",
"resolved": "https://registry.npmmirror.com/debug/-/debug-4.3.4.tgz", "resolved": "https://registry.npmmirror.com/debug/-/debug-4.3.4.tgz",
...@@ -18277,35 +18001,6 @@ ...@@ -18277,35 +18001,6 @@
"integrity": "sha512-yDoFfTJnqBAB6hSiPvzmsBJSrjOXJtHSJoqJdI/zSIh7DYupYnIOHt/bbPw/WE31BJjNTybDdNAs21gCMnTh0Q==", "integrity": "sha512-yDoFfTJnqBAB6hSiPvzmsBJSrjOXJtHSJoqJdI/zSIh7DYupYnIOHt/bbPw/WE31BJjNTybDdNAs21gCMnTh0Q==",
"dev": true "dev": true
}, },
"element-plus": {
"version": "2.2.9",
"resolved": "https://registry.npmjs.org/element-plus/-/element-plus-2.2.9.tgz",
"integrity": "sha512-jYbL0JkCdv95rkT6trZJjCAizLPySa0qcd2cgq+57SKQnCZAcNDDq4GbTuFRnNavdoeCJnuM3HIficTIUpsMOQ==",
"requires": {
"@ctrl/tinycolor": "^3.4.1",
"@element-plus/icons-vue": "^2.0.6",
"@floating-ui/dom": "^0.5.4",
"@popperjs/core": "npm:@sxzz/popperjs-es@^2.11.7",
"@types/lodash": "^4.14.182",
"@types/lodash-es": "^4.17.6",
"@vueuse/core": "^8.7.5",
"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.1.2"
},
"dependencies": {
"@popperjs/core": {
"version": "npm:@sxzz/popperjs-es@2.11.7",
"resolved": "https://registry.npmjs.org/@sxzz/popperjs-es/-/popperjs-es-2.11.7.tgz",
"integrity": "sha512-Ccy0NlLkzr0Ex2FKvh2X+OyERHXJ88XJ1MXtsI9y9fGexlaXaVTPzBCRBwIxFkORuOb+uBqeu+RqnpgYTEZRUQ=="
}
}
},
"emoji-regex": { "emoji-regex": {
"version": "8.0.0", "version": "8.0.0",
"resolved": "https://registry.npmmirror.com/emoji-regex/-/emoji-regex-8.0.0.tgz", "resolved": "https://registry.npmmirror.com/emoji-regex/-/emoji-regex-8.0.0.tgz",
...@@ -18390,7 +18085,8 @@ ...@@ -18390,7 +18085,8 @@
"escape-html": { "escape-html": {
"version": "1.0.3", "version": "1.0.3",
"resolved": "https://registry.npmmirror.com/escape-html/-/escape-html-1.0.3.tgz", "resolved": "https://registry.npmmirror.com/escape-html/-/escape-html-1.0.3.tgz",
"integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==" "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==",
"dev": true
}, },
"escape-string-regexp": { "escape-string-regexp": {
"version": "1.0.5", "version": "1.0.5",
...@@ -20386,18 +20082,8 @@ ...@@ -20386,18 +20082,8 @@
"lodash": { "lodash": {
"version": "4.17.21", "version": "4.17.21",
"resolved": "https://registry.npmmirror.com/lodash/-/lodash-4.17.21.tgz", "resolved": "https://registry.npmmirror.com/lodash/-/lodash-4.17.21.tgz",
"integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==",
}, "dev": true
"lodash-es": {
"version": "4.17.21",
"resolved": "https://registry.npmjs.org/lodash-es/-/lodash-es-4.17.21.tgz",
"integrity": "sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw=="
},
"lodash-unified": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/lodash-unified/-/lodash-unified-1.0.2.tgz",
"integrity": "sha512-OGbEy+1P+UT26CYi4opY4gebD8cWRDxAT6MAObIVQMiqYdxZr1g3QHWCToVsm31x2NkLS4K3+MC2qInaRMa39g==",
"requires": {}
}, },
"lodash.debounce": { "lodash.debounce": {
"version": "4.0.8", "version": "4.0.8",
...@@ -20665,11 +20351,6 @@ ...@@ -20665,11 +20351,6 @@
"fs-monkey": "^1.0.3" "fs-monkey": "^1.0.3"
} }
}, },
"memoize-one": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/memoize-one/-/memoize-one-6.0.0.tgz",
"integrity": "sha512-rkpe71W0N0c0Xz6QD0eJETuWAJGnJ9afsl1srmwPrI+yBCkge5EycXXbYRyvL29zZVUWQCY7InPRCv3GDXuZNw=="
},
"merge-descriptors": { "merge-descriptors": {
"version": "1.0.1", "version": "1.0.1",
"resolved": "https://registry.npmmirror.com/merge-descriptors/-/merge-descriptors-1.0.1.tgz", "resolved": "https://registry.npmmirror.com/merge-descriptors/-/merge-descriptors-1.0.1.tgz",
...@@ -21088,11 +20769,6 @@ ...@@ -21088,11 +20769,6 @@
"integrity": "sha512-DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A==", "integrity": "sha512-DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A==",
"dev": true "dev": true
}, },
"normalize-wheel-es": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/normalize-wheel-es/-/normalize-wheel-es-1.1.2.tgz",
"integrity": "sha512-scX83plWJXYH1J4+BhAuIHadROzxX0UBF3+HuZNY2Ks8BciE7tSTQ+5JhTsvzjaO0/EJdm4JBGrfObKxFf3Png=="
},
"npm-run-path": { "npm-run-path": {
"version": "2.0.2", "version": "2.0.2",
"resolved": "https://registry.npmmirror.com/npm-run-path/-/npm-run-path-2.0.2.tgz", "resolved": "https://registry.npmmirror.com/npm-run-path/-/npm-run-path-2.0.2.tgz",
...@@ -24479,6 +24155,11 @@ ...@@ -24479,6 +24155,11 @@
"@vue/devtools-api": "^6.0.0" "@vue/devtools-api": "^6.0.0"
} }
}, },
"vue-slider-component": {
"version": "4.1.0-beta.1",
"resolved": "https://registry.npmjs.org/vue-slider-component/-/vue-slider-component-4.1.0-beta.1.tgz",
"integrity": "sha512-BAuoa+6d68vzua638CWlBL063/uiGnsKyVuKhXWWceaFLmB2oMMpw/hUiiABsbxkGxG+Ry1QniADSzylk8D+vg=="
},
"vue-style-loader": { "vue-style-loader": {
"version": "4.1.3", "version": "4.1.3",
"resolved": "https://registry.npmmirror.com/vue-style-loader/-/vue-style-loader-4.1.3.tgz", "resolved": "https://registry.npmmirror.com/vue-style-loader/-/vue-style-loader-4.1.3.tgz",
......
...@@ -15,12 +15,12 @@ ...@@ -15,12 +15,12 @@
"babel-plugin-import": "^1.13.5", "babel-plugin-import": "^1.13.5",
"clipboard": "^2.0.11", "clipboard": "^2.0.11",
"core-js": "^3.8.3", "core-js": "^3.8.3",
"element-plus": "^2.2.9",
"moment": "^2.29.1", "moment": "^2.29.1",
"svg-sprite-loader": "^6.0.11", "svg-sprite-loader": "^6.0.11",
"vant": "^3.5.2", "vant": "^3.5.2",
"vue": "^3.2.13", "vue": "^3.2.13",
"vue-router": "^4.0.3", "vue-router": "^4.0.3",
"vue-slider-component": "^4.1.0-beta.1",
"vuex": "^4.0.0" "vuex": "^4.0.0"
}, },
"devDependencies": { "devDependencies": {
......
...@@ -4,11 +4,13 @@ ...@@ -4,11 +4,13 @@
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0"> <meta name="viewport" content="width=device-width,initial-scale=1.0,user-scalable=no,maximum-scale=1.0"
id="viewportMeta">
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Expires" content="0" />
<link rel="icon" href="<%= BASE_URL %>favicon.ico"> <link rel="icon" href="<%= BASE_URL %>favicon.ico">
<title> <title>找车</title>
<%= htmlWebpackPlugin.options.title %>
</title>
</head> </head>
<body> <body>
......
...@@ -3,8 +3,8 @@ module.exports = function (data) { ...@@ -3,8 +3,8 @@ module.exports = function (data) {
const shared = const shared =
`.icon {display: inline-block;background-image: url(I);background-size: Wpx Hpx;}` `.icon {display: inline-block;background-image: url(I);background-size: Wpx Hpx;}`
.replace("I", data.sprites[0].image) .replace("I", data.sprites[0].image)
.replace("W", data.sprites[0].total_width) .replace("W", data.sprites[0].total_width / 2)
.replace("H", data.sprites[0].total_height); .replace("H", data.sprites[0].total_height / 2);
const perSprite = data.sprites const perSprite = data.sprites
.map(function (sprite) { .map(function (sprite) {
...@@ -16,10 +16,10 @@ module.exports = function (data) { ...@@ -16,10 +16,10 @@ module.exports = function (data) {
return style return style
.replace(/N/g, sprite.name) .replace(/N/g, sprite.name)
.replace(/A/g, sprite.name.replace(/\-active$/g, "")) .replace(/A/g, sprite.name.replace(/\-active$/g, ""))
.replace(/W/g, sprite.width) .replace(/W/g, sprite.width / 2)
.replace(/H/g, sprite.height) .replace(/H/g, sprite.height / 2)
.replace(/X/g, sprite.offset_x) .replace(/X/g, sprite.offset_x / 2)
.replace(/Y/g, sprite.offset_y); .replace(/Y/g, sprite.offset_y / 2);
}) })
.join("\n"); .join("\n");
......
...@@ -34,15 +34,23 @@ export default { ...@@ -34,15 +34,23 @@ export default {
html, html,
body { body {
height: 100%; height: 100%;
// min-height: 100%; overflow: hidden;
// min-height: 100%;
} }
.warp-content { .warp-content {
height: 100%; height: 100%;
} }
* {
-webkit-tap-highlight-color: rgba(255, 255, 255, 0) !important;
-webkit-tap-highlight-color: transparent !important;
}
#app { #app {
height: 100%; height: 100%;
// min-height: 100%; position: fixed;
position: -ms-device-fixed;
top: 0px;
left: 0px;
right: 0px;
bottom: 0px;
} }
.curr-marker { .curr-marker {
display: inline-block; display: inline-block;
...@@ -57,7 +65,13 @@ body { ...@@ -57,7 +65,13 @@ body {
.map-container { .map-container {
width: 100%; width: 100%;
height: 100%; height: 100%;
position: fixed; // position: fixed;
z-index: 100; z-index: 100;
} }
button {
border-radius: 0;
border: none;
outline: none;
background: rgba(0, 0, 0, 0);
}
</style> </style>
...@@ -39,3 +39,8 @@ export const SET_FREQ = (params) => { ...@@ -39,3 +39,8 @@ export const SET_FREQ = (params) => {
export const ADD_FENCE = (params) => { export const ADD_FENCE = (params) => {
return request(params, `${prefix}/fence/add`, "POST"); return request(params, `${prefix}/fence/add`, "POST");
}; };
// 校验分享时效性 是否可用
export const CHECK_SHARE = (params) => {
return request(params, `${prefix}/vehicle/sharedDetails`);
};
.icon-share {
position: absolute;
top: 20px;
right: 70px;
}
.tip {
margin-top: 120px;
text-align: center;
color: #fff;
font-size: 16px;
.fle {
display: inline-block;
width: 18px;
height: 22px;
vertical-align: middle;
}
.sharebtn {
display: inline-block;
width: 4px;
height: 4px;
margin: 1px;
background: #fff;
border-radius: 50%;
}
.sharebtn.middle {
width: 6px;
height: 6px;
margin: 0;
}
}
\ No newline at end of file \ No newline at end of file
.el-slider {
width: 100%;
height: 32px;
display: flex;
align-items: center;
}
.el-slider__runway {
flex: 1;
height: 2px;
background-color: #e4e7eb;
border-radius: 2px;
position: relative;
cursor: pointer;
}
.el-slider__input {
flex-shrink: 0;
width: 130px;
}
.el-slider__bar {
height: 2px;
background-color: var(--base-color);
border-top-left-radius: 1px;
border-bottom-left-radius: 1px;
position: absolute;
}
.el-slider__button-wrapper {
height: 16px;
width: 16px;
position: absolute;
z-index: 1;
top: -9px;
transform: translateX(-50%);
background-color: transparent;
text-align: center;
-webkit-user-select: none;
user-select: none;
line-height: normal;
outline: 0;
}
.el-slider__button-wrapper::after {
display: inline-block;
content: "";
height: 100%;
vertical-align: middle;
}
.el-slider__button-wrapper.hover,
.el-slider__button-wrapper:hover {
cursor: grab;
}
.el-slider__button-wrapper.dragging {
cursor: grabbing;
}
.el-slider__button {
display: inline-block;
width: 16px;
height: 16px;
vertical-align: middle;
border: none;
box-shadow: 0px 2px 8px 0px rgba(135,143,153,0.5000);
background-color: #fff;
border-radius: 50%;
box-sizing: border-box;
transition: .2s;
-webkit-user-select: none;
user-select: none;
}
.el-slider__button.dragging,
.el-slider__button.hover,
.el-slider__button:hover {
transform: scale(1.2);
}
.el-slider__button.hover,
.el-slider__button:hover {
cursor: grab;
}
.el-slider__button.dragging {
cursor: grabbing;
}
.el-slider__stop {
position: absolute;
top: -4px;
height: 6px;
width: 6px;
border-radius: 6px;
background-color: #fff;
border: 2px solid #e4e7eb;
}
.el-slider__marks {
top: 0;
left: 12px;
width: 18px;
height: 100%;
}
.el-slider__marks-text {
position: absolute;
transform: translateX(-50%);
font-size: 14px;
color: #111;
margin-top: 15px;
}
.el-slider--large {
height: 40px;
}
.el-slider--small {
height: 24px;
}
\ No newline at end of file \ No newline at end of file
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
--van-text-link-color: #0077FF !important; --van-text-link-color: #0077FF !important;
--van-blue: #0077FF !important; --van-blue: #0077FF !important;
--van-search-input-height: 32px !important; --van-search-input-height: 32px !important;
--van-search-content-background-color: #f5f6f7 !important;
--van-font-weight-bold: 600 !important; --van-font-weight-bold: 600 !important;
--van-search-action-text-color: var(--base-color) !important; --van-search-action-text-color: var(--base-color) !important;
--van-dropdown-menu-title-active-text-color: var(--base-color) !important; --van-dropdown-menu-title-active-text-color: var(--base-color) !important;
......

768 Bytes | W: | H:

1.55 KB | W: | H:

src/assets/icon/copy.png
src/assets/icon/copy.png
src/assets/icon/copy.png
src/assets/icon/copy.png
  • 2-up
  • Swipe
  • Onion skin

218 Bytes | W: | H:

423 Bytes | W: | H:

src/assets/icon/device.png
src/assets/icon/device.png
src/assets/icon/device.png
src/assets/icon/device.png
  • 2-up
  • Swipe
  • Onion skin

720 Bytes | W: | H:

1.48 KB | W: | H:

src/assets/icon/loc-icon.png
src/assets/icon/loc-icon.png
src/assets/icon/loc-icon.png
src/assets/icon/loc-icon.png
  • 2-up
  • Swipe
  • Onion skin

491 Bytes | W: | H:

1.13 KB | W: | H:

src/assets/icon/locate-sm.png
src/assets/icon/locate-sm.png
src/assets/icon/locate-sm.png
src/assets/icon/locate-sm.png
  • 2-up
  • Swipe
  • Onion skin

656 Bytes | W: | H:

1.31 KB | W: | H:

src/assets/icon/location.png
src/assets/icon/location.png
src/assets/icon/location.png
src/assets/icon/location.png
  • 2-up
  • Swipe
  • Onion skin

853 Bytes | W: | H:

1.74 KB | W: | H:

src/assets/icon/navgation.png
src/assets/icon/navgation.png
src/assets/icon/navgation.png
src/assets/icon/navgation.png
  • 2-up
  • Swipe
  • Onion skin

1.71 KB | W: | H:

3.65 KB | W: | H:

src/assets/icon/off-car.png
src/assets/icon/off-car.png
src/assets/icon/off-car.png
src/assets/icon/off-car.png
  • 2-up
  • Swipe
  • Onion skin

453 Bytes | W: | H:

1.05 KB | W: | H:

src/assets/icon/offline-time.png
src/assets/icon/offline-time.png
src/assets/icon/offline-time.png
src/assets/icon/offline-time.png
  • 2-up
  • Swipe
  • Onion skin

1.61 KB | W: | H:

3.52 KB | W: | H:

src/assets/icon/on-car.png
src/assets/icon/on-car.png
src/assets/icon/on-car.png
src/assets/icon/on-car.png
  • 2-up
  • Swipe
  • Onion skin

389 Bytes | W: | H:

834 Bytes | W: | H:

src/assets/icon/online-time.png
src/assets/icon/online-time.png
src/assets/icon/online-time.png
src/assets/icon/online-time.png
  • 2-up
  • Swipe
  • Onion skin

378 Bytes | W: | H:

743 Bytes | W: | H:

src/assets/icon/put-away.png
src/assets/icon/put-away.png
src/assets/icon/put-away.png
src/assets/icon/put-away.png
  • 2-up
  • Swipe
  • Onion skin

679 Bytes | W: | H:

1.34 KB | W: | H:

src/assets/icon/refresh-car.png
src/assets/icon/refresh-car.png
src/assets/icon/refresh-car.png
src/assets/icon/refresh-car.png
  • 2-up
  • Swipe
  • Onion skin

1.16 KB | W: | H:

1.09 KB | W: | H:

src/assets/icon/replay-pause.png
src/assets/icon/replay-pause.png
src/assets/icon/replay-pause.png
src/assets/icon/replay-pause.png
  • 2-up
  • Swipe
  • Onion skin

1.01 KB | W: | H:

1.11 KB | W: | H:

src/assets/icon/replay-play.png
src/assets/icon/replay-play.png
src/assets/icon/replay-play.png
src/assets/icon/replay-play.png
  • 2-up
  • Swipe
  • Onion skin

1.38 KB | W: | H:

1.95 KB | W: | H:

src/assets/icon/replay-refresh.png
src/assets/icon/replay-refresh.png
src/assets/icon/replay-refresh.png
src/assets/icon/replay-refresh.png
  • 2-up
  • Swipe
  • Onion skin

522 Bytes | W: | H:

1.21 KB | W: | H:

src/assets/icon/setting-btn.png
src/assets/icon/setting-btn.png
src/assets/icon/setting-btn.png
src/assets/icon/setting-btn.png
  • 2-up
  • Swipe
  • Onion skin

2.35 KB | W: | H:

5.14 KB | W: | H:

src/assets/icon/share.png
src/assets/icon/share.png
src/assets/icon/share.png
src/assets/icon/share.png
  • 2-up
  • Swipe
  • Onion skin

434 Bytes | W: | H:

916 Bytes | W: | H:

src/assets/icon/typeList.png
src/assets/icon/typeList.png
src/assets/icon/typeList.png
src/assets/icon/typeList.png
  • 2-up
  • Swipe
  • Onion skin
.icon {display: inline-block;background-image: url(sprite.png);background-size: 232px 186px;}
.icon-begin { width: 52px; height: 72px; background-position: -68px 0px; }
.icon-checked { width: 20px; height: 20px; background-position: -150px -156px; }
.icon-copy { width: 28px; height: 28px; background-position: -172px -112px; }
.icon-device { width: 14px; height: 14px; background-position: -64px -140px; }
.icon-loc-icon { width: 30px; height: 30px; background-position: 0px -156px; }
.icon-locate-sm { width: 14px; height: 14px; background-position: -78px -140px; }
.icon-location { width: 24px; height: 24px; background-position: -30px -156px; }
.icon-navgation { width: 28px; height: 28px; background-position: -200px -112px; }
.icon-off-car { width: 52px; height: 52px; background-position: -172px -60px; }
.icon-off-line { width: 20px; height: 20px; background-position: -170px -156px; }
.icon-offline-time { width: 14px; height: 14px; background-position: -92px -140px; }
.icon-on-car { width: 52px; height: 52px; background-position: -120px -80px; }
.icon-on-line { width: 24px; height: 24px; background-position: -54px -156px; }
.icon-online-time { width: 14px; height: 14px; background-position: -106px -140px; }
.icon-put-away { width: 64px; height: 16px; background-position: 0px -140px; }
.icon-refresh-car { width: 24px; height: 24px; background-position: -78px -156px; }
.icon-replay-pause { width: 60px; height: 60px; background-position: 0px -80px; }
.icon-replay-play { width: 60px; height: 60px; background-position: -60px -80px; }
.icon-replay-refresh { width: 60px; height: 60px; background-position: -172px 0px; }
.icon-resident { width: 52px; height: 72px; background-position: -120px 0px; }
.icon-screen-btn { width: 24px; height: 24px; background-position: -102px -156px; }
.icon-setting-btn { width: 24px; height: 24px; background-position: -126px -156px; }
.icon-share { width: 68px; height: 80px; background-position: 0px 0px; }
.icon-typeList { width: 14px; height: 14px; background-position: -120px -140px; }
\ No newline at end of file \ No newline at end of file
.icon {display: inline-block;background-image: url(sprite.png);background-size: 192px 188px;}
.icon-battery-empty { width: 24px; height: 16px; background-position: -144px -124px; }
.icon-battery-enough { width: 24px; height: 16px; background-position: -168px -124px; }
.icon-begin { width: 26px; height: 36px; background-position: -140px -52px; }
.icon-copy { width: 28px; height: 28px; background-position: -144px -96px; }
.icon-device { width: 14px; height: 14px; background-position: -118px -68px; }
.icon-loc-icon { width: 30px; height: 30px; background-position: -88px -52px; }
.icon-locate-sm { width: 14px; height: 14px; background-position: -88px -82px; }
.icon-location { width: 24px; height: 24px; background-position: -28px -160px; }
.icon-navgation { width: 28px; height: 28px; background-position: 0px -160px; }
.icon-off-car { width: 52px; height: 52px; background-position: -88px 0px; }
.icon-offline-time { width: 14px; height: 14px; background-position: -102px -82px; }
.icon-on-car { width: 52px; height: 52px; background-position: -140px 0px; }
.icon-online-time { width: 14px; height: 14px; background-position: -116px -82px; }
.icon-put-away { width: 64px; height: 16px; background-position: 0px -144px; }
.icon-refresh-car { width: 24px; height: 24px; background-position: -52px -160px; }
.icon-replay-pause { width: 48px; height: 48px; background-position: 0px -96px; }
.icon-replay-play { width: 48px; height: 48px; background-position: -48px -96px; }
.icon-replay-refresh { width: 48px; height: 48px; background-position: -96px -96px; }
.icon-resident { width: 26px; height: 36px; background-position: -166px -52px; }
.icon-search { width: 16px; height: 16px; background-position: -118px -52px; }
.icon-setting-btn { width: 24px; height: 24px; background-position: -76px -160px; }
.icon-share { width: 88px; height: 96px; background-position: 0px 0px; }
.icon-typeList { width: 14px; height: 14px; background-position: -64px -144px; }
.icon-warning { width: 16px; height: 16px; background-position: -172px -96px; }
\ No newline at end of file \ No newline at end of file

21.4 KB | W: | H:

37 KB | W: | H:

src/assets/spritesmith-generated/sprite.png
src/assets/spritesmith-generated/sprite.png
src/assets/spritesmith-generated/sprite.png
src/assets/spritesmith-generated/sprite.png
  • 2-up
  • Swipe
  • Onion skin
...@@ -5,13 +5,8 @@ ...@@ -5,13 +5,8 @@
</template> </template>
<script> <script>
import { Loading } from "vant";
export default { export default {
name: "LOADING", name: "LOADING",
components: {
["van-loading"]: Loading,
},
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
......
...@@ -2,18 +2,29 @@ ...@@ -2,18 +2,29 @@
<div class="map-box"> <div class="map-box">
<slot name="mapBox"></slot> <slot name="mapBox"></slot>
<div v-show="isUploaded"> <div v-show="isUploaded">
<a class="map-cmd-icon location" @click="getLocation"> <button
<span class="icon icon-location"></span> class="map-cmd-icon location"
</a> @click="getLocation"
<a class="map-cmd-icon refresh-car" @click="refresh"> v-preventReClick
>
<span v-if="!isGetLocation" class="icon icon-location"></span>
<van-loading v-else color="#1989fa" />
</button>
<button
class="map-cmd-icon refresh-car"
@click="refresh"
v-preventReClick
>
<span class="icon icon-refresh-car"></span> <span class="icon icon-refresh-car"></span>
</a> </button>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import { onMounted, ref } from "vue"; import { onMounted, ref } from "vue";
import { Toast } from "vant";
import "vant/es/toast/style";
export default { export default {
name: "mapContent", name: "mapContent",
props: {}, props: {},
...@@ -23,6 +34,7 @@ export default { ...@@ -23,6 +34,7 @@ export default {
let checkLoadedTimeoutId = ""; let checkLoadedTimeoutId = "";
const satelActive = ref(null); const satelActive = ref(null);
const roadActive = ref(null); const roadActive = ref(null);
const isGetLocation = ref(false);
onMounted(() => {}); onMounted(() => {});
const initMap = (id) => { const initMap = (id) => {
let check = () => { let check = () => {
...@@ -47,6 +59,7 @@ export default { ...@@ -47,6 +59,7 @@ export default {
let currMarker = null; let currMarker = null;
// 获取定位 // 获取定位
const getLocation = () => { const getLocation = () => {
isGetLocation.value = true;
map.plugin("AMap.Geolocation", function () { map.plugin("AMap.Geolocation", function () {
var geolocation = new window.AMap.Geolocation({ var geolocation = new window.AMap.Geolocation({
enableHighAccuracy: true, enableHighAccuracy: true,
...@@ -61,6 +74,7 @@ export default { ...@@ -61,6 +74,7 @@ export default {
if (currMarker) { if (currMarker) {
currMarker.setMap(null); currMarker.setMap(null);
} }
isGetLocation.value = false;
currMarker = new window.AMap.Marker({ currMarker = new window.AMap.Marker({
position: data.position, position: data.position,
content: '<span class="curr-marker"></span>', content: '<span class="curr-marker"></span>',
...@@ -69,7 +83,10 @@ export default { ...@@ -69,7 +83,10 @@ export default {
}); });
map.setFitView(); map.setFitView();
}); });
window.AMap.event.addListener(geolocation, "error", () => {}); window.AMap.event.addListener(geolocation, "error", () => {
Toast("获取定位失败");
isGetLocation.value = false;
});
}); });
}; };
// 刷新 // 刷新
...@@ -85,6 +102,7 @@ export default { ...@@ -85,6 +102,7 @@ export default {
roadActive, roadActive,
refresh, refresh,
isUploaded, isUploaded,
isGetLocation,
}; };
}, },
}; };
...@@ -104,13 +122,14 @@ export default { ...@@ -104,13 +122,14 @@ export default {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
box-shadow: 0px 5px 12px 0px rgba(0, 0, 0, 0.12);
} }
.location { .location {
bottom: 180px; bottom: 160px;
right: 20px; right: 20px;
} }
.refresh-car { .refresh-car {
bottom: 240px; bottom: 220px;
right: 20px; right: 20px;
} }
......
<template> <template>
<van-popup <van-popup
v-model:show="props.showPopup" :model-show="props.showPopup"
round round
@close="close" @close="close"
:close-on-click-overlay="true" :close-on-click-overlay="true"
...@@ -8,13 +8,15 @@ ...@@ -8,13 +8,15 @@
> >
<div class="content-box"> <div class="content-box">
<div class="btn-class"> <div class="btn-class">
<span class="cancel-btn" @click="cancel">取消</span> <button class="cancel-btn" @click="cancel">取消</button>
<span <button
class="save-btn" class="save-btn"
:class="isDisabled ? 'disabled' : ''" :class="isDisabled ? 'disabled' : ''"
@click="save" @click="save"
>{{ isDisabled ? "关闭" : "确定" }}</span v-preventReClick
> >
{{ isDisabled ? "关闭" : "确定" }}
</button>
</div> </div>
<slot></slot> <slot></slot>
</div> </div>
...@@ -72,10 +74,12 @@ export default defineComponent({ ...@@ -72,10 +74,12 @@ export default defineComponent({
padding-bottom: 40px; padding-bottom: 40px;
.btn-class { .btn-class {
padding: 15px; padding: 15px;
box-sizing: border-box;
border-bottom: 1px solid #f0f2f5; border-bottom: 1px solid #f0f2f5;
width: calc(100% - 40px); width: 100%;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
font-size: 14px;
.cancel-btn { .cancel-btn {
color: #6c737a; color: #6c737a;
} }
......
<template> <template>
<div> <div class="top-tab-class">
<van-tabs v-model:active="active" @click-tab="onTabClick"> <van-tabs v-model:active="active" @click-tab="onTabClick">
<van-tab <van-tab
v-for="(item, index) in tabRoutes" v-for="(item, index) in tabRoutes"
...@@ -29,20 +29,23 @@ export default { ...@@ -29,20 +29,23 @@ export default {
// 过滤tab // 过滤tab
const filterTabs = async (cb) => { const filterTabs = async (cb) => {
let source = routeQuery.source; let source = routeQuery.source;
// 有线设备 无设备调频 for (var i = routes.tabRoutes.length - 1; i >= 0; i--) {
if (source == 1) { if (routes.tabRoutes[i].name === "freq" && source == 1) {
routesArr.map((val, index) => { routesArr.splice(i, 1);
if (val.name === "freq") {
routesArr.splice(index, 1);
} }
}); if (
(routes.tabRoutes[i].name === "fence" && source == 0) ||
(routes.tabRoutes[i].name === "fence" &&
JSON.parse(localStorage.getItem("sharePage")))
) {
routesArr.splice(i, 1);
} }
if (source == 0) { if (
routesArr.map((val, index) => { routes.tabRoutes[i].name === "share" &&
if (val.name === "fence") { JSON.parse(localStorage.getItem("sharePage"))
routesArr.splice(index, 1); ) {
routesArr.splice(i, 1);
} }
});
} }
await cb(); await cb();
}; };
...@@ -62,8 +65,25 @@ export default { ...@@ -62,8 +65,25 @@ export default {
}, },
}; };
</script> </script>
<style lang="scss" scoped>
.top-tab-class {
height: 100%;
}
.tab-content {
height: 100%;
}
</style>
<style lang="scss"> <style lang="scss">
.van-tabs {
height: 100%;
}
.van-tabs__wrap { .van-tabs__wrap {
border-bottom: 1px solid #f0f2f5; border-bottom: 1px solid #f0f2f5;
} }
.van-tabs__content {
height: calc(100% - 45px);
}
.van-tab__panel {
height: 100%;
}
</style> </style>
...@@ -10,6 +10,19 @@ import "@/assets/icons"; ...@@ -10,6 +10,19 @@ import "@/assets/icons";
import SvgIcon from "@/components/svgIcon"; import SvgIcon from "@/components/svgIcon";
const app = createApp(App); const app = createApp(App);
// 防止重复快速点击自定义全局指令
app.directive("preventReClick", {
mounted(el, binding) {
el.addEventListener("click", () => {
if (!el.disabled) {
el.disabled = true;
setTimeout(() => {
el.disabled = false;
}, binding.value || 1000);
}
});
},
});
app.component("svg-icon", SvgIcon); app.component("svg-icon", SvgIcon);
vant(app); vant(app);
app.use(store).use(router).mount("#app"); app.use(store).use(router).mount("#app");
......
import { createRouter, createWebHistory } from "vue-router"; import { createRouter, createWebHashHistory } from "vue-router";
import routes from "./routes"; import routes from "./routes";
const router = createRouter({ const router = createRouter({
history: createWebHistory("/miniapp/"), history: createWebHashHistory(),
routes: routes.baseRoutes, routes: routes.baseRoutes,
}); });
......
/* eslint-disable */
const ADCODE = [
{ adcode: "86", parentid: "0", type: "0", name: "中华人民共和国" },
{ adcode: "110000", parentid: "86", type: "1", name: "北京市" },
{ adcode: "110100", parentid: "110000", type: "2", name: "北京市市辖区" },
{ adcode: "120000", parentid: "86", type: "1", name: "天津市" },
{ adcode: "120100", parentid: "120000", type: "2", name: "天津市市辖区" },
{ adcode: "130000", parentid: "86", type: "1", name: "河北省" },
{ adcode: "130100", parentid: "130000", type: "2", name: "石家庄市" },
{ adcode: "130200", parentid: "130000", type: "2", name: "唐山市" },
{ adcode: "130300", parentid: "130000", type: "2", name: "秦皇岛市" },
{ adcode: "130400", parentid: "130000", type: "2", name: "邯郸市" },
{ adcode: "130500", parentid: "130000", type: "2", name: "邢台市" },
{ adcode: "130600", parentid: "130000", type: "2", name: "保定市" },
{ adcode: "130700", parentid: "130000", type: "2", name: "张家口市" },
{ adcode: "130800", parentid: "130000", type: "2", name: "承德市" },
{ adcode: "130900", parentid: "130000", type: "2", name: "沧州市" },
{ adcode: "131000", parentid: "130000", type: "2", name: "廊坊市" },
{ adcode: "131100", parentid: "130000", type: "2", name: "衡水市" },
{ adcode: "140000", parentid: "86", type: "1", name: "山西省" },
{ adcode: "140100", parentid: "140000", type: "2", name: "太原市" },
{ adcode: "140200", parentid: "140000", type: "2", name: "大同市" },
{ adcode: "140300", parentid: "140000", type: "2", name: "阳泉市" },
{ adcode: "140400", parentid: "140000", type: "2", name: "长治市" },
{ adcode: "140500", parentid: "140000", type: "2", name: "晋城市" },
{ adcode: "140600", parentid: "140000", type: "2", name: "朔州市" },
{ adcode: "140700", parentid: "140000", type: "2", name: "晋中市" },
{ adcode: "140800", parentid: "140000", type: "2", name: "运城市" },
{ adcode: "140900", parentid: "140000", type: "2", name: "忻州市" },
{ adcode: "141000", parentid: "140000", type: "2", name: "临汾市" },
{ adcode: "141100", parentid: "140000", type: "2", name: "吕梁市" },
{ adcode: "150000", parentid: "86", type: "1", name: "内蒙古自治区" },
{ adcode: "150100", parentid: "150000", type: "2", name: "呼和浩特市" },
{ adcode: "150200", parentid: "150000", type: "2", name: "包头市" },
{ adcode: "150300", parentid: "150000", type: "2", name: "乌海市" },
{ adcode: "150400", parentid: "150000", type: "2", name: "赤峰市" },
{ adcode: "150500", parentid: "150000", type: "2", name: "通辽市" },
{ adcode: "150600", parentid: "150000", type: "2", name: "鄂尔多斯市" },
{ adcode: "150700", parentid: "150000", type: "2", name: "呼伦贝尔市" },
{ adcode: "150800", parentid: "150000", type: "2", name: "巴彦淖尔市" },
{ adcode: "150900", parentid: "150000", type: "2", name: "乌兰察布市" },
{ adcode: "152200", parentid: "150000", type: "2", name: "兴安盟" },
{ adcode: "152500", parentid: "150000", type: "2", name: "锡林郭勒盟" },
{ adcode: "152900", parentid: "150000", type: "2", name: "阿拉善盟" },
{ adcode: "210000", parentid: "86", type: "1", name: "辽宁省" },
{ adcode: "210100", parentid: "210000", type: "2", name: "沈阳市" },
{ adcode: "210200", parentid: "210000", type: "2", name: "大连市" },
{ adcode: "210300", parentid: "210000", type: "2", name: "鞍山市" },
{ adcode: "210400", parentid: "210000", type: "2", name: "抚顺市" },
{ adcode: "210500", parentid: "210000", type: "2", name: "本溪市" },
{ adcode: "210600", parentid: "210000", type: "2", name: "丹东市" },
{ adcode: "210700", parentid: "210000", type: "2", name: "锦州市" },
{ adcode: "210800", parentid: "210000", type: "2", name: "营口市" },
{ adcode: "210900", parentid: "210000", type: "2", name: "阜新市" },
{ adcode: "211000", parentid: "210000", type: "2", name: "辽阳市" },
{ adcode: "211100", parentid: "210000", type: "2", name: "盘锦市" },
{ adcode: "211200", parentid: "210000", type: "2", name: "铁岭市" },
{ adcode: "211300", parentid: "210000", type: "2", name: "朝阳市" },
{ adcode: "211400", parentid: "210000", type: "2", name: "葫芦岛市" },
{ adcode: "220000", parentid: "86", type: "1", name: "吉林省" },
{ adcode: "220100", parentid: "220000", type: "2", name: "长春市" },
{ adcode: "220200", parentid: "220000", type: "2", name: "吉林市" },
{ adcode: "220300", parentid: "220000", type: "2", name: "四平市" },
{ adcode: "220400", parentid: "220000", type: "2", name: "辽源市" },
{ adcode: "220500", parentid: "220000", type: "2", name: "通化市" },
{ adcode: "220600", parentid: "220000", type: "2", name: "白山市" },
{ adcode: "220700", parentid: "220000", type: "2", name: "松原市" },
{ adcode: "220800", parentid: "220000", type: "2", name: "白城市" },
{ adcode: "222400", parentid: "220000", type: "2", name: "延边朝鲜族自治州" },
{ adcode: "230000", parentid: "86", type: "1", name: "黑龙江省" },
{ adcode: "230100", parentid: "230000", type: "2", name: "哈尔滨市" },
{ adcode: "230200", parentid: "230000", type: "2", name: "齐齐哈尔市" },
{ adcode: "230300", parentid: "230000", type: "2", name: "鸡西市" },
{ adcode: "230400", parentid: "230000", type: "2", name: "鹤岗市" },
{ adcode: "230500", parentid: "230000", type: "2", name: "双鸭山市" },
{ adcode: "230600", parentid: "230000", type: "2", name: "大庆市" },
{ adcode: "230700", parentid: "230000", type: "2", name: "伊春市" },
{ adcode: "230800", parentid: "230000", type: "2", name: "佳木斯市" },
{ adcode: "230900", parentid: "230000", type: "2", name: "七台河市" },
{ adcode: "231000", parentid: "230000", type: "2", name: "牡丹江市" },
{ adcode: "231100", parentid: "230000", type: "2", name: "黑河市" },
{ adcode: "231200", parentid: "230000", type: "2", name: "绥化市" },
{ adcode: "232700", parentid: "230000", type: "2", name: "大兴安岭地区" },
{ adcode: "310000", parentid: "86", type: "1", name: "上海市" },
{ adcode: "310100", parentid: "310000", type: "2", name: "上海市市辖区" },
{ adcode: "320000", parentid: "86", type: "1", name: "江苏省" },
{ adcode: "320100", parentid: "320000", type: "2", name: "南京市" },
{ adcode: "320200", parentid: "320000", type: "2", name: "无锡市" },
{ adcode: "320300", parentid: "320000", type: "2", name: "徐州市" },
{ adcode: "320400", parentid: "320000", type: "2", name: "常州市" },
{ adcode: "320500", parentid: "320000", type: "2", name: "苏州市" },
{ adcode: "320600", parentid: "320000", type: "2", name: "南通市" },
{ adcode: "320700", parentid: "320000", type: "2", name: "连云港市" },
{ adcode: "320800", parentid: "320000", type: "2", name: "淮安市" },
{ adcode: "320900", parentid: "320000", type: "2", name: "盐城市" },
{ adcode: "321000", parentid: "320000", type: "2", name: "扬州市" },
{ adcode: "321100", parentid: "320000", type: "2", name: "镇江市" },
{ adcode: "321200", parentid: "320000", type: "2", name: "泰州市" },
{ adcode: "321300", parentid: "320000", type: "2", name: "宿迁市" },
{ adcode: "330000", parentid: "86", type: "1", name: "浙江省" },
{ adcode: "330100", parentid: "330000", type: "2", name: "杭州市" },
{ adcode: "330200", parentid: "330000", type: "2", name: "宁波市" },
{ adcode: "330300", parentid: "330000", type: "2", name: "温州市" },
{ adcode: "330400", parentid: "330000", type: "2", name: "嘉兴市" },
{ adcode: "330500", parentid: "330000", type: "2", name: "湖州市" },
{ adcode: "330600", parentid: "330000", type: "2", name: "绍兴市" },
{ adcode: "330700", parentid: "330000", type: "2", name: "金华市" },
{ adcode: "330800", parentid: "330000", type: "2", name: "衢州市" },
{ adcode: "330900", parentid: "330000", type: "2", name: "舟山市" },
{ adcode: "331000", parentid: "330000", type: "2", name: "台州市" },
{ adcode: "331100", parentid: "330000", type: "2", name: "丽水市" },
{ adcode: "340000", parentid: "86", type: "1", name: "安徽省" },
{ adcode: "340100", parentid: "340000", type: "2", name: "合肥市" },
{ adcode: "340200", parentid: "340000", type: "2", name: "芜湖市" },
{ adcode: "340300", parentid: "340000", type: "2", name: "蚌埠市" },
{ adcode: "340400", parentid: "340000", type: "2", name: "淮南市" },
{ adcode: "340500", parentid: "340000", type: "2", name: "马鞍山市" },
{ adcode: "340600", parentid: "340000", type: "2", name: "淮北市" },
{ adcode: "340700", parentid: "340000", type: "2", name: "铜陵市" },
{ adcode: "340800", parentid: "340000", type: "2", name: "安庆市" },
{ adcode: "341000", parentid: "340000", type: "2", name: "黄山市" },
{ adcode: "341100", parentid: "340000", type: "2", name: "滁州市" },
{ adcode: "341200", parentid: "340000", type: "2", name: "阜阳市" },
{ adcode: "341300", parentid: "340000", type: "2", name: "宿州市" },
{ adcode: "341500", parentid: "340000", type: "2", name: "六安市" },
{ adcode: "341600", parentid: "340000", type: "2", name: "亳州市" },
{ adcode: "341700", parentid: "340000", type: "2", name: "池州市" },
{ adcode: "341800", parentid: "340000", type: "2", name: "宣城市" },
{ adcode: "350000", parentid: "86", type: "1", name: "福建省" },
{ adcode: "350100", parentid: "350000", type: "2", name: "福州市" },
{ adcode: "350200", parentid: "350000", type: "2", name: "厦门市" },
{ adcode: "350300", parentid: "350000", type: "2", name: "莆田市" },
{ adcode: "350400", parentid: "350000", type: "2", name: "三明市" },
{ adcode: "350500", parentid: "350000", type: "2", name: "泉州市" },
{ adcode: "350600", parentid: "350000", type: "2", name: "漳州市" },
{ adcode: "350700", parentid: "350000", type: "2", name: "南平市" },
{ adcode: "350800", parentid: "350000", type: "2", name: "龙岩市" },
{ adcode: "350900", parentid: "350000", type: "2", name: "宁德市" },
{ adcode: "360000", parentid: "86", type: "1", name: "江西省" },
{ adcode: "360100", parentid: "360000", type: "2", name: "南昌市" },
{ adcode: "360200", parentid: "360000", type: "2", name: "景德镇市" },
{ adcode: "360300", parentid: "360000", type: "2", name: "萍乡市" },
{ adcode: "360400", parentid: "360000", type: "2", name: "九江市" },
{ adcode: "360500", parentid: "360000", type: "2", name: "新余市" },
{ adcode: "360600", parentid: "360000", type: "2", name: "鹰潭市" },
{ adcode: "360700", parentid: "360000", type: "2", name: "赣州市" },
{ adcode: "360800", parentid: "360000", type: "2", name: "吉安市" },
{ adcode: "360900", parentid: "360000", type: "2", name: "宜春市" },
{ adcode: "361000", parentid: "360000", type: "2", name: "抚州市" },
{ adcode: "361100", parentid: "360000", type: "2", name: "上饶市" },
{ adcode: "370000", parentid: "86", type: "1", name: "山东省" },
{ adcode: "370100", parentid: "370000", type: "2", name: "济南市" },
{ adcode: "370200", parentid: "370000", type: "2", name: "青岛市" },
{ adcode: "370300", parentid: "370000", type: "2", name: "淄博市" },
{ adcode: "370400", parentid: "370000", type: "2", name: "枣庄市" },
{ adcode: "370500", parentid: "370000", type: "2", name: "东营市" },
{ adcode: "370600", parentid: "370000", type: "2", name: "烟台市" },
{ adcode: "370700", parentid: "370000", type: "2", name: "潍坊市" },
{ adcode: "370800", parentid: "370000", type: "2", name: "济宁市" },
{ adcode: "370900", parentid: "370000", type: "2", name: "泰安市" },
{ adcode: "371000", parentid: "370000", type: "2", name: "威海市" },
{ adcode: "371100", parentid: "370000", type: "2", name: "日照市" },
{ adcode: "371200", parentid: "370000", type: "2", name: "莱芜市" },
{ adcode: "371300", parentid: "370000", type: "2", name: "临沂市" },
{ adcode: "371400", parentid: "370000", type: "2", name: "德州市" },
{ adcode: "371500", parentid: "370000", type: "2", name: "聊城市" },
{ adcode: "371600", parentid: "370000", type: "2", name: "滨州市" },
{ adcode: "371700", parentid: "370000", type: "2", name: "菏泽市" },
{ adcode: "410000", parentid: "86", type: "1", name: "河南省" },
{ adcode: "410100", parentid: "410000", type: "2", name: "郑州市" },
{ adcode: "410200", parentid: "410000", type: "2", name: "开封市" },
{ adcode: "410300", parentid: "410000", type: "2", name: "洛阳市" },
{ adcode: "410400", parentid: "410000", type: "2", name: "平顶山市" },
{ adcode: "410500", parentid: "410000", type: "2", name: "安阳市" },
{ adcode: "410600", parentid: "410000", type: "2", name: "鹤壁市" },
{ adcode: "410700", parentid: "410000", type: "2", name: "新乡市" },
{ adcode: "410800", parentid: "410000", type: "2", name: "焦作市" },
{ adcode: "410900", parentid: "410000", type: "2", name: "濮阳市" },
{ adcode: "411000", parentid: "410000", type: "2", name: "许昌市" },
{ adcode: "411100", parentid: "410000", type: "2", name: "漯河市" },
{ adcode: "411200", parentid: "410000", type: "2", name: "三门峡市" },
{ adcode: "411300", parentid: "410000", type: "2", name: "南阳市" },
{ adcode: "411400", parentid: "410000", type: "2", name: "商丘市" },
{ adcode: "411500", parentid: "410000", type: "2", name: "信阳市" },
{ adcode: "411600", parentid: "410000", type: "2", name: "周口市" },
{ adcode: "411700", parentid: "410000", type: "2", name: "驻马店市" },
{ adcode: "419001", parentid: "410000", type: "2", name: "济源市" },
{ adcode: "420000", parentid: "86", type: "1", name: "湖北省" },
{ adcode: "420100", parentid: "420000", type: "2", name: "武汉市" },
{ adcode: "420200", parentid: "420000", type: "2", name: "黄石市" },
{ adcode: "420300", parentid: "420000", type: "2", name: "十堰市" },
{ adcode: "420500", parentid: "420000", type: "2", name: "宜昌市" },
{ adcode: "420600", parentid: "420000", type: "2", name: "襄阳市" },
{ adcode: "420700", parentid: "420000", type: "2", name: "鄂州市" },
{ adcode: "420800", parentid: "420000", type: "2", name: "荆门市" },
{ adcode: "420900", parentid: "420000", type: "2", name: "孝感市" },
{ adcode: "421000", parentid: "420000", type: "2", name: "荆州市" },
{ adcode: "421100", parentid: "420000", type: "2", name: "黄冈市" },
{ adcode: "421200", parentid: "420000", type: "2", name: "咸宁市" },
{ adcode: "421300", parentid: "420000", type: "2", name: "随州市" },
{
adcode: "422800",
parentid: "420000",
type: "2",
name: "恩施土家族苗族自治州",
},
{ adcode: "429004", parentid: "420000", type: "2", name: "仙桃市" },
{ adcode: "429005", parentid: "420000", type: "2", name: "潜江市" },
{ adcode: "429006", parentid: "420000", type: "2", name: "天门市" },
{ adcode: "429021", parentid: "420000", type: "2", name: "神农架林区" },
{ adcode: "430000", parentid: "86", type: "1", name: "湖南省" },
{ adcode: "430100", parentid: "430000", type: "2", name: "长沙市" },
{ adcode: "430200", parentid: "430000", type: "2", name: "株洲市" },
{ adcode: "430300", parentid: "430000", type: "2", name: "湘潭市" },
{ adcode: "430400", parentid: "430000", type: "2", name: "衡阳市" },
{ adcode: "430500", parentid: "430000", type: "2", name: "邵阳市" },
{ adcode: "430600", parentid: "430000", type: "2", name: "岳阳市" },
{ adcode: "430700", parentid: "430000", type: "2", name: "常德市" },
{ adcode: "430800", parentid: "430000", type: "2", name: "张家界市" },
{ adcode: "430900", parentid: "430000", type: "2", name: "益阳市" },
{ adcode: "431000", parentid: "430000", type: "2", name: "郴州市" },
{ adcode: "431100", parentid: "430000", type: "2", name: "永州市" },
{ adcode: "431200", parentid: "430000", type: "2", name: "怀化市" },
{ adcode: "431300", parentid: "430000", type: "2", name: "娄底市" },
{
adcode: "433100",
parentid: "430000",
type: "2",
name: "湘西土家族苗族自治州",
},
{ adcode: "440000", parentid: "86", type: "1", name: "广东省" },
{ adcode: "440100", parentid: "440000", type: "2", name: "广州市" },
{ adcode: "440200", parentid: "440000", type: "2", name: "韶关市" },
{ adcode: "440300", parentid: "440000", type: "2", name: "深圳市" },
{ adcode: "440400", parentid: "440000", type: "2", name: "珠海市" },
{ adcode: "440500", parentid: "440000", type: "2", name: "汕头市" },
{ adcode: "440600", parentid: "440000", type: "2", name: "佛山市" },
{ adcode: "440700", parentid: "440000", type: "2", name: "江门市" },
{ adcode: "440800", parentid: "440000", type: "2", name: "湛江市" },
{ adcode: "440900", parentid: "440000", type: "2", name: "茂名市" },
{ adcode: "441200", parentid: "440000", type: "2", name: "肇庆市" },
{ adcode: "441300", parentid: "440000", type: "2", name: "惠州市" },
{ adcode: "441400", parentid: "440000", type: "2", name: "梅州市" },
{ adcode: "441500", parentid: "440000", type: "2", name: "汕尾市" },
{ adcode: "441600", parentid: "440000", type: "2", name: "河源市" },
{ adcode: "441700", parentid: "440000", type: "2", name: "阳江市" },
{ adcode: "441800", parentid: "440000", type: "2", name: "清远市" },
{ adcode: "441900", parentid: "440000", type: "2", name: "东莞市" },
{ adcode: "442000", parentid: "440000", type: "2", name: "中山市" },
{ adcode: "445100", parentid: "440000", type: "2", name: "潮州市" },
{ adcode: "445200", parentid: "440000", type: "2", name: "揭阳市" },
{ adcode: "445300", parentid: "440000", type: "2", name: "云浮市" },
{ adcode: "450000", parentid: "86", type: "1", name: "广西壮族自治区" },
{ adcode: "450100", parentid: "450000", type: "2", name: "南宁市" },
{ adcode: "450200", parentid: "450000", type: "2", name: "柳州市" },
{ adcode: "450300", parentid: "450000", type: "2", name: "桂林市" },
{ adcode: "450400", parentid: "450000", type: "2", name: "梧州市" },
{ adcode: "450500", parentid: "450000", type: "2", name: "北海市" },
{ adcode: "450600", parentid: "450000", type: "2", name: "防城港市" },
{ adcode: "450700", parentid: "450000", type: "2", name: "钦州市" },
{ adcode: "450800", parentid: "450000", type: "2", name: "贵港市" },
{ adcode: "450900", parentid: "450000", type: "2", name: "玉林市" },
{ adcode: "451000", parentid: "450000", type: "2", name: "百色市" },
{ adcode: "451100", parentid: "450000", type: "2", name: "贺州市" },
{ adcode: "451200", parentid: "450000", type: "2", name: "河池市" },
{ adcode: "451300", parentid: "450000", type: "2", name: "来宾市" },
{ adcode: "451400", parentid: "450000", type: "2", name: "崇左市" },
{ adcode: "460000", parentid: "86", type: "1", name: "海南省" },
{ adcode: "460100", parentid: "460000", type: "2", name: "海口市" },
{ adcode: "460200", parentid: "460000", type: "2", name: "三亚市" },
{ adcode: "460300", parentid: "460000", type: "2", name: "三沙市" },
{ adcode: "469001", parentid: "460000", type: "2", name: "五指山市" },
{ adcode: "469002", parentid: "460000", type: "2", name: "琼海市" },
{ adcode: "469003", parentid: "460000", type: "2", name: "儋州市" },
{ adcode: "469005", parentid: "460000", type: "2", name: "文昌市" },
{ adcode: "469006", parentid: "460000", type: "2", name: "万宁市" },
{ adcode: "469007", parentid: "460000", type: "2", name: "东方市" },
{ adcode: "469021", parentid: "460000", type: "2", name: "定安县" },
{ adcode: "469022", parentid: "460000", type: "2", name: "屯昌县" },
{ adcode: "469023", parentid: "460000", type: "2", name: "澄迈县" },
{ adcode: "469024", parentid: "460000", type: "2", name: "临高县" },
{ adcode: "469025", parentid: "460000", type: "2", name: "白沙黎族自治县" },
{ adcode: "469026", parentid: "460000", type: "2", name: "昌江黎族自治县" },
{ adcode: "469027", parentid: "460000", type: "2", name: "乐东黎族自治县" },
{ adcode: "469028", parentid: "460000", type: "2", name: "陵水黎族自治县" },
{
adcode: "469029",
parentid: "460000",
type: "2",
name: "保亭黎族苗族自治县",
},
{
adcode: "469030",
parentid: "460000",
type: "2",
name: "琼中黎族苗族自治县",
},
{ adcode: "469031", parentid: "460000", type: "2", name: "西沙群岛" },
{ adcode: "469032", parentid: "460000", type: "2", name: "南沙群岛" },
{
adcode: "469033",
parentid: "460000",
type: "2",
name: "中沙群岛的岛礁及其海域",
},
{ adcode: "500000", parentid: "86", type: "1", name: "重庆市" },
{ adcode: "500100", parentid: "500000", type: "2", name: "重庆市市辖区" },
{ adcode: "510000", parentid: "86", type: "1", name: "四川省" },
{ adcode: "510100", parentid: "510000", type: "2", name: "成都市" },
{ adcode: "510300", parentid: "510000", type: "2", name: "自贡市" },
{ adcode: "510400", parentid: "510000", type: "2", name: "攀枝花市" },
{ adcode: "510500", parentid: "510000", type: "2", name: "泸州市" },
{ adcode: "510600", parentid: "510000", type: "2", name: "德阳市" },
{ adcode: "510700", parentid: "510000", type: "2", name: "绵阳市" },
{ adcode: "510800", parentid: "510000", type: "2", name: "广元市" },
{ adcode: "510900", parentid: "510000", type: "2", name: "遂宁市" },
{ adcode: "511000", parentid: "510000", type: "2", name: "内江市" },
{ adcode: "511100", parentid: "510000", type: "2", name: "乐山市" },
{ adcode: "511300", parentid: "510000", type: "2", name: "南充市" },
{ adcode: "511400", parentid: "510000", type: "2", name: "眉山市" },
{ adcode: "511500", parentid: "510000", type: "2", name: "宜宾市" },
{ adcode: "511600", parentid: "510000", type: "2", name: "广安市" },
{ adcode: "511700", parentid: "510000", type: "2", name: "达州市" },
{ adcode: "511800", parentid: "510000", type: "2", name: "雅安市" },
{ adcode: "511900", parentid: "510000", type: "2", name: "巴中市" },
{ adcode: "512000", parentid: "510000", type: "2", name: "资阳市" },
{
adcode: "513200",
parentid: "510000",
type: "2",
name: "阿坝藏族羌族自治州",
},
{ adcode: "513300", parentid: "510000", type: "2", name: "甘孜藏族自治州" },
{ adcode: "513400", parentid: "510000", type: "2", name: "凉山彝族自治州" },
{ adcode: "520000", parentid: "86", type: "1", name: "贵州省" },
{ adcode: "520100", parentid: "520000", type: "2", name: "贵阳市" },
{ adcode: "520200", parentid: "520000", type: "2", name: "六盘水市" },
{ adcode: "520300", parentid: "520000", type: "2", name: "遵义市" },
{ adcode: "520400", parentid: "520000", type: "2", name: "安顺市" },
{ adcode: "520500", parentid: "520000", type: "2", name: "毕节市" },
{ adcode: "520600", parentid: "520000", type: "2", name: "铜仁市" },
{
adcode: "522300",
parentid: "520000",
type: "2",
name: "黔西南布依族苗族自治州",
},
{
adcode: "522600",
parentid: "520000",
type: "2",
name: "黔东南苗族侗族自治州",
},
{
adcode: "522700",
parentid: "520000",
type: "2",
name: "黔南布依族苗族自治州",
},
{ adcode: "530000", parentid: "86", type: "1", name: "云南省" },
{ adcode: "530100", parentid: "530000", type: "2", name: "昆明市" },
{ adcode: "530300", parentid: "530000", type: "2", name: "曲靖市" },
{ adcode: "530400", parentid: "530000", type: "2", name: "玉溪市" },
{ adcode: "530500", parentid: "530000", type: "2", name: "保山市" },
{ adcode: "530600", parentid: "530000", type: "2", name: "昭通市" },
{ adcode: "530700", parentid: "530000", type: "2", name: "丽江市" },
{ adcode: "530800", parentid: "530000", type: "2", name: "普洱市" },
{ adcode: "530900", parentid: "530000", type: "2", name: "临沧市" },
{ adcode: "532300", parentid: "530000", type: "2", name: "楚雄彝族自治州" },
{
adcode: "532500",
parentid: "530000",
type: "2",
name: "红河哈尼族彝族自治州",
},
{
adcode: "532600",
parentid: "530000",
type: "2",
name: "文山壮族苗族自治州",
},
{
adcode: "532800",
parentid: "530000",
type: "2",
name: "西双版纳傣族自治州",
},
{ adcode: "532900", parentid: "530000", type: "2", name: "大理白族自治州" },
{
adcode: "533100",
parentid: "530000",
type: "2",
name: "德宏傣族景颇族自治州",
},
{ adcode: "533300", parentid: "530000", type: "2", name: "怒江傈僳族自治州" },
{ adcode: "533400", parentid: "530000", type: "2", name: "迪庆藏族自治州" },
{ adcode: "540000", parentid: "86", type: "1", name: "西藏自治区" },
{ adcode: "540100", parentid: "540000", type: "2", name: "拉萨市" },
{ adcode: "542100", parentid: "540000", type: "2", name: "昌都地区" },
{ adcode: "542200", parentid: "540000", type: "2", name: "山南地区" },
{ adcode: "542300", parentid: "540000", type: "2", name: "日喀则地区" },
{ adcode: "542400", parentid: "540000", type: "2", name: "那曲地区" },
{ adcode: "542500", parentid: "540000", type: "2", name: "阿里地区" },
{ adcode: "542600", parentid: "540000", type: "2", name: "林芝地区" },
{ adcode: "610000", parentid: "86", type: "1", name: "陕西省" },
{ adcode: "610100", parentid: "610000", type: "2", name: "西安市" },
{ adcode: "610200", parentid: "610000", type: "2", name: "铜川市" },
{ adcode: "610300", parentid: "610000", type: "2", name: "宝鸡市" },
{ adcode: "610400", parentid: "610000", type: "2", name: "咸阳市" },
{ adcode: "610500", parentid: "610000", type: "2", name: "渭南市" },
{ adcode: "610600", parentid: "610000", type: "2", name: "延安市" },
{ adcode: "610700", parentid: "610000", type: "2", name: "汉中市" },
{ adcode: "610800", parentid: "610000", type: "2", name: "榆林市" },
{ adcode: "610900", parentid: "610000", type: "2", name: "安康市" },
{ adcode: "611000", parentid: "610000", type: "2", name: "商洛市" },
{ adcode: "620000", parentid: "86", type: "1", name: "甘肃省" },
{ adcode: "620100", parentid: "620000", type: "2", name: "兰州市" },
{ adcode: "620200", parentid: "620000", type: "2", name: "嘉峪关市" },
{ adcode: "620300", parentid: "620000", type: "2", name: "金昌市" },
{ adcode: "620400", parentid: "620000", type: "2", name: "白银市" },
{ adcode: "620500", parentid: "620000", type: "2", name: "天水市" },
{ adcode: "620600", parentid: "620000", type: "2", name: "武威市" },
{ adcode: "620700", parentid: "620000", type: "2", name: "张掖市" },
{ adcode: "620800", parentid: "620000", type: "2", name: "平凉市" },
{ adcode: "620900", parentid: "620000", type: "2", name: "酒泉市" },
{ adcode: "621000", parentid: "620000", type: "2", name: "庆阳市" },
{ adcode: "621100", parentid: "620000", type: "2", name: "定西市" },
{ adcode: "621200", parentid: "620000", type: "2", name: "陇南市" },
{ adcode: "622900", parentid: "620000", type: "2", name: "临夏回族自治州" },
{ adcode: "630000", parentid: "86", type: "1", name: "青海省" },
{ adcode: "630100", parentid: "630000", type: "2", name: "西宁市" },
{ adcode: "632100", parentid: "630000", type: "2", name: "海东地区" },
{ adcode: "632200", parentid: "630000", type: "2", name: "海北藏族自治州" },
{ adcode: "632300", parentid: "630000", type: "2", name: "黄南藏族自治州" },
{ adcode: "632500", parentid: "630000", type: "2", name: "海南藏族自治州" },
{ adcode: "632600", parentid: "630000", type: "2", name: "果洛藏族自治州" },
{ adcode: "632700", parentid: "630000", type: "2", name: "玉树藏族自治州" },
{
adcode: "632800",
parentid: "630000",
type: "2",
name: "海西蒙古族藏族自治州",
},
{ adcode: "640000", parentid: "86", type: "1", name: "宁夏回族自治区" },
{ adcode: "640100", parentid: "640000", type: "2", name: "银川市" },
{ adcode: "640200", parentid: "640000", type: "2", name: "石嘴山市" },
{ adcode: "640300", parentid: "640000", type: "2", name: "吴忠市" },
{ adcode: "640400", parentid: "640000", type: "2", name: "固原市" },
{ adcode: "640500", parentid: "640000", type: "2", name: "中卫市" },
{ adcode: "650000", parentid: "86", type: "1", name: "新疆维吾尔自治区" },
{ adcode: "650100", parentid: "650000", type: "2", name: "乌鲁木齐市" },
{ adcode: "650200", parentid: "650000", type: "2", name: "克拉玛依市" },
{ adcode: "652100", parentid: "650000", type: "2", name: "吐鲁番地区" },
{ adcode: "652200", parentid: "650000", type: "2", name: "哈密地区" },
{ adcode: "652300", parentid: "650000", type: "2", name: "昌吉回族自治州" },
{
adcode: "652700",
parentid: "650000",
type: "2",
name: "博尔塔拉蒙古自治州",
},
{
adcode: "652800",
parentid: "650000",
type: "2",
name: "巴音郭楞蒙古自治州",
},
{ adcode: "652900", parentid: "650000", type: "2", name: "阿克苏地区" },
{ adcode: "653100", parentid: "650000", type: "2", name: "喀什地区" },
{ adcode: "653200", parentid: "650000", type: "2", name: "和田地区" },
{ adcode: "654200", parentid: "650000", type: "2", name: "塔城地区" },
{ adcode: "654300", parentid: "650000", type: "2", name: "阿勒泰地区" },
{ adcode: "659001", parentid: "650000", type: "2", name: "石河子市" },
{ adcode: "659002", parentid: "650000", type: "2", name: "阿拉尔市" },
{ adcode: "659003", parentid: "650000", type: "2", name: "图木舒克市" },
{ adcode: "659004", parentid: "650000", type: "2", name: "五家渠市" },
{ adcode: "700000", parentid: "86", type: "1", name: "台灣" },
{ adcode: "710000", parentid: "700000", type: "2", name: "台湾省" },
{ adcode: "720000", parentid: "700000", type: "2", name: "台灣福建省" },
{ adcode: "730000", parentid: "700000", type: "2", name: "台灣" },
{ adcode: "740000", parentid: "700000", type: "2", name: "台北市" },
{ adcode: "750000", parentid: "700000", type: "2", name: "高雄市" },
{ adcode: "760000", parentid: "700000", type: "2", name: "新北市" },
{ adcode: "770000", parentid: "700000", type: "2", name: "台中市" },
{ adcode: "780000", parentid: "700000", type: "2", name: "台南市" },
{ adcode: "810000", parentid: "86", type: "1", name: "香港特别行政区" },
{ adcode: "810001", parentid: "810000", type: "2", name: "中西区" },
{ adcode: "810002", parentid: "810000", type: "2", name: "湾仔区" },
{ adcode: "810003", parentid: "810000", type: "2", name: "东区" },
{ adcode: "810004", parentid: "810000", type: "2", name: "南区" },
{ adcode: "810005", parentid: "810000", type: "2", name: "油尖旺区" },
{ adcode: "810006", parentid: "810000", type: "2", name: "深水埗区" },
{ adcode: "810007", parentid: "810000", type: "2", name: "九龙城区" },
{ adcode: "810008", parentid: "810000", type: "2", name: "黄大仙区" },
{ adcode: "810009", parentid: "810000", type: "2", name: "观塘区" },
{ adcode: "810010", parentid: "810000", type: "2", name: "荃湾区" },
{ adcode: "810011", parentid: "810000", type: "2", name: "屯门区" },
{ adcode: "810012", parentid: "810000", type: "2", name: "元朗区" },
{ adcode: "810013", parentid: "810000", type: "2", name: "北区" },
{ adcode: "810014", parentid: "810000", type: "2", name: "大埔区" },
{ adcode: "810015", parentid: "810000", type: "2", name: "西贡区" },
{ adcode: "810016", parentid: "810000", type: "2", name: "沙田区" },
{ adcode: "810017", parentid: "810000", type: "2", name: "葵青区" },
{ adcode: "810018", parentid: "810000", type: "2", name: "离岛区" },
{ adcode: "820000", parentid: "86", type: "1", name: "澳门特别行政区" },
{ adcode: "820001", parentid: "820000", type: "2", name: "花地玛堂区" },
{ adcode: "820002", parentid: "820000", type: "2", name: "花王堂区" },
{ adcode: "820003", parentid: "820000", type: "2", name: "望德堂区" },
{ adcode: "820004", parentid: "820000", type: "2", name: "大堂区" },
{ adcode: "820005", parentid: "820000", type: "2", name: "风顺堂区" },
{ adcode: "820006", parentid: "820000", type: "2", name: "嘉模堂区" },
{ adcode: "820007", parentid: "820000", type: "2", name: "路氹城" },
{ adcode: "820008", parentid: "820000", type: "2", name: "圣方济各堂区" },
];
export default ADCODE;
import axios from "axios"; import axios from "axios";
import { Dialog } from "vant"; import { Dialog } from "vant";
import store from "@/store"; import store from "@/store";
import wx from "wx";
// 测试 https://eshield.test.glsx.com.cn // 测试 https://eshield.test.glsx.com.cn
// 开发 https://eshield.dev.glsx.com.cn // 开发 https://eshield.dev.glsx.com.cn
// 线上 // 线上
const BASE_URL = "https://eshield.dev.glsx.com.cn"; /* eslint-disable */
const BASE_URL = process.env.NODE_ENV == "development" ? "/api" : location.origin;
const instance = axios.create({ const instance = axios.create({
// 创建axios实例,在这里可以设置请求的默认配置 // 创建axios实例,在这里可以设置请求的默认配置
timeout: 10 * 60 * 1000, // 设置超时时间60s timeout: 10 * 60 * 1000, // 设置超时时间60s
...@@ -40,18 +42,24 @@ instance.interceptors.request.use( ...@@ -40,18 +42,24 @@ instance.interceptors.request.use(
instance.interceptors.response.use( instance.interceptors.response.use(
(response) => { (response) => {
store.commit("hideLoading"); store.commit("hideLoading");
const serverCode = response.data.code, const serverCode = response.data.code;
token = response.headers["authorization"];
if (token || token === "") {
localStorage.setItem("token", token);
}
if (serverCode === 200) { if (serverCode === 200) {
if (response.status) { if (response.status) {
return Promise.resolve(response); return Promise.resolve(response);
} }
return Promise.resolve(response.data); return Promise.resolve(response.data);
} else { } else {
Dialog({ message: response.data.message }); Dialog.confirm({
message: response.data.message,
showCancelButton: false
}).then(() => {
if (serverCode == 603 || serverCode == 604) { // 登录失效
localStorage.removeItem("token");
wx.miniProgram.reLaunch({
url: `../../pages/login/index?isLoginOut=true`,
});
}
});
return Promise.reject(response.data.message); return Promise.reject(response.data.message);
} }
}, },
......
let map = null;
function MapService() {
map = null;
}
MapService.prototype = {
init: (id) => {
map = new window.AMap.Map(id);
return map;
},
// 卫星地图切换
satelEvent: (satelActive) => {
let layers = map.getLayers();
let satelLayer = [new window.AMap.TileLayer.Satellite()];
let flag = true;
layers.filter((val) => {
if (val.CLASS_NAME === "AMap.TileLayer.Satellite") {
satelActive.value = false;
flag = false;
map.remove(satelLayer);
}
});
if (flag) {
satelActive.value = true;
map.add(satelLayer);
}
},
// 获取定位
getLocationEvent: (currMarker) => {
map.plugin("AMap.Geolocation", function () {
var geolocation = new window.AMap.Geolocation({
enableHighAccuracy: true,
timeout: 10000,
buttonOffset: new window.AMap.Pixel(10, 20),
zoomToAccuracy: true,
buttonPosition: "RB",
});
geolocation.getCurrentPosition();
window.AMap.event.addListener(geolocation, "complete", (data) => {
if (currMarker) {
currMarker.setMap(null);
}
currMarker = new window.AMap.Marker({
position: data.position,
content: '<span class="curr-marker"></span>',
map: map,
offset: new window.AMap.Pixel(-12, -12),
});
map.setFitView();
});
window.AMap.event.addListener(geolocation, "error", () => {});
});
},
// 切换路况
roadStatusEvent: (roadActive) => {
let layers = map.getLayers();
let roadLayer = [new window.AMap.TileLayer.Traffic()];
let flag = true;
layers.filter((val) => {
if (val.CLASS_NAME === "AMap.TileLayer.Traffic") {
roadActive.value = false;
flag = false;
map.remove(roadLayer);
}
});
if (flag) {
roadActive.value = true;
map.add(roadLayer);
}
},
// 地图放大
mapPlusEvent: () => {
map.zoomIn();
},
// 地图缩小
mapMinusEvent: () => {
map.zoomOut();
},
// 刷新
refresheEvent: (context) => {
context.emit("refreshCb", map);
},
};
const mapService = new MapService();
export default mapService;
...@@ -3,17 +3,16 @@ import { ...@@ -3,17 +3,16 @@ import {
List, List,
Search, Search,
Overlay, Overlay,
Picker, Tab,
Tabs,
Icon, Icon,
Button, Button,
DatetimePicker, DatetimePicker,
Progress,
RadioGroup,
Radio,
Slider,
DropdownMenu,
Field, Field,
Switch, Switch,
Cell,
Loading,
NoticeBar,
} from "vant"; } from "vant";
export function vant(app) { export function vant(app) {
...@@ -21,15 +20,14 @@ export function vant(app) { ...@@ -21,15 +20,14 @@ export function vant(app) {
app.use(List); app.use(List);
app.use(Search); app.use(Search);
app.use(Overlay); app.use(Overlay);
app.use(Picker);
app.use(Icon); app.use(Icon);
app.use(Button); app.use(Button);
app.use(DatetimePicker); app.use(DatetimePicker);
app.use(Progress);
app.use(RadioGroup);
app.use(Radio);
app.use(Slider);
app.use(DropdownMenu);
app.use(Field); app.use(Field);
app.use(Switch); app.use(Switch);
app.use(Tab);
app.use(Tabs);
app.use(Cell);
app.use(Loading);
app.use(NoticeBar);
} }
<template> <template>
<div> <div class="info-content">
<div class="settingControll" @click="showSettingDialog = true"> <button
class="settingControll"
@click="showSettingDialog = true"
v-preventReClick
>
<a class="icon icon-setting-btn"></a> <a class="icon icon-setting-btn"></a>
<span class="setting-text">设置</span> <span class="setting-text">设置</span>
</div> </button>
<popup <popup
:show="showSettingDialog" :show="showSettingDialog"
@btnCancel="showSettingDialog = false" @btnCancel="showSettingDialog = false"
...@@ -16,13 +20,15 @@ ...@@ -16,13 +20,15 @@
> >
<div class="setting-content"> <div class="setting-content">
<div class="type-btn"> <div class="type-btn">
<span <button
:class="selectedTypeItem === index ? 'active' : ''" :class="selectedTypeItem === index ? 'active' : ''"
v-for="(item, index) in fenceTypeList" v-for="(item, index) in fenceTypeList"
:key="index" :key="index"
@click="changeFenceType(index)" @click="changeFenceType(index)"
>{{ item }}</span v-preventReClick
> >
{{ item }}
</button>
</div> </div>
<div class="type-box" v-if="selectedTypeItem === 0"> <div class="type-box" v-if="selectedTypeItem === 0">
<div> <div>
...@@ -39,20 +45,20 @@ ...@@ -39,20 +45,20 @@
<div class="type-box" v-if="selectedTypeItem === 1"> <div class="type-box" v-if="selectedTypeItem === 1">
<div> <div>
<span class="label">{{ fenceTypeList[selectedTypeItem] }}</span> <span class="label">{{ fenceTypeList[selectedTypeItem] }}</span>
<a @click="changeProviceCity(1)" <button @click="changeProviceCity(1)" v-preventReClick>
><span <span
class="radio" class="radio"
:class="proviceCityType === 1 ? 'active' : ''" :class="proviceCityType === 1 ? 'active' : ''"
></span ></span
><span>跨省</span></a ><span>跨省</span>
> </button>
<a @click="changeProviceCity(2)" <button @click="changeProviceCity(2)" v-preventReClick>
><span <span
class="radio" class="radio"
:class="proviceCityType === 2 ? 'active' : ''" :class="proviceCityType === 2 ? 'active' : ''"
></span ></span
><span>跨市</span></a ><span>跨市</span>
> </button>
</div> </div>
</div> </div>
</div> </div>
...@@ -67,10 +73,10 @@ ...@@ -67,10 +73,10 @@
<script> <script>
import { defineComponent, onMounted, ref } from "vue"; import { defineComponent, onMounted, ref } from "vue";
import mapContent from "@/components/mapContent.vue"; import mapContent from "@/components/mapContent.vue";
import popup from "@/components/popup.vue";
import AMapLoader from "@amap/amap-jsapi-loader"; import AMapLoader from "@amap/amap-jsapi-loader";
import { CONSTANT } from "../constant"; import { CONSTANT } from "../constant";
import { Toast, Dialog } from "vant"; import { Toast, Dialog } from "vant";
import ADCODE from "@/utils/adcode";
import { useRoute } from "vue-router"; import { useRoute } from "vue-router";
import "vant/es/toast/style"; import "vant/es/toast/style";
import { GET_CAR_LOCATION_INFO, ADD_FENCE } from "@/api/index"; import { GET_CAR_LOCATION_INFO, ADD_FENCE } from "@/api/index";
...@@ -78,6 +84,7 @@ export default defineComponent({ ...@@ -78,6 +84,7 @@ export default defineComponent({
name: "FencePage", name: "FencePage",
components: { components: {
mapContent, mapContent,
popup,
}, },
setup() { setup() {
const mapContentRefs = ref(null); const mapContentRefs = ref(null);
...@@ -94,6 +101,7 @@ export default defineComponent({ ...@@ -94,6 +101,7 @@ export default defineComponent({
const routeQuery = route.query; const routeQuery = route.query;
const hasRadiusFence = ref(false); const hasRadiusFence = ref(false);
const hasProviceCityFence = ref(false); const hasProviceCityFence = ref(false);
const adcodeItemName = ref(null);
let district = null; let district = null;
onMounted(() => { onMounted(() => {
AMapLoader.load({ AMapLoader.load({
...@@ -110,7 +118,18 @@ export default defineComponent({ ...@@ -110,7 +118,18 @@ export default defineComponent({
}); });
}); });
// 地图刷新 // 地图刷新
const refreshCb = () => {}; const refreshCb = (map) => {
map.clearMap();
getData(map);
if (hasRadiusFence.value) {
createCircle(currLnglat.value, radiusNum.value);
createPoint(currLnglat.value);
}
if (hasProviceCityFence.value && adcodeItemName.value) {
coverArea(adcodeItemName.value, map);
}
map.setFitView();
};
// 切换围栏类型 // 切换围栏类型
const changeFenceType = (index) => { const changeFenceType = (index) => {
selectedTypeItem.value = index; selectedTypeItem.value = index;
...@@ -130,6 +149,7 @@ export default defineComponent({ ...@@ -130,6 +149,7 @@ export default defineComponent({
val["gpsLocation"].elng, val["gpsLocation"].elng,
val["gpsLocation"].elat val["gpsLocation"].elat
); );
drawMarker(currLnglat.value);
}); });
} else { } else {
Dialog({ message: "暂无数据" }); Dialog({ message: "暂无数据" });
...@@ -160,7 +180,6 @@ export default defineComponent({ ...@@ -160,7 +180,6 @@ export default defineComponent({
currentMap = currentMap currentMap = currentMap
? currentMap ? currentMap
: mapContentRefs.value.init("fenceContainer"); : mapContentRefs.value.init("fenceContainer");
drawMarker(currLnglat.value);
currentMap.setFitView(); currentMap.setFitView();
showSettingDialog.value = false; showSettingDialog.value = false;
hasRadiusFence.value = true; hasRadiusFence.value = true;
...@@ -172,13 +191,9 @@ export default defineComponent({ ...@@ -172,13 +191,9 @@ export default defineComponent({
} }
if (selectedTypeItem.value === 1 && proviceCityType.value) { if (selectedTypeItem.value === 1 && proviceCityType.value) {
getAdcodeByLatlng(currLnglat.value, (obj) => { getAdcodeByLatlng(currLnglat.value, (obj) => {
var adcodeItem = filterAdcodeObj(obj.adcode);
if (proviceCityType.value != adcodeItem.type) {
adcodeItem = filterAdcodeObj(adcodeItem.parentid);
}
ADD_FENCE({ ADD_FENCE({
shapeType: 4, shapeType: 4,
areaCode: adcodeItem.adcode, areaCode: obj.adcode,
lnglat: currLnglat.value.lng + "," + currLnglat.value.lat, lnglat: currLnglat.value.lng + "," + currLnglat.value.lat,
sn: routeQuery.sn, sn: routeQuery.sn,
}).then((res) => { }).then((res) => {
...@@ -186,7 +201,8 @@ export default defineComponent({ ...@@ -186,7 +201,8 @@ export default defineComponent({
Toast( Toast(
`设定${proviceCityType.value === 1 ? "跨省" : "跨市"}围栏成功` `设定${proviceCityType.value === 1 ? "跨省" : "跨市"}围栏成功`
); );
coverArea(adcodeItem.name, currentMap); adcodeItemName.value = obj.adName;
coverArea(obj.adName, currentMap);
currentMap.setFitView(); currentMap.setFitView();
hasProviceCityFence.value = true; hasProviceCityFence.value = true;
} }
...@@ -234,12 +250,24 @@ export default defineComponent({ ...@@ -234,12 +250,24 @@ export default defineComponent({
if (geocoderValue.value) { if (geocoderValue.value) {
var lnglatXY = [currLnglat.lng, currLnglat.lat]; var lnglatXY = [currLnglat.lng, currLnglat.lat];
geocoderValue.value.getAddress(lnglatXY, function (status, result) { geocoderValue.value.getAddress(lnglatXY, function (status, result) {
var _adcode = ""; let _adcode = "";
let _adName = "";
if (status === "complete" && result.info === "OK") { if (status === "complete" && result.info === "OK") {
_adcode = result.regeocode.addressComponent.adcode; _adcode = result.regeocode.addressComponent.adcode;
_adcode = _adcode.substr(0, 4) + "00"; _adName =
proviceCityType.value == 1
? result.regeocode.addressComponent.province
: proviceCityType.value == 2
? result.regeocode.addressComponent.city
: "";
_adcode =
proviceCityType.value == 1
? _adcode.substr(0, 2) + "0000"
: proviceCityType.value == 2
? _adcode.substr(0, 4) + "00"
: "";
} }
cb({ adcode: _adcode }); cb({ adcode: _adcode, adName: _adName });
}); });
} else { } else {
setTimeout(function () { setTimeout(function () {
...@@ -247,17 +275,6 @@ export default defineComponent({ ...@@ -247,17 +275,6 @@ export default defineComponent({
}, 500); }, 500);
} }
}; };
// 省市区code过滤
const filterAdcodeObj = (adcode) => {
adcode = adcode.toString().substr(0, 4) + "00";
for (var i = 0, len = ADCODE.length; i < len; i++) {
var item = ADCODE[i];
if (adcode == item.adcode) {
return item;
}
}
return null;
};
// 添加标记 // 添加标记
const drawMarker = (currLnglat) => { const drawMarker = (currLnglat) => {
new window.AMap.Marker({ new window.AMap.Marker({
...@@ -269,6 +286,7 @@ export default defineComponent({ ...@@ -269,6 +286,7 @@ export default defineComponent({
map: currentMap, map: currentMap,
offset: new window.AMap.Pixel(-17, -26), offset: new window.AMap.Pixel(-17, -26),
}); });
currentMap.setFitView();
}; };
// 地图添加圆 // 地图添加圆
const createCircle = (lnglat, radius) => { const createCircle = (lnglat, radius) => {
...@@ -319,6 +337,7 @@ export default defineComponent({ ...@@ -319,6 +337,7 @@ export default defineComponent({
createCircle, createCircle,
hasRadiusFence, hasRadiusFence,
hasProviceCityFence, hasProviceCityFence,
adcodeItemName,
}; };
}, },
}); });
...@@ -336,6 +355,8 @@ export default defineComponent({ ...@@ -336,6 +355,8 @@ export default defineComponent({
flex-flow: column; flex-flow: column;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
box-shadow: 0px 5px 12px 0px rgba(0, 0, 0, 0.12);
border-radius: 6px;
.setting-text { .setting-text {
font-size: 16px; font-size: 16px;
display: inline-block; display: inline-block;
...@@ -343,7 +364,8 @@ export default defineComponent({ ...@@ -343,7 +364,8 @@ export default defineComponent({
} }
} }
.setting-content { .setting-content {
width: calc(100% - 32px); box-sizing: border-box;
width: 100%;
height: 100%; height: 100%;
padding: 10px 16px; padding: 10px 16px;
font-size: 14px; font-size: 14px;
...@@ -353,7 +375,7 @@ export default defineComponent({ ...@@ -353,7 +375,7 @@ export default defineComponent({
color: #111; color: #111;
font-weight: var(--van-font-weight-bold); font-weight: var(--van-font-weight-bold);
display: flex; display: flex;
span { button {
flex: 1; flex: 1;
border-radius: 5px; border-radius: 5px;
height: 36px; height: 36px;
...@@ -362,7 +384,7 @@ export default defineComponent({ ...@@ -362,7 +384,7 @@ export default defineComponent({
text-align: center; text-align: center;
line-height: 36px; line-height: 36px;
} }
span.active { button.active {
height: 34px; height: 34px;
line-height: 34px; line-height: 34px;
color: var(--base-color); color: var(--base-color);
...@@ -387,8 +409,9 @@ export default defineComponent({ ...@@ -387,8 +409,9 @@ export default defineComponent({
background: #f0f2f5; background: #f0f2f5;
border-radius: 4px; border-radius: 4px;
line-height: 40px; line-height: 40px;
margin-bottom: 0 !important;
} }
a { button {
display: flex; display: flex;
align-items: center; align-items: center;
margin-left: 15px; margin-left: 15px;
......
...@@ -11,14 +11,15 @@ ...@@ -11,14 +11,15 @@
<div class="content" v-if="openFreq"> <div class="content" v-if="openFreq">
<span class="title-text">选择模式</span> <span class="title-text">选择模式</span>
<div class="middle"> <div class="middle">
<span <button
v-for="(item, index) in typeList" v-for="(item, index) in typeList"
:key="index" :key="index"
@click="changeType(index)" @click="changeType(index)"
v-preventReClick
> >
<span class="radio" :class="type === index ? 'active' : ''"></span> <span class="radio" :class="type === index ? 'active' : ''"></span>
<span>{{ item }}</span> <span>{{ item }}</span>
</span> </button>
</div> </div>
<!-- 追车模式 --> <!-- 追车模式 -->
<div class="chas-car-content bottom" v-if="type === 0"> <div class="chas-car-content bottom" v-if="type === 0">
...@@ -36,49 +37,67 @@ ...@@ -36,49 +37,67 @@
<!-- 闹钟模式 --> <!-- 闹钟模式 -->
<div class="clock-content bottom" v-if="type === 1"> <div class="clock-content bottom" v-if="type === 1">
<div v-for="(item, index) in clockList" :key="index" class="clock-item"> <div v-for="(item, index) in clockList" :key="index" class="clock-item">
<span class="cont-left" @click="changeClockCheck(index)"> <button
class="cont-left"
@click="changeClockCheck(index)"
v-preventReClick
>
<svg-icon <svg-icon
:icon-class="item.checked ? 'checked' : 'check'" :icon-class="item.checked ? 'checked' : 'check'"
class="check-class" class="check-class"
></svg-icon> ></svg-icon>
<span class="lable">{{ item.name }}</span> <span class="lable">{{ item.name }}</span>
</span> </button>
<span class="cont-right" @click="onShowTimePicker(1, index)"> <button
class="cont-right"
@click="onShowTimePicker(1, index)"
v-preventReClick
>
<svg-icon icon-class="clock" class="clock-class"></svg-icon> <svg-icon icon-class="clock" class="clock-class"></svg-icon>
<span> <span>
{{ item.time }} {{ item.time }}
</span> </span>
</span> </button>
</div> </div>
</div> </div>
<!-- 星期模式 --> <!-- 星期模式 -->
<div class="week-content bottom" v-if="type === 2"> <div class="week-content bottom" v-if="type === 2">
<div class="week-top"> <div class="week-top">
<span <button
v-for="(item, index) in weekCheckboxItems" v-for="(item, index) in weekCheckboxItems"
:key="index" :key="index"
class="week-item" class="week-item"
@click="changeWeekCheck(index)" @click="changeWeekCheck(index)"
v-preventReClick
> >
<svg-icon <svg-icon
:icon-class="item.checked ? 'checked' : 'check'" :icon-class="item.checked ? 'checked' : 'check'"
class="check-class" class="check-class"
></svg-icon> ></svg-icon>
<span class="lable">{{ item.name }}</span> <span class="lable">{{ item.name }}</span>
</span> </button>
</div> </div>
<div class="time-cont"> <div class="time-cont">
<span class="label">上点时间</span> <span class="label">上点时间</span>
<span class="cont-right" @click="onShowTimePicker(2, weekSelectTime)"> <button
class="cont-right"
@click="onShowTimePicker(2, weekSelectTime)"
v-preventReClick
>
<svg-icon icon-class="clock" class="clock-class"></svg-icon> <svg-icon icon-class="clock" class="clock-class"></svg-icon>
<span> <span>
{{ weekSelectTime }} {{ weekSelectTime }}
</span> </span>
</span> </button>
</div> </div>
</div> </div>
<van-button class="save-btn" type="primary" @click="onSave" block <van-button
class="save-btn"
type="primary"
@click="onSave"
block
v-preventReClick
>保存</van-button >保存</van-button
> >
</div> </div>
...@@ -93,16 +112,15 @@ ...@@ -93,16 +112,15 @@
v-model="currentTime" v-model="currentTime"
class="time-picker" class="time-picker"
type="time" type="time"
title="选择时间"
:show-toolbar="false"
:filter="filter" :filter="filter"
@change="changeTime" @confirm="changeTime"
ref="dateTimePicker"
/> />
</popup> </popup>
</div> </div>
</template> </template>
<script> <script>
import { defineComponent, onMounted, ref } from "vue"; import { defineComponent, onMounted, ref, watch, nextTick } from "vue";
import { Toast } from "vant"; import { Toast } from "vant";
import "vant/es/toast/style"; import "vant/es/toast/style";
import popup from "@/components/popup.vue"; import popup from "@/components/popup.vue";
...@@ -114,7 +132,7 @@ export default defineComponent({ ...@@ -114,7 +132,7 @@ export default defineComponent({
popup, popup,
}, },
setup() { setup() {
const openFreq = ref(true); const openFreq = ref(false);
const type = ref(0); const type = ref(0);
const route = useRoute(); const route = useRoute();
let routeQuery = route.query; let routeQuery = route.query;
...@@ -141,6 +159,7 @@ export default defineComponent({ ...@@ -141,6 +159,7 @@ export default defineComponent({
const columns = ref([]); const columns = ref([]);
const showTimePicker = ref(false); const showTimePicker = ref(false);
const selectedId = ref(null); const selectedId = ref(null);
const dateTimePicker = ref(null);
onMounted(() => { onMounted(() => {
// 获取已设置调频数据 // 获取已设置调频数据
getInfoData(); getInfoData();
...@@ -148,10 +167,10 @@ export default defineComponent({ ...@@ -148,10 +167,10 @@ export default defineComponent({
const getInfoData = () => { const getInfoData = () => {
GET_FREQ_INFO({ sn: routeQuery.sn }).then((res) => { GET_FREQ_INFO({ sn: routeQuery.sn }).then((res) => {
if (res.code === 200) { if (res.code === 200) {
res; if ((res.data && res.data.type === 3) || !res.data) {
if (!res.data.type.toString()) {
openFreq.value = false; openFreq.value = false;
} else { } else {
openFreq.value = true;
type.value = res.data.type; type.value = res.data.type;
switch (res.data.type) { switch (res.data.type) {
case 0: case 0:
...@@ -160,8 +179,12 @@ export default defineComponent({ ...@@ -160,8 +179,12 @@ export default defineComponent({
case 1: case 1:
res.data.timer && res.data.timer &&
res.data.timer.split(",").forEach((val, index) => { res.data.timer.split(",").forEach((val, index) => {
if (val != "NA") {
clockList.value[index].checked = true; clockList.value[index].checked = true;
clockList.value[index].time = val; clockList.value[index].time = val;
} else {
clockList.value[index].checked = false;
}
}); });
break; break;
case 2: case 2:
...@@ -180,10 +203,10 @@ export default defineComponent({ ...@@ -180,10 +203,10 @@ export default defineComponent({
} }
}); });
}; };
// 切换模式 watch(
const changeType = (index) => { () => type.value,
type.value = index; (newVal) => {
switch (index) { switch (newVal) {
case 0: case 0:
Toast("适用于收车场景,指定设备每隔几分钟更新定位信息。"); Toast("适用于收车场景,指定设备每隔几分钟更新定位信息。");
break; break;
...@@ -194,6 +217,11 @@ export default defineComponent({ ...@@ -194,6 +217,11 @@ export default defineComponent({
Toast("适用于日常场景,可按需设置每周的设备回传次数。"); Toast("适用于日常场景,可按需设置每周的设备回传次数。");
break; break;
} }
}
);
// 切换模式
const changeType = (index) => {
type.value = index;
}; };
// 闹钟模式选择 // 闹钟模式选择
const changeClockCheck = (index) => { const changeClockCheck = (index) => {
...@@ -217,7 +245,7 @@ export default defineComponent({ ...@@ -217,7 +245,7 @@ export default defineComponent({
// 闹钟模式 // 闹钟模式
if (num === 1) { if (num === 1) {
selectedId.value = data; selectedId.value = data;
let time = clockList.value[data].value; let time = clockList.value[data].time;
currentTime.value = time; currentTime.value = time;
selectTime.value = time; selectTime.value = time;
} }
...@@ -236,20 +264,24 @@ export default defineComponent({ ...@@ -236,20 +264,24 @@ export default defineComponent({
}; };
// 时间选择确定 // 时间选择确定
const saveTime = () => { const saveTime = () => {
nextTick(() => {
let confirmBtn = dateTimePicker.value.$el.children[0].children[1];
confirmBtn.click();
});
showTimePicker.value = false;
};
const changeTime = (e) => {
selectTime.value = e;
if (type.value === 1) { if (type.value === 1) {
clockList.value.forEach((val, index) => { clockList.value.forEach((val, index) => {
if (index === selectedId.value) { if (index === selectedId.value) {
val.value = selectTime.value; val.time = e;
} }
}); });
} }
if (type.value === 2) { if (type.value === 2) {
weekSelectTime.value = selectTime.value; weekSelectTime.value = e;
} }
showTimePicker.value = false;
};
const changeTime = (e) => {
selectTime.value = e;
}; };
// 开启关闭调频 // 开启关闭调频
const switchOnChange = (e) => { const switchOnChange = (e) => {
...@@ -257,6 +289,25 @@ export default defineComponent({ ...@@ -257,6 +289,25 @@ export default defineComponent({
CLOSE_FREQ({ sn: routeQuery.sn }).then((res) => { CLOSE_FREQ({ sn: routeQuery.sn }).then((res) => {
if (res.code === 200) { if (res.code === 200) {
Toast("关闭调频成功"); Toast("关闭调频成功");
// 重置默认的调频数据
clockList.value = [
{ name: "第一组", time: "08:00", checked: true },
{ name: "第二组", time: "12:00" },
{ name: "第三组", time: "18:00" },
{ name: "第四组", time: "22:00" },
];
type.value = 0;
minuteNum.value = null;
weekCheckboxItems.value = [
{ name: "周一", id: "1", checked: true },
{ name: "周二", id: "2" },
{ name: "周三", id: "3" },
{ name: "周四", id: "4" },
{ name: "周五", id: "5" },
{ name: "周六", id: "6" },
{ name: "周日", id: "7" },
];
weekSelectTime.value = "10:00";
} }
}); });
} }
...@@ -273,23 +324,31 @@ export default defineComponent({ ...@@ -273,23 +324,31 @@ export default defineComponent({
if ( if (
!/^\d{1,3}$/.test(minuteNum.value) || !/^\d{1,3}$/.test(minuteNum.value) ||
minuteNum.value < 1 || minuteNum.value < 1 ||
minuteNum.value > 999 minuteNum.value > 5
) { ) {
return Toast("请输入1~999之间的数字"); return Toast("请输入1~5之间的数字");
} }
break; break;
case 1: case 1:
// eslint-disable-next-line no-case-declarations // eslint-disable-next-line no-case-declarations
let arr = []; let arr = [[], []];
clockList.value.forEach((val) => { clockList.value.forEach((val) => {
arr[0].push(val.checked ? val.time : "NA");
if (val.checked) { if (val.checked) {
arr.push(val.time); arr[1].push(val.time);
} }
}); });
if (arr.length <= 0) { if (arr[1].length <= 0) {
return Toast("请至少选择一组模式"); return Toast("请至少选择一组模式");
} }
OParams.timer = arr.join(","); // eslint-disable-next-line no-case-declarations
// let timeArr = clockList.value.map((item) => item.time);
// eslint-disable-next-line no-case-declarations
let timeArrSet = new Set(arr[1]);
if (arr[1].length != timeArrSet.size) {
return Toast("每组模式时间不可相同");
}
OParams.timer = arr[0].join(",");
break; break;
case 2: case 2:
// eslint-disable-next-line no-case-declarations // eslint-disable-next-line no-case-declarations
...@@ -336,21 +395,28 @@ export default defineComponent({ ...@@ -336,21 +395,28 @@ export default defineComponent({
onSave, onSave,
switchOnChange, switchOnChange,
getInfoData, getInfoData,
dateTimePicker,
}; };
}, },
}); });
</script> </script>
<style lang="scss">
.van-picker__toolbar {
display: none;
}
</style>
<style lang="scss" scoped> <style lang="scss" scoped>
.freq-page { .freq-page {
position: fixed; box-sizing: border-box;
width: calc(100% - 20px); width: 100%;
padding: 16px 10px; padding: 16px 10px;
height: 100%; height: 100%;
overflow: auto;
background: #f5f6f7; background: #f5f6f7;
color: #111; color: #111;
.top { .top {
width: calc(100% - 32px); box-sizing: border-box;
width: 100%;
height: 52px; height: 52px;
border-radius: 8px; border-radius: 8px;
padding: 0 16px; padding: 0 16px;
...@@ -367,7 +433,8 @@ export default defineComponent({ ...@@ -367,7 +433,8 @@ export default defineComponent({
margin: 16px 0 8px 24px; margin: 16px 0 8px 24px;
} }
.middle { .middle {
width: calc(100% - 32px); box-sizing: border-box;
width: 100%;
height: 52px; height: 52px;
border-radius: 8px; border-radius: 8px;
padding: 0 16px; padding: 0 16px;
...@@ -375,7 +442,7 @@ export default defineComponent({ ...@@ -375,7 +442,7 @@ export default defineComponent({
display: flex; display: flex;
align-items: center; align-items: center;
font-size: 14px; font-size: 14px;
span { button {
flex: 1; flex: 1;
display: flex; display: flex;
align-items: center; align-items: center;
...@@ -396,7 +463,8 @@ export default defineComponent({ ...@@ -396,7 +463,8 @@ export default defineComponent({
} }
} }
.bottom { .bottom {
width: calc(100% - 32px); box-sizing: border-box;
width: 100%;
padding: 24px 16px; padding: 24px 16px;
border-radius: 8px; border-radius: 8px;
margin-top: 16px; margin-top: 16px;
......
<template> <template>
<div> <div @click="isShowList = false">
<mapContent <mapContent
@refreshCb="refreshCb" @refreshCb="refreshCb"
@isUploaded="isUploaded" @isUploaded="isUploaded"
...@@ -9,19 +9,38 @@ ...@@ -9,19 +9,38 @@
<div id="container" class="map-container index-map"></div> <div id="container" class="map-container index-map"></div>
</template> </template>
</mapContent> </mapContent>
<van-notice-bar
class="share-tip"
mode="closeable"
v-if="isSharePage"
text="此分享功能请在有效时间内使用,详情联系分享者"
@close="closeNotice"
>
<template #left-icon>
<span class="icon icon-warning"></span>
</template>
</van-notice-bar>
<!-- 搜索区域 --> <!-- 搜索区域 -->
<div class="search-box" v-if="mapIsUploaded"> <div
class="search-box"
:class="isSharePage && showNotice ? 'search-box-top' : ''"
@click.stop
>
<div class="search-header"> <div class="search-header">
<div <div
class="select-box" class="select-box"
:class="carItem ? 'text' : ''" :class="carItem ? 'text' : ''"
@click="isShowList = !isShowList" @click="isShowList = !isShowList"
> >
<span>{{ <span class="left-text">
carItem <span v-if="!carItem">请选择</span>
? (carItem.ownerName || "--") + " | " + (carItem.vin || "--") <span class="name-text" v-if="carItem">{{
: "请选择" carItem.ownerName || "--"
}}</span> }}</span>
<span v-if="carItem && carItem.licensePlate"
>&nbsp;{{ "| " + (carItem.licensePlate || "--") }}</span
>
</span>
<span class="arrow-icon"><van-icon name="arrow-down" /></span> <span class="arrow-icon"><van-icon name="arrow-down" /></span>
</div> </div>
</div> </div>
...@@ -30,32 +49,75 @@ ...@@ -30,32 +49,75 @@
class="search-input" class="search-input"
v-model="keyWord" v-model="keyWord"
placeholder="输入两位以上关键字搜索" placeholder="输入两位以上关键字搜索"
@search="getCarList(keyWord, true)" @search="getCarList(true)"
/> @clear="getCarList(true)"
>
<template #left-icon>
<span class="icon icon-search"></span>
</template>
</van-search>
<van-list <van-list
class="list-box" class="list-box"
v-model:loading="loading" v-model:loading="loading"
:finished="finished" :finished="finished"
finished-text="没有更多了" finished-text="没有更多了"
offset="150"
@load="getCarList" @load="getCarList"
:immediate-check="false" :immediate-check="false"
> >
<van-cell v-for="item in list" @click="getCarInfo(item)" :key="item"> <van-cell v-for="item in list" @click="getCarInfo(item)" :key="item">
<div <div
class="list-item" class="list-item"
:class="(carItem && carItem.id) == item.id ? 'active' : ''" :class="(carItem && carItem.vin) == item.vin ? 'active' : ''"
> >
<!-- <i v-if="item.offLineDuration" class="icon icon-off-line"></i> <div class="item-text">
<i v-else class="icon icon-on-line"></i> --> <div class="item-title">
<div class="item-right"> <div class="item-title-left">
<span class="item-text">{{ <div class="item-text-name">
(item.ownerName || "--") + " | " + (item.vin || "--") {{ item.ownerName || "--" }}
}}</span> </div>
<span <div class="item-text-vin">{{ item.vin || "--" }}</div>
v-if="(carItem && carItem.vin) == item.vin" </div>
class="slectedicon" <div
><i class="icon icon-checked"></i v-if="item.licensePlate"
></span> class="item-text-carNum"
:class="
item.licensePlate.length <= 7 ? 'blur-car' : 'green-car'
"
>
{{ item.licensePlate }}
</div>
</div>
<div class="item-text-content">
<div class="item-text-sn">
<span class="sn-item" v-if="item.snArr[0].length">
<span class="label">有线设备</span>
<span class="sn-text">
<span v-for="(val, index) in item.snArr[0]" :key="index"
>{{ val
}}<span v-if="index != item.snArr[0].length - 1"
>、</span
></span
>
</span>
</span>
<span class="sn-item" v-if="item.snArr[1].length">
<span class="label">无线设备</span>
<span class="sn-text">
<span v-for="(val, index) in item.snArr[1]" :key="index"
>{{ val
}}<span v-if="index != item.snArr[1].length - 1"
>、</span
></span
>
</span>
</span>
</div>
<div class="item-text-orderNo">
<span class="label">业务工单号</span>
<span>{{ item.workOrderNo || "--" }}</span>
</div>
</div>
</div> </div>
</div> </div>
</van-cell> </van-cell>
...@@ -73,6 +135,20 @@ ...@@ -73,6 +135,20 @@
</div> </div>
</div> </div>
</div> </div>
<van-overlay
:show="showOverlay"
@click="showOverlay = false"
:z-index="100000"
>
<span class="icon icon-share"></span>
<p class="tip">
点击右上角“&nbsp;<span class="fle"
><span class="sharebtn"></span><span class="sharebtn middle"></span
><span class="sharebtn"></span></span
>&nbsp;”转发/分享
</p>
</van-overlay>
</div> </div>
</template> </template>
...@@ -87,7 +163,12 @@ import wx from "wx"; ...@@ -87,7 +163,12 @@ import wx from "wx";
import { useRoute } from "vue-router"; import { useRoute } from "vue-router";
import { Dialog, Toast } from "vant"; import { Dialog, Toast } from "vant";
import "vant/es/toast/style"; import "vant/es/toast/style";
import { GET_ALL_CAR_LIST, GET_CAR_LOCATION_INFO } from "@/api/index"; import moment from "@/utils/moment";
import {
GET_ALL_CAR_LIST,
GET_CAR_LOCATION_INFO,
CHECK_SHARE,
} from "@/api/index";
export default defineComponent({ export default defineComponent({
name: "IndexPage", name: "IndexPage",
components: { components: {
...@@ -101,8 +182,7 @@ export default defineComponent({ ...@@ -101,8 +182,7 @@ export default defineComponent({
const finished = ref(false); const finished = ref(false);
const list = ref([]); const list = ref([]);
const carItem = ref(null); const carItem = ref(null);
const loginUserId = ref(""); const isShareDead = ref(false);
const isShareDead = ref(1);
const carInfoList = ref([]); const carInfoList = ref([]);
const route = useRoute(); const route = useRoute();
const routeQuery = ref(null); const routeQuery = ref(null);
...@@ -111,6 +191,10 @@ export default defineComponent({ ...@@ -111,6 +191,10 @@ export default defineComponent({
const mapIsUploaded = ref(false); const mapIsUploaded = ref(false);
const store = useStore(); const store = useStore();
const ISLOADING = computed(() => store.state.LOADING); const ISLOADING = computed(() => store.state.LOADING);
const showOverlay = ref(false);
const isSharePage = ref(false);
const clickFlag = ref(true);
const showNotice = ref(true);
let map = undefined; let map = undefined;
const refreshCb = () => { const refreshCb = () => {
if (map && carItem.value) { if (map && carItem.value) {
...@@ -121,28 +205,124 @@ export default defineComponent({ ...@@ -121,28 +205,124 @@ export default defineComponent({
} }
}; };
watch(mapIsUploaded, (newVal) => { watch(mapIsUploaded, (newVal) => {
// 被分享者打开直接获取车辆定位数据 localStorage.removeItem("sharePage");
routeQuery.value = route.query;
if (newVal && routeQuery.value.sn) {
if (route.query.token) { if (route.query.token) {
localStorage.setItem("token", route.query.token); localStorage.setItem("token", route.query.token);
} }
if (route.query.sharePage) {
localStorage.setItem("sharePage", JSON.parse(route.query.sharePage));
isSharePage.value = JSON.parse(route.query.sharePage);
}
getCarList();
routeQuery.value = route.query;
if (newVal && routeQuery.value.sn) {
if (route.query.sharePage && JSON.parse(route.query.sharePage)) {
localStorage.setItem("sharePage", JSON.parse(route.query.sharePage));
if (route.query.shareId && route.query.shareId != "undefined") {
// 校验分享链接是否有效
CHECK_SHARE({
shareId:
route.query.shareId && Number(JSON.parse(route.query.shareId)),
}).then((v) => {
if (v.code == 200) {
if (
v.data &&
v.data.setting &&
v.data.setting.enableStatus != 1
) {
isShareDead.value = true;
// Dialog({ message: "该分享无效,请启用后使用" });
} else if (
v.data &&
v.data.setting &&
moment().isAfter(moment(v.data.setting.expirationDate))
) {
isShareDead.value = true;
// Dialog({ message: "该分享已失效" });
} else {
carItem.value = {
sns: routeQuery.value.sn,
ownerName:
routeQuery.value.ownerName == "null" ||
routeQuery.value.ownerName == "undefined"
? "--"
: routeQuery.value.ownerName,
vin:
routeQuery.value.vin == "null" ||
routeQuery.value.vin == "undefined"
? "--"
: routeQuery.value.vin,
licensePlate:
routeQuery.value.licensePlate == "null" ||
routeQuery.value.licensePlate == "undefined"
? undefined
: routeQuery.value.licensePlate,
};
getCarInfo(carItem.value);
}
}
});
} else {
Dialog({ message: "未找到分享ID" });
}
return;
} else {
carItem.value = { carItem.value = {
sns: routeQuery.value.sn, sns: routeQuery.value.sn,
ownerName: ownerName:
routeQuery.value.ownerName == "null" routeQuery.value.ownerName == "null" ||
routeQuery.value.ownerName == "undefined"
? "--" ? "--"
: routeQuery.value.ownerName, : routeQuery.value.ownerName,
vin: routeQuery.value.vin == "null" ? "--" : routeQuery.value.vin, vin:
routeQuery.value.vin == "null" ||
routeQuery.value.vin == "undefined"
? "--"
: routeQuery.value.vin,
licensePlate:
routeQuery.value.licensePlate == "null" ||
routeQuery.value.licensePlate == "undefined"
? undefined
: routeQuery.value.licensePlate,
}; };
getCarInfo(carItem.value); getCarInfo(carItem.value);
} }
}
}); });
onMounted(() => { // 看板跳转 监听sn变化请求数据
getCarList(); watch(
if (route.query.token) { () => route.query,
localStorage.setItem("token", route.query.token); (val) => {
if (val && val.sn) {
carItem.value = {
id: val.id,
sns: val.sn,
ownerName:
val.ownerName == "null" || val.ownerName == "undefined"
? "--"
: val.ownerName,
vin: val.vin == "null" || val.vin == "undefined" ? "--" : val.vin,
licensePlate:
val.licensePlate == "null" || val.licensePlate == "undefined"
? undefined
: val.licensePlate,
};
getCarInfo(carItem.value);
}
} }
);
// watch(isShowList, (newVal) => {
// if (newVal) {
// nextTick(() => {
// let listNode = document.querySelector(".list-box");
// listNode.setAttribute(
// "style",
// `max-height: ${window.innerHeight * 0.8 - 116}px`
// );
// });
// }
// });
onMounted(() => {
AMapLoader.load({ AMapLoader.load({
key: CONSTANT.MAP_KEY, key: CONSTANT.MAP_KEY,
version: "1.4.8", version: "1.4.8",
...@@ -151,10 +331,23 @@ export default defineComponent({ ...@@ -151,10 +331,23 @@ export default defineComponent({
window.AMap = AMap; window.AMap = AMap;
mapContentRefs.value.initMap("container"); mapContentRefs.value.initMap("container");
}); });
initViewport(window.innerHeight);
}); });
const initViewport = (height) => {
var metaEl = document.querySelector("#viewportMeta");
var content =
"height=" +
height +
",width=device-width,initial-scale=1.0,user-scalable=no";
metaEl.setAttribute("name", "viewport");
metaEl.setAttribute("content", content);
};
const isUploaded = (data) => { const isUploaded = (data) => {
mapIsUploaded.value = data; mapIsUploaded.value = data;
}; };
const closeNotice = () => {
showNotice.value = false;
};
const getCarInfo = (it) => { const getCarInfo = (it) => {
carItem.value = it; carItem.value = it;
isShowList.value = false; isShowList.value = false;
...@@ -176,7 +369,9 @@ export default defineComponent({ ...@@ -176,7 +369,9 @@ export default defineComponent({
if ( if (
item.gpsLocation && item.gpsLocation &&
item.gpsLocation.elng && item.gpsLocation.elng &&
item.gpsLocation.elat item.gpsLocation.elat &&
Number(item.gpsLocation.elng) > 0 &&
Number(item.gpsLocation.elat) > 0
) { ) {
locates.push(item.gpsLocation); locates.push(item.gpsLocation);
item.gpsLocation.transferAddress = ""; item.gpsLocation.transferAddress = "";
...@@ -184,7 +379,9 @@ export default defineComponent({ ...@@ -184,7 +379,9 @@ export default defineComponent({
if ( if (
item.bsLocation && item.bsLocation &&
item.bsLocation.elng && item.bsLocation.elng &&
item.bsLocation.elat item.bsLocation.elat &&
Number(item.bsLocation.elng) > 0 &&
Number(item.bsLocation.elat) > 0
) { ) {
locates.push(item.bsLocation); locates.push(item.bsLocation);
item.bsLocation.transferAddress = ""; item.bsLocation.transferAddress = "";
...@@ -192,14 +389,18 @@ export default defineComponent({ ...@@ -192,14 +389,18 @@ export default defineComponent({
if ( if (
item.wifiLocation && item.wifiLocation &&
item.wifiLocation.elng && item.wifiLocation.elng &&
item.wifiLocation.elat item.wifiLocation.elat &&
Number(item.wifiLocation.elng) > 0 &&
Number(item.wifiLocation.elat) > 0
) { ) {
locates.push(item.wifiLocation); locates.push(item.wifiLocation);
item.wifiLocation.transferAddress = ""; item.wifiLocation.transferAddress = "";
} }
markers.push(drawMarker(item, map, locates)); markers.push(drawMarker(item, map, locates));
}); });
if (locates.length <= 0) return; if (locates.length <= 0) {
return Toast("暂无有效定位点信息");
}
MAPGEO.transferAddressByGroup( MAPGEO.transferAddressByGroup(
{ data: locates, timeoutIds: [] }, { data: locates, timeoutIds: [] },
() => { () => {
...@@ -232,12 +433,12 @@ export default defineComponent({ ...@@ -232,12 +433,12 @@ export default defineComponent({
position: lnglat, position: lnglat,
content: content:
item.source == "0" item.source == "0"
? '<span class="icon icon-off-car"></span>' ? '<span class="marker-class"><span class="icon icon-off-car sn-marker"></span><span class="marker-bottom off-line"><span class="outside off-line"></span><span class="inside off-line"></span></span></span>'
: '<span class="icon icon-on-car"></span>', : '<span class="marker-class"><span class="icon icon-on-car sn-marker"></span><span class="marker-bottom on-line"><span class="outside on-line"></span><span class="inside on-line"></span></span></span>',
map: map, map: map,
offset: new window.AMap.Pixel(-13, -18), offset: new window.AMap.Pixel(-26, -18),
}); });
var carInfoWindowTpl = `<div class="car-info-window">`; var carInfoWindowTpl = `<div class="car-info-window"><div class="car-info-content">`;
carInfoWindowTpl += `<div class="main-info">`; carInfoWindowTpl += `<div class="main-info">`;
carInfoWindowTpl += `<h4 class="info-title"><div>${ carInfoWindowTpl += `<h4 class="info-title"><div>${
item.ownerName || "--" item.ownerName || "--"
...@@ -245,15 +446,23 @@ export default defineComponent({ ...@@ -245,15 +446,23 @@ export default defineComponent({
carInfoWindowTpl += `<div class="info-list">`; carInfoWindowTpl += `<div class="info-list">`;
carInfoWindowTpl += `<p class="device-info"><i class="icon icon-device"></i><span class="label">${ carInfoWindowTpl += `<p class="device-info"><i class="icon icon-device"></i><span class="label">${
item.source == 1 ? "有线设备" : "无线设备" item.source == 1 ? "有线设备" : "无线设备"
}</span><span>${item.sn}</span></p>`; }</span><span>${item.sn}</span>`;
if (item[item.locationType].offLineDuration) { if (item.source == 0 && item.battery >= 0) {
carInfoWindowTpl += `<span class="battery">`;
if (item.battery <= 20) {
carInfoWindowTpl += `<span class="all-fill"><span style="width: ${item.battery}%;" class="fill empty"></span></span><span class="icon icon-battery-empty"></span><span class="battery-text empty">${item.battery}%</span>`;
} else {
carInfoWindowTpl += `<span class="all-fill"><span style="width: ${item.battery}%;" class="fill enough"></span></span><span class="icon icon-battery-enough"></span><span class="battery-text enough">${item.battery}%</span>`;
}
carInfoWindowTpl += `</span>`;
}
carInfoWindowTpl += `</p>`;
if (item.status && item.status == 2) {
carInfoWindowTpl += `<p class="offline-info"><i class="icon icon-offline-time"></i><span class="label">离线时长</span><span>${ carInfoWindowTpl += `<p class="offline-info"><i class="icon icon-offline-time"></i><span class="label">离线时长</span><span>${
item[item.locationType].offLineDuration item.statusTime || "--"
}</span></p>`; }</span></p>`;
} }
carInfoWindowTpl += `<p class="time-info"><i class="icon icon-online-time"></i><span class="label">在线时间</span><span>${ carInfoWindowTpl += `<p class="time-info"><i class="icon icon-online-time"></i><span class="label">在线时间</span><span data-onlineTime></span></p>
item[item.locationType].dateTime
}</span></p>
<p class="locate-info"><i class="icon icon-locate-sm"></i><span class="label">详细地址</span><span data-tranferAddress></span></p>`; <p class="locate-info"><i class="icon icon-locate-sm"></i><span class="label">详细地址</span><span data-tranferAddress></span></p>`;
if (item.hasWifi) { if (item.hasWifi) {
carInfoWindowTpl += `<p p class="list-info" > <i class="icon icon-typeList"></i><span class="label">定位类型</span> carInfoWindowTpl += `<p p class="list-info" > <i class="icon icon-typeList"></i><span class="label">定位类型</span>
...@@ -271,15 +480,16 @@ export default defineComponent({ ...@@ -271,15 +480,16 @@ export default defineComponent({
</div> </div>
<div class="cmd-list"> <div class="cmd-list">
<div class="cmd-list-top"> <div class="cmd-list-top">
<a data-car-location>车辆追踪</a> <button data-car-location>车辆追踪</button>
<a data-replay>轨迹回放</a> <button data-replay>轨迹回放</button>
<a data-resident>常驻地</a> <button data-resident>常驻地</button>
<a data-monitor>实时监控</a> <button data-monitor>实时监控</button>
</div> </div>
<div class="cmd-list-bottom"> <div class="cmd-list-bottom">
<a data-freq>设备调频</a> <button data-freq >设备调频</button>
<a data-fence>电子围栏</a> <button data-fence>电子围栏</button>
<a data-share>分享找车</a> <button data-share>分享找车</button>
</div>
</div> </div>
</div> </div>
</div>`; </div>`;
...@@ -290,12 +500,13 @@ export default defineComponent({ ...@@ -290,12 +500,13 @@ export default defineComponent({
autoMove: false, autoMove: false,
position: lnglat, position: lnglat,
content: infoDiv, content: infoDiv,
offset: new window.AMap.Pixel(0, -20), offset: new window.AMap.Pixel(24, -20),
}); });
const move = (newLnglat) => { const move = (newLnglat) => {
marker.setPosition(newLnglat); marker.setPosition(newLnglat);
infoWindow.setPosition(newLnglat); infoWindow.setPosition(newLnglat);
map.setCenter(newLnglat); map.setCenter(newLnglat);
map.panBy(0, 70);
}; };
//信息窗体内容更新 //信息窗体内容更新
let GPSBtn = infoDiv.querySelector("[data-GPS]"); let GPSBtn = infoDiv.querySelector("[data-GPS]");
...@@ -316,13 +527,22 @@ export default defineComponent({ ...@@ -316,13 +527,22 @@ export default defineComponent({
let Address = infoDiv.querySelector("[data-tranferAddress]"); let Address = infoDiv.querySelector("[data-tranferAddress]");
Address.textContent = item[item.locationType].transferAddress; Address.textContent = item[item.locationType].transferAddress;
}; };
// 在线时间赋值
const setOnlineTime = () => {
let OnlineTime = infoDiv.querySelector("[data-onlineTime]");
OnlineTime.textContent = item[item.locationType].dateTime;
};
if (item.source == 1) { if (item.source == 1) {
// 有线设备 // 有线设备
carFreqBtn && carFreqBtn.classList.add("disabled"); carFreqBtn && carFreqBtn.classList.add("disabled");
} else { } else {
carFenceBtn && carFenceBtn.classList.add("disabled"); carFenceBtn && carFenceBtn.classList.add("disabled");
} }
// 是否被分享者打开
if (isSharePage.value) {
shareBtn && shareBtn.classList.add("disabled");
carFenceBtn && carFenceBtn.classList.add("disabled");
}
// 点击GPS // 点击GPS
GPSBtn && GPSBtn &&
(GPSBtn.onclick = () => { (GPSBtn.onclick = () => {
...@@ -335,6 +555,7 @@ export default defineComponent({ ...@@ -335,6 +555,7 @@ export default defineComponent({
WIFIIcon && WIFIIcon.classList.remove("active"); WIFIIcon && WIFIIcon.classList.remove("active");
item.locationType = "gpsLocation"; item.locationType = "gpsLocation";
setAddress(); setAddress();
setOnlineTime();
move(newLnglat); move(newLnglat);
} else { } else {
Toast("暂无GPS定位信息"); Toast("暂无GPS定位信息");
...@@ -356,6 +577,7 @@ export default defineComponent({ ...@@ -356,6 +577,7 @@ export default defineComponent({
gprsObj.elat gprsObj.elat
); );
setAddress(); setAddress();
setOnlineTime();
move(newLnglat); move(newLnglat);
} else { } else {
Toast("暂无基站定位信息"); Toast("暂无基站定位信息");
...@@ -377,6 +599,7 @@ export default defineComponent({ ...@@ -377,6 +599,7 @@ export default defineComponent({
GPRSIcon && GPRSIcon.classList.remove("active"); GPRSIcon && GPRSIcon.classList.remove("active");
item.locationType = "wifiLocation"; item.locationType = "wifiLocation";
setAddress(); setAddress();
setOnlineTime();
move(newLnglat); move(newLnglat);
} else { } else {
Toast("暂无wifi定位信息"); Toast("暂无wifi定位信息");
...@@ -387,13 +610,9 @@ export default defineComponent({ ...@@ -387,13 +610,9 @@ export default defineComponent({
// 车辆追踪 // 车辆追踪
carLocationBtn && carLocationBtn &&
(carLocationBtn.onclick = () => { (carLocationBtn.onclick = () => {
let lng = item[item.locationType].elng;
let lat = item[item.locationType].elat;
let address = item[item.locationType].transferAddress;
check(() => { check(() => {
wx.miniProgram.navigateTo({ clickFlag.value = false;
url: `../../mapPackage/pages/tracking?lat=${lat}&lng=${lng}&address=${address}`, jumpToMiniProgram("tracking", "", item);
});
}); });
}); });
...@@ -401,9 +620,8 @@ export default defineComponent({ ...@@ -401,9 +620,8 @@ export default defineComponent({
carReplayBtn && carReplayBtn &&
(carReplayBtn.onclick = () => { (carReplayBtn.onclick = () => {
check(() => { check(() => {
wx.miniProgram.navigateTo({ clickFlag.value = false;
url: `../../mapPackage/pages/findCar?sn=${item.sn}&tabItem=replay&source=${item.source}&locationType=${item.locationType}`, jumpToMiniProgram("findCar", "replay", item);
});
}); });
}); });
...@@ -411,18 +629,16 @@ export default defineComponent({ ...@@ -411,18 +629,16 @@ export default defineComponent({
carResidentBtn && carResidentBtn &&
(carResidentBtn.onclick = () => { (carResidentBtn.onclick = () => {
check(() => { check(() => {
wx.miniProgram.navigateTo({ clickFlag.value = false;
url: `../../mapPackage/pages/findCar?sn=${item.sn}&tabItem=resident&source=${item.source}&locationType=${item.locationType}`, jumpToMiniProgram("findCar", "resident", item);
});
}); });
}); });
// 实时监控 // 实时监控
carMonitorBtn && carMonitorBtn &&
(carMonitorBtn.onclick = () => { (carMonitorBtn.onclick = () => {
check(() => { check(() => {
wx.miniProgram.navigateTo({ clickFlag.value = false;
url: `../../mapPackage/pages/findCar?sn=${item.sn}&tabItem=monitor&source=${item.source}&locationType=${item.locationType}`, jumpToMiniProgram("findCar", "monitor", item);
});
}); });
}); });
...@@ -432,58 +648,85 @@ export default defineComponent({ ...@@ -432,58 +648,85 @@ export default defineComponent({
// 仅无线设备可调频 // 仅无线设备可调频
return; return;
} else { } else {
wx.miniProgram.navigateTo({ check(() => {
url: `../../mapPackage/pages/findCar?sn=${item.sn}&tabItem=freq&source=${item.source}&locationType=${item.locationType}`, clickFlag.value = false;
jumpToMiniProgram("findCar", "freq", item);
}); });
} }
}; };
// 电子围栏 // 电子围栏
(carFenceBtn && carFenceBtn).onclick = () => { (carFenceBtn && carFenceBtn).onclick = () => {
if (loginUserId.value || item.source == 0) { if (item.source == 0 || isSharePage.value) {
return; return;
} else { } else {
wx.miniProgram.navigateTo({ check(() => {
url: `../../mapPackage/pages/findCar?sn=${item.sn}&tabItem=fence&source=${item.source}&locationType=${item.locationType}`, clickFlag.value = false;
jumpToMiniProgram("findCar", "fence", item);
}); });
} }
}; };
// 分享找车 // 分享找车
shareBtn.onclick = () => { shareBtn.onclick = () => {
wx.miniProgram.navigateTo({ if (isSharePage.value) {
url: `../../mapPackage/pages/findCar?sn=${item.sn}&tabItem=share&source=${item.source}&locationType=${item.locationType}`, return;
}); }
showOverlay.value = true;
}; };
//点击车辆打开信息窗体 //点击车辆打开信息窗体
marker.on("click", () => { marker.on("click", () => {
map.setCenter(infoWindow.getPosition()); map.setCenter(infoWindow.getPosition());
map.panBy(0, 70);
if (infoWindow.getIsOpen()) { if (infoWindow.getIsOpen()) {
infoWindow.close(); infoWindow.close();
} else { } else {
infoWindow.open(map); infoWindow.open(map);
} }
setAddress(); setAddress();
setOnlineTime();
}); });
return marker; return marker;
}; };
const check = (cb) => { const check = (cb) => {
if (loginUserId.value && isShareDead.value) { if (isShareDead.value) {
Toast("该分享已失效"); Toast("该分享已失效");
return; return;
} }
if (!clickFlag.value) return;
setTimeout(() => {
clickFlag.value = true;
}, 1000);
cb(); cb();
}; };
// 跳转小程序
const jumpToMiniProgram = (page, tabItem, item) => {
if (page == "tracking") {
let lng = item[item.locationType].elng;
let lat = item[item.locationType].elat;
let address = item[item.locationType].transferAddress;
wx.miniProgram.navigateTo({
url: `../../mapPackage/pages/tracking?lat=${lat}&lng=${lng}&address=${address}`,
});
} else {
wx.miniProgram.navigateTo({
url: `../../mapPackage/pages/${page}?sn=${item.sn}&tabItem=${tabItem}&source=${item.source}&locationType=${item.locationType}`,
});
}
};
// 加载更多 // 加载更多
const getCarList = (data, flag) => { const getCarList = (flag) => {
if (isShareDead.value) return;
if (flag) { if (flag) {
pageNumber.value = 0; pageNumber.value = 0;
finished.value = false;
list.value = []; list.value = [];
} }
pageNumber.value++;
if (keyWord.value && keyWord.value.length < 2) { if (keyWord.value && keyWord.value.length < 2) {
// 关键字小于两个字符 忽略 全量搜索 // 关键字小于两个字符清空数据
keyWord.value = ""; list.value = [];
return;
} }
pageNumber.value++;
searched.value = false; searched.value = false;
GET_ALL_CAR_LIST({ GET_ALL_CAR_LIST({
pageSize: 10, pageSize: 10,
...@@ -491,6 +734,18 @@ export default defineComponent({ ...@@ -491,6 +734,18 @@ export default defineComponent({
term: keyWord.value, term: keyWord.value,
}).then((res) => { }).then((res) => {
if (res.code === 200) { if (res.code === 200) {
res.data.list &&
res.data.list.forEach((val) => {
let snArr = [[], []];
val.sources.split(",").forEach((i, index) => {
if (i == 1) {
snArr[0].push(val.sns.split(",")[index]);
} else {
snArr[1].push(val.sns.split(",")[index]);
}
});
val.snArr = snArr;
});
list.value = list.value.concat(res.data.list); list.value = list.value.concat(res.data.list);
loading.value = false; loading.value = false;
searched.value = flag; searched.value = flag;
...@@ -510,7 +765,6 @@ export default defineComponent({ ...@@ -510,7 +765,6 @@ export default defineComponent({
list, list,
getCarList, getCarList,
getCarInfo, getCarInfo,
loginUserId,
check, check,
carInfoList, carInfoList,
carItem, carItem,
...@@ -520,33 +774,69 @@ export default defineComponent({ ...@@ -520,33 +774,69 @@ export default defineComponent({
mapIsUploaded, mapIsUploaded,
routeQuery, routeQuery,
ISLOADING, ISLOADING,
showOverlay,
initViewport,
isSharePage,
clickFlag,
showNotice,
closeNotice,
jumpToMiniProgram,
}; };
}, },
}); });
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@import "@/assets/css/share.scss";
.index-map { .index-map {
position: relative; position: relative;
} }
.share-tip {
position: fixed;
box-sizing: border-box;
top: 0;
z-index: 101;
background: rgba(0, 0, 0, 0.6);
font-size: 14px;
height: 28px;
line-height: 28px;
width: 100%;
color: #fff;
padding: 0 8px 0;
}
.search-box { .search-box {
width: 100%; width: 100%;
z-index: 102; z-index: 102;
position: fixed; position: fixed;
top: 0; top: 0;
background-color: rgba(0, 0, 0, 0);
.search-header { .search-header {
box-shadow: 0px 3px 6px 0px rgba(0, 0, 0, 0.06); box-shadow: 0px 5px 12px 0px rgba(0, 0, 0, 0.06);
background-color: rgba(255, 255, 255, 1);
border-radius: 6px; border-radius: 6px;
height: 44px; height: 44px;
margin: 12px 12px 0 12px; margin: 12px 12px 0 12px;
background: #fff;
.select-box { .select-box {
color: #b8bdc2; color: #b8bdc2;
font-size: 14px; font-size: 14px;
padding: 0 16px; padding: 0 16px;
line-height: 44px; line-height: 44px;
height: 44px;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
.left-text {
display: flex;
width: 100%;
span {
display: inline-block;
}
.name-text {
max-width: 55%;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
}
.arrow-icon { .arrow-icon {
color: #9ca4ad; color: #9ca4ad;
} }
...@@ -556,37 +846,91 @@ export default defineComponent({ ...@@ -556,37 +846,91 @@ export default defineComponent({
} }
} }
.search-content { .search-content {
max-height: 516px; width: 100%;
margin-top: 8px;
border-radius: 12px; border-radius: 12px;
background: #fff; background: #fff;
margin-top: 8px;
overflow: hidden; overflow: hidden;
transition: max-height 0.3s; box-shadow: 0px 5px 12px 0px rgba(0, 0, 0, 0.12);
.search-input { .search-input {
border-radius: 12px; border-radius: 12px;
} }
.list-box { .list-box {
max-height: 464px; width: 100%;
max-height: 65vh;
overflow-y: auto; overflow-y: auto;
background: #f5f6f7;
border-radius: 0 0 12px 12px;
.list-item { .list-item {
height: 52px; padding: 0 16px;
padding: 0 14px;
display: flex; display: flex;
align-items: center; align-items: center;
.item-right { font-size: 12px;
margin-left: 10px; .item-text {
display: flex; display: flex;
justify-content: space-between; flex-flow: column;
width: 100%; width: 100%;
.slectedicon { border: none;
display: inline-block; .item-title {
width: 20px; display: flex;
height: 20px; justify-content: space-between;
align-items: center;
border-bottom: 1px solid #f0f2f5;
padding: 5px 0;
.item-title-left {
.item-text-name {
font-size: 14px;
color: #111;
font-weight: 600;
}
}
.item-text-carNum {
font-size: 12px;
padding: 0 5px;
border-radius: 3px;
}
.item-text-carNum.blur-car {
color: var(--base-color);
background: #d9e9ff;
}
.item-text-carNum.green-car {
color: #00cd9e;
background: #e5faf5;
}
}
.item-text-content {
padding: 5px 0;
.item-text-sn {
display: flex;
.sn-item {
flex: 1;
display: flex;
.label {
color: #9fa6ad;
margin-right: 8px;
}
.sn-text {
display: flex;
flex-flow: column;
}
}
}
.item-text-orderNo {
.label {
color: #9fa6ad;
margin-right: 8px;
}
}
} }
} }
} }
.list-item.active { .list-item.active {
background: #ecf5fe; background: #fff
linear-gradient(
90deg,
rgba(0, 119, 255, 0.1) 0%,
rgba(0, 102, 255, 0.04) 100%
);
} }
} }
.no-data-class { .no-data-class {
...@@ -603,20 +947,34 @@ export default defineComponent({ ...@@ -603,20 +947,34 @@ export default defineComponent({
} }
} }
.search-content.hidden { .search-content.hidden {
max-height: 0; display: none;
transition: max-height 0.3s;
} }
} }
.search-box.search-box-top {
top: 24px;
}
</style> </style>
<style lang="scss"> <style lang="scss">
.amap-overlays {
width: 100%;
}
.amap-info {
width: 100%;
& > div {
width: 100%;
}
}
.car-info-window { .car-info-window {
width: 280px; width: 100%;
.car-info-content {
margin-right: 48px;
background-color: #fff; background-color: #fff;
border-radius: 10px; border-radius: 10px;
border: 1px solid #ececec; border: 1px solid #ececec;
color: #111111; color: #111111;
word-break: break-all; word-break: break-all;
user-select: text; user-select: text;
box-shadow: 0px 5px 12px 0px rgba(0, 0, 0, 0.12);
.main-info { .main-info {
padding: 10px; padding: 10px;
} }
...@@ -630,6 +988,11 @@ export default defineComponent({ ...@@ -630,6 +988,11 @@ export default defineComponent({
color: #111111; color: #111111;
font-weight: 600; font-weight: 600;
margin-bottom: 5px; margin-bottom: 5px;
.close-icon {
display: inline-block;
width: 16px;
height: 16px;
}
} }
:last-child { :last-child {
font-weight: 500; font-weight: 500;
...@@ -661,6 +1024,48 @@ export default defineComponent({ ...@@ -661,6 +1024,48 @@ export default defineComponent({
justify-items: center; justify-items: center;
align-items: center; align-items: center;
} }
.battery {
margin-left: 8px;
position: relative;
height: 16px;
display: flex;
align-items: center;
.all-fill {
display: inline-block;
position: absolute;
top: 4px;
left: 3px;
width: 16px;
height: 8px;
background: #fff;
.fill {
position: absolute;
top: 0;
left: 0;
display: inline-block;
height: 100%;
border-radius: 2px;
}
.fill.enough {
background: #00cd9e;
}
.fill.empty {
background: #ff7340;
}
}
.battery-text {
font-size: 20px;
transform: scale(0.5) translate(-50%);
margin-left: 1px;
display: inline-block;
}
.battery-text.empty {
color: #ff7340;
}
.battery-text.enough {
color: #00cd9e;
}
}
} }
.list-info { .list-info {
align-items: center; align-items: center;
...@@ -687,7 +1092,7 @@ export default defineComponent({ ...@@ -687,7 +1092,7 @@ export default defineComponent({
.cmd-list-top { .cmd-list-top {
border-bottom: 1px solid #f5f6f7; border-bottom: 1px solid #f5f6f7;
padding: 14px 12px; padding: 14px 12px;
a { button {
font-size: 12px; font-size: 12px;
display: inline-block; display: inline-block;
width: 25%; width: 25%;
...@@ -698,13 +1103,13 @@ export default defineComponent({ ...@@ -698,13 +1103,13 @@ export default defineComponent({
:last-child { :last-child {
border-right: none; border-right: none;
} }
a.disabled { button.disabled {
color: #6c737a; color: #6c737a;
} }
} }
.cmd-list-bottom { .cmd-list-bottom {
padding: 14px 12px; padding: 14px 12px;
a { button {
font-size: 12px; font-size: 12px;
display: inline-block; display: inline-block;
width: 25%; width: 25%;
...@@ -715,18 +1120,104 @@ export default defineComponent({ ...@@ -715,18 +1120,104 @@ export default defineComponent({
:last-child { :last-child {
border-right: none; border-right: none;
} }
a.disabled { button.disabled {
color: #6c737a; color: #6c737a;
} }
} }
} }
}
} }
.van-cell { .van-cell {
padding: 0; padding: 0;
margin-bottom: 8px;
}
.van-cell--borderless {
margin: 0;
} }
.van-search__content { .van-search__content {
height: var(--van-search-input-height); height: var(--van-search-input-height);
display: flex; display: flex;
align-items: center; align-items: center;
} }
.van-field__left-icon {
display: flex;
align-items: center;
}
.van-badge__wrapper {
margin-right: 2px;
}
.van-notice-bar__wrap {
margin-left: 7px;
}
.marker-class {
position: relative;
display: inline-block;
height: 52px;
width: 52px;
}
.sn-marker {
position: absolute;
z-index: 3;
}
.marker-bottom {
display: inline-block;
width: 12px;
height: 12px;
border-radius: 50%;
position: absolute;
left: 50%;
bottom: 2px;
transform: translate(-50%, 0);
.outside {
position: absolute;
display: inline-block;
width: 12px;
height: 12px;
border-radius: 50%;
border-color: #fff;
z-index: 1;
}
.inside {
position: absolute;
display: inline-block;
width: 12px;
height: 12px;
border-radius: 50%;
z-index: 1;
}
.outside.off-line {
animation: Glow 2s ease-out infinite alternate;
background: #ffece6;
}
.outside.on-line {
animation: Glow 2s ease-out infinite alternate;
background: #e0eeff;
}
.inside.off-line {
animation: insideGlow 2s ease-out infinite alternate;
background: #ffd5c6;
}
.inside.on-line {
animation: insideGlow 2s ease-out infinite alternate;
background: #b3d6ff;
}
}
@keyframes Glow {
0% {
}
50% {
transform: scale(2.2);
}
100% {
}
}
@keyframes insideGlow {
0% {
}
50% {
transform: scale(1.6);
}
100% {
}
}
</style> </style>
...@@ -112,34 +112,8 @@ export default defineComponent({ ...@@ -112,34 +112,8 @@ export default defineComponent({
}); });
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.icon-share { .info-content {
position: absolute; height: 100%;
top: 20px;
right: 65px;
}
.tip {
margin-top: 105px;
text-align: center;
color: #fff;
font-size: 16px;
.fle {
display: inline-block;
width: 18px;
height: 22px;
vertical-align: middle;
}
.sharebtn {
display: inline-block;
width: 4px;
height: 4px;
margin: 1px;
background: #fff;
border-radius: 50%;
}
.sharebtn.middle {
width: 6px;
height: 6px;
margin: 0;
}
} }
@import "@/assets/css/share.scss";
</style> </style>
<template> <template>
<div class="monitor-tabContent"> <div class="info-content">
<mapContent @refreshCb="refreshCb" @getData="getData" ref="mapContentRefs"> <mapContent @refreshCb="refreshCb" @getData="getData" ref="mapContentRefs">
<template #mapBox> <template #mapBox>
<div id="monitorContainer" class="map-container"></div> <div id="monitorContainer" class="map-container"></div>
...@@ -170,14 +170,13 @@ export default { ...@@ -170,14 +170,13 @@ export default {
require("@/assets/images/car.png") + require("@/assets/images/car.png") +
'" style="transform: scale(0.5);" />', '" style="transform: scale(0.5);" />',
map: currentMap, map: currentMap,
offset: new window.AMap.Pixel(-8.5, -13), offset: new window.AMap.Pixel(-17, -26),
}); });
beginMarker = new window.AMap.Marker({ beginMarker = new window.AMap.Marker({
position: lnglat, position: lnglat,
content: content: '<span class="icon icon-begin" ></span>',
'<span class="icon icon-begin" style="transform: scale(0.5);"></span>',
map: currentMap, map: currentMap,
offset: new window.AMap.Pixel(-8.5, -13), offset: new window.AMap.Pixel(-17, -26),
visible: false, visible: false,
}); });
} else { } else {
...@@ -248,7 +247,8 @@ export default { ...@@ -248,7 +247,8 @@ export default {
} }
} }
.list-content-monitor { .list-content-monitor {
width: calc(100% - 30px); box-sizing: border-box;
width: 100%;
padding: 5px 15px 0 15px; padding: 5px 15px 0 15px;
font-size: 14px; font-size: 14px;
.list-item { .list-item {
...@@ -263,6 +263,7 @@ export default { ...@@ -263,6 +263,7 @@ export default {
flex-flow: column; flex-flow: column;
overflow: hidden; overflow: hidden;
padding-bottom: 14px; padding-bottom: 14px;
width: 100%;
border-bottom: 1px solid #f0f2f5; border-bottom: 1px solid #f0f2f5;
} }
.title { .title {
...@@ -274,7 +275,7 @@ export default { ...@@ -274,7 +275,7 @@ export default {
.time { .time {
color: #666; color: #666;
font-size: 12px; font-size: 12px;
margin-top: 5px; margin-top: 7px;
} }
} }
:last-child { :last-child {
...@@ -287,7 +288,7 @@ export default { ...@@ -287,7 +288,7 @@ export default {
transition: max-height 0.3s; transition: max-height 0.3s;
} }
.toggle-bottom-monitor.show { .toggle-bottom-monitor.show {
max-height: 80%; max-height: 60%;
transition: max-height 0.3s; transition: max-height 0.3s;
.list-content-monitor { .list-content-monitor {
overflow-y: scroll; overflow-y: scroll;
......
<template> <template>
<div> <div class="info-content">
<div class="tab"> <div class="tab">
<div class="tabbar"> <div class="tabbar">
<div class="tabbar-item" @click="showTimeDialog = true"> <div class="tabbar-item" @click="showTimeDialog = true">
...@@ -7,11 +7,9 @@ ...@@ -7,11 +7,9 @@
<span class="slect-class">{{ currDateText }}</span> <span class="slect-class">{{ currDateText }}</span>
<van-icon class="icon-rotate" name="play" /> <van-icon class="icon-rotate" name="play" />
</div> </div>
<div class="tabbar-item" @click="showSpeedPicker = true"> <div class="tabbar-item" @click="changeSpeedPickerPopup">
回放速度&nbsp; 回放速度&nbsp;
<span class="slect-class">{{ <span class="slect-class">{{ selectSpeedId || "" }}</span>
(speedItem[selectSpeedId] && speedItem[selectSpeedId].text) || ""
}}</span>
<van-icon class="icon-rotate" name="play" /> <van-icon class="icon-rotate" name="play" />
</div> </div>
</div> </div>
...@@ -25,23 +23,21 @@ ...@@ -25,23 +23,21 @@
> >
<div class="speedSelect-box"> <div class="speedSelect-box">
<div class="box"> <div class="box">
<el-slider <vue-slider
v-model="speedId" v-model="speedId"
:marks="speedItem" :marks="true"
:show-tooltip="false" :data="speedItemText"
:interval="1"
:max="3" :max="3"
:format-tooltip="changSpeed" :height="2"
:step="1" :dotSize="16"
/> tooltip="none"
<div class="speed-text"> @change="changSpeed"
<span
class="item-text"
:class="'text' + index"
v-for="(item, index) in speedItem"
:key="index"
>{{ item.text }}</span
> >
</div> <template v-slot:step="{ label, active }">
<div :class="['custom-step', { label, active }]"></div>
</template>
</vue-slider>
</div> </div>
</div> </div>
</popup> </popup>
...@@ -75,15 +71,18 @@ ...@@ -75,15 +71,18 @@
style="width: 100%" style="width: 100%"
v-if="showTimePicker" v-if="showTimePicker"
v-model="currentDate" v-model="currentDate"
:show-toolbar="false"
:max-date="maxDate" :max-date="maxDate"
type="date" type="date"
title="选择年月日" @confirm="changeCurrTiem"
@change="changeCurrTiem" ref="dateTimePicker"
/> />
</div> </div>
</popup> </popup>
<mapContent @refreshCb="refreshCb" ref="mapContentRefs"> <mapContent
@refreshCb="refreshCb"
@getData="getCarReplayData"
ref="mapContentRefs"
>
<template #mapBox> <template #mapBox>
<div id="replayContainer" class="map-container"></div> <div id="replayContainer" class="map-container"></div>
</template> </template>
...@@ -109,32 +108,37 @@ import "vant/es/dialog/style"; ...@@ -109,32 +108,37 @@ import "vant/es/dialog/style";
import { GET_REPLAY_DATA } from "@/api/index"; import { GET_REPLAY_DATA } from "@/api/index";
import carPng from "@/assets/images/car.png"; import carPng from "@/assets/images/car.png";
import { useRoute } from "vue-router"; import { useRoute } from "vue-router";
import { ElSlider } from "element-plus"; import VueSlider from "vue-slider-component";
import "element-plus/es/components/slider/style/css"; import "vue-slider-component/theme/default.css";
export default defineComponent({ export default defineComponent({
name: "ReplayPage", name: "ReplayPage",
components: { components: {
mapContent, mapContent,
["el-slider"]: ElSlider, ["vue-slider"]: VueSlider,
popup, popup,
}, },
setup() { setup() {
const mapContentRefs = ref(null); const mapContentRefs = ref(null);
const showSpeedPicker = ref(false); const showSpeedPicker = ref(false);
const speedId = ref(0); const speedId = ref("正常");
const selectSpeedId = ref(0); const selectSpeedId = ref("正常");
const eParams = ref({}); const eParams = ref({});
const timeSelected = ref(null); const timeSelected = ref(0);
const showTimeDialog = ref(false); const showTimeDialog = ref(false);
const showTimePicker = ref(false); const showTimePicker = ref(false);
const currentDate = ref(new Date()); const currentDate = ref(new Date());
const timeBtnList = ["24小时", "3天", "7天"]; const timeBtnList = ["24小时", "3天", "7天"];
const customTime = ref(""); const customTime = ref("");
const searchTime = ref([]); const searchTime = ref([
moment().subtract(1, "day").format("YYYY-MM-DD HH:mm:ss"),
moment().format("YYYY-MM-DD HH:mm:ss"),
]);
const route = useRoute(); const route = useRoute();
const currDateText = ref(""); const currDateText = ref("24小时");
const maxDate = ref(new Date()); const maxDate = ref(new Date());
let map = null; const replayList = ref([]);
const dateTimePicker = ref(null);
let currentMap = null;
let routeQuery = route.query; let routeQuery = route.query;
const replay = reactive({ const replay = reactive({
PathS: null, //轨迹构造器 PathS: null, //轨迹构造器
...@@ -144,24 +148,7 @@ export default defineComponent({ ...@@ -144,24 +148,7 @@ export default defineComponent({
speed: null, speed: null,
}); });
const isPlay = ref(false); const isPlay = ref(false);
const speedItem = [ const speedItemText = ["慢", "正常", "快", "很快"];
{
text: "慢",
value: 0,
},
{
text: "正常",
value: 1,
},
{
text: "快",
value: 2,
},
{
text: "很快",
value: 3,
},
];
onMounted(() => { onMounted(() => {
AMapLoader.load({ AMapLoader.load({
key: CONSTANT.MAP_KEY, key: CONSTANT.MAP_KEY,
...@@ -174,16 +161,6 @@ export default defineComponent({ ...@@ -174,16 +161,6 @@ export default defineComponent({
}).then((AMap) => { }).then((AMap) => {
window.AMap = AMap; window.AMap = AMap;
mapContentRefs.value.initMap("replayContainer"); mapContentRefs.value.initMap("replayContainer");
window.AMapUI.load(
["ui/misc/PathSimplifier"],
function (PathSimplifier) {
if (!PathSimplifier.supportCanvas) {
alert("当前环境不支持 Canvas!");
return;
}
replay.PathS = PathSimplifier;
}
);
}); });
}); });
const refreshCb = () => { const refreshCb = () => {
...@@ -196,11 +173,12 @@ export default defineComponent({ ...@@ -196,11 +173,12 @@ export default defineComponent({
}); });
} }
isPlay.value = false; isPlay.value = false;
map.clearMap(); currentMap.clearMap();
getCarReplayData(); getCarReplayData();
}; };
// 获取车辆轨迹 // 获取车辆轨迹
const getCarReplayData = () => { const getCarReplayData = (map) => {
currentMap = map ? map : currentMap;
getParams(); getParams();
if (replay.navg) { if (replay.navg) {
replay.navg.destroy(); replay.navg.destroy();
...@@ -211,7 +189,7 @@ export default defineComponent({ ...@@ -211,7 +189,7 @@ export default defineComponent({
}); });
} }
isPlay.value = false; isPlay.value = false;
map && map.clearMap(); currentMap && currentMap.clearMap();
GET_REPLAY_DATA({ ...eParams.value }).then((res) => { GET_REPLAY_DATA({ ...eParams.value }).then((res) => {
showTimeDialog.value = false; showTimeDialog.value = false;
if (res.code === 200) { if (res.code === 200) {
...@@ -223,36 +201,30 @@ export default defineComponent({ ...@@ -223,36 +201,30 @@ export default defineComponent({
arr.push(item.elat); arr.push(item.elat);
replayData.push(arr); replayData.push(arr);
}); });
initPath(replayData); replayList.value = replayData;
initPath(replayData, currentMap);
} else { } else {
replayList.value = [];
Dialog({ message: "暂无轨迹数据" }); Dialog({ message: "暂无轨迹数据" });
} }
} }
}); });
}; };
// 切换速度弹窗
const changeSpeedPickerPopup = () => {
speedId.value = selectSpeedId.value;
showSpeedPicker.value = true;
};
// 切换速度 // 切换速度
const changSpeed = () => { const changSpeed = (e) => {
nextTick(() => { speedId.value = e;
let sliderBar = document.querySelector(".el-slider__button-wrapper");
let sliderStop = document.querySelectorAll(".el-slider__stop");
sliderStop.forEach((val) => {
if (
Number(val.style.left.split("%")[0]) <
Number(sliderBar.style.left.split("%")[0])
) {
val.style.border = `2px solid #0077FF`;
} else {
val.style.border = `2px solid #E4E7EB`;
}
});
});
}; };
// 切换速度保存 // 切换速度保存
const saveSpeed = () => { const saveSpeed = () => {
showSpeedPicker.value = false; showSpeedPicker.value = false;
selectSpeedId.value = speedId.value; selectSpeedId.value = speedId.value;
if (replay.navg) { if (replay.navg) {
replay.navg.setSpeed(speedEvent(speedId.value, replay.dis)); replay.navg.setSpeed(speedEvent(selectSpeedId.value, replay.dis));
if (!isPlay.value) { if (!isPlay.value) {
play(); play();
} }
...@@ -263,15 +235,18 @@ export default defineComponent({ ...@@ -263,15 +235,18 @@ export default defineComponent({
if (!searchTime.value.length) { if (!searchTime.value.length) {
return Toast("请选择一个时间段"); return Toast("请选择一个时间段");
} }
getCarReplayData();
showTimeDialog.value = false; showTimeDialog.value = false;
let isSelectTime = let isSelectTime =
timeSelected.value !== null && timeSelected.value.toString(); timeSelected.value !== null && timeSelected.value.toString();
if (isSelectTime) { if (isSelectTime) {
currDateText.value = timeBtnList[timeSelected.value]; currDateText.value = timeBtnList[timeSelected.value];
getCarReplayData();
} else if (currentDate.value) { } else if (currentDate.value) {
currDateText.value = moment(currentDate.value).format("MM-DD"); // 不显示picker顶部 确认时调用 自带的confirm 防止选择时间延迟
customTime.value = moment(currentDate.value).format("YYYY-MM-DD"); nextTick(() => {
let confirmBtn = dateTimePicker.value.$el.children[0].children[1];
confirmBtn.click();
});
} }
}; };
// 显示自定义时间 // 显示自定义时间
...@@ -291,20 +266,17 @@ export default defineComponent({ ...@@ -291,20 +266,17 @@ export default defineComponent({
moment(e).format("YYYY-MM-DD") + " 00:00:00", moment(e).format("YYYY-MM-DD") + " 00:00:00",
moment(e).format("YYYY-MM-DD") + " 23:59:59", moment(e).format("YYYY-MM-DD") + " 23:59:59",
]; ];
currDateText.value = moment(currentDate.value).format("MM-DD");
customTime.value = moment(currentDate.value).format("YYYY-MM-DD");
getCarReplayData();
}; };
// 查询参数 // 查询参数
const getParams = () => { const getParams = () => {
console.log(routeQuery);
eParams.value = { eParams.value = {
speed: speedId.value, startTime: searchTime.value[0],
// startTime: searchTime.value[0], endTime: searchTime.value[1],
// endTime: searchTime.value[1],
locationType: 0, locationType: 0,
// sn: routeQuery.sn, sn: routeQuery.sn,
startTime: "2022-06-27 00:00:00",
endTime: "2022-07-04 23:59:59",
// sn: routeQuery.sn,
sn: "Sr1PRLqA32LCbSWZDch+Sg==",
}; };
}; };
// 点击快捷时间选择 // 点击快捷时间选择
...@@ -335,6 +307,9 @@ export default defineComponent({ ...@@ -335,6 +307,9 @@ export default defineComponent({
}; };
// 根据距离 实时计算速度 // 根据距离 实时计算速度
const speedEvent = (idx, dis) => { const speedEvent = (idx, dis) => {
let index = speedItemText.findIndex((val) => {
return val == idx;
});
let timeArr = [ let timeArr = [
[40, 30, 16], [40, 30, 16],
[30, 20, 12], [30, 20, 12],
...@@ -344,23 +319,22 @@ export default defineComponent({ ...@@ -344,23 +319,22 @@ export default defineComponent({
let speed; let speed;
if (dis >= 100) { if (dis >= 100) {
// 100公里以上 // 100公里以上
speed = Math.floor((dis / timeArr[idx][0]) * 3600); speed = Math.floor((dis / timeArr[index][0]) * 3600);
} else if (dis > 10 && dis < 100) { } else if (dis > 10 && dis < 100) {
// 10-100公里 // 10-100公里
speed = Math.floor((dis / timeArr[idx][1]) * 3600); speed = Math.floor((dis / timeArr[index][1]) * 3600);
} else { } else {
// 10公里以内 // 10公里以内
speed = Math.floor((dis / timeArr[idx][2]) * 3600); speed = Math.floor((dis / timeArr[index][2]) * 3600);
} }
return speed; return speed;
}; };
const initPath = (replayData) => { const initPath = (replayData, currentMap) => {
map = map ? map : mapContentRefs.value.init("replayContainer");
replay.dis = window.AMap.GeometryUtil.distanceOfLine(replayData) / 1000; // 算出轨迹的距离(km) replay.dis = window.AMap.GeometryUtil.distanceOfLine(replayData) / 1000; // 算出轨迹的距离(km)
if (replay.PathS) { if (replay.PathS) {
replay.pathSimplifierIns = new replay.PathS({ replay.pathSimplifierIns = new replay.PathS({
zIndex: 100, zIndex: 100,
map: map, //所属的地图实例 map: currentMap, //所属的地图实例
getPath: function (pathData) { getPath: function (pathData) {
return pathData.path; return pathData.path;
}, },
...@@ -371,6 +345,10 @@ export default defineComponent({ ...@@ -371,6 +345,10 @@ export default defineComponent({
lineWidth: 6, lineWidth: 6,
dirArrowStyle: true, dirArrowStyle: true,
}, },
pathLineSelectedStyle: {
strokeStyle: "#EC8788",
lineWidth: 6,
},
}, },
}); });
replay.pathSimplifierIns.setData([ replay.pathSimplifierIns.setData([
...@@ -399,10 +377,25 @@ export default defineComponent({ ...@@ -399,10 +377,25 @@ export default defineComponent({
replay.navg.on("pause", function () { replay.navg.on("pause", function () {
isPlay.value = false; isPlay.value = false;
}); });
} else {
window.AMapUI.load(
["ui/misc/PathSimplifier"],
function (PathSimplifier) {
if (!PathSimplifier.supportCanvas) {
alert("当前环境不支持 Canvas!");
return;
}
replay.PathS = PathSimplifier;
initPath(replayData, currentMap);
}
);
} }
}; };
// 播放轨迹 // 播放轨迹
const play = () => { const play = () => {
if (!replayList.value.length) {
return Toast("暂无轨迹数据");
}
if (replay.navg) { if (replay.navg) {
if (replay.navg.getCursor().idx === replay.navg.getPathEndIdx()) { if (replay.navg.getCursor().idx === replay.navg.getPathEndIdx()) {
replay.navg.start(); replay.navg.start();
...@@ -423,6 +416,9 @@ export default defineComponent({ ...@@ -423,6 +416,9 @@ export default defineComponent({
}; };
// 重新播放 // 重新播放
const replayPath = () => { const replayPath = () => {
if (!replayList.value.length) {
return Toast("暂无轨迹数据");
}
if (replay.navg) { if (replay.navg) {
replay.navg.start(); replay.navg.start();
isPlay.value = true; isPlay.value = true;
...@@ -431,7 +427,7 @@ export default defineComponent({ ...@@ -431,7 +427,7 @@ export default defineComponent({
return { return {
mapContentRefs, mapContentRefs,
showSpeedPicker, showSpeedPicker,
speedItem, speedItemText,
speedId, speedId,
refreshCb, refreshCb,
getCarReplayData, getCarReplayData,
...@@ -457,12 +453,31 @@ export default defineComponent({ ...@@ -457,12 +453,31 @@ export default defineComponent({
currDateText, currDateText,
onShowTimePicker, onShowTimePicker,
maxDate, maxDate,
replayList,
dateTimePicker,
changeSpeedPickerPopup,
}; };
}, },
}); });
</script> </script>
<style lang="scss">
.vue-slider-process {
background: var(--base-color);
}
.vue-slider-rail {
background: #e4e7eb;
}
.van-picker__toolbar {
display: none;
}
</style>
<style lang="scss" scoped> <style lang="scss" scoped>
.info-content {
.map-box {
height: calc(100% - 39px) !important;
}
}
.tab { .tab {
.tabbar { .tabbar {
font-size: 0px; font-size: 0px;
...@@ -494,7 +509,8 @@ export default defineComponent({ ...@@ -494,7 +509,8 @@ export default defineComponent({
background: #fff; background: #fff;
color: #999; color: #999;
overflow: hidden; overflow: hidden;
width: calc(100% - 40px); box-sizing: border-box;
width: 100%;
padding: 0 20px; padding: 0 20px;
.time-btn-list { .time-btn-list {
display: flex; display: flex;
...@@ -544,6 +560,25 @@ export default defineComponent({ ...@@ -544,6 +560,25 @@ export default defineComponent({
} }
} }
} }
.custom-step {
position: absolute;
top: -4px;
height: 6px;
width: 6px;
transform: translate(-50%);
border-radius: 6px;
background-color: #fff;
border: 2px solid #e4e7eb;
}
.custom-step.active {
background-color: #fff;
border: 2px solid var(--base-color);
// box-shadow: 0 0 0 3px var(--base-color);
}
.vue-slider-mark-label {
font-size: 14px;
color: #111;
}
.speedSelect-box { .speedSelect-box {
display: flex; display: flex;
width: 100%; width: 100%;
...@@ -554,7 +589,8 @@ export default defineComponent({ ...@@ -554,7 +589,8 @@ export default defineComponent({
overflow: hidden; overflow: hidden;
.box { .box {
padding: 20px 40px; padding: 20px 40px;
width: calc(100% - 80px); box-sizing: border-box;
width: 100%;
overflow: hidden; overflow: hidden;
.speed-text { .speed-text {
width: 100%; width: 100%;
...@@ -585,11 +621,12 @@ export default defineComponent({ ...@@ -585,11 +621,12 @@ export default defineComponent({
left: 50%; left: 50%;
margin-left: -72px; margin-left: -72px;
z-index: 101; z-index: 101;
a {
border-radius: 10px;
box-shadow: 0px 5px 12px 0px rgba(0, 0, 0, 0.12);
}
.icon-replay-refresh { .icon-replay-refresh {
margin-left: 12px; margin-left: 12px;
} }
} }
</style> </style>
<style scoped>
@import "@/assets/css/slider.css";
</style>
<template> <template>
<div> <div class="info-content">
<div class="searchControll" @click="showTimeDialog = true"> <div class="tab">
<a class="icon icon-screen-btn"></a> <div class="tabbar">
<span class="screen-text">筛选</span> <button
</div>
<popup
:show="showTimeDialog"
@btnCancel="showTimeDialog = false"
@btnSave="saveTime"
:position="'bottom'"
>
<div class="time-content">
<span
class="time_btn" class="time_btn"
v-for="(item, index) in timeBtnList" v-for="(item, index) in timeBtnList"
:key="index" :key="index"
:class="seledtedItem === index ? 'active' : ''" :class="seledtedItem === index ? 'active' : ''"
@click="selectTime(index)" @click="selectTime(index)"
>{{ index < 2 ? item : currentDateText }}</span v-preventReClick
> >
{{ index < 2 ? item : currentDateText }}
</button>
</div>
</div> </div>
<popup
:show="showTimePicker"
@btnCancel="showTimePicker = false"
@btnSave="saveTime"
:position="'bottom'"
>
<van-datetime-picker <van-datetime-picker
style="width: 100%" style="width: 100%"
v-if="showTimePicker"
:show-toolbar="false"
v-model="currentDate" v-model="currentDate"
:max-date="maxDate" :max-date="maxDate"
type="year-month" type="year-month"
title="选择年月"
:formatter="formatter" :formatter="formatter"
@change="change" @confirm="change"
ref="dateTimePicker"
/> />
</popup> </popup>
<mapContent @refreshCb="refreshCb" @getData="getData" ref="mapContentRefs"> <mapContent @refreshCb="refreshCb" @getData="getData" ref="mapContentRefs">
...@@ -56,6 +54,7 @@ ...@@ -56,6 +54,7 @@
:key="index" :key="index"
> >
<span class="icon icon-loc-icon"></span> <span class="icon icon-loc-icon"></span>
<div class="text-content">
<div class="left"> <div class="left">
<p class="title">{{ item.transferAddress }}</p> <p class="title">{{ item.transferAddress }}</p>
<p class="time"> <p class="time">
...@@ -66,15 +65,22 @@ ...@@ -66,15 +65,22 @@
</p> </p>
</div> </div>
<div class="right"> <div class="right">
<a <button
class="copy-adr" class="button-class copy-adr"
@click="copyAddress" @click="copyAddress"
v-preventReClick
:data-clipboard-text="item.transferAddress" :data-clipboard-text="item.transferAddress"
><i class="icon icon-copy"></i><span>复制</span></a
> >
<a class="navigate" @click="navigation(item)" <i class="icon icon-copy"></i><span>复制</span>
><i class="icon icon-navgation"></i><span>导航</span></a </button>
<button
class="button-class"
@click="navigation(item)"
v-preventReClick
> >
<i class="icon icon-navgation"></i><span>导航</span>
</button>
</div>
</div> </div>
</div> </div>
</div> </div>
...@@ -85,6 +91,7 @@ ...@@ -85,6 +91,7 @@
<script> <script>
import { defineComponent, nextTick, onMounted, ref, watch } from "vue"; import { defineComponent, nextTick, onMounted, ref, watch } from "vue";
import mapContent from "@/components/mapContent.vue"; import mapContent from "@/components/mapContent.vue";
import popup from "@/components/popup.vue";
import AMapLoader from "@amap/amap-jsapi-loader"; import AMapLoader from "@amap/amap-jsapi-loader";
import { CONSTANT } from "../constant"; import { CONSTANT } from "../constant";
import moment from "@/utils/moment"; import moment from "@/utils/moment";
...@@ -99,6 +106,7 @@ export default defineComponent({ ...@@ -99,6 +106,7 @@ export default defineComponent({
name: "ResidentPage", name: "ResidentPage",
components: { components: {
mapContent, mapContent,
popup,
}, },
setup() { setup() {
const route = useRoute(); const route = useRoute();
...@@ -108,7 +116,6 @@ export default defineComponent({ ...@@ -108,7 +116,6 @@ export default defineComponent({
const currentDateText = ref("自定义"); const currentDateText = ref("自定义");
const timeBtnList = ["7天", "30天", "自定义"]; const timeBtnList = ["7天", "30天", "自定义"];
const seledtedItem = ref(0); const seledtedItem = ref(0);
const showTimeDialog = ref(false);
const isShowAllList = ref(false); const isShowAllList = ref(false);
const residentList = ref([]); const residentList = ref([]);
const listScroll = ref(0); const listScroll = ref(0);
...@@ -118,6 +125,7 @@ export default defineComponent({ ...@@ -118,6 +125,7 @@ export default defineComponent({
]); ]);
const changey = ref(null); const changey = ref(null);
const maxDate = ref(new Date()); const maxDate = ref(new Date());
const dateTimePicker = ref(null);
let currentMap = null; let currentMap = null;
let routeQuery = route.query; let routeQuery = route.query;
let markerArr = []; let markerArr = [];
...@@ -174,17 +182,12 @@ export default defineComponent({ ...@@ -174,17 +182,12 @@ export default defineComponent({
return val; return val;
}; };
const saveTime = () => { const saveTime = () => {
showTimeDialog.value = false; showTimePicker.value = false;
if (seledtedItem.value === 2) { // 不显示picker顶部 确认时调用 自带的confirm 防止选择时间延迟
currentDateText.value = moment(currentDate.value).format("YYYY-MM"); nextTick(() => {
searchTime.value = [ let confirmBtn = dateTimePicker.value.$el.children[0].children[1];
moment(currentDate.value) confirmBtn.click();
.endOf("month") });
.format("YYYY-MM-DD HH:mm:ss"),
moment(currentDate.value).format("YYYY-MM-DD HH:mm:ss"),
];
}
getData();
}; };
onMounted(() => { onMounted(() => {
AMapLoader.load({ AMapLoader.load({
...@@ -196,9 +199,8 @@ export default defineComponent({ ...@@ -196,9 +199,8 @@ export default defineComponent({
mapContentRefs.value.initMap("residentContainer"); mapContentRefs.value.initMap("residentContainer");
}); });
}); });
// 选择时间 // 快捷选择时间
const selectTime = (e) => { const selectTime = (e) => {
seledtedItem.value = e;
switch (e) { switch (e) {
case 0: case 0:
searchTime.value = [ searchTime.value = [
...@@ -206,24 +208,33 @@ export default defineComponent({ ...@@ -206,24 +208,33 @@ export default defineComponent({
moment().format("YYYY-MM-DD HH:mm:ss"), moment().format("YYYY-MM-DD HH:mm:ss"),
]; ];
showTimePicker.value = false; showTimePicker.value = false;
currentDateText.value = "自定义"; seledtedItem.value = e;
getData();
break; break;
case 1: case 1:
searchTime.value = [ searchTime.value = [
moment().subtract(30, "day").format("YYYY-MM-DD HH:mm:ss"), moment().subtract(30, "day").format("YYYY-MM-DD HH:mm:ss"),
moment().format("YYYY-MM-DD HH:mm:ss"), moment().format("YYYY-MM-DD HH:mm:ss"),
]; ];
currentDateText.value = "自定义";
showTimePicker.value = false; showTimePicker.value = false;
seledtedItem.value = e;
getData();
break; break;
case 2: case 2:
showTimePicker.value = true; showTimePicker.value = true;
break; break;
} }
}; };
// 时间选择确定 // 自定义时间选择
const change = (e) => { const change = (e) => {
currentDate.value = e; currentDate.value = e;
currentDateText.value = moment(e).format("YYYY-MM");
searchTime.value = [
moment(e).format("YYYY-MM-DD HH:mm:ss"),
moment(e).endOf("month").format("YYYY-MM-DD HH:mm:ss"),
];
seledtedItem.value = timeBtnList.findIndex((item) => item == "自定义");
getData();
}; };
// 获取数据 // 获取数据
const getData = (map) => { const getData = (map) => {
...@@ -237,6 +248,8 @@ export default defineComponent({ ...@@ -237,6 +248,8 @@ export default defineComponent({
if (res.data.length > 0) { if (res.data.length > 0) {
init(currentMap, res.data); init(currentMap, res.data);
} else { } else {
currentMap.clearMap();
residentList.value = [];
Dialog({ message: "暂无数据" }); Dialog({ message: "暂无数据" });
} }
} }
...@@ -256,8 +269,7 @@ export default defineComponent({ ...@@ -256,8 +269,7 @@ export default defineComponent({
var lnglat = new window.AMap.LngLat(item.elng, item.elat); var lnglat = new window.AMap.LngLat(item.elng, item.elat);
var marker = new window.AMap.Marker({ var marker = new window.AMap.Marker({
position: lnglat, position: lnglat,
content: content: '<span class="icon icon-resident"></span>',
'<span class="icon icon-resident" style="transform: scale(0.5);"></span>',
map: currentMap, map: currentMap,
offset: new window.AMap.Pixel(-8.5, -13), offset: new window.AMap.Pixel(-8.5, -13),
}); });
...@@ -286,9 +298,8 @@ export default defineComponent({ ...@@ -286,9 +298,8 @@ export default defineComponent({
}; };
// 导航 // 导航
const navigation = (data) => { const navigation = (data) => {
console.log(data.transferAddress);
wx.miniProgram.navigateTo({ wx.miniProgram.navigateTo({
url: `../../pages/navgation/index?lat=${data.elat}&lng=${data.elng}&address=${data.transferAddress}`, url: `../../mapPackage/pages/tracking?lat=${data.elat}&lng=${data.elng}&address=${data.transferAddress}`,
}); });
}; };
// 复制地址 // 复制地址
...@@ -320,42 +331,57 @@ export default defineComponent({ ...@@ -320,42 +331,57 @@ export default defineComponent({
residentList, residentList,
selectTime, selectTime,
searchTime, searchTime,
showTimeDialog,
timeBtnList, timeBtnList,
changey, changey,
listScroll, listScroll,
saveTime, saveTime,
formatter, formatter,
maxDate, maxDate,
dateTimePicker,
}; };
}, },
}); });
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.searchControll { .info-content {
position: fixed; .map-box {
top: 70px; height: calc(100% - 44px) !important;
right: 12px; }
width: 40px; }
height: 52px; .tab {
height: 28px;
background: #fff; background: #fff;
z-index: 300; padding: 8px 16px;
.tabbar {
background: #f5f6f7;
border-radius: 6px;
height: 28px;
display: flex; display: flex;
flex-flow: column;
align-items: center;
justify-content: center; justify-content: center;
.screen-text { align-items: center;
font-size: 16px; .time_btn {
display: inline-block; height: 24px;
transform: scale(0.5); font-size: 14px;
line-height: 24px;
color: #6c737a;
flex: 1;
margin: 0 1px;
text-align: center;
}
.time_btn.active {
background: #fff;
border-radius: 4px;
color: var(--base-color);
}
} }
} }
.time-content { .time-content {
background: #fff; background: #fff;
color: #999; color: #999;
display: flex; display: flex;
width: calc(100% - 16px); box-sizing: border-box;
width: 100%;
padding: 20px 8px; padding: 20px 8px;
overflow: hidden; overflow: hidden;
.time_btn { .time_btn {
...@@ -397,21 +423,33 @@ export default defineComponent({ ...@@ -397,21 +423,33 @@ export default defineComponent({
} }
} }
.list-content-resident { .list-content-resident {
width: calc(100% - 30px); box-sizing: border-box;
padding: 5px 15px 0 15px; width: 100%;
padding-top: 5px;
font-size: 14px; font-size: 14px;
.list-item { .list-item {
height: 68px; height: 68px;
display: flex; display: flex;
width: 100%;
justify-content: space-between;
.icon-loc-icon { .icon-loc-icon {
margin-top: 7px; margin-top: 7px;
flex-shrink: 0;
} }
.text-content {
flex-shrink: 0;
border-bottom: 1px solid #f0f2f5;
display: flex;
flex: 1;
width: 0;
.left { .left {
padding: 12px 10px 12px 0; padding: 12px 10px 12px 0;
border-bottom: 1px solid #f0f2f5; flex: 1;
width: 0;
display: flex;
flex-flow: column;
.title { .title {
color: #000; color: #000;
width: 224px;
overflow: hidden; overflow: hidden;
white-space: nowrap; white-space: nowrap;
text-overflow: ellipsis; text-overflow: ellipsis;
...@@ -427,16 +465,14 @@ export default defineComponent({ ...@@ -427,16 +465,14 @@ export default defineComponent({
} }
.right { .right {
padding: 12px 0;
border-bottom: 1px solid #f0f2f5;
display: flex; display: flex;
align-items: center; align-items: center;
a { button {
display: flex; display: flex;
flex-flow: column; flex-flow: column;
align-items: center; align-items: center;
} }
.navigate { .button-class {
i { i {
display: inline-block; display: inline-block;
} }
...@@ -446,15 +482,6 @@ export default defineComponent({ ...@@ -446,15 +482,6 @@ export default defineComponent({
transform: scale(0.5); transform: scale(0.5);
} }
} }
.copy-adr {
i {
display: inline-block;
}
span {
color: #6c737a;
font-size: 20px;
transform: scale(0.5);
}
} }
} }
} }
...@@ -482,4 +509,7 @@ export default defineComponent({ ...@@ -482,4 +509,7 @@ export default defineComponent({
border-radius: 4px; border-radius: 4px;
padding: 10px; padding: 10px;
} }
.van-picker__toolbar {
display: none;
}
</style> </style>
<template> <template>
<div> <div class="info-content">
<mapContent ref="mapContentRefs"> <mapContent ref="mapContentRefs">
<template #mapBox> <template #mapBox>
<div id="shareContainer" class="map-container"></div> <div id="shareContainer" class="map-container"></div>
......
...@@ -11,10 +11,18 @@ function resolve(dir) { ...@@ -11,10 +11,18 @@ function resolve(dir) {
return path.join(__dirname, ".", dir); return path.join(__dirname, ".", dir);
} }
module.exports = defineConfig({ module.exports = defineConfig({
publicPath: "/miniapp/", publicPath: "./",
transpileDependencies: true, transpileDependencies: true,
devServer: { devServer: {
port: 9527, port: 9527,
proxy: {
'/api': {
target: 'https://eshield.dev.glsx.com.cn/',
changeOrigin: true,
secure: false,
pathRewrite: { "^/api": "" },
}
}
}, },
chainWebpack: (config) => { chainWebpack: (config) => {
config.plugin("webpack-spritesmith").use(Spritesmith, [ config.plugin("webpack-spritesmith").use(Spritesmith, [
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!