Browse Source

Merge remote-tracking branch 'origin/master'

master
DX 3 days ago
parent
commit
49a0c50ad9
  1. 13
      src/api/screen/index.ts
  2. 29
      src/assets/svgs/weather-fine.svg
  3. 1
      src/assets/svgs/weather/feng.svg
  4. 1
      src/assets/svgs/weather/qing.svg
  5. 1
      src/assets/svgs/weather/xue.svg
  6. 1
      src/assets/svgs/weather/yin.svg
  7. 1
      src/assets/svgs/weather/yu.svg
  8. 2
      src/layout/components/UserInfo/src/UserInfo.vue
  9. 1
      src/utils/dict.ts
  10. 25
      src/views/enterprises/index.vue
  11. 6
      src/views/enterprises/update.vue
  12. 4
      src/views/screen/compenonts/airQuality.vue
  13. 184
      src/views/screen/compenonts/leftwrapper.vue
  14. 189
      src/views/screen/compenonts/map.vue
  15. 96
      src/views/screen/compenonts/norm.vue
  16. 12
      src/views/screen/compenonts/numbox.vue
  17. 174
      src/views/screen/compenonts/rightwrapper.vue
  18. 61
      src/views/screen/compenonts/tabber.vue
  19. 39
      src/views/screen/compenonts/weather.vue

13
src/api/screen/index.ts

@ -32,5 +32,18 @@ export const ScreenApi = {
},
getCenter: async (params: any) => {
return await request.get({ url: `/system/big-view-data/getCenter`, params })
},
/**
*
* @param params
*/
getMapData: async (params: any) => {
return await request.get({ url: `/system/big-view-data/getMapData`, params })
},
/**
*
*/
getAirData: async (params: any) => {
return await request.get({ url: `/system/quality-collection/latest`, params })
}
}

29
src/assets/svgs/weather-fine.svg

@ -1,29 +0,0 @@
<svg width="64" height="32" viewBox="0 0 64 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<circle cx="24" cy="12" r="6" fill="#FF9F0A"/>
<path d="M8 25.9811C4.64377 25.7258 2 22.9216 2 19.5C2 16.4869 4.05023 13.9526 6.83173 13.2161C8.26096 10.136 11.381 8 15 8C18.9265 8 22.2657 10.5144 23.4952 14.0209C23.6617 14.0071 23.83 14 24 14C27.3137 14 30 16.6863 30 20C30 23.3137 27.3137 26 24 26H8V25.9811Z" fill="url(#paint0_linear_2112_61726)"/>
<g style="mix-blend-mode:screen">
<path d="M32.0356 13.3538C32.0156 18.1358 28.1241 22.0005 23.3363 21.9804C18.5544 21.9604 14.6897 18.0631 14.7097 13.2811C14.7298 8.49339 18.6271 4.63445 23.409 4.65452C28.1968 4.67461 32.0557 8.5661 32.0356 13.3538Z" fill="url(#paint1_radial_2112_61726)" fill-opacity="0.57"/>
</g>
<path d="M40.5625 24.7773V8.74609C40.5625 8.19141 40.6133 7.78906 40.7148 7.53906C41.0586 6.71094 41.8125 6.29688 42.9766 6.29688H46.5508C47.4023 6.29688 48.0391 6.50391 48.4609 6.91797C48.8594 7.32422 49.0586 7.96875 49.0586 8.85156V24.7773C49.0586 25.4883 48.8594 26.043 48.4609 26.4414C48.0469 26.8477 47.5117 27.0508 46.8555 27.0508H42.6953C42.0781 27.0508 41.5547 26.8477 41.125 26.4414C40.75 26.082 40.5625 25.5273 40.5625 24.7773ZM46.7617 17.125H42.8477V23.9922C42.8477 24.5156 43.1289 24.7773 43.6914 24.7773H45.8594C46.4609 24.7773 46.7617 24.5156 46.7617 23.9922V17.125ZM42.8477 14.8164H46.7617V9.49609C46.7617 9.14453 46.6758 8.90234 46.5039 8.76953C46.3555 8.66016 46.0664 8.60547 45.6367 8.60547H43.7617C43.3945 8.60547 43.1523 8.66016 43.0352 8.76953C42.9102 8.88672 42.8477 9.12891 42.8477 9.49609V14.8164ZM50.3594 15.4727V13.4453H55.8203V12.1211H50.6641V10.082H55.8203V9.02734H50.6641V6.95312H55.8203V5.94531H58.0938V6.95312H63.25V9.02734H58.0938V10.082H63.25V12.1211H58.0938V13.4453H63.5664V15.4727H50.3594ZM50.7461 27.0508V18.9766C50.7461 18.0781 51.0117 17.3945 51.543 16.9258C51.9336 16.582 52.5469 16.4102 53.3828 16.4102H59.957C60.7227 16.4102 61.2656 16.4492 61.5859 16.5273C61.9141 16.5977 62.2188 16.7539 62.5 16.9961C62.9453 17.3789 63.168 18.0391 63.168 18.9766V24.3203C63.168 25.2422 62.9375 25.9375 62.4766 26.4062C62.0547 26.8359 61.5625 27.0508 61 27.0508H60.1914H58.9258V24.9883H59.957C60.3789 24.9883 60.6484 24.8789 60.7656 24.6602C60.8125 24.5664 60.8438 24.4219 60.8594 24.2266H53.0664V27.0508H50.7461ZM53.0664 22.3516H60.8594V21.3438H53.0664V22.3516ZM53.0664 19.5039H60.8594V19.1172C60.8594 18.875 60.7344 18.6875 60.4844 18.5547C60.2578 18.4297 59.9883 18.3672 59.6758 18.3672H54.1328C53.4219 18.3672 53.0664 18.6172 53.0664 19.1172V19.5039Z" fill="url(#paint2_linear_2112_61726)"/>
<defs>
<linearGradient id="paint0_linear_2112_61726" x1="2" y1="17" x2="30" y2="17" gradientUnits="userSpaceOnUse">
<stop stop-color="#D4DEEC"/>
<stop offset="1" stop-color="#D4DEEC" stop-opacity="0.5"/>
</linearGradient>
<radialGradient id="paint1_radial_2112_61726" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(23.3322 13.2883) rotate(0.238345) scale(8.66386 8.66208)">
<stop stop-color="white"/>
<stop offset="0.1059" stop-color="white" stop-opacity="0.8941"/>
<stop offset="0.2365" stop-color="#D8D8D8" stop-opacity="0.7635"/>
<stop offset="0.3687" stop-color="#919191" stop-opacity="0.6313"/>
<stop offset="0.4996" stop-color="#777777" stop-opacity="0.5004"/>
<stop offset="0.629" stop-color="#565656" stop-opacity="0.371"/>
<stop offset="0.7565" stop-color="#3D3D3D" stop-opacity="0.2435"/>
<stop offset="0.838542" stop-color="#323232" stop-opacity="0.1188"/>
<stop offset="1" stop-opacity="0"/>
</radialGradient>
<linearGradient id="paint2_linear_2112_61726" x1="40" y1="16" x2="64" y2="16" gradientUnits="userSpaceOnUse">
<stop stop-color="#D4DEEC"/>
<stop offset="1" stop-color="#D4DEEC" stop-opacity="0.5"/>
</linearGradient>
</defs>
</svg>

Before

Width:  |  Height:  |  Size: 3.7 KiB

1
src/assets/svgs/weather/feng.svg

