chunk-575a1984.c2efa9ed.js 7.0 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-575a1984"],{"14d9":function(t,e,s){"use strict";var a=s("23e7"),n=s("7b0b"),r=s("07fa"),i=s("3a34"),o=s("3511"),c=s("d039"),l=c((function(){return 4294967297!==[].push.call({length:4294967296},1)})),d=function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(t){return t instanceof TypeError}},u=l||!d();a({target:"Array",proto:!0,arity:1,forced:u},{push:function(t){var e=n(this),s=r(e),a=arguments.length;o(s+a);for(var c=0;c<a;c++)e[s]=arguments[c],s++;return i(e,s),s}})},3511:function(t,e,s){"use strict";var a=TypeError,n=9007199254740991;t.exports=function(t){if(t>n)throw a("Maximum allowed index exceeded");return t}},"3a34":function(t,e,s){"use strict";var a=s("83ab"),n=s("e8b5"),r=TypeError,i=Object.getOwnPropertyDescriptor,o=a&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(t){return t instanceof TypeError}}();t.exports=o?function(t,e){if(n(t)&&!i(t,"length").writable)throw new r("Cannot set read only .length");return t.length=e}:function(t,e){return t.length=e}},4662:function(t,e,s){"use strict";s("68ef"),s("a71a"),s("9d70"),s("3743"),s("09fe"),s("4d75"),s("e3b3"),s("8270"),s("786d"),s("504b")},bffd:function(t,e,s){"use strict";s.r(e);var a=function(){var t=this,e=t._self._c;return e("div",[e("van-tabs",{staticClass:"shadow",attrs:{"before-change":t.beforeChange,sticky:""},model:{value:t.tabIndex,callback:function(e){t.tabIndex=e},expression:"tabIndex"}},[e("van-tab",{attrs:{title:"处理中",name:"0",to:{path:"/orders",query:{tabIndex:0}},replace:""}}),e("van-tab",{attrs:{title:"待确认",name:"1",to:{path:"/orders",query:{tabIndex:1}},replace:""}}),e("van-tab",{attrs:{title:"已确认",name:"2",to:{path:"/orders",query:{tabIndex:2}},replace:""}})],1),e("van-empty",{directives:[{name:"show",rawName:"v-show",value:t.showEmpty,expression:"showEmpty"}],attrs:{description:"暂无订单"}}),e("van-list",{staticClass:"mt-4",attrs:{finished:t.finished,error:t.error,"error-text":"请求失败,点击重新加载","finished-text":""},on:{"update:error":function(e){t.error=e},load:t.loadOrderList},model:{value:t.loading,callback:function(e){t.loading=e},expression:"loading"}},t._l(t.orderList,(function(s,a){return e("div",{key:a,staticClass:"bg-white mb-4 w-11/12 p-4 mx-auto text-sm shadow"},[e("div",{staticClass:"pb-2 flex items-center justify-between border-b mb-2"},[e("span",[e("span",{staticClass:"font-bold"},[t._v("工单编号:")]),t._v(t._s(s.order_no))]),e("span",{class:"text-"+s.state_color+" rounded-sm"},[t._v(t._s(s.state_name))])]),e("div",{staticClass:"pb-1"},[e("span",{staticClass:"font-bold"},[t._v("报修时间:")]),t._v(t._s(s.created_at))]),e("div",{staticClass:"pb-1"},[e("span",{staticClass:"font-bold"},[t._v("报修姓名:")]),t._v(t._s(s.link_name))]),e("div",{staticClass:"pb-1"},[e("span",{staticClass:"font-bold"},[t._v("联系电话:")]),t._v(t._s(s.link_phone))]),e("div",{staticClass:"pb-1"},[e("span",{staticClass:"font-bold"},[t._v("报修地址:")]),t._v(t._s(s.address))]),e("div",{staticClass:"pb-1"},[e("span",{staticClass:"font-bold"},[t._v("故障类型:")]),t._v(t._s(s.type))]),e("div",{staticClass:"pb-1"},[e("span",{staticClass:"font-bold"},[t._v("故障描述:")]),t._v(t._s(s.content))]),s.leader?e("div",{staticClass:"pb-1 flex items-center"},[e("span",{staticClass:"font-bold"},[t._v("工程队长:")]),e("span",{staticClass:"flex items-center"},[e("span",[t._v(t._s(s.leader_info.username))]),s.leader_info.phone?e("span",{staticClass:"flex items-center"},[t._v("("+t._s(s.leader_info.phone)+")"),e("a",{staticClass:"flex items-center",attrs:{href:"tel:"+s.leader_info.phone}},[e("van-icon",{attrs:{name:"phone",size:"22",color:"#009688"}})],1)]):t._e()])]):t._e(),e("div",{staticClass:"pb-1"},[e("span",{staticClass:"font-bold"},[t._v("故障图片:")])]),e("div",{staticClass:"pb-1"},[t._l(s.pics,(function(a,n){return["mp4"==a.split("/").pop().split(".").pop()?e("div",{key:n,staticClass:"overflow-hidden flex justify-center items-center",staticStyle:{width:"5rem",height:"5rem",display:"inline-block"}},[e("video",{staticClass:"min-w-full min-h-full",attrs:{src:a},on:{click:function(e){return t.videoPlay(a)}}},[t._v(" 您的浏览器不支持视频播放 ")])]):e("van-image",{key:n,staticClass:"mr-1 border border-gray-100",attrs:{src:a,width:"5rem",height:"5rem"},on:{click:function(e){return t.preview(s.pics,n)}}})]}))],2),e("div",{staticClass:"text-right"},[s.auth.revoke?e("van-button",{staticClass:"ml-2",attrs:{type:"warning",size:"small",to:"/orders/"+s.id+"/revoke"}},[t._v("撤销报修")]):t._e(),s.auth.confirm?e("van-button",{staticClass:"ml-2",attrs:{type:"danger",size:"small",to:"/orders/"+s.id+"/comment"}},[t._v("确认完成")]):t._e(),e("van-button",{staticClass:"ml-2",attrs:{type:"info",size:"small",to:"/orders/"+s.id+"/info"}},[t._v("报修进度")])],1)])})),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)},n=[],r=(s("4662"),s("28a2")),i=(s("14d9"),s("f8b4")),o={data:function(){return{orderList:[],loading:!1,error:!1,page:1,tabIndex:0,finished:!1,showEmpty:!1,videoShow:!1,videoUrl:""}},created:function(){this.$route.query&&this.$route.query.tabIndex>=0&&(this.tabIndex=this.$route.query.tabIndex),console.log(this.tabIndex)},methods:{videoPlay:function(t){this.videoUrl=t,this.videoShow=!0},preview:function(t,e){Object(r["a"])({images:t,startPosition:e,closeable:!0})},beforeChange:function(t){return this.finished=!1,this.loading=!1,this.error=!1,this.page=1,this.orderList=[],this.tabIndex=t,this.loadOrderList(),!0},loadOrderList:function(){var t=this;this.loading=!0,Object(i["d"])({tab_index:this.tabIndex,page:this.page++}).then((function(e){for(var s in t.loading=!1,e.data.length<t.$store.getters.setting.page_size&&(t.finished=!0),e.data)t.orderList.push(e.data[s]);0===t.orderList.length?t.showEmpty=!0:t.showEmpty=!1})).catch((function(){t.loading=!1,t.error=!0}))}}},c=o,l=s("2877"),d=Object(l["a"])(c,a,n,!1,null,null,null);e["default"]=d.exports},f8b4:function(t,e,s){"use strict";s.d(e,"a",(function(){return r})),s.d(e,"d",(function(){return i})),s.d(e,"c",(function(){return o})),s.d(e,"e",(function(){return c})),s.d(e,"b",(function(){return l}));var a=s("8035"),n=s("f9db");function r(t){return Object(a["a"])({url:n["a"].customer+"orders",method:"post",data:t})}function i(t){return Object(a["a"])({url:n["a"].customer+"orders",method:"get",params:t})}function o(t){return Object(a["a"])({url:n["a"].customer+"orders/".concat(t),method:"get"})}function c(t,e){return Object(a["a"])({url:n["a"].customer+"orders/".concat(t,"/revoke"),method:"post",data:e})}function l(t,e){return Object(a["a"])({url:n["a"].customer+"orders/".concat(t,"/comment"),method:"post",data:e})}}}]);