chunk-d90bb2e0.95d3ea4b.js 11 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-d90bb2e0"],{"408a":function(t,e,a){"use strict";var n=a("e330");t.exports=n(1..valueOf)},4662:function(t,e,a){"use strict";a("68ef"),a("a71a"),a("9d70"),a("3743"),a("09fe"),a("4d75"),a("e3b3"),a("8270"),a("786d"),a("504b")},"46b53":function(t,e,a){"use strict";a.r(e);var n=function(){var t=this,e=t._self._c;return e("div",[e("van-nav-bar",{staticClass:"shadow mb-4",attrs:{title:"我的在建","left-text":"返回","left-arrow":""},on:{"click-left":function(e){return t.$router.back(-1)}}}),e("van-empty",{directives:[{name:"show",rawName:"v-show",value:0==t.houseList.length,expression:"houseList.length == 0"}],attrs:{description:"暂无房屋信息"}}),t._l(t.houseList,(function(a,n){return e("div",{key:n,staticClass:"bg-white mb-4 w-11/12 mx-auto text-sm shadow"},[e("div",{staticClass:"p-4"},[e("div",{staticClass:"flex justify-between items-center"},[e("div",{staticClass:"text-lg mb-2 w-5/4"},[t._v(" "+t._s(a.address)+" "+t._s(a.village)+" "+t._s(a.room_no)+" "+t._s(a.area?a.area+"m²":"")+" ")])]),e("div",[e("span",{staticClass:"mr-2"},[t._v(t._s(a.layout))])]),e("div",[a.designer_name?e("p",{staticClass:"py-2"},[t._v(" 设计师:"+t._s(a.designer_name)+" ")]):t._e()]),a.contract?e("UploadList",{attrs:{label:"合同",edit:!1,value:t.jsonArray(a.contract)}}):t._e(),a.payments?t._l(a.payments,(function(a,n){return e("span",{key:n,staticClass:"px-5"},[t._v(t._s(a.type_name)+" "+t._s(1==a.state?"已结":"未结"))])})):t._e(),a.tables?e("div",{staticClass:"py-5"},t._l(a.tables,(function(a,n){return e("div",{key:n,staticClass:"flex items-center"},[e("span",{staticClass:"px-5"},[t._v(t._s(a.name)+"验收")]),1==a.owner?e("span",[t._v("已验收")]):[e("van-button",{staticClass:"mx-2",attrs:{type:"primary",size:"small",round:""},on:{click:function(e){return t.checkTable(a)}}},[t._v("验收通过")]),e("van-button",{staticClass:"mx-2",attrs:{type:"danger",size:"small",round:""},on:{click:function(e){return t.checkTable2(a)}}},[t._v("验收不通过")])]],2)})),0):t._e(),e("div",{staticClass:"flex justify-end items-center"},[1==a.state?e("van-button",{attrs:{type:"primary",size:"small",round:""},on:{click:function(e){return t.checkContract(a)}}},[t._v("确认合同")]):t._e(),3==a.state?e("van-button",{attrs:{type:"primary",size:"small",round:""},on:{click:function(e){return t.checkStart(a)}}},[t._v("确认开工")]):t._e()],1)],2)])})),e("van-popup",{attrs:{closeable:"",round:"",position:"bottom"},model:{value:t.tableShow,callback:function(e){t.tableShow=e},expression:"tableShow"}},[e("div",{staticClass:"mt-2 text-center leading-10 text-lg"},[t._v("验收不通过")]),e("van-field",{attrs:{autosize:"",type:"textarea",placeholder:"请输入说明"},model:{value:t.tableForm.explain,callback:function(e){t.$set(t.tableForm,"explain",e)},expression:"tableForm.explain"}}),e("van-button",{attrs:{size:"large",type:"info"},on:{click:t.checkTable3}},[t._v("提交")])],1)],2)},i=[],r=(a("e17f"),a("2241")),o=(a("4662"),a("28a2")),s=(a("b64b"),a("d8c1")),c=a("9189"),l={components:{UploadList:c["a"]},data:function(){return{showDialog:!1,dialogText:"添加房屋",houseList:[],houseForm:{},loading:!1,error:!1,page:1,finished:!1,tableShow:!1,tableForm:{},selectTable:{}}},created:function(){this.loadHouseList()},methods:{ImagePreview:o["a"],jsonArray:function(t){if("string"===typeof t)try{t=JSON.parse(t)}catch(e){return[]}return t instanceof Array?t:[]},loadHouseList:function(){var t=this;this.loading=!0,Object(s["l"])().then((function(e){t.loading=!1,t.houseList=e.data.list})).catch((function(){t.loading=!1,t.error=!0}))},checkContract:function(t){var e=this;r["a"].confirm({title:"提示",message:"是否确认合同?"}).then((function(){Object(s["b"])(t.id).then((function(t){e.loading=!1,e.loadHouseList()})).catch((function(){e.loading=!1}))})).catch((function(){}))},checkStart:function(t){var e=this;r["a"].confirm({title:"提示",message:"是否确认开工?"}).then((function(){Object(s["c"])(t.id).then((function(t){e.loading=!1,e.loadHouseList()})).catch((function(){e.loading=!1}))})).catch((function(){}))},checkTable:function(t){var e=this;r["a"].confirm({title:"提示",message:"是否确认验收?"}).then((function(){Object(s["d"])(t.id,{state:0}).then((function(t){e.loading=!1,e.loadHouseList()})).catch((function(){e.loading=!1}))})).catch((function(){}))},checkTable2:function(t){this.selectTable=t,this.tableForm={state:1},this.tableShow=!0},checkTable3:function(){var t=this;Object(s["d"])(this.selectTable.id,this.tableForm).then((function(e){t.loading=!1,t.loadHouseList(),t.tableShow=!1})).catch((function(){t.loading=!1}))}}},u=l,f=a("2877"),d=Object(f["a"])(u,n,i,!1,null,null,null);e["default"]=d.exports},"4a19":function(t,e,a){"use strict";a("dfaa")},"4de4":function(t,e,a){"use strict";var n=a("23e7"),i=a("b727").filter,r=a("1dde"),o=r("filter");n({target:"Array",proto:!0,forced:!o},{filter:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}})},"51eb":function(t,e,a){"use strict";var n=a("825a"),i=a("485a"),r=TypeError;t.exports=function(t){if(n(this),"string"===t||"default"===t)t="string";else if("number"!==t)throw new r("Incorrect hint");return i(this,t)}},"7a82f":function(t,e,a){"use strict";var n=a("23e7"),i=a("83ab"),r=a("9bf2").f;n({target:"Object",stat:!0,forced:Object.defineProperty!==r,sham:!i},{defineProperty:r})},8172:function(t,e,a){"use strict";var n=a("e065"),i=a("57b9");n("toPrimitive"),i()},9189:function(t,e,a){"use strict";var n=function(){var t=this,e=t._self._c;return e("div",[e("van-field",{attrs:{readonly:"",border:t.border,label:t.label,placeholder:t.placeholder,disabled:t.disabled},scopedSlots:t._u([{key:"input",fn:function(){return[e("van-uploader",{attrs:{accept:t.accept,"before-read":t.beforeUpload,"after-read":t.afterRead,disabled:t.disabled,"show-upload":t.edit,deletable:t.edit},on:{delete:t.update},scopedSlots:t._u([{key:"preview-cover",fn:function(a){return[a.url&&"mp4"==a.url.split("/").pop().split(".").pop()?e("div",{staticClass:"w-full h-full overflow-hidden flex justify-center items-center"},[e("video",{staticClass:"min-w-full min-h-full",attrs:{src:a.url},on:{click:function(e){return t.videoPlay(a.url)}}},[t._v(" 您的浏览器不支持视频播放 ")])]):t._e()]}}]),model:{value:t.fileList,callback:function(e){t.fileList=e},expression:"fileList"}})]},proxy:!0}])}),t.videoShow?e("van-overlay",{staticClass:"flex justify-center items-center",attrs:{show:t.videoShow,"z-index":"1000"}},[e("video",{staticClass:"max-w-full max-h-full",attrs:{src:t.videoUrl,controls:""}},[t._v(" 您的浏览器不支持视频播放 ")]),e("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(e){t.videoShow=!1}}})]):t._e()],1)},i=[],r=(a("9a83"),a("f564")),o=a("ade3"),s=(a("68ef"),a("a71a"),a("6e47")),c=(a("e930"),a("8f80")),l=(a("4de4"),a("4160"),a("d81d"),a("b64b"),a("d3b7"),a("159b"),{name:"UploadList",components:Object(o["a"])(Object(o["a"])({},c["a"].name,c["a"]),s["a"].name,s["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(t){this.fileList=t.map((function(t){return{url:t}}))}}},data:function(){return{dataObj:{},fileList:[],videoShow:!1,videoUrl:""}},created:function(){this.fileList=this.value.map((function(t){return{url:t}}))},methods:{videoPlay:function(t){this.videoUrl=t,this.videoShow=!0},beforeUpload:function(t){if("video/mp4"===t.type){if(t.size/1024/1024>30)return Object(r["a"])({type:"danger",message:"上传视频大小不能超过 30MB!"}),!1}else if(t.size/1024/1024>30)return Object(r["a"])({type:"danger",message:"上传图片大小不能超过 30MB!"}),!1;var e="";if(console.log(t.type),"image/png"===t.type)e="png";else if("image/jpeg"===t.type)e="jpg";else{if("video/mp4"!==t.type)return Object(r["a"])({type:"danger",message:"上传格式有误!"}),!1;e="mp4"}var a=this;return new Promise((function(n,i){getToken({file_type:e}).then((function(e){var i=e.data.key,r=e.data.token;a._data.dataObj.token=r,a._data.dataObj.key=i,n(t)})).catch((function(t){console.log(t),i()}))}))},afterRead:function(t){var e=this;console.log(t),t.status="uploading",t.message="上传中...";var a=new FormData;a.append("file",t.file),Object.keys(this.dataObj).forEach((function(t){a.append(t,e.dataObj[t])})),this.$axios({method:"post",url:"https://upload.qiniup.com",data:a}).then((function(a){console.log(a),t.url=e.$store.getters.setting.img_host+a.data.key,t.status="done",t.message="上传成功",e.update()})).catch((function(){t.status="failed",t.message="上传失败",e.update()}))},update:function(){var t=this.fileList.filter((function(t){return!t.status||"done"==t.status})).map((function(t){return t.url}));this.$emit("input",t),console.log(t)}}}),u=l,f=(a("4a19"),a("2877")),d=Object(f["a"])(u,n,i,!1,null,"1659bf72",null);e["a"]=d.exports},a9e3:function(t,e,a){"use strict";var n=a("23e7"),i=a("c430"),r=a("83ab"),o=a("da84"),s=a("428f"),c=a("e330"),l=a("94ca"),u=a("1a2d"),f=a("7156"),d=a("3a9b"),p=a("d9b5"),b=a("c04e"),h=a("d039"),v=a("241c").f,m=a("06cf").f,g=a("9bf2").f,y=a("408a"),_=a("58a8").trim,w="Number",k=o[w],j=s[w],x=k.prototype,O=o.TypeError,S=c("".slice),C=c("".charCodeAt),L=function(t){var e=b(t,"number");return"bigint"==typeof e?e:N(e)},N=function(t){var e,a,n,i,r,o,s,c,l=b(t,"number");if(p(l))throw new O("Cannot convert a Symbol value to a number");if("string"==typeof l&&l.length>2)if(l=_(l),e=C(l,0),43===e||45===e){if(a=C(l,2),88===a||120===a)return NaN}else if(48===e){switch(C(l,1)){case 66:case 98:n=2,i=49;break;case 79:case 111:n=8,i=55;break;default:return+l}for(r=S(l,2),o=r.length,s=0;s<o;s++)if(c=C(r,s),c<48||c>i)return NaN;return parseInt(r,n)}return+l},I=l(w,!k(" 0o1")||!k("0b1")||k("+0x1")),T=function(t){return d(x,t)&&h((function(){y(t)}))},E=function(t){var e=arguments.length<1?0:k(L(t));return T(this)?f(Object(e),this,E):e};E.prototype=x,I&&!i&&(x.constructor=E),n({global:!0,constructor:!0,wrap:!0,forced:I},{Number:E});var A=function(t,e){for(var a,n=r?v(e):"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(","),i=0;n.length>i;i++)u(e,a=n[i])&&!u(t,a)&&g(t,a,m(e,a))};i&&j&&A(s[w],j),(I||i)&&A(s[w],k)},ade3:function(t,e,a){"use strict";a.d(e,"a",(function(){return o}));a("7a82f");var n=a("53ca");a("8172"),a("d9e2"),a("d401"),a("efec"),a("a9e3");function i(t,e){if("object"!=Object(n["a"])(t)||!t)return t;var a=t[Symbol.toPrimitive];if(void 0!==a){var i=a.call(t,e||"default");if("object"!=Object(n["a"])(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}function r(t){var e=i(t,"string");return"symbol"==Object(n["a"])(e)?e:e+""}function o(t,e,a){return(e=r(e))in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}},d81d:function(t,e,a){"use strict";var n=a("23e7"),i=a("b727").map,r=a("1dde"),o=r("map");n({target:"Array",proto:!0,forced:!o},{map:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}})},dfaa:function(t,e,a){},efec:function(t,e,a){"use strict";var n=a("1a2d"),i=a("cb2d"),r=a("51eb"),o=a("b622"),s=o("toPrimitive"),c=Date.prototype;n(c,s)||i(c,s,r)}}]);