1 line
25 KiB
JavaScript
1 line
25 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-projectEnd-qualitySpringback-selectPage"],{"087b":function(t,e,i){"use strict";i.r(e);var n=i("433c"),r=i.n(n);for(var o in n)"default"!==o&&function(t){i.d(e,t,(function(){return n[t]}))}(o);e["default"]=r.a},"0912":function(t,e,i){"use strict";var n=i("7782"),r=i.n(n);r.a},"199c":function(t,e,i){var n=i("d598");"string"===typeof n&&(n=[[t.i,n,""]]),n.locals&&(t.exports=n.locals);var r=i("4f06").default;r("5b63079c",n,!0,{sourceMap:!1,shadowMode:!1})},"1da1":function(t,e,i){"use strict";function n(t,e,i,n,r,o,a){try{var s=t[o](a),l=s.value}catch(c){return void i(c)}s.done?e(l):Promise.resolve(l).then(n,r)}function r(t){return function(){var e=this,i=arguments;return new Promise((function(r,o){var a=t.apply(e,i);function s(t){n(a,r,o,s,l,"next",t)}function l(t){n(a,r,o,s,l,"throw",t)}s(void 0)}))}}i("d3b7"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=r},2909:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=l;var n=s(i("6005")),r=s(i("db90")),o=s(i("06c5")),a=s(i("3427"));function s(t){return t&&t.__esModule?t:{default:t}}function l(t){return(0,n.default)(t)||(0,r.default)(t)||(0,o.default)(t)||(0,a.default)()}},"313a":function(t,e,i){"use strict";i.r(e);var n=i("f8df"),r=i.n(n);for(var o in n)"default"!==o&&function(t){i.d(e,t,(function(){return n[t]}))}(o);e["default"]=r.a},3427:function(t,e,i){"use strict";function n(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}Object.defineProperty(e,"__esModule",{value:!0}),e.default=n},"3b61":function(t,e,i){"use strict";i.r(e);var n=i("f4e2"),r=i("087b");for(var o in r)"default"!==o&&function(t){i.d(e,t,(function(){return r[t]}))}(o);i("0912");var a,s=i("f0c5"),l=Object(s["a"])(r["default"],n["b"],n["c"],!1,null,"461b0680",null,!1,n["a"],a);e["default"]=l.exports},"3d54":function(t,e,i){"use strict";var n=i("4ea4");i("d3b7"),i("e25e"),Object.defineProperty(e,"__esModule",{value:!0}),e.resolveFile=a,e.getDirSize=s,e.removeDir=l,e.formatSize=c,Object.defineProperty(e,"storage",{enumerable:!0,get:function(){return o.default}}),i("96cf");var r=n(i("1da1")),o=n(i("87ad"));function a(t){return new Promise((function(t){t(null)}))}function s(t){return new Promise(function(){var t=(0,r.default)(regeneratorRuntime.mark((function t(e){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:e(0);case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}())}function l(t){return new Promise(function(){var t=(0,r.default)(regeneratorRuntime.mark((function t(e){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:e(!1);case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}())}function c(t){var e=parseInt(t);return 0===e?"0B":e<1024?e+"B":e<1048576?(e/1024).toFixed(2)+"KB":e<1073741824?(e/1048576).toFixed(2)+"MB":(e/1073741824).toFixed(2)+"GB"}},"433c":function(t,e,i){"use strict";var n=i("4ea4");Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n(i("9931")),o={props:["showBack","themeType"],components:{uniIcons:r.default},data:function(){return{mobileTopHeight:0}},mounted:function(){var t=this;uni.getSystemInfo({success:function(e){t.mobileTopHeight=e.statusBarHeight,uni.setStorageSync("systemInfo",e),console.log(e)}}),console.log("this.mobileTopHeight",this.mobileTopHeight)},methods:{goBackFn:function(){uni.navigateBack({success:function(){}})}}};e.default=o},"519f":function(t,e,i){"use strict";i.r(e);var n=i("c2a8"),r=i("313a");for(var o in r)"default"!==o&&function(t){i.d(e,t,(function(){return r[t]}))}(o);i("8530");var a,s=i("f0c5"),l=Object(s["a"])(r["default"],n["b"],n["c"],!1,null,"12123236",null,!1,n["a"],a);e["default"]=l.exports},6005:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=o;var n=r(i("6b75"));function r(t){return t&&t.__esModule?t:{default:t}}function o(t){if(Array.isArray(t))return(0,n.default)(t)}},7782:function(t,e,i){var n=i("c58a");"string"===typeof n&&(n=[[t.i,n,""]]),n.locals&&(t.exports=n.locals);var r=i("4f06").default;r("ee2056aa",n,!0,{sourceMap:!1,shadowMode:!1})},8530:function(t,e,i){"use strict";var n=i("199c"),r=i.n(n);r.a},"87ad":function(t,e,i){"use strict";var n=i("4ea4");i("a623"),i("4de4"),i("c740"),i("45fc"),i("a434"),i("b64b"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n(i("2909")),o=n(i("d4ec")),a=n(i("bee2")),s=function(){function t(e){(0,o.default)(this,t),this.name=e,this.db=uni.getStorageSync(e)||[]}return(0,a.default)(t,[{key:"insert",value:function(t){var e=t.url,i=t.local;if(e&&i){var n=(0,r.default)(this.storage),o=n.findIndex((function(t){return t.url===e}));return o>-1&&n.splice(o,1),n.push({url:e,local:i}),this.storage=n,n}}},{key:"delete",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=Object.keys(t),i=this.storage.filter((function(i){return!e.some((function(e){return t[e]===i[e]}))}));return this.storage=i,i}},{key:"select",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=Object.keys(t),i=this.storage.filter((function(i){return e.every((function(e){return t[e]===i[e]}))}));return i}},{key:"clear",value:function(){this.storage=[]}},{key:"storage",get:function(){return this.db},set:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return uni.setStorageSync(this.name,t),this.db=t,t}}]),t}(),l=new s("imgcache");e.default=l},"96cf":function(t,e){!function(e){"use strict";var i,n=Object.prototype,r=n.hasOwnProperty,o="function"===typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag",c="object"===typeof t,u=e.regeneratorRuntime;if(u)c&&(t.exports=u);else{u=e.regeneratorRuntime=c?t.exports:{},u.wrap=x;var d="suspendedStart",f="suspendedYield",h="executing",g="completed",v={},p={};p[a]=function(){return this};var m=Object.getPrototypeOf,b=m&&m(m(E([])));b&&b!==n&&r.call(b,a)&&(p=b);var y=_.prototype=L.prototype=Object.create(p);k.prototype=y.constructor=_,_.constructor=k,_[l]=k.displayName="GeneratorFunction",u.isGeneratorFunction=function(t){var e="function"===typeof t&&t.constructor;return!!e&&(e===k||"GeneratorFunction"===(e.displayName||e.name))},u.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,_):(t.__proto__=_,l in t||(t[l]="GeneratorFunction")),t.prototype=Object.create(y),t},u.awrap=function(t){return{__await:t}},I(S.prototype),S.prototype[s]=function(){return this},u.AsyncIterator=S,u.async=function(t,e,i,n){var r=new S(x(t,e,i,n));return u.isGeneratorFunction(e)?r:r.next().then((function(t){return t.done?t.value:r.next()}))},I(y),y[l]="Generator",y[a]=function(){return this},y.toString=function(){return"[object Generator]"},u.keys=function(t){var e=[];for(var i in t)e.push(i);return e.reverse(),function i(){while(e.length){var n=e.pop();if(n in t)return i.value=n,i.done=!1,i}return i.done=!0,i}},u.values=E,T.prototype={constructor:T,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=i,this.done=!1,this.delegate=null,this.method="next",this.arg=i,this.tryEntries.forEach(C),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=i)},stop:function(){this.done=!0;var t=this.tryEntries[0],e=t.completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(n,r){return s.type="throw",s.arg=t,e.next=n,r&&(e.method="next",e.arg=i),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var l=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(l&&c){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(t,e){for(var i=this.tryEntries.length-1;i>=0;--i){var n=this.tryEntries[i];if(n.tryLoc<=this.prev&&r.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,v):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),v},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var i=this.tryEntries[e];if(i.finallyLoc===t)return this.complete(i.completion,i.afterLoc),C(i),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var i=this.tryEntries[e];if(i.tryLoc===t){var n=i.completion;if("throw"===n.type){var r=n.arg;C(i)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:E(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=i),v}}}function x(t,e,i,n){var r=e&&e.prototype instanceof L?e:L,o=Object.create(r.prototype),a=new T(n||[]);return o._invoke=P(t,i,a),o}function w(t,e,i){try{return{type:"normal",arg:t.call(e,i)}}catch(n){return{type:"throw",arg:n}}}function L(){}function k(){}function _(){}function I(t){["next","throw","return"].forEach((function(e){t[e]=function(t){return this._invoke(e,t)}}))}function S(t){function e(i,n,o,a){var s=w(t[i],t,n);if("throw"!==s.type){var l=s.arg,c=l.value;return c&&"object"===typeof c&&r.call(c,"__await")?Promise.resolve(c.__await).then((function(t){e("next",t,o,a)}),(function(t){e("throw",t,o,a)})):Promise.resolve(c).then((function(t){l.value=t,o(l)}),(function(t){return e("throw",t,o,a)}))}a(s.arg)}var i;function n(t,n){function r(){return new Promise((function(i,r){e(t,n,i,r)}))}return i=i?i.then(r,r):r()}this._invoke=n}function P(t,e,i){var n=d;return function(r,o){if(n===h)throw new Error("Generator is already running");if(n===g){if("throw"===r)throw o;return B()}i.method=r,i.arg=o;while(1){var a=i.delegate;if(a){var s=O(a,i);if(s){if(s===v)continue;return s}}if("next"===i.method)i.sent=i._sent=i.arg;else if("throw"===i.method){if(n===d)throw n=g,i.arg;i.dispatchException(i.arg)}else"return"===i.method&&i.abrupt("return",i.arg);n=h;var l=w(t,e,i);if("normal"===l.type){if(n=i.done?g:f,l.arg===v)continue;return{value:l.arg,done:i.done}}"throw"===l.type&&(n=g,i.method="throw",i.arg=l.arg)}}}function O(t,e){var n=t.iterator[e.method];if(n===i){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=i,O(t,e),"throw"===e.method))return v;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return v}var r=w(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,v;var o=r.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=i),e.delegate=null,v):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,v)}function j(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function C(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function E(t){if(t){var e=t[a];if(e)return e.call(t);if("function"===typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){while(++n<t.length)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=i,e.done=!0,e};return o.next=o}}return{next:B}}function B(){return{value:i,done:!0}}}(function(){return this||"object"===typeof self&&self}()||Function("return this")())},a623:function(t,e,i){"use strict";var n=i("23e7"),r=i("b727").every,o=i("a640"),a=i("ae40"),s=o("every"),l=a("every");n({target:"Array",proto:!0,forced:!s||!l},{every:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}})},c2a8:function(t,e,i){"use strict";i.d(e,"b",(function(){return r})),i.d(e,"c",(function(){return o})),i.d(e,"a",(function(){return n}));var n={headers:i("3b61").default,uniIcons:i("9931").default},r=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("v-uni-view",{staticClass:"selectPage"},[i("headers",{attrs:{showBack:!0}},[i("v-uni-view",{staticClass:"headerName"},[t._v(t._s(t.isAdd?"选择测量位置":"已测量"))]),t.isNetwork?i("v-uni-view",{staticClass:"save_btn",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.saveImg.apply(void 0,arguments)}}},[t._v("缓存")]):t._e()],1),i("v-uni-view",{staticClass:"content"},[i("v-uni-view",{staticClass:"flex type"},[i("v-uni-view",{staticClass:"title"},[t._v("测量楼栋:")]),i("v-uni-picker",{staticClass:"picker",attrs:{value:t.buildIndex,range:t.buildList,"range-key":"buildName"},on:{change:function(e){arguments[0]=e=t.$handleEvent(e),t.pickerChangeBuild.apply(void 0,arguments)}}},[""===t.buildIndex?i("v-uni-view",{staticClass:"placeholder"},[t._v("请选择")]):i("v-uni-view",{staticClass:"uni-input"},[t._v(t._s(t.buildList[t.buildIndex].buildName)+"#")]),i("uni-icons",{staticClass:"arrowdown",attrs:{type:"arrowdown"}})],1)],1),i("v-uni-view",{staticClass:"flex type"},[i("v-uni-view",{staticClass:"title"},[t._v("选择楼层:")]),i("v-uni-picker",{staticClass:"picker",attrs:{value:t.floorIndex,range:t.floorList,"range-key":"floorName"},on:{change:function(e){arguments[0]=e=t.$handleEvent(e),t.pickerChangeFloor.apply(void 0,arguments)}}},[""===t.floorIndex||0==t.floorList.length?i("v-uni-view",{staticClass:"placeholder"},[t._v("请选择")]):i("v-uni-view",{staticClass:"uni-input"},[t._v(t._s(t.floorList[t.floorIndex].floorName)+"F")]),i("uni-icons",{staticClass:"arrowdown",attrs:{type:"arrowdown"}})],1)],1)],1),i("v-uni-movable-area",{ref:"movableBox",staticClass:"movableBox"},[i("v-uni-movable-view",{attrs:{direction:"all",x:t.changePos.x,y:t.changePos.y,friction:100,scale:"true","scale-min":"0.1","scale-max":"10","scale-value":t.changePos.scale},on:{scale:function(e){arguments[0]=e=t.$handleEvent(e),t.onScale.apply(void 0,arguments)},change:function(e){arguments[0]=e=t.$handleEvent(e),t.changePosFn.apply(void 0,arguments)}}},[i("v-uni-view",{staticClass:"drawing_wrap",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.clickDraw2.apply(void 0,arguments)}}},[i("v-uni-image",{ref:"drawing",staticClass:"drawing_bg",style:{width:t.imgOriginW+"px",height:t.imgOriginH+"px"},attrs:{src:t.smImg(t.url_config+"image/"+t.imgUrl)}}),t._l(t.markerList,(function(e,n){return i("v-uni-view",{key:n,staticClass:"marker",style:{top:e.coordinateY-20+"px",left:e.coordinateX+"px"}},[i("v-uni-view",{staticStyle:{"text-align":"center",color:"red"}},[t._v(t._s(e.surveyNo))]),1==e.resultType?i("v-uni-image",{staticClass:"addrImg",attrs:{src:"/static/addr_green.png"}}):i("v-uni-image",{staticClass:"addrImg",attrs:{src:"/static/addr_red.png"}})],1)}))],2)],1)],1),i("v-uni-view",{staticClass:"start_wrap"},[t.isCheck?i("v-uni-view",{staticClass:"start_btn",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.goDetails("")}}},[t._v("确认")]):t._e()],1)],1)},o=[]},c58a:function(t,e,i){var n=i("24fb");e=n(!1),e.push([t.i,'@charset "UTF-8";\r\n/**\r\n * 这里是uni-app内置的常用样式变量\r\n *\r\n * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量\r\n * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App\r\n *\r\n */\r\n/**\r\n * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能\r\n *\r\n * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\r\n */\r\n/* 颜色变量 */\r\n/* 行为相关颜色 */\r\n/* 文字基本颜色 */\r\n/* 背景颜色 */\r\n/* 边框颜色 */\r\n/* 尺寸变量 */\r\n/* 文字尺寸 */\r\n/* 图片尺寸 */\r\n/* Border Radius */\r\n/* 水平间距 */\r\n/* 垂直间距 */\r\n/* 透明度 */\r\n/* 文章场景相关 */.statusBar[data-v-461b0680]{background-color:#2a2b5b}.whiteHeaderBox .statusBar[data-v-461b0680]{background-color:#2b8df3}',""]),t.exports=e},d598:function(t,e,i){var n=i("24fb");e=n(!1),e.push([t.i,".flex[data-v-12123236]{display:flex;align-items:center}.flex2[data-v-12123236]{display:flex;align-items:center;justify-content:space-between}.flex3[data-v-12123236]{display:flex}.content[data-v-12123236]{padding:20px %?30?% 0}.title[data-v-12123236]{font-size:%?30?%;font-family:PingFangSC-Regular,PingFang SC;color:#372d66;line-height:%?42?%;margin-right:8px;width:90px;font-weight:400}.picker[data-v-12123236]{border:1px solid rgba(91,95,102,.5);padding:6px %?30?%;font-size:%?30?%;border-radius:30px;width:calc(100% - 90px);box-sizing:border-box;position:relative}.drawing_wrap[data-v-12123236]{position:relative}.drawing_bg[data-v-12123236]{\n\t/* width: 100%; */background-repeat:no-repeat;background-position:50%;background-size:100% auto\n\t/* height: 0px; */}.drawing_bg2[data-v-12123236]{padding-top:65%}.drawing_wrap .marker[data-v-12123236]{position:absolute;\n\t/* background-color: red; */width:18px;height:20px;z-index:111}.arrowdown[data-v-12123236]{position:absolute;top:10px;right:15px;color:#262d47;opacity:.8}.mapMarker[data-v-12123236]{position:absolute;top:20px;left:20px;z-index:999;width:30px;height:30px}.placeholder[data-v-12123236]{color:#999}.type[data-v-12123236]{margin-bottom:10px}uni-movable-view[data-v-12123236]{width:auto;height:auto;position:relative}.movableBox[data-v-12123236]{height:calc(100% - 300px);width:100%;position:fixed;overflow:hidden}.addrImg[data-v-12123236]{width:24px;height:24px}.start_wrap[data-v-12123236]{\n\t/* margin-top: 40px;\n\tmargin-bottom: 40px; */position:fixed;bottom:0;left:0;right:0;height:100px}.start_btn[data-v-12123236]{text-align:center;pos-bottom:20px;line-height:45px;width:60%;margin:0 auto;background-color:#488dec;color:#fff;border-radius:35px;box-shadow:0 2px 4px 0 rgba(43,141,243,.42)}.save_btn[data-v-12123236]{position:absolute;right:%?30?%;top:%?24?%;font-size:14px}",""]),t.exports=e},db90:function(t,e,i){"use strict";function n(t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}i("a4d3"),i("e01a"),i("d28b"),i("a630"),i("d3b7"),i("3ca3"),i("ddb0"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=n},f4e2:function(t,e,i){"use strict";i.d(e,"b",(function(){return r})),i.d(e,"c",(function(){return o})),i.d(e,"a",(function(){return n}));var n={uniIcons:i("9931").default},r=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("v-uni-view",{class:t.themeType?"whiteHeaderBox":""},[i("v-uni-view",{staticClass:"statusBar",style:{height:t.mobileTopHeight+"px"}}),i("v-uni-view",{staticClass:"headerBox"},[i("uni-icons",{directives:[{name:"show",rawName:"v-show",value:t.showBack,expression:"showBack"}],staticClass:"backImg",attrs:{type:"arrowleft",size:"24"},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.goBackFn.apply(void 0,arguments)}}}),t._t("default")],2)],1)},o=[]},f8df:function(t,e,i){"use strict";i("4160"),i("a434"),i("a9e3"),i("d3b7"),i("ac1f"),i("159b"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;i("3d54");var n=0,r=0,o={data:function(){return{projectSn:"",buildIndex:"",buildList:[],floorList:[],floorIndex:"",imgUrl:"",preserveX:0,preserveY:0,coordinateX:0,coordinateY:0,markerList:[],isAdd:!0,changePos:{y:0,scale:.5,x:0},imgRatioX:1,imgRatioY:1,imgOriginW:0,imgOriginH:0,movableBoxTop:0,imgScale:.5,isTest:!1,isCheck:!1,isNetwork:!0}},mounted:function(){var t=this;uni.getSystemInfo({success:function(e){var i=uni.createSelectorQuery().select(".movableBox");i.boundingClientRect((function(e){console.log("各种参数"),console.log(JSON.stringify(e)),t.movableBoxTop=e.top})).exec()}})},onLoad:function(t){this.projectSn=JSON.parse(uni.getStorageSync("projectDetail")).projectSn,"true"==t.isAdd?this.isAdd=!0:this.isAdd=!1,"true"==t.isTest?this.isTest=!0:this.isTest=!1},onShow:function(){var t=this;console.log("onShow selectPage"),setTimeout((function(){t.changePos.scale=.5,t.getFloorList()}),200),uni.getStorageSync("outLineData")&&!this.isNetwork&&(this.markerList=JSON.parse(uni.getStorageSync("outLineData")))},methods:{saveImg:function(){var t=this;console.log(12);var e=0;this.buildList.forEach((function(i){e++,i.floorList.forEach((function(i){if(i.drawingUrl){var n=t.url_config+"image/"+i.drawingUrl,r=t;setTimeout((function(){uni.downloadFile({url:n}).then((function(t){if(console.log(t),200!=t[1].statusCode)return Promise.reject("下载临时文件失败");uni.saveFile({tempFilePath:t[1].tempFilePath,success:function(t){console.log("下载完成:"+t.savedFilePath),console.log(r.url_config+"image/"+i.drawingUrl),uni.setStorageSync(r.url_config+"image/"+i.drawingUrl,t.savedFilePath)}}),e==r.buildList.length-1&&uni.showToast({title:"保存成功"})})).catch((function(t){console.log(t)}))}),1e3)}}))}))},smImg:function(t){var e=t;console.log(t);var i=uni.getStorageSync(e);console.log(i);var n="";return i?(console.log(t+"已缓存为:"+i),n=i):n=e,console.log(n),n},changePosFn:function(t){console.log("移动"),console.log(t.detail),this.changePos.x=t.detail.x,this.changePos.y=t.detail.y},onScale:function(t){console.log("缩放"),this.imgScale=t.detail.scale,this.changePos.x=this.changePos.x+t.detail.x,this.changePos.y=this.changePos.y+t.detail.y,console.log(t.detail)},getFloorList:function(){var t=this;uni.getNetworkType({success:function(e){if("none"==e.networkType){var i=uni.getStorageSync("foolrListData");if(t.buildIndex=0,t.buildList=i,t.floorList=i[0].floorList,t.floorIndex=0,console.log(i),t.imgUrl=t.floorList.length>0?i[0].floorList[0].drawingUrl:"",uni.getStorageSync("buildObj")){var n=uni.getStorageSync("buildObj");t.pickerChangeBuild({detail:{value:n.buildIndex}}),t.pickerChangeFloor({detail:{value:n.floorIndex}})}console.log(t.imgUrl);var r=t.buildList[t.buildIndex].floorList[t.floorIndex].imageLength,o=t.buildList[t.buildIndex].floorList[t.floorIndex].imageWidth;t.imgOriginW=o,t.imgOriginH=r,t.isNetwork=!1}else t.isNetwork=!0,t.sendRequest({url:"xmgl/massReboundBuild/getBuildFloorList",method:"post",data:{projectSn:t.projectSn},success:function(e){if(t.buildIndex=0,t.buildList=e.result,t.floorList=e.result[0].floorList,t.floorIndex=0,t.imgUrl=t.floorList.length>0?e.result[0].floorList[0].drawingUrl:"",uni.getStorageSync("buildObj")){var i=uni.getStorageSync("buildObj");t.pickerChangeBuild({detail:{value:i.buildIndex}}),t.pickerChangeFloor({detail:{value:i.floorIndex}})}uni.setStorageSync("foolrListData",e.result),setTimeout((function(){t.getMarkerList()}),500)}})}})},pickerChangeBuild:function(t){this.buildIndex=t.detail.value,this.floorList=this.buildList[this.buildIndex].floorList,this.floorIndex=0,this.floorList.length>0?(this.imgUrl=this.floorList[0].drawingUrl,this.getMarkerList()):(this.imgUrl="",this.markerList=[])},pickerChangeFloor:function(t){this.floorIndex=t.detail.value,this.imgUrl=this.floorList[this.floorIndex].drawingUrl,this.getMarkerList()},goDetails:function(t){var e={floorIndex:this.floorIndex,buildIndex:this.buildIndex};uni.setStorageSync("buildObj",e),this.buildList[this.buildIndex].floorList.length>0?uni.navigateTo({url:"./detail?buildName="+this.buildList[this.buildIndex].buildName+"&floorName="+this.buildList[this.buildIndex].floorList[this.floorIndex].floorName+"&floorId="+this.buildList[this.buildIndex].floorList[this.floorIndex].floorId+"&coordinateX="+this.coordinateX+"&coordinateY="+this.coordinateY+"&id="+t+"&isTest="+this.isTest}):uni.showToast({title:"请选择楼层"})},clickDraw:function(t){if(this.isAdd){var e=t.currentTarget.offsetLeft,i=t.currentTarget.offsetTop,o=t.touches[0].clientX,a=t.touches[0].clientY;this.preserveY=a-i-10,this.preserveX=o-e-9;var s=this.buildList[this.buildIndex].floorList[this.floorIndex].imageLength,l=this.buildList[this.buildIndex].floorList[this.floorIndex].imageWidth;if(n&&r){var c=(r/l).toFixed(2),u=(n/s).toFixed(2);this.coordinateX=(o-e)/Number(c),this.coordinateY=(a-i)/Number(u),console.log(this.coordinateX,this.coordinateY)}}},clickDraw2:function(t){console.log(t),console.log(t.detail.x,t.detail.y,this.imgScale,this.movableBoxTop),console.log(this.changePos.x,this.changePos.y),this.coordinateX=(t.detail.x-this.changePos.x)/this.imgScale-20/this.imgScale,this.coordinateY=(t.detail.y-this.changePos.y-this.movableBoxTop)/this.imgScale-50/this.imgScale,console.log(this.coordinateX,this.coordinateY),this.markerList.length>0?this.markerList[this.markerList.length-1].isNewPoint&&this.markerList.splice(this.markerList.length-1,1):this.markerList.splice(0,1),this.markerList.push({coordinateX:this.coordinateX,coordinateY:this.coordinateY,resultType:1,isNewPoint:!0}),this.isCheck=!0},getMarkerList:function(){var t=this;if(console.log("获取已测量点位"),this.isNetwork)this.sendRequest({url:"xmgl/massReboundSurveyArea/getMassReboundSurveyAreaList",method:"post",data:{floorId:this.buildList[this.buildIndex].floorList[this.floorIndex].floorId},success:function(e){var i=t.buildList[t.buildIndex].floorList[t.floorIndex].imageLength,n=t.buildList[t.buildIndex].floorList[t.floorIndex].imageWidth;t.imgOriginW=n,t.imgOriginH=i,t.markerList=e.result}});else{var e=this.buildList[this.buildIndex].floorList[this.floorIndex].imageLength,i=this.buildList[this.buildIndex].floorList[this.floorIndex].imageWidth;this.imgOriginW=i,this.imgOriginH=e,this.markerList=[]}}}};e.default=o}}]); |