1234567891011 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-59f40bd6"],{"408a":function(e,t,r){"use strict";var i=r("e330");e.exports=i(1..valueOf)},"4d6b":function(e,t,r){"use strict";r("7d66")},"51eb":function(e,t,r){"use strict";var i=r("825a"),a=r("485a"),n=TypeError;e.exports=function(e){if(i(this),"string"===e||"default"===e)e="string";else if("number"!==e)throw new n("Incorrect hint");return a(this,e)}},"7a82":function(e,t,r){"use strict";var i=r("23e7"),a=r("83ab"),n=r("9bf2").f;i({target:"Object",stat:!0,forced:Object.defineProperty!==n,sham:!a},{defineProperty:n})},"7c8d":function(e,t,r){
- /*!
- * Compressor.js v1.2.1
- * https://fengyuanchen.github.io/compressorjs
- *
- * Copyright 2018-present Chen Fengyuan
- * Released under the MIT license
- *
- * Date: 2023-02-28T14:09:41.732Z
- */
- (function(t,r){e.exports=r()})(0,(function(){"use strict";function e(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,i)}return r}function t(t){for(var r=1;r<arguments.length;r++){var i=null!=arguments[r]?arguments[r]:{};r%2?e(Object(i),!0).forEach((function(e){n(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):e(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,u(i.key),i)}}function a(e,t,r){return t&&i(e.prototype,t),r&&i(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function n(e,t,r){return t=u(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(){return o=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e},o.apply(this,arguments)}function s(e,t){if("object"!==typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,t||"default");if("object"!==typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function u(e){var t=s(e,"string");return"symbol"===typeof t?t:String(t)}var c={exports:{}};(function(e){"undefined"!==typeof window&&function(t){var r=t.HTMLCanvasElement&&t.HTMLCanvasElement.prototype,i=t.Blob&&function(){try{return Boolean(new Blob)}catch(e){return!1}}(),a=i&&t.Uint8Array&&function(){try{return 100===new Blob([new Uint8Array(100)]).size}catch(e){return!1}}(),n=t.BlobBuilder||t.WebKitBlobBuilder||t.MozBlobBuilder||t.MSBlobBuilder,o=/^data:((.*?)(;charset=.*?)?)(;base64)?,/,s=(i||n)&&t.atob&&t.ArrayBuffer&&t.Uint8Array&&function(e){var t,r,s,u,c,l,d,f,p;if(t=e.match(o),!t)throw new Error("invalid data URI");for(r=t[2]?t[1]:"text/plain"+(t[3]||";charset=US-ASCII"),s=!!t[4],u=e.slice(t[0].length),c=s?atob(u):decodeURIComponent(u),l=new ArrayBuffer(c.length),d=new Uint8Array(l),f=0;f<c.length;f+=1)d[f]=c.charCodeAt(f);return i?new Blob([a?d:l],{type:r}):(p=new n,p.append(l),p.getBlob(r))};t.HTMLCanvasElement&&!r.toBlob&&(r.mozGetAsFile?r.toBlob=function(e,t,i){var a=this;setTimeout((function(){i&&r.toDataURL&&s?e(s(a.toDataURL(t,i))):e(a.mozGetAsFile("blob",t))}))}:r.toDataURL&&s&&(r.msToBlob?r.toBlob=function(e,t,i){var a=this;setTimeout((function(){(t&&"image/png"!==t||i)&&r.toDataURL&&s?e(s(a.toDataURL(t,i))):e(a.msToBlob(t))}))}:r.toBlob=function(e,t,r){var i=this;setTimeout((function(){e(s(i.toDataURL(t,r)))}))})),e.exports?e.exports=s:t.dataURLtoBlob=s}(window)})(c);var l=c.exports,d=function(e){return"undefined"!==typeof Blob&&(e instanceof Blob||"[object Blob]"===Object.prototype.toString.call(e))},f={strict:!0,checkOrientation:!0,retainExif:!1,maxWidth:1/0,maxHeight:1/0,minWidth:0,minHeight:0,width:void 0,height:void 0,resize:"none",quality:.8,mimeType:"auto",convertTypes:["image/png"],convertSize:5e6,beforeDraw:null,drew:null,success:null,error:null},p="undefined"!==typeof window&&"undefined"!==typeof window.document,h=p?window:{},m=function(e){return e>0&&e<1/0},v=Array.prototype.slice;function b(e){return Array.from?Array.from(e):v.call(e)}var g=/^image\/.+$/;function y(e){return g.test(e)}function w(e){var t=y(e)?e.substr(6):"";return"jpeg"===t&&(t="jpg"),".".concat(t)}var k=String.fromCharCode;function j(e,t,r){var i,a="";for(r+=t,i=t;i<r;i+=1)a+=k(e.getUint8(i));return a}var x=h.btoa;function O(e,t){var r=[],i=8192,a=new Uint8Array(e);while(a.length>0)r.push(k.apply(null,b(a.subarray(0,i)))),a=a.subarray(i);return"data:".concat(t,";base64,").concat(x(r.join("")))}function L(e){var t,r=new DataView(e);try{var i,a,n;if(255===r.getUint8(0)&&216===r.getUint8(1)){var o=r.byteLength,s=2;while(s+1<o){if(255===r.getUint8(s)&&225===r.getUint8(s+1)){a=s;break}s+=1}}if(a){var u=a+4,c=a+10;if("Exif"===j(r,u,4)){var l=r.getUint16(c);if(i=18761===l,(i||19789===l)&&42===r.getUint16(c+2,i)){var d=r.getUint32(c+4,i);d>=8&&(n=c+d)}}}if(n){var f,p,h=r.getUint16(n,i);for(p=0;p<h;p+=1)if(f=n+12*p+2,274===r.getUint16(f,i)){f+=8,t=r.getUint16(f,i),r.setUint16(f,1,i);break}}}catch(m){t=1}return t}function F(e){var t=0,r=1,i=1;switch(e){case 2:r=-1;break;case 3:t=-180;break;case 4:i=-1;break;case 5:t=90,i=-1;break;case 6:t=90;break;case 7:t=90,r=-1;break;case 8:t=-90;break}return{rotate:t,scaleX:r,scaleY:i}}var S=/\.\d*(?:0|9){12}\d*$/;function P(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e11;return S.test(e)?Math.round(e*t)/t:e}function U(e){var t=e.aspectRatio,r=e.height,i=e.width,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"none",n=m(i),o=m(r);if(n&&o){var s=r*t;("contain"===a||"none"===a)&&s>i||"cover"===a&&s<i?r=i/t:i=r*t}else n?r=i/t:o&&(i=r*t);return{width:i,height:r}}function _(e){var t=b(new Uint8Array(e)),r=t.length,i=[],a=0;while(a+3<r){var n=t[a],o=t[a+1];if(255===n&&218===o)break;if(255===n&&216===o)a+=2;else{var s=256*t[a+2]+t[a+3],u=a+s+2,c=t.slice(a,u);i.push(c),a=u}}return i.reduce((function(e,t){return 255===t[0]&&225===t[1]?e.concat(t):e}),[])}function E(e,t){var r=b(new Uint8Array(e));if(255!==r[2]||224!==r[3])return e;var i=256*r[4]+r[5],a=[255,216].concat(t,r.slice(4+i));return new Uint8Array(a)}var A=h.ArrayBuffer,B=h.FileReader,T=h.URL||h.webkitURL,D=/\.\w+$/,C=h.Compressor,$=function(){function e(i,a){r(this,e),this.file=i,this.exif=[],this.image=new Image,this.options=t(t({},f),a),this.aborted=!1,this.result=null,this.init()}return a(e,[{key:"init",value:function(){var e=this,t=this.file,r=this.options;if(d(t)){var i=t.type;if(y(i))if(T&&B){A||(r.checkOrientation=!1,r.retainExif=!1);var a="image/jpeg"===i,n=a&&r.checkOrientation,s=a&&r.retainExif;if(!T||n||s){var u=new B;this.reader=u,u.onload=function(r){var a=r.target,u=a.result,c={},l=1;n&&(l=L(u),l>1&&o(c,F(l))),s&&(e.exif=_(u)),c.url=n||s?!T||l>1?O(u,i):T.createObjectURL(t):u,e.load(c)},u.onabort=function(){e.fail(new Error("Aborted to read the image with FileReader."))},u.onerror=function(){e.fail(new Error("Failed to read the image with FileReader."))},u.onloadend=function(){e.reader=null},n||s?u.readAsArrayBuffer(t):u.readAsDataURL(t)}else this.load({url:T.createObjectURL(t)})}else this.fail(new Error("The current browser does not support image compression."));else this.fail(new Error("The first argument must be an image File or Blob object."))}else this.fail(new Error("The first argument must be a File or Blob object."))}},{key:"load",value:function(e){var r=this,i=this.file,a=this.image;a.onload=function(){r.draw(t(t({},e),{},{naturalWidth:a.naturalWidth,naturalHeight:a.naturalHeight}))},a.onabort=function(){r.fail(new Error("Aborted to load the image."))},a.onerror=function(){r.fail(new Error("Failed to load the image."))},h.navigator&&/(?:iPad|iPhone|iPod).*?AppleWebKit/i.test(h.navigator.userAgent)&&(a.crossOrigin="anonymous"),a.alt=i.name,a.src=e.url}},{key:"draw",value:function(e){var t=this,r=e.naturalWidth,i=e.naturalHeight,a=e.rotate,n=void 0===a?0:a,o=e.scaleX,s=void 0===o?1:o,u=e.scaleY,c=void 0===u?1:u,d=this.file,f=this.image,p=this.options,h=document.createElement("canvas"),v=h.getContext("2d"),b=Math.abs(n)%180===90,g=("contain"===p.resize||"cover"===p.resize)&&m(p.width)&&m(p.height),w=Math.max(p.maxWidth,0)||1/0,k=Math.max(p.maxHeight,0)||1/0,j=Math.max(p.minWidth,0)||0,x=Math.max(p.minHeight,0)||0,L=r/i,F=p.width,S=p.height;if(b){var _=[k,w];w=_[0],k=_[1];var A=[x,j];j=A[0],x=A[1];var T=[S,F];F=T[0],S=T[1]}g&&(L=F/S);var D=U({aspectRatio:L,width:w,height:k},"contain");w=D.width,k=D.height;var C=U({aspectRatio:L,width:j,height:x},"cover");if(j=C.width,x=C.height,g){var $=U({aspectRatio:L,width:F,height:S},p.resize);F=$.width,S=$.height}else{var R=U({aspectRatio:L,width:F,height:S}),I=R.width;F=void 0===I?r:I;var M=R.height;S=void 0===M?i:M}F=Math.floor(P(Math.min(Math.max(F,j),w))),S=Math.floor(P(Math.min(Math.max(S,x),k)));var N=-F/2,z=-S/2,H=F,W=S,q=[];if(g){var K=0,G=0,V=r,Y=i,X=U({aspectRatio:L,width:r,height:i},{contain:"cover",cover:"contain"}[p.resize]);V=X.width,Y=X.height,K=(r-V)/2,G=(i-Y)/2,q.push(K,G,V,Y)}if(q.push(N,z,H,W),b){var J=[S,F];F=J[0],S=J[1]}h.width=F,h.height=S,y(p.mimeType)||(p.mimeType=d.type);var Q="transparent";d.size>p.convertSize&&p.convertTypes.indexOf(p.mimeType)>=0&&(p.mimeType="image/jpeg");var Z="image/jpeg"===p.mimeType;if(Z&&(Q="#fff"),v.fillStyle=Q,v.fillRect(0,0,F,S),p.beforeDraw&&p.beforeDraw.call(this,v,h),!this.aborted&&(v.save(),v.translate(F/2,S/2),v.rotate(n*Math.PI/180),v.scale(s,c),v.drawImage.apply(v,[f].concat(q)),v.restore(),p.drew&&p.drew.call(this,v,h),!this.aborted)){var ee=function(e){if(!t.aborted){var a=function(e){return t.done({naturalWidth:r,naturalHeight:i,result:e})};if(e&&Z&&p.retainExif&&t.exif&&t.exif.length>0){var n=function(e){return a(l(O(E(e,t.exif),p.mimeType)))};if(e.arrayBuffer)e.arrayBuffer().then(n).catch((function(){t.fail(new Error("Failed to read the compressed image with Blob.arrayBuffer()."))}));else{var o=new B;t.reader=o,o.onload=function(e){var t=e.target;n(t.result)},o.onabort=function(){t.fail(new Error("Aborted to read the compressed image with FileReader."))},o.onerror=function(){t.fail(new Error("Failed to read the compressed image with FileReader."))},o.onloadend=function(){t.reader=null},o.readAsArrayBuffer(e)}}else a(e)}};h.toBlob?h.toBlob(ee,p.mimeType,p.quality):ee(l(h.toDataURL(p.mimeType,p.quality)))}}},{key:"done",value:function(e){var t=e.naturalWidth,r=e.naturalHeight,i=e.result,a=this.file,n=this.image,o=this.options;if(T&&0===n.src.indexOf("blob:")&&T.revokeObjectURL(n.src),i)if(o.strict&&!o.retainExif&&i.size>a.size&&o.mimeType===a.type&&!(o.width>t||o.height>r||o.minWidth>t||o.minHeight>r||o.maxWidth<t||o.maxHeight<r))i=a;else{var s=new Date;i.lastModified=s.getTime(),i.lastModifiedDate=s,i.name=a.name,i.name&&i.type!==a.type&&(i.name=i.name.replace(D,w(i.type)))}else i=a;this.result=i,o.success&&o.success.call(this,i)}},{key:"fail",value:function(e){var t=this.options;if(!t.error)throw e;t.error.call(this,e)}},{key:"abort",value:function(){this.aborted||(this.aborted=!0,this.reader?this.reader.abort():this.image.complete?this.fail(new Error("The compression process has been aborted.")):(this.image.onload=null,this.image.onabort()))}}],[{key:"noConflict",value:function(){return window.Compressor=C,e}},{key:"setDefaults",value:function(e){o(f,e)}}]),e}();return $}))},"7d66":function(e,t,r){},"7e12":function(e,t,r){"use strict";var i=r("da84"),a=r("d039"),n=r("e330"),o=r("577e"),s=r("58a8").trim,u=r("5899"),c=n("".charAt),l=i.parseFloat,d=i.Symbol,f=d&&d.iterator,p=1/l(u+"-0")!==-1/0||f&&!a((function(){l(Object(f))}));e.exports=p?function(e){var t=s(o(e)),r=l(t);return 0===r&&"-"===c(t,0)?-0:r}:l},8172:function(e,t,r){"use strict";var i=r("e065"),a=r("57b9");i("toPrimitive"),a()},a15b:function(e,t,r){"use strict";var i=r("23e7"),a=r("e330"),n=r("44ad"),o=r("fc6a"),s=r("a640"),u=a([].join),c=n!==Object,l=c||!s("join",",");i({target:"Array",proto:!0,forced:l},{join:function(e){return u(o(this),void 0===e?",":e)}})},a9e3:function(e,t,r){"use strict";var i=r("23e7"),a=r("c430"),n=r("83ab"),o=r("da84"),s=r("428f"),u=r("e330"),c=r("94ca"),l=r("1a2d"),d=r("7156"),f=r("3a9b"),p=r("d9b5"),h=r("c04e"),m=r("d039"),v=r("241c").f,b=r("06cf").f,g=r("9bf2").f,y=r("408a"),w=r("58a8").trim,k="Number",j=o[k],x=s[k],O=j.prototype,L=o.TypeError,F=u("".slice),S=u("".charCodeAt),P=function(e){var t=h(e,"number");return"bigint"==typeof t?t:U(t)},U=function(e){var t,r,i,a,n,o,s,u,c=h(e,"number");if(p(c))throw new L("Cannot convert a Symbol value to a number");if("string"==typeof c&&c.length>2)if(c=w(c),t=S(c,0),43===t||45===t){if(r=S(c,2),88===r||120===r)return NaN}else if(48===t){switch(S(c,1)){case 66:case 98:i=2,a=49;break;case 79:case 111:i=8,a=55;break;default:return+c}for(n=F(c,2),o=n.length,s=0;s<o;s++)if(u=S(n,s),u<48||u>a)return NaN;return parseInt(n,i)}return+c},_=c(k,!j(" 0o1")||!j("0b1")||j("+0x1")),E=function(e){return f(O,e)&&m((function(){y(e)}))},A=function(e){var t=arguments.length<1?0:j(P(e));return E(this)?d(Object(t),this,A):t};A.prototype=O,_&&!a&&(O.constructor=A),i({global:!0,constructor:!0,wrap:!0,forced:_},{Number:A});var B=function(e,t){for(var r,i=n?v(t):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),a=0;i.length>a;a++)l(t,r=i[a])&&!l(e,r)&&g(e,r,b(t,r))};a&&x&&B(s[k],x),(_||a)&&B(s[k],j)},acd8:function(e,t,r){"use strict";var i=r("23e7"),a=r("7e12");i({global:!0,forced:parseFloat!==a},{parseFloat:a})},aeba:function(e,t,r){"use strict";r.r(t);var i=function(){var e=this,t=e._self._c;return t("div",[t("van-nav-bar",{staticClass:"shadow mb-4",attrs:{title:"维修反馈","left-text":"返回","left-arrow":""},on:{"click-left":function(t){return e.$router.back(-1)}}}),t("van-form",{staticClass:"w-11/12 mx-auto",on:{submit:e.onSubmit}},[t("div",{staticClass:"shadow"},[t("p",{staticClass:"bg-yellow-600 bg-opacity-80 text-white px-4 py-2"},[e._v("维修信息")]),t("van-field",{attrs:{name:"维修耗时",label:"维修耗时",type:"number",placeholder:"填写维修耗时",rules:[{required:!0}]},scopedSlots:e._u([{key:"button",fn:function(){return[e._v(" 小时 ")]},proxy:!0}]),model:{value:e.repairForm.duration,callback:function(t){e.$set(e.repairForm,"duration",t)},expression:"repairForm.duration"}}),t("van-field",{attrs:{rows:"3",autosize:"",label:"维修反馈",type:"textarea",placeholder:"请填写维修反馈",rules:[{required:!0}]},model:{value:e.repairForm.content,callback:function(t){e.$set(e.repairForm,"content",t)},expression:"repairForm.content"}}),t("van-field",{attrs:{name:"radio",label:"维修结果"},scopedSlots:e._u([{key:"input",fn:function(){return[t("van-radio-group",{attrs:{direction:"horizontal"},model:{value:e.repairForm.state,callback:function(t){e.$set(e.repairForm,"state",t)},expression:"repairForm.state"}},e._l(e.stateList,(function(r,i){return t("van-radio",{key:i,attrs:{name:r.id}},[e._v(e._s(r.name))])})),1)]},proxy:!0}])}),t("van-field",{attrs:{name:"uploader",label:"现场拍照"},scopedSlots:e._u([{key:"input",fn:function(){return[t("UploadList",{attrs:{accept:"video/mp4,image/*"},model:{value:e.picKeys,callback:function(t){e.picKeys=t},expression:"picKeys"}})]},proxy:!0}])}),t("van-field",{attrs:{readonly:"",clickable:"",value:e.repairForm.finished_at,label:"维修完成时间",placeholder:"请选择时间"},on:{click:function(t){e.showPicker=!0}}}),t("van-popup",{attrs:{position:"bottom"},model:{value:e.showPicker,callback:function(t){e.showPicker=t},expression:"showPicker"}},[t("van-datetime-picker",{attrs:{type:"datetime",title:"选择完整时间","min-date":e.minDate},on:{confirm:e.onConfirm,cancel:function(t){e.showPicker=!1}}})],1)],1),t("div",{staticClass:"mt-2 shadow"},[t("p",{staticClass:"bg-gray-600 text-white px-4 py-2 bg-opacity-80"},[e._v("技术员信息")]),t("div",{staticClass:"bg-white"},[e.supervisorList.length>0?t("van-field",{attrs:{readonly:"",clickable:"",name:"picker",value:e.supervisorName,label:"选择监理",placeholder:"选择监理"},on:{click:function(t){e.showSupervisorPicker=!0}}}):e._e(),t("van-popup",{attrs:{position:"bottom"},model:{value:e.showSupervisorPicker,callback:function(t){e.showSupervisorPicker=t},expression:"showSupervisorPicker"}},[t("van-picker",{attrs:{"show-toolbar":"",columns:e.supervisorList,"value-key":"username","default-index":e.supervisorIndex},on:{confirm:e.handleChooseSupervisor,cancel:function(t){e.showSupervisorPicker=!1}}})],1),t("div",{staticClass:"flex justify-center py-4"},[t("van-button",{attrs:{type:"primary",icon:"plus",round:"",size:"small","native-type":"button"},on:{click:e.showAddSupervisor}},[e._v("添加监理")])],1)],1)]),t("div",{staticClass:"mt-8"},[t("van-button",{attrs:{loading:e.submitLoading,block:"",type:"info","loading-text":"加载中...","native-type":"submit"}},[e._v("提交")])],1)]),t("van-dialog",{attrs:{title:"添加监理","show-cancel-button":"","class-name":"my-dialog","before-close":e.handleSave},model:{value:e.showDialog,callback:function(t){e.showDialog=t},expression:"showDialog"}},[t("van-form",[t("van-field",{attrs:{name:"姓名",label:"姓名",placeholder:"填写姓名",rules:[{required:!0}]},model:{value:e.supervisorForm.username,callback:function(t){e.$set(e.supervisorForm,"username",t)},expression:"supervisorForm.username"}}),t("van-field",{attrs:{name:"手机",label:"手机",type:"tel",placeholder:"填写手机",rules:[{required:!0}]},model:{value:e.supervisorForm.phone,callback:function(t){e.$set(e.supervisorForm,"phone",t)},expression:"supervisorForm.phone"}})],1)],1)],1)},a=[],n=(r("4160"),r("a15b"),r("14d9"),r("d3b7"),r("acd8"),r("e25e"),r("3ca3"),r("159b"),r("ddb0"),r("be40"));function o(e){return Object(n["a"])({url:"/qiniu/token",method:"get",params:e})}var s=r("e902"),u=r("b641");function c(e){return Object(n["a"])({url:"params/"+e,method:"get"})}var l=r("ed68"),d=r("7c8d"),f=r.n(d),p=function(){var e=this,t=e._self._c;return t("div",[t("van-field",{attrs:{readonly:"",border:e.border,label:e.label,placeholder:e.placeholder,disabled:e.disabled},scopedSlots:e._u([{key:"input",fn:function(){return[t("van-uploader",{key:e.n,attrs:{accept:e.accept,"before-read":e.beforeUpload,disabled:e.disabled,"show-upload":e.edit,deletable:e.edit,multiple:""},scopedSlots:e._u([{key:"preview-cover",fn:function(r){return[r.url&&"mp4"==r.url.split("/").pop().split(".").pop()?t("div",{staticClass:"w-full h-full overflow-hidden flex justify-center items-center"},[t("video",{staticClass:"min-w-full min-h-full",attrs:{src:r.url},on:{click:function(t){return e.videoPlay(r.url)}}},[e._v(" 您的浏览器不支持视频播放 ")])]):e._e()]}}]),model:{value:e.fileList,callback:function(t){e.fileList=t},expression:"fileList"}})]},proxy:!0}])}),e.videoShow?t("van-overlay",{staticClass:"flex justify-center items-center",attrs:{show:e.videoShow,"z-index":"1000"}},[t("video",{staticClass:"max-w-full max-h-full",attrs:{src:e.videoUrl,controls:""}},[e._v(" 您的浏览器不支持视频播放 ")]),t("i",{staticClass:"van-icon van-icon-clear van-image-preview__close-icon van-image-preview__close-icon--top-right",attrs:{role:"button"},on:{click:function(t){e.videoShow=!1}}})]):e._e()],1)},h=[],m=(r("9a83"),r("f564")),v=(r("7a82"),r("53ca"));r("8172"),r("d9e2"),r("d401"),r("efec"),r("a9e3");function b(e,t){if("object"!=Object(v["a"])(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,t||"default");if("object"!=Object(v["a"])(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function g(e){var t=b(e,"string");return"symbol"==Object(v["a"])(t)?t:t+""}function y(e,t,r){return(t=g(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}r("f1dc");var w=r("6e47"),k=(r("e930"),r("8f80")),j=(r("4de4"),r("d81d"),{name:"UploadList",components:y(y({},k["a"].name,k["a"]),w["a"].name,w["a"]),props:{value:{type:Array,default:function(){return[]}},label:{type:String,default:""},placeholder:{type:String,default:""},accept:{type:String,default:"image/*"},disabled:{type:Boolean,default:!1},border:{type:Boolean,default:!1},edit:{type:Boolean,default:!0}},watch:{value:{deep:!0,imediate:!0,handler:function(e){this.updateFileList()}}},data:function(){return{dataObj:{},fileList:[],videoShow:!1,videoUrl:"",n:0}},created:function(){this.updateFileList()},methods:{updateFileList:function(){var e=this;this.fileList=this.value.map((function(t){return{url:e.$store.getters.setting.img_host+t}})),this.n++,console.log(this.fileList),console.log(this.value)},videoPlay:function(e){this.videoUrl=e,this.videoShow=!0},handleUpload:function(e){var t=this;return new Promise((function(r,i){if("video/mp4"===e.type&&e.size/1024/1024>100)return e.status="failed",e.message="上传失败",void i("上传视频大小不能超过 100MB!");var a="";console.log(e.type),"image/png"===e.type?a="png":"image/jpeg"===e.type?a="jpg":"video/mp4"===e.type&&(a="mp4");var n=t;"video/mp4"===e.type?r(o({file_type:a}).then((function(i){var a=new FormData;a.append("file",e),a.append("token",i.data.token),a.append("key",i.data.key),e.status="uploading",e.message="上传中...",e.url="",t.$axios({method:"post",url:"https://upload.qiniup.com",data:a}).then((function(r){console.log(r),e.url=t.$store.getters.setting.img_host+r.data.key,e.status="done",e.message="上传成功";var i=t.value;i.push(r.data.key),t.$emit("input",i)})).catch((function(){e.status="failed",e.message="上传失败"})),r()}))):new f.a(e,{quality:.8,maxWidth:1920,success:function(t){r(o({file_type:a}).then((function(i){var a=new FormData;a.append("file",t),a.append("token",i.data.token),a.append("key",i.data.key),e.status="uploading",e.message="上传中...",e.url="",n.$axios({method:"post",url:"https://upload.qiniup.com",data:a}).then((function(t){console.log(t),e.url=n.$store.getters.setting.img_host+t.data.key,e.status="done",e.message="上传成功";var r=n.value;r.push(t.data.key),n.$emit("input",r)})).catch((function(){e.status="failed",e.message="上传失败"})),r()})))}})}))},beforeUpload:function(e){var t=this,r=[];return e instanceof Array||(e=[e]),console.log("start"),this.$store.commit("loading/showLoading"),e.forEach((function(e){var i=t.handleUpload(e);i.then((function(){r.push(i)})).catch((function(e){return t.$store.commit("loading/hideLoading"),Object(m["a"])({type:"danger",message:e}),t.updateFileList(),!1}))})),Promise.all(r).then((function(){t.$store.commit("loading/hideLoading"),console.log("finish all")})),!0},update:function(){console.log(this.fileList);var e=this.fileList.filter((function(e){return!e.file||"done"==e.file.status})).map((function(e){return e.url?e.url:e.file.url}));this.$emit("input",e),console.log(e)}}}),x=j,O=(r("4d6b"),r("2877")),L=Object(O["a"])(x,p,h,!1,null,"30727f4d",null),F=L.exports,S={components:{UploadList:F},data:function(){return{showDialog:!1,supervisorForm:{},showSupervisorPicker:!1,supervisorList:[],supervisorIndex:0,supervisorName:"",picList:[],picKeys:[],minDate:"",showPicker:!1,repairForm:{finished_at:"",state:1},id:0,stateList:[],submitLoading:!1}},created:function(){this.$route.params&&this.$route.params.id&&(this.id=this.$route.params.id),this.minDate=new Date,this.minDate.setTime(this.minDate.getTime()+72e5),this.minDate.setMinutes(0,0,0),this.loadParam(),this.loadSupervisorList(0)},methods:{showAddSupervisor:function(){this.houseForm={},this.showDialog=!0},loadSupervisorList:function(e){var t=this;Object(l["b"])().then((function(r){t.supervisorList=r.data;var i=t;t.supervisorList.forEach((function(t,r){(0===e&&0===r||t["id"]===e)&&(i.supervisorName=t["username"],i.supervisorIndex=r,i.repairForm.supervisor=t["id"])}))}))},handleSave:function(e,t){var r=this;"confirm"===e?Object(l["a"])(this.supervisorForm).then((function(e){var i=r;r.$toast.success({message:"提交成功",duration:500,onClose:function(){t(),i.loadSupervisorList(e.data.supervisor_id)}})})).catch((function(){t(!1)})):t()},handleChooseSupervisor:function(e,t){this.supervisorName=this.supervisorList[t]["username"],this.repairForm.supervisor=this.supervisorList[t]["id"],this.showSupervisorPicker=!1},onConfirm:function(e){this.repairForm.finished_at=Object(u["a"])(e,"{y}-{m}-{d} {h}:{i}"),this.showPicker=!1},loadParam:function(){var e=this;c("order_repair_state").then((function(t){e.stateList=t.data,console.log(e.stateList)}))},handleUpload:function(e){var t=this;return new Promise((function(r,i){var a="";"image/png"===e.type?a="png":"image/jpeg"===e.type?a="jpg":i("上传头像图片只能是 JPG 或者 PNG 格式!");var n=t;new f.a(e,{quality:.8,maxWidth:1920,success:function(t){var i=this;console.log("compress ok"),r(o({file_type:a}).then((function(a){var o=new FormData;o.append("file",t),o.append("token",a.data.token),o.append("key",a.data.key),e.status="uploading",e.message="上传中...",e.url="",n.$axios.post("https://upload.qiniup.com",o,{headers:{"Content-Type":"multipart/form-data"}}).then((function(t){200===t.status?(e.status="success",e.message="上传成功",e.url=n.$store.getters.setting.img_host+t.data.key,n.picKeys.push(t.data.key),console.log(i.picKeys),console.log(n.picKeys)):(e.status="failed",e.message="上传失败"),r()}))})))}})}))},beforeRead:function(e){var t=this,r=[];return e instanceof Array||(e=[e]),console.log("start"),this.$store.commit("loading/showLoading"),e.forEach((function(e){var i=t.handleUpload(e);i.catch((function(e){return t.$store.commit("loading/hideLoading"),t.$toast(e),!1})),r.push(i)})),Promise.all(r).then((function(){t.$store.commit("loading/hideLoading"),console.log("finish all")})),!0},onSubmit:function(){var e=this;this.submitLoading=!0,this.repairForm.pics=this.picKeys.join(","),this.repairForm.state=parseInt(this.repairForm.state),this.repairForm.duration=parseFloat(this.repairForm.duration);var t=this;Object(s["f"])(this.id,this.repairForm).then((function(e){t.$toast.success({message:"提交成功",duration:1e3,onClose:function(){t.$router.back(-1)}})})).catch((function(t){e.submitLoading=!1,console.log(t)}))}}},P=S,U=Object(O["a"])(P,i,a,!1,null,null,null);t["default"]=U.exports},b641:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var i=r("53ca");r("d9e2"),r("d401"),r("4160"),r("b64b"),r("d3b7"),r("e25e"),r("4d63"),r("c607"),r("ac1f"),r("2c3e"),r("00b4"),r("25f0"),r("4d90"),r("5319"),r("159b");function a(e,t){if(0===arguments.length||!e)return null;var r,a=t||"{y}-{m}-{d} {h}:{i}:{s}";"object"===Object(i["a"])(e)?r=e:("string"===typeof e&&(e=/^[0-9]+$/.test(e)?parseInt(e):e.replace(new RegExp(/-/gm),"/")),"number"===typeof e&&10===e.toString().length&&(e*=1e3),r=new Date(e));var n={y:r.getFullYear(),m:r.getMonth()+1,d:r.getDate(),h:r.getHours(),i:r.getMinutes(),s:r.getSeconds(),a:r.getDay()},o=a.replace(/{([ymdhisa])+}/g,(function(e,t){var r=n[t];return"a"===t?["日","一","二","三","四","五","六"][r]:r.toString().padStart(2,"0")}));return o}},d81d:function(e,t,r){"use strict";var i=r("23e7"),a=r("b727").map,n=r("1dde"),o=n("map");i({target:"Array",proto:!0,forced:!o},{map:function(e){return a(this,e,arguments.length>1?arguments[1]:void 0)}})},e902:function(e,t,r){"use strict";r.d(t,"d",(function(){return a})),r.d(t,"c",(function(){return n})),r.d(t,"a",(function(){return o})),r.d(t,"g",(function(){return s})),r.d(t,"f",(function(){return u})),r.d(t,"b",(function(){return c})),r.d(t,"e",(function(){return l}));var i=r("be40");function a(e){return Object(i["a"])({url:"orders",method:"get",params:e})}function n(e){return Object(i["a"])({url:"orders/".concat(e),method:"get"})}function o(e){return Object(i["a"])({url:"orders/".concat(e,"/confirm"),method:"post"})}function s(e,t){return Object(i["a"])({url:"orders/".concat(e,"/schedule"),method:"post",data:t})}function u(e,t){return Object(i["a"])({url:"orders/".concat(e,"/repair"),method:"post",data:t})}function c(e){return Object(i["a"])({url:"orders/".concat(e,"/finish"),method:"post"})}function l(e){return Object(i["a"])({url:"repairs",method:"get",params:e})}},ed68:function(e,t,r){"use strict";r.d(t,"b",(function(){return a})),r.d(t,"c",(function(){return n})),r.d(t,"a",(function(){return o}));var i=r("be40");function a(e){return Object(i["a"])({url:"supervisors",method:"get",params:e})}function n(e,t){return Object(i["a"])({url:"supervisors/".concat(e),method:"put",data:t})}function o(e){return Object(i["a"])({url:"supervisors",method:"post",data:e})}},efec:function(e,t,r){"use strict";var i=r("1a2d"),a=r("cb2d"),n=r("51eb"),o=r("b622"),s=o("toPrimitive"),u=Date.prototype;i(u,s)||a(u,s,n)}}]);
|