@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1743131496085" class="icon" viewBox="0 0 1250 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2282" xmlns:xlink="http://www.w3.org/1999/xlink" width="244.140625" height="200"><path d="M485.052632 835.368421m-188.631579 0a188.631579 188.631579 0 1 0 377.263158 0 188.631579 188.631579 0 1 0-377.263158 0Z" fill="#DACE8E" p-id="2283"></path><path d="M233.54386 188.631579m-188.631579 0a188.631579 188.631579 0 1 0 377.263158 0 188.631579 188.631579 0 1 0-377.263158 0Z" fill="#DACE8E" p-id="2284"></path><path d="M1108.435088 375.466667h-163.480702a35.929825 35.929825 0 0 1 0-71.859649h163.480702a35.929825 35.929825 0 0 1 0 71.859649z m-301.810527 0H233.54386a35.929825 35.929825 0 0 1 0-71.859649h573.080701a35.929825 35.929825 0 0 1 0 71.859649z" fill="#DACE8E" p-id="2285"></path><path d="M1223.410526 551.522807h-134.736842a26.947368 26.947368 0 0 1 0-53.894737h134.736842a26.947368 26.947368 0 0 1 0 53.894737z m-301.810526 0H371.873684a26.947368 26.947368 0 0 1 0-53.894737h551.522807a26.947368 26.947368 0 0 1 0 53.894737zM855.129825 206.596491h-114.975439a26.947368 26.947368 0 0 1 0-53.894737h114.975439a26.947368 26.947368 0 0 1 0 53.894737zM256.898246 551.522807h-34.133334a26.947368 26.947368 0 1 1 0-53.894737h34.133334a26.947368 26.947368 0 0 1 0 53.894737z m-199.410527 0H26.947368a26.947368 26.947368 0 0 1 0-53.894737h30.540351a26.947368 26.947368 0 1 1 0 53.894737zM1140.77193 718.596491h-646.736842a35.929825 35.929825 0 0 1 0-71.859649h646.736842a35.929825 35.929825 0 0 1 0 71.859649z" fill="#DACE8E" p-id="2286"></path></svg>

After

Width:  |  Height:  |  Size: 1.7 KiB

1
src/assets/svgs/weather/qing.svg

@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1743131375763" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1600" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M512 511.991381m-255.995691 0a255.995691 255.995691 0 1 0 511.991382 0 255.995691 255.995691 0 1 0-511.991382 0Z" fill="#FDB201" p-id="1601"></path><path d="M477.491781 34.013294c0-18.773017 15.308542-34.013294 34.098626-34.013294h0.819186c18.841283 0 34.098626 15.154945 34.098626 34.013294V140.285639c0 18.790084-15.308542 34.03036-34.098626 34.03036h-0.819186a34.013294 34.013294 0 0 1-34.098626-34.03036V34.013294z m301.545857 70.996138a34.098626 34.098626 0 0 1 47.581066-7.458007l0.665589 0.460792a34.013294 34.013294 0 0 1 7.594539 47.581066l-62.462949 85.963352a34.098626 34.098626 0 0 1-47.581066 7.475075l-0.648522-0.477859a34.013294 34.013294 0 0 1-7.611605-47.581066l62.462948-85.963353z m199.540108 226.470855a34.098626 34.098626 0 0 1 42.904878 21.913231l0.238929 0.767987a34.013294 34.013294 0 0 1-21.810833 42.956077l-101.050032 32.835714a34.098626 34.098626 0 0 1-42.887812-21.930298l-0.255995-0.767987a34.013294 34.013294 0 0 1 21.810833-42.956077l101.050032-32.835714z m21.332974 295.384894a34.098626 34.098626 0 0 1 21.810833 42.956077l-0.238929 0.767987a34.013294 34.013294 0 0 1-42.904878 21.930298l-101.032966-32.835714a34.098626 34.098626 0 0 1-21.844966-42.956077l0.273062-0.767987a34.013294 34.013294 0 0 1 42.887812-21.930298l101.050032 32.835714zM834.895898 878.406547c11.041947 15.189078 7.594539 36.522052-7.594539 47.581066l-0.665589 0.460792a34.013294 34.013294 0 0 1-47.581065-7.458008l-62.462949-85.963353a34.098626 34.098626 0 0 1 7.611605-47.581066l0.648523-0.477858a34.013294 34.013294 0 0 1 47.581065 7.475074l62.462949 85.963353z m-288.370613 111.579988c0 18.773017-15.308542 34.013294-34.098626 34.013294h-0.819186a34.013294 34.013294 0 0 1-34.098626-34.013294V883.697124c0-18.790084 15.308542-34.03036 34.098626-34.03036h0.819186c18.841283 0 34.098626 15.172011 34.098626 34.03036v106.255278z m-301.545857-70.996138a34.098626 34.098626 0 0 1-47.581066 7.458008l-0.665588-0.460792a34.013294 34.013294 0 0 1-7.594539-47.581066l62.462948-85.963353a34.098626 34.098626 0 0 1 47.581066-7.475074l0.648523 0.477858a34.013294 34.013294 0 0 1 7.611605 47.581066l-62.462949 85.963353zM45.422254 692.502476a34.098626 34.098626 0 0 1-42.904878-21.913231l-0.238929-0.767987a34.013294 34.013294 0 0 1 21.810833-42.956077l101.050032-32.835714a34.098626 34.098626 0 0 1 42.887812 21.930298l0.255995 0.767987a34.013294 34.013294 0 0 1-21.810833 42.956077L45.405188 692.519543zM24.072213 397.134648a34.098626 34.098626 0 0 1-21.810832-42.956077l0.238929-0.767987a34.013294 34.013294 0 0 1 42.904878-21.930297l101.032966 32.835714a34.098626 34.098626 0 0 1 21.844965 42.956077l-0.273062 0.767987a34.013294 34.013294 0 0 1-42.887811 21.930297l-101.050033-32.835714zM189.104102 145.576216a34.098626 34.098626 0 0 1 7.594539-47.581066l0.665589-0.460792a34.013294 34.013294 0 0 1 47.581065 7.458008l62.462949 85.963353c11.041947 15.206144 7.594539 36.522052-7.611605 47.581066l-0.648523 0.477858a34.013294 34.013294 0 0 1-47.581065-7.475074L189.104102 145.576216z" fill="#FDB201" p-id="1602"></path></svg>

After

Width:  |  Height:  |  Size: 3.3 KiB

1
src/assets/svgs/weather/xue.svg

@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1743131486615" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2120" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M780.530173 627.358025l153.28395-37.925926a23.703704 23.703704 0 0 0 18.962963-30.024692 26.864198 26.864198 0 0 0-31.604938-17.382716l-203.851852 52.148149-153.28395-82.17284 173.82716-93.234568 203.851852 50.567901h6.320988a25.283951 25.283951 0 0 0 25.28395-20.54321 23.703704 23.703704 0 0 0-18.962963-26.864197l-153.28395-37.925926 180.148148-96.395062a23.703704 23.703704 0 0 0 9.481481-33.185185 26.864198 26.864198 0 0 0-34.765432-9.481481l-180.148148 97.975308 41.08642-142.222222a23.703704 23.703704 0 0 0-18.962963-30.024691 26.864198 26.864198 0 0 0-31.604938 17.382716l-55.308642 189.629629-173.827161 93.234568V284.444444l148.54321-137.481481a22.123457 22.123457 0 0 0 0-34.765432 26.864198 26.864198 0 0 0-36.345679 0l-112.197531 104.296296V23.703704a26.864198 26.864198 0 0 0-52.148148 0v192.790123l-112.197531-104.296296a26.864198 26.864198 0 0 0-36.345679 0 22.123457 22.123457 0 0 0 0 34.765432l148.54321 137.481481v184.888889l-173.82716-93.234568L257.468444 189.62963a26.864198 26.864198 0 0 0-31.604938-17.382716 23.703704 23.703704 0 0 0-18.962963 30.024691l41.08642 142.222222-180.148148-97.975308a26.864198 26.864198 0 0 0-34.765432 9.481481 23.703704 23.703704 0 0 0 9.481481 33.185185l180.148148 96.395062-154.864197 36.345679a23.703704 23.703704 0 0 0-18.962963 30.024691 26.864198 26.864198 0 0 0 31.604938 17.382716l203.851852-50.567901 173.82716 93.234568-153.28395 82.17284-202.271605-50.567902a26.864198 26.864198 0 0 0-31.604938 17.382716 23.703704 23.703704 0 0 0 17.382716 30.024692l153.28395 37.925926L40.974617 734.814815a23.703704 23.703704 0 0 0-12.641975 26.864197 25.283951 25.283951 0 0 0 25.283951 17.382716l12.641975-3.160493 200.691358-107.456791-41.08642 142.222223a23.703704 23.703704 0 0 0 18.962963 30.024691 26.864198 26.864198 0 0 0 31.604938-17.382716l55.308642-188.049383 153.283951-82.172839v164.345679l-148.54321 137.481481a22.123457 22.123457 0 0 0 0 34.765432 26.864198 26.864198 0 0 0 36.345679 0l112.197531-104.296296v213.333333a26.864198 26.864198 0 0 0 52.148148 0V785.382716l112.197531 104.296296a26.864198 26.864198 0 0 0 36.345679 0 22.123457 22.123457 0 0 0 0-34.765432l-148.54321-137.481481V553.08642l153.283951 82.172839 55.308642 188.049383a26.864198 26.864198 0 0 0 31.604938 17.382716 23.703704 23.703704 0 0 0 18.962963-30.024691l-41.08642-142.222223 200.691358 107.456791a28.444444 28.444444 0 0 0 20.54321 3.160493 25.283951 25.283951 0 0 0 15.802469-11.061728 22.123457 22.123457 0 0 0 3.160494-18.962963 23.703704 23.703704 0 0 0-12.641975-14.222222z" fill="#AAE9FF" p-id="2121"></path></svg>

