Commit 80a16394 authored by wangxiaoming's avatar wangxiaoming

提交 路段前台代码

parent 4e10ae55
Pipeline #583 failed with stages
# inspection-front # inspection-front
## 说明 ## 说明
巡检平台前端,采用vue-cli + element + baidumap开发 公路平台前端,采用vue-cli + element + baidumap开发
## 安装插件 ## 安装插件
npm install 或 cnpm install npm install 或 cnpm install
## 运行 ## 运行
......
...@@ -1607,7 +1607,7 @@ ...@@ -1607,7 +1607,7 @@
"integrity": "sha1-yULPJeiRzwgbagMzK0rh70MHJvA=", "integrity": "sha1-yULPJeiRzwgbagMzK0rh70MHJvA=",
"dev": true, "dev": true,
"requires": { "requires": {
"dom-event-types": "^1.0.0", "dom--types": "^1.0.0",
"lodash": "^4.17.4" "lodash": "^4.17.4"
} }
}, },
......
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="zh-CN">
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0"> <meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="<%= BASE_URL %>favicon.ico"> <link rel="icon" href="<%= BASE_URL %>favicon.ico">
<title>巡检平台</title> <title>公路平台</title>
<script src="https://pv.sohu.com/cityjson?ie=utf-8"></script> <script src="https://pv.sohu.com/cityjson?ie=utf-8"></script>
<script type="text/javascript"> <script type="text/javascript">
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
</div>--> </div>-->
<!-- <label></label>--> <!-- <label></label>-->
<video style="width:100%;height:550px" id="rtc_media_player" controls autoplay></video> <video style="width:100%;height:350px" id="rtc_media_player" controls autoplay></video>
<!-- <label></label> <!-- <label></label>
SessionID: <span id='sessionid'></span> SessionID: <span id='sessionid'></span>
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
var startPlay = function() { var startPlay = function() {
$('#rtc_media_player').show(); $('#rtc_media_player').show();
var url =getUrlParam("url"); var url =getUrlParam("url");
console.log("liveUrl"+url); console.log("liveUrl: "+url);
//"webrtc://152.136.233.116/live/livestream" //"webrtc://152.136.233.116/live/livestream"
var urlObject = parse_rtmp_url(url); var urlObject = parse_rtmp_url(url);
/*urlObject*/ /*urlObject*/
...@@ -96,6 +96,7 @@ ...@@ -96,6 +96,7 @@
// Replace /rtc/v1/play/&k=v to /rtc/v1/play/?k=v // Replace /rtc/v1/play/&k=v to /rtc/v1/play/?k=v
url = url.replace(api + '&', api + '?'); url = url.replace(api + '&', api + '?');
url=url.replace('https', 'http'); url=url.replace('https', 'http');
// @see https://github.com/rtcdn/rtcdn-draft // @see https://github.com/rtcdn/rtcdn-draft
var data = { var data = {
api: url, streamurl: urlObject.url, clientip: null, sdp: offer.sdp api: url, streamurl: urlObject.url, clientip: null, sdp: offer.sdp
...@@ -103,7 +104,7 @@ ...@@ -103,7 +104,7 @@
console.log("Generated offer: ", data); console.log("Generated offer: ", data);
$.ajax({ $.ajax({
type: "POST", url: "https://xj.roadgrids.com/liveUrl", data: JSON.stringify(data), type: "POST", url: "http://152.136.233.116:1985/rtc/v1/play/?eip=152.136.233.116", data: JSON.stringify(data),
contentType:'application/json', dataType: 'json' contentType:'application/json', dataType: 'json'
}).done(function(data) { }).done(function(data) {
console.log("Got answer: ", data); console.log("Got answer: ", data);
......
This diff is collapsed.
<?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="1604310268971" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="608" width="64" height="64" xmlns:xlink="http://www.w3.org/1999/xlink"><defs><style type="text/css"></style></defs><path d="M838.17472 394.24c6.45632 19.58912 10.78272 32.8192 10.78272 32.8192s-0.66048 11.68896-10.37824 11.68896c-14.12096 0-312.08448 0-312.08448 0l-41.71264 0c0 0-297.96352 0-312.0896 0-9.71264 0-10.37824-11.68896-10.37824-11.68896S223.232 240.99328 229.85216 227.09248c6.62016-13.90592 23.61856-11.69408 23.61856-11.69408l241.89952 0 20.52608 0L673.28 215.3984 673.28 153.61024l-160.9216 0-13.44512 0L246.40512 153.61024c0 0-45.02528-4.4288-60.91776 25.59488-15.89248 30.02368-124.48256 308.99712-124.48256 308.99712l0 404.33664c0 0 15.232 44.36992 74.82368 44.36992 59.5968 0 72.17152-44.36992 72.17152-44.36992l0-62.23872 293.77536 0 7.71584 0 293.77536 0 0 62.23872c0 0 12.57984 44.36992 72.17664 44.36992s74.81856-44.36992 74.81856-44.36992L950.26176 488.20224c0 0-16.10752-41.37984-36.8128-93.96224L838.17472 394.24zM240.11776 691.9168c-41.87136 0-75.81696-33.93536-75.81696-75.81696s33.9456-75.82208 75.81696-75.82208 75.81696 33.94048 75.81696 75.82208S281.98912 691.9168 240.11776 691.9168zM771.15904 691.9168c-41.87648 0-75.82208-33.93536-75.82208-75.81696s33.9456-75.82208 75.82208-75.82208c41.87136 0 75.81184 33.94048 75.81184 75.82208S813.0304 691.9168 771.15904 691.9168z" p-id="609" fill="#f4ea2a"></path><path d="M795.128 365.922c-4.23-4.23-6.675-10.205-6.27-16.725 1.07-16.775-5.025-33.075-16.69-44.745-11.86-11.86-27.73-17.81-44.65-16.725-12.3 0.77-22.61-8.52-23.03-20.835-0.43-12.295 9.17-22.855 21.47-23.625 29.215-1.85 57.69 8.815 78.135 29.26 20.41 20.41 31.045 48.92 29.21 78.21-0.77 12.3-11.34 21.89-23.62 21.47C803.938 372.032 798.848 369.647 795.128 365.922L795.128 365.922 795.128 365.922 795.128 365.922zM869.538 360.422c-3.955-3.955-6.37-9.49-6.31-15.6 0.405-35.555-13.045-68.79-37.845-93.585-24.86-24.86-58.075-38.33-93.555-37.94-12.315 0.155-22.095-9.73-21.9-22.025 0.2-12.295 10.345-22.375 22.64-22.515 47.32-0.505 91.63 17.445 124.74 50.55 33.065 33.065 50.985 77.38 50.46 124.805-0.14 12.3-10.235 22.43-22.53 22.66C879.093 366.832 873.533 364.412 869.538 360.422L869.538 360.422 869.538 360.422 869.538 360.422zM943.778 354.942c-3.865-3.865-6.25-9.205-6.315-15.19-0.395-53.815-21.285-104.155-58.865-141.735-37.655-37.65-87.975-58.59-141.72-58.935-12.265-0.09-21.9-10.115-21.48-22.445 0.42-12.295 10.74-22.2 23.02-22.135 65.275 0.44 126.405 25.83 172.12 71.545 45.625 45.62 71.015 106.755 71.5 172.105 0.085 12.3-9.825 22.62-22.105 23.055C953.588 361.442 947.848 359.012 943.778 354.942L943.778 354.942 943.778 354.942 943.778 354.942zM710.823 328.267c-10.655 10.655-10.895 27.68-0.52 38.05 10.355 10.355 27.395 10.13 38.05-0.525 10.65-10.65 10.875-27.69 0.52-38.05C738.503 317.402 721.478 317.612 710.823 328.267L710.823 328.267 710.823 328.267z" p-id="610" fill="#f4ea2a"></path></svg>
\ No newline at end of file
<?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="1604314587347" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1945" xmlns:xlink="http://www.w3.org/1999/xlink" width="64" height="64"><defs><style type="text/css"></style></defs><path d="M512 64c13.2544 0 24 10.7456 24 24v806.272l319.936-319.936c9.2352-9.2336 24.1232-9.3696 33.5248-0.4064l0.416 0.4064c9.3744 9.3728 9.3744 24.5696 0 33.9424L556.6496 941.5088c-24.6592 24.6576-64.6368 24.6576-89.296 0L134.1216 608.2768c-9.3728-9.3712-9.3728-24.568 0-33.9408 9.3728-9.3712 24.5696-9.3712 33.9424 0L488 894.2736V88c0-13.2544 10.7456-24 24-24z" fill="#ffffff" p-id="1946"></path></svg>
\ No newline at end of file
<?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="1604313925904" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4675" xmlns:xlink="http://www.w3.org/1999/xlink" width="64" height="64"><defs><style type="text/css"></style></defs><path d="M400 775.546667l-166.266667-200.72L213.333333 592l200.56 240L613.333333 592l-20.373333-17.2L426.666667 775.573333V192h-26.666667v583.546667z" p-id="4676" fill="#ffffff"></path></svg>
\ No newline at end of file
<?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="1604462158066" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3165" xmlns:xlink="http://www.w3.org/1999/xlink" width="64" height="64"><defs><style type="text/css"></style></defs><path d="M461.536 447.872H376.192L512.896 0l133.12 447.872h-89.248V1024H461.536z" p-id="3166" fill="#ffffff"></path></svg>
\ No newline at end of file
<?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="1604462014378" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2888" width="64" height="64" xmlns:xlink="http://www.w3.org/1999/xlink"><defs><style type="text/css"></style></defs><path d="M404.176 1024V446.784H319.712L446.592 0l131.408 446.784h-84.144v303.728l135.104-136.096V446.352l75.04 272.384-75.04 258.688v-153.504l-135.104 128.16V1024z" p-id="2889" fill="#ffffff"></path></svg>
\ No newline at end of file
<?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="1604462604712" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3429" xmlns:xlink="http://www.w3.org/1999/xlink" width="64" height="64"><defs><style type="text/css"></style></defs><path d="M559.356062 144.257969V0.236308l135.483076 247.004554-135.483076 246.862769v-144.021662l-135.640616 91.435323v566.980923H315.423508V308.901415z" p-id="3430" fill="#ffffff"></path></svg>
\ No newline at end of file
<?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="1603700955468" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="9206" xmlns:xlink="http://www.w3.org/1999/xlink" width="32" height="32"><defs><style type="text/css"></style></defs><path d="M1002 578.1c-19.4-19.4-42.1-34.5-67.5-45.1-25.3-10.6-51.9-15.9-79.3-15.9L726 347c6.7 1.4 13.7 2.1 20.7 2.1 2.4 0 4.9-0.1 7.8-0.3 11.5-0.8 20.4-10.4 20.4-21.9v-111c0-11.5-8.9-21.1-20.4-21.9-2.9-0.2-5.4-0.3-7.8-0.3-23.1 0-45 7.5-61.7 21h-91.6c-12.2 0-22 9.8-22 22v16.5l-25.9-25.9c-4.2-4.1-9.8-6.4-15.6-6.4H468c-12.2 0-22 9.8-22 22s9.8 22 22 22h52.8l51.8 51.8 51 165.2-34.3 170.2c-0.1 0.1-0.1 0.2-0.1 0.3-1.9 9.9-10.5 17-20.5 17H485c-8.5 0-13.7-4.7-16-7.5-2.4-2.8-6-8.7-4.5-17l30-148.1c13.6-7.8 22.8-22.5 22.8-39.3v-27.7c0-25-20.3-45.3-45.3-45.3H273.8c-40.2 0-73 32.7-73 73 0 5 0.8 9.9 2.3 14.4-46.4 12.4-82.3 33.8-108.4 64.3C56.3 581 44.2 637 33.3 700.1c-1.1 6.4 0.7 12.9 4.9 17.9 4.2 4.9 10.3 7.8 16.8 7.8h43c1.9 78.9 66.6 142.5 145.9 142.5 51.9 0 97.6-27.2 123.4-68.1h307.5c12.2 0 22-9.9 22.1-22v-7.5c0-1.8-0.2-3.6-0.7-5.4-3.3-13.2-5-26.8-5-40.4 0-43.4 17.1-84.5 48.2-115.6s72.2-48.2 115.6-48.2c43.1 0 85.4 17.5 115.9 48.1 8.6 8.6 22.5 8.6 31.1 0s8.6-22.5 0-31.1zM730.9 302.9c-8.3-2.3-15.5-6.3-20.8-11.3-0.9-1.2-1.9-2.3-3-3.3-4.1-5-6.5-10.8-6.5-17 0-14.2 12.8-26.8 30.3-31.6v63.2z m-73.1-44.2c-0.8 4.2-1.2 8.4-1.2 12.7 0 3.8 0.3 7.6 1 11.3h-42.2v-24h42.4zM246.2 458.8c-0.7 0-1.3-0.6-1.3-1.3 0-16 13-29 29-29h198.3c0.7 0 1.3 0.6 1.3 1.3v27.7c0 0.7-0.6 1.3-1.3 1.3h-226z m-2.3 365.5c-55 0-100-43.9-101.8-98.5h203.6c-1.8 54.6-46.8 98.5-101.8 98.5z m464.3-246.1c-39.4 39.4-61.1 91.5-61.1 146.7 0 10.5 0.8 21 2.4 31.3H385.9c2.6-10.8 3.9-22.1 3.9-33.7 0-7.4-0.5-14.7-1.6-21.9-1.7-10.7-10.9-18.7-21.8-18.7H81.3c8.9-46 20.5-86.3 46.8-117 16.7-19.6 38.4-34 66.2-44.2 32.3-11.8 73.6-17.8 122.7-17.8h131.5l-27.1 133.5c-0.1 0.1-0.1 0.2-0.1 0.3-3.6 19.1 1.4 38.5 13.8 53.4 12.4 14.9 30.5 23.4 49.9 23.4h83.7c31.1 0 57.9-22.2 63.7-52.7l35.2-174.9c0.9-4.1 0.6-8.4-0.7-12.4l-45.2-146.7h33.6l149.3 196.5c-36 9-69.2 27.7-96.4 54.9z" p-id="9207"></path><path d="M855 576.5c-80.5 0-145.9 65.4-145.9 145.9S774.6 868.3 855 868.3s145.9-65.4 145.9-145.9S935.4 576.5 855 576.5z m0 247.8c-56.2 0-101.9-45.7-101.9-101.9S798.8 620.5 855 620.5c56.1 0 101.9 45.7 101.9 101.9S911.2 824.3 855 824.3z" p-id="9208"></path></svg>
\ No newline at end of file
<?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="1603700859460" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="7217" xmlns:xlink="http://www.w3.org/1999/xlink" width="32" height="32"><defs><style type="text/css"></style></defs><path d="M788.310898 501.971433a189.761158 189.761158 0 0 1-174.350527-5.117922v153.537647l150.808088 286.603607a58.173708 58.173708 0 0 1-47.141744 87.004666 61.926851 61.926851 0 0 1-47.141744-30.707529l-160.190945-307.075293-160.24781 307.075293a51.179216 51.179216 0 0 1-47.141744 30.707529 59.993414 59.993414 0 0 1-47.141745-87.004666l150.808089-286.603607V399.613002a145.121509 145.121509 0 0 0-103.666344 138.183882 52.032202 52.032202 0 1 1-103.666345 0 244.011127 244.011127 0 0 1 235.651855-255.896078h80.067039A98.548423 98.548423 0 0 1 609.24051 348.433786a126.071468 126.071468 0 0 0 146.088227 46.061294 51.804739 51.804739 0 0 1 65.964322 35.825451 49.757571 49.757571 0 0 1-32.982161 71.650902zM510.294026 225.603669A112.992335 112.992335 0 1 1 613.960371 113.009395 108.443071 108.443071 0 0 1 510.294026 225.603669z" p-id="7218"></path></svg>
\ No newline at end of file
<?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="1604382828677" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3634" xmlns:xlink="http://www.w3.org/1999/xlink" width="64" height="64"><defs><style type="text/css"></style></defs><path d="M64 512c0-13.2544 10.744-24 24-24h806.272L574.336 168.064c-9.2352-9.2352-9.3712-24.1232-0.408-33.5232l0.408-0.4176c9.3728-9.3728 24.568-9.3728 33.9408 0l333.232 333.2304c24.656 24.6576 24.656 64.6368 0 89.296l-333.232 333.2288c-9.3728 9.3728-24.568 9.3728-33.9408 0-9.3728-9.3728-9.3728-24.568 0-33.9408l319.936-319.936H88c-13.256 0-24-10.7456-24-24z" fill="#e6e6e6" p-id="3635"></path></svg>
\ No newline at end of file
<?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="1604316374809" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4654" xmlns:xlink="http://www.w3.org/1999/xlink" width="64" height="64"><defs><style type="text/css"></style></defs><path d="M846.933333 262.4l-213.333333-213.333333C629.333333 44.8 625.066667 42.666667 618.666667 42.666667c-12.8 0-21.333333 8.533333-21.333333 21.333333 0 6.4 2.133333 10.666667 6.4 14.933333l177.066667 177.066667L192 256c-12.8 0-21.333333 8.533333-21.333333 21.333333l0 682.666667c0 12.8 8.533333 21.333333 21.333333 21.333333s21.333333-8.533333 21.333333-21.333333L213.333333 298.666667l567.466667 0-177.066667 177.066667C599.466667 480 597.333333 484.266667 597.333333 490.666667c0 12.8 8.533333 21.333333 21.333333 21.333333 6.4 0 10.666667-2.133333 14.933333-6.4l213.333333-213.333333c4.266667-4.266667 6.4-8.533333 6.4-14.933333S851.2 266.666667 846.933333 262.4z" p-id="4655" fill="#ffffff"></path></svg>
\ No newline at end of file
<?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="1603960739915" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="22697" width="32" height="32" xmlns:xlink="http://www.w3.org/1999/xlink"><defs><style type="text/css"></style></defs><path d="M877.037037 703.525926c-51.2 2.844444-107.140741 4.740741-164.977778 6.637037-6.637037 12.325926-16.118519 23.703704-32.237037 33.185185H663.703704l9.481481-32.237037c-177.303704 3.792593-373.57037 1.896296-528.118518-7.585185-19.911111-0.948148-30.340741-17.066667-36.02963-36.02963-29.392593-104.296296-31.288889-210.488889 0-318.577777 5.688889-18.962963 16.118519-35.081481 36.02963-36.02963 153.6-9.481481 349.866667-10.42963 528.118518-6.637037l-9.481481-32.237037h16.118518c15.17037 9.481481 25.6 20.859259 32.237037 33.185185 58.785185 1.896296 114.725926 3.792593 165.925926 5.688889 18.962963 0.948148 78.696296 43.614815 85.333334 100.503704 6.637037 59.733333 6.637037 135.585185 0 194.37037-7.585185 54.992593-68.266667 94.814815-86.281482 95.762963zM725.333333 341.333333c-43.614815 9.481481-85.333333 27.496296-128 47.407408 10.42963 36.977778 15.17037 76.8 16.118519 116.622222h8.533333v-18.014815c0-3.792593 2.844444-6.637037 6.637037-6.637037 3.792593 0 6.637037 2.844444 6.637037 6.637037v48.355556c0 3.792593-2.844444 6.637037-6.637037 6.637037-3.792593 0-6.637037-2.844444-6.637037-6.637037v-19.911111h-8.533333c-0.948148 39.822222-5.688889 78.696296-16.118519 114.725926 39.822222 19.911111 81.540741 36.02963 128 47.407407 34.133333-89.125926 34.133333-247.466667 0-336.592593z m151.703704 347.970371c26.548148-14.222222 52.148148-35.081481 74.903704-78.696297l-10.42963-8.533333-62.577778 28.444445c-3.792593 19.911111-8.533333 39.822222-12.325926 59.733333 2.844444-0.948148 6.637037-0.948148 10.42963-0.948148z m0-360.296297h-11.377778c3.792593 19.911111 8.533333 39.822222 12.325926 59.733334l62.577778 28.444444 10.42963-8.533333c-20.859259-45.511111-47.407407-66.37037-73.955556-79.644445zM140.325926 693.096296c-7.585185-25.6-15.17037-52.148148-22.755556-77.748148h-12.325926c9.481481 36.977778 17.066667 74.903704 35.081482 77.748148z m0-369.777777c-18.014815 2.844444-26.548148 40.77037-35.081482 77.748148h12.325926c8.533333-25.6 16.118519-51.2 22.755556-77.748148zM635.259259 331.851852c-69.214815-1.896296-126.103704-0.948148-185.837037 0.948148l0.948148 48.355556h98.607408c29.392593-17.066667 61.62963-32.237037 101.451852-43.614815-5.688889-0.948148-10.42963-2.844444-15.170371-5.688889z m-200.059259 50.251852l-3.792593-48.355556c-32.237037 0.948148-66.37037 2.844444-103.348148 5.688889 18.014815 16.118519 40.77037 31.288889 80.592593 42.666667h26.548148zM629.57037 682.666667c4.740741-1.896296 10.42963-3.792593 15.170371-5.688889-41.718519-13.274074-71.111111-29.392593-101.451852-43.614815h-92.918519l-0.948148 49.303704c56.888889 0.948148 110.933333 0.948148 180.148148 0z m-194.37037-50.251852h-26.548148c-39.822222 11.377778-62.577778 26.548148-80.592593 42.666666 37.925926 1.896296 72.059259 3.792593 103.348148 5.688889l3.792593-48.355555zM284.444444 403.911111c-25.6-18.014815-48.355556-35.081481-70.162963-52.148148-32.237037 74.903704-32.237037 237.985185 0 312.888889 21.807407-16.118519 44.562963-33.185185 70.162963-52.148148-10.42963-55.940741-10.42963-152.651852 0-208.592593z" fill="#000001" p-id="22698"></path></svg>
\ No newline at end of file
<?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="1603958080338" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="11217" xmlns:xlink="http://www.w3.org/1999/xlink" width="32" height="32"><defs><style type="text/css"></style></defs><path d="M670.1 599.1h140.5l-170.8-199h96.1l-168-186.7h56L511.9 64l-112 149.4H456L288 400.1h96l-170.6 199h140.5L176.1 823h261.1v137h149.3V823h261.4z" p-id="11218" fill="#337733"></path></svg>
\ No newline at end of file
<?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="1603768744152" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="6744" width="16" height="16" xmlns:xlink="http://www.w3.org/1999/xlink"><defs><style type="text/css"></style></defs><path d="M497.066667 140.8L206.933333 870.4c-6.4 12.8 8.533333 27.733333 21.333334 19.2l224-117.333333c34.133333-17.066667 74.666667-17.066667 108.8 0l230.4 117.333333c12.8 6.4 27.733333-6.4 21.333333-19.2L526.933333 140.8c-6.4-12.8-25.6-12.8-29.866666 0z" p-id="6745" fill="#2222DD"></path></svg>
\ No newline at end of file
<?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="1604317559456" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="9329" xmlns:xlink="http://www.w3.org/1999/xlink" width="64" height="64"><defs><style type="text/css"></style></defs><path d="M838.17472 394.24c6.45632 19.58912 10.78272 32.8192 10.78272 32.8192s-0.66048 11.68896-10.37824 11.68896c-14.12096 0-312.08448 0-312.08448 0l-41.71264 0c0 0-297.96352 0-312.0896 0-9.71264 0-10.37824-11.68896-10.37824-11.68896S223.232 240.99328 229.85216 227.09248c6.62016-13.90592 23.61856-11.69408 23.61856-11.69408l241.89952 0 20.52608 0L673.28 215.3984 673.28 153.61024l-160.9216 0-13.44512 0L246.40512 153.61024c0 0-45.02528-4.4288-60.91776 25.59488-15.89248 30.02368-124.48256 308.99712-124.48256 308.99712l0 404.33664c0 0 15.232 44.36992 74.82368 44.36992 59.5968 0 72.17152-44.36992 72.17152-44.36992l0-62.23872 293.77536 0 7.71584 0 293.77536 0 0 62.23872c0 0 12.57984 44.36992 72.17664 44.36992s74.81856-44.36992 74.81856-44.36992L950.26176 488.20224c0 0-16.10752-41.37984-36.8128-93.96224L838.17472 394.24zM240.11776 691.9168c-41.87136 0-75.81696-33.93536-75.81696-75.81696s33.9456-75.82208 75.81696-75.82208 75.81696 33.94048 75.81696 75.82208S281.98912 691.9168 240.11776 691.9168zM771.15904 691.9168c-41.87648 0-75.82208-33.93536-75.82208-75.81696s33.9456-75.82208 75.82208-75.82208c41.87136 0 75.81184 33.94048 75.81184 75.82208S813.0304 691.9168 771.15904 691.9168z" p-id="9330" fill="#ffffff"></path><path d="M795.128 365.922c-4.23-4.23-6.675-10.205-6.27-16.725 1.07-16.775-5.025-33.075-16.69-44.745-11.86-11.86-27.73-17.81-44.65-16.725-12.3 0.77-22.61-8.52-23.03-20.835-0.43-12.295 9.17-22.855 21.47-23.625 29.215-1.85 57.69 8.815 78.135 29.26 20.41 20.41 31.045 48.92 29.21 78.21-0.77 12.3-11.34 21.89-23.62 21.47C803.938 372.032 798.848 369.647 795.128 365.922L795.128 365.922 795.128 365.922 795.128 365.922zM869.538 360.422c-3.955-3.955-6.37-9.49-6.31-15.6 0.405-35.555-13.045-68.79-37.845-93.585-24.86-24.86-58.075-38.33-93.555-37.94-12.315 0.155-22.095-9.73-21.9-22.025 0.2-12.295 10.345-22.375 22.64-22.515 47.32-0.505 91.63 17.445 124.74 50.55 33.065 33.065 50.985 77.38 50.46 124.805-0.14 12.3-10.235 22.43-22.53 22.66C879.093 366.832 873.533 364.412 869.538 360.422L869.538 360.422 869.538 360.422 869.538 360.422zM943.778 354.942c-3.865-3.865-6.25-9.205-6.315-15.19-0.395-53.815-21.285-104.155-58.865-141.735-37.655-37.65-87.975-58.59-141.72-58.935-12.265-0.09-21.9-10.115-21.48-22.445 0.42-12.295 10.74-22.2 23.02-22.135 65.275 0.44 126.405 25.83 172.12 71.545 45.625 45.62 71.015 106.755 71.5 172.105 0.085 12.3-9.825 22.62-22.105 23.055C953.588 361.442 947.848 359.012 943.778 354.942L943.778 354.942 943.778 354.942 943.778 354.942zM710.823 328.267c-10.655 10.655-10.895 27.68-0.52 38.05 10.355 10.355 27.395 10.13 38.05-0.525 10.65-10.65 10.875-27.69 0.52-38.05C738.503 317.402 721.478 317.612 710.823 328.267L710.823 328.267 710.823 328.267z" p-id="9331" fill="#ffffff"></path></svg>
\ No newline at end of file
<template>
<div class="hello">
<h1>{{ msg }}</h1>
<p>
For a guide and recipes on how to configure / customize this project,<br>
check out the
<a href="https://cli.vuejs.org" target="_blank" rel="noopener">vue-cli documentation</a>.
</p>
<h3>Installed CLI Plugins</h3>
<ul>
<li><a href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-babel" target="_blank" rel="noopener">babel</a></li>
<li><a href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-eslint" target="_blank" rel="noopener">eslint</a></li>
<li><a href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-unit-jest" target="_blank" rel="noopener">unit-jest</a></li>
</ul>
<h3>Essential Links</h3>
<ul>
<li><a href="https://vuejs.org" target="_blank" rel="noopener">Core Docs</a></li>
<li><a href="https://forum.vuejs.org" target="_blank" rel="noopener">Forum</a></li>
<li><a href="https://chat.vuejs.org" target="_blank" rel="noopener">Community Chat</a></li>
<li><a href="https://twitter.com/vuejs" target="_blank" rel="noopener">Twitter</a></li>
<li><a href="https://news.vuejs.org" target="_blank" rel="noopener">News</a></li>
</ul>
<h3>Ecosystem</h3>
<ul>
<li><a href="https://router.vuejs.org" target="_blank" rel="noopener">vue-router</a></li>
<li><a href="https://vuex.vuejs.org" target="_blank" rel="noopener">vuex</a></li>
<li><a href="https://github.com/vuejs/vue-devtools#vue-devtools" target="_blank" rel="noopener">vue-devtools</a></li>
<li><a href="https://vue-loader.vuejs.org" target="_blank" rel="noopener">vue-loader</a></li>
<li><a href="https://github.com/vuejs/awesome-vue" target="_blank" rel="noopener">awesome-vue</a></li>
</ul>
</div>
</template>
<script>
export default {
name: 'HelloWorld',
props: {
msg: String,
},
};
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped lang="less">
h3 {
margin: 40px 0 0;
}
ul {
list-style-type: none;
padding: 0;
}
li {
display: inline-block;
margin: 0 10px;
}
a {
color: #42b983;
}
</style>
export default {
bind(el, binding, vnode) {
const dialogHeaderEl = el.querySelector('.el-dialog__header')
const dragDom = el.querySelector('.el-dialog')
dialogHeaderEl.style.cssText += ';cursor:move;'
dragDom.style.cssText += ';top:0px;'
// 获取原有属性 ie dom元素.currentStyle 火狐谷歌 window.getComputedStyle(dom元素, null);
const getStyle = (function() {
if (window.document.currentStyle) {
return (dom, attr) => dom.currentStyle[attr]
} else {
return (dom, attr) => getComputedStyle(dom, false)[attr]
}
})()
dialogHeaderEl.onmousedown = (e) => {
// 鼠标按下,计算当前元素距离可视区的距离
const disX = e.clientX - dialogHeaderEl.offsetLeft
const disY = e.clientY - dialogHeaderEl.offsetTop
const dragDomWidth = dragDom.offsetWidth
const dragDomHeight = dragDom.offsetHeight
const screenWidth = document.body.clientWidth
const screenHeight = document.body.clientHeight
const minDragDomLeft = dragDom.offsetLeft
const maxDragDomLeft = screenWidth - dragDom.offsetLeft - dragDomWidth
const minDragDomTop = dragDom.offsetTop
const maxDragDomTop = screenHeight - dragDom.offsetTop - dragDomHeight
// 获取到的值带px 正则匹配替换
let styL = getStyle(dragDom, 'left')
let styT = getStyle(dragDom, 'top')
if (styL.includes('%')) {
styL = +document.body.clientWidth * (+styL.replace(/\%/g, '') / 100)
styT = +document.body.clientHeight * (+styT.replace(/\%/g, '') / 100)
} else {
styL = +styL.replace(/\px/g, '')
styT = +styT.replace(/\px/g, '')
}
document.onmousemove = function(e) {
// 通过事件委托,计算移动的距离
let left = e.clientX - disX
let top = e.clientY - disY
// 边界处理
if (-(left) > minDragDomLeft) {
left = -minDragDomLeft
} else if (left > maxDragDomLeft) {
left = maxDragDomLeft
}
if (-(top) > minDragDomTop) {
top = -minDragDomTop
} else if (top > maxDragDomTop) {
top = maxDragDomTop
}
// 移动当前元素
dragDom.style.cssText += `;left:${left + styL}px;top:${top + styT}px;`
// emit onDrag event
vnode.child.$emit('dragDialog')
}
document.onmouseup = function(e) {
document.onmousemove = null
document.onmouseup = null
}
}
}
}
\ No newline at end of file
import drag from './drag'
const install = function(Vue) {
Vue.directive('el-drag-dialog', drag)
}
if (window.Vue) {
window['el-drag-dialog'] = drag
Vue.use(install); // eslint-disable-line
}
drag.install = install
export default drag
\ No newline at end of file
const address = '/roadlinks/'; const address = '/traffic/';
const videoAddress = 'https://xj.roadgrids.com'; const videoAddress = 'http://152.136.233.116:8000';
const photoAddress = 'https://xj.roadgrids.com'; const photoAddress = 'http://152.136.233.116:8000';
const imgAddress = '/roadlinks/';// 测试环境 const imgAddress = '/traffic/';// 测试环境
const title = '道路综合巡检平台';
export { export {
address, photoAddress, imgAddress, videoAddress, address, photoAddress, imgAddress, videoAddress,
}; };
const address = '/roadlinks/'; const address = '/traffic/';
const videoAddress = 'http://106.52.130.113:8000'; const videoAddress = 'http://152.136.233.116:8000';
const photoAddress = 'http://106.52.130.113:8000'; const photoAddress = 'http://152.136.233.116:8000';
const imgAddress = '/roadlinks/';// 测试环境 const imgAddress = '/traffic/';// 测试环境
const title = '道路综合巡检平台';
export { export {
address, photoAddress, imgAddress, videoAddress, address, photoAddress, imgAddress, videoAddress,
}; };
const address = 'http://localhost:8088/roadlinks/'; const address = 'http://localhost:8088/traffic/';
const videoAddress = 'https://xj.roadgrids.com'; const videoAddress = 'http://152.136.233.116:8000';
const photoAddress = 'https://xj.roadgrids.com'; const photoAddress = 'http://152.136.233.116:8000';
const imgAddress = '/roadlinks/';// 测试环境 const title = '公路平台';
const title = '道路综合巡检平台';
export { export {
address, photoAddress, imgAddress, videoAddress, address, photoAddress, title, videoAddress,
}; };
...@@ -93,14 +93,12 @@ function s2ab(s) { ...@@ -93,14 +93,12 @@ function s2ab(s) {
export function export_table_to_excel(id) { export function export_table_to_excel(id) {
var theTable = document.getElementById(id); var theTable = document.getElementById(id);
console.log('a')
var oo = generateArray(theTable); var oo = generateArray(theTable);
var ranges = oo[1]; var ranges = oo[1];
/* original data */ /* original data */
var data = oo[0]; var data = oo[0];
var ws_name = "SheetJS"; var ws_name = "SheetJS";
console.log(data);
var wb = new Workbook(), ws = sheet_from_array_of_arrays(data); var wb = new Workbook(), ws = sheet_from_array_of_arrays(data);
......
...@@ -16,9 +16,39 @@ import router from './router'; ...@@ -16,9 +16,39 @@ import router from './router';
// require videojs style // require videojs style
import 'video.js/dist/video-js.css'; import 'video.js/dist/video-js.css';
import './utils/dialog';
import 'vue-video-player/src/custom-theme.css';
Vue.directive('real-img', async (el, binding) => { // 指令名称为:real-img
const imgURL = binding.value;// 获取图片地址
if (imgURL) {
const exist = await imageIsExist(imgURL);
if (exist) {
el.setAttribute('src', imgURL);
}
}
});
/**
// import 'vue-video-player/src/custom-theme.css' * 检测图片是否存在
* @param url
*/
let imageIsExist = function (url) {
return new Promise((resolve) => {
let img = new Image();
img.onload = function () {
if (this.complete == true) {
resolve(true);
img = null;
}
};
img.onerror = function () {
resolve(false);
img = null;
};
img.src = url;
});
};
Vue.use(VueVideoPlayer); Vue.use(VueVideoPlayer);
const hls = require('videojs-contrib-hls'); const hls = require('videojs-contrib-hls');
...@@ -73,8 +103,10 @@ axios.interceptors.request.use( ...@@ -73,8 +103,10 @@ axios.interceptors.request.use(
config.withCredentials = true; // 允许携带token ,这个是解决跨域产生的相关问题 config.withCredentials = true; // 允许携带token ,这个是解决跨域产生的相关问题
config.timeout = 60000; config.timeout = 60000;
const token = Cookies.get('id'); const token = Cookies.get('id');
const companyId = Cookies.get('companyId');
if (token) { if (token) {
config.headers = { config.headers = {
companyId,
AuthId: token, AuthId: token,
Authorization: `Bearer ${token}`, Authorization: `Bearer ${token}`,
}; };
...@@ -110,7 +142,6 @@ const permission = { ...@@ -110,7 +142,6 @@ const permission = {
} }
}, },
}; };
Vue.directive('permission', permission); Vue.directive('permission', permission);
new Vue({ new Vue({
router, router,
......
...@@ -6,6 +6,7 @@ const permission = { ...@@ -6,6 +6,7 @@ const permission = {
equipmentList_edit: '002.001', equipmentList_edit: '002.001',
userManagement_edit: '003.001', userManagement_edit: '003.001',
resultCheck_edit: '005.001', resultCheck_edit: '005.001',
adminResultCheck_edit: '005.002',
provincePermission: '2', provincePermission: '2',
cityPermission: '3', cityPermission: '3',
}; };
......
...@@ -2,16 +2,8 @@ import Vue from 'vue'; ...@@ -2,16 +2,8 @@ import Vue from 'vue';
import Router from 'vue-router'; import Router from 'vue-router';
import Home from './views/Home.vue'; import Home from './views/Home.vue';
import Overview from './views/Overview.vue'; import Overview from './views/Overview.vue';
import Detail from './views/Detail.vue'; import TrafficHistory from './views/TrafficHistory.vue';
import Task from './views/Task.vue'; import TrafficRemind from './views/TrafficRemind.vue';
import Result from './views/Result.vue';
import ResultDetail from './views/ResultDetail.vue';
import Video from './views/Video.vue';
import Live from './views/Live.vue';
import EquipmentCheck from './views/equipment/EquipmentCheck.vue';
import EquipmentList from './views/equipment/EquipmentList.vue';
import ResetPassword from './views/userManagement/ResetPassword.vue';
import UserAuthorization from './views/userManagement/UserAuthorization.vue';
import UserManagement from './views/userManagement/UserManagement.vue'; import UserManagement from './views/userManagement/UserManagement.vue';
Vue.use(Router); Vue.use(Router);
...@@ -32,61 +24,25 @@ export default new Router({ ...@@ -32,61 +24,25 @@ export default new Router({
}, },
children: [{ children: [{
path: '/overview', path: '/overview',
ame: 'overview', name: 'overview',
component: Overview, component: Overview,
}, {
path: '/detail',
name: 'detail',
component: Detail,
}, {
path: '/task',
name: 'task',
component: Task,
}, {
path: '/result',
name: 'result',
component: Result,
}, },
{ {
path: '/resultDetail', path: '/trafficHistory',
name: 'resultDetail', name: 'trafficHistory',
component: ResultDetail, component: TrafficHistory,
}, },
{ {
path: '/video', path: '/trafficRemind',
name: 'video', name: 'trafficRemind',
component: Video, component: TrafficRemind,
},
{
path: '/live',
name: 'live',
component: Live,
},
{
path: '/equipmentCheck',
name: 'equipmentCheck',
component: EquipmentCheck,
},
{
path: '/equipmentList',
name: 'equipmentList',
component: EquipmentList,
},
{
path: '/resetPassword',
name: 'resetPassword',
component: ResetPassword,
},
{
path: '/userAuthorization',
name: 'userAuthorization',
component: UserAuthorization,
}, },
{ {
path: '/userManagement', path: '/userManagement',
name: 'userManagement', name: 'userManagement',
component: UserManagement, component: UserManagement,
}, },
], ],
}, },
// 注册页面 // 注册页面
......
import Vue from 'vue';
// v-dialogDrag: 弹窗拖拽
Vue.directive('dialogDrag', {
bind(el, binding, vnode, oldVnode) {
const dialogHeaderEl = el.querySelector('.el-dialog__header');
const dragDom = el.querySelector('.el-dialog');
dialogHeaderEl.style.cursor = 'move';
// 获取原有属性 ie dom元素.currentStyle 火狐谷歌 window.getComputedStyle(dom元素, null);
const sty = dragDom.currentStyle || window.getComputedStyle(dragDom, null);
dialogHeaderEl.onmousedown = (e) => {
// 鼠标按下,计算当前元素距离可视区的距离
const disX = e.clientX - dialogHeaderEl.offsetLeft;
const disY = e.clientY - dialogHeaderEl.offsetTop;
// 获取到的值带px 正则匹配替换
let styL; let
styT;
// 注意在ie中 第一次获取到的值为组件自带50% 移动之后赋值为px
if (sty.left.includes('%')) {
styL = +document.body.clientWidth * (+sty.left.replace(/\%/g, '') / 100);
styT = +document.body.clientHeight * (+sty.top.replace(/\%/g, '') / 100);
} else {
styL = +sty.left.replace(/\px/g, '');
styT = +sty.top.replace(/\px/g, '');
}
document.onmousemove = function (e) {
// 通过事件委托,计算移动的距离
const l = e.clientX - disX;
const t = e.clientY - disY;
// 移动当前元素
dragDom.style.left = `${l + styL}px`;
dragDom.style.top = `${t + styT}px`;
// 将此时的位置传出去
// binding.value({x:e.pageX,y:e.pageY})
};
document.onmouseup = function (e) {
document.onmousemove = null;
document.onmouseup = null;
};
};
},
});
<template>
<div class="about">
<h1>This is an about page</h1>
</div>
</template>
This diff is collapsed.
...@@ -10,123 +10,50 @@ ...@@ -10,123 +10,50 @@
class="el-menu-vertical-demo" class="el-menu-vertical-demo"
> >
<div class="logo"> <div class="logo">
<div v-if="provinceId ==109"> <img v-show="companyId==1 && authId!=11" style="width:180px;height:45px" src="../assets/logo_chuhang.png" alt />
<img style="width:100px;height:80px" src="../assets/logo_anhui.png" alt /> <img style="width:144px;height:36px" src="../assets/logo_new.png" alt />
</div> </div>
<div v-else-if="provinceId == 239">
<img style="width:100px;height:100px" src="../assets/logo_guangxi.png" alt />
</div>
<div v-else-if="provinceId == 1 && myId==9">
<img style="width:100px;height:100px" src="../assets/logo_zhongguogonglu.png" alt />
</div>
<div v-else-if="provinceId!=109">
<img style="width:180px;height:45px" src="../assets/logo_new.png" alt />
</div>
</div> <div v-show="companyId">
<el-submenu index="1">
<span slot="title" class="submenu_parent">道路资产管理</span>
<el-menu-item <el-menu-item
index="1-1" index="1-1"
@click="goTo('/overview')" @click="goTo('/overview')"
style="background:#252639 !important" style="background:#252639 !important"
> >
<span slot="title" style="font-size: 16px">资产汇总</span> <span slot="title" style="font-size: 16px">实时交通检测</span>
</el-menu-item> </el-menu-item>
</div>
<div v-show="companyId==0 ||companyId==2 ">
<el-menu-item <el-menu-item
index="1-2" index="2-1"
@click="goTo('/detail')" @click="goTo('/trafficHistory')"
style="background:#252639 !important" style="background:#252639 !important"
> >
<span slot="title" style="font-size: 16px">资产明细</span> <span slot="title" style="font-size: 16px">交通事件历史</span>
</el-menu-item>
</el-submenu>
<el-menu-item index="2" @click="goTo('/task')">
<span slot="title">巡检任务管理</span>
</el-menu-item> </el-menu-item>
<el-submenu index="3"> </div>
<span slot="title" class="submenu_parent">巡检结果管理</span> <div v-show="companyId==0 ||companyId==1 ">
<el-menu-item <el-menu-item
index="3-1" index="3-1"
@click="goTo('/result')" @click="goTo('/trafficRemind')"
style="background:#252639 !important" style="background:#252639 !important"
> >
<span slot="title" style="font-size: 16px">巡检结果查看</span> <span slot="title" style="font-size: 16px">V2X盲区提醒</span>
</el-menu-item> </el-menu-item>
<el-menu-item </div>
index="3-2"
@click="goTo('/resultDetail')"
style="background:#252639 !important"
>
<span slot="title" style="font-size: 16px">巡检结果明细</span>
</el-menu-item>
</el-submenu>
<el-submenu index="4">
<span slot="title" class="submenu_parent">视频查看入口</span>
<el-menu-item
index="4-1"
@click="goTo('/live')"
style="background:#252639 !important"
>
<span slot="title" style="font-size: 16px">实时视频查看</span>
</el-menu-item>
<el-menu-item
index="4-2"
@click="goTo('/video')"
style="background:#252639 !important"
>
<span slot="title" style="font-size: 16px">停车视频查看</span>
</el-menu-item>
</el-submenu>
<el-submenu index="5" v-permission="[permission.equipmentCheck,permission.equipmentList]">
<span slot="title" class="submenu_parent" >&nbsp;&nbsp;设备管理&nbsp;&nbsp;</span>
<el-menu-item
v-permission="[permission.equipmentCheck]"
index="5-1"
@click="goTo('/equipmentCheck')"
style="background:#252639 !important"
>
<span slot="title" style="font-size: 16px">设备信息审核</span>
</el-menu-item>
<el-menu-item
v-permission="[permission.equipmentList]"
index="5-2"
@click="goTo('/equipmentList')"
style="background:#252639 !important"
>
<span slot="title" style="font-size: 16px">设备信息列表</span>
</el-menu-item>
</el-submenu>
<div v-show=" authId==1">
<el-submenu index="6" > <el-submenu index="6" >
<span slot="title" class="submenu_parent" >&nbsp;&nbsp;账户管理&nbsp;&nbsp;</span> <span slot="title" class="submenu_parent" >&nbsp;&nbsp;账户管理&nbsp;&nbsp;</span>
<el-menu-item <el-menu-item
v-permission="[permission.userManagement]"
index="6-1" index="6-1"
@click="goTo('/userManagement')" @click="goTo('/userManagement')"
style="background:#252639 !important" style="background:#252639 !important"
> >
<span slot="title" style="font-size: 16px">账户管理</span> <span slot="title" style="font-size: 16px">账户管理</span>
</el-menu-item> </el-menu-item>
<el-menu-item
v-permission="[permission.userAuthorization]"
index="6-2"
@click="goTo('/userAuthorization')"
style="background:#252639 !important"
>
<span slot="title" style="font-size: 16px">授权账户</span>
</el-menu-item>
<el-menu-item
index="6-3"
@click="goTo('/resetPassword')"
style="background:#252639 !important"
>
<span slot="title" style="font-size: 16px">修改密码</span>
</el-menu-item>
</el-submenu> </el-submenu>
</div>
</el-menu> </el-menu>
</el-scrollbar> </el-scrollbar>
</el-aside> </el-aside>
...@@ -146,8 +73,7 @@ ...@@ -146,8 +73,7 @@
</template> </template>
<script> <script>
// @ is an alias to /src
// import HelloWorld from '@/components/HelloWorld.vue';
import Cookies from 'js-cookie'; import Cookies from 'js-cookie';
import store from '@/store'; import store from '@/store';
import { title } from '../config'; import { title } from '../config';
...@@ -159,6 +85,8 @@ export default { ...@@ -159,6 +85,8 @@ export default {
return { return {
permission, permission,
provinceId: localStorage.getItem('provinceId'), provinceId: localStorage.getItem('provinceId'),
companyId: localStorage.getItem('companyId'),
authId: localStorage.getItem('id'),
menuTitle: title, menuTitle: title,
myId: '', myId: '',
user: { user: {
...@@ -186,60 +114,26 @@ export default { ...@@ -186,60 +114,26 @@ export default {
// this.$route.path // this.$route.path
// debugger // debugger
if (this.$route.path.replace('/', '') == 'overview') { if (this.$route.path.replace('/', '') == 'overview') {
this.menuTitle = '资产汇总'; this.menuTitle = '实时交通检测';
return '1-1'; return '1-1';
} if (this.$route.path.replace('/', '') == 'detail') {
this.menuTitle = '资产明细';
return '1-2';
} if (this.$route.path.replace('/', '') == 'task') {
this.menuTitle = '巡检任务管理';
return '2';
} if (this.$route.path.replace('/', '') == 'result') {
this.menuTitle = '巡检结果查看';
return '3-1';
} if (this.$route.path.replace('/', '') == 'resultDetail') {
this.menuTitle = '巡检结果明细';
return '3-2';
}
if (this.$route.path.replace('/', '') == 'live') {
this.menuTitle = '实时视频查看';
return '4-1';
} }
if (this.$route.path.replace('/', '') == 'video') { if (this.$route.path.replace('/', '') == 'trafficHistory') {
this.menuTitle = '停车视频查看'; this.menuTitle = '交通事件历史';
return '4-2'; return '2-1';
} }
if (this.$route.path.replace('/', '') == 'equipmentCheck') { if (this.$route.path.replace('/', '') == 'trafficRemind') {
this.menuTitle = '设备信息审核'; this.menuTitle = 'V2X盲区提醒';
return '5-1'; return '3-1';
}
if (this.$route.path.replace('/', '') == 'equipmentList') {
this.menuTitle = '设备信息列表';
return '5-2';
} }
if (this.$route.path.replace('/', '') == 'userManagement') { if (this.$route.path.replace('/', '') == 'userManagement') {
this.menuTitle = '账户管理'; this.menuTitle = '账户管理';
return '6-1'; return '6-1';
} }
if (this.$route.path.replace('/', '') == 'userAuthorization') {
this.menuTitle = '授权账户';
return '6-2';
}
if (this.$route.path.replace('/', '') == 'resetPassword') {
this.menuTitle = '修改密码';
return '6-3';
}
return '1-1'; return '1-1';
}, },
}, },
methods: { methods: {
// handleOpen(key, keyPath) {
// console.log(key, keyPath);
// },
// handleClose(key, keyPath) {
// console.log(key, keyPath);
// },
// 退出 // 退出
esc() { esc() {
// alert(1); // alert(1);
...@@ -278,8 +172,9 @@ export default { ...@@ -278,8 +172,9 @@ export default {
text-align: right; text-align: right;
line-height: 60px; line-height: 60px;
.header-title { .header-title {
font-size: 20px; font-size: 24px;
position: absolute; position: absolute;
font-weight: bolder;
} }
span { span {
margin-right: 15px; margin-right: 15px;
......
This diff is collapsed.
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
</el-form> </el-form>
</div> </div>
<div class="has-text-right register"> <div class="has-text-right register">
<span style="margin-left:260px" @click="register">立即注册</span> <!-- <span style="margin-left:260px" @click="register">立即注册</span>-->
<!-- <span ></span> <!-- <span ></span>
<span >忘记密码</span>--> <span >忘记密码</span>-->
</div> </div>
...@@ -165,7 +165,7 @@ export default { ...@@ -165,7 +165,7 @@ export default {
handleLogin() { handleLogin() {
this.$refs.loginForm.validate((valid) => { this.$refs.loginForm.validate((valid) => {
if (valid) { if (valid) {
// 路由跳转到任务页面 // 路由跳转到任务页面xi
axios axios
.post(`${address}login`, { .post(`${address}login`, {
username: this.loginForm.username, username: this.loginForm.username,
...@@ -174,14 +174,22 @@ export default { ...@@ -174,14 +174,22 @@ export default {
.then((response) => { .then((response) => {
if (response.data.code === 200) { if (response.data.code === 200) {
sessionStorage.clear(); sessionStorage.clear();
console.log(JSON.stringify(response.data.data));
Cookies.set('id', response.data.data.id); Cookies.set('id', response.data.data.id);
Cookies.set('companyId', response.data.data.companyId);
Cookies.set('username', this.loginForm.username); Cookies.set('username', this.loginForm.username);
Cookies.set('sessionId', response.data.data.sessionId); Cookies.set('sessionId', response.data.data.sessionId);
if (response.data.data.id !== 1) {
sessionStorage.setItem('remindStatus', 0);
}
sessionStorage.setItem('modifyPasswordStatus', response.data.data.modifyStatus); sessionStorage.setItem('modifyPasswordStatus', response.data.data.modifyStatus);
store.state.provinceId = response.data.data.provinceId; store.state.provinceId = response.data.data.provinceId;
store.state.permissionList = response.data.data.permissionList; store.state.permissionList = response.data.data.permissionList;
localStorage.setItem('permission', JSON.stringify(store.state.permissionList)); localStorage.setItem('permission', JSON.stringify(store.state.permissionList));
localStorage.setItem('provinceId', store.state.provinceId); localStorage.setItem('provinceId', store.state.provinceId);
localStorage.setItem('companyId', response.data.data.companyId);
localStorage.setItem('id', response.data.data.id);
this.changeFavicon(store.state.provinceId); this.changeFavicon(store.state.provinceId);
this.goToHome(); this.goToHome();
} else { } else {
......
This diff is collapsed.
...@@ -221,7 +221,6 @@ export default { ...@@ -221,7 +221,6 @@ export default {
submitForm(formName) { submitForm(formName) {
this.$refs[formName].validate((valid) => { this.$refs[formName].validate((valid) => {
if (valid) { if (valid) {
console.log(this.ruleForm2.user + this.ruleForm2.pass);
axios axios
.post(`${address}register`, { .post(`${address}register`, {
phoneNum: this.ruleForm2.phoneNum, phoneNum: this.ruleForm2.phoneNum,
...@@ -249,13 +248,11 @@ export default { ...@@ -249,13 +248,11 @@ export default {
duration: 3 * 1000, duration: 3 * 1000,
}); });
} }
console.log(response.data);
}) })
.catch((error) => { .catch((error) => {
console.log(error); console.log(error);
}); });
} else { } else {
console.log('error submit!!');
return false; return false;
} }
}); });
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
<template> <template>
<div>
<el-dialog :visible.sync="isShowDialog" width="400px" :modal-append-to-body="false" >
<el-form label-width="100px" ref="ruleForm2" :model="ruleForm2" :rules="rules2" >
<el-footer style="text-align: center">
修改密码
</el-footer>
<el-form-item label="输入新密码" prop="pass">
<el-input type="password" style="width:240px" v-model="ruleForm2.pass" auto-complete="new-password" placeholder="6-10个字符,由字母和数字组合"></el-input>
</el-form-item>
<el-form-item label="确认新密码" prop="checkPass">
<el-input type="password" style="width:240px" v-model="ruleForm2.checkPass" auto-complete="new-password" placeholder="6-10个字符,由字母和数字组合"></el-input>
</el-form-item>
<el-footer style="text-align: center">
<el-button type="warning" @click="setNewPassword('ruleForm2')">确定</el-button>
</el-footer>
</el-form>
</el-dialog>
<div class="box"> <div class="box">
<el-col :span="24" class="warp-breadcrum"> <el-col :span="24" class="warp-breadcrum">
<!--搜索栏--> <!--搜索栏-->
...@@ -86,42 +105,9 @@ ...@@ -86,42 +105,9 @@
</el-form-item> </el-form-item>
</el-form> </el-form>
<!-- <el-col :span="3">
<el-form :inline="true" :model="filters">
</el-form>
</el-col>
<el-col :span="3">
<el-form >
</el-form>
</el-col>
<el-col :span="3">
<el-form >
</el-form>
</el-col>
<el-col :span="6">
<el-form >
</el-form>
</el-col>
<el-col :span="4" :offset="1">
<el-form >
</el-form>
</el-col>-->
</el-col> </el-col>
<!-- 停车视频表 --> <!-- 信息表 -->
<div class="detail-table"> <div class="detail-table">
<el-table <el-table
:data="tableData" :data="tableData"
...@@ -132,10 +118,10 @@ ...@@ -132,10 +118,10 @@
> >
<el-table-column width="50" type="index" label="序号" align="center"></el-table-column> <el-table-column width="50" type="index" label="序号" align="center"></el-table-column>
<el-table-column width="120" label="省" prop="provinceStr" <!-- <el-table-column width="120" label="省" prop="provinceStr"
align="center"></el-table-column> align="center"></el-table-column>-->
<el-table-column width="100" label="市" prop="cityStr" <!-- <el-table-column width="100" label="市" prop="cityStr"
align="center"></el-table-column> align="center"></el-table-column>-->
<el-table-column width="160" label="用户名" prop="userName" <el-table-column width="160" label="用户名" prop="userName"
align="center"></el-table-column> align="center"></el-table-column>
<el-table-column width="160" label="手机号" prop="phoneNum" <el-table-column width="160" label="手机号" prop="phoneNum"
...@@ -147,24 +133,23 @@ ...@@ -147,24 +133,23 @@
<el-table-column width="80" label="状态" prop="statusStr" align="center"> <el-table-column width="80" label="状态" prop="statusStr" align="center">
</el-table-column> </el-table-column>
<el-table-column fixed="right" <el-table-column min-width="300" label="编辑" align="center">
min-width="300" label="编辑" align="center">
<template slot-scope="scope" > <template slot-scope="scope" >
<el-button size="mini" type="danger" v-if="scope.row.status==1" v-permission="[permission.userManagement_edit]" <el-button size="mini" type="danger" v-if="scope.row.status==1"
@click="updateUserStatus(scope.row.id,2,scope.row.userName)" @click="updateUserStatus(scope.row.id,2,scope.row.userName)"
v-loading="checkLoadingList.indexOf(scope.row.id)>-1">停用账户 v-loading="checkLoadingList.indexOf(scope.row.id)>-1">停用账户
</el-button> </el-button>
<el-button size="mini" type="primary" v-if="scope.row.status==2" v-permission="[permission.userManagement_edit]" <el-button size="mini" type="primary" v-if="scope.row.status==2"
@click="updateUserStatus(scope.row.id,1,scope.row.userName)" @click="updateUserStatus(scope.row.id,1,scope.row.userName)"
v-loading="checkLoadingList.indexOf(scope.row.id)>-1">启用账户 v-loading="checkLoadingList.indexOf(scope.row.id)>-1">启用账户
</el-button> </el-button>
<el-button size="mini" type="danger" v-permission="[permission.userManagement_edit]" <el-button size="mini" type="danger"
@click="updateUserStatus(scope.row.id,0,scope.row.userName)" @click="updateUserStatus(scope.row.id,0,scope.row.userName)"
v-loading="checkLoadingList.indexOf(scope.row.id)>-1">删除账户 v-loading="checkLoadingList.indexOf(scope.row.id)>-1">删除账户
</el-button> </el-button>
<el-button size="mini" type="primary" v-permission="[permission.userManagement_edit]" <el-button size="mini" type="primary"
@click="resetPassword(scope.row.id)" @click="showResetPassword(scope.row.id)"
v-loading="checkLoadingList.indexOf(scope.row.id)>-1">重置密码 v-loading="checkLoadingList.indexOf(scope.row.id)>-1">修改密码
</el-button> </el-button>
</template> </template>
...@@ -182,9 +167,9 @@ ...@@ -182,9 +167,9 @@
@current-change="handleCurrentChange" @current-change="handleCurrentChange"
/> />
</div> </div>
</div>
</div>
</div>
</template> </template>
<style lang="less" scope> <style lang="less" scope>
...@@ -201,7 +186,28 @@ import { permission } from '../../permission'; ...@@ -201,7 +186,28 @@ import { permission } from '../../permission';
export default { export default {
name: 'userManagement', name: 'userManagement',
data() { data() {
const validatePass = (rule, value, callback) => {
if (value === '') {
callback(new Error('请输入密码'));
} else {
if (this.ruleForm2.checkPass !== '') {
this.$refs.ruleForm2.validateField('checkPass');
}
callback();
}
};
const validatePass2 = (rule, value, callback) => {
if (value === '') {
callback(new Error('请再次输入密码'));
} else if (value !== this.ruleForm2.pass) {
callback(new Error('两次输入密码不一致!'));
} else {
callback();
}
};
return { return {
resetId: '',
isShowDialog: false,
permission, permission,
statusOptions: [ statusOptions: [
{ value: 1, label: '使用中' }, { value: 1, label: '使用中' },
...@@ -256,7 +262,20 @@ export default { ...@@ -256,7 +262,20 @@ export default {
pageSize: 10, pageSize: 10,
totalCount: 0, totalCount: 0,
}, },
rules2: {
pass: [
{ validator: validatePass, trigger: 'blur' },
{ min: 6, message: '密码长度最少为6位', trigger: 'blur' },
],
checkPass: [
{ validator: validatePass2, trigger: 'blur' },
{ min: 6, message: '密码长度最少为6位', trigger: 'blur' },
],
},
ruleForm2: {
pass: '',
checkPass: '',
},
}; };
}, },
mounted() {}, mounted() {},
...@@ -265,6 +284,43 @@ export default { ...@@ -265,6 +284,43 @@ export default {
this.queryAllProvinceByPermission(); this.queryAllProvinceByPermission();
}, },
methods: { methods: {
setNewPassword(formName) {
this.$refs[formName].validate((valid) => {
if (valid) {
axios
.post(`${address}setNewPassword`, {
id: this.resetId,
password: this.ruleForm2.pass,
})
.then((response) => {
if (response.data.code === 200) {
this.ruleForm2.checkPass = '';
this.ruleForm2.pass = '';
this.$message({
type: 'success',
dangerouslyUseHTMLString: true,
showClose: true,
duration: 3000,
message: '修改密码成功',
});
this.isShowDialog = false;
} else {
Message({
message: response.data.message,
});
}
})
.catch((error) => {
this.checkLoadingList.splice(this.checkLoadingList.indexOf(id), 1);
console.log(error);
});
}
});
},
showResetPassword(id) {
this.resetId = id;
this.isShowDialog = true;
},
resetPassword(id) { resetPassword(id) {
axios axios
.post(`${address}resetPassword`, { .post(`${address}resetPassword`, {
...@@ -346,8 +402,10 @@ export default { ...@@ -346,8 +402,10 @@ export default {
}, },
getCityOptions() { getCityOptions() {
this.cityOptions = []; this.cityOptions = [];
if (this.filters.provinceIds.length>0) { if (this.filters.provinceIds.length > 0) {
this.queryCityByProvince(this.filters.provinceIds); this.queryCityByProvince(this.filters.provinceIds);
} else {
this.filters.cityIds = [];
} }
}, },
...@@ -390,6 +448,17 @@ export default { ...@@ -390,6 +448,17 @@ export default {
if (response.data.code === 200) { if (response.data.code === 200) {
if (response.data.data) { if (response.data.data) {
this.cityOptions = response.data.data; this.cityOptions = response.data.data;
this.cityOptions.forEach((e) => {
e.name += '管理处';
});
const newCityIds = [];
this.cityOptions.forEach((ex) => {
if (this.filters.cityIds.includes(ex.id)) {
newCityIds.push(ex.id);
}
});
this.filters.cityIds = newCityIds;
} }
} }
}) })
...@@ -423,7 +492,7 @@ export default { ...@@ -423,7 +492,7 @@ export default {
const that = this; const that = this;
let startTime = null; let startTime = null;
let endTime = null; let endTime = null;
if (that.filters.dateTime.length > 1) { if (that.filters.dateTime && that.filters.dateTime.length > 1) {
// eslint-disable-next-line prefer-destructuring // eslint-disable-next-line prefer-destructuring
startTime = that.filters.dateTime[0]; startTime = that.filters.dateTime[0];
// eslint-disable-next-line prefer-destructuring // eslint-disable-next-line prefer-destructuring
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment