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

3 lines
80 KiB
JavaScript
Raw Normal View History

2025-01-22 10:53:47 +08:00
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-malfunc-repair-repair-details"],{1599:function(t,e,a){var i=a("ccf1");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);var n=a("967d").default;n("88f6bdc6",i,!0,{sourceMap:!1,shadowMode:!1})},"1f11":function(t,e,a){"use strict";(function(t){a("6a54");var i=a("f5bd").default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,a("aa9c"),a("e966"),a("f7a5"),a("dd2b");var n=i(a("2634")),o=i(a("2fdc")),r=a("779a"),c=a("8251"),s=i(a("7f7da")),f=(a("c8a3"),{components:{UniPopup:s.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:{circulation:function(){this.$refs.popup.open()},closeCirculation:function(){this.$refs.popup.close()},submit:function(){var t=this;if("0"!=t.item.reply_flag){var 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-repair/repair-record?faultType="+t.item.fault_type;(0,c.alertTip)(e.returnMsg),setTimeout((function(){uni.redirectTo({url:a})}),1e3)}else(0,c.alertTip)(e.returnMsg)}))}})}else(0,c.alertTip)("您还没有进行回复,请先回复")},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)(e.returnMsg),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,n.default)().mark((function a(){var i,r,s;return(0,n.default)().wrap((function(a){while(1)switch(a.prev=a.next){case 0:i=0,r=[],s=e,uni.showActionSheet({itemList:["拍照","相册"],success:function(e){i=e.tapIndex,r=0==i?["camera"]:["album"],uni.chooseImage({count:3,sizeType:["compressed"],sourceType:r,quality:1,success:function(){var e=(0,o.default)((0,n.default)().mark((function e(a){var i,r,f,u;return(0,n.default)().wrap((function(e){while(1)switch(e.prev=e.next){case 0:i=a.tempFilePaths,r=function(e){if(s.imgs.length>3)return"break";uni.getImageInfo({src:i[e],success:function(){var a=(0,o.default)((0,n.default)().mark((function a(i){return(0,n.default)().wrap((function(a){while(1)switch(a.prev=a.next){case 0:(0,c.convertImgToBase64)(i.path,function(){var a=(0,o.default)((0,n.default)().mark((function a(i){var o,r,f,u,l,d,v,p,g;return(0,n.default)().wrap((function(a){while(1)switch(a.prev=a.next){case 0:if(!(s.imgs.length<3)){a.next=29;break}if(uni.showLoading({title:"图片上传中"}),o=i.length,r=7500,!(o<=r)){a.next=10;break}return f={base64:i,userId:(0,c.getStorage)("userInfo").userId+e,groupEnd:"1"},a.next=8,(0,c.uploadImg)(f).then((function(t){t=t.data,uni.hideLoading(),1!=t.returnCode?(0,c.alertTip)(t.returnMsg):(s.imgs.push(i),s.imgsId.push(t.returnData+".jpg"))}));case 8:a.next=29;break;case 10:u=parseInt(o/r),l=1;case 12:if(!(l<u+1)){a.next=28;break}if(l!=u){a.next=21;break}return d=i.slice((l-1)*r),t.log(d.length,"groupBaselength"),v={base64:d,userId:(0,c.getStorage)("userInfo").userId+e,groupEnd:"1"},a.next=19,(0,c.uploadImg)(v).then((function(t){if(t=t.data,1!=t.returnCode)return uni.hideLoading(),voi
/*! 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,n=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",f=r.toStringTag||"@@toStringTag";function u(t,e,a){return Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(P){u=function(t,e,a){return t[e]=a}}function l(t,e,a,i){var n=e&&e.prototype instanceof p?e:p,r=Object.create(n.prototype),c=new Q(i||[]);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(P){return{type:"throw",arg:P}}}t.wrap=l;var v={};function p(){}function g(){}function b(){}var m={};u(m,c,(function(){return this}));var h=Object.getPrototypeOf,x=h&&h(h(S([])));x&&x!==a&&n.call(x,c)&&(m=x);var A=b.prototype=p.prototype=Object.create(m);function w(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function y(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 f=d(t[o],t,r);if("throw"!==f.type){var u=f.arg,l=u.value;return l&&"object"==(0,i.default)(l)&&n.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){u.value=t,c(u)}),(function(t){return a("throw",t,c,s)}))}s(f.arg)})(o,r,a,c)}))}return a=a?a.then(c,c):c()}})}function C(t,e,a){var i="suspendedStart";return function(n,o){if("executing"===i)throw new Error("Generator is already running");if("completed"===i){if("throw"===n)throw o;return B()}for(a.method=n,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"===i)throw i="completed",a.arg;a.dispatchException(a.arg)}else"return"===a.method&&a.abrupt("return",a.arg);i="executing";var s=d(t,e,a);if("normal"===s.type){if(i=a.done?"completed":"suspendedYield",s.arg===v)continue;return{value:s.arg,done:a.done}}"throw"===s.type&&(i="completed",a.method="throw",a.arg=s.arg)}}}function k(t,e){var a=e.method,i=t.iterator[a];if(void 0===i)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 n=d(i,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,v;var o=n.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 Q(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function S(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,i=function e(){for(;++a<t.length;)if(n.call(t,a))return e.value=t[a],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:B}}function B(){return{value:void 0,done:!0}}return g.prototype=b,o(A,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:g,configurable:!0}),g.displayName=u(b,f,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,u(t,f,"GeneratorFunction")),t.prototype=Object.create(A),t},t.awrap=function(t){return{__await:t}},w(y.prototype),u(y.prototype,s,(function(){return this})),t.AsyncIterator=y,t.async=function(e,a,i,n,o){void 0===o&&(o=Promise);var r=new y(l(e,a,i,n),o);return t.isGeneratorFunction(a)?r:r.next().then((function(t){return t.do