fix:设备告警 网关告警
This commit is contained in:
@@ -0,0 +1,4 @@
|
|||||||
|
export enum equipmentAlarmApi {
|
||||||
|
getTableList = '/carbon-smart/api/AlarmEquipmentLog/selectAlarmEquipmentLog', //设备告警 列表
|
||||||
|
getCodeList = '/carbon-smart/api/AlarmEquipmentLog/selectErrorCodeList', //设备告警 列表
|
||||||
|
}
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<svg version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" width="16px" height="16px" xmlns="http://www.w3.org/2000/svg">
|
|
||||||
<g transform="matrix(1 0 0 1 -305 -366 )">
|
|
||||||
<path d="M 8.03885714285714 0.641142857142857 L 8.03885714285714 0.64 C 12.1181901007502 0.64 15.4251428571429 3.94695275639267 15.4251428571429 8.02628571428571 C 15.4251430928625 8.02704758957974 15.4251432107223 8.02780946489393 15.4251432107223 8.02857134022442 C 15.4251432107223 12.1085354806887 12.117678779758 15.415999911653 8.03771463929375 15.415999911653 C 3.95775049882947 15.415999911653 0.650286067865178 12.1085354806887 0.650286067865178 8.02857134022442 C 0.650286067865178 3.94860719976014 3.95775049882947 0.64114276879585 8.03771463929375 0.64114276879585 C 8.03809547381657 0.64114276879585 8.03847630833888 0.641142798244853 8.03885714285714 0.641142857142857 Z M 8 6.85714285714286 C 7.36881742876481 6.85714285714286 6.85714285714286 7.36881742876481 6.85714285714286 8 C 6.85714285714286 8.63118257123519 7.36881742876481 9.14285714285714 8 9.14285714285714 C 8.63118257123519 9.14285714285714 9.14285714285714 8.63118257123519 9.14285714285714 8 C 9.14285714285714 7.36881742876481 8.63118257123519 6.85714285714286 8 6.85714285714286 Z M 11.4285714285714 6.85714285714286 C 10.7973888573362 6.85714285714286 10.2857142857143 7.36881742876481 10.2857142857143 8 C 10.2857142857143 8.63118257123519 10.7973888573362 9.14285714285714 11.4285714285714 9.14285714285714 C 12.0597539998066 9.14285714285714 12.5714285714286 8.63118257123519 12.5714285714286 8 C 12.5714285714286 7.36881742876481 12.0597539998066 6.85714285714286 11.4285714285714 6.85714285714286 Z M 4.57142857142857 6.85714285714286 C 3.94024600019338 6.85714285714286 3.42857142857143 7.36881742876481 3.42857142857143 8 C 3.42857142857143 8.63118257123519 3.94024600019338 9.14285714285714 4.57142857142857 9.14285714285714 C 5.20261114266376 9.14285714285714 5.71428571428571 8.63118257123519 5.71428571428571 8 C 5.71428571428571 7.36881742876481 5.20261114266376 6.85714285714286 4.57142857142857 6.85714285714286 Z " fill-rule="nonzero" fill="#ff7602" stroke="none" transform="matrix(1 0 0 1 305 366 )" />
|
|
||||||
</g>
|
|
||||||
</svg>
|
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<svg version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" width="16px" height="16px" xmlns="http://www.w3.org/2000/svg">
|
<svg version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" width="16px" height="16px" xmlns="http://www.w3.org/2000/svg">
|
||||||
<g transform="matrix(1 0 0 1 -305 -340 )">
|
<g transform="matrix(1 0 0 1 -305 -366 )">
|
||||||
<path d="M 15.52 8 C 15.52 3.848 12.152 0.48 8 0.48 C 3.848 0.48 0.48 3.848 0.48 8 C 0.48 12.152 3.848 15.52 8 15.52 C 12.152 15.52 15.52 12.152 15.52 8 Z M 11.608 9.256 C 11.84 9.368 11.936 9.648 11.832 9.88 C 11.72 10.112 11.44 10.216 11.208 10.104 L 7.8 8.48 C 7.632 8.392 7.52 8.216 7.512 8.024 L 7.512 2.648 C 7.512 2.392 7.72 2.176 7.984 2.176 C 8.24 2.176 8.456 2.384 8.456 2.648 L 8.456 7.752 L 11.608 9.256 Z " fill-rule="nonzero" fill="#009de1" stroke="none" transform="matrix(1 0 0 1 305 340 )" />
|
<path d="M 8.03885714285714 0.641142857142857 L 8.03885714285714 0.64 C 12.1181901007502 0.64 15.4251428571429 3.94695275639267 15.4251428571429 8.02628571428571 C 15.4251430928625 8.02704758957974 15.4251432107223 8.02780946489393 15.4251432107223 8.02857134022442 C 15.4251432107223 12.1085354806887 12.117678779758 15.415999911653 8.03771463929375 15.415999911653 C 3.95775049882947 15.415999911653 0.650286067865178 12.1085354806887 0.650286067865178 8.02857134022442 C 0.650286067865178 3.94860719976014 3.95775049882947 0.64114276879585 8.03771463929375 0.64114276879585 C 8.03809547381657 0.64114276879585 8.03847630833888 0.641142798244853 8.03885714285714 0.641142857142857 Z M 8 6.85714285714286 C 7.36881742876481 6.85714285714286 6.85714285714286 7.36881742876481 6.85714285714286 8 C 6.85714285714286 8.63118257123519 7.36881742876481 9.14285714285714 8 9.14285714285714 C 8.63118257123519 9.14285714285714 9.14285714285714 8.63118257123519 9.14285714285714 8 C 9.14285714285714 7.36881742876481 8.63118257123519 6.85714285714286 8 6.85714285714286 Z M 11.4285714285714 6.85714285714286 C 10.7973888573362 6.85714285714286 10.2857142857143 7.36881742876481 10.2857142857143 8 C 10.2857142857143 8.63118257123519 10.7973888573362 9.14285714285714 11.4285714285714 9.14285714285714 C 12.0597539998066 9.14285714285714 12.5714285714286 8.63118257123519 12.5714285714286 8 C 12.5714285714286 7.36881742876481 12.0597539998066 6.85714285714286 11.4285714285714 6.85714285714286 Z M 4.57142857142857 6.85714285714286 C 3.94024600019338 6.85714285714286 3.42857142857143 7.36881742876481 3.42857142857143 8 C 3.42857142857143 8.63118257123519 3.94024600019338 9.14285714285714 4.57142857142857 9.14285714285714 C 5.20261114266376 9.14285714285714 5.71428571428571 8.63118257123519 5.71428571428571 8 C 5.71428571428571 7.36881742876481 5.20261114266376 6.85714285714286 4.57142857142857 6.85714285714286 Z " fill-rule="nonzero" fill="#ff7602" stroke="none" transform="matrix(1 0 0 1 305 366 )" />
|
||||||
</g>
|
</g>
|
||||||
</svg>
|
</svg>
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<svg version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" width="15px" height="15px" xmlns="http://www.w3.org/2000/svg">
|
<svg version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" width="16px" height="16px" xmlns="http://www.w3.org/2000/svg">
|
||||||
<g transform="matrix(1 0 0 1 -305 -264 )">
|
<g transform="matrix(1 0 0 1 -305 -340 )">
|
||||||
<path d="M 12.8044865917969 12.8044945019531 C 15.7317833056641 9.87949759277344 15.7317833056641 5.12019596191406 12.8044865917969 2.19521370117188 C 11.3984961283515 0.787326048146557 9.48966705506673 -0.00260805552580251 7.4999560546875 3.046875E-05 C 5.50996955094545 -0.00406567496305449 3.60061659376305 0.786091774555939 2.19546946289063 2.19521370117188 C -0.731548930664062 5.12021061035156 -0.731548930664062 9.87951224121094 2.19546946289063 12.8044945019531 C 3.60067093003941 14.2135352022771 5.50998850312976 15.0036780086136 7.4999560546875 14.999677734375 C 9.49029165514025 15.0054765279533 11.4002873723065 14.2150596299848 12.8044865917969 12.8044945019531 Z M 11.9376369140625 5.54019552246094 L 6.89940004394531 10.9003754150391 C 6.87578802320076 10.9269018017654 6.84623229984903 10.9474623058395 6.81315013183594 10.9603753564453 C 6.78748609863281 10.9776751464844 6.77046462890625 10.9949895849609 6.73585041503906 11.003060859375 C 6.67362025830789 11.0304200226738 6.60651003916783 11.0449431326059 6.53853616699219 11.0457610107422 C 6.47426031328986 11.0436752198275 6.41062363711127 11.0323076485925 6.34960082519531 11.0120110400391 L 6.28960088378906 10.9773821777344 C 6.25364523541476 10.9604965742554 6.21927871922921 10.9404159360992 6.18691545410156 10.9173822363281 L 3.30259719726562 8.07866452148437 C 3.20194835437246 7.98256406662991 3.14591207112094 7.8488594603371 3.14796845214844 7.70971472167969 C 3.14796845214844 7.57240041503906 3.20046839355469 7.43510075683594 3.29421830566406 7.34076490722656 C 3.50055541080613 7.14332002945278 3.8257661663423 7.14332002945278 4.03210327148437 7.34076490722656 L 6.52210063476562 9.79326232910156 L 11.1824668212891 4.83721775390625 C 11.3839239859071 4.63706235688665 11.705600292055 4.62599539544477 11.9203371386719 4.81183204101562 C 12.0250169736047 4.90583460723342 12.0845359910269 5.04009087589488 12.0839014160156 5.18078184082031 C 12.0834323759743 5.31515796660418 12.0310295272497 5.44414958696638 11.9376515625 5.54078145996094 Z " fill-rule="nonzero" fill="#04d719" stroke="none" transform="matrix(1 0 0 1 305 264 )" />
|
<path d="M 15.52 8 C 15.52 3.848 12.152 0.48 8 0.48 C 3.848 0.48 0.48 3.848 0.48 8 C 0.48 12.152 3.848 15.52 8 15.52 C 12.152 15.52 15.52 12.152 15.52 8 Z M 11.608 9.256 C 11.84 9.368 11.936 9.648 11.832 9.88 C 11.72 10.112 11.44 10.216 11.208 10.104 L 7.8 8.48 C 7.632 8.392 7.52 8.216 7.512 8.024 L 7.512 2.648 C 7.512 2.392 7.72 2.176 7.984 2.176 C 8.24 2.176 8.456 2.384 8.456 2.648 L 8.456 7.752 L 11.608 9.256 Z " fill-rule="nonzero" fill="#009de1" stroke="none" transform="matrix(1 0 0 1 305 340 )" />
|
||||||
</g>
|
</g>
|
||||||
</svg>
|
</svg>
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<svg version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" width="15px" height="15px" xmlns="http://www.w3.org/2000/svg">
|
<svg version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" width="15px" height="15px" xmlns="http://www.w3.org/2000/svg">
|
||||||
<g transform="matrix(1 0 0 1 -305 -315 )">
|
<g transform="matrix(1 0 0 1 -305 -264 )">
|
||||||
<path d="M 15 7.5 C 15 3.358125 11.641875 0 7.5 0 C 3.358125 0 0 3.358125 0 7.5 C 0 11.641875 3.358125 15 7.5 15 C 11.641875 15 15 11.641875 15 7.5 Z M 6.96437500488281 8.4375 L 6.96437500488281 3.8840625 C 6.96454594411788 3.81021458429416 7.02427767945776 3.75034328445354 7.09812499511719 3.75 L 7.90187500488281 3.75 C 7.97572232054224 3.75034328445354 8.03545405588212 3.81021458429416 8.03562499511719 3.8840625 L 8.03562499511719 8.4375 C 8.03545405588212 8.51134791570584 7.97572232054224 8.57121921554647 7.90187500488281 8.5715625 L 7.09812499511719 8.5715625 C 7.02427767945776 8.57121921554647 6.96454594411788 8.51134791570584 6.96437500488281 8.4375 Z M 7.5 11.25 C 7.05616214821327 11.2499137187178 6.69640622993007 10.8900878577318 6.69640622993007 10.4462499975586 C 6.69640622993007 10.0023511201461 7.05625737014613 9.64249997993007 7.50015624755859 9.64249997993007 C 7.94415034690392 9.64258627639936 8.30390626518712 10.0024121373854 8.30390626518712 10.4462499975586 C 8.30390626518712 10.8901488749711 7.94405512497106 11.2500000151871 7.50015624755859 11.2500000151871 Z " fill-rule="nonzero" fill="#d8001b" stroke="none" transform="matrix(1 0 0 1 305 315 )" />
|
<path d="M 12.8044865917969 12.8044945019531 C 15.7317833056641 9.87949759277344 15.7317833056641 5.12019596191406 12.8044865917969 2.19521370117188 C 11.3984961283515 0.787326048146557 9.48966705506673 -0.00260805552580251 7.4999560546875 3.046875E-05 C 5.50996955094545 -0.00406567496305449 3.60061659376305 0.786091774555939 2.19546946289063 2.19521370117188 C -0.731548930664062 5.12021061035156 -0.731548930664062 9.87951224121094 2.19546946289063 12.8044945019531 C 3.60067093003941 14.2135352022771 5.50998850312976 15.0036780086136 7.4999560546875 14.999677734375 C 9.49029165514025 15.0054765279533 11.4002873723065 14.2150596299848 12.8044865917969 12.8044945019531 Z M 11.9376369140625 5.54019552246094 L 6.89940004394531 10.9003754150391 C 6.87578802320076 10.9269018017654 6.84623229984903 10.9474623058395 6.81315013183594 10.9603753564453 C 6.78748609863281 10.9776751464844 6.77046462890625 10.9949895849609 6.73585041503906 11.003060859375 C 6.67362025830789 11.0304200226738 6.60651003916783 11.0449431326059 6.53853616699219 11.0457610107422 C 6.47426031328986 11.0436752198275 6.41062363711127 11.0323076485925 6.34960082519531 11.0120110400391 L 6.28960088378906 10.9773821777344 C 6.25364523541476 10.9604965742554 6.21927871922921 10.9404159360992 6.18691545410156 10.9173822363281 L 3.30259719726562 8.07866452148437 C 3.20194835437246 7.98256406662991 3.14591207112094 7.8488594603371 3.14796845214844 7.70971472167969 C 3.14796845214844 7.57240041503906 3.20046839355469 7.43510075683594 3.29421830566406 7.34076490722656 C 3.50055541080613 7.14332002945278 3.8257661663423 7.14332002945278 4.03210327148437 7.34076490722656 L 6.52210063476562 9.79326232910156 L 11.1824668212891 4.83721775390625 C 11.3839239859071 4.63706235688665 11.705600292055 4.62599539544477 11.9203371386719 4.81183204101562 C 12.0250169736047 4.90583460723342 12.0845359910269 5.04009087589488 12.0839014160156 5.18078184082031 C 12.0834323759743 5.31515796660418 12.0310295272497 5.44414958696638 11.9376515625 5.54078145996094 Z " fill-rule="nonzero" fill="#04d719" stroke="none" transform="matrix(1 0 0 1 305 264 )" />
|
||||||
</g>
|
</g>
|
||||||
</svg>
|
</svg>
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<svg version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" width="15px" height="15px" xmlns="http://www.w3.org/2000/svg">
|
<svg version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" width="15px" height="15px" xmlns="http://www.w3.org/2000/svg">
|
||||||
<g transform="matrix(1 0 0 1 -305 -289 )">
|
<g transform="matrix(1 0 0 1 -305 -315 )">
|
||||||
<path d="M 14.8828125 7.5 C 14.8828125 3.42891475341797 11.571085246582 0.1171875 7.5 0.1171875 C 3.42942502441406 0.1171875 0.1171875 3.42891475341797 0.1171875 7.5 C 0.1171875 11.571085246582 3.42891475341797 14.8828125 7.5 14.8828125 C 11.5705749755859 14.8828125 14.8828125 11.571085246582 14.8828125 7.5 Z M 8.24725339416504 7.50209775695801 L 10.5116636334229 9.77390681030273 C 10.717328404541 9.98062045166015 10.7167897888184 10.3139079473877 10.5106147631836 10.5195727185059 C 10.4077965582275 10.6218806689453 10.2733136187744 10.6735590710449 10.1383204248047 10.6735590710449 C 10.0027886151123 10.6735590710449 9.86779542114258 10.6218806524658 9.76494885498047 10.5185238317871 L 7.49736364379883 8.24407840576172 L 5.22240794677735 10.4947965600586 C 5.11958974182129 10.5960556237793 4.98561707336426 10.6471954266357 4.85167274963379 10.6471954266357 C 4.71563066894531 10.6471954266357 4.58009887573242 10.5949784088135 4.47674203857422 10.490572701416 C 4.27212613769531 10.2833204443359 4.27371362365723 9.9500329486084 4.4809658972168 9.74490679321289 L 6.75328522155762 7.49736362731933 L 4.4893852532959 5.22609317321777 C 4.28372048217773 5.01988978637695 4.28425909790039 4.68609203613281 4.49043412353516 4.48042726501465 C 4.69663751037598 4.27422387817383 5.02989664489746 4.27530110961914 5.23610003173828 4.4814761352539 L 7.50314662719727 6.75538294555664 L 9.77810232421875 4.50469313598633 C 9.98481596557617 4.29956698059082 10.319152331543 4.30166472106934 10.5237682324219 4.5089169946289 C 10.7288943878174 4.71616925170898 10.7267966473389 5.04996700195312 10.5195443737793 5.25458290283203 L 8.24725339416504 7.50209775695801 Z " fill-rule="nonzero" fill="#a6a6a6" stroke="none" transform="matrix(1 0 0 1 305 289 )" />
|
<path d="M 15 7.5 C 15 3.358125 11.641875 0 7.5 0 C 3.358125 0 0 3.358125 0 7.5 C 0 11.641875 3.358125 15 7.5 15 C 11.641875 15 15 11.641875 15 7.5 Z M 6.96437500488281 8.4375 L 6.96437500488281 3.8840625 C 6.96454594411788 3.81021458429416 7.02427767945776 3.75034328445354 7.09812499511719 3.75 L 7.90187500488281 3.75 C 7.97572232054224 3.75034328445354 8.03545405588212 3.81021458429416 8.03562499511719 3.8840625 L 8.03562499511719 8.4375 C 8.03545405588212 8.51134791570584 7.97572232054224 8.57121921554647 7.90187500488281 8.5715625 L 7.09812499511719 8.5715625 C 7.02427767945776 8.57121921554647 6.96454594411788 8.51134791570584 6.96437500488281 8.4375 Z M 7.5 11.25 C 7.05616214821327 11.2499137187178 6.69640622993007 10.8900878577318 6.69640622993007 10.4462499975586 C 6.69640622993007 10.0023511201461 7.05625737014613 9.64249997993007 7.50015624755859 9.64249997993007 C 7.94415034690392 9.64258627639936 8.30390626518712 10.0024121373854 8.30390626518712 10.4462499975586 C 8.30390626518712 10.8901488749711 7.94405512497106 11.2500000151871 7.50015624755859 11.2500000151871 Z " fill-rule="nonzero" fill="#d8001b" stroke="none" transform="matrix(1 0 0 1 305 315 )" />
|
||||||
</g>
|
</g>
|
||||||
</svg>
|
</svg>
|
||||||
6
hx-ai-intelligent/src/icon/status-5.svg
Normal file
6
hx-ai-intelligent/src/icon/status-5.svg
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<svg version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" width="15px" height="15px" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<g transform="matrix(1 0 0 1 -305 -289 )">
|
||||||
|
<path d="M 14.8828125 7.5 C 14.8828125 3.42891475341797 11.571085246582 0.1171875 7.5 0.1171875 C 3.42942502441406 0.1171875 0.1171875 3.42891475341797 0.1171875 7.5 C 0.1171875 11.571085246582 3.42891475341797 14.8828125 7.5 14.8828125 C 11.5705749755859 14.8828125 14.8828125 11.571085246582 14.8828125 7.5 Z M 8.24725339416504 7.50209775695801 L 10.5116636334229 9.77390681030273 C 10.717328404541 9.98062045166015 10.7167897888184 10.3139079473877 10.5106147631836 10.5195727185059 C 10.4077965582275 10.6218806689453 10.2733136187744 10.6735590710449 10.1383204248047 10.6735590710449 C 10.0027886151123 10.6735590710449 9.86779542114258 10.6218806524658 9.76494885498047 10.5185238317871 L 7.49736364379883 8.24407840576172 L 5.22240794677735 10.4947965600586 C 5.11958974182129 10.5960556237793 4.98561707336426 10.6471954266357 4.85167274963379 10.6471954266357 C 4.71563066894531 10.6471954266357 4.58009887573242 10.5949784088135 4.47674203857422 10.490572701416 C 4.27212613769531 10.2833204443359 4.27371362365723 9.9500329486084 4.4809658972168 9.74490679321289 L 6.75328522155762 7.49736362731933 L 4.4893852532959 5.22609317321777 C 4.28372048217773 5.01988978637695 4.28425909790039 4.68609203613281 4.49043412353516 4.48042726501465 C 4.69663751037598 4.27422387817383 5.02989664489746 4.27530110961914 5.23610003173828 4.4814761352539 L 7.50314662719727 6.75538294555664 L 9.77810232421875 4.50469313598633 C 9.98481596557617 4.29956698059082 10.319152331543 4.30166472106934 10.5237682324219 4.5089169946289 C 10.7288943878174 4.71616925170898 10.7267966473389 5.04996700195312 10.5195443737793 5.25458290283203 L 8.24725339416504 7.50209775695801 Z " fill-rule="nonzero" fill="#a6a6a6" stroke="none" transform="matrix(1 0 0 1 305 289 )" />
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
@@ -48,7 +48,6 @@
|
|||||||
name: 'alarmOverviewIndex', // 与页面路由name一致缓存才可生效
|
name: 'alarmOverviewIndex', // 与页面路由name一致缓存才可生效
|
||||||
});
|
});
|
||||||
|
|
||||||
const info = ref({});
|
|
||||||
let chartInstance: echarts.ECharts | null = null;
|
let chartInstance: echarts.ECharts | null = null;
|
||||||
let chartInstanceOne: echarts.ECharts | null = null;
|
let chartInstanceOne: echarts.ECharts | null = null;
|
||||||
let chartInstanceTow: echarts.ECharts | null = null;
|
let chartInstanceTow: echarts.ECharts | null = null;
|
||||||
@@ -57,8 +56,11 @@
|
|||||||
const echartPieTow = ref(null);
|
const echartPieTow = ref(null);
|
||||||
const getGraphChart = () => {
|
const getGraphChart = () => {
|
||||||
let dayData = [];
|
let dayData = [];
|
||||||
|
// 能源告警
|
||||||
let energyAlarm = [];
|
let energyAlarm = [];
|
||||||
|
// 网关告警
|
||||||
let wgAlarm = [];
|
let wgAlarm = [];
|
||||||
|
// 设备告警
|
||||||
let equipmentAlarm = [];
|
let equipmentAlarm = [];
|
||||||
let total = [];
|
let total = [];
|
||||||
|
|
||||||
|
|||||||
@@ -26,7 +26,6 @@
|
|||||||
import editConfigureEnergyAlarm from './editConfigureEnergyAlarm.vue';
|
import editConfigureEnergyAlarm from './editConfigureEnergyAlarm.vue';
|
||||||
import { energyAlarms } from '/@/api/alarmManagement/alarmSettings/energyAlarm';
|
import { energyAlarms } from '/@/api/alarmManagement/alarmSettings/energyAlarm';
|
||||||
import { ExclamationCircleOutlined } from '@ant-design/icons-vue';
|
import { ExclamationCircleOutlined } from '@ant-design/icons-vue';
|
||||||
import { device } from '/@/api/deviceManage';
|
|
||||||
import { dict } from '/@/api';
|
import { dict } from '/@/api';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@@ -229,29 +228,6 @@
|
|||||||
formConfig: {
|
formConfig: {
|
||||||
title: value.errorCode,
|
title: value.errorCode,
|
||||||
schemas: [
|
schemas: [
|
||||||
// {
|
|
||||||
// field: 'deviceNode',
|
|
||||||
// label: '设备名称',
|
|
||||||
// component: 'nsSelectApi',
|
|
||||||
// componentProps: {
|
|
||||||
// api: device.queryDevicePage,
|
|
||||||
// allowClear: true,
|
|
||||||
// params: {
|
|
||||||
// orgId: orgId.value,
|
|
||||||
// pageNum: 1,
|
|
||||||
// pageSize: 99,
|
|
||||||
// },
|
|
||||||
// placeholder: '请选择设备名称',
|
|
||||||
// resultField: 'data.records',
|
|
||||||
// labelField: 'deviceName',
|
|
||||||
// valueField: 'id',
|
|
||||||
// showSearch: true,
|
|
||||||
// filterOption: (input: string, option: any) => {
|
|
||||||
// return option.deviceName.toLowerCase().indexOf(input.toLowerCase()) >= 0;
|
|
||||||
// },
|
|
||||||
// // autoAddLink: true, //默认添加联动
|
|
||||||
// },
|
|
||||||
// },
|
|
||||||
{
|
{
|
||||||
field: 'deviceName',
|
field: 'deviceName',
|
||||||
label: '设备信息/节点信息',
|
label: '设备信息/节点信息',
|
||||||
|
|||||||
@@ -42,6 +42,7 @@
|
|||||||
const orgId = ref('');
|
const orgId = ref('');
|
||||||
const result = JSON.parse(sessionStorage.getItem('ORGID')!);
|
const result = JSON.parse(sessionStorage.getItem('ORGID')!);
|
||||||
orgId.value = result;
|
orgId.value = result;
|
||||||
|
// 改变状态
|
||||||
const clickSwitch = (data: any) => {
|
const clickSwitch = (data: any) => {
|
||||||
NsModal.confirm({
|
NsModal.confirm({
|
||||||
title: '启用状态',
|
title: '启用状态',
|
||||||
|
|||||||
@@ -213,6 +213,7 @@
|
|||||||
http.post(device.queryDevicePoint, value).then((res) => {
|
http.post(device.queryDevicePoint, value).then((res) => {
|
||||||
if (res.msg === 'success') {
|
if (res.msg === 'success') {
|
||||||
res.data.forEach((item: any) => {
|
res.data.forEach((item: any) => {
|
||||||
|
//显示格式
|
||||||
devicePointData.value.push({
|
devicePointData.value.push({
|
||||||
value: item.id,
|
value: item.id,
|
||||||
label: item.code + ' ( ' + item.unit + ' ) ',
|
label: item.code + ' ( ' + item.unit + ' ) ',
|
||||||
@@ -336,10 +337,13 @@
|
|||||||
item.logic = item.logic.value;
|
item.logic = item.logic.value;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
infoObject.value.valueType = infoObject.value.valueType.value;
|
||||||
infoObject.value.alarmList = infoObject.value.hxAlarmRuleLogicList || [];
|
infoObject.value.alarmList = infoObject.value.hxAlarmRuleLogicList || [];
|
||||||
delete infoObject.value.hxAlarmRuleLogicList;
|
delete infoObject.value.hxAlarmRuleLogicList;
|
||||||
|
// 回显 格式化
|
||||||
infoObject.value.deviceType = selectDevice;
|
infoObject.value.deviceType = selectDevice;
|
||||||
infoObject.value.valueType = infoObject.value.valueType.value;
|
|
||||||
|
//数据类型转换
|
||||||
infoObject.value.ruleType = infoObject.value.ruleType + '';
|
infoObject.value.ruleType = infoObject.value.ruleType + '';
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -450,6 +454,8 @@
|
|||||||
abnormalDescription: null,
|
abnormalDescription: null,
|
||||||
deviceType: [],
|
deviceType: [],
|
||||||
devicePoint: null,
|
devicePoint: null,
|
||||||
|
valueType: null,
|
||||||
|
deviceId: null,
|
||||||
enableRules: 0,
|
enableRules: 0,
|
||||||
alarmList: [{ logic: null, num: null, isDelete: 0 }],
|
alarmList: [{ logic: null, num: null, isDelete: 0 }],
|
||||||
};
|
};
|
||||||
@@ -470,6 +476,7 @@
|
|||||||
// 确保 index 在有效范围内
|
// 确保 index 在有效范围内
|
||||||
if (index < infoObject.value.alarmList.length && index >= 0) {
|
if (index < infoObject.value.alarmList.length && index >= 0) {
|
||||||
const alarmItemToDelete = infoObject.value.alarmList[index];
|
const alarmItemToDelete = infoObject.value.alarmList[index];
|
||||||
|
// 判断删除的 是否在数据库中
|
||||||
if (alarmItemToDelete?.id) {
|
if (alarmItemToDelete?.id) {
|
||||||
// 添加到 delAlarmList 中,并标记为已删除
|
// 添加到 delAlarmList 中,并标记为已删除
|
||||||
delAlarmList.value.push({ ...alarmItemToDelete, isDelete: 1 });
|
delAlarmList.value.push({ ...alarmItemToDelete, isDelete: 1 });
|
||||||
|
|||||||
@@ -133,7 +133,7 @@
|
|||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
showQuickJumper: true,
|
showQuickJumper: true,
|
||||||
showLessItems: true,
|
showLessItems: true,
|
||||||
// showSizeChanger: true,
|
// showSizeChanger: true, //分页改变大小
|
||||||
showTotal: (total: number, range: any) =>
|
showTotal: (total: number, range: any) =>
|
||||||
total && range ? `显示第${range[0]}到${range[1]}条记录,共 ${total} 条记录` : '',
|
total && range ? `显示第${range[0]}到${range[1]}条记录,共 ${total} 条记录` : '',
|
||||||
onChange: handleChangePage,
|
onChange: handleChangePage,
|
||||||
@@ -145,6 +145,7 @@
|
|||||||
dataSource.value.forEach((item) => {
|
dataSource.value.forEach((item) => {
|
||||||
ids.push(item.userId);
|
ids.push(item.userId);
|
||||||
});
|
});
|
||||||
|
// 传到子页面
|
||||||
linkPeoples.value.getData({ id: ids, data: dataSource.value });
|
linkPeoples.value.getData({ id: ids, data: dataSource.value });
|
||||||
};
|
};
|
||||||
//取消弹窗
|
//取消弹窗
|
||||||
@@ -194,14 +195,17 @@
|
|||||||
})
|
})
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
infoObject.value = res.data;
|
infoObject.value = res.data;
|
||||||
|
//处理通知方式
|
||||||
if (infoObject.value.notificationMethod) {
|
if (infoObject.value.notificationMethod) {
|
||||||
infoObject.value.notificationMethod = infoObject.value.notificationMethod.split(',');
|
infoObject.value.notificationMethod = infoObject.value.notificationMethod.split(',');
|
||||||
} else {
|
} else {
|
||||||
infoObject.value.notificationMethod = [];
|
infoObject.value.notificationMethod = [];
|
||||||
}
|
}
|
||||||
|
//处理通知人
|
||||||
dataSource.value = res.data.hxAlarmNotifyUserList;
|
dataSource.value = res.data.hxAlarmNotifyUserList;
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
dataSource.value = [];
|
||||||
infoObject.value = {
|
infoObject.value = {
|
||||||
enableNotifications: 0,
|
enableNotifications: 0,
|
||||||
notificationMethod: [],
|
notificationMethod: [],
|
||||||
@@ -236,6 +240,7 @@
|
|||||||
obj.notificationMethod = infoObject.value.notificationMethod.toString();
|
obj.notificationMethod = infoObject.value.notificationMethod.toString();
|
||||||
obj.id = infoObject.value.id;
|
obj.id = infoObject.value.id;
|
||||||
obj.enableNotifications = infoObject.value.enableNotifications;
|
obj.enableNotifications = infoObject.value.enableNotifications;
|
||||||
|
//处理 选择人数据
|
||||||
dataSource.value.forEach((item) => {
|
dataSource.value.forEach((item) => {
|
||||||
obj.hxAlarmNotifyUserList.push({
|
obj.hxAlarmNotifyUserList.push({
|
||||||
userId: item.userId,
|
userId: item.userId,
|
||||||
@@ -247,6 +252,7 @@
|
|||||||
if (res.msg === 'success') {
|
if (res.msg === 'success') {
|
||||||
NsMessage.success('操作成功');
|
NsMessage.success('操作成功');
|
||||||
visible.value = false;
|
visible.value = false;
|
||||||
|
dataSource.value = [];
|
||||||
emit('updNotification', null);
|
emit('updNotification', null);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -257,6 +263,7 @@
|
|||||||
formRef.value.resetFields();
|
formRef.value.resetFields();
|
||||||
visible.value = false;
|
visible.value = false;
|
||||||
visibleModel.value = false;
|
visibleModel.value = false;
|
||||||
|
dataSource.value = [];
|
||||||
};
|
};
|
||||||
defineExpose({
|
defineExpose({
|
||||||
toggle,
|
toggle,
|
||||||
|
|||||||
@@ -69,15 +69,14 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { ref, watch, computed } from 'vue';
|
import { ref, watch } from 'vue';
|
||||||
import { defineComponent } from 'vue';
|
import { defineComponent } from 'vue';
|
||||||
import type { TreeProps } from 'ant-design-vue';
|
import type { TreeProps } from 'ant-design-vue';
|
||||||
import { origanizemanage } from '/@/api/origanizemanage';
|
import { origanizemanage } from '/@/api/origanizemanage';
|
||||||
import { department } from '/@/api/origanizemanage';
|
import { department } from '/@/api/origanizemanage';
|
||||||
|
|
||||||
import { http } from '/nerv-lib/util';
|
import { http } from '/nerv-lib/util';
|
||||||
// import { editTreeConfig } from './config';
|
|
||||||
//搜索存储
|
//搜索存储 拼凑树的搜索类型
|
||||||
const dataList: TreeProps['treeData'] = [];
|
const dataList: TreeProps['treeData'] = [];
|
||||||
const generateList = (data: TreeProps['treeData']) => {
|
const generateList = (data: TreeProps['treeData']) => {
|
||||||
for (let i = 0; i < data.length; i++) {
|
for (let i = 0; i < data.length; i++) {
|
||||||
@@ -126,16 +125,20 @@
|
|||||||
const deptTreeData = ref([]);
|
const deptTreeData = ref([]);
|
||||||
//选择 组织
|
//选择 组织
|
||||||
const selectOrgId = ref('');
|
const selectOrgId = ref('');
|
||||||
|
//默认当前缓存的组织
|
||||||
selectOrgId.value = result;
|
selectOrgId.value = result;
|
||||||
//选择部门
|
//选择部门
|
||||||
const selectDeptId = ref('');
|
const selectDeptId = ref('');
|
||||||
|
const show = ref(false);
|
||||||
|
//人员搜索
|
||||||
const onSearch = () => {
|
const onSearch = () => {
|
||||||
pagination.value.current = 1;
|
pagination.value.current = 1;
|
||||||
getList();
|
getList();
|
||||||
};
|
};
|
||||||
|
//点击树 搜索人员
|
||||||
const onSelect = (selectedKeys: any, info: any) => {
|
const onSelect = (selectedKeys: any, info: any) => {
|
||||||
selectedKeys.value = selectedKeys;
|
selectedKeys.value = selectedKeys;
|
||||||
|
//判断选择的部门 还是 组织
|
||||||
if (info.node.dataRef.deptInfo) {
|
if (info.node.dataRef.deptInfo) {
|
||||||
selectDeptId.value = info.node.dataRef.deptInfo.deptId;
|
selectDeptId.value = info.node.dataRef.deptInfo.deptId;
|
||||||
selectOrgId.value = info.node.dataRef.deptInfo.orgId;
|
selectOrgId.value = info.node.dataRef.deptInfo.orgId;
|
||||||
@@ -189,7 +192,7 @@
|
|||||||
orgId: selectOrgId.value,
|
orgId: selectOrgId.value,
|
||||||
deptId: selectDeptId.value,
|
deptId: selectDeptId.value,
|
||||||
realName: realName.value,
|
realName: realName.value,
|
||||||
userStatus: 0,
|
userStatus: 0, // 写死 没有被冻结的用户
|
||||||
})
|
})
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
dataSource.value = res.data.records;
|
dataSource.value = res.data.records;
|
||||||
@@ -197,12 +200,24 @@
|
|||||||
loading.value = false;
|
loading.value = false;
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
// 改变页码
|
||||||
const handleChangePage = (current: number, pageSize: number) => {
|
const handleChangePage = (current: number, pageSize: number) => {
|
||||||
pagination.value.current = current;
|
pagination.value.current = current;
|
||||||
pagination.value.pageSize = pageSize;
|
pagination.value.pageSize = pageSize;
|
||||||
getList();
|
getList();
|
||||||
};
|
};
|
||||||
|
const pagination = ref({
|
||||||
|
total: 0,
|
||||||
|
size: 'small',
|
||||||
|
current: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
showQuickJumper: true,
|
||||||
|
showLessItems: true,
|
||||||
|
// showSizeChanger: true,
|
||||||
|
showTotal: (total: number, range: any) =>
|
||||||
|
total && range ? `显示第${range[0]}到${range[1]}条记录,共 ${total} 条记录` : '',
|
||||||
|
onChange: handleChangePage,
|
||||||
|
});
|
||||||
const onSelectChange = (selectedRowKeys: any, selectedRows: any) => {
|
const onSelectChange = (selectedRowKeys: any, selectedRows: any) => {
|
||||||
selectedRowKey.value = selectedRowKeys;
|
selectedRowKey.value = selectedRowKeys;
|
||||||
// 使用 forEach 循环遍历 selectedRows 数组
|
// 使用 forEach 循环遍历 selectedRows 数组
|
||||||
@@ -225,18 +240,6 @@
|
|||||||
selectedRowKeys.includes(existingRow.userId),
|
selectedRowKeys.includes(existingRow.userId),
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
const pagination = ref({
|
|
||||||
total: 0,
|
|
||||||
size: 'small',
|
|
||||||
current: 1,
|
|
||||||
pageSize: 10,
|
|
||||||
showQuickJumper: true,
|
|
||||||
showLessItems: true,
|
|
||||||
// showSizeChanger: true,
|
|
||||||
showTotal: (total: number, range: any) =>
|
|
||||||
total && range ? `显示第${range[0]}到${range[1]}条记录,共 ${total} 条记录` : '',
|
|
||||||
onChange: handleChangePage,
|
|
||||||
});
|
|
||||||
const columns = [
|
const columns = [
|
||||||
{
|
{
|
||||||
title: '序号',
|
title: '序号',
|
||||||
@@ -262,15 +265,21 @@
|
|||||||
dataIndex: 'address',
|
dataIndex: 'address',
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
const handleOk = () => {
|
const reback = () => {
|
||||||
// 处理确定按钮的逻辑
|
|
||||||
emit('handleOk', { id: selectedRowKey.value, data: selectedRow.value });
|
|
||||||
show.value = false;
|
show.value = false;
|
||||||
pagination.value.current = 1;
|
pagination.value.current = 1;
|
||||||
realName.value = null;
|
realName.value = null;
|
||||||
searchValue.value = '';
|
searchValue.value = '';
|
||||||
selectDeptId.value = '';
|
selectDeptId.value = '';
|
||||||
selectOrgId.value = orgId.value;
|
selectOrgId.value = orgId.value;
|
||||||
|
selectedRow.value = [];
|
||||||
|
selectedRowKey.value = [];
|
||||||
|
};
|
||||||
|
const handleOk = () => {
|
||||||
|
// 处理确定按钮的逻辑
|
||||||
|
emit('handleOk', { id: selectedRowKey.value, data: selectedRow.value });
|
||||||
|
//恢复数据
|
||||||
|
reback();
|
||||||
};
|
};
|
||||||
const getData = (data: any) => {
|
const getData = (data: any) => {
|
||||||
selectedRow.value = data.data;
|
selectedRow.value = data.data;
|
||||||
@@ -281,17 +290,12 @@
|
|||||||
//获取树
|
//获取树
|
||||||
getTreeData();
|
getTreeData();
|
||||||
};
|
};
|
||||||
const show = ref(false);
|
|
||||||
const handleCancel = () => {
|
const handleCancel = () => {
|
||||||
// 处理取消按钮的逻辑
|
// 处理取消按钮的逻辑
|
||||||
emit('handleCancel', null);
|
emit('handleCancel', null);
|
||||||
show.value = false;
|
reback();
|
||||||
pagination.value.current = 1;
|
|
||||||
realName.value = null;
|
|
||||||
searchValue.value = '';
|
|
||||||
selectDeptId.value = '';
|
|
||||||
selectOrgId.value = orgId.value;
|
|
||||||
};
|
};
|
||||||
|
// 监听树的搜索
|
||||||
watch(searchValue, (value) => {
|
watch(searchValue, (value) => {
|
||||||
const expanded = dataList
|
const expanded = dataList
|
||||||
.map((item: TreeProps['treeData'][number]) => {
|
.map((item: TreeProps['treeData'][number]) => {
|
||||||
@@ -324,6 +328,7 @@
|
|||||||
onSelectChange,
|
onSelectChange,
|
||||||
pagination,
|
pagination,
|
||||||
handleOk,
|
handleOk,
|
||||||
|
reback,
|
||||||
show,
|
show,
|
||||||
getData,
|
getData,
|
||||||
getTreeData,
|
getTreeData,
|
||||||
|
|||||||
@@ -1,5 +1,18 @@
|
|||||||
<template>
|
<template>
|
||||||
<ns-view-list-table v-bind="config" ref="mainRef" />
|
<ns-view-list-table v-bind="config" ref="mainRef">
|
||||||
|
<template #bodyCell="{ record, column }">
|
||||||
|
<template v-if="column.dataIndex === 'alarmTitle'">
|
||||||
|
<div style="color: #2778ff">{{ record.alarmTitle }}</div>
|
||||||
|
{{ record.abnormalDescription }}
|
||||||
|
</template>
|
||||||
|
<template v-if="column.dataIndex === 'priority'">
|
||||||
|
{{ record.priority ? record.priority.label : '' }}
|
||||||
|
</template>
|
||||||
|
<template v-if="column.dataIndex === 'alarmLogState'">
|
||||||
|
{{ record.alarmLogState ? record.alarmLogState.label : '' }}
|
||||||
|
</template>
|
||||||
|
</template>
|
||||||
|
</ns-view-list-table>
|
||||||
<!-- 详情页面 -->
|
<!-- 详情页面 -->
|
||||||
<Look ref="look" />
|
<Look ref="look" />
|
||||||
<!-- 状态页面 -->
|
<!-- 状态页面 -->
|
||||||
|
|||||||
@@ -13,10 +13,10 @@
|
|||||||
<div class="box">
|
<div class="box">
|
||||||
<div class="card"></div>
|
<div class="card"></div>
|
||||||
<div style="left: 25px; position: absolute; height: 35px; line-height: 35px">
|
<div style="left: 25px; position: absolute; height: 35px; line-height: 35px">
|
||||||
告警编号:20230310001
|
告警编号:{{ infoObject.alarmCode }}
|
||||||
</div>
|
</div>
|
||||||
<div style="right: 20px; position: absolute; height: 35px; line-height: 35px">
|
<div style="right: 20px; position: absolute; height: 35px; line-height: 35px">
|
||||||
2024-03-10 15:08:10
|
{{ infoObject.updateTime }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- center -->
|
<!-- center -->
|
||||||
@@ -26,14 +26,21 @@
|
|||||||
<!-- bottom -->
|
<!-- bottom -->
|
||||||
<div style="width: 100%; margin-top: 10px">
|
<div style="width: 100%; margin-top: 10px">
|
||||||
<a-descriptions :column="1" bordered>
|
<a-descriptions :column="1" bordered>
|
||||||
<a-descriptions-item label="优先级">紧急</a-descriptions-item>
|
<a-descriptions-item label="优先级">{{
|
||||||
<a-descriptions-item label="状态">新告警</a-descriptions-item>
|
infoObject.priority ? infoObject.priority.label : ''
|
||||||
<a-descriptions-item label="错误码">C003</a-descriptions-item>
|
}}</a-descriptions-item>
|
||||||
<a-descriptions-item label="告警描述"
|
<a-descriptions-item label="状态">{{
|
||||||
><div style="color: #2778ff">用电量超标</div> 当日用电量超出预设值</a-descriptions-item
|
infoObject.alarmLogState ? infoObject.alarmLogState.label : ''
|
||||||
|
}}</a-descriptions-item>
|
||||||
|
<a-descriptions-item label="错误码">{{ infoObject.errorCode }}</a-descriptions-item>
|
||||||
|
<a-descriptions-item label="告警描述">
|
||||||
|
<div style="color: #2778ff">{{ infoObject.alarmTitle }}</div>
|
||||||
|
{{ infoObject.abnormalDescription }}</a-descriptions-item
|
||||||
>
|
>
|
||||||
<a-descriptions-item label="设备信息"> 1栋10层低压柜 </a-descriptions-item>
|
<a-descriptions-item label="设备信息"> {{ infoObject.deviceInfo }} </a-descriptions-item>
|
||||||
<a-descriptions-item label="重复次数"> 0 </a-descriptions-item>
|
<a-descriptions-item label="重复次数">
|
||||||
|
{{ infoObject.alarmRepetitions }}
|
||||||
|
</a-descriptions-item>
|
||||||
</a-descriptions>
|
</a-descriptions>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -51,16 +58,37 @@
|
|||||||
|
|
||||||
let chartInstance: echarts.ECharts | null = null;
|
let chartInstance: echarts.ECharts | null = null;
|
||||||
const graphChart = ref(null);
|
const graphChart = ref(null);
|
||||||
|
const infoObject = ref({
|
||||||
|
priority: null,
|
||||||
|
alarmCode: null,
|
||||||
|
alarmLogState: null,
|
||||||
|
errorCode: null,
|
||||||
|
alarmTitle: null,
|
||||||
|
abnormalDescription: null,
|
||||||
|
deviceInfo: null,
|
||||||
|
alarmRepetitions: null,
|
||||||
|
updateTime: null,
|
||||||
|
});
|
||||||
const visible = ref(false);
|
const visible = ref(false);
|
||||||
const handleClose = () => {
|
const handleClose = () => {
|
||||||
visible.value = false;
|
visible.value = false;
|
||||||
|
infoObject.value = {
|
||||||
|
priority: null,
|
||||||
|
alarmCode: null,
|
||||||
|
alarmLogState: null,
|
||||||
|
errorCode: null,
|
||||||
|
alarmTitle: null,
|
||||||
|
abnormalDescription: null,
|
||||||
|
deviceInfo: null,
|
||||||
|
alarmRepetitions: null,
|
||||||
|
updateTime: null,
|
||||||
|
};
|
||||||
};
|
};
|
||||||
const btnClick = () => {
|
const btnClick = () => {
|
||||||
console.log('btnClick');
|
|
||||||
handleClose();
|
handleClose();
|
||||||
};
|
};
|
||||||
const toggle = (data: any) => {
|
const toggle = (data: any) => {
|
||||||
console.log(data, 'data');
|
infoObject.value = data;
|
||||||
visible.value = true;
|
visible.value = true;
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
getChatr();
|
getChatr();
|
||||||
|
|||||||
@@ -39,21 +39,22 @@
|
|||||||
</div>
|
</div>
|
||||||
</a-tab-pane>
|
</a-tab-pane>
|
||||||
<a-tab-pane key="2" tab="状态流程">
|
<a-tab-pane key="2" tab="状态流程">
|
||||||
<NsSteps v-bind="config" />
|
<!-- 自动生成工单 -->
|
||||||
|
<div v-if="infoObject.createWorkOrder === 1"> xxxx </div>
|
||||||
|
<!-- 没有自动生成工单 -->
|
||||||
|
<NsSteps v-else v-bind="config" />
|
||||||
</a-tab-pane>
|
</a-tab-pane>
|
||||||
</a-tabs>
|
</a-tabs>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<!-- <a-button style="margin-right: 8px" type="primary" @click="createOrder">创建工单</a-button> -->
|
|
||||||
<a-button type="primary" @click="btnClick">确定</a-button>
|
<a-button type="primary" @click="btnClick">确定</a-button>
|
||||||
</template>
|
</template>
|
||||||
</ns-drawer>
|
</ns-drawer>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { defineComponent } from 'vue';
|
import { defineComponent } from 'vue';
|
||||||
import { ref, createVNode } from 'vue';
|
import { ref } from 'vue';
|
||||||
import NsSteps from '/@/components/ns-steps.vue';
|
import NsSteps from '/@/components/ns-steps.vue';
|
||||||
import { NsMessage, NsModal } from '/nerv-lib/component';
|
import { NsMessage } from '/nerv-lib/component';
|
||||||
import { ExclamationCircleOutlined } from '@ant-design/icons-vue';
|
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
components: { NsSteps },
|
components: { NsSteps },
|
||||||
@@ -62,19 +63,14 @@
|
|||||||
const visible = ref(false);
|
const visible = ref(false);
|
||||||
const showEdit = ref(true);
|
const showEdit = ref(true);
|
||||||
const infoObject = ref({});
|
const infoObject = ref({});
|
||||||
const statusOptions = ref([
|
const data = ref({});
|
||||||
{ value: '0', label: '待处理' },
|
const statusOptions = ref();
|
||||||
{ value: '1', label: '处理中' },
|
|
||||||
{ value: '2', label: '已完成' },
|
|
||||||
{ value: '3', label: '超时' },
|
|
||||||
{ value: '4', label: '已关闭' },
|
|
||||||
]);
|
|
||||||
const logList = ref([
|
const logList = ref([
|
||||||
{ name: '李四', status: '2', time: '2024-03-10 10:00:00', desc: '完成' },
|
{ name: '李四', status: '3', time: '2024-03-10 10:00:00', desc: '完成' },
|
||||||
|
{ name: '王五', status: '5', time: '2024-03-10 10:00:00' },
|
||||||
{ name: '王五', status: '4', time: '2024-03-10 10:00:00' },
|
{ name: '王五', status: '4', time: '2024-03-10 10:00:00' },
|
||||||
{ name: '王五', status: '3', time: '2024-03-10 10:00:00' },
|
{ name: '王五', status: '2', time: '2024-03-10 10:00:00', desc: '创建工单' },
|
||||||
{ name: '王五', status: '1', time: '2024-03-10 10:00:00', desc: '创建工单' },
|
{ name: '赵六', status: '1', time: '2024-03-10 10:00:00' },
|
||||||
{ name: '赵六', status: '0', time: '2024-03-10 10:00:00' },
|
|
||||||
]);
|
]);
|
||||||
const config = ref({
|
const config = ref({
|
||||||
size: logList.value.length,
|
size: logList.value.length,
|
||||||
@@ -84,23 +80,41 @@
|
|||||||
visible.value = false;
|
visible.value = false;
|
||||||
};
|
};
|
||||||
const btnClick = () => {
|
const btnClick = () => {
|
||||||
|
NsMessage.success('操作成功');
|
||||||
console.log('btnClick');
|
console.log('btnClick');
|
||||||
};
|
};
|
||||||
const toggle = (data) => {
|
const toggle = (data) => {
|
||||||
|
data.value = data;
|
||||||
infoObject.value = { ...logList.value[0] };
|
infoObject.value = { ...logList.value[0] };
|
||||||
|
if (data.value.createWorkOrder === 1) {
|
||||||
|
statusOptions.value = [
|
||||||
|
{ value: '1', label: '待处理' },
|
||||||
|
{ value: '2', label: '处理中' },
|
||||||
|
{ value: '3', label: '已完成' },
|
||||||
|
{ value: '4', label: '超时' },
|
||||||
|
{ value: '5', label: '已关闭' },
|
||||||
|
];
|
||||||
|
} else {
|
||||||
|
statusOptions.value = [
|
||||||
|
{ value: '1', label: '待处理' },
|
||||||
|
{ value: '2', label: '处理中' },
|
||||||
|
{ value: '3', label: '已完成' },
|
||||||
|
{ value: '5', label: '已关闭' },
|
||||||
|
];
|
||||||
|
}
|
||||||
let statusMap = {
|
let statusMap = {
|
||||||
0: '待处理',
|
1: '待处理',
|
||||||
1: '处理中',
|
2: '处理中',
|
||||||
2: '已完成',
|
3: '已完成',
|
||||||
3: '超时',
|
4: '超时',
|
||||||
4: '已关闭',
|
5: '已关闭',
|
||||||
};
|
};
|
||||||
let colorMap = {
|
let colorMap = {
|
||||||
0: '#ff7602',
|
1: '#ff7602',
|
||||||
1: '#00a1e6',
|
2: '#00a1e6',
|
||||||
2: '#04d919',
|
3: '#04d919',
|
||||||
3: '#d9001b',
|
4: '#d9001b',
|
||||||
4: '#a6a6a6',
|
5: '#a6a6a6',
|
||||||
};
|
};
|
||||||
logList.value.forEach((item) => {
|
logList.value.forEach((item) => {
|
||||||
item.statusName = statusMap[item.status];
|
item.statusName = statusMap[item.status];
|
||||||
@@ -109,38 +123,12 @@
|
|||||||
});
|
});
|
||||||
visible.value = true;
|
visible.value = true;
|
||||||
};
|
};
|
||||||
const createOrder = () => {
|
|
||||||
NsModal.confirm({
|
|
||||||
title: '提示',
|
|
||||||
icon: createVNode(ExclamationCircleOutlined),
|
|
||||||
content: '是否创建工单',
|
|
||||||
okText: '确认',
|
|
||||||
okType: 'primary',
|
|
||||||
cancelText: '取消',
|
|
||||||
onOk() {
|
|
||||||
NsModal.confirm({
|
|
||||||
title: '提示',
|
|
||||||
icon: createVNode(ExclamationCircleOutlined),
|
|
||||||
content: '工单创建成功,工单号xxxxxxxxx',
|
|
||||||
okText: '确认',
|
|
||||||
okType: 'primary',
|
|
||||||
cancelButtonProps: { style: { display: 'none' } }, // 正确设置取消按钮样式
|
|
||||||
onOk() {
|
|
||||||
console.log('创建工单');
|
|
||||||
},
|
|
||||||
});
|
|
||||||
},
|
|
||||||
onCancel() {
|
|
||||||
console.log('Cancel');
|
|
||||||
},
|
|
||||||
});
|
|
||||||
};
|
|
||||||
return {
|
return {
|
||||||
infoObject,
|
infoObject,
|
||||||
showEdit,
|
showEdit,
|
||||||
|
data,
|
||||||
statusOptions,
|
statusOptions,
|
||||||
btnClick,
|
btnClick,
|
||||||
createOrder,
|
|
||||||
visible,
|
visible,
|
||||||
logList,
|
logList,
|
||||||
config,
|
config,
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
import { dateUtil } from '/nerv-lib/util/date-util';
|
import { dateUtil } from '/nerv-lib/util/date-util';
|
||||||
import data from '../notificationManagementMock.json';
|
import data from '../notificationManagementMock.json';
|
||||||
import { http } from '/nerv-lib/util';
|
import { http } from '/nerv-lib/util';
|
||||||
|
import { equipmentAlarmApi } from '/@/api/alarmManagement/equipmentAlarm';
|
||||||
|
|
||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
const tableKeyMap = [
|
const tableKeyMap = [
|
||||||
{
|
{
|
||||||
@@ -12,45 +14,45 @@ const tableKeyMap = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '告警编号',
|
title: '告警编号',
|
||||||
dataIndex: 'id',
|
dataIndex: 'alarmCode',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '告警描述',
|
title: '告警描述',
|
||||||
dataIndex: 'deviceCode',
|
dataIndex: 'alarmTitle',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '优先级',
|
title: '优先级',
|
||||||
dataIndex: 'deviceName',
|
dataIndex: 'priority',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '状态',
|
title: '状态',
|
||||||
dataIndex: 'position',
|
dataIndex: 'alarmLogState',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '错误码',
|
title: '错误码',
|
||||||
dataIndex: 'position',
|
dataIndex: 'errorCode',
|
||||||
textEllipsis: true,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '设备信息',
|
title: '设备信息',
|
||||||
dataIndex: 'position',
|
dataIndex: 'deviceInfo',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '更新时间',
|
title: '更新时间',
|
||||||
dataIndex: 'enableRules',
|
dataIndex: 'updateTime',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '重复次数',
|
title: '重复次数',
|
||||||
dataIndex: 'enableRules',
|
dataIndex: 'alarmRepetitions',
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
const mockData = ref(data.listData);
|
const mockData = ref(data.listData);
|
||||||
export const notificationtableConfig = (look: any, status: any) => {
|
export const notificationtableConfig = (look: any, status: any) => {
|
||||||
return {
|
return {
|
||||||
title: '告警记录',
|
title: '告警记录',
|
||||||
// api: '/carbon_emission/device/getDeviceList',
|
api: equipmentAlarmApi.getTableList,
|
||||||
value: mockData.value,
|
value: mockData.value,
|
||||||
headerActions: [{}],
|
headerActions: [{}],
|
||||||
|
scroll: { x: 2000 },
|
||||||
columns: tableKeyMap,
|
columns: tableKeyMap,
|
||||||
// rowSelection: null, 选择按钮
|
// rowSelection: null, 选择按钮
|
||||||
columnActions: {
|
columnActions: {
|
||||||
@@ -61,7 +63,6 @@ export const notificationtableConfig = (look: any, status: any) => {
|
|||||||
name: 'FeedBackDetail',
|
name: 'FeedBackDetail',
|
||||||
dynamicParams: ['uuid', 'appealType'],
|
dynamicParams: ['uuid', 'appealType'],
|
||||||
handle: (data: any) => {
|
handle: (data: any) => {
|
||||||
console.log(look.value);
|
|
||||||
look.value.toggle(data);
|
look.value.toggle(data);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -79,29 +80,29 @@ export const notificationtableConfig = (look: any, status: any) => {
|
|||||||
formConfig: {
|
formConfig: {
|
||||||
schemas: [
|
schemas: [
|
||||||
{
|
{
|
||||||
field: 'name',
|
field: 'priority',
|
||||||
label: '告警类型',
|
label: '优先级',
|
||||||
component: 'NsSelect',
|
component: 'NsSelect',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
placeholder: '请选择告警优先级',
|
placeholder: '请选择告警优先级',
|
||||||
options: [
|
options: [
|
||||||
{
|
{
|
||||||
label: '紧急',
|
label: '紧急',
|
||||||
value: '1',
|
value: 1,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '重要',
|
label: '重要',
|
||||||
value: '2',
|
value: 2,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '一般',
|
label: '一般',
|
||||||
value: '3',
|
value: 3,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'provider',
|
field: 'alarmLogState',
|
||||||
label: '状态',
|
label: '状态',
|
||||||
component: 'NsSelect',
|
component: 'NsSelect',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
@@ -109,33 +110,38 @@ export const notificationtableConfig = (look: any, status: any) => {
|
|||||||
options: [
|
options: [
|
||||||
{
|
{
|
||||||
label: '待处理',
|
label: '待处理',
|
||||||
value: '1',
|
value: 1,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '处理中',
|
label: '处理中',
|
||||||
value: '2',
|
value: 2,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '已完成',
|
label: '已完成',
|
||||||
value: '3',
|
value: 3,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '超时',
|
label: '超时',
|
||||||
value: '4',
|
value: 4,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '关闭',
|
label: '关闭',
|
||||||
value: '5',
|
value: 5,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'provider',
|
field: 'errorCode',
|
||||||
label: '错误码',
|
label: '错误码',
|
||||||
component: 'NsInput',
|
component: 'NsSelectApi',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
placeholder: '请输入告警错误码',
|
placeholder: '请选择错误码',
|
||||||
|
autoSelectFirst: false,
|
||||||
|
api: equipmentAlarmApi.getCodeList,
|
||||||
|
resultField: 'data',
|
||||||
|
labelField: 'errorCode',
|
||||||
|
valueField: 'errorCode',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -34,6 +34,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</a-tab-pane>
|
</a-tab-pane>
|
||||||
<a-tab-pane key="2" tab="状态流程">
|
<a-tab-pane key="2" tab="状态流程">
|
||||||
|
<!-- 只有创建工单流程 -->
|
||||||
<NsSteps v-bind="config" />
|
<NsSteps v-bind="config" />
|
||||||
</a-tab-pane>
|
</a-tab-pane>
|
||||||
</a-tabs>
|
</a-tabs>
|
||||||
@@ -56,18 +57,18 @@
|
|||||||
const visible = ref(false);
|
const visible = ref(false);
|
||||||
const infoObject = ref({});
|
const infoObject = ref({});
|
||||||
const statusOptions = ref([
|
const statusOptions = ref([
|
||||||
{ value: '0', label: '待处理' },
|
{ value: '1', label: '待处理' },
|
||||||
{ value: '1', label: '处理中' },
|
{ value: '2', label: '处理中' },
|
||||||
{ value: '2', label: '已完成' },
|
{ value: '3', label: '已完成' },
|
||||||
{ value: '3', label: '超时' },
|
{ value: '4', label: '超时' },
|
||||||
{ value: '4', label: '已关闭' },
|
{ value: '5', label: '已关闭' },
|
||||||
]);
|
]);
|
||||||
const logList = ref([
|
const logList = ref([
|
||||||
{ name: '李四', status: '2', time: '2024-03-10 10:00:00', desc: '完成' },
|
{ name: '李四', status: '3', time: '2024-03-10 10:00:00', desc: '完成' },
|
||||||
|
{ name: '王五', status: '5', time: '2024-03-10 10:00:00' },
|
||||||
{ name: '王五', status: '4', time: '2024-03-10 10:00:00' },
|
{ name: '王五', status: '4', time: '2024-03-10 10:00:00' },
|
||||||
{ name: '王五', status: '3', time: '2024-03-10 10:00:00' },
|
{ name: '王五', status: '2', time: '2024-03-10 10:00:00', desc: '创建工单' },
|
||||||
{ name: '王五', status: '1', time: '2024-03-10 10:00:00', desc: '创建工单' },
|
{ name: '赵六', status: '1', time: '2024-03-10 10:00:00' },
|
||||||
{ name: '赵六', status: '0', time: '2024-03-10 10:00:00' },
|
|
||||||
]);
|
]);
|
||||||
const config = ref({
|
const config = ref({
|
||||||
size: logList.value.length,
|
size: logList.value.length,
|
||||||
@@ -82,18 +83,18 @@
|
|||||||
const toggle = (data) => {
|
const toggle = (data) => {
|
||||||
infoObject.value = { ...logList.value[0] };
|
infoObject.value = { ...logList.value[0] };
|
||||||
let statusMap = {
|
let statusMap = {
|
||||||
0: '待处理',
|
1: '待处理',
|
||||||
1: '处理中',
|
2: '处理中',
|
||||||
2: '已完成',
|
3: '已完成',
|
||||||
3: '超时',
|
4: '超时',
|
||||||
4: '已关闭',
|
5: '已关闭',
|
||||||
};
|
};
|
||||||
let colorMap = {
|
let colorMap = {
|
||||||
0: '#ff7602',
|
1: '#ff7602',
|
||||||
1: '#00a1e6',
|
2: '#00a1e6',
|
||||||
2: '#04d919',
|
3: '#04d919',
|
||||||
3: '#d9001b',
|
4: '#d9001b',
|
||||||
4: '#a6a6a6',
|
5: '#a6a6a6',
|
||||||
};
|
};
|
||||||
logList.value.forEach((item) => {
|
logList.value.forEach((item) => {
|
||||||
item.statusName = statusMap[item.status];
|
item.statusName = statusMap[item.status];
|
||||||
|
|||||||
Reference in New Issue
Block a user