After

Width:  |  Height:  |  Size: 2.8 KiB

1
src/assets/svgs/weather/yin.svg

@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1743131459915" class="icon" viewBox="0 0 1346 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1787" xmlns:xlink="http://www.w3.org/1999/xlink" width="262.890625" height="200"><path d="M835.704881 510.299003m-255.149502 0a255.149502 255.149502 0 1 0 510.299003 0 255.149502 255.149502 0 1 0-510.299003 0Z" fill="#FDB201" p-id="1788"></path><path d="M801.684947 34.019934a34.019934 34.019934 0 0 1 34.019934-34.019934 34.019934 34.019934 0 0 1 34.019933 34.019934v105.461794a34.019934 34.019934 0 0 1-34.019933 34.019933 34.019934 34.019934 0 0 1-34.019934-34.019933z m299.375415 71.44186a34.019934 34.019934 0 0 1 47.627907-6.803987 34.019934 34.019934 0 0 1 6.803987 47.627907l-62.936877 85.049834a34.019934 34.019934 0 0 1-47.627907 6.803987 34.019934 34.019934 0 0 1-6.803987-47.627907z m199.016612 224.531561a34.019934 34.019934 0 0 1 42.524917 22.112957 34.019934 34.019934 0 0 1-22.112957 42.524917l-100.358804 32.318937a34.019934 34.019934 0 0 1-42.524917-22.112957 34.019934 34.019934 0 0 1 22.112957-42.524917z m20.41196 294.272426a34.019934 34.019934 0 0 1 22.112957 42.524917 34.019934 34.019934 0 0 1-42.524917 22.112956l-100.358804-32.318936a34.019934 34.019934 0 0 1-22.112957-42.524917 34.019934 34.019934 0 0 1 42.524917-22.112957z m-163.295681 251.747508a34.019934 34.019934 0 0 1-6.803987 47.627907 34.019934 34.019934 0 0 1-47.627907-6.803987l-62.936877-85.049834a34.019934 34.019934 0 0 1 6.803987-47.627907 34.019934 34.019934 0 0 1 47.627907 6.803987z m-642.976745-731.428571a34.019934 34.019934 0 0 1 6.803987-47.627907 34.019934 34.019934 0 0 1 47.627907 6.803986l62.936877 85.049834a34.019934 34.019934 0 0 1-6.803986 47.627907 34.019934 34.019934 0 0 1-47.627907-6.803987z" fill="#FDB201" p-id="1789"></path><path d="M777.870994 790.963455m-233.036545 0a233.036545 233.036545 0 1 0 466.073089 0 233.036545 233.036545 0 1 0-466.073089 0Z" fill="#91E0FC" p-id="1790"></path><path d="M253.964017 559.627907v-10.20598a241.541528 241.541528 0 1 1 447.362126 129.275747A222.830565 222.830565 0 0 1 376.435778 974.671096a233.036545 233.036545 0 1 1-142.883721-416.744186z" fill="#AAE9FF" p-id="1791"></path></svg>

After

Width:  |  Height:  |  Size: 2.2 KiB

1
src/assets/svgs/weather/yu.svg

@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1743131475683" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1952" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M466.071479 624.975611a26.508437 26.508437 0 0 1-20.927713-43.250608l94.872301-129.751824a26.926991 26.926991 0 1 1 43.250608 32.089161l-94.872301 129.751824a26.508437 26.508437 0 0 1-20.927714 11.161447" fill="#91E0FC" p-id="1953"></path><path d="M316.787122 816.115395a26.508437 26.508437 0 0 1-20.927713-43.250608l94.872301-129.751824a26.926991 26.926991 0 1 1 43.250608 32.08916l-94.872301 129.751824a26.508437 26.508437 0 0 1-20.927714 11.161448" fill="#C4E9F6" p-id="1954"></path><path d="M500.951002 809.13949a26.508437 26.508437 0 0 1-20.927714-43.250608l94.872302-128.356643a26.926991 26.926991 0 1 1 43.250608 32.089161l-94.872302 129.751824a26.508437 26.508437 0 0 1-20.927713 11.161447" fill="#91E0FC" p-id="1955"></path><path d="M343.29556 1017.021445a26.508437 26.508437 0 0 1-20.927714-43.250608l94.872302-129.751824a26.926991 26.926991 0 0 1 43.250608 32.08916L365.618454 1005.859997a26.508437 26.508437 0 0 1-20.927713 11.161448" fill="#AAE9FF" p-id="1956"></path><path d="M157.736499 874.712992a26.508437 26.508437 0 0 1-20.927713-43.250608l94.872301-129.751824a26.926991 26.926991 0 1 1 43.250608 32.089161l-96.267482 129.751824a26.508437 26.508437 0 0 1-22.322894 11.161447M168.897947 1023.997349a26.508437 26.508437 0 0 1-20.927714-43.250608l94.872302-129.751824a26.926991 26.926991 0 1 1 43.250608 32.089161l-94.872302 129.751824a26.508437 26.508437 0 0 1-20.927713 11.161447" fill="#91E0FC" p-id="1957"></path><path d="M740.922117 410.117752m-196.720507 0a196.720507 196.720507 0 1 0 393.441015 0 196.720507 196.720507 0 1 0-393.441015 0Z" fill="#91E0FC" p-id="1958"></path><path d="M300.044952 214.792425v-8.371085a205.091593 205.091593 0 1 1 378.094024 108.82411 188.349422 188.349422 0 0 1-274.850638 251.132563 196.720507 196.720507 0 1 1-119.985557-351.585588z" fill="#AAE9FF" p-id="1959"></path></svg>

After

Width:  |  Height:  |  Size: 2.1 KiB

2
src/layout/components/UserInfo/src/UserInfo.vue

