diff --git a/hx-op/.env b/hx-op/.env new file mode 100644 index 0000000..8286906 --- /dev/null +++ b/hx-op/.env @@ -0,0 +1,10 @@ +# port +VITE_PORT = 3301 +#mode +VITE_GLOB_APP_RUN_TYPE = saas + +# spa-title +VITE_GLOB_APP_TITLE = hx-ai-intelligent Depositor + +# spa shortname +VITE_GLOB_APP_SHORT_NAME = hx-ai-intelligent-depositor diff --git a/hx-op/.env.development b/hx-op/.env.development new file mode 100644 index 0000000..0a2d943 --- /dev/null +++ b/hx-op/.env.development @@ -0,0 +1,22 @@ +# Whether to open mock +VITE_USE_MOCK = true + +# public path +VITE_PUBLIC_PATH = /hx-op/ + +# Cross-domain proxy, you can configure multiple +# Please note that no line breaks http://100.73.70.51 + +#VITE_PROXY = {"/community":{ "target":"http://100.73.70.51","changeOrigin": true,"prependPath":false},"/parking":{ "target":"http://100.73.70.246:8080","changeOrigin": true,"iprependPath":false}} +# VITE_PROXY=[["/api","http://100.73.70.51"],["/parking","http://100.73.70.246:8080"]] +# Delete console +VITE_DROP_CONSOLE = false + +# Basic interface address SPA +VITE_GLOB_API_URL=/basic-api + +# File upload address, optional +VITE_GLOB_UPLOAD_URL=/upload + +# Interface prefix +VITE_GLOB_API_URL_PREFIX= diff --git a/hx-op/.env.production b/hx-op/.env.production new file mode 100644 index 0000000..e67279b --- /dev/null +++ b/hx-op/.env.production @@ -0,0 +1,35 @@ +# Whether to open mock +VITE_USE_MOCK = true + +# public path +VITE_PUBLIC_PATH = /hx-op/ + +# Delete console +VITE_DROP_CONSOLE = true + +# Whether to enable gzip or brotli compression +# Optional: gzip | brotli | none +# If you need multiple forms, you can use `,` to separate +VITE_BUILD_COMPRESS = 'none' + +# Whether to delete origin files when using compress, default false +VITE_BUILD_COMPRESS_DELETE_ORIGIN_FILE = false + +# Basic interface address SPA +VITE_GLOB_API_URL=/basic-api + +# File upload address, optional +# It can be forwarded by nginx or write the actual address directly +VITE_GLOB_UPLOAD_URL=/upload + +# Interface prefix +VITE_GLOB_API_URL_PREFIX= + +# Whether to enable image compression +VITE_USE_IMAGEMIN= true + +# use pwa +VITE_USE_PWA = false + +# Is it compatible with older browsers +VITE_LEGACY = false diff --git a/hx-op/.version b/hx-op/.version new file mode 100644 index 0000000..8acdd82 --- /dev/null +++ b/hx-op/.version @@ -0,0 +1 @@ +0.0.1 diff --git a/hx-op/build.sh b/hx-op/build.sh new file mode 100644 index 0000000..e4bdb04 --- /dev/null +++ b/hx-op/build.sh @@ -0,0 +1,74 @@ +#!/bin/bash +SOURCE="$0" +while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink + DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )" + SOURCE="$(readlink "$SOURCE")" + [[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located +done +DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )" + +if [ -z $WORKSPACE ];then + echo "WORKSPACE not exists" +else + set DIR=$WORKSPACE +fi + +echo "current dir" +echo "$DIR" + +cd "$DIR" +projectname=$(basename `pwd`) + +npm run parking-build + +if [ -d "$DIR/dist" ];then + + cd "$DIR/dist" + + # copy module.json + cp ../module.json ./ + + # package + VERSION=$(cat ../.version) + lastdir=../release/ + if [ -d ${lastdir} ];then + echo "删除旧release文件夹" + rm -rf ${lastdir} + else + echo "文件夹不存在!" + fi + mkdir -p ${lastdir} + + dir=../release/nerv/$projectname/$VERSION + mkdir -p ${dir} + tar -zcvf "${dir}/$projectname-$VERSION.tgz" ./* + + templatedir=../release/resources/templates/nerv/$projectname/$VERSION/$projectname + mkdir -p ${templatedir} + cp -r ../resources/templates/* ${templatedir} + + cd ../ + + releasefile=nerv-$projectname-$VERSION.tgz + if [ -f ${releasefile} ];then + echo "删除旧包!" + rm -rf ${releasefile} + fi + + tar -zcvf ${releasefile} ./release/* release.yaml + + mkdir -p ./release/nervui + cp -r ./release/nerv/* ./release/nervui + + if [ -f ${releasefile} ];then + echo "编译成功!" + mv ${releasefile} ./release + else + echo "编译失败!!!" + exit 1 + fi + +else + echo "编译失败!!!" + exit 1 +fi diff --git a/hx-op/index.html b/hx-op/index.html new file mode 100644 index 0000000..420aa9c --- /dev/null +++ b/hx-op/index.html @@ -0,0 +1,19 @@ + + + + + + + + + AI智能BAS系统 + + +
+ + + diff --git a/hx-op/public/asset/file/whiteListUser.xlsx b/hx-op/public/asset/file/whiteListUser.xlsx new file mode 100644 index 0000000..d3a6036 Binary files /dev/null and b/hx-op/public/asset/file/whiteListUser.xlsx differ diff --git a/hx-op/public/asset/font/QuartzMS.TTF b/hx-op/public/asset/font/QuartzMS.TTF new file mode 100644 index 0000000..9f7d50e Binary files /dev/null and b/hx-op/public/asset/font/QuartzMS.TTF differ diff --git a/hx-op/public/asset/image/NoImage.png b/hx-op/public/asset/image/NoImage.png new file mode 100644 index 0000000..d70a7d7 Binary files /dev/null and b/hx-op/public/asset/image/NoImage.png differ diff --git a/hx-op/public/asset/image/header.png b/hx-op/public/asset/image/header.png new file mode 100644 index 0000000..c89c990 Binary files /dev/null and b/hx-op/public/asset/image/header.png differ diff --git a/hx-op/public/asset/image/login/adminIcon.png b/hx-op/public/asset/image/login/adminIcon.png new file mode 100644 index 0000000..e87f2c1 Binary files /dev/null and b/hx-op/public/asset/image/login/adminIcon.png differ diff --git a/hx-op/public/asset/image/login/background.png b/hx-op/public/asset/image/login/background.png new file mode 100644 index 0000000..48446c8 Binary files /dev/null and b/hx-op/public/asset/image/login/background.png differ diff --git a/hx-op/public/asset/image/login/icon_clear.png b/hx-op/public/asset/image/login/icon_clear.png new file mode 100644 index 0000000..8ad3917 Binary files /dev/null and b/hx-op/public/asset/image/login/icon_clear.png differ diff --git a/hx-op/public/asset/image/noResource.png b/hx-op/public/asset/image/noResource.png new file mode 100644 index 0000000..1a15bd4 Binary files /dev/null and b/hx-op/public/asset/image/noResource.png differ diff --git a/hx-op/public/asset/image/side.png b/hx-op/public/asset/image/side.png new file mode 100644 index 0000000..b43bb66 Binary files /dev/null and b/hx-op/public/asset/image/side.png differ diff --git a/hx-op/public/asset/image/sider_collapsed_background.png b/hx-op/public/asset/image/sider_collapsed_background.png new file mode 100644 index 0000000..600cd8a Binary files /dev/null and b/hx-op/public/asset/image/sider_collapsed_background.png differ diff --git a/hx-op/public/asset/js/tdt.js b/hx-op/public/asset/js/tdt.js new file mode 100644 index 0000000..f3c4a33 --- /dev/null +++ b/hx-op/public/asset/js/tdt.js @@ -0,0 +1 @@ +window.TMAP_AUTHKEY="b5311fc44ebe2d76a7738ae3b351fe28";window.T=window.T||{};(function(){ function each(t,i){for(var n in t)t.hasOwnProperty(n)&&i(t[n],n,t)}function find(t,i){if(t.length){for(var n=0;n1}}(),T.Point=function(t,i,n){this.x=n?Math.round(t):t,this.y=n?Math.round(i):i},T.Point.prototype={pQ:function(){return new T.Point(this.x,this.y)},AQ:function(t){return this.pQ().aQ(T.SQ(t))},aQ:function(t){return this.x+=t.x,this.y+=t.y,this},sQ:function(t){return this.pQ().DQ(T.SQ(t))},DQ:function(t){return this.x-=t.x,this.y-=t.y,this},dQ:function(t){return this.pQ().FQ(t)},FQ:function(t){return this.x/=t,this.y/=t,this},fQ:function(t){return this.pQ().GQ(t)},GQ:function(t){return this.x*=t,this.y*=t,this},gQ:function(t){return new T.Point(this.x*t.x,this.y*t.y)},HQ:function(t){return new T.Point(this.x/t.x,this.y/t.y)},hQ:function(){return this.pQ().JQ()},JQ:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},jQ:function(){return this.pQ().KQ()},KQ:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},kQ:function(){return this.pQ().LQ()},LQ:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},distanceTo:function(t){t=T.SQ(t);var i=t.x-this.x,n=t.y-this.y;return Math.sqrt(i*i+n*n)},equals:function(t){return t=T.SQ(t),t.x===this.x&&t.y===this.y},contains:function(t){return t=T.SQ(t),Math.abs(t.x)<=Math.abs(this.x)&&Math.abs(t.y)<=Math.abs(this.y)},lQ:function(){return"Point("+T.S.h(this.x)+", "+T.S.h(this.y)+")"}},T.SQ=function(t,i,n){return t instanceof T.Point?t:T.S.l(t)?new T.Point(t[0],t[1]):void 0===t||null===t?t:"object"==typeof t&&"x"in t&&"y"in t?new T.Point(t.x,t.y):new T.Point(t,i,n)},T.ZQ=function(t,i){if(t)for(var n=i?[t,i]:t,e=0,o=n.length;e=this.min.x&&n.x<=this.max.x&&i.y>=this.min.y&&n.y<=this.max.y},intersects:function(t){t=T.cQ(t);var i=this.min,n=this.max,e=t.min,o=t.max,s=o.x>=i.x&&e.x<=n.x,r=o.y>=i.y&&e.y<=n.y;return s&&r},BQ:function(t){t=T.cQ(t);var i=this.min,n=this.max,e=t.min,o=t.max,s=o.x>i.x&&e.xi.y&&e.y0&&new RegExp("(^|\\s)"+i+"(\\s|$)").test(n)},Rq:function(t,i){if(void 0!==t.classList)for(var n=T.S.j(i),e=0,o=n.length;e=e.lat&&n.lat<=o.lat&&i.lng>=e.lng&&n.lng<=o.lng},intersects:function(t){t=T.jq(t);var i=this.kq,n=this.Lq,e=t.getSouthWest(),o=t.getNorthEast(),s=o.lat>=i.lat&&e.lat<=n.lat,r=o.lng>=i.lng&&e.lng<=n.lng;return s&&r},BQ:function(t){t=T.jq(t);var i=this.kq,n=this.Lq,e=t.getSouthWest(),o=t.getNorthEast(),s=o.lat>i.lat&&e.lati.lng&&e.lngthis.options.maxZoom?this.setZoom(t):(this.wQ("maxzoom",{minZoom:this.options.minZoom,maxZoom:this.options.maxZoom}),this)},Ew:function(t,i){this.ew=!0;var n=this.getCenter(),e=this.Rw(n,this.fW,T.jq(t));return n.equals(e)||this.panTo(e,i),this.ew=!1,this},rw:function(t){if(!this.CW)return this;t=T.extend({Tw:!1,qw:!0},t===!0?{Tw:!0}:t);var i=this.getSize();this.kW=!0,this.tw=null;var n=this.getSize(),e=i.dQ(2).hQ(),o=n.dQ(2).hQ(),s=e.sQ(o);return s.x||s.y?(t.Tw&&t.qw?this.panBy(s):(t.qw&&this.Ww(s),this.wQ("move"),t.Yw?(clearTimeout(this.Uw),this.Uw=setTimeout(T.D(this.wQ,this,"moveend"),200)):this.wQ("moveend")),this.wQ("resize",{oldSize:i,newSize:n})):this},checkResize:function(){this.rw()},uw:function(){return this.setZoom(this.GW(this.fW)),this.options.AW||this.wQ("viewreset"),this.Iw()},iw:function(t,i){if(!i)return this;var n=this[t]=new i(this);return this.HW.push(n),this.options[t]&&n.enable(),this},Qq:function(){this.FW(!0);try{delete this.Ow._tdt}catch(AO){this.Ow._tdt=void 0}T._Q.Qq(this.ow),this.Pw&&this.Pw(),this.pw(),this.CW&&this.wQ("unload");for(var t in this.hW)this.hW[t].Qq();return this},Aw:function(t,i){var n="tdt-pane"+(t?" tdt-"+t.replace("Pane","")+"-pane":""),e=T._Q.s("div",n,i||this.ow);return t&&(this.aw[t]=e),e},getCenter:function(){return this.Sw(),this.tw&&!this.sw()?this.tw:this.Dw(this.dw())},getZoom:function(){return this.fW},getBounds:function(){var t=this.Fw(),i=this._q(t.CQ()),n=this._q(t.VQ());return new T.Kq(i,n)},getMinZoom:function(){return void 0===this.options.minZoom?this.fw||0:this.options.minZoom},getMaxZoom:function(){return void 0===this.options.maxZoom?void 0===this.Gw?1/0:this.Gw:this.options.maxZoom},nW:function(t,i,n){t=T.jq(t),n=T.SQ(n||[0,0]);var e=this.getZoom()||0,o=this.getMinZoom(),s=this.getMaxZoom(),r=t.Zq(),h=t.cq(),a=this.getSize().sQ(n),u=this.nq(h,e).sQ(this.nq(r,e)),c=T.oQ.any3d?this.options.AW:1,l=Math.min(a.x/u.x,a.y/u.y);return e=this.gw(l,e),c&&(e=Math.round(e/(c/100))*(c/100),e=i?Math.ceil(e/c)*c:Math.floor(e/c)*c),Math.max(o,Math.min(s,e))},getSize:function(){return this.Hw&&!this.kW||(this.Hw=new T.Point(this.Ow.clientWidth,this.Ow.clientHeight),this.kW=!1),this.Hw.pQ()},Fw:function(t,i){var n=this.hw(t,i);return new T.ZQ(n,n.AQ(this.getSize()))},Jw:function(){return this.Sw(),this.jw},Kw:function(t){return this.options.IW.eW(void 0===t?this.getZoom():t)},getPane:function(t){return"string"==typeof t?this.aw[t]:t},getPanes:function(){return this.aw},getContainer:function(){return this.Ow},cW:function(t,i){var n=this.options.IW;return i=void 0===i?this.fW:i,n.scale(t)/n.scale(i)},gw:function(t,i){var n=this.options.IW;return i=void 0===i?this.fW:i,n.zoom(t*n.scale(i+T.gq.EW))},setCrs:function(t){if(t==this.getCode())return!1;var i=this.getCenter();"EPSG:900913"==t?(this.options.IW=T.gq.UW,this.SW=t,T.gq.EW=0):(this.options.IW=T.gq.uW,this.SW=t,T.gq.EW=1),this.setMapType(this.getMapType()),this.ZW(i,this.getZoom())},switchingMaps:function(t){this.setCrs(t)},nq:function(t,i){return i=void 0===i?this.fW:i,this.options.IW.qW(T.fq(t),i)},_q:function(t,i){return i=void 0===i?this.fW:i,this.options.IW.wW(T.SQ(t),i)},Dw:function(t){var i=T.SQ(t).AQ(this.Jw());return this._q(i)},kw:function(t){var i=this.nq(T.fq(t)).JQ();return i.DQ(this.Jw())},layerPointToLngLat:function(t){return this.Dw(t)},lngLatToLayerPoint:function(t){return this.kw(t)},hq:function(t){return this.options.IW.hq(T.fq(t))},distance:function(t,i){return this.options.IW.distance(T.fq(t),T.fq(i))},getDistance:function(t,i){return this.distance(t,i)},Lw:function(t){return T.SQ(t).sQ(this.lw())},Zw:function(t){return T.SQ(t).AQ(this.lw())},vW:function(t){var i=this.Lw(T.SQ(t));return this.Dw(i)},BW:function(t){return this.Zw(this.kw(T.fq(t)))},containerPointToLngLat:function(t){return this.vW(t)},lngLatToContainerPoint:function(t){return this.BW(t)},Cw:function(t){return T.oq.Vw(t,this.Ow)},cw:function(t){return this.Lw(this.Cw(t))},Bw:function(t){return this.Dw(this.cw(t))},sW:function(t){var i=this.Ow=T._Q.mQ(t);i&&i._tdt,T.oq.addListener(i,"scroll",this.vw,this),i._tdt=!0},DW:function(){var t=this.Ow;this.Nw=this.options.OW&&T.oQ.any3d,T._Q.Rq(t,"tdt-container"+(T.oQ.touch?" tdt-touch":"")+(T.oQ.retina?" tdt-retina":"")+(T.oQ.ielt9?" tdt-oldie":"")+(T.oQ.safari?" tdt-safari":"")+(this.Nw?" tdt-fade-anim":""));var i=T._Q.getStyle(t,"position");"absolute"!==i&&"relative"!==i&&"fixed"!==i&&(t.style.position="relative"),this.bw(),this.Mw&&this.Mw()},bw:function(){var t=this.aw={};this.nw={},this.ow=this.Aw("mapPane",this.Ow),T._Q.setPosition(this.ow,new T.Point(0,0)),this.Aw("tilePane"),this.Aw("_w"),this.Aw("overlayPane"),this.Aw("markerPane"),this.Aw("infoWindowPane"),this.options.PW||(T._Q.Rq(t.markerPane,"tdt-zoom-hide"),T._Q.Rq(t._w,"tdt-zoom-hide"))},ZW:function(t,i){T._Q.setPosition(this.ow,new T.Point(0,0));var n=!this.CW;this.CW=!0,i=this.GW(i),this.wQ("viewprereset");var e=this.fW!==i;this.qE(e).QE(t,i).mw(e),this.wQ("viewreset"),n&&this.wQ("load")},qE:function(t){return t&&this.wQ("zoomstart"),this.wQ("movestart")},QE:function(t,i,n){void 0===i&&(i=this.fW);var e=this.fW!==i;return this.fW=i,this.tw=t,this.jw=this.WE(t),(e||n&&n.pinch)&&this.wQ("zoom",n),this.wQ("move",n)},mw:function(t){return t&&this.wQ("zoomend"),this.wQ("moveend")},Iw:function(){return T.S.V(this.wE),this.EE&&this.EE.uw(),this},Ww:function(t){T._Q.setPosition(this.ow,this.lw().sQ(t))},eE:function(){return this.getMaxZoom()-this.getMinZoom()},ww:function(){this.ew||this.Ew(this.options.maxBounds)},Sw:function(){!this.CW},FW:function(t){if(T.oq){this.RE={},this.RE[T.d(this.Ow)]=this;var i=t?"off":"on";T.oq[i](this.Ow,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress",this.rE,this),this.options.oW&&T.oq[i](window,"resize",this.dW,this),T.oQ.any3d&&this.options.pW&&this[i]("moveend",this.TE)}},dW:function(){T.S.V(this.tE),this.tE=T.S.C(function(){this.rw({Yw:!0})},this)},vw:function(){this.Ow.scrollTop=0,this.Ow.scrollLeft=0},TE:function(){var t=this.lw();Math.max(Math.abs(t.x),Math.abs(t.y))>=this.options.pW&&this.ZW(this.getCenter(),this.getZoom())},YE:function(t,i){for(var n,e=[],o="mouseout"===i||"mouseover"===i,s=t.target||t.srcElement,r=!1;s;){if(n=this.RE[T.d(s)],n&&("click"===i||"UE"===i)&&!t.uE&&this.IE(n)){r=!0;break}if(n&&n.EQ(i,!0)){if(o&&!T.oq.iE(s,t))break;if(e.push(n),o)break}if(s===this.Ow)break;s=s.parentNode}return e.length||r||o||!T.oq.iE(s,t)||(e=[this]),e},rE:function(t){if(this.CW&&!T.oq.OE(t)){var i="keypress"===t.type&&13===t.keyCode?"click":t.type;"mousedown"===i&&T._Q.Sq(t.target||t.srcElement),this.oE(t,i)}},oE:function(t,i,n){if("click"===t.type){var e=T.S.extend({},t);e.type="UE",this.oE(e,e.type,n)}if(!t._stopped&&(n=(n||[]).concat(this.YE(t,i)),n.length)){var o=n[0];"contextmenu"===i&&o.EQ(i,!0)&&T.oq.preventDefault(t);var s={originalEvent:t};if("keypress"!==t.type){var r=o instanceof T.Marker;s.containerPoint=r?this.BW(o.PE()):this.Cw(t),s.layerPoint=this.Lw(s.containerPoint),s.lnglat=r?o.PE():this.Dw(s.layerPoint)}for(var h=0;h0?Math.round(t-i)/2:Math.max(0,Math.ceil(t))-Math.max(0,Math.floor(i))},GW:function(t){var i=this.getMinZoom(),n=this.getMaxZoom(),e=T.oQ.any3d?this.options.AW:1;return e&&(t=Math.round(t/e)*e),Math.max(i,Math.min(n,t))},enableAutoResize:function(){this.options.oW=!0,T.oq.on(window,"resize",this.dW,this)},disableAutoResize:function(){this.options.oW=!1,T.oq.off(window,"resize",this.dW,this)},getOverlays:function(){var t=[];for(var i in this.hW)"undefined"!=typeof this.hW[i].options.type&&t.push(this.hW[i]);return t},setStyle:function(t){t=t||"black","black"==t?this.Ow.style.backgroundColor="#000000":this.Ow.style.backgroundColor="#466399",this.defaultMapType.getLayers()[0].on("tileload",function(t){T._Q.Rq(t.tile,"tdtTileImage")}),this.defaultMapType.getLayers()[1].on("tileload",function(t){T._Q.Rq(t.tile,"tdtTileImage")}),this.ZW(this.getCenter(),this.getZoom())},removeStyle:function(){this.Ow.style.backgroundColor="",this.defaultMapType.getLayers()[0].off("tileload"),this.defaultMapType.getLayers()[1].off("tileload"),this.ZW(this.getCenter(),this.getZoom())}}),T.gE=function(t,i){return new T.Map(t,i)},T.HE=T.m.extend({options:{hE:"overlayPane",pE:[]},addTo:function(t){return t.addLayer(this),this},Qq:function(){return this.JE(this.jE||this.KE)},JE:function(t){return t&&t.removeLayer(this),this},getPane:function(t){return this.jE.getPane(t?this.options[t]||t:this.options.hE)},kE:function(t){return this.jE.RE[T.d(t)]=this,this},LE:function(t){return delete this.jE.RE[T.d(t)],this},lE:function(t){var i=t.target;if(i.hasLayer(this)){if(this.jE=i,this.ZE=i.ZE,this.CE){var n=this.CE();i.on(n,this),this.rQ("remove",function(){i.off(n,this)},this)}this.onAdd(i),this.VE&&this.jE.cE&&this.jE.cE.BE(this.VE()),this.wQ("AQ"),i.wQ("layeradd",{layer:this})}}}),T.Map.M({addLayer:function(t){var i=T.d(t);return this.hW[i]?this:(this.hW[i]=t,"undefined"!=typeof this.hW[i].options.type&&this.JW.push(this.hW[i]),t.KE=this,t.vE&&t.vE(this),this.sE(t.lE,t),this)},removeLayer:function(t){var i=T.d(t);return this.hW[i]?(this.CW&&t.onRemove(this),t.VE&&this.cE&&this.cE.NE(t.VE()),delete this.hW[i],this.CW&&(this.wQ("layerremove",{layer:t}),t.wQ("remove")),t.jE=t.KE=null,this):this},getLayers:function(){var t=[];for(layer in this.hW)"function"==typeof this.hW[layer].getTileUrl&&"tilePane"==this.hW[layer].options.hE&&t.push(this.hW[layer]);return t},clearLayers:function(){for(var t=0;t=0;t--)this.jW.splice(t,1);return this},addOverLay:function(t){this.addLayer(t),this.wQ("addoverlay",{addoverlay:t})},removeOverLay:function(t){this.removeLayer(t),this.wQ("removeoverlay",{removeoverlay:t})},clearOverLays:function(){for(var t=0;t1e-7;a++)i=s*Math.sin(h),i=Math.pow((1-i)/(1+i),s/2),u=Math.PI/2-2*Math.atan(r*i)-h,h+=u;return new T.dq(h*n,t.x*n/e)}},T.gq.ee=T.extend({},T.gq.Gq,{code:"Re",projection:T.bq.we,WW:function(){var t=.5/(Math.PI*T.bq.we.R);return new T.NQ(t,.5,-t,.5)}()}),T.re=T.HE.extend({options:{hE:"tilePane",Te:256,opacity:1,zIndex:1,te:T.oQ.mobile,updateWhenZooming:!0,Ye:200,Ue:null,bounds:null,minZoom:0,maxZoom:void 0,ue:!1,className:"",keepBuffer:2},initialize:function(t){t=T.setOptions(this,t)},onAdd:function(){this.sW(),this.Ie={},this.ie={},this.ZW(),this.Oe()},vE:function(t){t.ME(this)},onRemove:function(t){this.oe(),T._Q.Qq(this.Ow),t._E(this),this.Ow=null,this.Pe=null},pe:function(){return this.jE&&(T._Q.Wq(this.Ow),this.Ae(Math.max)),this},ae:function(){return this.jE&&(T._Q.wq(this.Ow),this.Ae(Math.min)),this},VE:function(){return this.options.Ue},getContainer:function(){return this.Ow},setOpacity:function(t){return this.options.opacity=t,this.Se(),this},setZIndex:function(t){return this.options.zIndex=t,this.se(),this},De:function(){return this.de},redraw:function(){return this.jE&&(this.oe(),this.Oe()),this},refresh:function(){this.redraw()},CE:function(){var t={viewprereset:this.Fe,viewreset:this.ZW,zoom:this.ZW,moveend:this.TE};return this.options.te||(this.fe||(this.fe=T.S.G(this.TE,this.options.Ye,this)),t.move=this.fe),this.ZE&&(t.Ge=this.ge),t},He:function(){return document.createElement("div")},he:function(){var t=this.options.Te;return t instanceof T.Point?t:new T.Point(t,t)},se:function(){this.Ow&&void 0!==this.options.zIndex&&null!==this.options.zIndex&&(this.Ow.style.zIndex=this.options.zIndex)},Ae:function(t){for(var i,n=this.getPane().children,e=-t(-(1/0),1/0),o=0,s=n.length;othis.options.maxZoom||ne&&this.Ve(o,s,r,e))},ce:function(t,i,n,e){for(var o=2*t;o<2*t+2;o++)for(var s=2*i;s<2*i+2;s++){var r=new T.Point(o,s);r.z=n+1;var h=this.ve(r),a=this.ie[h];a&&a.active?a.retain=!0:(a&&a.loaded&&(a.retain=!0),n+1this.options.maxZoom||void 0!==this.options.minZoom&&o1)return void this.be(t,n);for(var l=o.min.y;l<=o.max.y;l++)for(var f=o.min.x;f<=o.max.x;f++){var d=new T.Point(f,l);if(d.z=this.Pe,this.rR(d)){var p=this.ie[this.ve(d)];p?p.Je=!0:r.push(d)}}if(r.sort(function(t,i){return t.distanceTo(s)-i.distanceTo(s)}),0!==r.length){this.de||(this.de=!0,this.wQ("loading"));var m=document.createDocumentFragment();for(f=0;fn.max.x)||!i.wrapLat&&(t.yn.max.y))return!1}if(!this.options.bounds)return!0;var e=this.tR(t);return T.jq(this.options.bounds).BQ(e)},YR:function(t){return this.tR(this.UR(t))},tR:function(t){var i=this.jE,n=this.he(),e=t.gQ(n),o=e.AQ(n),s=i.hq(i._q(e,t.z)),r=i.hq(i._q(o,t.z));return new T.Kq(s,r)},ve:function(t){return t.x+":"+t.y+":"+t.z},UR:function(t){var i=t.split(":"),n=new T.Point(+i[0],+i[1]);return n.z=+i[2],n},Be:function(t){var i=this.ie[t];i&&(T._Q.Qq(i.el),delete this.ie[t],this.wQ("tileunload",{tile:i.el,coords:this.UR(t)}))},uR:function(t){T._Q.Rq(t,"tdt-tile");var i=this.he();t.style.width=i.x+"px",t.style.height=i.y+"px",t.onselectstart=T.S.H,t.onmousemove=T.S.H,T.oQ.ielt9&&this.options.opacity<1&&T._Q.setOpacity(t,this.options.opacity),T.oQ.android&&!T.oQ.android23&&(t.style.WebkitBackfaceVisibility="hidden")},TR:function(t,i){var n=this.IR(t),e=this.ve(t),o=this.He(this.iR(t),T.D(this.OR,this,t));this.uR(o),this.He.length<2&&T.S.C(T.D(this.OR,this,t,null,o)),T._Q.setPosition(o,n),this.ie[e]={el:o,coords:t,Je:!0},i.appendChild(o),this.wQ("tileloadstart",{tile:o,coords:t})},OR:function(t,i,n){if(this.jE){i&&this.wQ("tileerror",{error:i,tile:n,coords:t});var e=this.ve(t);n=this.ie[e],n&&(n.loaded=+new Date,this.jE.Nw?(T._Q.setOpacity(n.el,0),T.S.V(this.ke),this.ke=T.S.C(this.Se,this)):(n.active=!0,this.Ke()),T._Q.Rq(n.el,"tdt-tile-loaded"),this.wQ("tileload",{tile:n.el,coords:t}),this.oR()&&(this.de=!1,this.wQ("load"),T.oQ.ielt9||!this.jE.Nw?T.S.C(this.Ke,this):setTimeout(T.D(this.Ke,this),250)))}},IR:function(t){return t.gQ(this.he()).sQ(this.Ce.origin)},iR:function(t){var i=new T.Point(this.WR?T.S.g(t.x,this.WR):t.x,this.wR?T.S.g(t.y,this.wR):t.y);return i.z=t.z,i},qR:function(t){var i=this.he();return new T.ZQ(t.min.HQ(i).jQ(),t.max.HQ(i).kQ().sQ([1,1]))},oR:function(){for(var t in this.ie)if(!this.ie[t].loaded)return!1;return!0}}),T.PR=function(t){return new T.re(t)},T.TileLayer=T.re.extend({options:{minZoom:0,maxZoom:18,pR:"abc",errorTileUrl:"",AR:0,aR:null,SR:!1,sR:!1,DR:!1,dR:!1},initialize:function(t,i){this.FR="",t&&(this.FR=t),i=T.setOptions(this,i),i.DR&&T.oQ.retina&&i.maxZoom>0&&(i.Te=Math.floor(i.Te/2),i.sR?(i.AR--,i.minZoom++):(i.AR++,i.maxZoom--),i.minZoom=Math.max(0,i.minZoom)),"string"==typeof i.pR&&(i.pR=i.pR.split("")),T.oQ.android||this.on("tileunload",this.fR)},setUrl:function(t,i){return this.FR=t,i||this.redraw(),this},He:function(t,i){var n=document.createElement("img");return T.oq.on(n,"load",T.D(this.GR,this,i,n)),T.oq.on(n,"error",T.D(this.gR,this,i,n)),this.options.dR&&(n.dR=""),n.Fq="",n.src=this.getTileUrl(t),n},getTileUrl:function(t){var i={r:T.oQ.retina?"@2x":"",s:this.HR(t),x:t.x,y:t.y,z:this.hR()};if(this.jE&&!this.jE.options.IW.RW){var n=this.QR.max.y-t.y;this.options.SR&&(i.y=n),i["-y"]=n}return this._url_temp=this.FR,T.S.k(this._url_temp,T.extend(i,this.options))},GR:function(t,i){T.oQ.ielt9?setTimeout(T.D(t,this,null,i),0):t(null,i)},gR:function(t,i,n){var e=this.options.errorTileUrl;e&&(i.src=e),t(n,i)},he:function(){var t=this.jE,i=T.re.prototype.he.call(this),n=this.Pe+this.options.AR,e=this.options.aR;return null!==e&&n>e?i.dQ(t.cW(e,n)).hQ():i},fR:function(t){t.tile.onload=null},hR:function(){var t=this.options,i=this.Pe;return t.sR&&(i=t.maxZoom-i),i+=t.AR,null!==t.aR?Math.min(i,t.aR):i},HR:function(t){var i=Math.abs(t.x+t.y)%this.options.pR.length;return this.options.pR[i]},Me:function(){var t,i;for(t in this.ie)this.ie[t].coords.z!==this.Pe&&(i=this.ie[t].el,i.onload=T.S.H,i.onerror=T.S.H,i.complete||(i.src=T.S.Z,T._Q.Qq(i)))}}),T.JR=function(t,i){return new T.TileLayer(t,i)},T.TileLayer.WMS=T.TileLayer.extend({defaultWmsParams:{service:"WMS",request:"GetMap",version:"1.1.1",layers:"",styles:"",format:"image/jpeg",transparent:!1},options:{IW:null,srs:null,jR:!1},initialize:function(t,i){this.FR=t;var n=T.extend({},this.defaultWmsParams);for(var e in i)e in this.options||(n[e]=i[e]);i=T.setOptions(this,i),this.wmsSrs="EPSG:900913",i.srs?"EPSG:4326"==i.srs?(i.IW=T.gq.uW,this.wmsSrs="EPSG:4326"):(i.IW=T.gq.UW,i.srs="EPSG:900913",this.wmsSrs="EPSG:900913"):i.srs=this.wmsSrs,n.width=n.height=i.Te*(i.DR&&T.oQ.retina?2:1),this.KR=n},onAdd:function(t){this.kR=this.options.IW||t.options.IW,this.LR=parseFloat(this.KR.version);var i=this.LR>=1.3?"IW":"srs";this.KR[i]=this.kR.code,T.TileLayer.prototype.onAdd.call(this,t)},getTileUrl:function(t){var i=this.tR(t),n=this.kR.nq(i.Zq()),e=this.kR.nq(i.cq()),o=(this.LR>=1.3&&this.kR===T.gq.uW?[e.y,n.x,n.y,e.x]:[n.x,e.y,e.x,n.y]).join(","),s=T.TileLayer.prototype.getTileUrl.call(this,t);return s+T.S.K(this.KR,s,this.options.jR)+(this.options.jR?"&BBOX=":"&bbox=")+o},setParams:function(t,i){return T.extend(this.KR,t),i||this.redraw(),this}}),T.JR.wms=function(t,i){return new T.TileLayer.WMS(t,i)},T.TileLayer.TDT=T.TileLayer.extend({}),T.JR.tdt=function(t,i){return new T.TileLayer.tdt(t,i)},T.lR={ZR:"202206011524",CR:function(t,i,n){if(window.localStorage){var e,o=localStorage.getItem(t);null==o||0==o.length||this.ZR!=localStorage.getItem("TDT_version")?(document.write(''),window.ActiveXObject?e=new ActiveXObject("Microsoft.XMLHTTP"):window.XMLHttpRequest&&(e=new XMLHttpRequest),null!=e&&(e.open("GET",i),e.send(null),e.onreadystatechange=function(){4==e.readyState&&200==e.status&&(o=e.responseText,localStorage.setItem(t,o),localStorage.setItem("TDT_version",T.lR.ZR),null!=n&&n())})):(T.lR.VR(o),null!=n&&n())}else T.lR.cR(i)},BR:function(t,i){if(T.oQ.ie8)return T.lR.vR(i),!1;if(window.localStorage){var n,e=localStorage.getItem(t);null==e||0==e.length||this.ZR!=localStorage.getItem("TDT_version")?(window.ActiveXObject?n=new ActiveXObject("Microsoft.XMLHTTP"):window.XMLHttpRequest&&(n=new XMLHttpRequest),null!=n&&(n.open("GET",i),n.send(null),n.onreadystatechange=function(){4==n.readyState&&200==n.status&&(e=n.responseText,localStorage.setItem(t,e),localStorage.setItem("TDT_version",T.lR.ZR),e=null==e?"":e,T.lR.NR(e))})):T.lR.NR(e)}else T.lR.vR(i)},VR:function(t){var i=document.getElementsByTagName("HEAD").item(0),n=document.createElement("script");n.type="text/javascript",n.text=t,i.appendChild(n)},NR:function(t){var i=document.getElementsByTagName("HEAD").item(0),n=document.createElement("style");n.type="text/css",n.styleSheet?n.styleSheet.cssText=t:n.innerHTML=t,i.appendChild(n)},cR:function(t){var i=document.getElementsByTagName("HEAD").item(0),n=document.createElement("script");n.type="text/javascript",n.src=t,i.appendChild(n)},vR:function(t){var i=document.getElementsByTagName("HEAD").item(0),n=document.createElement("link");n.type="text/css",n.rel="stylesheet",n.href=t,i.appendChild(n)},bR:function(t,i){var n=document.createElement("script");i&&(n.onload=n.onreadystatechange=function(){this.readyState&&"loaded"!=this.readyState&&"complete"!==this.readyState||(n.onload=n.onreadystatechange=null,i())});var e=document.getElementsByTagName("head")[0];n.type="text/javascript",n.src=t,e.appendChild(n)},onLoadJsCallBack:function(t){var i=T.ScriptLoader.getObject();i.load(t,"UTF-8",this,function(){i=null,delete i})},MR:function(t,i){if(T.oQ.ie8)return T.lR.vR(i),!1;if(window.localStorage){var n=localStorage.getItem(t);null==n||0==n.length||this.ZR!=localStorage.getItem("TDT_version")?(T.lR.vR(i),i.indexOf("tianditu4.0")!=-1&&(i=T.w.E+"/api?v=4.0&name=tianditu4.0"),T.lR.bR(i,function(){T.ObjectData&&(n=T.ObjectData),localStorage.setItem(t,n),localStorage.setItem("TDT_version",T.lR.ZR),T.ObjectData=null})):T.lR.NR(n)}},nR:function(t,i){if(T.oQ.ie8)return document.write(''),!1;if(window.localStorage){var n=localStorage.getItem(t);null==n||0==n.length||this.ZR!=localStorage.getItem("TDT_version")?(T.lR.cR(i),i.indexOf("components")!=-1&&(i=T.w.E+"/api?v=4.0&name=components&tk="+T.w.TMAP_AUTHKEY),i.indexOf("service")!=-1&&(i=T.w.E+"/api?v=4.0&name=service&tk="+T.w.TMAP_AUTHKEY),i.indexOf("military")!=-1&&(i=T.w.E+"/api?v=4.0&name=military&tk="+T.w.TMAP_AUTHKEY),T.lR.bR(i,function(){T.ObjectData&&(n=T.ObjectData),localStorage.setItem(t,n),localStorage.setItem("TDT_version",T.lR.ZR),T.ObjectData=null})):T.lR.VR(n)}}},T.qv=function(t){if(t&&0!==t.code){T={};var i="天地图密钥错误,可能是因为您提供的Key不是有效的天地图开放平台Key,或此Key未对本应用授予JavaScriptAPI权限。您可以访问如下网址了解如何获得有效的Key:http://console.tianditu.com/api/key";alert(i)}},T._R=T.HE.extend({options:{opacity:1,Fq:"",mR:!1,Ue:null,dR:!1},initialize:function(t,i,n){this.FR=t,this.Qr=T.jq(i),T.setOptions(this,n)},onAdd:function(){this.qr||(this.Wr(),this.options.opacity<1&&this.Se()),this.options.mR&&(T._Q.Rq(this.qr,"tdt-interactive"),this.kE(this.qr)),this.getPane().appendChild(this.qr),this.wr()},onRemove:function(){T._Q.Qq(this.qr),this.options.mR&&this.LE(this.qr)},setOpacity:function(t){return this.options.opacity=t,this.qr&&this.Se(),this},setStyle:function(t){return t.opacity&&this.setOpacity(t.opacity),this},pe:function(){return this.jE&&T._Q.Wq(this.qr),this},ae:function(){return this.jE&&T._Q.wq(this.qr),this},setUrl:function(t){return this.FR=t,this.qr&&(this.qr.src=t),this},setBounds:function(t){return this.Qr=t,this.jE&&this.wr(),this},VE:function(){return this.options.Ue},CE:function(){var t={zoom:this.wr,viewreset:this.wr};return this.ZE&&(t.Ge=this.ge),t},getBounds:function(){return this.Qr},getElement:function(){return this.qr},Wr:function(){var t=this.qr=T._Q.s("img","tdt-image-layer "+(this.ZE?"tdt-zoom-animated":""));t.onselectstart=T.S.H,t.onmousemove=T.S.H,t.onload=T.D(this.wQ,this,"load"),this.options.dR&&(t.dR=""),t.src=this.FR,t.Fq=this.options.Fq},ge:function(t){var i=this.jE.cW(t.zoom),n=this.jE.DE(this.Qr.Zq(),t.zoom,t.center);T._Q.Uq(this.qr,n,i)},wr:function(){var t=this.qr,i=new T.ZQ(this.jE.kw(this.Qr.Zq()),this.jE.kw(this.Qr.cq())),n=i.getSize();T._Q.setPosition(t,i.min),t.style.width=n.x+"px",t.style.height=n.y+"px"},Se:function(){T._Q.setOpacity(this.qr,this.options.opacity)}}),T.Er=function(t,i,n){return new T._R(t,i,n)},T.Icon=T.c.extend({initialize:function(t){T.setOptions(this,t)},setIconUrl:function(t){this.options.iconUrl=t,this.img&&(this.img.src=t)},getIconUrl:function(t){if(this.img)return this.img.src},setIconSize:function(t){this.options.iconSize=t,this.img&&(this.img.style.width=t.x+"px",this.img.style.height=t.y+"px")},getIconSize:function(){return this.options.iconSize},setIconAnchor:function(t){this.options.iconAnchor=t,this.er(this.img,"icon")},getIconAnchor:function(t){return this.options.iconAnchor},Rr:function(t){return this.rr("icon",t)},Tr:function(t){return this.rr("shadow",t)},rr:function(t,i){var n=this.tr(t);return n?(this.img=this.Yr(n,i&&"IMG"===i.tagName?i:null),this.er(this.img,t),this.img):null},er:function(t,i){var n=this.options,e=n[i+"Size"];T.S.l(e)||e instanceof T.Point||(e=[e,e]);var o=T.SQ(e),s=T.SQ("shadow"===i&&n.Ur||n.iconAnchor||o&&o.dQ(2,!0));t.className="tdt-marker-"+i+" "+(n.className||""),s&&(t.style.marginLeft=-s.x+"px",t.style.marginTop=-s.y+"px"),o&&(t.style.width=o.x+"px",t.style.height=o.y+"px")},Yr:function(t,i){return i=i||document.createElement("img"),i.src=t,i},tr:function(t){return T.oQ.retina&&this.options[t+"RetinaUrl"]||this.options[t+"Url"]}}),T.ur=function(t){return new T.Icon(t)},T.Icon.Default=T.Icon.extend({options:{iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-41],shadowSize:[41,41]},tr:function(t){var i=t+"Url";if(this.options[i])return this.options[i];var n=T.Icon.Default.imagePath;return n+"/marker-"+t+(T.oQ.retina&&"icon"===t?"-2x":"")+".png"}}),T.Icon.Default.imagePath=function(){var t,i,n,e,o=document.getElementsByTagName("script"),s=/[\/^]tdt[\-\._]?([\w\-\._]*)\.js\??/;for(t=0,i=o.length;to?(i.height=o+"px",T._Q.Rq(t,s)):T._Q.Tq(t,s),this.PT=this.Ow.offsetWidth},WT:function(){if(this.jE){var t=this.jE.kw(this.or),i=T.SQ(this.options.offset),n=this._getAnchor();this.ZE?T._Q.setPosition(this.Ow,t.AQ(n)):i=i.AQ(t).AQ(n);var e=this.pT=-i.y,o=this.AT=-Math.round(this.PT/2)+i.x;this.Ow.style.bottom=e+"px",this.Ow.style.left=o+"px"}},ge:function(t){var i=this.jE.DE(this.or,t.zoom,t.center),n=this._getAnchor();T._Q.setPosition(this.Ow,i.AQ(n))},wT:function(){if(!(!this.options.autoPan||this.jE.EE&&this.jE.EE.aT)){var t=this.jE,i=this.Ow.offsetHeight,n=this.PT,e=new T.Point(this.AT,-i-this.pT);this.ZE&&e.aQ(T._Q.getPosition(this.Ow));var o=t.Zw(e),s=T.SQ(this.options.autoPanPadding),r=T.SQ(this.options.Vr||s),h=T.SQ(this.options.cr||s),a=t.getSize(),u=0,c=0;o.x+n+h.x>a.x&&(u=o.x+n-a.x+h.x),o.x-u-r.x<0&&(u=o.x-r.x),o.y+i+h.y>a.y&&(c=o.y+i-a.y+h.y),o.y-c-r.y<0&&(c=o.y-r.y),(u||c)&&t.wQ("ST").panBy([u,c])}},YT:function(t){this.rT(),T.oq.uw(t)},_getAnchor:function(){return T.SQ(this.br&&this.br.sT?this.br.sT():[0,0])}}),T._r=function(t,i){return new T.Zr(t,i)},T.Map.M({QT:function(t,i,n){return t instanceof T.Zr||(t=new T.Zr(n).setContent(t)),i&&t.sr(i),this.hasLayer(t)?this:(this.Dr&&this.Dr.options.Br&&this.TT(),this.Dr=t,this.addLayer(t))},openInfoWindow:function(t,i,n){this.QT(t,i,n)},closeInfoWindow:function(t){this.TT(t)},TT:function(t){return t&&t!==this.Dr||(t=this.Dr,this.Dr=null),t&&this.removeLayer(t),this},closeInfoWindow:function(t){this.TT(t)}}),T.HE.M({dr:function(t,i){return t instanceof T.Zr?(T.setOptions(t,i),this.Dr=t,t.br=this):(this.Dr&&!i||(this.Dr=new T.Zr(i,this)),this.Dr.setContent(t)),this.DT||(this.on({Qq:this.TT,move:this.dT}),this.DT=!0),this},FT:function(){return this.Dr&&(this.off({Qq:this.TT,move:this.dT}),this.DT=!1,this.Dr=null),this},openInfoWindow:function(t,i){this.QT(),this.Pr||(this.Pr=this.dr(t,i),this.QT())},closeInfoWindow:function(){this.TT()},QT:function(t,i){if(t instanceof T.HE||(i=t,t=this),t instanceof T.fT)for(var n in this.hW){t=this.hW[n];break}return i||(i=t.getCenter?t.getCenter():t.PE()),this.Dr&&this.jE&&(this.Dr.br=t,this.Dr.update(),this.jE.QT(this.Dr,i)),this},TT:function(){return this.Dr&&this.Dr.rT(),this},GT:function(t){return this.Dr&&(this.Dr.jE?this.TT():this.QT(t)),this},gT:function(){return this.Dr.isOpen()},isOpen:function(){this.gT()},HT:function(t){return this.Dr&&this.Dr.setContent(t),this},hT:function(){return this.Dr},JT:function(t){var i=t.layer||t.target;if(this.Dr&&this.jE)return T.oq.uw(t),i instanceof T.jT?void this.QT(t.layer||t.target,t.KT):void(this.jE.hasLayer(this.Dr)&&this.Dr.br===i?this.TT():this.QT(i,t.KT))},dT:function(t){this.Dr.sr(t.KT)}}),T.Marker.M({sT:function(){return this.options.icon.options.popupAnchor||(this.options.icon.options.iconAnchor?T.S.l(this.options.icon.options.iconAnchor)?this.options.icon.options.popupAnchor=[0,-this.options.icon.options.iconAnchor[1]]:this.options.icon.options.popupAnchor=[0,-this.options.icon.options.iconAnchor.y]:this.options.icon.options.popupAnchor=[0,0]),this.options.icon.options.popupAnchor}}),T.InfoWindow=T.Zr.extend({options:{type:3},initialize:function(t,i,n){this.ET=t,T.setOptions(this,i),this.br=n},getType:function(){return this.options.type},setMinWidth:function(t){this.options.minWidth=t,this.update()},setMaxWidth:function(t){this.options.Cr=t,this.update()},setMaxHeight:function(t){this.options.maxHeight=t,this.update()},setLngLat:function(t){this.sr(t)},setOffset:function(t){this.options.offset=t,this.update()},getOffset:function(){return this.options.offset},closeInfoWindow:function(){this.rT()}}),T.LayerGroup=T.HE.extend({initialize:function(t){this.hW={};var i,n;if(t)for(i=0,n=t.length;ia&&(s=r,a=h);a>n&&(i[s]=1,this.At(t,i,n,e,s),this.At(t,i,n,s,o))},it:function(t,i){for(var n=[t[0]],e=1,o=0,s=t.length;ei&&(n.push(t[e]),o=e);return oi.max.x&&(n|=2),t.yi.max.y&&(n|=8),n},at:function(t,i){var n=i.x-t.x,e=i.y-t.y;return n*n+e*e},Pt:function(t,i,n,e){var o,s=i.x,r=i.y,h=n.x-s,a=n.y-r,u=h*h+a*a;return u>0&&(o=((t.x-s)*h+(t.y-r)*a)/u,o>1?(s=n.x,r=n.y):o>0&&(s+=h*o,r+=a*o)),h=t.x-s,a=t.y-r,e?h*h+a*a:new T.Point(s,r)}},T.Polyline=T.jT.extend({options:{Ft:1,type:4,ft:!1},initialize:function(t,i){T.setOptions(this,i),this.Gt(t),this.gt="solid",this.options.lineStyle&&this.setLineStyle(this.options.lineStyle)},getType:function(){return this.options.type},Ht:function(){return this.ht},getLngLats:function(){return this.Ht()},Jt:function(t){return this.Gt(t),this.redraw()},setLngLats:function(t){this.Jt(t)},setColor:function(t){this.setStyle({color:t})},getColor:function(){return this.options.color},setWeight:function(t){this.setStyle({weight:t})},getWeight:function(){return this.options.weight},setOpacity:function(t){this.setStyle({opacity:t})},getOpacity:function(){return this.options.opacity},setLineStyle:function(t){"dashed"==t?(this.gt="dashed",T.oQ.ie8||T.oQ.ie7?this.setStyle({dashArray:"2,2"}):this.setStyle({dashArray:"4"})):(this.gt="solid",this.setStyle({dashArray:""}))},getLineStyle:function(){return this.gt},getMap:function(){return this.jE},enableEdit:function(){this.jt&&this.jt.enable()},disableEdit:function(){this.jt&&this.jt.disable()},isEditable:function(){return this.jt.aE()},Kt:function(){return!this.ht.length},kt:function(t){for(var i,n,e=1/0,o=null,s=T.ut.Pt,r=0,h=this.Lt.length;ri)return r=(e-i)/n,this.jE.Dw([s.x-r*(s.x-o.x),s.y-r*(s.y-o.y)])},getBounds:function(){return this.Qr},Zt:function(t,i){return i=i||this.Ct(),t=T.fq(t),i.push(t),this.Qr.extend(t),this.redraw()},Gt:function(t){this.Qr=new T.Kq,this.ht=this.Vt(t)},Ct:function(){return T.Polyline.ct(this.ht)?this.ht:this.ht[0]},Vt:function(t){for(var i=[],n=T.Polyline.ct(t),e=0,o=t.length;e=2&&i[0]instanceof T.dq&&i[0].equals(i[n-1])&&i.pop(),i},Gt:function(t){T.Polyline.prototype.Gt.call(this,t),T.Polyline.ct(this.ht)&&(this.ht=[this.ht])},Ct:function(){return T.Polyline.ct(this.ht[0])?this.ht[0]:this.ht[0][0]},Nt:function(){var t=this.bT.Qr,i=this.options.weight,n=new T.Point(i,i);if(t=new T.ZQ(t.min.sQ(n),t.max.AQ(n)),this.Lt=[],this.vt&&this.vt.intersects(t)){if(this.options.ft)return void(this.Lt=this.lt);for(var e,o=0,s=this.lt.length;o';var i=t.firstChild;return i.style.behavior="url(#default#VML)",i&&"object"==typeof i.adj}catch(AO){return!1}}(),T.SVG.M(T.oQ.vml?{sW:function(){this.Ow=T._Q.s("div","tdt-vml-container")},Oe:function(){this.jE.ER||T.ZT.prototype.Oe.call(this)},wt:function(t){var i=t.Ow=T.SVG.s("shape");T._Q.Rq(i,"tdt-vml-shape "+(this.options.className||"")),i.coordsize="1 1",t.Yt=T.SVG.s("path"),i.appendChild(t.Yt),this.Tt(t)},Et:function(t){var i=t.Ow;this.Ow.appendChild(i),t.options.mR&&t.kE(i)},et:function(t){var i=t.Ow;T._Q.Qq(i),t.LE(i)},Tt:function(t){var i=t._stroke,n=t._fill,e=t.options,o=t.Ow;o.stroked=!!e.stroke,o.filled=!!e.fill,e.stroke?(i||(i=t._stroke=T.SVG.s("stroke")),o.appendChild(i),i.weight=e.weight+"px",i.color=e.color,i.opacity=e.opacity,e.dashArray?i.dashStyle=T.S.l(e.dashArray)?e.dashArray.join(" "):e.dashArray.replace(/( *, *)/g," "):i.dashStyle="",i.endcap=e.Qt.replace("butt","flat"),i.joinstyle=e.qt):i&&(o.removeChild(i),t._stroke=null),e.fill?(n||(n=t._fill=T.SVG.s("fill")),o.appendChild(n),n.color=e.fillColor||e.color,n.opacity=e.fillOpacity):n&&(o.removeChild(n),t._fill=null)},TY:function(t){var i=t.eY.hQ(),n=Math.round(t.EY),e=Math.round(t.rY||n);this.iY(t,t.tY()?"M0 0":"AL "+i.x+","+i.y+" "+n+","+e+" 0,23592600")},iY:function(t,i){t.Yt.v=i},Gr:function(t){T._Q.Wq(t.Ow)},tt:function(t){T._Q.wq(t.Ow)}}:{}),T.oQ.vml&&(T.SVG.s=function(){try{return document.namespaces.AQ("lvml","urn:schemas-microsoft-com:vml"),function(t){return document.createElement("')}}catch(AO){return function(t){return document.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}}()),T.mT=T.ZT.extend({onAdd:function(){T.ZT.prototype.onAdd.call(this),this.hW=this.hW||{},this.oY()},sW:function(){var t=this.Ow=document.createElement("canvas");T.oq.on(t,"mousemove",T.S.G(this.PY,32,this),this).on(t,"click dblclick mousedown mouseup contextmenu",this.pY,this).on(t,"mouseout",this.AY,this),this.aY=t.getContext("2d")},Oe:function(){if(!this.jE.ER||!this.Qr){this.SY={},T.ZT.prototype.Oe.call(this);var t=this.Qr,i=this.Ow,n=t.getSize(),e=T.oQ.retina?2:1;T._Q.setPosition(i,t.min),i.width=e*n.x,i.height=e*n.y,i.style.width=n.x+"px",i.style.height=n.y+"px",T.oQ.retina&&this.aY.scale(2,2),this.aY.translate(-t.min.x,-t.min.y)}},wt:function(t){this._updateDashArray(t),this.hW[T.d(t)]=t},Et:T.S.H,et:function(t){t.sY=!0,this.DY(t)},rt:function(t){this.dY=t.vt,this.oY(!0),t.Rt(),t.Oe(),this.oY(),this.dY=null},Tt:function(t){this._updateDashArray(t),this.DY(t)},_updateDashArray:function(t){if(t.options.dashArray){var i,n=t.options.dashArray.split(","),e=[];for(i=0;it.y!=e.y>t.y&&t.x<(e.x-n.x)*(t.y-n.y)/(e.y-n.y)+n.x&&(u=!u);return u||T.Polyline.prototype.HY.call(this,t,!0)},T.wY.prototype.HY=function(t){return t.distanceTo(this.eY)<=this.EY+this.Ut()},T.GeoJSON=T.fT.extend({initialize:function(t,i){T.setOptions(this,i),this.hW={},t&&this.addData(t)},addData:function(t){var i,n,e,o=T.S.l(t)?t:t.features;if(o){for(i=0,n=o.length;i100&&e<500||t.target.qU&&!t.uE?void T.oq.uw(t):(T.oq.QU=n,void i(t))}},T.oq.addListener=T.oq.on,T.oq.removeListener=T.oq.off,T.nY=T.m.extend({options:{clickTolerance:3},v:{START:T.oQ.touch?["touchstart","mousedown"]:["mousedown"],END:{mousedown:"mouseup",touchstart:"touchend",pointerdown:"touchend",MSPointerDown:"touchend"},MOVE:{mousedown:"mousemove",touchstart:"touchmove",pointerdown:"touchmove",MSPointerDown:"touchmove"}},initialize:function(t,i,n){this.WU=t,this.wU=i||t,this.EU=n},enable:function(){this.eU||(T.oq.on(this.wU,T.nY.START.join(" "),this.RU,this),this.eU=!0)},disable:function(){this.eU&&(T.oq.off(this.wU,T.nY.START.join(" "),this.RU,this),this.eU=!1,this.sw=!1)},RU:function(t){if(!t.uE&&this.eU&&(this.sw=!1,!T._Q.Eq(this.WU,"tdt-zoom-anim")&&!(T.nY._dragging||t.shiftKey||1!==t.which&&1!==t.button&&!t.touches)&&this.eU&&(T.nY._dragging=!0,this.EU&&T._Q.Sq(this.WU),T._Q.Aq(),T._Q.Oq(),!this.rU))){this.wQ("down");var i=t.touches?t.touches[0]:t;this.TU=new T.Point(i.clientX,i.clientY),T.oq.on(document,T.nY.MOVE[t.type],this.fe,this).on(document,T.nY.END[t.type],this.tU,this)}},fe:function(t){if(!t.uE&&this.eU){if(t.touches&&t.touches.length>1)return void(this.sw=!0);var i=t.touches&&1===t.touches.length?t.touches[0]:t,n=new T.Point(i.clientX,i.clientY),e=n.sQ(this.TU);(e.x||e.y)&&(Math.abs(e.x)+Math.abs(e.y)50&&(this.JU.shift(),this.jU.shift())}this.jE.wQ("move",t).wQ("drag",t)},hU:function(){var t=this.jE.getSize().dQ(2),i=this.jE.kw([0,0]);this.CU=i.sQ(t).x,this.VU=this.jE.Kw().getSize().x},cU:function(t,i){return t-(t-i)*this.kU},gU:function(){if(this.kU&&this.KU){var t=this.dU.uU.sQ(this.dU.YU),i=this.KU;t.xi.max.x&&(t.x=this.cU(t.x,i.max.x)),t.y>i.max.y&&(t.y=this.cU(t.y,i.max.y)),this.dU.uU=this.dU.YU.AQ(t)}},HU:function(){var t=this.VU,i=Math.round(t/2),n=this.CU,e=this.dU.uU.x,o=(e-i+n)%t+i-n,s=(e+i+n)%t-i-n,r=Math.abs(o+n)i.getMaxZoom())&&void("center"===i.options.bU?i.setZoom(o):i.VW(t.containerPoint,o))}}),T.Map.M({enableDoubleClickZoom:function(){this.bU.enable()},disableDoubleClickZoom:function(){this.bU.disable()},isDoubleClickZoom:function(){return this.bU.eU}}),T.Map._("iw","bU",T.Map.MU),T.Map.n({_U:!0,mU:40,Qu:70}),T.Map.qu=T.Kr.extend({oU:function(){T.oq.on(this.jE.Ow,"mousewheel",this.Wu,this),this.wu=0},Ar:function(){T.oq.off(this.jE.Ow,"mousewheel",this.Wu,this)},Wu:function(t){var i=T.oq._Y(t),n=this.jE.options.mU;this.wu+=i,this.Eu=this.jE.Cw(t),this.eu||(this.eu=+new Date);var e=Math.max(n-(+new Date-this.eu),0);clearTimeout(this.Ru),this.Ru=setTimeout(T.D(this.ru,this),e),T.oq.uw(t)},ru:function(){var t=this.jE,i=t.getZoom(),n=this.jE.options.AW||0;t.Iw();var e=this.wu/(4*this.jE.options.Qu),o=4*Math.log(2/(1+Math.exp(-Math.abs(e))))/Math.LN2,s=n?Math.ceil(o/n)*n:o,r=t.GW(i+(this.wu>0?s:-s))-i;this.wu=0,this.eu=null,r&&("center"===t.options._U?t.setZoom(i+r):t.VW(this.Eu,i+r))}}),T.Map.M({enableScrollWheelZoom:function(){this._U.enable()},disableScrollWheelZoom:function(){this._U.disable()},isScrollWheelZoom:function(){return this._U.eU}}),T.Map._("iw","_U",T.Map.qu),T.extend(T.oq,{Tu:T.oQ.msPointer?"MSPointerDown":T.oQ.pointer?"pointerdown":"touchstart",tu:T.oQ.msPointer?"MSPointerUp":T.oQ.pointer?"pointerup":"touchend",NY:function(t,i,n){function e(t){var i;if(i=T.oQ.pointer?T.oq.Yu:t.touches.length,!(i>1)){var n=Date.now(),e=n-(s||n);r=t.touches?t.touches[0]:t,h=e>0&&e<=a,s=n}}function o(){if(h&&!r.cancelBubble){if(T.oQ.pointer){var t,n,e={};for(n in r)t=r[n],e[n]=t&&t.D?t.D(r):t;r=e}r.type="dblclick",i(r),s=null}}var s,r,h=!1,a=250,u="_tdt_",c=this.Tu,l=this.tu;return t[u+c+n]=e,t[u+l+n]=o,t[u+"dblclick"+n]=i,t.addEventListener(c,e,!1),t.addEventListener(l,o,!1),T.oQ.edge||t.addEventListener("dblclick",i,!1),this},MY:function(t,i){var n="_tdt_",e=t[n+this.Tu+i],o=t[n+this.tu+i],s=t[n+"dblclick"+i];return t.removeEventListener(this.Tu,e,!1),t.removeEventListener(this.tu,o,!1),T.oQ.edge||t.removeEventListener("dblclick",s,!1),this}}),T.extend(T.oq,{Uu:T.oQ.msPointer?"MSPointerDown":"pointerdown",uu:T.oQ.msPointer?"MSPointerMove":"pointermove",Iu:T.oQ.msPointer?"MSPointerUp":"pointerup",iu:T.oQ.msPointer?"MSPointerCancel":"pointercancel",TAG_WHITE_LIST:["INPUT","SELECT","OPTION"],Ou:{},Yu:0,vY:function(t,i,n,e){return"touchstart"===i?this.ou(t,n,e):"touchmove"===i?this.Pu(t,n,e):"touchend"===i&&this.pu(t,n,e),this},removePointerListener:function(t,i,n){var e=t["_tdt_"+i+n];return"touchstart"===i?t.removeEventListener(this.Uu,e,!1):"touchmove"===i?t.removeEventListener(this.uu,e,!1):"touchend"===i&&(t.removeEventListener(this.Iu,e,!1),t.removeEventListener(this.iu,e,!1)),this},ou:function(t,i,n){var e=T.D(function(t){if("mouse"!==t.pointerType&&t.pointerType!==t.MSPOINTER_TYPE_MOUSE){if(!(this.TAG_WHITE_LIST.indexOf(t.target.tagName)<0))return;T.oq.preventDefault(t)}this.Au(t,i)},this);if(t["_tdt_touchstart"+n]=e,t.addEventListener(this.Uu,e,!1),!this.au){var o=T.D(this.Su,this);document.documentElement.addEventListener(this.Uu,T.D(this.su,this),!0),document.documentElement.addEventListener(this.uu,T.D(this.Du,this),!0),document.documentElement.addEventListener(this.Iu,o,!0),document.documentElement.addEventListener(this.iu,o,!0),this.au=!0}},su:function(t){this.Ou[t.pointerId]=t,this.Yu++},Du:function(t){this.Ou[t.pointerId]&&(this.Ou[t.pointerId]=t)},Su:function(t){delete this.Ou[t.pointerId],this.Yu--},Au:function(t,i){t.touches=[];for(var n in this.Ou)t.touches.push(this.Ou[n]);t.changedTouches=[t],i(t)},Pu:function(t,i,n){var e=T.D(function(t){(t.pointerType!==t.MSPOINTER_TYPE_MOUSE&&"mouse"!==t.pointerType||0!==t.buttons)&&this.Au(t,i)},this);t["_tdt_touchmove"+n]=e,t.addEventListener(this.uu,e,!1)},pu:function(t,i,n){var e=T.D(function(t){this.Au(t,i)},this);t["_tdt_touchend"+n]=e,t.addEventListener(this.Iu,e,!1),t.addEventListener(this.iu,e,!1)}}),T.Map.n({du:!0}),T.Map.Fu=T.Kr.extend({initialize:function(t){this.jE=t,this.Ow=t.Ow,this.fu=t.aw.overlayPane},oU:function(){T.oq.on(this.Ow,"touchstart",this.Gu,this),T.oq.on(this.Ow,"touchmove",this.gu,this),T.oq.on(this.Ow,"touchend",this.Hu,this)},Ar:function(){T.oq.off(this.Ow,"touchstart",this.Gu),T.oq.off(this.Ow,"touchmove",this.gu),T.oq.off(this.Ow,"touchend",this.Hu)},Gu:function(t){if(this.jE.CW){var i="touchstart";this.jE.wQ(i,this.hu(t));var n=this;return this.timer=setTimeout(function(){n.jE.wQ("longpress",n.hu(t))},600),!1}},gu:function(t){if(this.jE.CW){var i="touchmove";this.jE.wQ(i,this.hu(t))}},Hu:function(t){if(this.jE.CW){var i="touchend";return this.jE.wQ(i,this.hu(t)),clearTimeout(this.timer),!1}},hu:function(t){if(t.touches&&0!=t.changedTouches.length){var i=this.jE.Cw(t.changedTouches[0]),n=this.jE.Lw(i),e=this.jE.Dw(n),o={lnglat:e,layerPoint:n,containerPoint:i,originalEvent:t};return o}}}),T.Map._("iw","du",T.Map.Fu),T.Map.n({Ju:T.oQ.touch&&!T.oQ.android23,ju:!1}),T.Map.Ku=T.Kr.extend({oU:function(){T._Q.Rq(this.jE.Ow,"tdt-touch-zoom"),T.oq.on(this.jE.Ow,"touchstart",this.Gu,this)},Ar:function(){T._Q.Tq(this.jE.Ow,"tdt-touch-zoom"),T.oq.off(this.jE.Ow,"touchstart",this.Gu,this)},Gu:function(t){var i=this.jE;if(t.touches&&2===t.touches.length&&!i.ER&&!this.ku){var n=i.Cw(t.touches[0]),e=i.Cw(t.touches[1]);this.Lu=i.getSize().FQ(2),this.lu=i.vW(this.Lu),"center"!==i.options.Ju&&(this._pinchStartLatLng=i.vW(n.AQ(e).FQ(2))),this._startDist=n.distanceTo(e),this.Zu=i.getZoom(),this.sw=!1,this.ku=!0,i.Iw(),T.oq.on(document,"touchmove",this.gu,this).on(document,"touchend",this.Hu,this),T.oq.preventDefault(t)}},gu:function(t){if(t.touches&&2===t.touches.length&&this.ku){var i=this.jE,n=i.Cw(t.touches[0]),e=i.Cw(t.touches[1]),o=n.distanceTo(e)/this._startDist;if(this.fW=i.gw(o,this.Zu),!i.options.ju&&(this.fWi.getMaxZoom()&&o>1)&&(this.fW=i.GW(this.fW)),"center"===i.options.Ju){if(this.BT=this.lu,1===o)return}else{var s=n.aQ(e).FQ(2).DQ(this.Lu);if(1===o&&0===s.x&&0===s.y)return;this.BT=i._q(i.nq(this._pinchStartLatLng,this.fW).sQ(s),this.fW)}this.sw||(i.qE(!0),this.sw=!0),T.S.V(this.IU);var r=T.D(i.QE,i,this.BT,this.fW,{pinch:!0,hQ:!1});this.IU=T.S.C(r,this,!0),T.oq.preventDefault(t)}},Hu:function(){return this.sw&&this.ku?(this.ku=!1,T.S.V(this.IU),T.oq.off(document,"touchmove",this.gu).off(document,"touchend",this.Hu),void(this.jE.options.Nr?this.jE.ge(this.BT,this.jE.GW(this.fW),!0,this.jE.options.snapZoom):this.jE.ZW(this.BT,this.jE.GW(this.fW)))):void(this.ku=!1)}}),T.Map.M({enablePinchToZoom:function(){this.Ju.enable()},disablePinchToZoom:function(){this.Ju.disable()},isPinchToZoom:function(){return this.Ju.eU}}),T.Map._("iw","Ju",T.Map.Ku),T.Map.n({Cu:!0,Vu:15}),T.Map.cu=T.Kr.extend({oU:function(){T.oq.on(this.jE.Ow,"touchstart",this.RU,this)},Ar:function(){T.oq.off(this.jE.Ow,"touchstart",this.RU,this)},RU:function(t){if(t.touches){if(T.oq.preventDefault(t),this.Bu=!0,t.touches.length>1)return this.Bu=!1,void clearTimeout(this.vu);var i=t.touches[0],n=i.target;this.YU=this.uU=new T.Point(i.clientX,i.clientY),n.tagName&&"a"===n.tagName.toLowerCase()&&T._Q.Rq(n,"tdt-active"),this.vu=setTimeout(T.D(function(){this.Nu()&&(this.Bu=!1,this.tU(),this.bu("contextmenu",i))},this),1e3),this.bu("mousedown",i),T.oq.on(document,{touchmove:this.fe,touchend:this.tU},this)}},tU:function(t){if(clearTimeout(this.vu),T.oq.off(document,{touchmove:this.fe,touchend:this.tU},this),this.Bu&&t&&t.changedTouches){var i=t.changedTouches[0],n=i.target;n&&n.tagName&&"a"===n.tagName.toLowerCase()&&T._Q.Tq(n,"tdt-active"),this.bu("mouseup",i),this.Nu()&&this.bu("click",i)}},Nu:function(){return this.uU.distanceTo(this.YU)<=this.jE.options.Vu},fe:function(t){var i=t.touches[0];this.uU=new T.Point(i.clientX,i.clientY),this.bu("mousemove",i)},bu:function(t,i){var n=document.createEvent("MouseEvents");n.uE=!0,i.target.qU=!0,n.initMouseEvent(t,!0,!0,window,1,i.screenX,i.screenY,i.clientX,i.clientY,!1,!1,!1,!1,0,null),i.target.dispatchEvent(n)}}),T.oQ.touch&&!T.oQ.pointer&&T.Map._("iw","Cu",T.Map.cu),T.Map.n({SE:!0}),T.Map.Mu=T.Kr.extend({initialize:function(t){this.jE=t,this.Ow=t.Ow,this.fu=t.aw.overlayPane},oU:function(){T.oq.on(this.Ow,"mousedown",this.nu,this)},Ar:function(){T.oq.off(this.Ow,"mousedown",this.nu,this)},moved:function(){return this.sw},_u:function(){this.sw=!1},nu:function(t){return!(!t.shiftKey||1!==t.which&&1!==t.button)&&(this._u(),T._Q.Oq(),T._Q.Aq(),this.TU=this.jE.Cw(t),void T.oq.on(document,{contextmenu:T.oq.uw,mousemove:this.PY,mouseup:this.mu,keydown:this.QI},this))},PY:function(t){this.sw||(this.sw=!0,this.qI=T._Q.s("div","tdt-zoom-box",this.Ow),T._Q.Rq(this.Ow,"tdt-crosshair"),this.jE.wQ("boxzoomstart")),this.eY=this.jE.Cw(t);var i=new T.ZQ(this.eY,this.TU),n=i.getSize();T._Q.setPosition(this.qI,i.min),this.qI.style.width=n.x+"px",this.qI.style.height=n.y+"px"},WI:function(){this.sw&&(T._Q.Qq(this.qI),T._Q.Tq(this.Ow,"tdt-crosshair")),T._Q.Pq(),T._Q.aq(),T.oq.off(document,{contextmenu:T.oq.uw,mousemove:this.PY,mouseup:this.mu,keydown:this.QI},this)},mu:function(t){if((1===t.which||1===t.button)&&(this.WI(),this.sw)){setTimeout(T.D(this._u,this),0);var i=new T.Kq(this.jE.vW(this.TU),this.jE.vW(this.eY));this.jE._W(i).wQ("boxzoomend",{boxZoomBounds:i})}},QI:function(t){27===t.keyCode&&this.WI()}}),T.Map._("iw","SE",T.Map.Mu),T.Map.n({Ir:!0,wI:80}),T.Map.EI=T.Kr.extend({keyCodes:{left:[37],right:[39],down:[40],up:[38],zoomIn:[187,107,61,171],zoomOut:[189,109,54,173]},initialize:function(t){this.jE=t,this.eI(t.options.wI),this.RI(t.options.aW)},oU:function(){var t=this.jE.Ow;t.tabIndex<=0&&(t.tabIndex="0"),T.oq.on(t,{focus:this.rI,blur:this.TI,mousedown:this.nu},this),this.jE.on({focus:this.tI,blur:this.YI},this)},Ar:function(){this.YI(),T.oq.off(this.jE.Ow,{focus:this.rI,blur:this.TI,mousedown:this.nu},this),this.jE.off({focus:this.tI,blur:this.YI},this)},nu:function(){if(!this.UI){var t=document.body,i=document.documentElement,n=t.scrollTop||i.scrollTop,e=t.scrollLeft||i.scrollLeft;this.jE.Ow.focus(),window.scrollTo(e,n)}},rI:function(){this.UI=!0,this.jE.wQ("focus")},TI:function(){this.UI=!1,this.jE.wQ("blur")},eI:function(t){var i,n,e=this._panKeys={},o=this.keyCodes;for(i=0,n=o.left.length;i0&&t.screenY>0&&this.jE.getContainer().focus()}}),T.oI=function(t){return new T.Control(t)},T.Map.M({addControl:function(t){return t.addTo(this),this.wQ("addcontrol",{addcontrol:t}),this},removeControl:function(t){return t.Qq(),this.wQ("removecontrol",{removecontrol:t}),this},Mw:function(){function t(t,o){var s=n+t+" "+n+o;i[t+o]=T._Q.s("div",s,e)}var i=this.iI={},n="tdt-",e=this.PI=T._Q.s("div",n+"control-container",this.Ow);t("top","left"),t("top","right"),t("bottom","left"),t("bottom","right")},Pw:function(){T._Q.Qq(this.PI)}}),T.Control.Zoom=T.Control.extend({options:{position:T_ANCHOR_TOP_LEFT,zoomInText:"+",zoomInTitle:"放大",zoomOutText:"-",zoomOutTitle:"缩小"},onAdd:function(t){var i="tdt-control-zoom",n=T._Q.s("div",i+" tdt-bar"),e=this.options;return this.pI=this.AI(e.zoomInText,e.zoomInTitle,i+"-in",n,this.aI),this.SI=this.AI(e.zoomOutText,e.zoomOutTitle,i+"-out",n,this.sI),this.DI(),t.on("zoomend zoomlevelschange",this.DI,this),t.on("minzoom",this.DI,this),t.on("maxzoom",this.DI,this),n},onRemove:function(t){t.off("zoomend zoomlevelschange",this.DI,this),t.off("minzoom",this.DI,this),t.off("maxzoom",this.DI,this)},disable:function(){return this.dI=!0,this.DI(),this},enable:function(){return this.dI=!1,this.DI(),this},aI:function(t){this.dI||this.jE.zoomIn(this.jE.options.aW*(t.shiftKey?3:1))},sI:function(t){this.dI||this.jE.zoomOut(this.jE.options.aW*(t.shiftKey?3:1))},AI:function(t,i,n,e,o){var s=T._Q.s("a",n,e);return s.innerHTML=t,s.href="#",s.title=i,T.oq.on(s,"mousedown dblclick",T.oq.stopPropagation).on(s,"click",T.oq.uw).on(s,"click",o,this).on(s,"click",this.OI,this),s},DI:function(){var t=this.jE,i="tdt-disabled";T._Q.Tq(this.pI,i),T._Q.Tq(this.SI,i),(this.dI||t.fW===t.getMinZoom())&&T._Q.Rq(this.SI,i),(this.dI||t.fW===t.getMaxZoom())&&T._Q.Rq(this.pI,i)}}),T.Map.n({FI:!1}),T.Map._(function(){this.options.FI&&(this.FI=new T.Control.Zoom,this.addControl(this.FI))}),T.oI.zoom=function(t){return new T.Control.Zoom(t)},T.Control.fI=T.Control.extend({options:{position:T_ANCHOR_BOTTOM_LEFT,GI:'
GS(2023)336号 - 甲测资字1100471
'},initialize:function(t){T.setOptions(this,t),this.gI={}},onAdd:function(t){t.cE=this,this.Ow=T._Q.s("div","tdt-control-copyright"),T.oq&&T.oq.iT(this.Ow);for(var i in t.hW)t.hW[i].VE&&this.BE(t.hW[i].VE());return this.Oe(),this.Ow},HI:function(t){return this.options.GI=t,this.Oe(),this},BE:function(t){return t?(this.gI[t]||(this.gI[t]=0),this.gI[t]++,this.Oe(),this):this},NE:function(t){return t?(this.gI[t]&&(this.gI[t]--,this.Oe()),this):this},Oe:function(){if(this.jE){var t=[];for(var i in this.gI)this.gI[i]&&t.push(i);var n=[];this.options.GI&&n.push(this.options.GI),t.length&&n.push(t.join(", ")),this.Ow.innerHTML=n.join(" | ")}}}),T.Map.n({cE:!0}),T.Map._(function(){this.options.cE&&(new T.Control.fI).addTo(this)}),T.oI.Ue=function(t){return new T.Control.fI(t)},T.Control.Copyright=T.Control.fI.extend({options:{position:T_ANCHOR_BOTTOM_RIGHT,GI:""},initialize:function(t){T.setOptions(this,t),this.hI=[]},addCopyright:function(t){if(this.hI["str"+t.id])return void alert("copyright id 重复");this.hI.push(t),this.hI["str"+t.id]=t;var i=T._Q.s("div","tdt-control-copyright");T.oq&&T.oq.iT(i),i.innerHTML=t.content,t._span=i,this.Ow.appendChild(i);var n=this.jE.getCenter();this.JI(n)},removeCopyright:function(t){this.Ow.removeChild(this.hI["str"+t.id]._span),this.hI["str"+t.id]=null;for(var i=0;i数据来源:国家地理信息公共服务平台',this.Oe(),t.on("moveend",this.Oe,this),this.Ow},onRemove:function(){T._Q.Qq(this.Ow),map.off("moveend",this.Oe,this),this.Ow=null},getLayerArray:function(){for(var t=this.jE.getPanes().tilePane,i=["vec","cva","ter","cta","img","cia"],n=[],e=0;e"}),this.dataSourcesInfo=i.dataSourcesInfo}},setColor:function(t){return this.options.color=t,this.Ow.style.color=t,this},getDataSources:function(){return this.dataSourcesInfo}}),T.oI.datasources=function(t){return new T.Control.DataSources(t)},T.Control.Scale=T.Control.extend({options:{position:T_ANCHOR_BOTTOM_LEFT,Cr:100,KI:!0,kI:!0,type:1},onAdd:function(t){var i="tdt-control-scale",n=T._Q.s("div",i),e=this.options;return this.LI(e,i+"-line",n),t.on(e.te?"moveend":"move",this.Oe,this),t.sE(this.Oe,this),n},onRemove:function(t){t.off(this.options.te?"moveend":"move",this.Oe,this)},setColor:function(t){this.lI&&(this.lI.style.borderColor=t,this.ZI.style.color=t),this.CI&&1==this.type&&(this.CI.style.borderColor=t,this.VI.style.color=t)},LI:function(t,i,n){this.type=t.type,t.KI&&(this.lI=T._Q.s("div",i,n),this.ZI=T._Q.s("div","tdt-control-scale-m",this.lI)),t.kI&&1==t.type&&(this.CI=T._Q.s("div","tdt-control-scale-linebottom",n),this.VI=T._Q.s("div","tdt-control-scale-i",this.CI))},Oe:function(){var t=this.jE,i=t.getSize().y/2,n=t.distance(t.vW([0,i]),t.vW([this.options.Cr,i]));this.cI(n)},cI:function(t){this.options.KI&&t&&this.BI(t),this.options.kI&&t&&1==this.type&&this.vI(t)},BI:function(t){var i=this.NI(t),n=i<1e3?i+" 米":i/1e3+" 公里";this.bI(this.ZI,n,i/t,this.lI)},vI:function(t){var i,n,e,o=3.2808399*t;o>5280?(i=o/5280,n=this.NI(i),this.bI(this.VI,n+" 英里",n/i,this.CI)):(e=this.NI(o),this.bI(this.VI,e+" 英尺",e/o,this.CI))},bI:function(t,i,n,e){e.style.width=Math.round(this.options.Cr*n)+"px",t.innerHTML=i},NI:function(t){var i=Math.pow(10,(Math.floor(t)+"").length-1),n=t/i;return n=n>=10?10:n>=5?5:n>=3?3:n>=2?2:1,i*n}}),T.oI.scale=function(t){return new T.Control.Scale(t)},T.Control.MI=T.Control.extend({options:{nI:!0,position:T_ANCHOR_TOP_RIGHT,_I:!0,mI:!1},initialize:function(t,i,n){T.setOptions(this,n),this.hW=[],this.Qi=0,this.qi=!1;for(var e in t)this.Wi(t[e],e);for(e in i)this.Wi(i[e],e,!0)},onAdd:function(t){return this.DW(),this.Oe(),this.jE=t,t.on("zoomend",this.wi,this),this.Ow},onRemove:function(){this.jE.off("zoomend",this.wi,this);for(var t=0;t1,this.Ti.style.display=t?"":"none"),this.ti.style.display=i&&t?"":"none",this},Ei:function(t){this.qi||this.Oe();var i=this._getLayer(T.d(t.target)),n=i.overlay?"AQ"===t.type?"overlayadd":"overlayremove":"AQ"===t.type?"baselayerchange":null;n&&this.jE.wQ(n,i)},ui:function(t,i){var n='",e=document.createElement("div");return e.innerHTML=n,e.firstChild},Ui:function(t){var i,n=document.createElement("label"),e=this.jE.hasLayer(t.layer);t.overlay?(i=document.createElement("input"),i.type="checkbox",i.className="tdt-control-layers-selector",i.defaultChecked=e):i=this.ui("tdt-base-layers",e),i.layerId=T.d(t.layer),T.oq.on(i,"click",this.ri,this);var o=document.createElement("span");o.innerHTML=" "+t.name;var s=document.createElement("div");n.appendChild(s),s.appendChild(i),s.appendChild(o);var r=t.overlay?this.Yi:this.Ti;return r.appendChild(n),this.wi(),n},ri:function(){var t,i,n,e=this.ei.getElementsByTagName("input"),o=[],s=[];this.qi=!0;for(var r=e.length-1;r>=0;r--)t=e[r],i=this._getLayer(t.layerId).layer,n=this.jE.hasLayer(i),t.checked&&!n?o.push(i):!t.checked&&n&&s.push(i);for(r=0;r=0;o--)t=n[o],i=this._getLayer(t.layerId).layer,t.disabled=void 0!==i.options.minZoom&&ei.options.maxZoom},Ii:function(){return this.expand()},ii:function(){return this.collapse()}}),T.oI.layers=function(t,i,n){return new T.Control.MI(t,i,n)},T.Control.MapType=T.Control.extend({includes:T.iQ.OQ,options:{position:T_ANCHOR_TOP_RIGHT,behavior:"previous",expand:"horizontal",_I:!0,maxLayersInRow:5,manageLayers:!0},initialize:function(t,i){T.S.l(arguments[0])||(i=t,this.Oi(),t=T.w.oi),T.setOptions(this,i),this._expandDirection=this.options.position.indexOf("left")!=-1?"right":"left",this.options.manageLayers&&this.on("activelayerchange",this.Pi,this),this.pi(t)},Oi:function(){T.w.oi=[{title:"地图",icon:T.Icon.Default.imagePath+"/map/maptype/vector.png",layer:TMAP_NORMAL_MAP},{title:"卫星",icon:T.Icon.Default.imagePath+"/map/maptype/satellite.png",layer:TMAP_SATELLITE_MAP},{title:"卫星混合",icon:T.Icon.Default.imagePath+"/map/maptype/satellitepoi.png",layer:TMAP_HYBRID_MAP},{title:"地形",icon:T.Icon.Default.imagePath+"/map/maptype/terrain.png",layer:TMAP_TERRAIN_MAP},{title:"地形混合",icon:T.Icon.Default.imagePath+"/map/maptype/terrainpoi.png",layer:TMAP_TERRAIN_HYBRID_MAP}]},onAdd:function(t){return this.Ow=T._Q.s("div","tdt-iconLayers"),T._Q.Rq(this.Ow,"tdt-iconLayers_"+this.options.position),this.Ai(),t.on("click",this.collapse,this),this.options.manageLayers&&this.Pi(),this.Ow},onRemove:function(t){t.off("click",this.collapse,this)},pi:function(t){this.hW={},t.map(function(t){var i=T.d(t.layer);this.hW[i]=T.extend(t,{id:i})}.D(this)),this.Ow&&this.Ai()},ai:function(t){var i=t&&this.hW[T.d(t)];i&&i.id!==this._activeLayerId&&(this._previousLayerId=this._activeLayerId,this._activeLayerId=i.id,this.Ow&&this.Ai(),this.wQ("activelayerchange",{layer:t}))},expand:function(){this.Si().slice(1).map(function(t){var i=this.si(t.id);T._Q.Tq(i,"tdt-iconLayers-layerCell_hidden")}.D(this))},collapse:function(){this.Si().slice(1).map(function(t){var i=this.si(t.id);T._Q.Rq(i,"tdt-iconLayers-layerCell_hidden")}.D(this))},Di:function(){return this._activeLayerId?this.hW[this._activeLayerId]:length(this.hW)?first(this.hW):null},di:function(){var t=this.Di();return t?this._previousLayerId?this.hW[this._previousLayerId]:find(this.hW,function(i){return i.id!==t.id}.D(this))||null:null},Fi:function(){var t=[],i=this.Di()?this.Di().id:null,n=this.di()?this.di().id:null;return each(this.hW,function(e){e.id!==i&&e.id!==n&&t.push(e)}),t},Si:function(){var t={};return t.previous=function(){var t=this.Fi();return this.Di()&&t.unshift(this.Di()),this.di()&&t.unshift(this.di()),t},t[this.options.behavior].apply(this,arguments)},si:function(t){if("Microsoft Internet Explorer"!=navigator.appName||"MSIE8.0"!=navigator.appVersion.split(";")[1].replace(new RegExp("[ ]","g"),""))var i=this.Ow.getElementsByClassName("tdt-iconLayers-layerCell");else var i=document.getElementsByClassName("tdt-iconLayers-layerCell",this.Ow);for(var n=0;n>>0;if("[object Function]"!=Object.prototype.toString.call(t))throw new TypeError(t+" is not a function");for(i&&(n=i),e=new Array(r),o=0;o=0&&this.QO()},qO:function(){return!this.Ow.getElementsByClassName("tdt-zoom-animated").length},Bi:function(t,i,n){if(this.ER)return!0;if(n=n||{},!this.ZE||n.Tw===!1||this.qO()||Math.abs(i-this.fW)>this.options.Mi)return!1;var e=this.cW(i),o=this.dE(t).FQ(1-1/e);return!(n.Tw!==!0&&!this.getSize().contains(o))&&(T.S.C(function(){this.qE(!0).ge(t,i,!0)},this),!0)},ge:function(t,i,n,e){n&&(this.ER=!0,this.WO=t,this.RR=i,T._Q.Rq(this.ow,"tdt-zoom-anim")),this.wQ("Ge",{center:t,zoom:i,noUpdate:e}),setTimeout(T.D(this.QO,this),250)},QO:function(){this.ER&&(T._Q.Tq(this.ow,"tdt-zoom-anim"),this.ER=!1,this.QE(this.WO,this.RR),T.S.C(function(){this.mw(!0)},this))}}:{}),T.Map.M({enableContinuousZoom:function(){this.options.Mi=4},disableContinuousZoom:function(){this.options.Mi=0},isContinuousZoom:function(){return 4==this.options.Mi}}),T.Map.M({Ne:function(t,i,n){function e(t){var i=t?-1:1,n=t?v:m,e=v*v-m*m+i*g*g*w*w,o=2*n*g*w,s=e/o,r=Math.sqrt(s*s+1)-s,h=r<1e-9?-18:Math.log(r);return h}function o(t){return(Math.exp(t)-Math.exp(-t))/2}function s(t){return(Math.exp(t)+Math.exp(-t))/2}function r(t){return o(t)/s(t)}function h(t){return m*(s(E)/s(E+y*t))}function a(t){return m*(s(E)*r(E+y*t)-o(E))/g}function u(t){return 1-Math.pow(1-t,1.5)}function c(){var n=(Date.now()-Q)/x,e=u(n)*q;n<=1?(this.wE=T.S.C(c,this),this.QE(this._q(l.AQ(f.sQ(l).fQ(a(e)/w)),p),this.gw(m/h(e),p),{Ne:!0})):this.QE(t,i).mw(!0)}if(n=n||{},n.Tw===!1||!T.oQ.any3d)return this.gW(t,i,n);this.Iw();var l=this.nq(this.getCenter()),f=this.nq(t),d=this.getSize(),p=this.fW;t=T.fq(t),i=void 0===i?p:i;var m=Math.max(d.x,d.y),v=m*this.cW(p,i),w=f.distanceTo(l)||1,y=1.42,g=y*y,E=e(0),Q=Date.now(),q=(e(1)-E)/y,x=n.duration?10*n.duration:10*q*.8;return this.qE(!0),c.call(this),this},wO:function(t,i){var n=this.NW(t,i);return this.Ne(n.center,n.zoom,i)}}),T.Map.M({EO:{eO:1e4,watch:!1},RO:function(t){if(t=this.rO=T.extend({},this.EO,t),!("geolocation"in navigator))return this.TO({code:0,message:"tO"}),this;var i=T.D(this.YO,this),n=T.D(this.TO,this);return t.watch?this.UO=navigator.geolocation.watchPosition(i,n,t):navigator.geolocation.getCurrentPosition(i,n,t),this},uO:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this.UO),this.rO&&(this.rO.gW=!1),this},TO:function(t){var i=t.code,n=t.message||(1===i?"IO":2===i?"iO":"eO");this.rO.gW&&!this.CW&&this.mW(),this.wQ("OO",{code:i,message:"oO"+n+"."})},YO:function(t){var i=t.coords.latitude,n=t.coords.longitude,e=new T.dq(i,n),o=e.Jq(t.coords.accuracy),s=this.rO;if(s.gW){var r=this.nW(o);this.gW(e,s.maxZoom?Math.min(r,s.maxZoom):r)}var h={KT:e,bounds:o,PO:t.PO};for(var a in t.coords)"number"==typeof t.coords[a]&&(h[a]=t.coords[a]);this.wQ("pO",h)}});for(var n=0;n + + + + + + + + + + diff --git a/hx-op/src/api/index.ts b/hx-op/src/api/index.ts new file mode 100644 index 0000000..6ae56cc --- /dev/null +++ b/hx-op/src/api/index.ts @@ -0,0 +1,6 @@ +/*** + *配置接口 格式 module:Array + */ +export const apiModule = { + parking: ['User', 'CurrentUser', 'Organizational'], +}; diff --git a/hx-op/src/api/origanizemanage.ts b/hx-op/src/api/origanizemanage.ts new file mode 100644 index 0000000..2850f3d --- /dev/null +++ b/hx-op/src/api/origanizemanage.ts @@ -0,0 +1,9 @@ +const BASE_URL = '/carbon-smart'; + +export enum enterPrise { + list = `${BASE_URL}/admin/org/queryByPage`, + del = `${BASE_URL}/admin/org/del`, + edit = `${BASE_URL}/admin/org/edit`, + save = `${BASE_URL}/admin/org/save`, + link = `${BASE_URL}/admin/org/link`, +} diff --git a/hx-op/src/api/user.ts b/hx-op/src/api/user.ts new file mode 100644 index 0000000..4a4edf5 --- /dev/null +++ b/hx-op/src/api/user.ts @@ -0,0 +1,17 @@ +import { http } from '/nerv-lib/saas'; + +enum Api { + // USER_LOGIN = '/api/community/objs/Login', //用户登录 + // USER_INFO = '/api/community/community/objs/CurrentUser', //获取用户信息 + + USER_LOGIN = 'api/web/objs/Login', //用户登录 + USER_INFO = 'api/web/objs/CurrentUser', //获取用户信息 + USER_RESOURCE = '/api/community/objs/User/Resource', //获取用户资源 +} +export const userLogin = (data) => http.post(Api.USER_LOGIN, data); +export const userInfo = () => http.get(Api.USER_INFO); +export const userResource = () => http.get(Api.USER_RESOURCE); +/** + * @description 用户登录 + * @property `[fatherRegionUuid]` 父级区域唯一标识 + */ diff --git a/hx-op/src/config/app.config.ts b/hx-op/src/config/app.config.ts new file mode 100644 index 0000000..661b45c --- /dev/null +++ b/hx-op/src/config/app.config.ts @@ -0,0 +1,108 @@ +/** @format */ + +import { http } from '/nerv-lib/saas'; +import { ref } from 'vue'; + +const value = ref('1'); +const transform = (data, map) => { + return Object.keys(map).reduce((pre, cur) => { + pre[cur] = data[map[cur]]; + return pre; + }, {}); +}; +export const appConfig = { + projectType: 'web', + baseApi: '/api', + enablePermissions: false, + // themeColor: '#eee', + siderPosition: 'left', + baseHeader: '/parkingManage', + baseRouter: '/parkingManage/parkingLotManage', + themeConfig: { + bgImageUrl: `${import.meta.env.VITE_PUBLIC_PATH}/asset/image/login/background.png`, + }, + // userCustomRouterGuard: (to, from, next, whiteNameList, authorizationStore, appConfig) => { + // console.log({ to, from, next, whiteNameList, authorizationStore, appConfig }, 'routeConfig'); + // next(); + // }, + + // customUpdatePwd: () => import('/@/view/updatePassword/updatePassword.vue'), + + // userInfoApi: () => { + // return { + // code: 200, + // success: true, + // data: { + // accountCode: '1305107806187376793', + // accountName: 'adm*n', + // accountType: 'admin', + // accountStatus: 1, + // accountRealName: 'admin', + // organizationCode: 'dingcloud', + // authConfigList: [], + // organizeResCode: [], + // leadDepartmentUuidList: [], + // }, + // }; + // }, + + // headerSlotConfig: { + // component: 'NsSelect', + // componentProps: { + // style: { width: '200px' }, + // placeholder: '请选择', + // value, + // onChange: (cur) => { + // value.value = cur; + // }, + // options: [ + // { label: '济阳', value: '1' }, + // { label: '临沂', value: '2' }, + // ], + // }, + // }, + timeout: 60 * 1000, + userLoginApi: '/carbon-smart/user/login', + userResourceApi: () => { + return { data: [] }; + }, + userInfoApi: () => { + return http.post('/carbon-smart/user/login/logInInfo').then((res) => { + const info = res.data; + const trD = transform(info, { + accountCode: 'userId', + accountName: 'realName', + accountRealName: 'realName', + orgId: 'orgId', + orgName: 'orgName', + projectId: 'projectId', + }); + return { data: { ...trD } }; + }); + }, + + useHistoryTag: false, + // 修改密码配置 + updatePassWordInfo: { + title: '修改密码', + subtitle: 'huaxing平台', + api: '/api/web/objs/User/changePassword', + }, + // headerBellInfo: { + // isShow: true, + // api: '/api/web/objs/bulletin/readCount', + // toRouterName: 'NoticeManageIndex', + // }, + resourceInfo: { + // application: { + // version: '1.1.74', + // label: '停车业务平台', + // dataScope: { + // scopeMode: 0, + // scopeType: '', + // dataTips: '', + // }, + // }, + // api: permission.add, + }, +}; diff --git a/hx-op/src/config/index.ts b/hx-op/src/config/index.ts new file mode 100644 index 0000000..b696641 --- /dev/null +++ b/hx-op/src/config/index.ts @@ -0,0 +1,2 @@ +import { appConfig } from '/@/config/app.config'; +export { appConfig }; diff --git a/hx-op/src/enum/http-enum.ts b/hx-op/src/enum/http-enum.ts new file mode 100644 index 0000000..1235bea --- /dev/null +++ b/hx-op/src/enum/http-enum.ts @@ -0,0 +1,22 @@ +export enum ResultEnum { + SUCCESS = 0, + ERROR = 1, + TIMEOUT = 401, + TOKEN_INVALID = 403, +} + +export enum RequestEnum { + GET = 'POST', + POST = 'POST', + PUT = 'POST', + DELETE = 'POST', +} + +export enum ContentTypeEnum { + // json + JSON = 'application/json;charset=UTF-8', + // form-data qs + FORM_URLENCODED = 'application/x-www-form-urlencoded;charset=UTF-8', + // form-data upload + FORM_DATA = 'multipart/form-data;charset=UTF-8', +} diff --git a/hx-op/src/icon/dicizhishou.svg b/hx-op/src/icon/dicizhishou.svg new file mode 100644 index 0000000..38f2155 --- /dev/null +++ b/hx-op/src/icon/dicizhishou.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/hx-op/src/icon/downArrow.svg b/hx-op/src/icon/downArrow.svg new file mode 100644 index 0000000..6113d76 --- /dev/null +++ b/hx-op/src/icon/downArrow.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/hx-op/src/icon/headerAdminIcon.svg b/hx-op/src/icon/headerAdminIcon.svg new file mode 100644 index 0000000..9458d04 --- /dev/null +++ b/hx-op/src/icon/headerAdminIcon.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/hx-op/src/icon/passWord.svg b/hx-op/src/icon/passWord.svg new file mode 100644 index 0000000..5e632d7 --- /dev/null +++ b/hx-op/src/icon/passWord.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/hx-op/src/icon/trigger.svg b/hx-op/src/icon/trigger.svg new file mode 100644 index 0000000..2f0acf3 --- /dev/null +++ b/hx-op/src/icon/trigger.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/hx-op/src/icon/userName.svg b/hx-op/src/icon/userName.svg new file mode 100644 index 0000000..6546d34 --- /dev/null +++ b/hx-op/src/icon/userName.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/hx-op/src/main.ts b/hx-op/src/main.ts new file mode 100644 index 0000000..5eea1a2 --- /dev/null +++ b/hx-op/src/main.ts @@ -0,0 +1,18 @@ +import { createApp } from 'vue'; +import App from '/@/App.vue'; +import { saasInit } from '/nerv-lib/saas'; +import { apiModule } from '/@/api'; +import { appConfig } from '/@/config'; +import './theme/global.less'; +import { LeftOutlined } from '@ant-design/icons-vue'; +// import ElementPlus from 'element-plus' +// import 'element-plus/dist/index.css' +const app = createApp(App); +app.component('LeftOutlined', LeftOutlined); +saasInit({ + app, + apiModule, + appConfig, +}); +// app.use(ElementPlus) +app.mount('#app'); diff --git a/hx-op/src/router/home.ts b/hx-op/src/router/home.ts new file mode 100644 index 0000000..c4e935a --- /dev/null +++ b/hx-op/src/router/home.ts @@ -0,0 +1,29 @@ +const Base = () => import('/nerv-lib/saas/view/system/layout/content.vue'); +const home = { + path: '/home', + name: 'home', + meta: { title: '首页', icon: 'dicizhishou', index: 0, hideChildren: true }, + redirect: { name: 'homeIndex' }, + children: [ + { + path: 'homeModule', + name: 'HomeModule', + meta: { title: '首页', hideChildren: true, icon: 'dicizhishou' }, + component: Base, + redirect: { name: 'homeIndex' }, + children: [ + { + path: 'index', + name: 'homeIndex', + component: () => import('/@/view/developing.vue'), + meta: { + title: '首页', + keepAlive: true, + // backApi: [], + }, + }, + ], + }, + ], +}; +export default home; diff --git a/hx-op/src/router/index.ts b/hx-op/src/router/index.ts new file mode 100644 index 0000000..cf8cab9 --- /dev/null +++ b/hx-op/src/router/index.ts @@ -0,0 +1,11 @@ +/** @format */ + +const RootRoute = { + path: '/', + name: 'root', + redirect: { name: 'home' }, + meta: { + title: 'Root', + }, +}; +export default RootRoute; diff --git a/hx-op/src/router/organizationManage.ts b/hx-op/src/router/organizationManage.ts new file mode 100644 index 0000000..83c3dd1 --- /dev/null +++ b/hx-op/src/router/organizationManage.ts @@ -0,0 +1,29 @@ +const Base = () => import('/nerv-lib/saas/view/system/layout/content.vue'); +const organizationManage = { + path: '/organizationManage', + name: 'organizationManage', + meta: { title: '企业管理', icon: 'dicizhishou', index: 99, hideChildren: true }, + redirect: { name: 'EnterpriseManage' }, + children: [ + { + path: 'enterpriseManage', + name: 'EnterpriseManage', + meta: { title: '企业管理', hideChildren: true, icon: 'dicizhishou' }, + component: Base, + redirect: { name: 'EnterpriseManageIndex' }, + children: [ + { + path: 'index', + name: 'EnterpriseManageIndex', + component: () => import('/@/view/organizationManage/enterpriseManage/index.vue'), + meta: { + title: '企业管理', + keepAlive: true, + // backApi: [], + }, + }, + ], + }, + ], +}; +export default organizationManage; diff --git a/hx-op/src/store/item.ts b/hx-op/src/store/item.ts new file mode 100644 index 0000000..2b518c4 --- /dev/null +++ b/hx-op/src/store/item.ts @@ -0,0 +1,12 @@ +import { defineStore } from 'pinia'; + +export const items = defineStore({ + id: 'items', + state() { + return { list: [], count: 10 }; + }, + getters: { + double: (state: any) => state.count * 2, + }, + actions: {}, +}); diff --git a/hx-op/src/theme/detail.less b/hx-op/src/theme/detail.less new file mode 100644 index 0000000..03dbf09 --- /dev/null +++ b/hx-op/src/theme/detail.less @@ -0,0 +1,151 @@ +.ns-view { + min-height: 100%; + height: 100%; + background: #e5ebf0; +} +.ns-detail-content { + border-top: 16px solid #e5ebf0; + padding: 16px 21px; + background: #fff; + height: calc(100% - 50px); +} + +:deep(.ant-skeleton-paragraph) { + display: flex; + flex-wrap: wrap; +} + +:deep(.ant-skeleton-paragraph li:nth-child(n)) { + display: block; + margin-right: 4%; + margin-top: 16px; + margin-bottom: 4px; +} + +:deep(.ant-skeleton-paragraph li:nth-child(3n + 3)) { + margin-right: 0; +} + +:deep(.ant-skeleton-content) { + padding: 0 8px 10px 10px; +} + +:deep(.ant-descriptions-item-label) { + color: rgba(0, 0, 0, 0.5); +} + +:deep(.ant-descriptions-item-label), +:deep(.ant-descriptions-item-content) { + line-height: 22px; +} + +:deep(.ant-descriptions-view) { + padding-bottom: 8px; +} + +:deep(.ant-descriptions-item) { + padding-right: 20px; + + &:nth-child(2n) { + padding-left: 20px; + } + + &:nth-child(3n) { + padding-left: 20px; + padding-right: 0; + } +} + +.descriptions-title { + &:after { + content: ''; + width: 75px; + height: 7px; + display: block; + background: linear-gradient(90deg, #537fff 0%, #fff 82.67%); + margin-left: 2px; + margin-top: -2px; + } +} + +.ns-page-header { + margin-bottom: 0 !important; + padding-top: 7px !important; + padding-bottom: 7px !important; + width: calc(100% + 32px); + margin-left: -16px; + .title { + cursor: pointer; + font-size: 18px !important; + } +} + +.ns-detail { + border-bottom: 1px solid #ecedef; + + &:last-child { + border-bottom-width: 0; + } + &:first-child { + :deep(.ant-descriptions-header) { + margin-top: 0; + } + } + + :deep(.ant-descriptions-header) { + margin-top: 12px; + margin-bottom: 12px; + + .ant-descriptions-title { + line-height: 16px; + font-size: 16px; + } + } +} + +:deep(.ant-image) { + width: 64px; + height: 64px; + img { + width: 100%; + height: 100%; + object-fit: contain; + } +} + +.ns-detail-html { + :deep(table) { + border-top: 1px solid #ffffff; + border-left: 1px solid #ffffff; + + :deep(p) { + font-size: 12px; + color: #898e91; + } + } + + :deep(th) { + border-right: 1px solid #ffffff; + font-size: 13px; + padding-top: 5px; + padding-bottom: 5px; + font-weight: normal; + background: #eff0f2; + } + + :deep(td) { + border-top: 1px solid #ffffff; + border-right: 1px solid #ffffff; + padding-top: 5px; + padding-bottom: 5px; + font-size: 12px; + color: #606060; + text-align: center; + + :deep(text) { + border-bottom: 1px solid #ffffff; + } + + background: rgba(240, 242, 245, 0.5); + } +} diff --git a/hx-op/src/theme/form.less b/hx-op/src/theme/form.less new file mode 100644 index 0000000..1480546 --- /dev/null +++ b/hx-op/src/theme/form.less @@ -0,0 +1,72 @@ +.ns-view { + min-height: 100%; + height: 100%; + background: #e5ebf0; +} + +.ns-page-header { + margin-bottom: 0 !important; + padding: 7px 16px !important; + width: calc(100% + 32px); + margin-left: -16px; + + .title { + cursor: pointer; + font-size: 18px !important; + display: flex; + align-items: center; + + .text { + margin-left: 6px; + } + } +} + +:deep(.ant-spin-nested-loading) { + min-height: 100%; + height: 100%; +} + +:deep(.ant-spin-container) { + min-height: 100%; + height: 100%; +} + +:deep(.ant-divider) { + display: none; +} + +.ns-add-form { + border-top: 16px solid #e5ebf0; + padding: 16px 21px; + background: #fff; + height: calc(100% - 47px) !important; + + .ns-form { + + // 第一个子表单Title距离顶部为0 + :deep(.ns-form-item .ns-form-body .ns-child-form-title) { + padding-top: 0; + } + + &:after { + display: none !important; + } + } + + :deep(.ns-child-form-title) { + &:after { + content: ''; + width: 75px; + height: 7px; + display: block; + background: linear-gradient(90deg, #537fff 0%, #fff 82.67%); + margin-left: 2px; + margin-top: -7px; + } + } +} + +:deep(.ns-form.ns-vertical-form) { + padding-top: 16px !important; +} \ No newline at end of file diff --git a/hx-op/src/theme/global.less b/hx-op/src/theme/global.less new file mode 100644 index 0000000..714d672 --- /dev/null +++ b/hx-op/src/theme/global.less @@ -0,0 +1,183 @@ +//侧边导航 +// .ant-menu:not(.ant-menu-horizontal) .ant-menu-item-selected { +// background: rgb(229, 247, 249) !important; +// } + +// .ant-menu.ant-menu-dark .ant-menu-item-selected { +// color: #fff; +// background: #43BB79 !important; +// } + +// .ant-menu-dark.ant-menu-horizontal>.ant-menu-item:hover { +// background-color: #43BB79 !important; +// } + +.ant-menu-inline .ant-menu-item, +.ant-menu-inline .ant-menu-submenu-title { + width: 100% !important; +} + +.ns-basic-table .ant-btn:hover { + border-color: transparent !important; +} + +.ns-basic-table .ant-btn-link:hover { + background: none !important; +} + +// .ns-detail { +// padding: 0px 24px 10px 24px !important; +// } + +.ant-tabs-nav-wrap { + padding: 0 24px; // 列表tab边距 +} + +.ant-tabs-nav { + margin: 0 !important; // 列表tab下边距 +} + +.ns-richText-ZIndex { + z-index: 1; +} + +.ant-input-number { + width: 100%; //inputNumber组件宽度 +} + +// header菜单字体样式 +.ant-menu-dark.ant-menu-horizontal>.ant-menu-item, +.ant-menu-dark.ant-menu-horizontal>.ant-menu-submenu { + color: #fff; +} + +.ant-menu-dark .ant-menu-item, +.ant-menu-dark .ant-menu-item-group-title, +.ant-menu-dark .ant-menu-item>a, +.ant-menu-dark .ant-menu-item>span>a { + color: #fff; +} + +@font-face { + /*给字体命名*/ + font-family: 'YouSheBiaoTiHei'; + /*引入字体文件*/ + src: url('/font/YouSheBiaoTiHei.ttf'); + font-weight: normal; + font-style: normal; +} + +@font-face { + /*给字体命名*/ + font-family: 'DIN Alternate'; + /*引入字体文件*/ + src: url('/font/DIN Alternate Bold.ttf'); + font-weight: normal; + font-style: normal; +} + +@font-face { + /*给字体命名*/ + font-family: 'PingFang Regular'; + /*引入字体文件*/ + src: url('/font/PingFang Regular.ttf'); + font-weight: normal; + font-style: normal; +} + +@font-face { + /*给字体命名*/ + font-family: 'HYYakuHei'; + /*引入字体文件*/ + src: url('/font/HYYakuHei-85W.ttf'); + font-weight: normal; + font-style: normal; +} +// .ant-popover-message { +// width: 250px !important; +// height: 198px !important; +// overflow: auto !important; +// position: relative; + +// padding: 0; +// color: rgba(0, 0, 0, 0.85); +// font-size: 14px; +// } +// .ant-popover-inner-content { +// /* padding: 12px 16px; */ +// padding: 0; +// color: rgba(0, 0, 0, 0.85); +// } + +.ant-menu-title-content { + svg { + color: #A1ABC2; + } +} + +.ant-menu-item-selected { + svg { + color: #D0DBF5; + } +} + +//状态颜色 +.commonStatus { + &::before{ + content: ''; + width: 8px; + height: 8px; + display: inline-block; + border-radius: 50%; + vertical-align: middle; + margin-right: 4px; + } +} + +.statusWarn { + &::before{ + background-color: #fa8214; + } +} + +.statusSuccess { + &::before{ + background-color: #0D9E3E; + } +} + +.statusRunning { + &::before{ + background-color: #1C4DDC; + } +} +.statusError { + &::before{ + background-color: #D4321C; + } +} + +.statusEmpty { + &::before{ + width:0; + } + width:0; +} + +.statusNotStart { + &::before{ + background-color: #8B98AB; + } +} + +.statusDone{ + &::before{ + background-color: #697383; + } +} + +.statusInvalid{ + &::before{ + background-color: #AEAEAE; + } +} diff --git a/hx-op/src/theme/global.scss b/hx-op/src/theme/global.scss new file mode 100644 index 0000000..5bf90bf --- /dev/null +++ b/hx-op/src/theme/global.scss @@ -0,0 +1,73 @@ +@font-face { + font-family: 'QuartzMS'; + src: url('/asset/font/QuartzMS.TTF') format('truetype'); +} + +@font-face { + font-family: 'FZDeSHJW_511M'; + src: url('/asset/font/FZDeSHJW_511M.TTF') format('truetype'); +} + +@font-face { + font-family: 'Fzltth_SC'; + src: url('/asset/font/Fzltth_SC.otf') format('truetype'); +} + +//侧边导航 +// .ant-menu:not(.ant-menu-horizontal) .ant-menu-item-selected { +// background: rgb(229, 247, 249) !important; +// } + + + +.ant-menu-inline .ant-menu-item, +.ant-menu-inline .ant-menu-submenu-title { + width: 100% !important; +} + +.ns-basic-table .ant-btn:hover { + border-color: transparent !important; +} + +.ns-basic-table .ant-btn-link:hover { + background: none !important; +} + +// .ns-detail { +// padding: 0px 24px 10px 24px !important; +// } + +.ant-tabs-nav-wrap { + padding: 0 24px; // 列表tab边距 +} + +.ant-tabs-nav { + margin: 0 !important; // 列表tab下边距 +} + +.ns-richText-ZIndex { + z-index: 1; +} + +.ant-input-number { + width: 100%; //inputNumber组件宽度 +} + +// header菜单字体样式 +.ant-menu-dark.ant-menu-horizontal>.ant-menu-item, +.ant-menu-dark.ant-menu-horizontal>.ant-menu-submenu { + color: #fff; +} + +.ant-menu-dark .ant-menu-item, +.ant-menu-dark .ant-menu-item-group-title, +.ant-menu-dark .ant-menu-item>a, +.ant-menu-dark .ant-menu-item>span>a { + color: #fff; +} +.ant-menu-horizontal:not(.ant-menu-dark) > .ant-menu-item:hover::after, .ant-menu-horizontal:not(.ant-menu-dark) > .ant-menu-submenu:hover::after, .ant-menu-horizontal:not(.ant-menu-dark) > .ant-menu-item-active::after, .ant-menu-horizontal:not(.ant-menu-dark) > .ant-menu-submenu-active::after, .ant-menu-horizontal:not(.ant-menu-dark) > .ant-menu-item-open::after, .ant-menu-horizontal:not(.ant-menu-dark) > .ant-menu-submenu-open::after, .ant-menu-horizontal:not(.ant-menu-dark) > .ant-menu-item-selected::after, .ant-menu-horizontal:not(.ant-menu-dark) > .ant-menu-submenu-selected::after { + border-bottom: unset !important; +} +.ant-menu-horizontal{ + border-bottom: unset !important; +} \ No newline at end of file diff --git a/hx-op/src/theme/theme.scss b/hx-op/src/theme/theme.scss new file mode 100644 index 0000000..df57b96 --- /dev/null +++ b/hx-op/src/theme/theme.scss @@ -0,0 +1,2 @@ +@import "variable"; +@import "global"; diff --git a/hx-op/src/theme/variable.less b/hx-op/src/theme/variable.less new file mode 100644 index 0000000..dba1764 --- /dev/null +++ b/hx-op/src/theme/variable.less @@ -0,0 +1,36 @@ +// @import "./global-antd.less"; +@primary-color: #ff7602; // 全局主色 +@layout-header-hover: #924908; //hover +@layout-header-background: #111519; // 头部背景色 +// @layout-header-background:url(/asset/image/header_background.png) no-repeat; +// @ant-layout-sider-collapsed-background:url(/asset/image/sider_collapsed_background.png) no-repeat; + + +//btn +// @btn-height-base: 30px; +// @btn-height-lg: 30px; +// @btn-disable-bg: #dfe3e9; //禁用按钮background +// @btn-disable-border: 1px solid #ced0da; + +// @btn-link-hover-bg: #37ABC4; +// @btn-text-hover-bg: #46ebdb; + + +// //input +// @input-height-base: 30px; + + +// //form +// @label-color: #52616f; //form-lable颜色 + + +// @form-item-margin-bottom: 16px; + +// //menu + + +//spin + + +// @border-width-base: 1px; +// @border-style-base: solid; \ No newline at end of file diff --git a/hx-op/src/types.d.ts b/hx-op/src/types.d.ts new file mode 100644 index 0000000..df9f4ba --- /dev/null +++ b/hx-op/src/types.d.ts @@ -0,0 +1 @@ +declare module '*.vue'; diff --git a/hx-op/src/util/debounce.ts b/hx-op/src/util/debounce.ts new file mode 100644 index 0000000..6d63f8d --- /dev/null +++ b/hx-op/src/util/debounce.ts @@ -0,0 +1,21 @@ +export function debounce(_this: any, fn: (arg0: any) => void) { + // 用rAF去做防抖 + return function (...args: any) { + if (_this.lock) return; + const run = function () { + // requestIdleCallback-任务调度 + window.requestIdleCallback(function (deadline) { + _this.lock = true; + // 判断空闲时间 + // 显示器刷新频率HZ 16.7ms内不会重复执行 + if (deadline.timeRemaining() > 1000 / 60) { + fn(...args); + _this.lock = false; + } else { + run(); + } + }); + }; + run(); + }; +} diff --git a/hx-op/src/view/developing.vue b/hx-op/src/view/developing.vue new file mode 100644 index 0000000..bac8852 --- /dev/null +++ b/hx-op/src/view/developing.vue @@ -0,0 +1,17 @@ + + + diff --git a/hx-op/src/view/organizationManage/enterpriseManage/TreeAdd.vue b/hx-op/src/view/organizationManage/enterpriseManage/TreeAdd.vue new file mode 100644 index 0000000..b552187 --- /dev/null +++ b/hx-op/src/view/organizationManage/enterpriseManage/TreeAdd.vue @@ -0,0 +1,74 @@ + + + + + diff --git a/hx-op/src/view/organizationManage/enterpriseManage/config.ts b/hx-op/src/view/organizationManage/enterpriseManage/config.ts new file mode 100644 index 0000000..1a8869a --- /dev/null +++ b/hx-op/src/view/organizationManage/enterpriseManage/config.ts @@ -0,0 +1,335 @@ +import { mockData } from './mock'; +import { cloneDeep } from 'lodash-es'; +import { Modal } from 'ant-design-vue'; +import { createVNode, ref } from 'vue'; +import { NsMessage } from '/nerv-lib/component'; +import { ExclamationCircleOutlined } from '@ant-design/icons-vue'; +import { enterPrise } from '/@/api/origanizemanage'; + +export const formConfig = [ + { + field: 'zuzhi', + label: '组织ID', + component: 'NsInput', + componentProps: { + placeholder: '请输入组织ID', + }, + rules: [ + { + required: true, + message: '请输入组织编号', + trigger: 'blur', + }, + ], + }, + { + field: 'jituanname', + label: '企业名称', + component: 'NsInput', + componentProps: { + placeholder: '请输入企业名称', + maxLength: 20, + }, + rules: [ + { + required: true, + message: '请输入企业名称', + trigger: 'blur', + }, + ], + }, + { + field: 'jituanname', + label: '集团名称', + component: 'NsInput', + componentProps: { + placeholder: '请输入集团名称', + maxLength: 20, + }, + }, + { + field: 'cityName', + label: '省市区', + component: 'NsInputCity', + defaultValue: '', + fieldMap: ['provinceName', 'cityName', 'areaName', 'province', 'city', 'area'], + componentProps: { + placeholder: '请选择', + api: '/api/parking_merchant/objs/BaseArea', + isSeparate: true, + }, + rules: [ + { + required: true, + message: '请选择区域', + trigger: 'blur', + }, + ], + }, + { + field: 'address', + label: '地址', + component: 'NsInput', + componentProps: { + placeholder: '请输入地址', + maxLength: 50, + }, + }, + { + field: 'person', + label: '联系人', + component: 'NsInput', + componentProps: { + placeholder: '请输入联系人', + maxLength: 10, + }, + rules: [ + { + required: true, + message: '请输入联系人', + trigger: 'blur', + }, + ], + }, + { + field: 'phone', + label: '联系电话', + component: 'NsInput', + componentProps: { + placeholder: '请输入联系电话', + maxLength: 11, + }, + rules: [ + { + required: true, + message: '请输入联系电话', + trigger: 'blur', + }, + ], + }, +]; + +export const tableConfig = (visible) => { + return { + // title: '企业管理', + api: enterPrise.list, + headerActions: [ + { + label: '新增', + name: 'RoleTypeAdd', + type: 'primary', + handle: () => { + opMap.type = 'add'; + opMap.fuc = (formData: any) => { + console.log(formData, 'formData'); + mockData.value.push({ + id: Math.random().toString().slice(2, 6), + ...cloneDeep(formData), + }); + }; + visible.value = true; + }, + }, + ], + + rowSelection: null, + columns: [ + { + title: '序号', + dataIndex: 'address', + width: 80, + customRender: (text: any) => { + return text.index + 1; + }, + }, + { + title: '组织ID', + dataIndex: 'orgCode', + }, + { + title: '集团名称', + dataIndex: 'intro', + }, + { + title: '组织名称', + dataIndex: 'orgName', + }, + { + title: '状态', + dataIndex: 'status', + }, + { + title: '省市区', + dataIndex: 'area', + customRender: ({ record }) => { + const { province = '', city = '', county = '' } = record; + return `${province}/${city}/${county}`; + }, + }, + { + title: '地址', + dataIndex: 'address', + }, + { + title: '联系人', + dataIndex: 'person', + }, + { + title: '联系电话', + dataIndex: 'phone', + }, + ], + columnActions: { + title: '操作', + actions: [ + { + label: '编辑', + name: 'RoleTypeEdit', + handle: (record: any) => { + console.log(record, 'record'); + formData.value = record; + opMap.type = 'edit'; + opMap.fuc = (formData: any) => { + Object.assign(mockData.value.filter((item) => item.id === record.id)[0], formData); + }; + visible.value = true; + }, + }, + { + label: '组织边界', + handle: (record: any) => { + console.log(record, 'record'); + borderVisible.value = true; + }, + }, + { + label: '服务', + handle: (record: any) => { + console.log(record, 'record'); + serviceVisible.value = true; + }, + }, + { + label: '冻结', + name: 'RoleTypeEdit', + handle: (record: any) => { + console.log(record, 'record'); + Modal.confirm({ + title: '是否冻结该账户', + icon: createVNode(ExclamationCircleOutlined), + content: createVNode('div', { style: 'color:red;' }, ''), + onOk() { + NsMessage.success('冻结成功'); + }, + class: 'test', + }); + }, + }, + { + label: '重置密码', + name: 'RoleTypeEdit', + handle: (record: any) => { + console.log(record, 'record'); + Modal.confirm({ + title: '重置密码', + icon: createVNode(ExclamationCircleOutlined), + okText: '重置', + content: h('div', {}, [ + h('p', `企业名称: ${record.jituanname}`), + h('p', '管理员账号: hxdtadmin'), + ]), + onOk() { + Modal.confirm({ + icon: createVNode(ExclamationCircleOutlined), + content: '是否确认重置该企业管理员密码', + onOk() { + Modal.success({ + okText: '确认', + content: h('div', {}, [ + h('p', '重置成功'), + h('p', '点击【确认】后自动复制密码并离开'), + ]), + }); + }, + }); + }, + + onCancel() { + console.log('Cancel'); + }, + class: 'test', + }); + }, + }, + { + label: '删除', + name: 'RoleTypeEdit', + dynamicParams: 'orgId', + confirm: true, + isReload: true, + api: enterPrise.del, + }, + ], + }, + + formConfig: { + schemas: [ + { + field: 'zuzhibianhao', + label: '组织ID', + component: 'NsInput', + componentProps: { + maxLength: 20, + }, + }, + { + field: 'jituanname', + label: '集团名称', + component: 'NsInput', + componentProps: { + maxLength: 20, + }, + }, + { + field: 'zuzhiname', + label: '组织名称', + component: 'NsInput', + componentProps: { + maxLength: 20, + }, + }, + { + field: 'status', + label: '状态', + component: 'NsSelect', + componentProps: { + options: [ + { + label: '正常', + value: 1, + }, + { + label: '冻结', + value: 2, + }, + ], + }, + }, + { + field: 'cityName', + label: '城市地区', + component: 'NsInputCity', + defaultValue: '', + fieldMap: ['provinceName', 'cityName', 'areaName', 'province', 'city', 'area'], + componentProps: { + api: '/api/parking_merchant/objs/BaseArea', + isSeparate: true, + }, + }, + ], + params: {}, + }, + // pagination: { defaultPageSize: 10 }, + rowKey: 'id', + }; +}; diff --git a/hx-op/src/view/organizationManage/enterpriseManage/index.vue b/hx-op/src/view/organizationManage/enterpriseManage/index.vue new file mode 100644 index 0000000..2aa8150 --- /dev/null +++ b/hx-op/src/view/organizationManage/enterpriseManage/index.vue @@ -0,0 +1,175 @@ + + + + diff --git a/hx-op/src/view/organizationManage/enterpriseManage/mock.ts b/hx-op/src/view/organizationManage/enterpriseManage/mock.ts new file mode 100644 index 0000000..57d2e68 --- /dev/null +++ b/hx-op/src/view/organizationManage/enterpriseManage/mock.ts @@ -0,0 +1,43 @@ +import { ref } from 'vue'; + +export const mockData = ref([ + { + id: 3, + zuzhi: '22', + jituanname: 'axb', + zuzhiname: '张三', + status: '男', + area: '123456789', + address: '1234567889', + person: '1', + phone: '1', + }, +]); + +export const mockData2 = ref([ + { + information: '铁路局1/产品部1/产品总监1', + }, +]); + +export const treeData = ref([ + { + title: '铁路总局', + key: '0-0', + children: [ + { title: '济阳站', key: '0-0-0' }, + { title: '临沂站', key: '0-0-1' }, + ], + }, +]); + +export const treeData2 = [ + { + title: '全部', + key: '0-0', + children: [ + { title: '产品部', key: '0-0-0' }, + { title: '运维部', key: '0-0-1' }, + ], + }, +]; diff --git a/hx-op/tsconfig.json b/hx-op/tsconfig.json new file mode 100644 index 0000000..de08b71 --- /dev/null +++ b/hx-op/tsconfig.json @@ -0,0 +1,51 @@ +{ + "compilerOptions": { + "allowJs": true, + "baseUrl": "./", + "esModuleInterop": true, + "forceConsistentCasingInFileNames": true, + "jsx": "preserve", + "lib": ["esnext", "dom"], + "module": "esnext", + "moduleResolution": "node", + "noUnusedLocals": true, + "noUnusedParameters": true, + "paths": { + "/@/*": [ + "src/*" + ], + "/nerv-lib/*": [ + "../lib/*" + ], + "/nerv-base/*": [ + "../lib/saas/*" + ], + "/type/*": [ + "../type/*" + ] + }, + "resolveJsonModule": true, + "skipLibCheck": true, + "sourceMap": true, + "strict": true, + "strictFunctionTypes": false, + "target": "esnext", + "typeRoots": [ + "../node_modules/@types", + "../node_modules/@vue", + "../type" + ], + "types": ["vite/client"] + }, + "include": [ + "src/**/*", + "type/**/*", + "mock/**/*", + "vite.config.ts" + ], + "exclude": [ + "node_modules", + "dist", + "**/*.js" + ] +} diff --git a/hx-op/vite.config.ts b/hx-op/vite.config.ts new file mode 100644 index 0000000..7372520 --- /dev/null +++ b/hx-op/vite.config.ts @@ -0,0 +1,20 @@ +import configFun from '../build/vite-default.config'; +const dirname = __dirname; +const proxy = { + '/qa': { + target: 'http://100.86.13.179:8080/qa', + // target: 'http://100.86.13.206:8081/qa', + changeOrigin: true, + rewrite: (path) => path.replace(/^\/qa/, ''), + }, + '/carbon_emission': { + target: 'http://140.210.143.1:14492', + changeOrigin: true, + }, + '/carbon-smart': { + target: 'http://192.168.112.144:8224', + changeOrigin: true, + rewrite: (path) => path.replace(/^\/carbon-smart/, ''), + }, +}; +export default configFun({ dirname, proxy, serviceMode: 'saas', baseDir: '../' }); diff --git a/lib/component/table/table.vue b/lib/component/table/table.vue index 2d7203e..86291cc 100644 --- a/lib/component/table/table.vue +++ b/lib/component/table/table.vue @@ -353,7 +353,7 @@ } const tableChangeEvent = (pagination: Props, filters: [], sorter: any) => { - // console.log('params', pagination, filters, sorter); + console.log('params', pagination, filters, sorter); if (sorter?.field) { if (sorter.order) { orderRef.value = { @@ -383,7 +383,7 @@ if (pagination) { const current = get(dataRef.value, props.pageField); - console.log(current); + function getTotal() { let total = 0; if (isFunction(getPageParams)) { @@ -393,7 +393,6 @@ } return total; } - console.log('current', (current >= 0 ? current : 0) + props.pageFieldOffset); return { showQuickJumper: true, @@ -406,13 +405,15 @@ }, ...(pagination as Props), total: getTotal(), - current: (current >= 0 ? current : 0) + props.pageFieldOffset, // 后端1 开始 + current: (current >= 0 ? current : 1) + props.pageFieldOffset, // 后端1 开始 pageSize: get(dataRef.value, props.sizeField), }; } return false; }); + console.log(getPagination.value); + const getTableBindValues = computed(() => { const { params, dynamicParams } = props; return { diff --git a/lib/saas/config/table.config.ts b/lib/saas/config/table.config.ts index a03e63a..8d00c94 100644 --- a/lib/saas/config/table.config.ts +++ b/lib/saas/config/table.config.ts @@ -1,5 +1,5 @@ export const tableConfig = { - pageField: 'data.pages', //当前页 + pageField: 'data.current', //当前页 pageCount: 'data.pageCount', //当前页 sizeField: 'data.size', // 每页数量 listField: 'data.records', // 数据集合 diff --git a/lib/saas/view/system/layout/header.vue b/lib/saas/view/system/layout/header.vue index 51b489f..ff314fd 100644 --- a/lib/saas/view/system/layout/header.vue +++ b/lib/saas/view/system/layout/header.vue @@ -10,7 +10,7 @@
- +
diff --git a/package.json b/package.json index e5f1eea..43097c8 100644 --- a/package.json +++ b/package.json @@ -9,6 +9,8 @@ "start": "npm run dev", "ai": "vite serve ./hx-ai-intelligent --config ./hx-ai-intelligent/vite.config.ts", "ai-build": "cross-env NODE_ENV=production vite build ./hx-ai-intelligent --config ./hx-ai-intelligent/vite.config.ts", + "ai-op": "vite serve ./hx-op --config ./hx-op/vite.config.ts", + "ai-op-build": "cross-env NODE_ENV=production vite build ./hx-op --config ./hx-op/vite.config.ts", "dev": "vite", "lint:eslint-fix": "eslint --cache --max-warnings 0 \"{src,mock}/**/*.{vue,ts,tsx}\" --fix", "build": "cross-env NODE_ENV=production vite build ", @@ -34,7 +36,6 @@ "dayjs": "^1.11.2", "echarts": "^5.3.2", "echarts-gl": "^2.0.9", - "element-plus": "^2.7.4", "element-resize-detector": "^1.2.4", "exceljs": "^4.3.0", "file-saver": "^2.0.5",