chunk-709e2b06.8a3ea1cd.js 5.9 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-709e2b06"],{"03d8":function(e,t,s){"use strict";s.r(t);var r=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-empty",{directives:[{name:"show",rawName:"v-show",value:e.showEmpty,expression:"showEmpty"}],attrs:{description:"暂无房屋信息"}}),t("van-list",{staticClass:"mt-4",attrs:{finished:e.finished,error:e.error,"error-text":"请求失败,点击重新加载","finished-text":""},on:{"update:error":function(t){e.error=t},load:e.loadHouseList},model:{value:e.loading,callback:function(t){e.loading=t},expression:"loading"}},e._l(e.houseList,(function(s,r){return t("div",{key:r,staticClass:"bg-white mb-4 w-11/12 mx-auto text-sm shadow"},[t("div",{staticClass:"p-4"},[t("div",{staticClass:"flex justify-between items-center"},[t("div",{staticClass:"text-lg mb-2 w-5/4"},[e._v(e._s(s.address))])]),t("div",[t("span",{staticClass:"mr-2"},[e._v(e._s(s.link_name))]),t("span",[e._v(e._s(s.link_phone))])]),t("div",[s.designer?t("p",{staticClass:"py-2"},[e._v(" 设计师:"+e._s(s.designer_name)+" ")]):e._e(),s.supervisor?t("p",[e._v("监理:"+e._s(s.supervisor_name))]):e._e()])]),s.warranty_start?t("div",[t("p",{staticClass:"bg-blue-300 py-2 text-white px-4 flex justify-between"},[t("span",[e._v("保修卡:"+e._s(s.warranty_start))]),t("router-link",{staticClass:"text-red-600",attrs:{to:"/qa/4/info"}},[e._v("保修详情")])],1),t("div",{staticClass:"p-4 leading-6"},[e._l(s.warranty_type,(function(s,r){return t("p",{key:r},[e._v(" "+e._s(s.type_name)+"保修: "),s.left_date>0?t("span",[e._v("剩余 "),t("span",{staticClass:"text-red-500"},[e._v(e._s(s.left_date))]),e._v(" 天")]):t("span",[e._v("已过期")])])})),s.mark?t("p",[e._v(" 备注: "),t("span",[e._v(e._s(s.mark))])]):e._e()],2)]):e._e(),e.jsonArray(s.pictures).length>0?t("div",[t("div",{staticClass:"p-4 leading-6"},e._l(e.jsonArray(s.pictures),(function(r,n){return t("van-image",{key:n,attrs:{width:"10rem",height:"10rem",fit:"cover",src:r},on:{click:function(t){e.ImagePreview({images:e.jsonArray(s.pictures),startPosition:n,closeable:!0})}}})})),1)]):e._e()])})),0),t("van-dialog",{attrs:{title:e.dialogText,"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.houseForm.link_name,callback:function(t){e.$set(e.houseForm,"link_name",t)},expression:"houseForm.link_name"}}),t("van-field",{attrs:{name:"手机",label:"手机",type:"tel",placeholder:"填写联系人手机",rules:[{required:!0}]},model:{value:e.houseForm.link_phone,callback:function(t){e.$set(e.houseForm,"link_phone",t)},expression:"houseForm.link_phone"}}),t("van-field",{attrs:{label:"小区地址",placeholder:"填写小区地址",rules:[{required:!0}]},model:{value:e.houseForm.address,callback:function(t){e.$set(e.houseForm,"address",t)},expression:"houseForm.address"}})],1)],1)],1)},n=[],a=(s("4662"),s("28a2")),i=(s("14d9"),s("b64b"),s("f277")),o={data:function(){return{showDialog:!1,dialogText:"添加房屋",houseList:[],houseForm:{},loading:!1,error:!1,page:1,finished:!1,showEmpty:!1}},created:function(){this.loadHouseList()},methods:{ImagePreview:a["a"],jsonArray:function(e){if("string"===typeof e)try{e=JSON.parse(e)}catch(t){return[]}return e instanceof Array?e:[]},showAdd:function(){this.houseForm={},this.showDialog=!0,this.dialogText="添加房屋"},showEdit:function(e){this.houseForm=e,this.showDialog=!0,this.dialogText="编辑房屋"},handleSave:function(e,t){var s=this;"confirm"===e?this.houseForm.id>0?Object(i["c"])(this.houseForm.id,this.houseForm).then((function(e){var r=s;s.$toast.success({message:"提交成功",duration:500,onClose:function(){t(),r.refresh()}})})).catch((function(){t(!1)})):Object(i["a"])(this.houseForm).then((function(e){var r=s;s.$toast.success({message:"提交成功",duration:500,onClose:function(){t(),r.refresh()}})})).catch((function(){t(!1)})):t()},refresh:function(){return this.finished=!1,this.loading=!1,this.error=!1,this.page=1,this.houseList=[],this.loadHouseList(),!0},loadHouseList:function(){var e=this;this.loading=!0,Object(i["b"])({page:this.page++}).then((function(t){for(var s in e.loading=!1,t.data.length<e.$store.getters.setting.page_size&&(e.finished=!0),t.data)e.houseList.push(t.data[s]);0===e.houseList.length?e.showEmpty=!0:e.showEmpty=!1})).catch((function(){e.loading=!1,e.error=!0}))}}},l=o,u=s("2877"),c=Object(u["a"])(l,r,n,!1,null,null,null);t["default"]=c.exports},"14d9":function(e,t,s){"use strict";var r=s("23e7"),n=s("7b0b"),a=s("07fa"),i=s("3a34"),o=s("3511"),l=s("d039"),u=l((function(){return 4294967297!==[].push.call({length:4294967296},1)})),c=function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(e){return e instanceof TypeError}},h=u||!c();r({target:"Array",proto:!0,arity:1,forced:h},{push:function(e){var t=n(this),s=a(t),r=arguments.length;o(s+r);for(var l=0;l<r;l++)t[s]=arguments[l],s++;return i(t,s),s}})},3511:function(e,t,s){"use strict";var r=TypeError,n=9007199254740991;e.exports=function(e){if(e>n)throw r("Maximum allowed index exceeded");return e}},"3a34":function(e,t,s){"use strict";var r=s("83ab"),n=s("e8b5"),a=TypeError,i=Object.getOwnPropertyDescriptor,o=r&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}();e.exports=o?function(e,t){if(n(e)&&!i(e,"length").writable)throw new a("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t}},4662:function(e,t,s){"use strict";s("68ef"),s("a71a"),s("9d70"),s("3743"),s("09fe"),s("4d75"),s("e3b3"),s("8270"),s("786d"),s("504b")}}]);