Merge branch 'master' of http://s16s652780.51mypc.cn:49896/r/jfpt-Vue
7 files modified
5 files added
| New file |
| | |
| | | /* axios v0.21.1 | (c) 2020 by Matt Zabriskie */ |
| | | !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.axios=t():e.axios=t()}(this,function(){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){e.exports=n(1)},function(e,t,n){"use strict";function r(e){var t=new i(e),n=s(i.prototype.request,t);return o.extend(n,i.prototype,t),o.extend(n,t),n}var o=n(2),s=n(3),i=n(4),a=n(22),u=n(10),c=r(u);c.Axios=i,c.create=function(e){return r(a(c.defaults,e))},c.Cancel=n(23),c.CancelToken=n(24),c.isCancel=n(9),c.all=function(e){return Promise.all(e)},c.spread=n(25),c.isAxiosError=n(26),e.exports=c,e.exports.default=c},function(e,t,n){"use strict";function r(e){return"[object Array]"===R.call(e)}function o(e){return"undefined"==typeof e}function s(e){return null!==e&&!o(e)&&null!==e.constructor&&!o(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}function i(e){return"[object ArrayBuffer]"===R.call(e)}function a(e){return"undefined"!=typeof FormData&&e instanceof FormData}function u(e){var t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer}function c(e){return"string"==typeof e}function f(e){return"number"==typeof e}function p(e){return null!==e&&"object"==typeof e}function d(e){if("[object Object]"!==R.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function l(e){return"[object Date]"===R.call(e)}function h(e){return"[object File]"===R.call(e)}function m(e){return"[object Blob]"===R.call(e)}function y(e){return"[object Function]"===R.call(e)}function g(e){return p(e)&&y(e.pipe)}function v(e){return"undefined"!=typeof URLSearchParams&&e instanceof URLSearchParams}function x(e){return e.replace(/^\s*/,"").replace(/\s*$/,"")}function w(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)}function b(e,t){if(null!==e&&"undefined"!=typeof e)if("object"!=typeof e&&(e=[e]),r(e))for(var n=0,o=e.length;n<o;n++)t.call(null,e[n],n,e);else for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&t.call(null,e[s],s,e)}function E(){function e(e,n){d(t[n])&&d(e)?t[n]=E(t[n],e):d(e)?t[n]=E({},e):r(e)?t[n]=e.slice():t[n]=e}for(var t={},n=0,o=arguments.length;n<o;n++)b(arguments[n],e);return t}function j(e,t,n){return b(t,function(t,r){n&&"function"==typeof t?e[r]=S(t,n):e[r]=t}),e}function C(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e}var S=n(3),R=Object.prototype.toString;e.exports={isArray:r,isArrayBuffer:i,isBuffer:s,isFormData:a,isArrayBufferView:u,isString:c,isNumber:f,isObject:p,isPlainObject:d,isUndefined:o,isDate:l,isFile:h,isBlob:m,isFunction:y,isStream:g,isURLSearchParams:v,isStandardBrowserEnv:w,forEach:b,merge:E,extend:j,trim:x,stripBOM:C}},function(e,t){"use strict";e.exports=function(e,t){return function(){for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];return e.apply(t,n)}}},function(e,t,n){"use strict";function r(e){this.defaults=e,this.interceptors={request:new i,response:new i}}var o=n(2),s=n(5),i=n(6),a=n(7),u=n(22);r.prototype.request=function(e){"string"==typeof e?(e=arguments[1]||{},e.url=arguments[0]):e=e||{},e=u(this.defaults,e),e.method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var t=[a,void 0],n=Promise.resolve(e);for(this.interceptors.request.forEach(function(e){t.unshift(e.fulfilled,e.rejected)}),this.interceptors.response.forEach(function(e){t.push(e.fulfilled,e.rejected)});t.length;)n=n.then(t.shift(),t.shift());return n},r.prototype.getUri=function(e){return e=u(this.defaults,e),s(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},o.forEach(["delete","get","head","options"],function(e){r.prototype[e]=function(t,n){return this.request(u(n||{},{method:e,url:t,data:(n||{}).data}))}}),o.forEach(["post","put","patch"],function(e){r.prototype[e]=function(t,n,r){return this.request(u(r||{},{method:e,url:t,data:n}))}}),e.exports=r},function(e,t,n){"use strict";function r(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var o=n(2);e.exports=function(e,t,n){if(!t)return e;var s;if(n)s=n(t);else if(o.isURLSearchParams(t))s=t.toString();else{var i=[];o.forEach(t,function(e,t){null!==e&&"undefined"!=typeof e&&(o.isArray(e)?t+="[]":e=[e],o.forEach(e,function(e){o.isDate(e)?e=e.toISOString():o.isObject(e)&&(e=JSON.stringify(e)),i.push(r(t)+"="+r(e))}))}),s=i.join("&")}if(s){var a=e.indexOf("#");a!==-1&&(e=e.slice(0,a)),e+=(e.indexOf("?")===-1?"?":"&")+s}return e}},function(e,t,n){"use strict";function r(){this.handlers=[]}var o=n(2);r.prototype.use=function(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1},r.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},r.prototype.forEach=function(e){o.forEach(this.handlers,function(t){null!==t&&e(t)})},e.exports=r},function(e,t,n){"use strict";function r(e){e.cancelToken&&e.cancelToken.throwIfRequested()}var o=n(2),s=n(8),i=n(9),a=n(10);e.exports=function(e){r(e),e.headers=e.headers||{},e.data=s(e.data,e.headers,e.transformRequest),e.headers=o.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),o.forEach(["delete","get","head","post","put","patch","common"],function(t){delete e.headers[t]});var t=e.adapter||a.adapter;return t(e).then(function(t){return r(e),t.data=s(t.data,t.headers,e.transformResponse),t},function(t){return i(t)||(r(e),t&&t.response&&(t.response.data=s(t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)})}},function(e,t,n){"use strict";var r=n(2);e.exports=function(e,t,n){return r.forEach(n,function(n){e=n(e,t)}),e}},function(e,t){"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},function(e,t,n){"use strict";function r(e,t){!s.isUndefined(e)&&s.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}function o(){var e;return"undefined"!=typeof XMLHttpRequest?e=n(12):"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process)&&(e=n(12)),e}var s=n(2),i=n(11),a={"Content-Type":"application/x-www-form-urlencoded"},u={adapter:o(),transformRequest:[function(e,t){return i(t,"Accept"),i(t,"Content-Type"),s.isFormData(e)||s.isArrayBuffer(e)||s.isBuffer(e)||s.isStream(e)||s.isFile(e)||s.isBlob(e)?e:s.isArrayBufferView(e)?e.buffer:s.isURLSearchParams(e)?(r(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):s.isObject(e)?(r(t,"application/json;charset=utf-8"),JSON.stringify(e)):e}],transformResponse:[function(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(e){}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300}};u.headers={common:{Accept:"application/json, text/plain, */*"}},s.forEach(["delete","get","head"],function(e){u.headers[e]={}}),s.forEach(["post","put","patch"],function(e){u.headers[e]=s.merge(a)}),e.exports=u},function(e,t,n){"use strict";var r=n(2);e.exports=function(e,t){r.forEach(e,function(n,r){r!==t&&r.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[r])})}},function(e,t,n){"use strict";var r=n(2),o=n(13),s=n(16),i=n(5),a=n(17),u=n(20),c=n(21),f=n(14);e.exports=function(e){return new Promise(function(t,n){var p=e.data,d=e.headers;r.isFormData(p)&&delete d["Content-Type"];var l=new XMLHttpRequest;if(e.auth){var h=e.auth.username||"",m=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";d.Authorization="Basic "+btoa(h+":"+m)}var y=a(e.baseURL,e.url);if(l.open(e.method.toUpperCase(),i(y,e.params,e.paramsSerializer),!0),l.timeout=e.timeout,l.onreadystatechange=function(){if(l&&4===l.readyState&&(0!==l.status||l.responseURL&&0===l.responseURL.indexOf("file:"))){var r="getAllResponseHeaders"in l?u(l.getAllResponseHeaders()):null,s=e.responseType&&"text"!==e.responseType?l.response:l.responseText,i={data:s,status:l.status,statusText:l.statusText,headers:r,config:e,request:l};o(t,n,i),l=null}},l.onabort=function(){l&&(n(f("Request aborted",e,"ECONNABORTED",l)),l=null)},l.onerror=function(){n(f("Network Error",e,null,l)),l=null},l.ontimeout=function(){var t="timeout of "+e.timeout+"ms exceeded";e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(f(t,e,"ECONNABORTED",l)),l=null},r.isStandardBrowserEnv()){var g=(e.withCredentials||c(y))&&e.xsrfCookieName?s.read(e.xsrfCookieName):void 0;g&&(d[e.xsrfHeaderName]=g)}if("setRequestHeader"in l&&r.forEach(d,function(e,t){"undefined"==typeof p&&"content-type"===t.toLowerCase()?delete d[t]:l.setRequestHeader(t,e)}),r.isUndefined(e.withCredentials)||(l.withCredentials=!!e.withCredentials),e.responseType)try{l.responseType=e.responseType}catch(t){if("json"!==e.responseType)throw t}"function"==typeof e.onDownloadProgress&&l.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&l.upload&&l.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then(function(e){l&&(l.abort(),n(e),l=null)}),p||(p=null),l.send(p)})}},function(e,t,n){"use strict";var r=n(14);e.exports=function(e,t,n){var o=n.config.validateStatus;n.status&&o&&!o(n.status)?t(r("Request failed with status code "+n.status,n.config,null,n.request,n)):e(n)}},function(e,t,n){"use strict";var r=n(15);e.exports=function(e,t,n,o,s){var i=new Error(e);return r(i,t,n,o,s)}},function(e,t){"use strict";e.exports=function(e,t,n,r,o){return e.config=t,n&&(e.code=n),e.request=r,e.response=o,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},e}},function(e,t,n){"use strict";var r=n(2);e.exports=r.isStandardBrowserEnv()?function(){return{write:function(e,t,n,o,s,i){var a=[];a.push(e+"="+encodeURIComponent(t)),r.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),r.isString(o)&&a.push("path="+o),r.isString(s)&&a.push("domain="+s),i===!0&&a.push("secure"),document.cookie=a.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}()},function(e,t,n){"use strict";var r=n(18),o=n(19);e.exports=function(e,t){return e&&!r(t)?o(e,t):t}},function(e,t){"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},function(e,t){"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},function(e,t,n){"use strict";var r=n(2),o=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,n,s,i={};return e?(r.forEach(e.split("\n"),function(e){if(s=e.indexOf(":"),t=r.trim(e.substr(0,s)).toLowerCase(),n=r.trim(e.substr(s+1)),t){if(i[t]&&o.indexOf(t)>=0)return;"set-cookie"===t?i[t]=(i[t]?i[t]:[]).concat([n]):i[t]=i[t]?i[t]+", "+n:n}}),i):i}},function(e,t,n){"use strict";var r=n(2);e.exports=r.isStandardBrowserEnv()?function(){function e(e){var t=e;return n&&(o.setAttribute("href",t),t=o.href),o.setAttribute("href",t),{href:o.href,protocol:o.protocol?o.protocol.replace(/:$/,""):"",host:o.host,search:o.search?o.search.replace(/^\?/,""):"",hash:o.hash?o.hash.replace(/^#/,""):"",hostname:o.hostname,port:o.port,pathname:"/"===o.pathname.charAt(0)?o.pathname:"/"+o.pathname}}var t,n=/(msie|trident)/i.test(navigator.userAgent),o=document.createElement("a");return t=e(window.location.href),function(n){var o=r.isString(n)?e(n):n;return o.protocol===t.protocol&&o.host===t.host}}():function(){return function(){return!0}}()},function(e,t,n){"use strict";var r=n(2);e.exports=function(e,t){function n(e,t){return r.isPlainObject(e)&&r.isPlainObject(t)?r.merge(e,t):r.isPlainObject(t)?r.merge({},t):r.isArray(t)?t.slice():t}function o(o){r.isUndefined(t[o])?r.isUndefined(e[o])||(s[o]=n(void 0,e[o])):s[o]=n(e[o],t[o])}t=t||{};var s={},i=["url","method","data"],a=["headers","auth","proxy","params"],u=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],c=["validateStatus"];r.forEach(i,function(e){r.isUndefined(t[e])||(s[e]=n(void 0,t[e]))}),r.forEach(a,o),r.forEach(u,function(o){r.isUndefined(t[o])?r.isUndefined(e[o])||(s[o]=n(void 0,e[o])):s[o]=n(void 0,t[o])}),r.forEach(c,function(r){r in t?s[r]=n(e[r],t[r]):r in e&&(s[r]=n(void 0,e[r]))});var f=i.concat(a).concat(u).concat(c),p=Object.keys(e).concat(Object.keys(t)).filter(function(e){return f.indexOf(e)===-1});return r.forEach(p,o),s}},function(e,t){"use strict";function n(e){this.message=e}n.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},n.prototype.__CANCEL__=!0,e.exports=n},function(e,t,n){"use strict";function r(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise(function(e){t=e});var n=this;e(function(e){n.reason||(n.reason=new o(e),t(n.reason))})}var o=n(23);r.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},r.source=function(){var e,t=new r(function(t){e=t});return{token:t,cancel:e}},e.exports=r},function(e,t){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},function(e,t){"use strict";e.exports=function(e){return"object"==typeof e&&e.isAxiosError===!0}}])}); |
| | | //# sourceMappingURL=axios.min.map |
| New file |
| | |
| | | <!DOCTYPE html> |
| | | <html lang="en"> |
| | | |
| | | <head> |
| | | <meta charset="UTF-8"> |
| | | <meta name="viewport" content="width=device-width, initial-scale=1.0"> |
| | | <title>Document</title> |
| | | <link rel="stylesheet" href="../style/FlareClusterLayer_v3.css"> |
| | | <script src='../../lib/jquery.js'></script> |
| | | <script src='../js/FlareClusterLayer_v3.js'></script> |
| | | <script src="https://cdn.jsdelivr.net/npm/vue@2.6.12"></script> |
| | | <!-- element ui --> |
| | | <!-- <link rel="stylesheet" href="../../lib/elementUi.css"> |
| | | <script src="../../lib/elementUi.js"></script> --> |
| | | <link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css"> |
| | | <script src="https://unpkg.com/element-ui/lib/index.js"></script> |
| | | <script src="../../lib/axios.js"></script> |
| | | <!-- layui --> |
| | | <link rel="stylesheet" href="../../lib/layui/css/layui.css" media="all"> |
| | | <style> |
| | | a:hover { |
| | | color: white; |
| | | } |
| | | |
| | | body { |
| | | width: 360px; |
| | | height: 484px; |
| | | overflow: hidden; |
| | | } |
| | | |
| | | #appliutwo { |
| | | width: 330px; |
| | | height: 484px; |
| | | border-radius: 10px; |
| | | margin: 16px 15px 16px 15px; |
| | | overflow: hidden; |
| | | /* border: springgreen solid 0.5px; */ |
| | | } |
| | | |
| | | .flare-liu-top { |
| | | width: 330px; |
| | | height: 140px; |
| | | /* border: rgb(211, 154, 31) solid 0.5px; */ |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | flex-direction: column; |
| | | color: white; |
| | | border-radius: 5px 5px 5px 5px; |
| | | } |
| | | |
| | | .f-l-t-heard { |
| | | width: 300px; |
| | | height: 50px; |
| | | font-size: 18px; |
| | | font-family: PingFangSC-Regular; |
| | | } |
| | | |
| | | .f-l-t-right { |
| | | width: 300px; |
| | | height: 50px; |
| | | display: flex; |
| | | /* align-items: center; */ |
| | | color: white; |
| | | justify-content: space-around; |
| | | flex-direction: column; |
| | | font-size: 12px; |
| | | } |
| | | |
| | | |
| | | .f-l-t-r-number { |
| | | width: 180px; |
| | | margin-left: auto; |
| | | } |
| | | |
| | | .f-l-t-r-time { |
| | | width: 180px; |
| | | margin-left: auto; |
| | | } |
| | | |
| | | |
| | | |
| | | .flare-liu-body { |
| | | width: 330px; |
| | | /* height: 361px; */ |
| | | /* border: rgb(106, 20, 187) solid 0.5px; */ |
| | | |
| | | } |
| | | |
| | | .r-b-top { |
| | | height: 250px; |
| | | display: flex; |
| | | display: flex; |
| | | flex-direction: column; |
| | | } |
| | | |
| | | .r-b-t-main { |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | /* justify-content: space-between; */ |
| | | |
| | | padding: 10px 0 10px 0; |
| | | margin-bottom: 5px; |
| | | } |
| | | |
| | | .r-b-t-main-once { |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | |
| | | padding: 10px 0 10px 0; |
| | | margin-bottom: 5px; |
| | | position: relative; |
| | | left: 11px; |
| | | } |
| | | |
| | | .rbt-l, |
| | | .rbt-r { |
| | | width: 150px; |
| | | /* border: rgb(106, 20, 187) solid 0.5px; */ |
| | | } |
| | | |
| | | |
| | | |
| | | .r-b-t-left { |
| | | /* display: block; */ |
| | | width: 27%; |
| | | |
| | | } |
| | | |
| | | .r-b-t-right { |
| | | /* display: block; */ |
| | | width: 70%; |
| | | color: #5d5d5d; |
| | | font-size: 12px; |
| | | |
| | | } |
| | | |
| | | .scene-image-box .el-image { |
| | | display: block; |
| | | min-height: 200px; |
| | | margin-bottom: 10px; |
| | | } |
| | | .scene-image-box{ |
| | | width: 320px; |
| | | height: 260px; |
| | | overflow: auto; |
| | | } |
| | | |
| | | |
| | | .el-tabs__active-bar { |
| | | background-color: #F35B5B; |
| | | } |
| | | |
| | | .el-tabs__item.is-active, |
| | | .el-tabs__item:hover { |
| | | color: #5d5d5d; |
| | | } |
| | | </style> |
| | | </head> |
| | | |
| | | <body> |
| | | <div id="appliutwo" class='police-details-box' class="layui-anim" data-anim="layui-anim-down"> |
| | | <!-- 从layui传值给iframe 的占位input --> |
| | | <!-- <div class="aaa bbb">13223456745</div> --> |
| | | <input type="text" id="sidIput" ref="sidIput" style="display:none"> |
| | | <div class="flare-liu-top" style="background-image: linear-gradient(to right, #F35B5B , #F35B5B"> |
| | | <div class="f-l-t-heard">{{datas.place}}</div> |
| | | <div class="f-l-t-right"> |
| | | <div class="f-l-t-r-number">设备编号:{{datas.deviceNumber}}</div> |
| | | <div class="f-l-t-r-time">接警时间:{{datas.jjTime}}</div> |
| | | </div> |
| | | </div> |
| | | <div class="flare-liu-body"> |
| | | <el-tabs v-model="activeName" @tab-click="handleClick"> |
| | | <el-tab-pane label="警情信息" name="first"> |
| | | <div class="r-b-top"> |
| | | <div class="r-b-t-main-once"> |
| | | <span class="r-b-t-left">接警人:</span> |
| | | <span class="r-b-t-right">{{ datas.alarmPeople }}</span> |
| | | </div> |
| | | <div class="r-b-t-main-once"> |
| | | <span class="r-b-t-left">报警人:</span> |
| | | <span class="r-b-t-right">{{ datas.galarmPeople }}</span> |
| | | </div> |
| | | <!-- <div class="r-b-t-main-once"> |
| | | <span class="r-b-t-left">使用方:</span> |
| | | <span class="r-b-t-right">??</span> |
| | | </div> --> |
| | | <div class="r-b-t-main"> |
| | | <div class="rbt-l"> |
| | | <span class="r-b-t-left">警情内容:</span> |
| | | <span class="r-b-t-right">{{ datas.content }} </span> |
| | | </div> |
| | | <div class="rbt-r"> |
| | | <span class="r-b-t-left">警情类型:</span> |
| | | <span class="r-b-t-right">{{datas.waringType}}</span> |
| | | </div> |
| | | </div> |
| | | <div class="r-b-t-main"> |
| | | <div class="rbt-l"> |
| | | <span class="r-b-t-left">主要负责人:</span> |
| | | <span class="r-b-t-right">{{ datas.oneContacts }} </span> |
| | | </div> |
| | | <div class="rbt-r"> |
| | | <span class="r-b-t-left">电话:</span> |
| | | <span class="r-b-t-right">{{datas.onePhone}}</span> |
| | | </div> |
| | | </div> |
| | | <!-- <div class="r-b-t-main"> |
| | | <div class="rbt-l"> |
| | | <span class="r-b-t-left">二级负责人:</span> |
| | | <span class="r-b-t-right">{{ datas.twoContacts }} </span> |
| | | </div> |
| | | <div class="rbt-r"> |
| | | <span class="r-b-t-left">call:</span> |
| | | <span class="r-b-t-right">{{datas.twoPhone}}</span> |
| | | </div> |
| | | </div> |
| | | <div class="r-b-t-main"> |
| | | <div class="rbt-l"> |
| | | <span class="r-b-t-left">三级负责人:</span> |
| | | <span class="r-b-t-right">{{ datas.threeContacts }} </span> |
| | | </div> |
| | | <div class="rbt-r"> |
| | | <span class="r-b-t-left">call:</span> |
| | | <span class="r-b-t-right">{{datas.threePhone}}</span> |
| | | </div> |
| | | </div> --> |
| | | </div> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="现场图片" name="second"> |
| | | <!-- <el-card class="scene-image-box"> |
| | | <el-image v-for="(item, index) in imgSrc" :key="index" :src="item" :preview-src-list="srcList" |
| | | v-show="imgSrc.length > 0"></el-image> |
| | | <span v-show="imgSrc.length == 0">暂无现场图片</span> |
| | | </el-card> --> |
| | | |
| | | <el-card class="scene-image-box"> |
| | | <el-image v-for="url in imgSrc" :key="url" :src="url" :preview-src-list="srcList" v-show="imgSrc.length"></el-image> |
| | | <span v-show="imgSrc.length == 0">暂无现场图片</span> |
| | | </el-card> |
| | | |
| | | |
| | | </el-tab-pane> |
| | | <el-tab-pane label="现场视频" name="third"> |
| | | <el-card> |
| | | <video :src="feedbackVideo" style="width: 100%; height: 100%; object-fit: fill" controls |
| | | v-show="feedbackVideo != ''"></video> |
| | | <span v-show="feedbackVideo == ''">暂无现场视频</span> |
| | | </el-card> |
| | | </el-tab-pane> |
| | | </el-tabs> |
| | | </div> |
| | | </div> |
| | | <script src="../../lib/layui/layui.js" charset="utf-8"></script> |
| | | <script> |
| | | // var index = parent.layer.getFrameIndex(window.name); |
| | | |
| | | </script> |
| | | <script> |
| | | var me = new Vue({ |
| | | el: '#appliutwo', |
| | | data: { |
| | | datas: {}, |
| | | activeName: 'first', |
| | | imgSrc: [], |
| | | srcList: [], |
| | | feedbackVideo: "", |
| | | //数据列表 |
| | | // aaddress: "", |
| | | // addvnm: "", |
| | | // alarmId: "1372093731758616577", |
| | | // alarmPeople: "李文凤", |
| | | // alarmTime: "2021-04-23 18:07:23", |
| | | // alarmType: "一键报警", |
| | | // beginTime: "", |
| | | // bz: "", |
| | | // channelNumber: "1", |
| | | // cid: "1", |
| | | // city: "3601", |
| | | // content: "挟持报警", |
| | | // czTime: "", |
| | | // deptId: "1353972967606235137", |
| | | // deviceNumber: "201685000006", |
| | | // district: "360121", |
| | | // endTime: "", |
| | | // galarmPeople: "报警主机", |
| | | // id: 255, |
| | | // jd: "114.9220818936825", |
| | | // jjTime: "2021-04-23 18:07:23", |
| | | // jtype: "1", |
| | | // level: "", |
| | | // name: "", |
| | | // oneContacts: "刘仁德", |
| | | // oneId: "1370574307826212865", |
| | | // onePhone: "1567978425", |
| | | // phoneNumber: "", |
| | | // place: "江西省赣州市章贡区南外街道帝景豪园", |
| | | // province: "36", |
| | | // region: "", |
| | | // rname: "", |
| | | // securityArr: "", |
| | | // securityId: "", |
| | | // serialNumber: "001231663A45", |
| | | // sex: "", |
| | | // stype: "", |
| | | // threeContacts: "黎林帆", |
| | | // threeId: "", |
| | | // threePhone: "13238585082,", |
| | | // timeDesc: "", |
| | | // twoContacts: "宰世敏", |
| | | // twoId: "", |
| | | // twoPhone: "13256570082", |
| | | // uids: "", |
| | | // vaddress: "https://web.byisf.com/minio/jfpt/void/20210423180725.mp4", |
| | | // waringType: "一键求助", |
| | | // wd: "25.844357927036526", |
| | | }, |
| | | methods: { |
| | | getdatas(dat) { |
| | | // console.log(dat); |
| | | }, |
| | | handleClick(tab, event) {//标签tab点击事件 |
| | | // console.log(tab, event); |
| | | }, |
| | | getImgAndVideo() { |
| | | var that = this; |
| | | console.log(this.datas.id) |
| | | axios({ |
| | | method: "post", |
| | | url: "/api/blade-jfpts/feedback/feedback/selectFeedEdit", |
| | | params: { |
| | | jid: this.datas.id, |
| | | }, |
| | | }).then((resdata) => { |
| | | var dL = resdata.data.data; |
| | | if (dL.length != 0) { |
| | | if (dL[0].tp.length > 0) { |
| | | console.log(dL[0].tp); |
| | | that.imgSrc = dL[0].tp; |
| | | that.srcList = dL[0].tp; |
| | | } |
| | | if (dL[0].sp.length > 0) { |
| | | console.log(dL[0].sp); |
| | | that.feedbackVideo = dL[0].sp[0]; |
| | | } |
| | | } |
| | | }); |
| | | }, |
| | | }, |
| | | mounted() { |
| | | this.oldtime = setTimeout(() => {//需要同步数据处理,input中value在mounted中没有直接传值 |
| | | // console.log(this.$refs.sidIput.value); |
| | | clearTimeout(this.oldtime); |
| | | this.datas = JSON.parse(this.$refs.sidIput.value);//json对象转js对象 |
| | | this.getdatas(this.datas); |
| | | this.getImgAndVideo(); |
| | | }, 200); |
| | | } |
| | | }) |
| | | </script> |
| | | </body> |
| | | |
| | | </html> |
| New file |
| | |
| | | <!DOCTYPE html> |
| | | <html lang="en"> |
| | | |
| | | <head> |
| | | <meta charset="UTF-8"> |
| | | <meta name="viewport" content="width=device-width, initial-scale=1.0"> |
| | | <title>Document</title> |
| | | <link rel="stylesheet" href="../style/FlareClusterLayer_v3.css"> |
| | | <script src='../../lib/jquery.js'></script> |
| | | <script src='../js/FlareClusterLayer_v3.js'></script> |
| | | <script src="https://cdn.jsdelivr.net/npm/vue@2.6.12"></script> |
| | | <!-- element ui --> |
| | | <link rel="stylesheet" href="../../lib/elementUi.css"> |
| | | <script src="../../lib/elementUi.js"></script> |
| | | |
| | | <!-- layui --> |
| | | <link rel="stylesheet" href="../../lib/layui/css/layui.css" media="all"> |
| | | <style> |
| | | a:hover { |
| | | color: white; |
| | | } |
| | | |
| | | body { |
| | | width: 360px; |
| | | height: 484px; |
| | | overflow: hidden; |
| | | } |
| | | |
| | | #appliutwo { |
| | | width: 330px; |
| | | height: 484px; |
| | | border-radius: 10px; |
| | | margin: 16px 15px 16px 15px; |
| | | overflow: hidden; |
| | | /* border: springgreen solid 0.5px; */ |
| | | } |
| | | |
| | | .flare-liu-top { |
| | | width: 330px; |
| | | height: 90px; |
| | | /* border: rgb(211, 154, 31) solid 0.5px; */ |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | flex-direction: column; |
| | | color: white; |
| | | border-radius: 5px 5px 5px 5px; |
| | | } |
| | | |
| | | .f-l-t-heard { |
| | | width: 300px; |
| | | height: 30px; |
| | | font-size: 18px; |
| | | font-family: PingFangSC-Regular; |
| | | } |
| | | |
| | | .f-l-t-right { |
| | | width: 300px; |
| | | height: 28px; |
| | | display: flex; |
| | | align-items: center; |
| | | color: white; |
| | | justify-content: space-around; |
| | | } |
| | | |
| | | .f-l-t-center { |
| | | width: auto; |
| | | position: relative; |
| | | left: -103px; |
| | | top: 5px; |
| | | } |
| | | |
| | | .f-l-t-r-msg { |
| | | width: 200px; |
| | | height: 28px; |
| | | position: relative; |
| | | top: 10px; |
| | | left: -5px; |
| | | } |
| | | |
| | | .f-l-t-r-but { |
| | | width: 72.531px; |
| | | height: 28px; |
| | | line-height: 28px; |
| | | text-align: center; |
| | | background: rgba(255, 255, 255, .2); |
| | | color: white; |
| | | /* border: wheat 1px solid; */ |
| | | } |
| | | |
| | | .f-l-t-r-but a { |
| | | color: white; |
| | | width: 48.52px; |
| | | height: 16px; |
| | | } |
| | | |
| | | .flare-liu-body { |
| | | width: 330px; |
| | | height: 361px; |
| | | /* border: rgb(106, 20, 187) solid 0.5px; */ |
| | | |
| | | } |
| | | |
| | | .r-b-top { |
| | | height: 250px; |
| | | display: flex; |
| | | display: flex; |
| | | flex-direction: column; |
| | | } |
| | | |
| | | .r-b-t-main { |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | |
| | | padding: 10px 0 10px 0; |
| | | margin-bottom: 5px; |
| | | } |
| | | |
| | | .r-b-t-left { |
| | | display: block; |
| | | width: 27%; |
| | | |
| | | } |
| | | |
| | | .r-b-t-right { |
| | | display: block; |
| | | width: 70%; |
| | | color: #5d5d5d; |
| | | font-size: 12px; |
| | | |
| | | } |
| | | |
| | | .r-b-t-r-label { |
| | | float: left; |
| | | margin-right: 10px; |
| | | padding: 0 10px 0 10px; |
| | | border: 1px solid rgba(0, 0, 0, 0.5); |
| | | border-radius: 5px; |
| | | } |
| | | |
| | | .r-b-t-r-imgsl { |
| | | |
| | | float: left; |
| | | padding: 0 3px 0 3px; |
| | | } |
| | | |
| | | .el-tabs__active-bar { |
| | | background-color: aquamarine; |
| | | } |
| | | |
| | | .el-tabs__item.is-active, |
| | | .el-tabs__item:hover { |
| | | color: #5d5d5d; |
| | | } |
| | | </style> |
| | | </head> |
| | | |
| | | <body> |
| | | <div id="appliutwo" class='police-details-box' class="layui-anim" data-anim="layui-anim-down"> |
| | | <!-- 从layui传值给iframe 的占位input --> |
| | | <!-- <div class="aaa bbb">13223456745</div> --> |
| | | <input type="text" id="sidIput" ref="sidIput" style="display:none"> |
| | | <div class="flare-liu-top"> |
| | | <div class="f-l-t-heard">{{name}}</div> |
| | | <div class="f-l-t-center">{{machineCode}}</div> |
| | | <div class="f-l-t-right"> |
| | | <div class="f-l-t-r-msg">{{statesss}}</div> |
| | | <div class="f-l-t-r-but"> <a href="#" @click="looks">查看详情</a> </div> |
| | | </div> |
| | | </div> |
| | | <div class="flare-liu-body"> |
| | | <el-tabs v-model="activeName" @tab-click="handleClick"> |
| | | <el-tab-pane label="基本信息" name="first"> |
| | | <div class="r-b-top"> |
| | | <div class="r-b-t-main"> |
| | | <span class="r-b-t-left">设备名称</span> |
| | | <span class="r-b-t-right">{{ name }}</span> |
| | | </div> |
| | | <div class="r-b-t-main"> |
| | | <span class="r-b-t-left">设备联系人</span> |
| | | <span class="r-b-t-right">{{ contacts }}: {{ calls }}</span> |
| | | </div> |
| | | <!-- 设备标签待定 --> |
| | | <!-- <div class="r-b-t-main"> |
| | | <span class="r-b-t-left">设备标签</span> |
| | | <span class="r-b-t-right"> |
| | | <div |
| | | class="r-b-t-r-label" |
| | | v-for="(value,index) in labels" |
| | | :key="index" |
| | | > |
| | | {{value}} |
| | | </div> |
| | | </span> |
| | | </div> --> |
| | | <!-- 图暂时没有 --> |
| | | <div class="r-b-t-main"> |
| | | <span class="r-b-t-left" style="position: relative; top: -27px">部署图片</span> |
| | | <span class="r-b-t-right"> |
| | | <div class="r-b-t-r-imgsl" v-for="(value, index) in imgsl" :key="index"> |
| | | <el-image style="width: 68px; height: 68px" :src="value" :preview-src-list="imgsl" |
| | | v-show="value != 'no'"> |
| | | </el-image> |
| | | <div v-show="value == 'no'" style=" |
| | | width: 68px; |
| | | height: 68px; |
| | | text-algin: center; |
| | | color: rgba(0, 0, 0, 0.5); |
| | | "> |
| | | 无图片 |
| | | </div> |
| | | </div> |
| | | </span> |
| | | </div> |
| | | <div class="r-b-t-main"> |
| | | <span class="r-b-t-left">部署时间</span> |
| | | <span class="r-b-t-right">{{ deploymentTime }}</span> |
| | | </div> |
| | | </div> |
| | | </el-tab-pane> |
| | | <!-- <el-tab-pane label="other" name="second">other</el-tab-pane> --> |
| | | </el-tabs> |
| | | </div> |
| | | </div> |
| | | <script src="../../lib/layui/layui.js" charset="utf-8"></script> |
| | | <script> |
| | | // var index = parent.layer.getFrameIndex(window.name); |
| | | |
| | | </script> |
| | | <script> |
| | | var me = new Vue({ |
| | | el: '#appliutwo', |
| | | data: { |
| | | num: '', |
| | | name: '', |
| | | statesss: '', |
| | | //详细信息data |
| | | ourData: '', |
| | | // names: '', |
| | | contacts: '', |
| | | calls: '', |
| | | imgsl: [], |
| | | deploymentTime: '', |
| | | oldtime: '', |
| | | newtime: '', |
| | | machineCode: '', |
| | | |
| | | a: true, |
| | | activeName: 'first' |
| | | }, |
| | | methods: { |
| | | looks() { |
| | | window.parent.parent.location.hash = `#/dataL/dataL?id=${this.ourData.id}&deviceName=${this.ourData.deviceName}&deviceNumber=${this.ourData.deviceNumber}&deviceType=${this.ourData.deviceType}&ownership=${this.ourData.ownership}&ownerId=&devicestate=${this.ourData.devicestate}&stime=${this.ourData.stime}&parentId=${this.ourData.parentId}&jd=${this.ourData.jd}&wd=${this.ourData.wd}&street=${this.ourData.street}&dtype=${this.ourData.dtype}&serialNumber=${this.ourData.serialNumber}&stype=&channelNumber=${this.ourData.channelNumber}&pay=&expireTime=${this.ourData.expireTime}&heartbeat=${this.ourData.heartbeat}&province=${this.ourData.province}&city=${this.ourData.city}&district=${this.ourData.district}&state=${this.ourData.state}&reason=&deptId=${this.ourData.deptId}&onePhone=${this.ourData.onePhone}&twoPhone=${this.ourData.twoPhone}&oneId=${this.ourData.oneId}&twoId=&threeId=&oneContacts=${this.ourData.oneContacts}&twoContacts=${this.ourData.twoContacts}&type=${this.ourData.type}&beginTime=&endTime=&pid=${this.ourData.pid}&onlineStatus=${this.ourData.onlineStatus}&jtype=${this.ourData.jtype}&threePhone=${this.ourData.threePhone}&threeContacts=${this.ourData.threeContacts}`; |
| | | }, |
| | | getdatas(dat) { |
| | | |
| | | var xhr = null |
| | | , my = this |
| | | , url = '/api/blade-jfpts/depl/selectInfo?deviceNumber=' + dat.deviceNumber; |
| | | if (XMLHttpRequest) { //http请求 |
| | | xhr = new XMLHttpRequest(); |
| | | } else { |
| | | xhr = new ActiveXObject("Microsoft.XMLHTTP"); |
| | | |
| | | } |
| | | xhr.open("post", url, true); |
| | | xhr.send(); |
| | | xhr.onreadystatechange = function () { |
| | | if (xhr.readyState === 4) { |
| | | if (xhr.status === 200) { |
| | | // 判断isJson是否传进来了 |
| | | var imgD = JSON.parse(xhr.responseText);// JSON转js |
| | | // console.log(imgD) |
| | | var imgdatas = []; |
| | | if (imgD.data.length != 0) { |
| | | imgdatas = imgD.data[0].paddress.split(','); |
| | | } else { |
| | | |
| | | } |
| | | // var imgdatas = imgD.data[0].paddress.split(','); |
| | | my.imgsl = imgdatas.length == 0 ? ['no'] : imgdatas; |
| | | // my.imgsl = [ //最多3张照片 |
| | | // "https://resource-city.sensoro.com/B8D675A3C4F71C5C8DE2FD764881BE57", |
| | | |
| | | // "https://resource-city.sensoro.com/1723C1A66DB44F792564F3648E5AA1EE", |
| | | // "https://resource-city.sensoro.com/6E0FB78DC42C35F3B8FF0F6A03472433", |
| | | // ] |
| | | // console.log(imgD, my.imgsl); |
| | | } |
| | | } |
| | | } |
| | | this.name = dat.deviceName.length >= 15 ? dat.deviceName.substring(0, 15) + '···' : dat.deviceName; |
| | | me.num = dat.deviceNumber; |
| | | this.evaluate = "空气质量"; |
| | | this.machineCode = "无数据" && dat.deviceNumber; |
| | | this.smoke = "烟雾"; |
| | | this.proportion = "电量"; |
| | | this.ReportTime = "最近上报:" + dat.heartbeat; |
| | | this.contacts = "无数据" && dat.oneContacts; |
| | | this.calls = "无数据" && dat.onePhone; |
| | | this.labels = ["无数据"] && [dat.deviceType]; |
| | | // var imgD = ["no"]; |
| | | // this.imgsl = ["no"] && imgD; |
| | | this.deploymentTime = "无数据" && dat.stime; |
| | | |
| | | var ct = document.getElementsByClassName('flare-liu-top')[0]; |
| | | var cordActive = document.getElementsByClassName('el-tabs__active-bar')[0];//滑块背景颜色 |
| | | |
| | | if (dat.state != '') { |
| | | ct.style.backgroundImage = 'linear-gradient(to right, #F49966 , #F49966'; |
| | | cordActive.style.backgroundImage = 'linear-gradient(to right, #F49966 , #F49966'; |
| | | this.statesss = '故障'; |
| | | } else { |
| | | if (dat.jtype != 1) { |
| | | if (dat.onlineStatus == 1) {//el-tabs__active-bar |
| | | ct.style.backgroundImage = 'linear-gradient(to right, #32C1A2 , #32C1A2'; |
| | | cordActive.style.backgroundImage = 'linear-gradient(to right, #32C1A2 , #32C1A2'; |
| | | this.statesss = '在线'; |
| | | } else { |
| | | ct.style.backgroundImage = 'linear-gradient(to right, #CDCDCD , #CDCDCD'; |
| | | cordActive.style.backgroundImage = 'linear-gradient(to right, #CDCDCD , #CDCDCD'; |
| | | this.statesss = '离线'; |
| | | } |
| | | } else { |
| | | ct.style.backgroundImage = 'linear-gradient(to right, #F35B5B , #F35B5B'; |
| | | cordActive.style.backgroundImage = 'linear-gradient(to right, #F35B5B , #F35B5B'; |
| | | this.statesss = '警报'; |
| | | } |
| | | } |
| | | }, |
| | | handleClick(tab, event) {//标签tab点击事件 |
| | | // console.log(tab, event); |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.oldtime = setTimeout(() => {//需要同步数据处理,input中value在mounted中没有直接传值 |
| | | clearTimeout(this.oldtime); |
| | | this.ourData = JSON.parse(this.$refs.sidIput.value);//json对象转js对象 |
| | | // console.log(this.ourData); |
| | | this.getdatas(this.ourData); |
| | | }, 20); |
| | | |
| | | |
| | | } |
| | | }) |
| | | </script> |
| | | </body> |
| | | |
| | | </html> |
| | |
| | | .mapBtn { |
| | | background-color: #ffffff; |
| | | width: 14vh; |
| | | width: 20.4vh; |
| | | height: 4vh; |
| | | position: relative; |
| | | top: 3vh; |
| | | right: -45vh; |
| | | right: -22vh; |
| | | border-radius: 5px; |
| | | } |
| | | |
| | |
| | | letter-spacing: 1.5px; |
| | | } |
| | | |
| | | .editBtn { |
| | | float: left; |
| | | } |
| | | |
| | | .mapBtn img { |
| | | position: relative; |
| | | left: 1.2vh; |
| | |
| | | a:hover { |
| | | color: #3385FF; |
| | | cursor: pointer; |
| | | } |
| | | |
| | | .insBtn:hover { |
| | | cursor: pointer; |
| | | color: #3385FF; |
| | | } |
| | | |
| | | .editBtn:hover { |
| | | cursor: pointer; |
| | | } |
| | | |
| | | .delBtn:hover { |
| | | cursor: pointer; |
| | | } |
| | | |
| | | .tips { |
| | | width: 120px; |
| | | height: 26px; |
| | | background-color: #ffffff; |
| | | position: absolute; |
| | | display: none; |
| | | border-radius: 4px; |
| | | border: 1px solid #3385FF; |
| | | } |
| | | |
| | | .tips span { |
| | | line-height: 26px; |
| | | font-size: 10px; |
| | | position: absolute; |
| | | left: 7px; |
| | | } |
| | |
| | | polygonFlag: false, |
| | | editToolbar: null, |
| | | addPolygonEntitys: null, |
| | | addLineEntitys: null, |
| | | |
| | | //是否选中电子围栏区域 |
| | | isChecked: false, |
| | | |
| | | //当前处警员是否已有电子围栏 |
| | | isEngineer: false, |
| | | |
| | | //是否可编辑 |
| | | isEdit: false, |
| | | |
| | | // 用来记录巡逻区域或者巡逻路线的下标的 |
| | | patrolIndex: 0, |
| | |
| | | y: 0, |
| | | offset: null, |
| | | moveThis: null, |
| | | |
| | | //编辑工具激活后为true |
| | | editToolbarStatus: false, |
| | | |
| | | //基础路径 |
| | | //pathUrl: "http://localhost:89", |
| | |
| | | id: 'addPolygonEntitys' |
| | | }); |
| | | |
| | | |
| | | // 添加线的图层 |
| | | this.addLineEntitys = new GraphicsLayer({ |
| | | id: 'addLineEntitys' |
| | | }); |
| | | |
| | | // 添加所有图层的地方 |
| | | this.entityPolygonAll = new GraphicsLayer({ |
| | | id: 'entityPolygonAll' |
| | |
| | | |
| | | this._map.addLayer(this.addEntitys); |
| | | this._map.addLayer(this.addPolygonEntitys); |
| | | this._map.addLayer(this.addLineEntitys); |
| | | this._map.addLayer(this.entityPolygonAll); |
| | | |
| | | }, |
| | |
| | | var that = this; |
| | | |
| | | //删除电子围栏点击事件 |
| | | $(".mapBtn .delete").click(function() { |
| | | $(".mapBtn .delBtn").click(function() { |
| | | if (!that.isEngineer) { |
| | | layui.use('layer', function() { |
| | | layui.layer.msg('请先新增电子围栏信息!') |
| | | }) |
| | | return; |
| | | } |
| | | //需选中电子围栏,然后进行删除 |
| | | layer.confirm('是否确认删除', { |
| | | btn: ['确定', '取消'], //按钮 |
| | |
| | | }) |
| | | |
| | | //新增电子围栏 |
| | | $('.mapBtn .insert').click(function() { |
| | | $('.mapBtn .insBtn').click(function() { |
| | | //修改按钮样式 |
| | | $("#insertEngineeringMap").css("color", "#3385FF") |
| | | //判断 |
| | | if (that.isEngineer) { |
| | | layui.use('layer', function() { |
| | | layui.layer.msg('已存在电子围栏'); |
| | | }) |
| | | layui.layer.msg('已存在电子围栏'); |
| | | }) |
| | | //新增按钮颜色改回 |
| | | $("#insertEngineeringMap").css("color", "#757575"); |
| | | } else { |
| | | layui.use('layer', function() { |
| | | layui.layer.msg('请开始划分电子围栏'); |
| | | }) |
| | | that.polygonFlag = true; |
| | | } |
| | | }) |
| | | |
| | | |
| | | //编辑电子围栏 |
| | | $('.mapBtn .editBtn').click(function() { |
| | | if (!that.isEngineer) { |
| | | layui.use('layer', function() { |
| | | layui.layer.msg('请先新增电子围栏信息!') |
| | | }) |
| | | return; |
| | | } |
| | | $("#editEngineeringMap").css("color", "#3385FF"); |
| | | //修改为可编辑状态 |
| | | that.isEdit = true; |
| | | layui.use('layer', function() { |
| | | layui.layer.msg('点击电子围栏图形即可编辑'); |
| | | }) |
| | | }) |
| | | |
| | | }, |
| | |
| | | |
| | | //鼠标右击事件 |
| | | document.getElementById('mainMapWidget').onmousedown = function(event) { |
| | | //去除系统默认右键功能 |
| | | document.oncontextmenu = function() { |
| | | //alert("当前页面不能使用右键!"); |
| | | return false; |
| | | } |
| | | //event.preventDefault(); |
| | | if (event.button == 2) { |
| | | if (that.polygonData.length < 2) { |
| | | layui.use('layer', function() { |
| | | layui.layer.msg('不能形成区域,请继续划分!!!') |
| | | }) |
| | | return; |
| | | } |
| | | if (that.polygonFlag == true) { |
| | | // 勾画最后一个点 |
| | | var normalizedVal = webMercatorUtils.xyToLngLat(event.mapPoint.x, event.mapPoint.y); |
| | | that.polygonData.push([normalizedVal[0], normalizedVal[1]]); |
| | | // 声明空字符串,存储数据 |
| | | var dataStr = ''; |
| | | var data = null; |
| | | if (that.patrolIndex == 1) { |
| | | that.addPolyline(that.addPolygonEntitys, that.polygonData); |
| | | // 获取数据 |
| | | data = that.addPolygonEntitys.graphics[0].geometry.paths[0]; |
| | | } else { |
| | | that.addPolygon(that.addPolygonEntitys, that.polygonData); |
| | | // 获取数据 |
| | | data = that.addPolygonEntitys.graphics[0].geometry.rings[0]; |
| | | } |
| | | |
| | | // 组装数据 |
| | | for (var i = 0; i < data.length; i++) { |
| | | dataStr += (data[i][0] + ' ' + data[i][1] + ','); |
| | | } |
| | | dataStr = dataStr.substring(0, dataStr.length - 1); |
| | | |
| | | //将数据存入数据库 |
| | | $.ajax({ |
| | | url: that.pathUrl + '/enclosure/enclosure/insertes', |
| | | type: 'POST', |
| | | dataType: 'JSON', |
| | | data: { |
| | | aname: realname, |
| | | anumber: anumber, |
| | | routeInfo: dataStr |
| | | }, |
| | | success: function(result) { |
| | | if (result.code == 200) { |
| | | layui.use('layer', function() { |
| | | layui.layer.msg('新增电子围栏成功!') |
| | | }) |
| | | } |
| | | if (that.polygonData.length >= 2) { |
| | | // 勾画最后一个点 |
| | | var normalizedVal = webMercatorUtils.xyToLngLat(event.mapPoint.x, event.mapPoint.y); |
| | | that.polygonData.push([normalizedVal[0], normalizedVal[1]]); |
| | | // 声明空字符串,存储数据 |
| | | var dataStr = ''; |
| | | var data = null; |
| | | if (that.patrolIndex == 1) { |
| | | that.addPolyline(that.addPolygonEntitys, that.polygonData); |
| | | // 获取数据 |
| | | data = that.addPolygonEntitys.graphics[0].geometry.paths[0]; |
| | | } else { |
| | | that.addPolygon(that.addPolygonEntitys, that.polygonData); |
| | | // 获取数据 |
| | | data = that.addPolygonEntitys.graphics[0].geometry.rings[0]; |
| | | } |
| | | }) |
| | | |
| | | // 组装数据 |
| | | for (var i = 0; i < data.length; i++) { |
| | | dataStr += (data[i][0] + ' ' + data[i][1] + ','); |
| | | } |
| | | dataStr = dataStr.substring(0, dataStr.length - 1); |
| | | |
| | | //将数据存入数据库 |
| | | $.ajax({ |
| | | url: that.pathUrl + '/enclosure/enclosure/insertes', |
| | | type: 'POST', |
| | | dataType: 'JSON', |
| | | data: { |
| | | aname: realname, |
| | | anumber: anumber, |
| | | routeInfo: dataStr |
| | | }, |
| | | success: function(result) { |
| | | if (result.code == 200) { |
| | | layui.use('layer', function() { |
| | | layui.layer.msg('新增电子围栏成功!') |
| | | }) |
| | | //清除点信息 |
| | | that.polygonData = []; |
| | | //新增按钮颜色改回 |
| | | $("#insertEngineeringMap").css("color", "#757575"); |
| | | //清空线图层信息 |
| | | that.addLineEntitys.clear(); |
| | | //修改电子围栏数据状态 |
| | | that.isEngineer = true; |
| | | //修改电子围栏选中状态 |
| | | that.isChecked = false; |
| | | //修改电子围栏编辑状态 |
| | | that.polygonFlag = false; |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | |
| | | } |
| | | //修改电子围栏数据状态 |
| | | that.isEngineer = true; |
| | | //修改电子围栏选中状态 |
| | | that.isChecked = false; |
| | | //修改电子围栏编辑状态 |
| | | that.polygonFlag = false; |
| | | |
| | | } |
| | | } |
| | | }, |
| | |
| | | var self = this; |
| | | self._map.onClick = mapClick; |
| | | |
| | | |
| | | //点击事件 |
| | | function mapClick(evt) { |
| | | //坐标格式转换 |
| | | var normalizedVal = webMercatorUtils.xyToLngLat(evt.mapPoint.x, evt.mapPoint.y); |
| | | var y = self._map.toMap({ |
| | | spatialReference: '4326', |
| | |
| | | x: evt.screenPoint.x, |
| | | y: evt.screenPoint.y, |
| | | }); |
| | | |
| | | |
| | | // 编辑中的 |
| | | if (self.polygonFlag == true) { |
| | |
| | | |
| | | that.isChecked = true; |
| | | |
| | | self.modifyPolygon(); |
| | | //self.modifyPolygon(); |
| | | |
| | | self.activateToolbar(evt.graphic); |
| | | //进入编辑状态 |
| | | //self.activateToolbar(evt.graphic); |
| | | } else { // 点击不在图形上 |
| | | //修改电子围栏选中状态 |
| | | that.isChecked = false; |
| | | |
| | | self.modifyPolygon() |
| | | } |
| | | |
| | | if (that.isEdit) { |
| | | that.isChecked = true; |
| | | self.modifyPolygon(); |
| | | //进入编辑状态 |
| | | self.activateToolbar(evt.graphic); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | // 提示信息 |
| | | $(document).off('mousemove').mousemove(function(e) { |
| | | var y = e.clientY + 10; |
| | | var x = e.clientX + 20; |
| | | |
| | | if (e.clientX < 40) { |
| | | var x = 40; |
| | | } |
| | | |
| | | if (e.clientY < 42) { |
| | | y = 42; |
| | | } |
| | | |
| | | if (e.clientY > ($(window).height() - 82)) { |
| | | y = ($(window).height() - 66); |
| | | } |
| | | |
| | | if (e.clientX > ($(window).width() - 184)) { |
| | | x = ($(window).width() - 184); |
| | | } |
| | | |
| | | // 鼠标移动监听事件 |
| | | $(document).off('mousemove').mousemove(function(ev) { |
| | | var oEvent = ev || event; |
| | | //鼠标移动,提示语 |
| | | var oDiv1 = document.getElementById('securityMapTips1'); |
| | | var oDiv2 = document.getElementById('securityMapTips2'); |
| | | var oDiv3 = document.getElementById('securityMapTips3'); |
| | | var oDiv4 = document.getElementById('securityMapTips4'); |
| | | //新增电子围栏提示语 |
| | | if (self.polygonFlag == true) { |
| | | $('.securityMapTips').stop().show(); |
| | | |
| | | var scrollTop = document.documentElement.scrollTop || document.body.scrollTop; |
| | | var scrollLeft = document.documentElement.scrollLeft || document.body.scrollLeft; |
| | | if (self.polygonData.length == 0) { |
| | | $('.securityMapTips').text('单击左键开始绘制。'); |
| | | } else { |
| | | if (e.clientY > ($(window).height() - 98)) { |
| | | y = ($(window).height() - 88); |
| | | } |
| | | $('.securityMapTips').text('单击左键新增加点。单击右键完成绘制。'); |
| | | oDiv1.style.left = oEvent.clientX + scrollLeft + 15 + 'px'; |
| | | oDiv1.style.top = oEvent.clientY + scrollTop + 'px'; |
| | | oDiv1.style.display = 'block'; |
| | | } |
| | | |
| | | $('.securityMapTips').css({ |
| | | 'top': y, |
| | | 'left': x, |
| | | }) |
| | | if (self.polygonData.length == 1) { |
| | | oDiv1.style.display = 'none'; |
| | | oDiv2.style.left = oEvent.clientX + scrollLeft + 15 + 'px'; |
| | | oDiv2.style.top = oEvent.clientY + scrollTop + 'px'; |
| | | oDiv2.style.display = 'block'; |
| | | } |
| | | |
| | | if (self.polygonData.length > 1) { |
| | | oDiv2.style.display = 'none'; |
| | | oDiv3.style.left = oEvent.clientX + scrollLeft + 15 + 'px'; |
| | | oDiv3.style.top = oEvent.clientY + scrollTop + 'px'; |
| | | oDiv3.style.display = 'block'; |
| | | } |
| | | |
| | | //已经有一个点或以上 |
| | | if (self.polygonData.length >= 1) { |
| | | //鼠标移动,上个点和当前点之间画线 |
| | | //临时的线数据 |
| | | var tempLineData = []; |
| | | //鼠标当前点的数据 |
| | | var normalizedVal = webMercatorUtils.xyToLngLat(oEvent.originalEvent.mapPoint.x, oEvent.originalEvent.mapPoint.y); |
| | | //获取面数据 |
| | | var polygonArr = self.polygonData; |
| | | //上个点的数据 |
| | | var prevPointArr = polygonArr[self.polygonData.length - 1]; |
| | | //封装数据 |
| | | tempLineData.push([prevPointArr[0], prevPointArr[1]]); |
| | | tempLineData.push([normalizedVal[0], normalizedVal[1]]); |
| | | console.log(tempLineData, 123); |
| | | //画线 |
| | | self.addLine(self.addLineEntitys, tempLineData); |
| | | } |
| | | } else { |
| | | $('.securityMapTips').stop().hide(); |
| | | oDiv3.style.display = 'none'; |
| | | } |
| | | |
| | | //编辑电子围栏提示语 |
| | | if (that.editToolbarStatus) { |
| | | $("#securityMapTips4").css("width", "220px"); |
| | | $("#securityMapTips4").css("height", "40px"); |
| | | $("#securityMapTips4").css("line-height", "20px"); |
| | | $("#securityMapTips4 span").css("line-height", "20px"); |
| | | var scrollTop = document.documentElement.scrollTop || document.body.scrollTop; |
| | | var scrollLeft = document.documentElement.scrollLeft || document.body.scrollLeft; |
| | | oDiv4.style.left = oEvent.clientX + scrollLeft + 15 + 'px'; |
| | | oDiv4.style.top = oEvent.clientY + scrollTop + 'px'; |
| | | oDiv4.style.display = 'block'; |
| | | } else { |
| | | oDiv4.style.display = 'none'; |
| | | } |
| | | |
| | | }) |
| | | }, |
| | | |
| | | //新增线 |
| | | /** |
| | | * 新增线图层 |
| | | * @param {*} entitys addPolygonEntitys |
| | | * @param {*} path 坐标点的数据 |
| | | */ |
| | | addPolyline: function(entitys, path) { |
| | | entitys.clear(); |
| | | var polylineSymbol = new SimpleLineSymbol(); |
| | | polylineSymbol.color = [255, 0, 0, 1]; |
| | | polylineSymbol.width = 4; |
| | | polylineSymbol.width = 2; |
| | | var polyline = new Polyline({ |
| | | "paths": [path], |
| | | "spatialReference": { |
| | | "wkid": 4326 |
| | | } |
| | | }); |
| | | |
| | | entitys.add(new Graphic(polyline, polylineSymbol)); |
| | | }, |
| | | |
| | | |
| | | /** |
| | | * 新增线图层 |
| | | * @param {*} entitys addLineEntitys |
| | | * @param {*} path 坐标点的数据 |
| | | */ |
| | | addLine: function(entitys, path) { |
| | | entitys.clear(); |
| | | var polylineSymbol = new SimpleLineSymbol(); |
| | | //var polylineSymbol = new SimpleMarkerSymbol(); |
| | | polylineSymbol.color = [255, 0, 0, 1]; |
| | | polylineSymbol.width = 2; |
| | | polylineSymbol.style = "short-dot"; |
| | | var polyline = new Polyline({ |
| | | "paths": [path], |
| | | "spatialReference": { |
| | |
| | | routeInfo: dataStr |
| | | }, |
| | | success: function(result) { |
| | | if (result.code == 200) {} |
| | | if (result.code == 200) { |
| | | layui.use('layer', function() { |
| | | layui.layer.msg('电子围栏修改成功!'); |
| | | }) |
| | | $("#editEngineeringMap").css("color", "#757575"); |
| | | $("#securityMapTips4").css("display", "none"); |
| | | self.isEdit = false; |
| | | self.editToolbarStatus = false; |
| | | } |
| | | } |
| | | }) |
| | | |
| | | } |
| | | }, |
| | | |
| | | |
| | | activateToolbar: function(graphic) { |
| | | var that = this; |
| | | |
| | | that.editToolbarStatus = true; |
| | | var tool = 0; |
| | | |
| | | this.editToolbar = new Edit(this._map); |
| | | |
| | | |
| | | // if (registry.byId("tool_move").checked) { |
| | | tool = tool | Edit.MOVE; |
| | |
| | | |
| | | //在地图上新增点 |
| | | addPoint: function(entitys, lgtd, lttd, img) { |
| | | var symbol = new esri.symbol.PictureMarkerSymbol(img, 22, 22); |
| | | if (img == undefined) { |
| | | var symbol = new esri.symbol.PictureMarkerSymbol('./images/point.png', 22, 22); |
| | | } else { |
| | | var symbol = new esri.symbol.PictureMarkerSymbol(img, 22, 22); |
| | | } |
| | | var pt = new Point(lgtd, lttd, new SpatialReference({ |
| | | wkid: 4326 |
| | | })); |
| | |
| | | entitys.add(graphic); |
| | | }, |
| | | |
| | | |
| | | //绘制多边形 |
| | | addPolygon: function(entitys, rings) { |
| | | entitys.clear(); |
| | |
| | | <div class="mapBtn"> |
| | | <div class="insBtn"> |
| | | <img src="./images/add-0.png" style="width:14px;height:14px;"> |
| | | <a class=" insert " id="insertEngineeringMap ">新增 | </a> |
| | | <a class=" insert " id="insertEngineeringMap">新增 | </a> |
| | | </div> |
| | | <div class="editBtn"> |
| | | <img src="./images/edit.png" style="width:14px;height:14px;"> |
| | | <a class=" edit " id="editEngineeringMap">编辑 | </a> |
| | | </div> |
| | | <div class="delBtn"> |
| | | <img src="./images/del.png" style="width:14px;height:14px;"> |
| | | <a class="delete " id="securityMapClearMap ">删除</a> |
| | | <a class="delete " id="securityMapClearMap">删除</a> |
| | | </div> |
| | | </div> |
| | | |
| | | <!-- 提示语 --> |
| | | <div class="securityMapTips"> |
| | | <div id="securityMapTips1" class="tips"> |
| | | <span>左键点击开始绘制</span> |
| | | </div> |
| | | <div id="securityMapTips2" class="tips"> |
| | | <span>左键以继续绘制</span> |
| | | </div> |
| | | <div id="securityMapTips3" class="tips"> |
| | | <span>右键点击完成绘制</span> |
| | | </div> |
| | | <div id="securityMapTips4" class="tips"> |
| | | <span>拖动点或线来改变电子围栏区域,点击围栏区域外地图任意点完成修改</span> |
| | | </div> |
| | | </div> |
| | |
| | | if (und == '控制端') {//控制端弹窗关闭 |
| | | parent[0].layer.close(indexControl); |
| | | parent[0].layer.close(+indexControl + 1); |
| | | // console.log('控制:', indexControl) |
| | | } |
| | | // console.log('tucen:', mySelf.indexs) |
| | | |
| | | if (eour == undefined) { |
| | | var dataO = evt; |
| | |
| | | nams: evt.graphic.attributes.deviceName, |
| | | type: evt.graphic.attributes.jtype, |
| | | } |
| | | // console.log(dataO); |
| | | // console.log(aa - bb); |
| | | var cache = []; |
| | | //解决重复JSON.stringify将循环结构转换为JSON。有几率出错,err:TypeError: Converting circular structure to JSON |
| | | |
| | | |
| | | // var setdata = JSON.stringify(evt.graphic.attributes |
| | | |
| | | // , function (key, value) { |
| | | // if (typeof value === 'object' && value !== null) { |
| | | // if (cache.indexOf(value) !== -1) { |
| | | // // 移除 |
| | | // return; |
| | | // } |
| | | // // 收集所有的值 |
| | | // cache.push(value); |
| | | // } |
| | | // return value; |
| | | // } |
| | | // ); |
| | | |
| | | //舍弃上面方法,原因是对象里面嵌入对象,造成不能转换成JSON,吧对象去掉就好, |
| | | var as = evt.graphic.attributes; |
| | | for (let key in as) { |
| | | if (typeof as[key] == 'object') { |
| | |
| | | } |
| | | } |
| | | var setdata = JSON.stringify(as); |
| | | // console.log(setdata); |
| | | // var newkeys = Object.keys(evt.graphic.attributes); |
| | | // var newvalues = Object.values(evt.graphic.attributes); |
| | | // var str = ""; |
| | | // newkeys.forEach(function (item,index) { |
| | | // str += item |
| | | // }) |
| | | |
| | | |
| | | // console.log(cache); |
| | | cache = null; |
| | | var fCard = (posi, setdata, winSize) => { // 弹窗函数 |
| | | var that = this, |
| | |
| | | extend: 'myskin/FlareClusterLayer.css' |
| | | }); |
| | | that.layuiLayer.close(that.layuiLayer.index); |
| | | //两个弹窗 |
| | | // layer.alert('layer 新皮肤'); |
| | | // that.layuiLayer.open({ |
| | | // title: '', |
| | |
| | | // $("#layui-layer-iframe" + index).contents().find("#sidIput").val(setdata); |
| | | // }, |
| | | // }) |
| | | //一个弹窗 |
| | | that.layuiLayer.open({ //第二个iframe |
| | | title: '', |
| | | type: 2, |
| | |
| | | // tipsMore: true, //允许多个tipe |
| | | // content: num, |
| | | success: function (layero, index) { //成功后添加全局点击关闭 |
| | | // var z = document.onclick = ()=>{ |
| | | // parent[0].layer.close(index); |
| | | // // // parent[0].layer.close(+index + 1); |
| | | // z = null; |
| | | // } |
| | | //尝试传值 |
| | | //js对象转json对象 |
| | | // $("#layui-layer-iframe" + index).contents().find("input").val(JSON.stringify(evt.graphic.attributes)); |
| | | $("#layui-layer-iframe" + index).contents().find("#sidIput").val(setdata); |
| | | |
| | | }, |
| | |
| | | |
| | | } |
| | | } |
| | | |
| | | }, |
| | | |
| | | //Add a data point to be clustered. |
| | |
| | | //防抖 |
| | | onceTimeMethodS: null, |
| | | onceTime: 300, |
| | | // 警情缓存 |
| | | Pdata: null, |
| | | //业主缓存 |
| | | Ydata: null, |
| | | //设备缓存 |
| | | Sdata: null, |
| | | |
| | | constructor: function (options, srcRefNode) { |
| | | this._map = options.map; |
| | |
| | | $(this).addClass('on').siblings().removeClass('on'); |
| | | var ind = $(this).index(); |
| | | $($('.analysis-container > div')[ind]).stop().show().siblings().stop().hide(); |
| | | var overText = $('#policeCategory > div:eq(0)').text().trim() == '全部' ? '' : $('#policeCategory > div:eq(0)').text().trim(); |
| | | var levelText = $('#policeArea > div:eq(0)').text().trim() == '全部' ? '' : $('#policeArea > div:eq(0)').attr('areaid'); |
| | | if (ind == 0) { |
| | | // var overText = $('#policeCategory > div:eq(0)').text().trim() == '全部' ? '' : $('#policeCategory > div:eq(0)').text().trim(); |
| | | // var levelText = $('#policeArea > div:eq(0)').text().trim() == '全部' ? '' : $('#policeArea > div:eq(0)').attr('areaid'); |
| | | // if (ind == 1) { |
| | | that.getArea($('#policeArea')); |
| | | that.getPoliceTableAnalysis($($('.analysis-container > div')[ind]).find('.tbody tbody'), |
| | | $('#analysis_select_time_start').val() + ':00', |
| | | $('#analysis_select_time_end').val() + ':00', overText, levelText) |
| | | } else if (ind == 1) { |
| | | that.getOwnerType($('#ownerCategory')); |
| | | that.getOwnerDj($('#ownerLevel'), ''); |
| | | that.getOwnerTable($($('.analysis-container > div')[ind]).find('.tbody tbody'), '', ''); |
| | | } else if (ind == 2) { |
| | | that.getEquipmentTable($($('.analysis-container > div')[ind]).find('.tbody tbody'), ''); |
| | | } |
| | | // } else if (ind == 2) { |
| | | // that.getOwnerType($('#ownerCategory')); |
| | | // that.getOwnerDj($('#ownerLevel'), ''); |
| | | // that.getOwnerTable($($('.analysis-container > div')[ind]).find('.tbody tbody'), '', ''); |
| | | // } else if (ind == 0) { |
| | | // that.getEquipmentTable($($('.analysis-container > div')[ind]).find('.tbody tbody'), ''); |
| | | // } |
| | | |
| | | that.tabIndex = $(this).index(); |
| | | }) |
| | |
| | | }) |
| | | |
| | | // 警情列表中的点击事件 |
| | | $('.analysis-container-police .analysis-table-content .tbody').off('click', 'tr').on('click', 'tr', function () { |
| | | $('.analysis-container-police .analysis-table-content .tbody').off('click', 'tr').on('click', 'tr', function (event) { |
| | | var id = $(this).attr('term-list'); |
| | | var url = './popup/html/police-details.html?obj=' + id; |
| | | var b = mySelf.Pdata; |
| | | for (var key in b) { |
| | | if (b[key].id == id) { |
| | | b = b[key]; |
| | | break; |
| | | } |
| | | } |
| | | console.log(b, id); |
| | | event.stopPropagation(); |
| | | var winSize = [+window.innerHeight / 2 - 242 + 'px', +window.innerWidth - 380 + 'px'] |
| | | |
| | | if (b.jd == '' || b.wd == '') { |
| | | // console.log('无地图经纬度'); |
| | | b.haveJW = '无地图经纬度'; |
| | | } else { |
| | | // console.log('有地图经纬度') |
| | | b.haveJW = '有地图经纬度'; |
| | | var lgtd = Number($(this).find('input').attr('lgtd')); |
| | | var lttd = Number($(this).find('input').attr('lttd')); |
| | | // console.log($(this).find('input').attr('lttd')); |
| | | var position = new esri.geometry.Point(lgtd, lttd, new esri.SpatialReference({ wkid: 4326 }));//根据输入坐标信息找地图上的点 |
| | | that._map.centerAndZoom(position, 18);//缩放,10是缩放级别,可以自定义,数值越大缩放越大 |
| | | } |
| | | //解决重复JSON.stringify将循环结构转换为JSON。有几率出错,err:TypeError: Converting circular structure to JSON |
| | | //舍弃上面方法,原因是对象里面嵌入对象,造成不能转换成JSON,吧对象去掉就好, |
| | | var as = b; |
| | | // for (let key in as) { |
| | | // if (typeof as[key] == 'object') { |
| | | // as = as[key].attributes; |
| | | // // console.log('youduixang ') |
| | | // break; |
| | | // } |
| | | // } |
| | | var setdata = JSON.stringify(as); |
| | | // console.log(setdata,'setdata') |
| | | |
| | | layui.use('layer', function () { |
| | | that.layuiLayer = layui.layer; |
| | | that.layuiLayer.config({ |
| | | extend: 'myskin/police-details.css' |
| | | extend: 'myskin/FlareClusterLayer.css' |
| | | }); |
| | | that.layuiLayer.close(that.layuiLayer.index); |
| | | that.layuiLayer.open({ |
| | | title: '警情详情', |
| | | that.layuiLayer.open({ //第二个iframe |
| | | title: '', |
| | | type: 2, |
| | | shadeClose: true, |
| | | shade: false, |
| | | skin: 'demo-class', |
| | | id: 'onelyTwo', |
| | | maxmin: false, //开启最大化最小化按钮 |
| | | area: ['500px', '400px'], |
| | | offset: 'auto', |
| | | skin: 'police-details', |
| | | content: url, |
| | | closeBtn: 1, |
| | | }); |
| | | area: ['360px', '484px'], |
| | | // area: 'auto', |
| | | offset: winSize, |
| | | skin: 'flare', |
| | | isOutAnim: false, |
| | | closeBtn: 2, //关闭按钮,可通过配置1和2来展示,0关闭 |
| | | content: ['./popup/html/SupervisoryMapPdata.html'], |
| | | resize: false, |
| | | scrollbar: false, |
| | | // tipsMore: true, //允许多个tipe |
| | | // content: num, |
| | | success: function (layero, index) { //成功后添加全局点击关闭 |
| | | $("#layui-layer-iframe" + index).contents().find("#sidIput").val(setdata); |
| | | |
| | | }, |
| | | }) |
| | | }) |
| | | // // document.elementFromPoint(x, y).click(); |
| | | // // console.log(x, y) |
| | | |
| | | // // console.log(that.clusterLayer, that._map, 6) |
| | | // // console.log(id, 'id'); |
| | | // // console.log(that.clusterLayer); |
| | | // var Tattributes = null |
| | | // , ds = that.clusterLayer.allData; |
| | | // for (var key in ds) { |
| | | // if (ds[key].id == id) { |
| | | // Tattributes = ds[key]; |
| | | // } |
| | | // } |
| | | // if (mySelf.onceTimeMethod == null) {//防抖.限制时间内点击次数,否则会造成不能正确销毁前一个弹窗 |
| | | // var evtdata = {}; |
| | | // evtdata = { |
| | | // graphic: { |
| | | // attributes: Tattributes, |
| | | // }, |
| | | // screenX: x, |
| | | // screenY: y, |
| | | // } |
| | | // that.clusterLayer._clickOpenOnclick(evtdata, '控制端', that.clusterLayer.indexs); |
| | | // mySelf.onceTimeMethod = setTimeout(() => { |
| | | // mySelf.onceTimeMethod = null; |
| | | // }, mySelf.onceTime); |
| | | // } else { |
| | | // }; |
| | | }) |
| | | $('.analysis-container-police .analysis-table-content .tbody').off('click', '.location').on('click', '.location', function (event) { |
| | | event.stopPropagation(); |
| | |
| | | }) |
| | | |
| | | // 业主列表中的点击事件 |
| | | $('.analysis-container-owner .analysis-table-content .tbody').off('click', 'tr').on('click', 'tr', function () { |
| | | $('.analysis-container-owner .analysis-table-content .tbody').off('click', 'tr').on('click', 'tr', function (event) { |
| | | var id = $(this).attr('term-list'); |
| | | var url = './popup/html/owner-details.html?id=' + id; |
| | | layui.use('layer', function () { |
| | | that.layuiLayer = layui.layer; |
| | | that.layuiLayer.config({ |
| | | extend: 'myskin/owner-details.css' |
| | | }); |
| | | that.layuiLayer.close(that.layuiLayer.index); |
| | | that.layuiLayer.open({ |
| | | title: '业主详情', |
| | | type: 2, |
| | | shadeClose: true, |
| | | shade: false, |
| | | maxmin: false, //开启最大化最小化按钮 |
| | | area: ['500px', '340px'], |
| | | offset: 'auto', |
| | | skin: 'owner-details', |
| | | content: url, |
| | | closeBtn: 1, |
| | | }); |
| | | }) |
| | | var b = mySelf.Ydata; |
| | | for (var key in b) { |
| | | if (b[key].id == id) { |
| | | b = b[key]; |
| | | break; |
| | | } |
| | | } |
| | | console.log(b, id); |
| | | // var url = './popup/html/owner-details.html?id=' + id; |
| | | // layui.use('layer', function () { |
| | | // that.layuiLayer = layui.layer; |
| | | // that.layuiLayer.config({ |
| | | // extend: 'myskin/owner-details.css' |
| | | // }); |
| | | // that.layuiLayer.close(that.layuiLayer.index); |
| | | // that.layuiLayer.open({ |
| | | // title: '业主详情', |
| | | // type: 2, |
| | | // shadeClose: true, |
| | | // shade: false, |
| | | // maxmin: false, //开启最大化最小化按钮 |
| | | // area: ['500px', '340px'], |
| | | // offset: 'auto', |
| | | // skin: 'owner-details', |
| | | // content: url, |
| | | // closeBtn: 1, |
| | | // }); |
| | | // }) |
| | | |
| | | // event.stopPropagation(); |
| | | // var lgtd = Number($(this).find('input').attr('lgtd')); |
| | | // var lttd = Number($(this).find('input').attr('lttd')); |
| | | // // console.log($(this).find('input').attr('lttd')); |
| | | // var position = new esri.geometry.Point(lgtd, lttd, new esri.SpatialReference({ wkid: 4326 }));//根据输入坐标信息找地图上的点 |
| | | // that._map.centerAndZoom(position, 18);//缩放,10是缩放级别,可以自定义,数值越大缩放越大 |
| | | |
| | | |
| | | // var y = +window.innerHeight / 2 + 200; |
| | | // var x = (+window.innerWidth - 360) / 2 + 360 + 70; |
| | | // // document.elementFromPoint(x, y).click(); |
| | | // // console.log(x, y) |
| | | |
| | | // // var a = document.elementFromPoint(21, 122); |
| | | // // console.log(a); |
| | | |
| | | // // console.log(that.clusterLayer, that._map, 6) |
| | | // // console.log(id, 'id'); |
| | | // // console.log(that.clusterLayer); |
| | | // var Tattributes = null |
| | | // , ds = that.clusterLayer.allData; |
| | | // for (var key in ds) { |
| | | // if (ds[key].id == id) { |
| | | // Tattributes = ds[key]; |
| | | // } |
| | | // } |
| | | // if (mySelf.onceTimeMethod == null) {//防抖.限制时间内点击次数,否则会造成不能正确销毁前一个弹窗 |
| | | // var evtdata = {}; |
| | | // evtdata = { |
| | | // graphic: { |
| | | // attributes: Tattributes, |
| | | // }, |
| | | // screenX: x, |
| | | // screenY: y, |
| | | // } |
| | | // // console.log(that.clusterLayer,5555555555555); |
| | | // that.clusterLayer._clickOpenOnclick(evtdata, '控制端', that.clusterLayer.indexs); |
| | | // mySelf.onceTimeMethod = setTimeout(() => { |
| | | // mySelf.onceTimeMethod = null; |
| | | // }, mySelf.onceTime); |
| | | // } else { |
| | | // }; |
| | | }) |
| | | $('.analysis-container-owner .analysis-table-content .tbody').off('click', '.location').on('click', '.location', function (event) { |
| | | event.stopPropagation(); |
| | |
| | | // 设备列表中的点击事件 |
| | | $('.analysis-container-equipment .analysis-table-content .tbody').off('click', 'tr').on('click', 'tr', function (event) { |
| | | var id = $(this).attr('term-listid'); |
| | | // console.log(mySelf.Sdata); |
| | | // // var url = './popup/html/equipment-details.html?obj=' + id;//设备每一项钟打开警情窗口 |
| | | // // layui.use('layer', function () { |
| | | // // that.layuiLayer = layui.layer; |
| | |
| | | }) |
| | | }, |
| | | getPoliceTableAnalysis: function (dom, beginTime, endTime, waringType, addvcd) { |
| | | dom.empty(); |
| | | dom.empty();//警情信息 |
| | | var that = this; |
| | | $.ajax({ |
| | | url: "/api/blade-jfpts/alarm/alarm/page?current=1&size=99999&waringType=&beginTime=" + beginTime + "&endTime=" + endTime + "&province=36&city=3601&district=" + addvcd, |
| | | type: 'get', |
| | | dataType: 'JSON', |
| | | success: function (data) { |
| | | var result = data.data.records; |
| | | // var result = data.data.records; |
| | | var oldData = data.data.records |
| | | var result = oldData; |
| | | that.Pdata = oldData; |
| | | var str = ''; |
| | | that.entitysData = []; |
| | | that.analysisAddEntitys.clear(); |
| | |
| | | y = result[i].alarmTime.substr(5, 5); |
| | | h = result[i].alarmTime.substr(11, 5); |
| | | a = Number(i) + 1; |
| | | |
| | | str += '<tr term-list=' + result[i].id + '>'; |
| | | str += '<td>' + a + '</td>'; |
| | | str += '<td title=' + result[i].waringType + '>' + result[i].waringType + '</td>'; |
| | | str += '<td title=' + result[i].alarmPeople + '>' + result[i].alarmPeople + '</td>'; |
| | | str += "<td><a href='javascript:;' title=" + time + ">" + y + ' ' + h + "</a></td>"; |
| | | str += "<td class='location'> <input type='button' value='定位'" + ' lgtd=' + result[i].jd + ' lttd=' + result[i].wd + "></td>"; |
| | | str += "<td class='location' style='display: none'> <input type='button' value='定位'" + ' lgtd=' + result[i].jd + ' lttd=' + result[i].wd + "></td>"; |
| | | // if (result[i].state != '') { |
| | | // stares = '故障'; |
| | | // str += "<td class='location'> <input style='background-image:linear-gradient(to right, #F49966 , #F49966' type='button' value=" + stares + ' lgtd=' + result[i].jd + ' lttd=' + result[i].wd + "></td>"; |
| | | // } else { |
| | | // if (result[i].jtype != 1) { |
| | | // if (result[i].onlineStatus == 1) {//el-tabs__active-bar |
| | | // stares = '在线'; |
| | | // str += "<td class='location'> <input style='background-image:linear-gradient(to right, #32C1A2 , #32C1A2' type='button' value=" + stares + ' lgtd=' + result[i].jd + ' lttd=' + result[i].wd + "></td>"; |
| | | // } else { |
| | | // stares = '离线'; |
| | | // str += "<td class='location'> <input style='background-image:linear-gradient(to right, #CDCDCD , #CDCDCD' type='button' value=" + stares + ' lgtd=' + result[i].jd + ' lttd=' + result[i].wd + "></td>"; |
| | | // } |
| | | // } else { |
| | | // stares = '警报'; |
| | | // str += "<td class='location'> <input style='background-image:linear-gradient(to right, #F35B5B , #F35B5B' type='button' value=" + stares + ' lgtd=' + result[i].jd + ' lttd=' + result[i].wd + "></td>"; |
| | | // } |
| | | // } |
| | | |
| | | str += '</tr>'; |
| | | dom.append(str); |
| | | str = ''; |
| | |
| | | dom.children('div:eq(0)').html("全部 <i></i>"); |
| | | dom.children('.select-list').children('ul').empty(); |
| | | dom.children('.select-list').children('ul').append($("<li>全部</li>")); |
| | | $.ajax({ |
| | | url: '/api/blade-jfpts/dj/dj/selectName?tnumbers=' + tnumbers, |
| | | type: 'GET', |
| | | dataType: 'JSON', |
| | | success: function (data) { |
| | | var res = data.data; |
| | | for (var i = 0; i < res.length; i++) { |
| | | dom.children('.select-list').children('ul').append($("<li>" + res[i].dj + "</li>")); |
| | | } |
| | | } |
| | | }) |
| | | // $.ajax({ |
| | | // url: '/api/blade-jfpts/dj/dj/selectName?tnumbers=' + tnumbers, |
| | | // type: 'GET', |
| | | // dataType: 'JSON', |
| | | // success: function (data) { |
| | | // var res = data.data; |
| | | // for (var i = 0; i < res.length; i++) { |
| | | // dom.children('.select-list').children('ul').append($("<li>" + res[i].dj + "</li>")); |
| | | // } |
| | | // } |
| | | // }) |
| | | }, |
| | | // 获取业主信息列表 |
| | | getOwnerTable: function (dom, type, dj) { |
| | |
| | | type: 'GET', |
| | | dataType: 'JSON', |
| | | success: function (data) { |
| | | var result = data.data; |
| | | // var result = data.data; |
| | | var oldData = data.data |
| | | var result = oldData; |
| | | that.Ydata = oldData; |
| | | var str = ''; |
| | | that.entitysData = []; |
| | | that.analysisAddEntitys.clear(); |
| | |
| | | str += '<td>' + result[i].type + '</td>'; |
| | | str += '<td>' + result[i].dj + '</td>'; |
| | | str += '<td>' + result[i].yname + '</td>'; |
| | | str += "<td class='location'> <input type='button' value='定位'" + ' lgtd=' + result[i].jd + ' lttd=' + result[i].wd + "></td>"; |
| | | str += "<td class='location' style='display: none'> <input type='button' value='定位'" + ' lgtd=' + result[i].jd + ' lttd=' + result[i].wd + "></td>"; |
| | | str += '</tr>'; |
| | | dom.append(str); |
| | | str = ''; |
| | |
| | | type: 'GET', |
| | | dataType: 'JSON', |
| | | success: function (data) { |
| | | var oldData = data.data |
| | | var oldData = data.data; |
| | | var result = []; |
| | | that.Sdata = oldData; |
| | | // console.log(result) |
| | | var str = ''; |
| | | that.entitysData = []; |
| | | that.analysisAddEntitys.clear(); |
| | | |
| | | |
| | | if(deviceType == ''){ |
| | | if (deviceType == '') { |
| | | result = oldData; |
| | | }else if(deviceType == '在线'){ |
| | | for (var key in oldData){ |
| | | } else if (deviceType == '在线') { |
| | | for (var key in oldData) { |
| | | // console.log(oldData[key]); |
| | | if(oldData[key].state == '' && oldData[key].jtype != 1 && oldData[key].onlineStatus == 1){ |
| | | if (oldData[key].state == '' && oldData[key].jtype != 1 && oldData[key].onlineStatus == 1) { |
| | | result.push(oldData[key]); |
| | | } |
| | | } |
| | | }else if(deviceType == '离线'){ |
| | | for (var key in oldData){ |
| | | } else if (deviceType == '离线') { |
| | | for (var key in oldData) { |
| | | // console.log(oldData[key]); |
| | | if(oldData[key].state == '' && oldData[key].jtype != 1 && oldData[key].onlineStatus != 1){ |
| | | if (oldData[key].state == '' && oldData[key].jtype != 1 && oldData[key].onlineStatus != 1) { |
| | | result.push(oldData[key]); |
| | | } |
| | | } |
| | | }else if(deviceType == '警报'){ |
| | | for (var key in oldData){ |
| | | } else if (deviceType == '警报') { |
| | | for (var key in oldData) { |
| | | // console.log(oldData[key]); |
| | | if(oldData[key].state == '' && oldData[key].jtype == 1){ |
| | | if (oldData[key].state == '' && oldData[key].jtype == 1) { |
| | | result.push(oldData[key]); |
| | | } |
| | | } |
| | | }else if(deviceType == '故障'){ |
| | | for (var key in oldData){ |
| | | } else if (deviceType == '故障') { |
| | | for (var key in oldData) { |
| | | // console.log(oldData[key]); |
| | | if(oldData[key].state != ''){ |
| | | if (oldData[key].state != '') { |
| | | result.push(oldData[key]); |
| | | } |
| | | } |
| | |
| | | str += '<td>' + result[i].deviceNumber + '</td>'; |
| | | // console.log(result[i].state); |
| | | |
| | | |
| | | |
| | | if (result[i].state != '') { |
| | | stares = '故障'; |
| | | str += "<td class='location'> <input style='background-image:linear-gradient(to right, #F49966 , #F49966' type='button' value=" + stares + ' lgtd=' + result[i].jd + ' lttd=' + result[i].wd + "></td>"; |
| | |
| | | <!-- 展示分析研判 --> |
| | | <div class="analysis-container"> |
| | | <!-- 设备信息 --> |
| | | <div class="analysis-container-equipment"> |
| | | <!-- <div class="analysis-container-equipment"> |
| | | <div class="analysis-category"> |
| | | <ul> |
| | | <li id='equipmentCategory'> |
| | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> --> |
| | | <!-- 警情信息 --> |
| | | <div class="analysis-container-police"> |
| | | <div class="analysis-category"> |
| | |
| | | <th>类别</th> |
| | | <th>接警员</th> |
| | | <th>日期</th> |
| | | <th>操作</th> |
| | | <!-- <th>操作</th> --> |
| | | </tr> |
| | | </thead> |
| | | </table> |
| | |
| | | <th>类别</th> |
| | | <th>等级</th> |
| | | <th>名称</th> |
| | | <th>操作</th> |
| | | <!-- <th>操作</th> --> |
| | | </tr> |
| | | </thead> |
| | | </table> |
| | |
| | | { |
| | | label: "经度", |
| | | hide: true, |
| | | addDisplay: false, |
| | | prop: "jd", |
| | | }, |
| | | { |
| | | label: "纬度", |
| | | hide: true, |
| | | addDisplay: false, |
| | | prop: "wd", |
| | | }, |
| | | { |
| | |
| | | "form.map": { |
| | | // form是表单或者表格绑定的数据集,v-model='form' |
| | | handler(val) { |
| | | |
| | | |
| | | if (val) { |
| | | this.form.wd = val.latitude; |
| | | this.form.jd = val.longitude; |
| | |
| | | "form.oneId":{ |
| | | handler(val) { |
| | | var that = this; |
| | | getBaTree(val).then(res => { |
| | | if (res) { |
| | | that.form.onePhone = res.data.data.records[0].phone; |
| | | that.form.oneContacts = res.data.data.records[0].name; |
| | | } |
| | | }); |
| | | if (val != null && val !=""){ |
| | | getBaTree(val).then(res => { |
| | | if (res) { |
| | | that.form.onePhone = res.data.data.records[0].phone; |
| | | that.form.oneContacts = res.data.data.records[0].name; |
| | | } |
| | | }); |
| | | } |
| | | }, |
| | | } |
| | | }, |