智能控制页面添加
25
riis-web/src/api/intelligentcontrol/index.ts
Normal file
@ -0,0 +1,25 @@
|
||||
import request from '@/utils/request';
|
||||
//获取表格数据
|
||||
export function countDeviceTypeStatus(params: any) {
|
||||
return request({
|
||||
url: '/auxcontrol/device-signal/countDeviceTypeStatus',
|
||||
method: 'get',
|
||||
params: params
|
||||
});
|
||||
}
|
||||
export function queryYxData(params: any) {
|
||||
return request({
|
||||
url: '/auxcontrol/device-signal/queryYxData',
|
||||
method: 'get',
|
||||
params: params
|
||||
});
|
||||
}
|
||||
//
|
||||
//发送遥控遥调命令
|
||||
export function sendCommand(params: any) {
|
||||
return request({
|
||||
url: '/iecclient/sendCommand',
|
||||
method: 'get',
|
||||
params: params
|
||||
});
|
||||
}
|
BIN
riis-web/src/assets/navigation/07.png
Normal file
After Width: | Height: | Size: 11 KiB |
6
riis-web/src/assets/navigation/07_li.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="67px" height="80px" xmlns="http://www.w3.org/2000/svg">
|
||||
<g transform="matrix(1 0 0 1 -473 -629 )">
|
||||
<path d="M 6.91555552083332 6 L 6.91555552083332 5.62666666666667 C 6.35111104166663 5.62666666666667 5.89333333333343 6.04444447916671 6 6.55999999999995 L 6 73.4355555208333 C 5.89333333333343 73.9555555208333 6.35111114583333 74.3733333333333 6.91555552083332 74 L 60.1066666666668 74 C 60.6711111458333 74.3733333333333 61.1288888541667 73.9555555208333 61 73.4400000000001 L 61 6.55999999999995 C 61.1288888541667 6.03999999999996 60.6711110416668 5.62222218750003 60.1066666666668 6 L 6.91555552083332 6 Z M 59.7777778125001 0 L 59.7733333333333 0 C 63.6800000000001 0 66.8444444791667 2.93777781250003 66 6.5644444791667 L 66 73.4355555208333 C 66.8444444791667 77.0666666666666 63.6800000000001 80 59.7777778125001 80 L 7.24444447916676 80 C 3.34666666666658 80 0.177777812499926 77.0622221875 1 73.4355555208333 L 1 6.5644444791667 C 0.177777812499926 2.93333333333328 3.34222218750006 0 7.24444447916676 0 L 59.7777778125001 0 Z M 54.0355555208334 9.06222218749997 L 54.0355555208334 9 L 12.9866666666667 9 C 10.9288888541666 9.06666666666672 9.25777781250008 10.5555555208333 10 12.4088888541667 L 10 67.5333333333333 C 9.22666666666669 69.3955555208333 10.8755555208334 70.9111111458333 12.9244444791666 71 L 54.0355555208334 71 C 56.0933333333335 70.9377778125 57.764444375 69.4444444791667 57 67.5911111458333 L 57 12.4666666666667 C 57.7955555208334 10.5866666666667 56.1111110416666 9.06222218749997 54.0355555208334 9.06222218749997 Z M 43.0355555208334 37.1866666666667 C 43.0355555208334 35.6311111458333 44.3155555208334 34.3733333333333 45.8933333333334 34.3733333333333 C 47.4711111458334 34.3733333333333 48.7511111458334 35.6355555208334 48.7511111458334 37.1866666666667 L 48.7511111458334 42.8133333333333 C 48.7511111458334 44.3688888541667 47.4711111458334 45.6266666666667 45.8933333333334 45.6266666666667 C 45.8858972491798 45.6267251717408 45.8784609636484 45.6267544246173 45.8710246493476 45.6267544246173 C 44.3136277272379 45.6267544246173 43.0477126068786 44.3706828054351 43.0355555208334 42.8133333333333 L 43.0355555208334 37.1866666666667 Z " fill-rule="nonzero" fill="#0099ff" stroke="none" fill-opacity="0.2" transform="matrix(1 0 0 1 473 629 )" />
|
||||
</g>
|
||||
</svg>
|
6
riis-web/src/assets/navigation/07_zai.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="67px" height="80px" xmlns="http://www.w3.org/2000/svg">
|
||||
<g transform="matrix(1 0 0 1 -1670 -389 )">
|
||||
<path d="M 6.91555552083332 6 L 6.91555552083332 5.62666666666667 C 6.35111104166663 5.62666666666667 5.89333333333343 6.04444447916671 6 6.55999999999995 L 6 73.4355555208333 C 5.89333333333343 73.9555555208333 6.35111114583333 74.3733333333333 6.91555552083332 74 L 60.1066666666668 74 C 60.6711111458333 74.3733333333333 61.1288888541667 73.9555555208333 61 73.4400000000001 L 61 6.55999999999995 C 61.1288888541667 6.03999999999996 60.6711110416668 5.62222218750003 60.1066666666668 6 L 6.91555552083332 6 Z M 59.7777778125001 0 L 59.7733333333333 0 C 63.6800000000001 0 66.8444444791667 2.93777781250003 66 6.5644444791667 L 66 73.4355555208333 C 66.8444444791667 77.0666666666666 63.6800000000001 80 59.7777778125001 80 L 7.24444447916676 80 C 3.34666666666658 80 0.177777812499926 77.0622221875 1 73.4355555208333 L 1 6.5644444791667 C 0.177777812499926 2.93333333333328 3.34222218750006 0 7.24444447916676 0 L 59.7777778125001 0 Z M 54.0355555208334 9.06222218749997 L 54.0355555208334 9 L 12.9866666666667 9 C 10.9288888541666 9.06666666666672 9.25777781250008 10.5555555208333 10 12.4088888541667 L 10 67.5333333333333 C 9.22666666666669 69.3955555208333 10.8755555208334 70.9111111458333 12.9244444791666 71 L 54.0355555208334 71 C 56.0933333333335 70.9377778125 57.764444375 69.4444444791667 57 67.5911111458333 L 57 12.4666666666667 C 57.7955555208334 10.5866666666667 56.1111110416666 9.06222218749997 54.0355555208334 9.06222218749997 Z M 43.0355555208334 37.1866666666667 C 43.0355555208334 35.6311111458333 44.3155555208334 34.3733333333333 45.8933333333334 34.3733333333333 C 47.4711111458334 34.3733333333333 48.7511111458334 35.6355555208334 48.7511111458334 37.1866666666667 L 48.7511111458334 42.8133333333333 C 48.7511111458334 44.3688888541667 47.4711111458334 45.6266666666667 45.8933333333334 45.6266666666667 C 45.8858972491798 45.6267251717408 45.8784609636484 45.6267544246173 45.8710246493476 45.6267544246173 C 44.3136277272379 45.6267544246173 43.0477126068786 44.3706828054351 43.0355555208334 42.8133333333333 L 43.0355555208334 37.1866666666667 Z " fill-rule="nonzero" fill="#0099ff" stroke="none" transform="matrix(1 0 0 1 1670 389 )" />
|
||||
</g>
|
||||
</svg>
|
BIN
riis-web/src/assets/navigation/14.png
Normal file
After Width: | Height: | Size: 10 KiB |
6
riis-web/src/assets/navigation/14_li.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="74px" height="80px" xmlns="http://www.w3.org/2000/svg">
|
||||
<g transform="matrix(1 0 0 1 -861 -389 )">
|
||||
<path d="M 39.7989949748743 3.21608040200999 L 39.7989949748743 10.0502512562814 C 58.6934673366834 11.6582914572864 73.1658291457286 27.7386934673367 73.1658291457286 46.6331658291457 C 73.1658291457286 48.643216080402 71.5577889447236 49.8492462311558 69.9497487437186 49 L 56.2814070351758 49 C 54.6733668341708 59.4974874371859 46.2311557788944 66.7336683417085 36.5829145728643 66.7336683417085 C 26.5326633165829 66.7336683417085 18.4924623115578 59.4974874371859 16.8844221105528 49 L 3.21608040200999 49 C 1.2060301507538 49.8492462311558 0 48.2412060301508 0 46.6331658291457 C 0 27.3366834170854 14.8743718592965 11.6582914572864 33.3668341708542 10.0502512562814 L 33.3668341708542 3.21608040200999 C 33.3668341708542 1.608040201005 34.572864321608 0 36.5829145728643 0 C 38.5929648241206 0 39.7989949748743 1.608040201005 39.7989949748743 3.21608040200999 Z M 23.7185929648241 50 C 25.3266331658291 56.2814070351759 30.5527638190955 60.3015075376884 36.5829145728643 60.3015075376884 C 42.6130653266331 60.3015075376884 47.8391959798995 56.2814070351759 49.4472361809045 50 L 23.7185929648241 50 Z M 33.3668341708542 73.5678391959799 C 33.3668341708542 71.9597989949749 34.572864321608 70.3517587939698 36.5829145728643 70.3517587939698 C 38.5929648241206 70.3517587939698 39.7989949748743 71.9597989949749 39.7989949748743 73.5678391959799 L 39.7989949748743 76.7839195979899 C 39.7989949748743 78.7939698492462 38.1909547738693 80 36.5829145728643 80 C 34.572864321608 80 33.3668341708542 78.391959798995 33.3668341708542 76.7839195979899 L 33.3668341708542 73.5678391959799 Z M 23.7185929648241 67.9396984924623 C 24.5226130653266 67.537688442211 25.3266331658291 67.537688442211 26.1306532663316 67.9396984924623 C 26.9346733668342 68.3417085427136 27.3366834170854 69.1457286432161 27.7386934673367 69.9497487437186 C 28.1407035175879 70.7537688442211 28.1407035175879 71.5577889447236 27.7386934673367 72.3618090452261 L 26.1306532663316 75.1758793969849 C 25.7286432160804 75.9798994974874 24.9246231155779 76.7839195979899 24.1206030150754 76.7839195979899 C 23.3165829145728 77.1859296482412 22.5125628140703 77.1859296482412 21.7085427135678 76.7839195979899 C 20.1005025125628 75.9798994974874 19.2964824120603 73.9698492462312 20.1005025125628 72.3618090452261 L 21.7085427135678 69.5477386934673 C 22.1105527638191 68.7437185929648 22.9145728643216 68.3417085427136 23.7185929648241 67.9396984924623 Z M 10.4522613065327 62.3115577889447 L 13.2663316582914 60.3015075376884 C 14.070351758794 59.8994974874372 14.8743718592965 59.4974874371859 15.678391959799 59.4974874371859 C 16.4824120603015 59.4974874371859 17.286432160804 59.8994974874372 17.6884422110553 60.7035175879397 C 18.894472361809 62.3115577889447 18.4924623115578 64.321608040201 16.8844221105528 65.5276381909548 L 14.070351758794 67.537688442211 C 14.070351758794 68.3417085427136 12.8643216080402 68.7437185929648 12.0603015075377 68.3417085427136 C 11.2562814070352 68.3417085427136 10.4522613065327 67.9396984924623 10.0502512562814 67.1356783919598 C 9.64824120603009 66.3316582914573 9.2462311557789 65.5276381909548 9.2462311557789 64.7236180904522 C 9.2462311557789 63.9195979899497 9.64824120603009 63.1155778894472 10.4522613065327 62.3115577889447 Z M 48.643216080402 67.537688442211 C 49.8492462311557 67.537688442211 51.0552763819095 68.3417085427136 51.4572864321608 69.5477386934673 L 53.0653266331658 72.7638190954774 C 53.8693467336683 74.3718592964824 53.0653266331658 76.3819095477387 51.4572864321608 77.1859296482412 C 49.8492462311557 77.9899497487437 47.8391959798995 77.1859296482412 47.0351758793969 75.5778894472362 L 45.4271356783919 72.3618090452261 C 45.0251256281407 71.1557788944724 45.0251256281407 69.9497487437186 45.8291457286432 69.1457286432161 C 46.6331658291457 68.3417085427136 47.4371859296482 67.537688442211 48.643216080402 67.537688442211 Z M 57.8894472361809 59.4974874371859 C 58.2914572864321 59.4974874371859 59.0954773869346 59.8994974874372 59.8994974874371 60.3015075376884 L 62.7135678391959 62.3115577889447 C 64.321608040201 63.5175879396985 64.321608040201 65.5276381909548 63.5175879396985 67.1356783919598 C 62.7135678391959 67.9396984924623 61.5075376884422 68.3417085427136 60.7035175879397 68.3417085427136 C 59.8994974874371 68.3417085427136 59.0954773869346 67.9396984924623 58.6934673366834 67.537688442211 L 55.8793969849246 65.5276381909548 C 55.0753768844221 65.1256281407035 54.6733668341708 64.321608040201 54.6733668341708 63.1155778894472 C 54.6733668341708 62.3115577889447 54.6733668341708 61.5075376884422 55.4773869346733 60.7035175879397 C 55.8793969849246 59.8994974874372 56.6834170854271 59.4974874371859 57.8894472361809 59.4974874371859 Z " fill-rule="nonzero" fill="#0099ff" stroke="none" fill-opacity="0.2" transform="matrix(1 0 0 1 861 389 )" />
|
||||
</g>
|
||||
</svg>
|
6
riis-web/src/assets/navigation/14_zai.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="74px" height="80px" xmlns="http://www.w3.org/2000/svg">
|
||||
<g transform="matrix(1 0 0 1 -462 -389 )">
|
||||
<path d="M 39.7989949748743 3.21608040200999 L 39.7989949748743 10.0502512562814 C 58.6934673366834 11.6582914572864 73.1658291457286 27.7386934673367 73.1658291457286 46.6331658291457 C 73.1658291457286 48.643216080402 71.5577889447236 49.8492462311558 69.9497487437186 49 L 56.2814070351758 49 C 54.6733668341708 59.4974874371859 46.2311557788944 66.7336683417085 36.5829145728643 66.7336683417085 C 26.5326633165829 66.7336683417085 18.4924623115578 59.4974874371859 16.8844221105528 49 L 3.21608040200999 49 C 1.2060301507538 49.8492462311558 0 48.2412060301508 0 46.6331658291457 C 0 27.3366834170854 14.8743718592965 11.6582914572864 33.3668341708542 10.0502512562814 L 33.3668341708542 3.21608040200999 C 33.3668341708542 1.608040201005 34.572864321608 0 36.5829145728643 0 C 38.5929648241206 0 39.7989949748743 1.608040201005 39.7989949748743 3.21608040200999 Z M 23.7185929648241 50 C 25.3266331658291 56.2814070351759 30.5527638190955 60.3015075376884 36.5829145728643 60.3015075376884 C 42.6130653266331 60.3015075376884 47.8391959798995 56.2814070351759 49.4472361809045 50 L 23.7185929648241 50 Z M 33.3668341708542 73.5678391959799 C 33.3668341708542 71.9597989949749 34.572864321608 70.3517587939698 36.5829145728643 70.3517587939698 C 38.5929648241206 70.3517587939698 39.7989949748743 71.9597989949749 39.7989949748743 73.5678391959799 L 39.7989949748743 76.7839195979899 C 39.7989949748743 78.7939698492462 38.1909547738693 80 36.5829145728643 80 C 34.572864321608 80 33.3668341708542 78.391959798995 33.3668341708542 76.7839195979899 L 33.3668341708542 73.5678391959799 Z M 23.7185929648241 67.9396984924623 C 24.5226130653266 67.537688442211 25.3266331658291 67.537688442211 26.1306532663316 67.9396984924623 C 26.9346733668342 68.3417085427136 27.3366834170854 69.1457286432161 27.7386934673367 69.9497487437186 C 28.1407035175879 70.7537688442211 28.1407035175879 71.5577889447236 27.7386934673367 72.3618090452261 L 26.1306532663316 75.1758793969849 C 25.7286432160804 75.9798994974874 24.9246231155779 76.7839195979899 24.1206030150754 76.7839195979899 C 23.3165829145728 77.1859296482412 22.5125628140703 77.1859296482412 21.7085427135678 76.7839195979899 C 20.1005025125628 75.9798994974874 19.2964824120603 73.9698492462312 20.1005025125628 72.3618090452261 L 21.7085427135678 69.5477386934673 C 22.1105527638191 68.7437185929648 22.9145728643216 68.3417085427136 23.7185929648241 67.9396984924623 Z M 10.4522613065327 62.3115577889447 L 13.2663316582914 60.3015075376884 C 14.070351758794 59.8994974874372 14.8743718592965 59.4974874371859 15.678391959799 59.4974874371859 C 16.4824120603015 59.4974874371859 17.286432160804 59.8994974874372 17.6884422110553 60.7035175879397 C 18.894472361809 62.3115577889447 18.4924623115578 64.321608040201 16.8844221105528 65.5276381909548 L 14.070351758794 67.537688442211 C 14.070351758794 68.3417085427136 12.8643216080402 68.7437185929648 12.0603015075377 68.3417085427136 C 11.2562814070352 68.3417085427136 10.4522613065327 67.9396984924623 10.0502512562814 67.1356783919598 C 9.64824120603009 66.3316582914573 9.2462311557789 65.5276381909548 9.2462311557789 64.7236180904522 C 9.2462311557789 63.9195979899497 9.64824120603009 63.1155778894472 10.4522613065327 62.3115577889447 Z M 48.643216080402 67.537688442211 C 49.8492462311557 67.537688442211 51.0552763819095 68.3417085427136 51.4572864321608 69.5477386934673 L 53.0653266331658 72.7638190954774 C 53.8693467336683 74.3718592964824 53.0653266331658 76.3819095477387 51.4572864321608 77.1859296482412 C 49.8492462311557 77.9899497487437 47.8391959798995 77.1859296482412 47.0351758793969 75.5778894472362 L 45.4271356783919 72.3618090452261 C 45.0251256281407 71.1557788944724 45.0251256281407 69.9497487437186 45.8291457286432 69.1457286432161 C 46.6331658291457 68.3417085427136 47.4371859296482 67.537688442211 48.643216080402 67.537688442211 Z M 57.8894472361809 59.4974874371859 C 58.2914572864321 59.4974874371859 59.0954773869346 59.8994974874372 59.8994974874371 60.3015075376884 L 62.7135678391959 62.3115577889447 C 64.321608040201 63.5175879396985 64.321608040201 65.5276381909548 63.5175879396985 67.1356783919598 C 62.7135678391959 67.9396984924623 61.5075376884422 68.3417085427136 60.7035175879397 68.3417085427136 C 59.8994974874371 68.3417085427136 59.0954773869346 67.9396984924623 58.6934673366834 67.537688442211 L 55.8793969849246 65.5276381909548 C 55.0753768844221 65.1256281407035 54.6733668341708 64.321608040201 54.6733668341708 63.1155778894472 C 54.6733668341708 62.3115577889447 54.6733668341708 61.5075376884422 55.4773869346733 60.7035175879397 C 55.8793969849246 59.8994974874372 56.6834170854271 59.4974874371859 57.8894472361809 59.4974874371859 Z " fill-rule="nonzero" fill="#0099ff" stroke="none" transform="matrix(1 0 0 1 462 389 )" />
|
||||
</g>
|
||||
</svg>
|
BIN
riis-web/src/assets/navigation/20.png
Normal file
After Width: | Height: | Size: 11 KiB |
6
riis-web/src/assets/navigation/20_li.svg
Normal file
6
riis-web/src/assets/navigation/20_zai.svg
Normal file
BIN
riis-web/src/assets/navigation/all.png
Normal file
After Width: | Height: | Size: 10 KiB |
BIN
riis-web/src/assets/navigation/bc_topp.png
Normal file
After Width: | Height: | Size: 708 B |
BIN
riis-web/src/assets/navigation/lixian.png
Normal file
After Width: | Height: | Size: 1.8 KiB |
BIN
riis-web/src/assets/navigation/zai.png
Normal file
After Width: | Height: | Size: 1.8 KiB |
@ -658,7 +658,7 @@ function getCamera() {
|
||||
isWiper.value = false
|
||||
let foundUser
|
||||
if (patroldeviceJson.value) {
|
||||
debugger
|
||||
// debugger
|
||||
foundUser = res.data.find((user: any) => user.channelId === patroldeviceJson.value.patroldevice_channelcode);
|
||||
} else {
|
||||
foundUser = res.data[0]
|
||||
|
530
riis-web/src/views/collectmonitor/intelligentcontrol/index.vue
Normal file
@ -0,0 +1,530 @@
|
||||
<script lang="ts">
|
||||
export default {
|
||||
name: 'dept'
|
||||
};
|
||||
</script>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, nextTick } from "vue";
|
||||
import { getTreeList } from "@/api/linksignal";
|
||||
import { countDeviceTypeStatus, queryYxData, sendCommand } from "@/api/intelligentcontrol";
|
||||
import { getDeviceByType } from '@/api/device'
|
||||
import { ElMessageBox, ElMessage } from "element-plus";
|
||||
import { useUserStore } from '@/store/modules/user';
|
||||
import Page from '@/components/Pagination/page.vue';
|
||||
const userStore = useUserStore();
|
||||
const defaultProps = {
|
||||
children: "children",
|
||||
label: "name"
|
||||
};
|
||||
const treedata: any = ref([]);
|
||||
const treeRef = ref();
|
||||
const treeloading = ref(false)
|
||||
const currentNodeKey = ref("")
|
||||
const areaId = ref("")
|
||||
const areaName = ref("")
|
||||
function getSelect() {
|
||||
treeloading.value = true
|
||||
getTreeList({ stationId: userStore.stationId, areaName: areaName.value }).then((res: any) => {
|
||||
treeloading.value = true
|
||||
if (res.code == 0) {
|
||||
treedata.value = res.data
|
||||
if (res.data[0] && res.data[0].children && res.data[0].children[0].areaId) {
|
||||
areaId.value = res.data[0].children[0].areaId
|
||||
}
|
||||
getdata()
|
||||
treeloading.value = false
|
||||
nextTick(() => {
|
||||
treeRef.value?.setCurrentKey(areaId.value);
|
||||
});
|
||||
} else {
|
||||
treeloading.value = false
|
||||
}
|
||||
|
||||
})
|
||||
}
|
||||
function handleNodeClick(data: any, node: any) {
|
||||
areaId.value = data.areaId
|
||||
getdata()
|
||||
getdataone()
|
||||
}
|
||||
//左侧数据
|
||||
const titleall: any = ref([])
|
||||
const titleloading: any = ref(false)
|
||||
function getdata() {
|
||||
titleloading.value = true
|
||||
countDeviceTypeStatus({ areaId: areaId.value, stationId: userStore.stationId }).then((res: any) => {
|
||||
titleloading.value = false
|
||||
titleall.value = res.data
|
||||
classification(res.data)
|
||||
})
|
||||
}
|
||||
//tabbbas
|
||||
const tabs = ref('all')
|
||||
function shauxin(index: any) {
|
||||
tabs.value = index
|
||||
contform.value.type = tabs.value
|
||||
getdataone()
|
||||
}
|
||||
const contform = ref({
|
||||
size: 12,
|
||||
current: 1,
|
||||
areaId: areaId.value,
|
||||
stationId: userStore.stationId,
|
||||
type: tabs.value
|
||||
})
|
||||
const total = ref(0)
|
||||
const tableData: any = ref([])
|
||||
const tableloading = ref(false)
|
||||
function getdataone() {
|
||||
tableloading.value = true
|
||||
contform.value.areaId = areaId.value
|
||||
queryYxData(contform.value).then((res: any) => {
|
||||
tableloading.value = false
|
||||
tableData.value = res.data.records
|
||||
contform.value.size = res.data.size
|
||||
contform.value.current = res.data.current
|
||||
total.value = res.data.total
|
||||
|
||||
})
|
||||
}
|
||||
const titleArrshu = ref([
|
||||
{ deviceType: "all", onlineCount: 0, total: 0 },
|
||||
{ deviceType: "14", onlineCount: 0, total: 0 },
|
||||
{ deviceType: "20", onlineCount: 0, total: 0 },
|
||||
{ deviceType: "07", onlineCount: 0, total: 0 },
|
||||
])
|
||||
function classification(row: any) {
|
||||
// 1. 先重置所有项的数值为0
|
||||
titleArrshu.value.forEach(element => {
|
||||
element.onlineCount = 0;
|
||||
element.total = 0;
|
||||
});
|
||||
|
||||
// 2. 遍历传入数据更新匹配项
|
||||
row.forEach((item: any) => {
|
||||
const target = titleArrshu.value.find(
|
||||
element => element.deviceType === item.deviceType
|
||||
);
|
||||
if (target) {
|
||||
target.onlineCount = item.onlineCount;
|
||||
target.total = item.total;
|
||||
}
|
||||
});
|
||||
}
|
||||
//更改开关状态
|
||||
function openchange(row: any) {
|
||||
if (row.status == '02') {
|
||||
ElMessage.warning('当前设备处于离线状态,请勿操作!')
|
||||
return
|
||||
}
|
||||
let elMessage
|
||||
if (row.yxValue == '0') {
|
||||
elMessage = "确定启用该设备吗?"
|
||||
} else if (row.yxValue == '1') {
|
||||
elMessage = "确定关闭该视设备吗?"
|
||||
}
|
||||
ElMessageBox.confirm(elMessage, "提示信息", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
})
|
||||
.then(() => {
|
||||
let params = {
|
||||
systemcode: row.systemcode,
|
||||
signalId: row.signalId,
|
||||
type: row.deviceType,
|
||||
value: row.yxValue,
|
||||
}
|
||||
sendCommand(params).then((res: any) => {
|
||||
getdataone()
|
||||
})
|
||||
})
|
||||
.catch(() => {
|
||||
getdataone()
|
||||
})
|
||||
|
||||
}
|
||||
//判断类型
|
||||
function currency(list: any, itemcode: any) {
|
||||
let dictname = ''
|
||||
list.forEach((element: any) => {
|
||||
if (element.itemcode == itemcode) {
|
||||
dictname = element.dictname
|
||||
}
|
||||
})
|
||||
return dictname
|
||||
}
|
||||
const deviceTypearr = ref([])
|
||||
function getType() {
|
||||
getDeviceByType({ dictcode: 'deviceType' }).then((res: any) => {
|
||||
deviceTypearr.value = res.data
|
||||
})
|
||||
}
|
||||
|
||||
// 设备类型图片解析方法
|
||||
const getDeviceImage = (deviceType: string) => {
|
||||
if (!deviceType) {
|
||||
console.error('无效的 deviceType:', deviceType);
|
||||
return ''; // 或者返回一个默认图片路径
|
||||
}
|
||||
try {
|
||||
return new URL(`../../../assets/navigation/${deviceType}.png`, import.meta.url).href;
|
||||
} catch (e) {
|
||||
console.error('资源加载失败:', e);
|
||||
return ''; // 或者返回一个默认图片路径
|
||||
}
|
||||
}
|
||||
function getDeviceImage1(deviceType: any, yxValue: any, status: any) {
|
||||
if (!deviceType) {
|
||||
console.error('无效的 deviceType:', deviceType);
|
||||
return ''; // 或者返回一个默认图片路径
|
||||
}
|
||||
try {
|
||||
const statusSuffix = (yxValue == 1 && status == '01') ? 'zai' : 'li';
|
||||
console.log(`../../../assets/navigation/${deviceType}_${statusSuffix}.svg`)
|
||||
return new URL(`../../../assets/navigation/${deviceType}_${statusSuffix}.svg`, import.meta.url).href;
|
||||
} catch (e) {
|
||||
console.error('资源加载失败:', e);
|
||||
return ''; // 或者返回一个默认图片路径
|
||||
}
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
getSelect();
|
||||
getType()
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div style="padding: 15px 15px 0px; ">
|
||||
<div class="faulttemplate-box">
|
||||
<aside id="silderLeft">
|
||||
<div class="stationboard-box-title">
|
||||
<img src="@/assets/navigation/ty_bq.png" />
|
||||
<div class="imgname">声纹列表</div>
|
||||
</div>
|
||||
<el-input v-model="areaName" clearable placeholder="请输入区域名称" @change="getSelect()" style="width: 100%;"
|
||||
class="videomonitor-input">
|
||||
<template #suffix>
|
||||
<img src="@/assets/monitorsystem/spjk_ss.png" style="cursor:pointer ;" @click="getSelect">
|
||||
</template>
|
||||
</el-input>
|
||||
<el-scrollbar height="calc(80vh)" style="width:99%;">
|
||||
<el-tree ref="treeRef" node-key="areaId" :data="treedata" :current-node-key="currentNodeKey"
|
||||
:highlight-current="true" :props="defaultProps" v-loading="treeloading"
|
||||
@node-click="handleNodeClick">
|
||||
</el-tree>
|
||||
</el-scrollbar>
|
||||
</aside>
|
||||
<main class="silderRight ">
|
||||
<el-scrollbar>
|
||||
<div class="title_all" v-loading="titleloading">
|
||||
<div class="title_one" v-for="item in titleArrshu">
|
||||
<div class="title_img"><img v-if="item.deviceType" :src="getDeviceImage(item.deviceType)"
|
||||
alt=""></div>
|
||||
<div class="title_text">
|
||||
<div><span>{{ currency(deviceTypearr, item.deviceType) }}总数</span><span
|
||||
class="title_text_top">{{
|
||||
item.total }}</span></div>
|
||||
<div><span>在线总数</span><span class="title_text_top">{{ item.onlineCount }}</span></div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="title_one">
|
||||
<div class="title_img"><img src="@/assets/navigation/all.png" alt=""></div>
|
||||
<div class="title_text">
|
||||
<div><span>设备总数</span><span class="title_text_top"></span></div>
|
||||
<div><span>在线总数</span><span class="title_text_top"></span></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="title_one">
|
||||
<div class="title_img"><img src="@/assets/navigation/14.png" alt=""></div>
|
||||
<div class="title_text">
|
||||
<div><span>照明总数</span><span class="title_text_top"></span></div>
|
||||
<div><span>在线总数</span><span class="title_text_top"></span></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="title_one">
|
||||
<div class="title_img"><img src="@/assets/navigation/20.png" alt=""></div>
|
||||
<div class="title_text">
|
||||
<div><span>风机总数</span><span class="title_text_top"></span></div>
|
||||
<div><span>在线总数</span><span class="title_text_top"></span></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="title_one">
|
||||
<div class="title_img"><img src="@/assets/navigation/07.png" alt=""></div>
|
||||
<div class="title_text">
|
||||
<div><span>门禁总数</span><span class="title_text_top"></span></div>
|
||||
<div><span>在线总数</span><span class="title_text_top"></span></div>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
</el-scrollbar>
|
||||
<div class="content_box_button" v-loading="titleloading">
|
||||
<div v-for="item in titleArrshu" :class="tabs == item.deviceType ? 'sure_button' : 'button'"
|
||||
@click="shauxin(item.deviceType)">{{ currency(deviceTypearr,
|
||||
item.deviceType) == '设备' ? '全部' : currency(deviceTypearr, item.deviceType) }}</div>
|
||||
<!-- <div :class="tabs == 'all' ? 'sure_button' : 'button'" @click="shauxin('all')">全部</div>
|
||||
<div :class="tabs == '14' ? 'sure_button' : 'button'" @click="shauxin('14')">照明</div>
|
||||
<div :class="tabs == '20' ? 'sure_button' : 'button'" @click="shauxin('20')">风机</div>
|
||||
<div :class="tabs == '07' ? 'sure_button' : 'button'" @click="shauxin('07')">门禁</div> -->
|
||||
</div>
|
||||
<el-scrollbar height="calc(63vh)" v-loading="tableloading">
|
||||
<div class="one_contont">
|
||||
<!-- v-for="item in tableData" -->
|
||||
<div class="oveyone" v-for="item in tableData">
|
||||
<div class="ovey_top">
|
||||
<div class="ovey_top_left">
|
||||
<div class="qiu"
|
||||
:style="{ background: item.status == '01' ? '#009933' : '#B5D7FF' }">
|
||||
</div>
|
||||
<div class="zi" :style="{ color: item.status == '01' ? '#009933' : '#B5D7FF' }">{{
|
||||
item.status ==
|
||||
'01' ? '在线' : '离线' }}</div>
|
||||
</div>
|
||||
<div class="ovey_top_right" @click="openchange(item)">
|
||||
<img v-if="item.yxValue == 1" src="@/assets/navigation/zai.png" alt="">
|
||||
<img v-else src="@/assets/navigation/lixian.png" alt="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="ovey_img" v-if="item.deviceType"><img
|
||||
:src="getDeviceImage1(item.deviceType, item.yxValue, item.status)" alt=""></div>
|
||||
<div class="ovey_name">{{ item.signalName }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-scrollbar>
|
||||
<Page style="margin-top: 20px;" :total="total" v-model:size="contform.size"
|
||||
v-model:current="contform.current" @pagination="getdataone()">
|
||||
</Page>
|
||||
</main>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<style scoped lang="scss">
|
||||
.stationboard-box-title {
|
||||
font-family: '阿里妈妈数黑体 Bold', '阿里妈妈数黑体';
|
||||
font-weight: 700;
|
||||
font-style: normal;
|
||||
font-size: 16px;
|
||||
color: #ffffff;
|
||||
height: 40px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
// padding-left: 20px;
|
||||
.imgname {
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.faulttemplate-box {
|
||||
height: 100%;
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
background-color: #f2f4f900;
|
||||
|
||||
#silderLeft {
|
||||
width: 300px;
|
||||
box-sizing: border-box;
|
||||
// border-radius: 3px;
|
||||
position: relative;
|
||||
background: url(@/assets/navigation/ty_260x988.png);
|
||||
background-size: 100% 100%;
|
||||
height: calc(90vh);
|
||||
padding: 10px;
|
||||
|
||||
&:hover {
|
||||
.moveBtn {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.silderRight {
|
||||
flex: 1;
|
||||
position: relative;
|
||||
width: 100%;
|
||||
overflow: auto;
|
||||
// border-radius: 3px;
|
||||
padding: 15px;
|
||||
padding-right: 0px;
|
||||
padding-bottom: 0px;
|
||||
margin-left: 15px;
|
||||
box-sizing: border-box;
|
||||
|
||||
:deep(.el-scrollbar) {
|
||||
height: auto !important;
|
||||
}
|
||||
|
||||
.title_all {
|
||||
width: fit-content;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
// padding-right: 15px;
|
||||
|
||||
// justify-content: space-between;
|
||||
|
||||
.title_one {
|
||||
width: 375px;
|
||||
height: 120px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
// border: 1px solid red;
|
||||
padding: 15px 30px;
|
||||
box-sizing: border-box;
|
||||
background: url(@/assets/navigation/bc_topp.png);
|
||||
background-size: 100% 100%;
|
||||
margin-right: 10px;
|
||||
|
||||
.title_img {
|
||||
width: 95px;
|
||||
height: 100px;
|
||||
// border: 1px solid red;
|
||||
}
|
||||
|
||||
.title_text {
|
||||
font-family: 'MicrosoftYaHei Normal', 'MicrosoftYaHei';
|
||||
font-weight: 400;
|
||||
font-style: normal;
|
||||
font-size: 18px;
|
||||
color: #B5D7FF;
|
||||
margin-left: 20px;
|
||||
|
||||
div {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.title_text_top {
|
||||
font-family: 钉钉进步体;
|
||||
font-weight: 400;
|
||||
font-style: normal;
|
||||
font-size: 24px;
|
||||
color: rgb(0, 255, 255);
|
||||
display: inline-block;
|
||||
margin-left: 10px;
|
||||
// line-height: 23px;
|
||||
}
|
||||
}
|
||||
|
||||
// line-height: 11px;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
.content_box_button {
|
||||
margin-top: 15px;
|
||||
padding-right: 15px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
div {
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.sure_button {
|
||||
cursor: pointer;
|
||||
padding: 4px 18px;
|
||||
box-sizing: border-box;
|
||||
font-family: 'Arial Normal', 'Arial';
|
||||
font-weight: 400;
|
||||
font-style: normal;
|
||||
font-size: 14px;
|
||||
color: #FFFFFF;
|
||||
background-color: #0099ff;
|
||||
border: 1px solid #0099ff;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.button {
|
||||
cursor: pointer;
|
||||
padding: 4px 18px;
|
||||
box-sizing: border-box;
|
||||
font-family: 'Arial Normal', 'Arial';
|
||||
font-weight: 400;
|
||||
font-style: normal;
|
||||
font-size: 14px;
|
||||
color: #B5D7FF;
|
||||
background-color: #003776;
|
||||
border: 1px solid #0068bd;
|
||||
border-radius: 3px;
|
||||
}
|
||||
}
|
||||
|
||||
.one_contont {
|
||||
margin-top: 20px;
|
||||
width: 100%;
|
||||
height: calc(60vh);
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-content: flex-start;
|
||||
// align-items: center;
|
||||
|
||||
|
||||
// border: 1px solid #00427b;
|
||||
.oveyone {
|
||||
width: 375px;
|
||||
height: 220px;
|
||||
border: 1px solid #00427b;
|
||||
border-radius: 5px;
|
||||
background: #001e55;
|
||||
box-sizing: border-box;
|
||||
padding: 20px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin-right: 15px;
|
||||
margin-bottom: 15px;
|
||||
|
||||
// justify-content: center;
|
||||
.ovey_top {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
|
||||
.ovey_top_left {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.qiu {
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
border-radius: 100%;
|
||||
background-color: #009933;
|
||||
}
|
||||
|
||||
.zi {
|
||||
font-family: 'Arial Normal', 'Arial';
|
||||
font-weight: 400;
|
||||
font-style: normal;
|
||||
font-size: 16px;
|
||||
color: #009933;
|
||||
margin-left: 5px;
|
||||
}
|
||||
}
|
||||
|
||||
.ovey_top_right {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.ovey_name {
|
||||
font-family: 'Arial Normal', 'Arial';
|
||||
font-weight: 400;
|
||||
font-style: normal;
|
||||
font-size: 16px;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|