hz-zhhq-app/unpackage/dist/build/web/static/js/pages-malfunc-check-repair-...

3 lines
86 KiB
JavaScript
Raw Normal View History

2025-01-22 10:53:47 +08:00
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-malfunc-check-repair-details-wb"],{"02be":function(t,e,a){"use strict";var n=a("93e6"),i=a.n(n);i.a},1599:function(t,e,a){var n=a("ccf1");n.__esModule&&(n=n.default),"string"===typeof n&&(n=[[t.i,n,""]]),n.locals&&(t.exports=n.locals);var i=a("967d").default;i("88f6bdc6",n,!0,{sourceMap:!1,shadowMode:!1})},1663:function(t,e,a){"use strict";(function(t){a("6a54");var n=a("f5bd").default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,a("aa9c"),a("e966"),a("f7a5"),a("dd2b");var i=n(a("2634")),o=n(a("2fdc")),r=a("779a"),c=a("8251"),s=n(a("7f7da")),u=n(a("6ab7")),f=(a("c8a3"),{components:{UniPopup:s.default,lFile:u.default},data:function(){return{callPhone:c.callPhone,vbPicture:c.vbPicture,formatImgUrl:c.formatImgUrl,userInfo:"",formatDate:c.formatDate,item:{},persons:[{name:"",id:""}],index:0,pageTitle:["报修","报事"],id:0,userId:(0,c.getStorage)("userInfo").id,imgs:[],imgsId:[],replyContent:"",showAlert:!1}},onLoad:function(t){this.userInfo=(0,c.getStorage)("userInfo"),this.id=t.id||0,this.getFaultRepairInfoById()},methods:{onOpenDoc:function(e){var a=this,n=this.getIcon(e);t.log(n),this.$refs.lFile.download(n).then((function(t){a.$refs.lFile.open(t)}))},getIcon:function(t){return"http://hz.witrear.logplat.top:27003/appImageDir/zhhq_sj/"+t.id+"."+t.file_type},circulation:function(){this.$refs.popup.open()},closeCirculation:function(){this.$refs.popup.close()},submit:function(){var t=this,e={method:r.finishFault,data:{userId:t.userId,id:t.id}};uni.showModal({title:"提示",content:"是否确认通过",success:function(a){a.confirm&&(0,c.callbackRequest)(e).then((function(e){if(e=e.data,1==e.returnCode){var a="/pages/malfunc-check/repair-record-wb?faultType="+t.item.fault_type;(0,c.alertTip)("已通过"),setTimeout((function(){uni.redirectTo({url:a})}),1e3)}else(0,c.alertTip)(e.returnMsg)}))}})},getFaultRepairInfoById:function(){var t=this,e={method:r.getFaultRepairInfoById,data:{userId:this.userId,id:this.id}};(0,c.callbackRequest)(e).then((function(e){e=e.data,1==e.returnCode?t.item=e.returnData:(0,c.alertTip)(e.returnMsg)}))},replyFaultRepairInfo:function(){var t=this;if(""!=this.replyContent){var e={method:r.replyFaultRepairInfo,data:{userId:this.userId,id:this.id,replyContent:this.replyContent,replyPic1:this.imgsId[0],replyPic2:this.imgsId[1]}};(0,c.callbackRequest)(e).then((function(e){e=e.data,1==e.returnCode?((0,c.alertTip)("已拒绝"),t.closeCirculation(),t.getFaultRepairInfoById()):(0,c.alertTip)(e.returnMsg)}))}else(0,c.alertTip)("请输入拒绝理由")},cancel:function(){this.$refs.popup.close()},chooseImg:function(){var e=this;return(0,o.default)((0,i.default)().mark((function a(){var n,r,s;return(0,i.default)().wrap((function(a){while(1)switch(a.prev=a.next){case 0:n=0,r=[],s=e,uni.showActionSheet({itemList:["拍照","相册"],success:function(e){n=e.tapIndex,r=0==n?["camera"]:["album"],uni.chooseImage({count:2,sizeType:["compressed"],sourceType:r,quality:1,success:function(){var e=(0,o.default)((0,i.default)().mark((function e(a){var n,r,u,f;return(0,i.default)().wrap((function(e){while(1)switch(e.prev=e.next){case 0:n=a.tempFilePaths,r=function(e){if(s.imgs.length>2)return"break";uni.getImageInfo({src:n[e],success:function(){var a=(0,o.default)((0,i.default)().mark((function a(n){return(0,i.default)().wrap((function(a){while(1)switch(a.prev=a.next){case 0:(0,c.convertImgToBase64)(n.path,function(){var a=(0,o.default)((0,i.default)().mark((function a(n){var o,r,u,f,l,d,v,b,p;return(0,i.default)().wrap((function(a){while(1)switch(a.prev=a.next){case 0:if(!(s.imgs.length<2)){a.next=29;break}if(uni.showLoading({title:"图片上传中"}),o=n.length,r=7500,!(o<=r)){a.next=10;break}return u={base64:n,userId:(0,c.getStorage)("userInfo").userId+e,groupEnd:"1"},a.next=8,(0,c.uploadImg)(u).then((function(t){t=t.data,uni.hideLoading(),1!=t.returnCode?(0,c.alertTip)(t.returnMsg):(s.imgs.push(n),s.imgsId.push(t.returnData+".jpg"))}));case 8:a.next=29;break;case 10:f=parseInt(o/r),l=1;case 12:if(!(l<f+1)){a.next=28;break}if(l!=f){a.ne
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
e.default=function(){return t};var t={},a=Object.prototype,i=a.hasOwnProperty,o=Object.defineProperty||function(t,e,a){t[e]=a.value},r="function"==typeof Symbol?Symbol:{},c=r.iterator||"@@iterator",s=r.asyncIterator||"@@asyncIterator",u=r.toStringTag||"@@toStringTag";function f(t,e,a){return Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(B){f=function(t,e,a){return t[e]=a}}function l(t,e,a,n){var i=e&&e.prototype instanceof b?e:b,r=Object.create(i.prototype),c=new S(n||[]);return o(r,"_invoke",{value:C(t,a,c)}),r}function d(t,e,a){try{return{type:"normal",arg:t.call(e,a)}}catch(B){return{type:"throw",arg:B}}}t.wrap=l;var v={};function b(){}function p(){}function g(){}var m={};f(m,c,(function(){return this}));var h=Object.getPrototypeOf,x=h&&h(h(Q([])));x&&x!==a&&i.call(x,c)&&(m=x);var w=g.prototype=b.prototype=Object.create(m);function y(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function A(t,e){var a;o(this,"_invoke",{value:function(o,r){function c(){return new e((function(a,c){(function a(o,r,c,s){var u=d(t[o],t,r);if("throw"!==u.type){var f=u.arg,l=f.value;return l&&"object"==(0,n.default)(l)&&i.call(l,"__await")?e.resolve(l.__await).then((function(t){a("next",t,c,s)}),(function(t){a("throw",t,c,s)})):e.resolve(l).then((function(t){f.value=t,c(f)}),(function(t){return a("throw",t,c,s)}))}s(u.arg)})(o,r,a,c)}))}return a=a?a.then(c,c):c()}})}function C(t,e,a){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return P()}for(a.method=i,a.arg=o;;){var r=a.delegate;if(r){var c=k(r,a);if(c){if(c===v)continue;return c}}if("next"===a.method)a.sent=a._sent=a.arg;else if("throw"===a.method){if("suspendedStart"===n)throw n="completed",a.arg;a.dispatchException(a.arg)}else"return"===a.method&&a.abrupt("return",a.arg);n="executing";var s=d(t,e,a);if("normal"===s.type){if(n=a.done?"completed":"suspendedYield",s.arg===v)continue;return{value:s.arg,done:a.done}}"throw"===s.type&&(n="completed",a.method="throw",a.arg=s.arg)}}}function k(t,e){var a=e.method,n=t.iterator[a];if(void 0===n)return e.delegate=null,"throw"===a&&t.iterator["return"]&&(e.method="return",e.arg=void 0,k(t,e),"throw"===e.method)||"return"!==a&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+a+"' method")),v;var i=d(n,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,v;var o=i.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,v):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,v)}function E(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 I(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function S(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function Q(t){if(t){var e=t[c];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,n=function e(){for(;++a<t.length;)if(i.call(t,a))return e.value=t[a],e.done=!1,e;return e.value=void 0,e.done=!0,e};return n.next=n}}return{next:P}}function P(){return{value:void 0,done:!0}}return p.prototype=g,o(w,"constructor",{value:g,configurable:!0}),o(g,"constructor",{value:p,configurable:!0}),p.displayName=f(g,u,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,f(t,u,"GeneratorFunction")),t.prototype=Object.create(w),t},t.awrap=function(t){return{__await:t}},y(A.prototype),f(A.prototype,s,(function(){return this})),t.AsyncIterator=A,t.async=function(e,a,n,i,o){void 0===o&&(o=Promise);var r=new A(l(e,a,n,i),o);return t.isGeneratorFunction(a)?r:r.next().then((function(t){return t.do