@ -22,8 +22,6 @@ const avatar = computed(() => userStore.user.avatar || avatarImg)
const realName = computed(() => userStore.user.realName ?? '管理员')
const deptName = computed(() => userStore.user.deptName ?? '管理员')
const loginOut = async () => {
try {
await ElMessageBox.confirm(t('common.loginOutMessage'), t('common.reminder'), {

1
src/utils/dict.ts

@ -120,6 +120,7 @@ export enum DICT_TYPE {
ENTERPRISES_QUA = 'enterprise_qua',
//========== 任务 ==========
SELECT_WEEK = 'select_week',
BIG_VIEW_WEEK='big_view_week',//大屏查询周期
// ========== SYSTEM 模块 ==========
SYSTEM_USER_SEX = 'system_user_sex',

25
src/views/enterprises/index.vue

@ -134,6 +134,7 @@
/>
<el-table-column label="操作选项" align="center" width="120px">
<template #default="scope">
<el-button
link
type="primary"
@ -141,30 +142,30 @@
push({
path: 'update',
query: {
id: scope.row.id
id: scope.row.id,
view: true
}
})
"
v-hasPermi="['system:enterprise:update']"
>
编辑
详情
</el-button>
<el-button
link
type="primary"
@click="
<el-button
link
type="primary"
@click="
push({
path: 'update',
query: {
id: scope.row.id,
view: true
id: scope.row.id
}
})
"
v-hasPermi="['system:enterprise:update']"
>
详情
</el-button>
v-hasPermi="['system:enterprise:update']"
>
编辑
</el-button>
</template>
</el-table-column>
</el-table>

6
src/views/enterprises/update.vue

@ -68,17 +68,17 @@
:readonly="isView"
/>
</el-form-item>
<el-form-item label="环保负责" prop="contactName">
<el-form-item label="环保负责" prop="contactName">
<el-input
v-model="formData.contactName"
placeholder="请输入负责人名称"
placeholder="请输入环保负责人名称"
:readonly="isView"
/>
</el-form-item>
<el-form-item label="联系方式" prop="environmentalContactPhone">
<el-input
v-model="formData.environmentalContactPhone"
placeholder="请输入负责人联系方式"
placeholder="请输入环保负责人联系方式"
:readonly="isView"
/>
</el-form-item>

4
src/views/screen/compenonts/airQuality.vue

@ -82,8 +82,8 @@
</template>
<script setup lang="ts">
</script>
</script>
<style scoped lang="scss">
.qulity {
@ -91,6 +91,6 @@
grid-template-rows: 1fr 1fr;
grid-template-columns: 1fr 1fr;
grid-gap: 16px;
place-items: center center;
place-items: center center;
}
</style>

184
src/views/screen/compenonts/leftwrapper.vue

@ -3,10 +3,10 @@
<TitleBox>
<Charts :options="row1Options" ref="row1Chart" />
</TitleBox>
<TitleBox title="各大队企业数量" isRight>
<TitleBox title="任务类型" isRight>
<Charts :options="row2Options" ref="row2Chart" />
</TitleBox>
<TitleBox title="各大队任务进度" isRight>
<TitleBox isRight>
<Charts :options="row3Options" ref="row3Chart" />
</TitleBox>
</section>
@ -22,15 +22,17 @@ let observer: Nullable<ResizeObserver> = null
const row1Options = ref({
grid: {
top: 40,
top: 10,
bottom: 0,
left: 10,
left: 0,
right: 10,
containLabel: true
},
xAxis: {
type: 'category',
data: ['日常任务', '周期任务', '污染防治', '环境监测', '排污管控'],
type: 'value',
max: (v) => {
return Math.floor(v.max + (v.max % 10))
},
axisTick: {
show: false
},
@ -38,6 +40,9 @@ const row1Options = ref({
show: false
},
axisLine: {
show: true,
symbol: ['none', 'arrow'],
symbolSize: [5, 5],
lineStyle: {
color: 'rgba(255, 255, 255, 0.20)'
}
@ -59,7 +64,17 @@ const row1Options = ref({
}
},
axisLabel: {
show: false
show: true,
color: '#fff',
fontSize: 12
},
axisLine: {
show: true,
symbol: ['none', 'arrow'],
symbolSize: [5, 5],
lineStyle: {
color: 'rgba(255, 255, 255, 0.20)'
}
},
splitLine: {
show: true,
@ -68,50 +83,41 @@ const row1Options = ref({
}
}
},
series: [
{
type: 'bar',
data: [100, 90, 10, 90, 90, 20, 56, 89],
barWidth: 5,
itemStyle: {
color: {
type: 'linear',
x: 0,
y: 1,
x2: 0,
y2: 0,
colorStops: [
{
offset: 0,
color: 'rgba(50, 215, 75, 0)'
},
{
offset: 1,
color: 'rgba(50, 215, 75, 0.4)'
}
]
}
}
tooltip: {
show: true,
trigger: 'item',
backgroundColor: 'rgba(29,183,57,0.91)',
borderColor: 'transparent',
formatter: (v) => {
return `${v.data[2].name} <br /> 任务数:${v.data[0]}<br>企业数:${v.data[1]}`
},
textStyle: {
color: '#fff'
}
},
series: [
{
name: '任务类型占比',
type: 'scatter',
data: [100, 90, 10, 90, 90, 20, 56, 89],
data: [],
symbol:
'image://data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAASOSURBVHgBzVhBbBNHFP0z610Ht4SkIieSxrRSpZJIlEOpzKElUlult1SFtjcKSs9FIucW7iCFM2mhtxSomlur5hDSQ61yaQ5JD0hVHBxOICVxkIN3vTP8N95dDMTJrOJEPMmenfXszvOfP///N4JSYqRI+aygESXpqCA6ybe6og+wqolKQpvPbE3T1FSBSpQCwnbg6bv0DTdnIhLWYIJzFNLVWwW6YTN+W0KninRSOnSdL/PRI5WQ5B+h8Io+7V/Y8LrvV9x8Bb90BqXOff7Km55YP5JR/glJapgpdUbMSlrRpe2ItSQ08i91eT79wCPOR0PLAWUnVrP9v8QEbNBX/etLTz+5QFr3RcTGfY8uTR2jVWtCX7OfhA79xj++B4somb28mPtognaAw9WZUamCMWMxtpavaGgz/xKbkVEOzZBZIlGuuL1fPMweWaY24KC/0HcgeHDbWKsFKdncwTIlZISYbycZ4JE3UF5zD53SJBbYFHmXVwFztiRkfCa2TKb3XDvJNJOqeIfO8R8uwyWiORMkS4ZtzZ3r8Bm2zMe7QaYZZvn8B9PwKRXS0O0C3cF92cTMMIUD7zYZAJZS0r1sSEgTVighFAW9PJZqp7spDRZzQxNYOvjT6aLh0CDE1vkOrU8dV2iPEehswwAOnTFcom2+yEzX/n/t03dtX4So/EZQGhWqzhE5PIF7vHvmA+qYKL/+4c007+mp3bsLX/JDOiw1J0r8gHRg+xI4ZI9/b9pRtbGYjPl3pAc92hh/+/Gf//TU/uu1eReifjx3hrlIJRrJMtRekSyRBLeW0H2dwfKv+PdkAeRFtIIrCCkE9aMTZPYv2DyM3LQ1mWekumulb8kCgZObN4S4koBT59GpOt1lm4dd9cRqEsAR9YLNuKpz0MzNpUoXCJnQbZvB2U8GyBJCP/OvrRDPLSJCrxRAyNQltg6ohfibLKFIWvllPDcv2ark2ncNnVy4YuGo2I0Z691Yp+w1m3G58JGZm5esJJnVHXTc+rqVb6xk37pmwv22EGXbAOmqqpmbS9wlWGgOHYd8qx0BB0RNszWpRmFHlshwtDeE2DggNGUICTVs60fI1JxmPvDlvvOm2IrA10XO4FceZt/5JE3FIKk+jLbOXEw9xNl+BkGpLju+X9rDbA8YEaA2xvly7uZxOhZv+5/xlVE166DXLhhFwtCs3dAaQreOG61UQrjvr86O0h7BzBUV/LFeSwIjl5Fn0WZ07YJtpt4JUDHwiozhGgIyvp8QQk3LXn6VGR9Apt5NUokc4hoIczar2edSR+DSRYIWR/lQX/5pN0hFZH6MlyqakzYlBHkrQ/qc4E9aD7bbUk1CcTARii9I6peS6yQrSSY1RJGTs6Wm2+HoeIeRPWwZnIhYS+kYUJRuQBdjAYDoCxGQtl7uqi195YraaFzUwWewTKkOG5oRCchI0ZpHKqHI/I4kiyoThV3zcQyStKvWBxzlFxxSnzUfx7D+Ojv5fiN3tkKqAysejKOZo5QOsxz0brTtwOpFQDYZpcLigNs830JNnhzpoZxBkkTSRp6cTHmk9xRXBRnSHOR+CgAAAABJRU5ErkJggg==',
symbolSize: 15
}
],
legend: {
top: 0,
left: 'center',
show: true,
itemWidth: 15,
itemHeight: 15,
textStyle: {
color: '#fff'
symbolSize: 15,
symbolKeepAspect: true,
clip: false,
label: {
show: true,
position: 'top',
textBorderColor: 'transparent',
color: 'white',
offset: [0, 0],
formatter: (v) => {
return `${v.data[2].name}`
}
}
}
}
]
})
const row2Options = ref({
color: [
@ -122,8 +128,8 @@ const row2Options = ref({
'rgba(4, 180, 64, .2)'
],
title: {
text: '500',
subtext: '入驻企业',
text: '',
subtext: '任务数',
left: '49%',
top: '35%',
textAlign: 'center',
@ -150,32 +156,11 @@ const row2Options = ref({
formatter: '{b} : {c}',
color: '#fff'
},
data: [
{
value: 335,
name: '一大队'
},
{
value: 310,
name: '二大队'
},
{
value: 234,
name: '三大队'
},
{
value: 135,
name: '四大队'
},
{
value: 500,
name: '五大队'
}
]
data: []
}
]
})
const row3Options:any = ref({
const row3Options: any = ref({
grid: {
top: 10,
bottom: 10,
@ -186,7 +171,7 @@ const row3Options:any = ref({
yAxis: [
{
type: 'category',
data: ['一大队', '二大队', '三大队', '四大队', '五大队'],
data: [],
axisTick: {
show: false
},
@ -203,7 +188,7 @@ const row3Options:any = ref({
},
{
type: 'category',
data: ['1', '2', '3', '4', '5'],
data: [],
axisTick: {
show: false
},
@ -220,7 +205,6 @@ const row3Options:any = ref({
}
],
xAxis: {
max: 110,
type: 'value',
axisTick: {
show: false
@ -307,21 +291,9 @@ const row1Chart = ref()
const row2Chart = ref()
const row3Chart = ref()
const initChart = () => {
// leftFirst()
// leftSecond()
// leftThird()
const row1Data=new Array(5).fill(1).map(i=>{
return Math.floor(Math.random()*100)
})
row1Options.value.series[0].data=row1Data
row1Options.value.series[1].data=row1Data
const row3Data=new Array(5).fill(1).map(i=>{
return Math.floor(Math.random()*100)
})
row3Options.value.series[1].data=row3Data
row3Options.value.series[2].data=row3Data
row3Options.value.yAxis[1].data=row3Data
leftFirst()
leftSecond()
leftThird()
}
const handlerResize = () => {
@ -332,32 +304,46 @@ const handlerResize = () => {
const queryParams: any = ref()
//
//
const leftFirst = async () => {
const data: any = await ScreenApi.getLeftFirst(queryParams.value)
row1Options.value.xAxis.data = data.map((i) => i.name)
row1Options.value.series[0].data = data.map((i) => i.value)
row1Options.value.series[1].data = data.map((i) => i.value)
row1Options.value.series[0].data = data.map((i) => {
return [
i.taskCount,
i.enterpriseCount,
{
value: 10,
name: i.name
}
]
})
}
//
//
const leftSecond = async () => {
const data = await ScreenApi.getLeftSecond(queryParams.value)
row2Options.value.title.text = data.enterpriseCount
row2Options.value.series[0].data = data.enterpriseCountGroup
row2Options.value.title.text = data.reduce((r, i) => r + i.value, 0)
row2Options.value.series[0].data = data.map((i) => {
return {
...i,
name: i.label
}
})
}
//
//
const leftThird = async () => {
const data = await ScreenApi.getLeftThird(queryParams.value)
const max = Math.max(...data.map((i) => i.taskCount))
row3Options.value.yAxis[0].data = data.map((i) => i.name)
row3Options.value.yAxis[1].data = data.map((i) => i.execCount)
row3Options.value.series[1].data = data.map((i) => i.finishCount)
row3Options.value.yAxis[1].data = data.map((i) => i.taskCount)
row3Options.value.series[0].data = data.map(() => Math.floor(max * 1.1 + 1))
row3Options.value.series[1].data = data.map((i) => i.taskCount)
row3Options.value.series[2].data = data.map((i) => {
return {
name: i.name,
value: i.finishCount,
symbolSize: !i.finishCount ? 0 : [10, 15]
value: i.taskCount,
symbolSize: !i.taskCount ? 0 : [10, 15]
}
})
}

189
src/views/screen/compenonts/map.vue

@ -1,11 +1,10 @@
<template>
<section class="map-container" ref="mapWrapperRef">
<AirQuality class="air-quality block-box" />
<Weather class="weather block-box" />
<Numbox class="num-box block-box" />
<Tabber class="tabber-box" />
<Tabber class="tabber-box" @change-type="changeType" />
<Norm class="block-box nomr-box" />
<section class="legend">
<section class="legend block-box">
<div class="legend-item">
<span class="legend-text color-#58D764">绿色柱</span>
<span class="legend-label">区域企业数占比</span>
@ -22,35 +21,19 @@
</template>
<script setup lang="ts">
import AirQuality from './airQuality.vue'
import Weather from './weather.vue'
import Numbox from './numbox.vue'
import Tabber from './tabber.vue'
import Norm from './norm.vue'
import { ScreenApi } from '@/api/screen'
import * as echarts from 'echarts'
let observer: Nullable<ResizeObserver> = null
const mapWrapperRef = ref()
const mapPoint = [
{ name: '七里河镇', value: ['41.339430', '121.261680'] },
{ name: '大榆树堡镇', value: ['41.523050', '121.462200'] },
{ name: '稍户营子镇', value: ['41.745590', '121.571260'] },
{ name: '九道岭镇', value: ['41.596910', '121.306600'] },
{ name: '高台子镇', value: ['41.701760', '121.369400'] },
{ name: '瓦子峪镇', value: ['41.682170', '121.534570'] },
{ name: '张家堡镇', value: ['41.392910', '121.442170'] },
{ name: '头道河镇', value: ['41.522750', '121.151930'] },
{ name: '留龙沟镇', value: ['41.404170', '121.05586'] },
{ name: '大定堡满族乡', value: ['41.403600', '121.12812'] },
{ name: '义州街道', value: ['41.535923', '121.238258'] },
{ name: '城关街道', value: ['41.535923', '121.23825'] },
{ name: '刘龙台镇', value: ['41.512160', '120.924230'] },
{ name: '头台镇', value: ['41.640424', '121.202267'] },
{ name: '前杨镇', value: ['41.506351', '121.222911'] },
{ name: '聚粮屯镇', value: ['41.512976', '121.318992'] },
{ name: '地藏寺满族乡', value: ['41.426387', '120.952806'] },
{ name: '白庙子乡', value: ['41.25', '120.22'] }
]
const mapChartRef = ref()
const queryParams = reactive({
selectWeek: undefined
})
const mapOption: any = ref({
geo: [
@ -79,6 +62,9 @@ const mapOption: any = ref({
borderColor: '#34F6BA'
},
zLevel: 0,
tooltip: {
show: false
},
emphasis: {
disabled: true
},
@ -100,6 +86,9 @@ const mapOption: any = ref({
emphasis: {
disabled: true
},
tooltip: {
show: false
},
zlevel: -1
},
{
@ -110,6 +99,9 @@ const mapOption: any = ref({
areaColor: '#078B63',
borderColor: 'transparent'
},
tooltip: {
show: false
},
emphasis: {
disabled: true
},
@ -119,6 +111,9 @@ const mapOption: any = ref({
map: 'yx',
layoutCenter: ['50%', '52%'],
layoutSize: '80%',
tooltip: {
show: false
},
itemStyle: {
areaColor: '#002C1F',
borderColor: 'transparent',
@ -136,24 +131,46 @@ const mapOption: any = ref({
series: [],
xAxis: [],
yAxis: [],
grid: []
grid: [],
tooltip: {
trigger: 'axis',
backgroundColor: 'rgba(31,150,55,0.85)',
borderColor: 'transparent',
textStyle: {
color: '#fff'
},
axisPointer: {
type: 'shadow',
label: {
backgroundColor: '#6a7985'
}
},
formatter: (v) => {
return `${v[0].data.region}<br />${v[0].marker} ${v[0].name} ${v[0].value}%`
}
}
})
const handlerResize = () => {
unref(mapChartRef).resizeHandler()
}
const initMap = () => {
const initMap = async () => {
const res = await ScreenApi.getMapData(queryParams)
const mapData = res.map((i) => {
return {
...i,
gps: i.location.split(',').map((i) => Number(i))
}
})
const chartInstance = unref(mapChartRef).getChartRef()
const BARWIDTH = 18
const SYMBOLHEIGHT = 10
echarts.util.each(mapPoint, (dataItem, id) => {
const BARWIDTH = 15
const SYMBOLHEIGHT = 6
echarts.util.each(mapData as any, (dataItem: any, id) => {
//
const geoCoord = dataItem.value.reverse()
const geoCoord = dataItem.gps.reverse()
//
const coord = chartInstance.convertToPixel('geo', geoCoord)
const value1 = Math.floor(Math.random() * 100)
const value2 = Math.floor(Math.random() * 100)
const idx = `${id}`
mapOption.value.xAxis.push({
id: idx,
@ -168,7 +185,8 @@ const initMap = () => {
},
axisLabel: {
color: '#fff',
fontSize: 10
fontSize: 8,
padding: [2, 0, 0, 20]
},
nameTextStyle: {
color: '#fff'
@ -198,8 +216,8 @@ const initMap = () => {
})
mapOption.value.grid.push({
id: idx,
width: 45,
height: 60,
width: 40,
height: 45,
left: coord[0] - 10,
top: coord[1] - 65,
zLevel: 0
@ -225,26 +243,23 @@ const initMap = () => {
},
data: [
{
value: value1,
value: dataItem.taskRate,
itemStyle: {
color: 'rgba(251,233,71,0.8)'
},
label: {
// formatter: value1.toString()
}
name: '任务数',
region: dataItem.name
},
{
value: value2,
value: dataItem.enterpriseRate,
itemStyle: {
color: 'rgba(88,215,100,0.8)'
},
label: {
// formatter: value2.toString()
}
name: '企业数',
region: dataItem.name
}
]
})
//
mapOption.value.series.push({
name: `${dataItem.name}2`,
@ -253,6 +268,9 @@ const initMap = () => {
xAxisIndex: idx,
yAxisIndex: idx,
zLevel: 3,
tooltip: {
show: false
},
barWidth: BARWIDTH,
label: {
show: false,
@ -322,20 +340,23 @@ const initMap = () => {
coordinateSystem: 'cartesian2d',
xAxisIndex: idx,
yAxisIndex: idx,
tooltip: {
show: false
},
symbolSize: [BARWIDTH, SYMBOLHEIGHT],
symbolOffset: [0, -5],
symbolOffset: [0, -2],
symbolPosition: 'end',
symbol: 'circle',
zLevel: 4,
data: [
{
value: value1,
value: dataItem.taskRate,
itemStyle: {
color: '#fbe947'
}
},
{
value: value2,
value: dataItem.enterpriseRate,
itemStyle: {
color: 'rgb(88,215,100)'
}
@ -351,25 +372,46 @@ const initMap = () => {
yAxisIndex: idx,
symbolPosition: 'end',
symbol: 'circle',
tooltip: {
show: false
},
zLevel: 3,
label: {
show: false
show: true,
position: 'top',
fontSize: 8,
distance: 2,
textBorderColor: 'transparent',
textShadowColor: 'transparent',
formatter: (v) => {
return v.name == '企业数' ? `${dataItem.enterpriseRate}%` : `${dataItem.taskRate}%`
}
},
symbolSize: [BARWIDTH, SYMBOLHEIGHT],
symbolOffset: [0, -5],
symbolOffset: [0, 0],
barGap: '-100%',
data: [
{
value: 100,
itemStyle: {
color: 'rgba(251,233,71,0.6)'
}
},
label: {
color: 'rgba(251,233,71,1)',
offset: [-2, 0]
},
name: '任务数'
},
{
value: 100,
itemStyle: {
color: 'rgba(88,215,100,0.6)'
}
color: 'rgba(88,215,100,.6)'
},
label: {
color: 'rgba(88,215,100,1)',
offset: [2, 0]
},
name: '企业数'
}
]
})
@ -380,6 +422,9 @@ const initMap = () => {
coordinateSystem: 'cartesian2d',
xAxisIndex: idx,
yAxisIndex: idx,
tooltip: {
show: false
},
zLevel: 3,
symbolPosition: 'end',
symbol: 'circle',
@ -388,7 +433,7 @@ const initMap = () => {
},
barGap: '-100%',
symbolSize: [BARWIDTH, SYMBOLHEIGHT],
symbolOffset: [0, -5],
symbolOffset: [0, -2],
data: [
{
value: 0,
@ -407,12 +452,25 @@ const initMap = () => {
})
}
onMounted(() => {
observer = new ResizeObserver(handlerResize)
observer.observe(mapWrapperRef.value)
const changeType = (v) => {
queryParams.selectWeek = v
nextTick(() => {
clearBar()
initMap()
})
}
const clearBar = () => {
mapOption.value.series = []
mapOption.value.xAxis = []
mapOption.value.yAxis = []
mapOption.value.grid = []
// unref(mapChartRef).getChartRef().clear()
}
onMounted(() => {
observer = new ResizeObserver(handlerResize)
observer.observe(mapWrapperRef.value)
})
onUnmounted(() => {
@ -455,17 +513,11 @@ onUnmounted(() => {
padding: 12px;
}
.air-quality {
position: absolute;
left: 12px;
top: 0;
}
.nomr-box {
position: absolute;
right: 12px;
top: 68%;
transform: translateY(-50%);
left: 104px;
top: 0;
padding: 12px 24px;
}
.weather {
@ -477,7 +529,7 @@ onUnmounted(() => {
.num-box {
position: absolute;
right: 12px;
right: 104px;
top: 0;
}
@ -498,8 +550,9 @@ onUnmounted(() => {
.legend {
position: absolute;
left: 20%;
top: 20%;
right: 104px;
bottom: 20%;
padding: 12px;
display: flex;
flex-flow: column nowrap;
gap: 12px;

96
src/views/screen/compenonts/norm.vue

@ -3,42 +3,72 @@
<section class="color-#56CA00"> 实时空气指标 </section>
<section class="norm" v-for="(item, index) in list" :key="index">
<section>
{{ item.name }}
{{ item.label }}
</section>
<section class="flex gap-4px">
<count-to :startVal="0" :endVal="item.value" :duration="1" />
<span>{{ item.suffix }}</span>
</section>
<count-to :startVal="0" :endVal="item.value" :duration="1" :suffix="item.suffiex" />
</section>
</section>
</template>
<script setup lang="ts">
const list = ref([
{
name: 'PM2.5',
value: '36.0',
suffix: 'ug/m³'
},
{
name: 'PM10',
value: '36.0',
suffix: 'ug/m³'
},
{
name: 'CO',
value: '36.0',
suffix: 'm³'
},
{
name: 'NO2',
value: '36.0',
suffix: 'm³'
},
import { ScreenApi } from '@/api/screen'
const list = ref([] as any)
{
name: 'AQI',
value: '48',
suffiex: '+'
const getAirQuality = async () => {
const res = await ScreenApi.getAirData({})
const airData = {
no2: {
name: 'NO2',
suffix: 'ug/m³'
},
pm25: {
name: 'PM2.5',
suffix: 'ug/m³'
},
pm10: {
name: 'PM10',
suffix: 'ug/m³'
},
co: {
name: 'CO',
suffix: 'ug/m³'
},
so2: {
name: 'SO2',
suffix: 'ug/m³'
},
no: {
name: 'NO',
suffix: 'ug/m³'
},
nox: {
name: 'NOx',
suffix: 'ug/m³'
},
o3: {
name: 'O3',
suffix: 'ug/m³'
}
}
])
list.value = Object.keys(res)
.map((key) => {
if (airData.hasOwnProperty(key)) {
return {
label: airData[key].name,
value: res[key],
suffix: airData[key].suffix
}
}
})
.filter((i) => i)
}
onMounted(() => {
getAirQuality()
})
</script>
<style scoped lang="scss">
@ -46,13 +76,13 @@ const list = ref([
display: flex;
flex-flow: row nowrap;
gap: 8px;
align-items: center;
align-items: center;
font-size: 14px;
&::before {
content: '';
width: 5px;
height: 5px;
background-color: #00a261;
width: 5px;
height: 5px;
background-color: #00a261;
}
}
</style>

12
src/views/screen/compenonts/numbox.vue

@ -15,7 +15,7 @@ getCenter()
<template>
<section class="p-12px flex gap-24px">
<section class="flex flex-col gap-8px flex-content-center">
<section class="flex flex-col gap-8px justify-center">
<section>任务数</section>
<count-to
:start-val="0"
@ -23,10 +23,10 @@ getCenter()
:duration="2000"
:options="{ decimal: 2 }"
suffix="+"
class="font-bold color-#FFE700"
class="font-bold color-#FFE700 text-center"
/>
</section>
<section class="flex flex-col gap-8px flex-content-center">
<section class="flex flex-col gap-8px justify-center">
<section>执法数</section>
<count-to
:start-val="0"
@ -34,10 +34,10 @@ getCenter()
:duration="2000"
:options="{ decimal: 2 }"
suffix="+"
class="font-bold color-#16B1FF"
class="font-bold color-#16B1FF text-center"
/>
</section>
<section class="flex flex-col gap-8px flex-content-center">
<section class="flex flex-col gap-8px justify-center">
<section>企业数</section>
<count-to
:start-val="0"
@ -45,7 +45,7 @@ getCenter()
:duration="2000"
:options="{ decimal: 2 }"
suffix="+"
class="font-bold color-#56CA00"
class="font-bold color-#56CA00 text-center"
/>
</section>
</section>

174
src/views/screen/compenonts/rightwrapper.vue

@ -3,24 +3,28 @@
<TitleBox title="执法任务">
<Charts :options="row1Options" ref="row1Chart" />
</TitleBox>
<TitleBox>
<Charts :options="row2Options" ref="row2Chart" />
</TitleBox>
<TitleBox title="资质许可状态">
<TitleBox title="资质临期状态">
<section class="list-container">
<section class="position-absolute inset-0 overflow-y-auto flex flex-col gap-12px list" ref="listRef">
<section class="flex justify-between font-size-14px" v-for="(row, index) in list" :key="index">
<section
class="position-absolute inset-0 overflow-y-auto flex flex-col gap-12px list"
ref="listRef"
>
<section
class="flex justify-between font-size-14px"
v-for="(row, index) in list"
:key="index"
>
<span>{{ row.name }}</span>
<section class="color-#56CA00">
逾期
<count-to :start-val="0" :end-val="row.count" :duration="1000"
:options="{ separator: ',', decimal: 0 }" />
{{ formatDate(row.expiryDate,'YYYY年MM月DD日') }}
</section>
</section>
</section>
</section>
</TitleBox>
<TitleBox>
<Charts :options="row2Options" ref="row2Chart" />
</TitleBox>
<TitleBox>
<Charts :options="row3Options" ref="row3Chart" />
</TitleBox>
@ -30,6 +34,7 @@
<script setup lang="ts">
import TitleBox from './titleBox.vue'
import { ScreenApi } from '@/api/screen'
import { formatDate } from '@/utils/formatTime'
const rightWrapperRef = ref()
let observer: Nullable<ResizeObserver> = null
const row1Options = ref({
@ -42,7 +47,7 @@ const row1Options = ref({
},
xAxis: {
type: 'category',
data: ['十月','十一月', '十二月', '一月', '二月', '三月'],
data: ['十月', '十一月', '十二月', '一月', '二月', '三月'],
axisTick: {
show: false
},
@ -75,7 +80,7 @@ const row1Options = ref({
show: false
},
splitLine: {
show: true,
show: false,
lineStyle: {
color: 'rgba(255,255,255,0.2)'
}
@ -163,23 +168,20 @@ const row1Options = ref({
top: 0,
left: 'center',
show: true,
itemWidth: 15,
itemHeight: 15,
itemWidth: 10,
itemHeight: 10,
textStyle: {
color: '#fff'
}
}
})
const list: any = ref([])
const color = ['#56CA00', '#FFE700', '#16B1FF']
const row2Options: any = ref({
series: [
{
type: 'pie',
itemStyle: {},
center: ['30%', '50%'],
radius: ['50%', '80%'],
roseType: true,
label: {
show: true,
position: 'outside',
@ -191,55 +193,36 @@ const row2Options: any = ref({
show: true,
length: 2
},
data: [
{
value: 335,
name: '审批通过'
},
{
value: 310,
name: '执法签到'
},
{
value: 234,
name: '整改处理'
}
].map((i, index) => {
return {
...i,
itemStyle: {
color: color[index]
}
}
})
data: []
},
{
type: 'pie',
center: ['30%', '50%'],
radius: ['50%', '80%'],
roseType: true,
label: {
show: false
},
labelLine: {
show: false
},
data: []
}
],
legend: {
show: true,
itemWidth: 15,
itemHeight: 15,
itemWidth: 6,
itemHeight: 6,
itemGap: 10,
right: 0,
top: 'center',
orient: 'vertical',
data: [
{
name: '审批通过'
},
{
name: '执法签到'
},
{
name: '整改处理'
}
].map((i, index) => {
return {
...i,
textStyle: {
color: color[index]
}
}
})
icon: 'circle',
itemStyle: {
borderWidth: 1,
borderColor: '#fff'
},
data: []
}
})
const row3Options = ref({
@ -261,7 +244,7 @@ const row3Options = ref({
},
axisLine: {
lineStyle: {
color: 'rgba(255, 255, 255, 0.20)'
color: 'rgba(255, 255, 255, 0.01)'
}
},
axisLabel: {
@ -285,9 +268,9 @@ const row3Options = ref({
show: false
},
splitLine: {
show: true,
show: false,
lineStyle: {
color: 'rgba(255,255,255,0.2)'
color: 'rgba(255,255,255,0.1)'
}
}
},
@ -406,37 +389,49 @@ const row3Chart = ref()
const listRef = ref()
const initChart = () => {
rightFirst()
// rightSecond()
rightSecond()
rightFourth()
rightThird()
}
const queryParams: any = ref()
//
const rightFirst = async () => {
// const data: any = await ScreenApi.getRightFirst(queryParams.value)
// row1Options.value.xAxis.data = data.map((i) => i.name)
// row1Options.value.series[0].data = data.map((i) => i.value)
// row1Options.value.series[1].data = data.map((i) => i.taskValue)
row1Options.value.series[0].data = new Array(6).fill(1).map(i=>{
return Math.floor(Math.random()*100)
})
row1Options.value.series[1].data = new Array(6).fill(1).map(i=>{
return Math.floor(Math.random()*100)
})
const data: any = await ScreenApi.getRightFirst(queryParams.value)
row1Options.value.xAxis.data = data.map((i) => formatDate(i.name, 'M月'))
row1Options.value.series[0].data = data.map((i) => i.inspectionsCount)
row1Options.value.series[1].data = data.map((i) => i.taskCount)
}
//
//
const rightSecond = async () => {
const color = ['#56CA00', '#FFE700', '#16B1FF']
const data = await ScreenApi.getRightSecond(queryParams.value)
row2Options.value.series[0].data = data.map((i, index) => {
return {
value: i.value,
name: i.name,
itemStyle: {
color: 'transparent'
},
label: {
color: color[index]
},
labelLine: {
lineStyle: {
color: color[index]
}
}
}
})
row2Options.value.series[1].data = data.map((i, index) => {
return {
value: i.value,
name: i.name,
itemStyle: {
color: 'transparent',
borderColor: color[index]
}
}
})
@ -445,6 +440,9 @@ const rightSecond = async () => {
name: `${i.name}`,
textStyle: {
color: color[index]
},
itemStyle: {
color: color[index]
}
}
})
@ -455,29 +453,25 @@ const rightSecond = async () => {
}
let timer: any = null
//
//
const rightThird = async () => {
list.value = await ScreenApi.getRightThird(queryParams.value)
console.log(list.value)
timer = setInterval(() => {
unref(listRef).scrollTop += 1;
unref(listRef).scrollTop += 1
if (unref(listRef).scrollTop >= unref(listRef).scrollHeight) {
unref(listRef).scrollTop = 0;
unref(listRef).scrollTop = 0
}
}, 200);
}, 200)
}
//
const rightFourth = async () => {
// const data = await ScreenApi.getRightFourth(queryParams.value)
// row3Options.value.xAxis.data = data.map((i) => i.name)
// row3Options.value.series[0].data = data.map((i) => i.enforcementGrowthRate)
// row3Options.value.series[1].data = data.map((i) => i.taskGrowthRate)
row3Options.value.series[0].data = new Array(5).fill(1).map(i=>{
return Math.floor(Math.random()*100)
})
row3Options.value.series[1].data = new Array(5).fill(1).map(i=>{
return Math.floor(Math.random()*100)
})
const data = await ScreenApi.getRightFourth(queryParams.value)
row3Options.value.xAxis.data = data.map((i) => formatDate(i.name, 'M月'))
row3Options.value.series[0].data = data.map((i) => i.enforcementGrowthRate)
row3Options.value.series[1].data = data.map((i) => i.taskGrowthRate)
}
const handlerResize = () => {
@ -504,7 +498,7 @@ onUnmounted(() => {
width: 100%;
height: 100%;
display: grid;
grid-template-rows: 1.5fr 1fr 1.3fr 1.5fr;
grid-template-rows: 1.5fr 1.3fr 1fr 1.5fr;
grid-template-columns: 1fr;
grid-gap: 20px;

61
src/views/screen/compenonts/tabber.vue

@ -1,15 +1,15 @@
<template>
<section class="flex flex-col flex-items-center gap-8px">
<section class="tabs-box ">
<section
:class="['type-item', curTpye == index ? 'item-active' : '']"
v-for="(item, index) in typeList"
:key="index"
@click="curTpye = index"
>
{{ item }}
</section>
</section>
<section class="flex flex-col flex-items-center gap-24px">
<section class="tabs-box">
<section
:class="['type-item', curTpye == item.value ? 'item-active' : '']"
v-for="(item, index) in getDictOptions(DICT_TYPE.BIG_VIEW_WEEK)"
:key="index"
@click="changeType(item.value)"
>
{{ item.label }}
</section>
</section>
<section class="tabs-box">
<section
@ -17,7 +17,7 @@
v-for="(item, index) in tabberList"
:key="index"
@click="curTab = index"
style="padding: 12px 16px;"
style="padding: 12px 16px"
>
{{ item }}
</section>
@ -26,6 +26,9 @@
</template>
<script setup lang="ts">
import { DICT_TYPE, getDictOptions } from '@/utils/dict'
const emits = defineEmits(['changeType'])
const tabberList = ref([
'环境治理专项行动',
'空气检测平台',
@ -34,40 +37,44 @@ const tabberList = ref([
'土壤检测平台',
'园区环境综合监管平台'
])
const typeList=ref([
'本周',
'本月',
'本年',
])
const curTpye = ref(0)
const curTab = ref(0)
const changeType = (value) => {
curTpye.value = value
emits('changeType', value)
}
onMounted(() => {
changeType(getDictOptions(DICT_TYPE.BIG_VIEW_WEEK)[0].value)
})
</script>
<style scoped lang="scss">
.tabs-box {
cursor: pointer;
cursor: pointer;
display: flex;
flex-flow: row nowrap;
gap: 8px;
width: fit-content;
font-size: 12px;
.item {
padding: 6px;
padding: 6px;
white-space: nowrap;
border: 1px solid rgba(255, 255, 255, 0.15);
transition: 0.2s all;
}
.type-item {
padding: 6px 16px;
white-space: nowrap;
border: 1px solid rgba(255, 255, 255, 0.15);
transition: .2s all;
transition: 0.2s all;
}
.type-item{
padding: 6px 16px;
white-space: nowrap;
border: 1px solid rgba(255, 255, 255, 0.15);
transition: .2s all;
}
.item-active {
border: 1px solid #56ca00;
color: #56ca00;
background: linear-gradient(180deg, rgba(94, 205, 13, 0.17) 0%, rgba(94, 205, 13, 0.00) 100%);
background: linear-gradient(180deg, rgba(94, 205, 13, 0.17) 0%, rgba(94, 205, 13, 0) 100%);
}
}
</style>

39
src/views/screen/compenonts/weather.vue

@ -1,19 +1,36 @@
<template>
<section style="padding: 4px 12px" class="flex">
<Icon icon="svg-icon:weather-fine" :size="40"/>
<section class="flex gap-4px flex-items-center">
<Icon icon="svg-icon:bracket" :size="20"/>
<span style="text-decoration: underline">{{new Date().getFullYear()}}</span>
<section class="h-3px w-10px bg-#16B1FF b-r-2px"></section>
<span style="text-decoration: underline">{{new Date().getMonth()+1}}</span>
<section class="h-3px w-10px bg-#16B1FF b-r-2px"></section>
<span style="text-decoration: underline">{{new Date().getDate()}}</span>
<Icon class="rotate-180" icon="svg-icon:bracket" :size="20"/>
</section>
<section style="padding: 4px 12px" class="flex items-center gap-8px">
<Icon :icon="weatherInfo.icon" :size="32" />
<section>{{ weatherInfo.dayWeather }}</section>
<section> {{ weatherInfo.nightTemp }} ~ {{ weatherInfo.dayTemp }}</section>
<section>{{ weatherInfo.dayWindDir }} {{ weatherInfo.dayWindPower }}</section>
</section>
</template>
<script setup lang="ts">
const weatherInfo: any = ref({})
const AMap = (window as any).AMap
const init = () => {
AMap.plugin('AMap.Weather', function () {
const weather = new AMap.Weather()
weather.getForecast('锦州市', (err, data) => {
weatherInfo.value = data.forecasts[0]
weatherInfo.value.icon = setIcon(weatherInfo.value.dayWeather)
})
})
}
const setIcon = (weather: any) => {
if (['平静', '晴'].includes(weather)) return 'svg-icon:weather-qing'
if (weather.includes('雨')) return 'svg-icon:weather-yu'
if (weather.includes('雪')) return 'svg-icon:weather-xue'
if (['阴天', '多云'].includes(weather)) return 'svg-icon:weather-yin'
if (weather.includes('风')) return 'svg-icon:weather-feng'
return 'svg-icon:weather-yin'
}
init()
</script>
<style scoped lang="scss"></style>

Loading…
Cancel
Save