提交 caa0221c authored 作者: 刘旭's avatar 刘旭

更新

上级 b7b03b03
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
}, },
"dependencies": { "dependencies": {
"@element-plus/icons-vue": "^1.1.4", "@element-plus/icons-vue": "^1.1.4",
"ace-builds": "^1.11.2", "@turf/turf": "^6.5.0",
"axios": "^0.24.0", "axios": "^0.24.0",
"echarts": "^5.3.0", "echarts": "^5.3.0",
"element-plus": "^2.2.12", "element-plus": "^2.2.12",
...@@ -17,17 +17,13 @@ ...@@ -17,17 +17,13 @@
"eslint-plugin-vue": "^8.2.0", "eslint-plugin-vue": "^8.2.0",
"lodash": "^4.17.21", "lodash": "^4.17.21",
"mockjs": "^1.1.0", "mockjs": "^1.1.0",
"moment": "^2.29.1",
"nprogress": "^0.2.0", "nprogress": "^0.2.0",
"qs": "^6.10.3", "qs": "^6.10.3",
"socket.io-client": "^4.5.0",
"stylus": "^0.59.0",
"uuid": "^9.0.0", "uuid": "^9.0.0",
"vue": "^3.2.33", "vue": "^3.2.33",
"vue-demi": "^0.13.1", "vue-demi": "^0.13.1",
"vue-i18n": "^9.1.10", "vue-i18n": "^9.1.10",
"vue-router": "4", "vue-router": "4",
"vue-socket.io": "^3.0.10",
"vuex": "^4.0.2" "vuex": "^4.0.2"
}, },
"devDependencies": { "devDependencies": {
......
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"geometry": {
"type": "GeometryCollection",
"geometries": [
{
"type": "Polygon",
"coordinates": [
[
[113.846837, 22.499072],
[113.846602, 22.498293],
[113.845618, 22.497384],
[113.844213, 22.496215],
[113.844588, 22.495566],
[113.843979, 22.494787],
[113.843417, 22.495177],
[113.841543, 22.496302],
[113.841777, 22.496951],
[113.841402, 22.497211],
[113.840793, 22.496995],
[113.839715, 22.4976],
[113.837373, 22.499721],
[113.835124, 22.501453],
[113.835077, 22.503357],
[113.836108, 22.50392],
[113.838404, 22.505954],
[113.83845, 22.506819],
[113.83756, 22.507858],
[113.837982, 22.50881],
[113.839575, 22.507642],
[113.840043, 22.50617],
[113.841543, 22.504828],
[113.843885, 22.502145],
[113.846837, 22.499072]
]
]
},
{
"type": "Polygon",
"coordinates": [
[
[113.840137, 22.519717],
[113.841917, 22.517467],
[113.844072, 22.515822],
[113.845103, 22.515649],
[113.845384, 22.516082],
[113.847258, 22.515043],
[113.849881, 22.513225],
[113.851287, 22.511926],
[113.851849, 22.508897],
[113.851755, 22.506473],
[113.850256, 22.50604],
[113.847914, 22.506646],
[113.844915, 22.508204],
[113.843322, 22.510022],
[113.841355, 22.511753],
[113.839106, 22.513917],
[113.838263, 22.515476],
[113.838263, 22.518246],
[113.840137, 22.519717]
]
]
},
{
"type": "Polygon",
"coordinates": [
[
[113.817086, 22.408949],
[113.817461, 22.408254],
[113.818492, 22.406955],
[113.818773, 22.404877],
[113.818867, 22.400806],
[113.818023, 22.400286],
[113.815681, 22.400286],
[113.815025, 22.400719],
[113.813245, 22.400806],
[113.811558, 22.401758],
[113.81034, 22.401932],
[113.809965, 22.401499],
[113.808653, 22.401845],
[113.806123, 22.402191],
[113.803968, 22.402538],
[113.803875, 22.403491],
[113.802282, 22.404184],
[113.800127, 22.405136],
[113.799096, 22.406089],
[113.797784, 22.406349],
[113.797503, 22.407388],
[113.797784, 22.408341],
[113.797784, 22.409467],
[113.79666, 22.410506],
[113.794973, 22.411806],
[113.792162, 22.413278],
[113.788039, 22.414924],
[113.78476, 22.41579],
[113.782792, 22.41605],
[113.78223, 22.416656],
[113.78223, 22.418995],
[113.783073, 22.419947],
[113.785322, 22.419947],
[113.786353, 22.420987],
[113.788039, 22.420813],
[113.788601, 22.419861],
[113.789913, 22.418128],
[113.7916, 22.418215],
[113.793005, 22.419428],
[113.793849, 22.420121],
[113.794223, 22.421073],
[113.794317, 22.422719],
[113.794505, 22.425058],
[113.796285, 22.42575],
[113.798253, 22.425491],
[113.799096, 22.424624],
[113.798721, 22.421939],
[113.799845, 22.421073],
[113.801251, 22.420554],
[113.804812, 22.42038],
[113.805467, 22.422113],
[113.806686, 22.422632],
[113.809778, 22.421853],
[113.809871, 22.419081],
[113.811183, 22.418475],
[113.812495, 22.41605],
[113.812401, 22.414491],
[113.813057, 22.412932],
[113.813526, 22.412932],
[113.814088, 22.412412],
[113.813713, 22.411892],
[113.813807, 22.411199],
[113.817086, 22.408949]
]
]
},
{
"type": "Polygon",
"coordinates": [
[
[113.904943, 22.525594],
[113.904775, 22.531561],
[113.906872, 22.531018],
[113.91048, 22.531096],
[113.913919, 22.531251],
[113.916352, 22.531173],
[113.919121, 22.530554],
[113.921386, 22.530166],
[113.924154, 22.529546],
[113.924406, 22.527841],
[113.924574, 22.525594],
[113.92449, 22.524509],
[113.923651, 22.522183],
[113.923064, 22.520711],
[113.922141, 22.517921],
[113.921805, 22.514821],
[113.920798, 22.512419],
[113.918532, 22.50777],
[113.912493, 22.507925],
[113.909989, 22.506988],
[113.907318, 22.505639],
[113.906453, 22.503971],
[113.904021, 22.500948],
[113.903266, 22.499941],
[113.901924, 22.499553],
[113.90142, 22.498235],
[113.901504, 22.495988],
[113.900581, 22.495135],
[113.899549, 22.494798],
[113.899964, 22.49242],
[113.899226, 22.491076],
[113.897561, 22.49126],
[113.894961, 22.492112],
[113.894374, 22.490717],
[113.891853, 22.488234],
[113.888639, 22.48642],
[113.886572, 22.486686],
[113.883804, 22.488004],
[113.879526, 22.488237],
[113.877933, 22.486764],
[113.876003, 22.485446],
[113.876507, 22.484206],
[113.876087, 22.482656],
[113.875248, 22.481338],
[113.874158, 22.479168],
[113.873711, 22.480455],
[113.872667, 22.484158],
[113.872625, 22.485778],
[113.869368, 22.495384],
[113.873335, 22.496541],
[113.879848, 22.49847],
[113.884984, 22.499974],
[113.886654, 22.501093],
[113.887448, 22.502096],
[113.888993, 22.50468],
[113.891706, 22.508923],
[113.893043, 22.510967],
[113.895089, 22.512973],
[113.896759, 22.514554],
[113.898429, 22.51629],
[113.901101, 22.518758],
[113.90252, 22.520339],
[113.90419, 22.522268],
[113.904817, 22.524003],
[113.904943, 22.525594]
]
]
}
]
},
"properties": {
"name": "南山街道",
"fill-opacity": 0,
"stroke-opacity": 1,
"stroke": "#ff0000"
}
},
{
"type": "Feature",
"geometry": {
"type": "Polygon",
"coordinates": [
[
[113.924154, 22.529546],
[113.921386, 22.530166],
[113.919121, 22.530554],
[113.916352, 22.531173],
[113.913919, 22.531251],
[113.91048, 22.531096],
[113.906872, 22.531018],
[113.904775, 22.531561],
[113.904733, 22.535148],
[113.904566, 22.540547],
[113.904525, 22.544441],
[113.903648, 22.544866],
[113.902771, 22.545405],
[113.901644, 22.546909],
[113.898522, 22.550243],
[113.899106, 22.550697],
[113.899629, 22.551075],
[113.900617, 22.55191],
[113.903068, 22.554095],
[113.904438, 22.555289],
[113.905844, 22.556535],
[113.909839, 22.559449],
[113.910997, 22.559744],
[113.911304, 22.56855],
[113.916995, 22.573805],
[113.91733, 22.574065],
[113.917583, 22.574263],
[113.919791, 22.57225],
[113.921637, 22.570313],
[113.922811, 22.568454],
[113.924993, 22.567059],
[113.926838, 22.566207],
[113.929103, 22.56551],
[113.929271, 22.562333],
[113.929187, 22.559776],
[113.928935, 22.557452],
[113.928684, 22.555127],
[113.9286, 22.553191],
[113.928684, 22.549317],
[113.92709, 22.545365],
[113.926922, 22.542653],
[113.927174, 22.538702],
[113.92709, 22.535525],
[113.926167, 22.533588],
[113.924657, 22.531031],
[113.924154, 22.529546]
]
]
},
"properties": {
"name": "南头街道",
"fill-opacity": 0,
"stroke-opacity": 1,
"stroke": "#ff0000"
}
},
{
"type": "Feature",
"geometry": {
"type": "Polygon",
"coordinates": [
[
[113.8836314010808, 22.542701604550405],
[113.88380159719667, 22.542783308066188],
[113.89077849140301, 22.546132601811678],
[113.89347058321243, 22.547209325913347],
[113.89583866319627, 22.5481564588399],
[113.89613826589479, 22.54838942749353],
[113.898522, 22.550243],
[113.901644, 22.546909],
[113.902771, 22.545405000000127],
[113.903648, 22.544866000000127],
[113.904525, 22.544441],
[113.904566, 22.540547],
[113.904733, 22.535148],
[113.904775, 22.531561],
[113.904943, 22.525594],
[113.904817, 22.524003],
[113.90419, 22.522268],
[113.90252, 22.520339],
[113.901101, 22.518758],
[113.898429, 22.51629],
[113.896759, 22.514554],
[113.895089, 22.512973],
[113.893043, 22.510967],
[113.8917060000001, 22.508923],
[113.88899300000013, 22.504680000000114],
[113.887448, 22.502096],
[113.886654, 22.50109300000013],
[113.884984, 22.49997400000012],
[113.879848, 22.49847],
[113.8733350000001, 22.496541],
[113.86936800000012, 22.49538400000011],
[113.872625, 22.485778],
[113.872667, 22.484158],
[113.873711, 22.480455],
[113.874158, 22.479168],
[113.87440900000013, 22.47599],
[113.871589, 22.474759],
[113.868701, 22.482834],
[113.866613, 22.488312000000118],
[113.86511, 22.49379],
[113.862772, 22.499499],
[113.864275, 22.501428],
[113.865027, 22.5022],
[113.863774, 22.506906],
[113.862688, 22.510764],
[113.861937, 22.514313],
[113.863023, 22.51493],
[113.863023, 22.515932000000127],
[113.865695, 22.51755300000013],
[113.867615, 22.51871000000011],
[113.8722080000001, 22.521025],
[113.876133, 22.523108],
[113.878972, 22.524574],
[113.880726, 22.525345],
[113.882062, 22.526425],
[113.883398, 22.527891],
[113.885152, 22.53144],
[113.88606700000014, 22.53404100000011],
[113.886154, 22.536224],
[113.885736, 22.538385],
[113.884734, 22.541085000000116],
[113.88423300000011, 22.541934],
[113.8838860795896, 22.54237664987374],
[113.8836314010808, 22.542701604550405]
]
]
},
"properties": {
"name": "前海合作区",
"fill-opacity": 0,
"stroke-opacity": 1,
"stroke": "#ff0000"
}
},
{
"type": "Feature",
"geometry": {
"type": "Polygon",
"coordinates": [
[
[113.950287, 22.522788],
[113.950371, 22.523873],
[113.950455, 22.527903],
[113.950455, 22.529918],
[113.951126, 22.534335],
[113.951713, 22.535653],
[113.953727, 22.539217],
[113.954901, 22.541775],
[113.954985, 22.543247],
[113.954901, 22.544642],
[113.955405, 22.546347],
[113.956076, 22.548904],
[113.956244, 22.550454],
[113.955824, 22.552004],
[113.955153, 22.552934],
[113.953895, 22.554251],
[113.953643, 22.555103],
[113.953559, 22.556343],
[113.957754, 22.556576],
[113.960187, 22.556576],
[113.961781, 22.556731],
[113.963711, 22.557118],
[113.965221, 22.55735],
[113.966983, 22.557428],
[113.969164, 22.557428],
[113.970674, 22.557195],
[113.972855, 22.556731],
[113.974617, 22.556498],
[113.975876, 22.556808],
[113.979735, 22.557583],
[113.981748, 22.55797],
[113.983342, 22.55828],
[113.985775, 22.558977],
[113.987705, 22.55921],
[113.991312, 22.558513],
[113.993434, 22.55804],
[113.993398, 22.557027],
[113.993281, 22.553779],
[113.99528, 22.552501],
[113.99528, 22.551932],
[113.992665, 22.55179],
[113.991435, 22.54966],
[113.99205, 22.548665],
[113.991743, 22.546535],
[113.991897, 22.543978],
[113.992819, 22.536307],
[113.990666, 22.536449],
[113.990051, 22.535739],
[113.991435, 22.534744],
[113.990974, 22.533608],
[113.989128, 22.533182],
[113.988667, 22.531335],
[113.986401, 22.530428],
[113.985744, 22.5248],
[113.985744, 22.522243],
[113.985902, 22.521704],
[113.985613, 22.521687],
[113.984489, 22.52212],
[113.981864, 22.52186],
[113.980551, 22.521947],
[113.978489, 22.520994],
[113.977552, 22.520475],
[113.975489, 22.520561],
[113.974833, 22.520994],
[113.973521, 22.52186],
[113.968927, 22.521947],
[113.967896, 22.520994],
[113.966677, 22.521254],
[113.965646, 22.52186],
[113.96274, 22.52186],
[113.961521, 22.52186],
[113.958803, 22.520821],
[113.958428, 22.521254],
[113.957772, 22.521254],
[113.957397, 22.520994],
[113.955803, 22.521773],
[113.954584, 22.522466],
[113.953459, 22.522466],
[113.952616, 22.521773],
[113.951585, 22.52186],
[113.950287, 22.522788]
]
]
},
"properties": {
"name": "沙河街道",
"fill-opacity": 0,
"stroke-opacity": 1,
"stroke": "#ff0000"
}
},
{
"type": "Feature",
"geometry": {
"type": "Polygon",
"coordinates": [
[
[113.948096, 22.499715],
[113.947179, 22.497872],
[113.947741, 22.496313],
[113.948585, 22.493975],
[113.948022, 22.492243],
[113.947929, 22.491117],
[113.946147, 22.489385],
[113.944179, 22.48826],
[113.943148, 22.48774],
[113.940523, 22.487653],
[113.939585, 22.488519],
[113.938742, 22.48722],
[113.937898, 22.486528],
[113.939305, 22.484969],
[113.937617, 22.483583],
[113.935743, 22.484276],
[113.933961, 22.484622],
[113.931899, 22.483843],
[113.931243, 22.481678],
[113.931055, 22.479773],
[113.927493, 22.480726],
[113.925431, 22.481245],
[113.921775, 22.482198],
[113.921869, 22.484449],
[113.92365, 22.484276],
[113.924681, 22.484016],
[113.92515, 22.485315],
[113.9229, 22.485921],
[113.922619, 22.486874],
[113.921869, 22.486874],
[113.921119, 22.486528],
[113.919806, 22.486701],
[113.91915, 22.487307],
[113.917182, 22.487567],
[113.917369, 22.484709],
[113.919244, 22.483843],
[113.920556, 22.482111],
[113.918588, 22.482631],
[113.91765, 22.482111],
[113.916763, 22.482476],
[113.916797, 22.482511],
[113.916808, 22.482578],
[113.916804, 22.482945],
[113.916802, 22.482977],
[113.916787, 22.482997],
[113.916767, 22.483008],
[113.916702, 22.483023],
[113.916567, 22.483025],
[113.91477, 22.489903],
[113.915462, 22.490275],
[113.915966, 22.493526],
[113.91761, 22.493184],
[113.919246, 22.493301],
[113.920043, 22.493262],
[113.919959, 22.495277],
[113.919917, 22.49675],
[113.920798, 22.49675],
[113.92172, 22.497486],
[113.922224, 22.497719],
[113.92344, 22.497757],
[113.925118, 22.497757],
[113.92776, 22.498029],
[113.928976, 22.498029],
[113.93338, 22.498532],
[113.935519, 22.498765],
[113.939085, 22.499075],
[113.945753, 22.499749],
[113.948096, 22.499715]
]
]
},
"properties": {
"name": "蛇口街道",
"fill-opacity": 0,
"stroke-opacity": 1,
"stroke": "#ff0000"
}
},
{
"type": "Feature",
"geometry": {
"type": "Polygon",
"coordinates": [
[
[113.953559, 22.556343],
[113.953384, 22.559872],
[113.95351, 22.564135],
[113.953473, 22.565514],
[113.951873, 22.569211],
[113.949943, 22.572931],
[113.949775, 22.577349],
[113.949943, 22.579674],
[113.951118, 22.581302],
[113.953719, 22.583085],
[113.95481, 22.585255],
[113.955902, 22.58851],
[113.95607, 22.589596],
[113.955482, 22.590758],
[113.955146, 22.591688],
[113.955398, 22.593548],
[113.956153, 22.594789],
[113.958252, 22.596571],
[113.960601, 22.597424],
[113.963035, 22.597579],
[113.964126, 22.596649],
[113.965637, 22.596029],
[113.967232, 22.595641],
[113.968574, 22.595719],
[113.969582, 22.596261],
[113.972016, 22.597424],
[113.972016, 22.600524],
[113.972183, 22.603469],
[113.972099, 22.606336],
[113.974198, 22.608352],
[113.975121, 22.612692],
[113.976044, 22.615095],
[113.977807, 22.616955],
[113.980409, 22.61773],
[113.982507, 22.618195],
[113.983682, 22.618893],
[113.985109, 22.622458],
[113.986703, 22.626178],
[113.98771, 22.627961],
[113.988513, 22.629181],
[113.98959, 22.629891],
[113.990974, 22.628755],
[113.991435, 22.629891],
[113.993742, 22.628329],
[113.996818, 22.628897],
[113.99728, 22.626483],
[113.99851, 22.625348],
[113.999433, 22.622792],
[114.000817, 22.621941],
[114.002201, 22.622225],
[114.002355, 22.620663],
[114.003893, 22.618817],
[114.003585, 22.61683],
[114.004354, 22.613564],
[114.006354, 22.614132],
[114.0062, 22.612144],
[114.007277, 22.611577],
[114.007431, 22.609305],
[114.008199, 22.608879],
[114.009276, 22.608879],
[114.009891, 22.607885],
[114.010968, 22.607885],
[114.011737, 22.606323],
[114.015428, 22.605045],
[114.017428, 22.605045],
[114.018658, 22.601496],
[114.018197, 22.599082],
[114.018966, 22.596242],
[114.021427, 22.594822],
[114.020657, 22.590562],
[114.019119, 22.588574],
[114.019581, 22.587012],
[114.018658, 22.585308],
[114.017581, 22.58403],
[114.016351, 22.584172],
[114.014198, 22.582184],
[114.013583, 22.583178],
[114.011583, 22.582752],
[114.008046, 22.582752],
[114.00497, 22.58261],
[114.002663, 22.580906],
[114.000048, 22.578491],
[114.001125, 22.575935],
[113.999894, 22.575225],
[114.00051, 22.570822],
[113.999279, 22.569118],
[113.997587, 22.566988],
[113.998664, 22.565994],
[113.999125, 22.563437],
[114.001432, 22.559318],
[113.997741, 22.558892],
[113.993434, 22.55804],
[113.991312, 22.558513],
[113.987705, 22.55921],
[113.985775, 22.558977],
[113.983342, 22.55828],
[113.981748, 22.55797],
[113.979735, 22.557583],
[113.975876, 22.556808],
[113.974617, 22.556498],
[113.972855, 22.556731],
[113.970674, 22.557195],
[113.969164, 22.557428],
[113.966983, 22.557428],
[113.965221, 22.55735],
[113.963711, 22.557118],
[113.961781, 22.556731],
[113.960187, 22.556576],
[113.957754, 22.556576],
[113.953559, 22.556343]
]
]
},
"properties": {
"name": "桃源街道",
"fill-opacity": 0,
"stroke-opacity": 1,
"stroke": "#ff0000"
}
},
{
"type": "Feature",
"geometry": {
"type": "Polygon",
"coordinates": [
[
[113.917583, 22.574263],
[113.921917, 22.577639],
[113.923609, 22.580764],
[113.924378, 22.584314],
[113.922378, 22.586728],
[113.920071, 22.58758],
[113.919302, 22.589994],
[113.91961, 22.59326],
[113.921148, 22.594112],
[113.923609, 22.593828],
[113.923609, 22.595106],
[113.921455, 22.595816],
[113.920994, 22.598514],
[113.918379, 22.602915],
[113.920071, 22.606039],
[113.92284, 22.606891],
[113.923916, 22.609163],
[113.925454, 22.610725],
[113.924532, 22.614984],
[113.922532, 22.618533],
[113.925454, 22.622366],
[113.925762, 22.625348],
[113.926377, 22.626483],
[113.923916, 22.630033],
[113.925454, 22.632304],
[113.923763, 22.634433],
[113.924685, 22.636846],
[113.926531, 22.638124],
[113.927454, 22.639402],
[113.929607, 22.640679],
[113.930991, 22.641105],
[113.932376, 22.644654],
[113.932837, 22.645363],
[113.932683, 22.64806],
[113.935759, 22.64948],
[113.935759, 22.650615],
[113.936836, 22.651751],
[113.938989, 22.65388],
[113.941911, 22.654022],
[113.945141, 22.655441],
[113.946371, 22.653596],
[113.948371, 22.654022],
[113.950063, 22.651893],
[113.951754, 22.654022],
[113.955138, 22.656009],
[113.956061, 22.654873],
[113.958983, 22.654164],
[113.961444, 22.654589],
[113.962828, 22.653028],
[113.962982, 22.650757],
[113.964212, 22.647492],
[113.962828, 22.647209],
[113.961598, 22.645505],
[113.961905, 22.643518],
[113.964674, 22.643802],
[113.966827, 22.640679],
[113.969442, 22.639118],
[113.971441, 22.640111],
[113.976055, 22.639686],
[113.977131, 22.640395],
[113.979285, 22.639118],
[113.981899, 22.639827],
[113.98313, 22.638124],
[113.984514, 22.63784],
[113.986206, 22.635285],
[113.987436, 22.634291],
[113.98759, 22.633014],
[113.988051, 22.63131],
[113.988513, 22.629181],
[113.98771, 22.627961],
[113.986703, 22.626178],
[113.985109, 22.622458],
[113.983682, 22.618893],
[113.982507, 22.618195],
[113.980409, 22.61773],
[113.977807, 22.616955],
[113.976044, 22.615095],
[113.975121, 22.612692],
[113.974198, 22.608352],
[113.972099, 22.606336],
[113.972183, 22.603469],
[113.972016, 22.600524],
[113.972016, 22.597424],
[113.969582, 22.596261],
[113.968574, 22.595719],
[113.967232, 22.595641],
[113.965637, 22.596029],
[113.964126, 22.596649],
[113.963035, 22.597579],
[113.960601, 22.597424],
[113.958252, 22.596571],
[113.956153, 22.594789],
[113.955398, 22.593548],
[113.955146, 22.591688],
[113.955482, 22.590758],
[113.95607, 22.589596],
[113.955902, 22.58851],
[113.95481, 22.585255],
[113.953719, 22.583085],
[113.951118, 22.581302],
[113.949943, 22.579674],
[113.949775, 22.577349],
[113.949943, 22.572931],
[113.951873, 22.569211],
[113.953473, 22.565514],
[113.95351, 22.564135],
[113.953384, 22.559872],
[113.953559, 22.556343],
[113.952804, 22.556188],
[113.950455, 22.556111],
[113.948358, 22.555878],
[113.947519, 22.555646],
[113.944247, 22.555103],
[113.942737, 22.555103],
[113.940388, 22.555258],
[113.937955, 22.555413],
[113.934431, 22.555336],
[113.930488, 22.555181],
[113.928684, 22.555127],
[113.928935, 22.557452],
[113.929187, 22.559776],
[113.929271, 22.562333],
[113.929103, 22.56551],
[113.926838, 22.566207],
[113.924993, 22.567059],
[113.922811, 22.568454],
[113.921637, 22.570313],
[113.919791, 22.57225],
[113.917583, 22.574263]
]
]
},
"properties": {
"name": "西丽街道",
"fill-opacity": 0,
"stroke-opacity": 1,
"stroke": "#ff0000"
}
},
{
"type": "Feature",
"geometry": {
"type": "Polygon",
"coordinates": [
[
[113.950287, 22.522788],
[113.950553, 22.521254],
[113.950085, 22.520994],
[113.950366, 22.520128],
[113.95121, 22.519175],
[113.951116, 22.518136],
[113.950553, 22.516751],
[113.949897, 22.516837],
[113.950272, 22.515365],
[113.949616, 22.51346],
[113.948679, 22.513633],
[113.948397, 22.512507],
[113.94971, 22.511555],
[113.950835, 22.509909],
[113.95061, 22.508386],
[113.949738, 22.50839],
[113.94655, 22.508235],
[113.943027, 22.508157],
[113.938833, 22.50808],
[113.932793, 22.508002],
[113.927256, 22.507925],
[113.923649, 22.50777],
[113.918532, 22.50777],
[113.920798, 22.512419],
[113.921805, 22.514821],
[113.922141, 22.517921],
[113.923064, 22.520711],
[113.923651, 22.522183],
[113.92449, 22.524509],
[113.924574, 22.525594],
[113.924406, 22.527841],
[113.924154, 22.529546],
[113.924657, 22.531031],
[113.926167, 22.533588],
[113.92709, 22.535525],
[113.927174, 22.538702],
[113.926922, 22.542653],
[113.92709, 22.545365],
[113.928684, 22.549317],
[113.9286, 22.553191],
[113.928684, 22.555127],
[113.930488, 22.555181],
[113.934431, 22.555336],
[113.937955, 22.555413],
[113.940388, 22.555258],
[113.942737, 22.555103],
[113.944247, 22.555103],
[113.947519, 22.555646],
[113.948358, 22.555878],
[113.950455, 22.556111],
[113.952804, 22.556188],
[113.953559, 22.556343],
[113.953643, 22.555103],
[113.953895, 22.554251],
[113.955153, 22.552934],
[113.955824, 22.552004],
[113.956244, 22.550454],
[113.956076, 22.548904],
[113.955405, 22.546347],
[113.954901, 22.544642],
[113.954985, 22.543247],
[113.954901, 22.541775],
[113.953727, 22.539217],
[113.951713, 22.535653],
[113.951126, 22.534335],
[113.950455, 22.529918],
[113.950455, 22.527903],
[113.950371, 22.523873],
[113.950287, 22.522788]
]
]
},
"properties": {
"name": "粤海街道",
"fill-opacity": 0,
"stroke-opacity": 1,
"stroke": "#ff0000"
}
},
{
"type": "Feature",
"geometry": {
"type": "Polygon",
"coordinates": [
[
[113.871589, 22.474759],
[113.874409, 22.47599],
[113.874158, 22.479168],
[113.875248, 22.481338],
[113.876087, 22.482656],
[113.876507, 22.484206],
[113.876003, 22.485446],
[113.877933, 22.486764],
[113.879526, 22.488237],
[113.883804, 22.488004],
[113.886572, 22.486686],
[113.888639, 22.48642],
[113.891853, 22.488234],
[113.894374, 22.490717],
[113.894961, 22.492112],
[113.897561, 22.49126],
[113.899226, 22.491076],
[113.899964, 22.49242],
[113.899549, 22.494798],
[113.900581, 22.495135],
[113.901504, 22.495988],
[113.90142, 22.498235],
[113.901924, 22.499553],
[113.903266, 22.499941],
[113.904021, 22.500948],
[113.906453, 22.503971],
[113.907318, 22.505639],
[113.909989, 22.506988],
[113.912493, 22.507925],
[113.918532, 22.50777],
[113.923649, 22.50777],
[113.927256, 22.507925],
[113.932793, 22.508002],
[113.938833, 22.50808],
[113.943027, 22.508157],
[113.94655, 22.508235],
[113.949738, 22.50839],
[113.95061, 22.508386],
[113.950553, 22.508004],
[113.949897, 22.506965],
[113.947929, 22.506012],
[113.947835, 22.50506],
[113.948866, 22.504194],
[113.949522, 22.502808],
[113.949335, 22.50125],
[113.948096, 22.499715],
[113.945753, 22.499749],
[113.939085, 22.499075],
[113.935519, 22.498765],
[113.93338, 22.498532],
[113.928976, 22.498029],
[113.92776, 22.498029],
[113.925118, 22.497757],
[113.92344, 22.497757],
[113.922224, 22.497719],
[113.92172, 22.497486],
[113.920798, 22.49675],
[113.919917, 22.49675],
[113.919959, 22.495277],
[113.920043, 22.493262],
[113.919246, 22.493301],
[113.91761, 22.493184],
[113.915966, 22.493526],
[113.915462, 22.490275],
[113.91477, 22.489903],
[113.916567, 22.483025],
[113.916702, 22.483023],
[113.916767, 22.483008],
[113.916787, 22.482997],
[113.916802, 22.482977],
[113.916804, 22.482945],
[113.916808, 22.482578],
[113.916797, 22.482511],
[113.916763, 22.482476],
[113.91615, 22.481678],
[113.913526, 22.482544],
[113.911838, 22.481418],
[113.911838, 22.479946],
[113.91465, 22.480466],
[113.914744, 22.478561],
[113.913807, 22.477695],
[113.912401, 22.477695],
[113.910057, 22.479427],
[113.907995, 22.477868],
[113.909495, 22.476309],
[113.909495, 22.475616],
[113.911838, 22.474404],
[113.912588, 22.473798],
[113.912072, 22.472715],
[113.910713, 22.473148],
[113.910291, 22.472412],
[113.911416, 22.472022],
[113.911322, 22.471675],
[113.910103, 22.472065],
[113.909916, 22.471589],
[113.910947, 22.471199],
[113.910853, 22.470896],
[113.909775, 22.471112],
[113.909588, 22.470722],
[113.910713, 22.470289],
[113.910525, 22.469813],
[113.906635, 22.471285],
[113.904572, 22.473711],
[113.903541, 22.474967],
[113.90326, 22.474534],
[113.903166, 22.473798],
[113.902651, 22.473754],
[113.901385, 22.472715],
[113.903073, 22.470939],
[113.904432, 22.469423],
[113.901901, 22.467604],
[113.898948, 22.465698],
[113.896885, 22.467777],
[113.894495, 22.466391],
[113.895433, 22.461583],
[113.896371, 22.458552],
[113.895996, 22.457512],
[113.891777, 22.452575],
[113.886903, 22.446511],
[113.885778, 22.447377],
[113.885778, 22.451102],
[113.885309, 22.45526],
[113.887184, 22.457859],
[113.886246, 22.46141],
[113.887934, 22.462536],
[113.887465, 22.466001],
[113.887465, 22.466867],
[113.885871, 22.46782],
[113.884184, 22.467127],
[113.883153, 22.46886],
[113.882965, 22.473018],
[113.883903, 22.473797],
[113.884653, 22.473797],
[113.885871, 22.47579],
[113.879309, 22.478821],
[113.877997, 22.476309],
[113.877435, 22.475183],
[113.878466, 22.473364],
[113.880809, 22.470592],
[113.881278, 22.465655],
[113.881934, 22.457945],
[113.880247, 22.457252],
[113.87556, 22.466694],
[113.872466, 22.473018],
[113.871589, 22.474759]
]
]
},
"properties": {
"name": "招商街道",
"fill-opacity": 0,
"stroke-opacity": 1,
"stroke": "#ff0000"
}
}
]
}
<template> <template>
<svg aria-hidden="true" class="svg-icon"> <svg aria-hidden="true" class="svg-icon">
<use :xlink:href="symbolId" :fill="color" /> <use :xlink:href="symbolId" :fill="color" />
</svg> </svg>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { computed } from 'vue';
const props = defineProps({ const props = defineProps({
prefix: { prefix: {
type: String, type: String,
default: 'icon', default: "icon",
}, },
iconClass: { iconClass: {
type: String, type: String,
required: false required: false,
}, },
color: { color: {
type: String, type: String,
default: '' default: "",
} },
}) });
const symbolId = computed(() => `#${props.prefix}-${props.iconClass}`); const symbolId = computed(() => `#${props.prefix}-${props.iconClass}`);
</script> </script>
<style scoped> <style scoped>
.svg-icon { .svg-icon {
width: 1em; width: 1em;
height: 1em; height: 1em;
vertical-align: -0.15em; vertical-align: -0.15em;
overflow: hidden; overflow: hidden;
fill: currentColor; fill: currentColor;
} }
</style> </style>
\ No newline at end of file
<template>
<div>
<div ref="commonEchartRef" :style="{ height: height, width: width }"></div>
</div>
</template>
<script setup lang='ts'>
import { ref, onMounted, watchEffect } from 'vue'
import useEcharts from '@/hooks/useEcharts';
//接收父组件传递的参数
//withDefaults:设置默认值
const props = withDefaults(defineProps<{
width?: string,
height: string,
optios: any
}>(), {
width: '100%',
height: '360px'
})
//定义ref属性
const commonEchartRef = ref<HTMLElement>()
onMounted(() => {
//叹号:断定commonEchartRef.value存在
const { setOptions, resize } = useEcharts(commonEchartRef.value!)
watchEffect(() => {
setOptions(props.optios)
})
//自适应
window.addEventListener('resize', () => {
resize();
})
})
</script>
<style scoped lang='scss'>
</style>
\ No newline at end of file
...@@ -4,17 +4,17 @@ ...@@ -4,17 +4,17 @@
</el-icon> </el-icon>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { computed } from "vue" import { Fold, Expand } from "@element-plus/icons-vue";
import { Fold, Expand } from "@element-plus/icons-vue" import { useStore } from "@/store/index";
import { useStore } from "@/store/index"
const store = useStore() const store = useStore();
const status = computed(() => { const status = computed(() => {
return store.getters["menu/getCollapse"] return store.getters["menu/getCollapse"];
}) });
//图标切换 //图标切换
const changeIcon = () => { const changeIcon = () => {
store.commit("menu/setCollapse", !status.value) store.commit("menu/setCollapse", !status.value);
} };
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.fa-icons { .fa-icons {
......
...@@ -11,19 +11,18 @@ ...@@ -11,19 +11,18 @@
</el-menu> </el-menu>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { computed } from "vue" import { useStore } from "@/store/index";
import { useRoute } from "vue-router" import MenuItem from "./MenuItem.vue";
import { useStore } from "@/store/index" import MenuLogo from "@/layout/menu/MenuLogo.vue";
import MenuItem from "./MenuItem.vue"
import MenuLogo from "@/layout/menu/MenuLogo.vue"
// setup语法糖中 定义的数据和方法,直接可以在模板中使用,无需要 return // setup语法糖中 定义的数据和方法,直接可以在模板中使用,无需要 return
const store = useStore() const store = useStore();
//当前路由 //当前路由
const route = useRoute() const route = useRoute();
const activeIdex = computed(() => { const activeIdex = computed(() => {
const { path } = route const { path } = route;
return path return path;
}) });
//菜单数据 //菜单数据
const menuList = [ const menuList = [
{ {
...@@ -53,11 +52,11 @@ const menuList = [ ...@@ -53,11 +52,11 @@ const menuList = [
icon: "DataLine", icon: "DataLine",
}, },
}, },
] ];
const isCollapse = computed(() => { const isCollapse = computed(() => {
return store.getters["menu/getCollapse"] return store.getters["menu/getCollapse"];
}) });
</script> </script>
<style scoped> <style scoped>
@keyframes logoAnimation { @keyframes logoAnimation {
......
<template> <template>
<el-tabs <el-tabs
v-model="activeTab" v-model="activeTab"
@tab-click="clickBtn" @tab-click="clickBtn"
type="card" type="card"
closable closable
@tab-remove="removeTab" @tab-remove="removeTab"
> >
<el-tab-pane <el-tab-pane
v-for="item in tabsList" v-for="item in tabsList"
:key="item.path" :key="item.path"
:label="item.title" :label="item.title"
:name="item.path" :name="item.path"
></el-tab-pane> ></el-tab-pane>
</el-tabs> </el-tabs>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { ref, computed, watch, onMounted } from 'vue' import { useStore } from "@/store";
import { useStore } from '@/store' import { ITabe } from "@/store/types";
import { useRoute, useRouter } from 'vue-router'
import { ITabe } from '@/store/types' const route = useRoute();
const route = useRoute() const router = useRouter();
const router = useRouter() const store = useStore();
const store = useStore() //获取tabs数据
//获取tabs数据 const tabsList = computed(() => {
const tabsList = computed(() => {
// return store.getters['getTabs'] // return store.getters['getTabs']
return store.getters['tabs/getTabs'] return store.getters["tabs/getTabs"];
}) });
//当前激活的选项卡,他跟当前激活的路由是一样的; //当前激活的选项卡,他跟当前激活的路由是一样的;
const activeTab = ref('') const activeTab = ref("");
const setActiveTab = () => { const setActiveTab = () => {
activeTab.value = route.path activeTab.value = route.path;
} };
//删除选项卡 //删除选项卡
const removeTab = (targetName: string) => { const removeTab = (targetName: string) => {
if (targetName === '/home') return if (targetName === "/home") return;
//选项卡数据列表 //选项卡数据列表
const tabs = tabsList.value const tabs = tabsList.value;
//当前激活的选项卡 //当前激活的选项卡
let activeName = activeTab.value let activeName = activeTab.value;
if (activeName === targetName) { if (activeName === targetName) {
tabs.forEach((tab: ITabe, index: number) => { tabs.forEach((tab: ITabe, index: number) => {
if (tab.path === targetName) { if (tab.path === targetName) {
const nextTab = tabs[index + 1] || tabs[index - 1] const nextTab = tabs[index + 1] || tabs[index - 1];
if (nextTab) { if (nextTab) {
activeName = nextTab.path activeName = nextTab.path;
} }
} }
}) });
} }
//重新设置当前激活的选项卡 //重新设置当前激活的选项卡
activeTab.value = activeName activeTab.value = activeName;
//重新设置选项卡数据 //重新设置选项卡数据
store.state.tabs.tabsList = tabs.filter( store.state.tabs.tabsList = tabs.filter(
(tab: ITabe) => tab.path !== targetName (tab: ITabe) => tab.path !== targetName
) );
//跳转路由 //跳转路由
router.push({ path: activeName }) router.push({ path: activeName });
} };
//添加选项卡 //添加选项卡
const addTab = () => { const addTab = () => {
//从当前路由获取path和title //从当前路由获取path和title
const { path, meta } = route const { path, meta } = route;
//通过vuex设置 //通过vuex设置
const tab: ITabe = { const tab: ITabe = {
path: path, path: path,
title: meta.title as string, title: meta.title as string,
} };
// store.commit('addTabe', tab); // store.commit('addTabe', tab);
store.commit('tabs/addTabe', tab) store.commit("tabs/addTabe", tab);
} };
//监听路由的变化 //监听路由的变化
watch( watch(
() => route.path, () => route.path,
() => { () => {
//设置激活的选项卡 //设置激活的选项卡
setActiveTab() setActiveTab();
//把当前路由添加到选项卡数据 //把当前路由添加到选项卡数据
addTab() addTab();
} }
) );
//解决刷新数据丢失的问题 //解决刷新数据丢失的问题
const beforeRefresh = () => { const beforeRefresh = () => {
if (route.path != '/login') { if (route.path != "/login") {
window.addEventListener('beforeunload', () => { window.addEventListener("beforeunload", () => {
sessionStorage.setItem('tabsView', JSON.stringify(tabsList.value)) sessionStorage.setItem("tabsView", JSON.stringify(tabsList.value));
}) });
let tabSesson = sessionStorage.getItem('tabsView') let tabSesson = sessionStorage.getItem("tabsView");
if (tabSesson) { if (tabSesson) {
let oldTabs = JSON.parse(tabSesson) let oldTabs = JSON.parse(tabSesson);
if (oldTabs.length > 0) { if (oldTabs.length > 0) {
store.state.tabs.tabsList = oldTabs store.state.tabs.tabsList = oldTabs;
}
} }
}
} }
} };
onMounted(() => { onMounted(() => {
//解决刷新选项卡数据丢失的问题 //解决刷新选项卡数据丢失的问题
beforeRefresh() beforeRefresh();
//设置激活的选项卡 //设置激活的选项卡
setActiveTab() setActiveTab();
//把当前路由添加到选项卡数据 //把当前路由添加到选项卡数据
addTab() addTab();
}) });
//选项卡点击事件 //选项卡点击事件
const clickBtn = (tab: any) => { const clickBtn = (tab: any) => {
const { props } = tab const { props } = tab;
//跳转路由 //跳转路由
router.push({ path: props.name }) router.push({ path: props.name });
} };
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
:deep(.el-tabs__header) { :deep(.el-tabs__header) {
margin: 0px; margin: 0px;
} }
:deep(.el-tabs__item) { :deep(.el-tabs__item) {
height: 26px !important; height: 26px !important;
line-height: 26px !important; line-height: 26px !important;
text-align: center !important; text-align: center !important;
...@@ -124,24 +123,24 @@ ...@@ -124,24 +123,24 @@
color: #495060; color: #495060;
font-size: 12px !important; font-size: 12px !important;
padding: 0px 10px !important; padding: 0px 10px !important;
} }
:deep(.el-tabs__nav) { :deep(.el-tabs__nav) {
border: none !important; border: none !important;
} }
:deep(.is-active) { :deep(.is-active) {
border-bottom: 1px solid transparent !important; border-bottom: 1px solid transparent !important;
border: 1px solid #42b983 !important; border: 1px solid #42b983 !important;
background-color: #42b983 !important; background-color: #42b983 !important;
color: #fff !important; color: #fff !important;
} }
:deep(.el-tabs__item:hover) { :deep(.el-tabs__item:hover) {
color: #495060 !important; color: #495060 !important;
} }
:deep(.is-active:hover) { :deep(.is-active:hover) {
color: #fff !important; color: #fff !important;
} }
</style> </style>
import { createRouter, createWebHashHistory, RouteRecordRaw } from 'vue-router' import { createRouter, createWebHashHistory, RouteRecordRaw } from "vue-router";
import Layout from '@/layout/index.vue' import Layout from "@/layout/index.vue";
const routes: Array<RouteRecordRaw> = [ const routes: Array<RouteRecordRaw> = [
{ {
path: '/', path: "/",
component: Layout, component: Layout,
redirect: '/home', redirect: "/home",
children: [ children: [
{ {
path: '/home', path: "/home",
component: () => import('@/views/home/index.vue'), component: () => import("@/views/home/index.vue"),
name: 'home', name: "home",
meta: {
title: "人才库基础设置",
icon: "",
},
},
{
path: "/talentPool",
component: () => import("@/views/talentPool/index.vue"),
name: "talentPool",
meta: {
title: "人才库",
icon: "",
},
},
],
},
{
path: "/login",
name: "login",
component: () => import("@/views/login/login.vue"),
},
{
path: "/bigData",
component: () => import("@/views/bigData/index.vue"),
name: "bigData",
meta: { meta: {
title: '人才库基础设置', title: "人才大数据",
icon: '', icon: "",
}, },
}, },
{ {
path: '/talentPool', path: "/404",
component: () => import('@/views/talentPool/index.vue'), name: "404",
name: 'talentPool', component: () => import("@/views/exception/404.vue"),
meta: { },
title: '人才库', // {
icon: '', // path: '/:catchAll(.*)',
}, // redirect: '/404'
}, // }
{ ];
path: '/bigData',
component: () => import('@/views/bigData/index.vue'),
name: 'bigData',
meta: {
title: '人才大数据',
icon: '',
},
},
],
},
{
path: '/login',
name: 'login',
component: () => import('@/views/login/login.vue'),
},
{
path: '/404',
name: '404',
component: () => import('@/views/exception/404.vue'),
},
// {
// path: '/:catchAll(.*)',
// redirect: '/404'
// }
]
export const asyncRoutes: Array<RouteRecordRaw> = [] export const asyncRoutes: Array<RouteRecordRaw> = [];
const router = createRouter({ const router = createRouter({
history: createWebHashHistory(), history: createWebHashHistory(),
// routes = routes:routes // routes = routes:routes
routes, routes,
}) });
export function addRoutes(routes: any) { export function addRoutes(routes: any) {
router.addRoute(routes) router.addRoute(routes);
} }
export default router export default router;
import { request } from "../config"
export const kingdeeList = (data?: any) => {
return request({
url: "/department/index",
method: "post",
data,
})
}
import { AddDeptModel } from '@/services/api/department/DeptModel'
import { reactive } from 'vue'
export default function useBaseModel() {
//表单验证
const rules = reactive({
parentName: [{
required: true,
message: '请选择上级部门',
trigger: 'change',
}],
name: [{
required: true,
message: '请填写部门名称',
trigger: 'change',
}]
})
//表单数据
const dialogModel = reactive<AddDeptModel>({
type: "",
id: "",
pid: "",
parentName: "",
manager: "",
deptAddress: "",
deptPhone: "",
name: "",
deptCode: "",
orderNum: ""
})
return {
rules,
dialogModel
}
}
\ No newline at end of file
import { ref } from 'vue'
import { AddDeptModel, DeptModel, ListParm } from "@/services/api/department/DeptModel"
import { EditType } from '@/type/BaseEnum';
import useInstance from '@/hooks/useInstance';
import { addDeptApi, editDeptApi, deleteDeptApi } from '@/services/api/department/deptAPI';
import { Result, StatusCode } from '@/type/BastType';
export default function useDept(getDeptList: any, searchParm: ListParm) {
const { global, proxy } = useInstance();
//(vue的官方给的方式)打包的时候会报错
// const addDeptRef = ref<InstanceType<typeof AddAndEdit>>();
const addDeptRef = ref<{ show: (type: string, row?: DeptModel) => void }>();
//搜索
const serachBtn = () => {
getDeptList();
}
//重置
const resetBtn = () => {
//清空搜索框
searchParm.searchName = ''
getDeptList();
}
//新增
const addBtn = () => {
//父组件调用子组件的show方法
addDeptRef.value?.show(EditType.ADD);
}
//编辑
const editBtn = (row: DeptModel) => {
//父组件调用子组件的show方法
addDeptRef.value?.show(EditType.EDIT, row);
}
//删除
const deleteBtn = async (id: number) => {
console.log(global)
let parm = {
id: id
}
const confirm = await global.$myconfirm('确定删除该数据吗?')
if (confirm) {
//执行删除操作
let res = await deleteDeptApi(parm)
if (res && res.code == StatusCode.Success) {
//信息提示
global.$message({ message: res.msg, type: 'success' })
//刷新表格
getDeptList();
}
}
}
//保存
const save = async (parm: AddDeptModel) => {
//提交表单
let res: Result;
if (parm.type == EditType.ADD) { //新增
res = await addDeptApi(parm)
} else { //编辑
res = await editDeptApi(parm)
}
if (res && res.code == StatusCode.Success) {
//信息提示
global.$message({ message: res.msg, type: 'success' })
//刷新表格
getDeptList();
}
}
return {
serachBtn,
addBtn,
editBtn,
deleteBtn,
save,
addDeptRef,
resetBtn
}
}
\ No newline at end of file
/**
* 表格列表的业务逻辑
*/
import { reactive, onMounted, ref, nextTick } from 'vue'
import { DeptListRes, ListParm } from "@/services/api/department/DeptModel"
import { getDeptListApi } from '@/services/api/department/deptAPI'
export default function useDepaTable() {
//表格的高度
const tableHeigth = ref(0);
//定义列表查询参数
const searchParm = reactive<ListParm>({
searchName: ''
})
//定义表格的数据
const tableData = reactive<DeptListRes>({
list: []
})
//获取表格数据
const getDeptList = async () => {
let res = await getDeptListApi(searchParm);
if (res && res.code == 200) {
console.log('加载表格数据')
console.log(res.data)
tableData.list = res.data;
}
}
//首次加载
onMounted(() => {
getDeptList();
nextTick(() => {
tableHeigth.value = window.innerHeight - 200
})
})
return {
searchParm,
tableData,
getDeptList,
tableHeigth
}
}
\ No newline at end of file
import { DeptModel, SelectNode } from '@/services/api/department//DeptModel'
import { reactive, ref } from 'vue'
import { getDeptParentApi } from '@/services/api/department/deptAPI'
import { ElTree } from 'element-plus';
export default function useParent() {
//树的ref属性
const parentTree = ref<InstanceType<typeof ElTree>>();
//上级树的数据
const treeData = reactive({
data: []
})
//选中的数据
const selectNode = reactive<SelectNode>({
id: '',
name: ''
})
//树的属性
const defaultProps = reactive({
children: 'children', //设置树的children
label: 'name', //设置树的名字属性字段
})
//树的点击事件
const handleNodeClick = (data: DeptModel) => {
selectNode.id = data.id;
selectNode.name = data.name
console.log(selectNode)
}
//获取树的数据
const getTreeData = async () => {
let res = await getDeptParentApi();
if (res && res.code == 200) {
treeData.data = res.data;
}
}
//加号和减号的点击事件
const openBtn = (data: DeptModel) => {
console.log(data)
//设置展开或者关闭
data.open = !data.open;
if (parentTree.value) {
parentTree.value.store.nodesMap[data.id].expanded = !data.open;
}
}
return {
treeData,
defaultProps,
handleNodeClick,
getTreeData,
openBtn,
parentTree,
selectNode
}
}
\ No newline at end of file
import { ref } from 'vue'
export default function useSelectParent() {
//parent组件的ref属性
const parentRef = ref<{ show: () => void }>()
//选择上级部门
const selectParent = () =>{
parentRef.value?.show();
}
return {
parentRef,
selectParent
}
}
\ No newline at end of file
import { objectPick } from "@vueuse/shared"; export function isValidKey(
key: string | number | symbol,
export function isValidKey(key: string | number | symbol, object: object): key is keyof typeof object { object: object
): key is keyof typeof object {
return key in object; return key in object;
} }
/** /**
* 复制对象到新对象,src复制到obj * 复制对象到新对象,src复制到obj
* @param obj 目标对象 * @param obj 目标对象
...@@ -12,12 +12,9 @@ export function isValidKey(key: string | number | symbol, object: object): key i ...@@ -12,12 +12,9 @@ export function isValidKey(key: string | number | symbol, object: object): key i
* @param key 源对象属性 * @param key 源对象属性
*/ */
export function CopyData<T, K extends keyof T>(obj: T, src: T, key: K) { export function CopyData<T, K extends keyof T>(obj: T, src: T, key: K) {
obj[key] = src[key] obj[key] = src[key];
} }
/** /**
* 获取对象属性值 * 获取对象属性值
* @param obj 对象 * @param obj 对象
...@@ -25,11 +22,9 @@ export function CopyData<T, K extends keyof T>(obj: T, src: T, key: K) { ...@@ -25,11 +22,9 @@ export function CopyData<T, K extends keyof T>(obj: T, src: T, key: K) {
* @returns 返回对象属性值 * @returns 返回对象属性值
*/ */
export function getProperty<T, K extends keyof T>(obj: T, key: K) { export function getProperty<T, K extends keyof T>(obj: T, key: K) {
return obj[key] return obj[key];
} }
/** /**
* 清空表单 * 清空表单
* @param fromRef 表单的ref属性 * @param fromRef 表单的ref属性
...@@ -37,12 +32,12 @@ export function getProperty<T, K extends keyof T>(obj: T, key: K) { ...@@ -37,12 +32,12 @@ export function getProperty<T, K extends keyof T>(obj: T, key: K) {
*/ */
export function resetForm(fromRef: any, obj: any) { export function resetForm(fromRef: any, obj: any) {
//清空数据 //清空数据
Object.keys(obj).forEach(key => { Object.keys(obj).forEach((key) => {
obj[key] = '' obj[key] = "";
}) });
//清除表单的验证 //清除表单的验证
if (fromRef) { if (fromRef) {
fromRef.resetFields(); fromRef.resetFields();
fromRef.clearValidate(); fromRef.clearValidate();
} }
} }
\ No newline at end of file
<template>
<!-- <div class="map-ball"></div> -->
<div class="ditrict-chart">
<h1>50283份简历</h1>
<div class="echarts" id="nanshanDistrict"></div>
<el-descriptions title="" direction="vertical" :column="5" border>
<el-descriptions-item align="center" label="网格员"
>4358人</el-descriptions-item
>
<el-descriptions-item align="center" label="海外引进人才"
>988人</el-descriptions-item
>
<el-descriptions-item align="center" label="企业中高层管理人员"
>1999人</el-descriptions-item
>
<el-descriptions-item align="center" label="医生"
>6973人</el-descriptions-item
>
<el-descriptions-item align="center" label="教师"
>2938人</el-descriptions-item
>
</el-descriptions>
</div>
</template>
<script setup lang="ts">
import * as echarts from "echarts";
import JSON from "../../../Json/NanshanDistrict.json";
import * as turf from "@turf/turf";
function transFormGeoJson(map: any) {
const multiPolygon = turf.multiPolygon(
map.geometry.geometries.map((geometry: any) => {
return geometry.coordinates;
})
);
multiPolygon.properties = map.properties;
return multiPolygon;
}
function toSplit(map: any) {
let tempArr = map.features.map((i: any) => {
if (i.geometry.type != "GeometryCollection") {
return i;
} else {
return transFormGeoJson(i);
}
});
return turf.featureCollection(tempArr);
}
const init = () => {
let myChart = echarts.init(document.getElementById("nanshanDistrict") as any);
let map = eval(JSON as any);
map = toSplit(map);
echarts.registerMap("南山区", map as any, {});
let option = {
tooltip: {
trigger: "item",
formatter: "{b}<br/>{c} (p / km2)",
},
series: [
{
name: "南山区地图",
type: "map",
mapType: "南山区", // 自定义扩展图表类型
label: {
show: true,
},
data: [
{ name: "南山街道", value: 50 },
{ name: "南头街道", value: 100 },
{ name: "前海合作区", value: 150 },
{ name: "沙河街道", value: 200 },
{ name: "蛇口街道", value: 250 },
{ name: "桃源街道", value: 300 },
{ name: "西丽街道", value: 350 },
{ name: "粤海街道", value: 400 },
{ name: "招商街道", value: 800 },
],
nameMap: {
南山街道: "南山街道",
南头街道: "南头街道",
前海合作区: "前海合作区",
沙河街道: "沙河街道",
蛇口街道: "蛇口街道",
桃源街道: "桃源街道",
西丽街道: "西丽街道",
粤海街道: "粤海街道",
招商街道: "招商街道",
},
},
],
};
myChart.setOption(option);
};
defineExpose({
init,
});
</script>
<style lang="scss" scoped>
.ditrict-chart {
display: flex;
flex-direction: column;
h1 {
width: 100%;
height: 50px;
color: #fff;
text-align: center;
margin: 0;
}
.el-descriptions {
width: 100%;
flex: 1;
}
.echarts {
width: 968px;
height: 580px;
}
}
</style>
<template>
<div id="pie"></div>
</template>
<script setup lang="ts">
import * as echarts from "echarts";
const init = () => {
let chartDom: any = document.getElementById("pie");
let myChart = echarts.init(chartDom);
let option;
let datas = [
[
{ name: "圣彼得堡来客", value: 5.6 },
{ name: "陀思妥耶夫斯基全集", value: 1 },
{ name: "史记精注全译(全6册)", value: 0.8 },
{ name: "加德纳艺术通史", value: 0.5 },
{ name: "表象与本质", value: 0.5 },
{ name: "其它", value: 3.8 },
],
];
option = {
title: {
text: "阅读书籍分布",
left: "center",
textStyle: {
color: "#fff",
},
},
series: datas.map(function (data, idx) {
let top = idx * 33.3;
return {
type: "pie",
radius: [20, 60],
width: 400,
itemStyle: {
borderColor: "#fff",
borderWidth: 1,
},
label: {
alignTo: "edge",
formatter: "{name|{b}}\t{time|{c} 小时}",
minMargin: 5,
edgeDistance: 10,
lineHeight: 15,
color: "#ffffff",
rich: {
time: {
fontSize: 10,
color: "#999",
},
},
},
labelLine: {
length: 15,
length2: 0,
maxSurfaceAngle: 80,
},
labelLayout: function (params: any) {
const isLeft = params.labelRect.x < myChart.getWidth() / 2;
const points = params.labelLinePoints;
points[2][0] = isLeft
? params.labelRect.x
: params.labelRect.x + params.labelRect.width;
return {
labelLinePoints: points,
};
},
data: data,
};
}),
};
option && myChart.setOption(option);
};
defineExpose({
init,
});
</script>
<style lang="scss" scoped>
#pie {
height: 200px;
width: 384px;
}
</style>
<template>
<div id="position"></div>
</template>
<script setup lang="ts">
import * as echarts from "echarts";
const init = () => {
let myChart = echarts.init(document.getElementById("position") as any);
console.log(myChart, "myChart");
let option;
option = {
title: {
text: "职位offer排行榜",
left: "center", // 水平居中
top: "top", // 垂直靠上
textStyle: {
color: "#ffffff",
},
},
// legend: {},
color: ["#7cd7af"],
grid: {
left: "3%",
right: "4%",
bottom: "3%",
containLabel: true,
backgroundColor: "#fff",
},
textStyle: {
color: "#ffffff",
}, //x,y轴字体颜色
xAxis: {
type: "value",
boundaryGap: [0, 0.01],
},
yAxis: {
type: "category",
data: [
"运营专员",
"企管部人事",
"呜呜呜呜",
"产品高级经理",
"学管师",
"人力资源部部长",
"火箭发动机研发",
"大客户销售经理",
"产品VP招聘",
],
},
//
series: [
{
name: "排行",
type: "bar",
label: {
show: true,
position: "right",
color: "#ffffff",
formatter: ({ value }: any) => {
return value + "人";
},
},
data: [3, 3, 2, 2, 1, 1, 1, 1, 1],
},
],
};
option && myChart.setOption(option);
};
defineExpose({
init,
});
</script>
<style lang="scss" scoped>
#position {
width: 394px;
height: 360px;
margin-top: 20px;
// background-color: #fff;
padding-right: 10px;
box-sizing: border-box;
}
</style>
<template> <template>
<div class="-container"></div> <!-- <positionChart ref="positionChartRef" /> -->
<div class="bigData-container">
<div ref="dataScreenRef" class="bigData-content">
<div class="bigData-header">headers</div>
<div class="bigData-main">
<div class="bigData-lf">
<el-descriptions
title="2023年7月30日"
direction="vertical"
:column="2"
border
>
<el-descriptions-item
v-for="item in 8"
:key="item"
align="center"
label="X家"
>企业用户</el-descriptions-item
>
</el-descriptions>
<positionChart ref="positionChartRef" />
</div>
<div class="bigData-ct">
<div class="bigData-map">
<NanshanDistrictChart ref="nanshanDistrictRef" />
</div>
</div>
<div class="bigData-rg">
<el-descriptions title="新增简历" :column="1">
<el-descriptions-item
v-for="item in 19"
:key="item"
align="center"
:label="item + '.王一'"
>
<template #default>
<div>清华大学</div>
<div>销售经理</div>
</template>
</el-descriptions-item>
</el-descriptions>
</div>
</div>
<div class="bigData-footer">
<pieChart ref="pieRef" />
</div>
</div>
</div>
</template> </template>
<script setup lang="ts"></script> <script setup lang="ts">
import NanshanDistrictChart from "./components/NanshanDistrictChart.vue";
import positionChart from "./components/positionChart.vue";
import pieChart from "./components/pieChart.vue";
<style lang="scss" scoped></style> const dataScreenRef = ref();
const nanshanDistrictRef = ref();
const positionChartRef = ref();
const pieRef = ref();
// 设置响应式
const resize = () => {
if (dataScreenRef.value) {
dataScreenRef.value.style.transform = `scale(${getScale()}) translate(-50%, -50%)`;
}
};
// 根据浏览器大小推断缩放比例
const getScale = (width = 1920, height = 1080) => {
let ww = window.innerWidth / width;
let wh = window.innerHeight / height;
return ww < wh ? ww : wh;
};
onMounted(() => {
nanshanDistrictRef.value.init();
positionChartRef.value.init();
pieRef.value.init();
if (dataScreenRef.value) {
dataScreenRef.value.style.transform = `scale(${getScale()}) translate(-50%, -50%)`;
dataScreenRef.value.style.width = `1920px`;
dataScreenRef.value.style.height = `1080px`;
}
window.addEventListener("resize", resize);
});
onBeforeUnmount(() => {
window.removeEventListener("resize", resize);
});
</script>
<style lang="scss" scoped>
:deep(.el-descriptions__title) {
color: #ffffff;
width: 100%;
text-align: center;
}
.bigData-container {
width: 100%;
height: 100%;
background: url("../../assets/bg.png") no-repeat;
background-repeat: no-repeat;
background-attachment: fixed;
background-position: center;
background-size: 100% 100%;
background-size: cover;
.bigData-content {
position: fixed;
top: 50%;
left: 50%;
z-index: 999;
display: flex;
flex-direction: column;
overflow: hidden;
transition: all 0.3s;
transform-origin: left top;
width: 100%;
padding: 20px;
box-sizing: border-box;
.bigData-header {
height: 200px;
width: 100%;
color: #fff;
}
.bigData-main {
box-sizing: border-box;
display: flex;
flex: 1;
width: 100%;
padding: 12px 42px 20px;
.bigData-lf {
width: 394px;
height: 100%;
margin-right: 20px;
display: flex;
flex-direction: column;
justify-content: space-between;
}
.bigData-ct {
display: flex;
flex: 1;
height: 100%;
margin-right: 40px;
.bigData-map {
position: relative;
box-sizing: border-box;
flex: 1;
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
}
}
.bigData-rg {
width: 394px;
height: 100%;
:deep(.el-descriptions__body) {
padding-top: 10px;
.el-descriptions__cell {
display: flex;
.el-descriptions__label {
width: 33.333333%;
}
.el-descriptions__content {
display: flex;
flex: 1;
justify-content: space-around;
}
}
}
}
}
.bigData-footer {
height: 200px;
width: 100%;
color: #fff;
}
}
}
</style>
<template>
<div class="app-container"></div>
</template>
<script lang="ts">
export default {
name: 'Index'
}
</script>
<style lang="scss">
</style>
...@@ -39,10 +39,8 @@ ...@@ -39,10 +39,8 @@
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { ref, computed } from "vue" import { v4 } from "uuid";
import { v4 } from "uuid" import pagination from "@/components/pagination/index.vue";
import pagination from "@/components/pagination/index.vue"
import { kingdeeList } from "@/services/api/dashboard"
const listQuery = ref({ const listQuery = ref({
docType: "INVENTORY", docType: "INVENTORY",
...@@ -50,7 +48,7 @@ const listQuery = ref({ ...@@ -50,7 +48,7 @@ const listQuery = ref({
data: {} as any, data: {} as any,
pageNo: 1, pageNo: 1,
pageSize: 10, pageSize: 10,
}) });
const selectList = [ const selectList = [
{ label: "名称", value: "FMaterialName" }, { label: "名称", value: "FMaterialName" },
...@@ -58,50 +56,48 @@ const selectList = [ ...@@ -58,50 +56,48 @@ const selectList = [
{ label: "仓库", value: "FStockName" }, { label: "仓库", value: "FStockName" },
{ label: "仓位", value: "FStockLocId" }, { label: "仓位", value: "FStockLocId" },
{ label: "编码", value: "FMaterialId.Fnumber" }, { label: "编码", value: "FMaterialId.Fnumber" },
] ];
const selectListValue = ref() const selectListValue = ref();
const tableData = ref() const tableData = ref();
const total = ref(0) const total = ref(0);
const inputValue = ref() const inputValue = ref();
const placeholder = computed(() => { const placeholder = computed(() => {
let str: any let str: any;
selectList.map((item: any) => { selectList.map((item: any) => {
if (item.value == selectListValue.value) { if (item.value == selectListValue.value) {
str = item.label str = item.label;
} }
}) });
return selectListValue.value ? str : "请选择下拉菜单" return selectListValue.value ? str : "请选择下拉菜单";
}) });
const sizeChange = (val: number) => { const sizeChange = (val: number) => {
listQuery.value.pageSize = val listQuery.value.pageSize = val;
init() init();
} };
const currentChange = (val: number) => { const currentChange = (val: number) => {
listQuery.value.pageNo = val listQuery.value.pageNo = val;
init() init();
} };
const handleFilter = () => { const handleFilter = () => {
if (inputValue.value) if (inputValue.value)
listQuery.value.data[selectListValue.value] = inputValue.value listQuery.value.data[selectListValue.value] = inputValue.value;
else listQuery.value.data = {} else listQuery.value.data = {};
init() init();
} };
const headers: any = { Authorization: sessionStorage.getItem("token") } const headers: any = { Authorization: sessionStorage.getItem("token") };
const exportExcelAll = () => {} const exportExcelAll = () => {};
const exportExcelList = () => {} const exportExcelList = () => {};
const init = async () => { const init = async () => {
let newUuid = v4() let newUuid = v4();
const res: any = await kingdeeList() };
console.log(res) init();
}
init()
</script> </script>
...@@ -43,10 +43,8 @@ ...@@ -43,10 +43,8 @@
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { ref, computed } from "vue" import { v4 } from "uuid";
import { v4 } from "uuid" import pagination from "@/components/pagination/index.vue";
import pagination from "@/components/pagination/index.vue"
import { kingdeeList } from "@/services/api/dashboard"
const listQuery = ref({ const listQuery = ref({
docType: "INVENTORY", docType: "INVENTORY",
...@@ -54,7 +52,7 @@ const listQuery = ref({ ...@@ -54,7 +52,7 @@ const listQuery = ref({
data: {} as any, data: {} as any,
pageNo: 1, pageNo: 1,
pageSize: 10, pageSize: 10,
}) });
const selectList = [ const selectList = [
{ label: "名称", value: "FMaterialName" }, { label: "名称", value: "FMaterialName" },
...@@ -62,50 +60,48 @@ const selectList = [ ...@@ -62,50 +60,48 @@ const selectList = [
{ label: "仓库", value: "FStockName" }, { label: "仓库", value: "FStockName" },
{ label: "仓位", value: "FStockLocId" }, { label: "仓位", value: "FStockLocId" },
{ label: "编码", value: "FMaterialId.Fnumber" }, { label: "编码", value: "FMaterialId.Fnumber" },
] ];
const selectListValue = ref() const selectListValue = ref();
const tableData = ref() const tableData = ref();
const total = ref(0) const total = ref(0);
const inputValue = ref() const inputValue = ref();
const placeholder = computed(() => { const placeholder = computed(() => {
let str: any let str: any;
selectList.map((item: any) => { selectList.map((item: any) => {
if (item.value == selectListValue.value) { if (item.value == selectListValue.value) {
str = item.label str = item.label;
} }
}) });
return selectListValue.value ? str : "请选择下拉菜单" return selectListValue.value ? str : "请选择下拉菜单";
}) });
const sizeChange = (val: number) => { const sizeChange = (val: number) => {
listQuery.value.pageSize = val listQuery.value.pageSize = val;
init() init();
} };
const currentChange = (val: number) => { const currentChange = (val: number) => {
listQuery.value.pageNo = val listQuery.value.pageNo = val;
init() init();
} };
const handleFilter = () => { const handleFilter = () => {
if (inputValue.value) if (inputValue.value)
listQuery.value.data[selectListValue.value] = inputValue.value listQuery.value.data[selectListValue.value] = inputValue.value;
else listQuery.value.data = {} else listQuery.value.data = {};
init() init();
} };
const headers: any = { Authorization: sessionStorage.getItem("token") } const headers: any = { Authorization: sessionStorage.getItem("token") };
const exportExcelAll = () => {} const exportExcelAll = () => {};
const exportExcelList = () => {} const exportExcelList = () => {};
const init = async () => { const init = async () => {
let newUuid = v4() let newUuid = v4();
const res: any = await kingdeeList() };
console.log(res) init();
}
init()
</script> </script>
...@@ -22,7 +22,13 @@ ...@@ -22,7 +22,13 @@
"@/*": ["src/*"] "@/*": ["src/*"]
} }
}, },
"include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue"], "include": [
"src/**/*.ts",
"src/**/*.d.ts",
"src/**/*.tsx",
"src/**/*.vue",
"types/auto-imports.d.ts"
],
// ts 排除的文件 // ts 排除的文件
"exclude": ["node_modules"] "exclude": ["node_modules"]
} }
...@@ -3,6 +3,9 @@ ...@@ -3,6 +3,9 @@
declare global { declare global {
const computed: typeof import('vue')['computed'] const computed: typeof import('vue')['computed']
const createApp: typeof import('vue')['createApp'] const createApp: typeof import('vue')['createApp']
const createLogger: typeof import('vuex')['createLogger']
const createNamespacedHelpers: typeof import('vuex')['createNamespacedHelpers']
const createStore: typeof import('vuex')['createStore']
const customRef: typeof import('vue')['customRef'] const customRef: typeof import('vue')['customRef']
const defineAsyncComponent: typeof import('vue')['defineAsyncComponent'] const defineAsyncComponent: typeof import('vue')['defineAsyncComponent']
const defineComponent: typeof import('vue')['defineComponent'] const defineComponent: typeof import('vue')['defineComponent']
...@@ -14,6 +17,10 @@ declare global { ...@@ -14,6 +17,10 @@ declare global {
const inject: typeof import('vue')['inject'] const inject: typeof import('vue')['inject']
const isReadonly: typeof import('vue')['isReadonly'] const isReadonly: typeof import('vue')['isReadonly']
const isRef: typeof import('vue')['isRef'] const isRef: typeof import('vue')['isRef']
const mapActions: typeof import('vuex')['mapActions']
const mapGetters: typeof import('vuex')['mapGetters']
const mapMutations: typeof import('vuex')['mapMutations']
const mapState: typeof import('vuex')['mapState']
const markRaw: typeof import('vue')['markRaw'] const markRaw: typeof import('vue')['markRaw']
const nextTick: typeof import('vue')['nextTick'] const nextTick: typeof import('vue')['nextTick']
const onActivated: typeof import('vue')['onActivated'] const onActivated: typeof import('vue')['onActivated']
...@@ -45,7 +52,10 @@ declare global { ...@@ -45,7 +52,10 @@ declare global {
const useAttrs: typeof import('vue')['useAttrs'] const useAttrs: typeof import('vue')['useAttrs']
const useCssModule: typeof import('vue')['useCssModule'] const useCssModule: typeof import('vue')['useCssModule']
const useCssVars: typeof import('vue')['useCssVars'] const useCssVars: typeof import('vue')['useCssVars']
const useRoute: typeof import('vue-router')['useRoute']
const useRouter: typeof import('vue-router')['useRouter']
const useSlots: typeof import('vue')['useSlots'] const useSlots: typeof import('vue')['useSlots']
const useStore: typeof import('vuex')['useStore']
const watch: typeof import('vue')['watch'] const watch: typeof import('vue')['watch']
const watchEffect: typeof import('vue')['watchEffect'] const watchEffect: typeof import('vue')['watchEffect']
} }
......
...@@ -5,24 +5,19 @@ import '@vue/runtime-core' ...@@ -5,24 +5,19 @@ import '@vue/runtime-core'
declare module '@vue/runtime-core' { declare module '@vue/runtime-core' {
export interface GlobalComponents { export interface GlobalComponents {
DropdownCheck: typeof import('./../src/components/dropdownCheck/dropdownCheck.vue')['default']
ElAside: typeof import('element-plus/es')['ElAside'] ElAside: typeof import('element-plus/es')['ElAside']
ElAvatar: typeof import('element-plus/es')['ElAvatar'] ElAvatar: typeof import('element-plus/es')['ElAvatar']
ElBreadcrumb: typeof import('element-plus/es')['ElBreadcrumb'] ElBreadcrumb: typeof import('element-plus/es')['ElBreadcrumb']
ElBreadcrumbItem: typeof import('element-plus/es')['ElBreadcrumbItem'] ElBreadcrumbItem: typeof import('element-plus/es')['ElBreadcrumbItem']
ElButton: typeof import('element-plus/es')['ElButton'] ElButton: typeof import('element-plus/es')['ElButton']
ElCard: typeof import('element-plus/es')['ElCard'] ElConfigProvider: typeof import('element-plus/es')['ElConfigProvider']
ElCol: typeof import('element-plus/es')['ElCol']
ElContainer: typeof import('element-plus/es')['ElContainer'] ElContainer: typeof import('element-plus/es')['ElContainer']
ElDatePicker: typeof import('element-plus/es')['ElDatePicker'] ElDescriptions: typeof import('element-plus/es')['ElDescriptions']
ElDialog: typeof import('element-plus/es')['ElDialog'] ElDescriptionsItem: typeof import('element-plus/es')['ElDescriptionsItem']
ElDivider: typeof import('element-plus/es')['ElDivider']
ElDrawer: typeof import('element-plus/es')['ElDrawer']
ElDropdown: typeof import('element-plus/es')['ElDropdown'] ElDropdown: typeof import('element-plus/es')['ElDropdown']
ElDropdownItem: typeof import('element-plus/es')['ElDropdownItem'] ElDropdownItem: typeof import('element-plus/es')['ElDropdownItem']
ElDropdownMenu: typeof import('element-plus/es')['ElDropdownMenu'] ElDropdownMenu: typeof import('element-plus/es')['ElDropdownMenu']
ElEmpty: typeof import('element-plus/es')['ElEmpty']
ElForm: typeof import('element-plus/es')['ElForm']
ElFormItem: typeof import('element-plus/es')['ElFormItem']
ElHeader: typeof import('element-plus/es')['ElHeader'] ElHeader: typeof import('element-plus/es')['ElHeader']
ElIcon: typeof import('element-plus/es')['ElIcon'] ElIcon: typeof import('element-plus/es')['ElIcon']
ElInput: typeof import('element-plus/es')['ElInput'] ElInput: typeof import('element-plus/es')['ElInput']
...@@ -30,23 +25,24 @@ declare module '@vue/runtime-core' { ...@@ -30,23 +25,24 @@ declare module '@vue/runtime-core' {
ElMenu: typeof import('element-plus/es')['ElMenu'] ElMenu: typeof import('element-plus/es')['ElMenu']
ElMenuItem: typeof import('element-plus/es')['ElMenuItem'] ElMenuItem: typeof import('element-plus/es')['ElMenuItem']
ElOption: typeof import('element-plus/es')['ElOption'] ElOption: typeof import('element-plus/es')['ElOption']
ElPopconfirm: typeof import('element-plus/es')['ElPopconfirm']
ElPagination: typeof import('element-plus/es')['ElPagination'] ElPagination: typeof import('element-plus/es')['ElPagination']
ElRadio: typeof import('element-plus/es')['ElRadio']
ElRadioGroup: typeof import('element-plus/es')['ElRadioGroup']
ElRow: typeof import('element-plus/es')['ElRow']
ElSelect: typeof import('element-plus/es')['ElSelect'] ElSelect: typeof import('element-plus/es')['ElSelect']
ElSpace: typeof import('element-plus/es')['ElSpace']
ElSubMenu: typeof import('element-plus/es')['ElSubMenu'] ElSubMenu: typeof import('element-plus/es')['ElSubMenu']
ElTable: typeof import('element-plus/es')['ElTable'] ElTable: typeof import('element-plus/es')['ElTable']
ElTableColumn: typeof import('element-plus/es')['ElTableColumn'] ElTableColumn: typeof import('element-plus/es')['ElTableColumn']
ElTabPane: typeof import('element-plus/es')['ElTabPane'] ElTabPane: typeof import('element-plus/es')['ElTabPane']
ElTabs: typeof import('element-plus/es')['ElTabs'] ElTabs: typeof import('element-plus/es')['ElTabs']
ElTree: typeof import('element-plus/es')['ElTree'] InputTable: typeof import('./../src/components/inputTable/index.vue')['default']
ElTreeSelect: typeof import('element-plus/es')['ElTreeSelect'] JCorn: typeof import('./../src/components/corn/JCorn.vue')['default']
ElUpload: typeof import('element-plus/es')['ElUpload'] JCronModal: typeof import('./../src/components/corn/JCronModal.vue')['default']
Form: typeof import('./components/Form.vue')['default'] LitemallPage: typeof import('./../src/components/pagination/litemallPage.vue')['default']
MyForm: typeof import('./../src/components/form/MyForm.vue')['default']
Pagination: typeof import('./../src/components/pagination/index.vue')['default']
RouterLink: typeof import('vue-router')['RouterLink'] RouterLink: typeof import('vue-router')['RouterLink']
RouterView: typeof import('vue-router')['RouterView'] RouterView: typeof import('vue-router')['RouterView']
SvgIcon: typeof import('./../src/components/SvgIcon/index.vue')['default']
SysDialog: typeof import('./../src/components/SysDialog.vue')['default']
} }
} }
......
import { defineConfig } from "vite" import { defineConfig } from "vite";
import vue from "@vitejs/plugin-vue" import vue from "@vitejs/plugin-vue";
// vite 提供的操作env配置变量的方法loadEnv // vite 提供的操作env配置变量的方法loadEnv
import { loadEnv } from "vite" import { loadEnv } from "vite";
// nodejs写法,获取项目目录 // nodejs写法,获取项目目录
import path from "path" import path from "path";
//按需要加载 //按需要加载
import Inspect from "vite-plugin-inspect" import Inspect from "vite-plugin-inspect";
import { viteMockServe } from "vite-plugin-mock" import { viteMockServe } from "vite-plugin-mock";
import { createSvgIconsPlugin } from "vite-plugin-svg-icons" import { createSvgIconsPlugin } from "vite-plugin-svg-icons";
const pathSrc = path.resolve(__dirname, "src") // 导入自动装配插件
import AutoImport from "unplugin-auto-import/vite";
//自动导入ui-组件
import Components from "unplugin-vue-components/vite";
// 按需引入element-plus
import { ElementPlusResolver } from "unplugin-vue-components/resolvers";
import IconsResolver from "unplugin-icons/resolver";
const pathSrc = path.resolve(__dirname, "src");
// https://vitejs.dev/config/ // https://vitejs.dev/config/
export default ({ command, mode }) => { export default ({ command, mode }) => {
const env = loadEnv(mode, process.cwd()) const env = loadEnv(mode, process.cwd());
return defineConfig({ return defineConfig({
plugins: [ plugins: [
vue(), vue(),
...@@ -30,6 +38,29 @@ export default ({ command, mode }) => { ...@@ -30,6 +38,29 @@ export default ({ command, mode }) => {
// default // default
mockPath: "mock", mockPath: "mock",
}), }),
// 配置自动装载配置
AutoImport({
// 生成配置文件,如果是ts项目,通常我们会把声明文件放在根目录/types中,注意,这个文件夹需要先建好,否则可能导致等下无法往里生成auto-imports.d.ts文件
dts: "types/auto-imports.d.ts",
imports: ["vue", "vue-router", "vuex"],
resolvers: [
ElementPlusResolver(),
IconsResolver({
prefix: "Icon",
}),
],
}),
Components({
// 引入组件的,包括自定义组件
// 存放的位置
dts: "types/components.d.ts",
resolvers: [
ElementPlusResolver(),
IconsResolver({
enabledCollections: ["ep"],
}),
],
}),
Inspect(), Inspect(),
], ],
// 服务器配置 // 服务器配置
...@@ -88,7 +119,7 @@ export default ({ command, mode }) => { ...@@ -88,7 +119,7 @@ export default ({ command, mode }) => {
.toString() .toString()
.split("node_modules/")[1] .split("node_modules/")[1]
.split("/")[0] .split("/")[0]
.toString() .toString();
} }
}, },
}, },
...@@ -100,5 +131,5 @@ export default ({ command, mode }) => { ...@@ -100,5 +131,5 @@ export default ({ command, mode }) => {
}, },
}, },
}, },
}) });
} };
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论