chunk-2ce8f55e.b625bf65.js 9.7 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2ce8f55e"],{"083a":function(t,e,o){"use strict";var n=o("0d51"),i=TypeError;t.exports=function(t,e){if(!delete t[e])throw new i("Cannot delete property "+n(e)+" of "+n(t))}},"09bb":function(t,e,o){"use strict";o.d(e,"b",(function(){return i})),o.d(e,"a",(function(){return r})),o.d(e,"d",(function(){return a})),o.d(e,"c",(function(){return d}));var n=o("f0e1");function i(t){return Object(n["a"])({url:"qiniu/token",method:"get",params:t})}function r(t){return Object(n["a"])({url:"send_verify_code",method:"get",params:t})}function a(t,e){return Object(n["a"])({url:"worksites/".concat(t),method:"get",params:e})}function d(t){return Object(n["a"])({url:"worksitenodes",method:"get",params:t})}},"1d32":function(t,e,o){"use strict";o("7db0"),o("c740"),o("d81d"),o("d3b7");var n=function(){var t=this,e=t._self._c;return e("span",[t.dropDown?e("span",{staticClass:"px-2",on:{click:t.showSelect}},[t._v(" "+t._s(t.columns.find((function(e){return e[t.valueKey]==t.value}))?t.columns.find((function(e){return e[t.valueKey]==t.value}))[t.labelKey]:"")+" "),e("van-icon",{attrs:{name:"arrow-down"}})],1):e("van-field",{attrs:{readonly:"",clickable:t.edit,border:t.border,label:t.label,value:t.columns.find((function(e){return e[t.valueKey]==t.value}))?t.columns.find((function(e){return e[t.valueKey]==t.value}))[t.labelKey]:"",placeholder:t.placeholder,disabled:t.disabled,rules:t.rules},on:{click:t.showSelect}}),e("van-popup",{attrs:{round:"",position:"bottom"},model:{value:t.showPicker,callback:function(e){t.showPicker=e},expression:"showPicker"}},[e("van-picker",{attrs:{"show-toolbar":"",title:t.label,columns:t.columns.map((function(e){return{text:e[t.labelKey],value:e[t.valueKey]}})),"default-index":t.columns.find((function(e){return e[t.valueKey]==t.value}))?t.columns.findIndex((function(e){return e[t.valueKey]==t.value})):0},on:{cancel:function(e){t.showPicker=!1},confirm:t.onConfirm}})],1)],1)},i=[],r={name:"Select",components:{},props:{value:{default:""},label:{type:String,default:""},placeholder:{type:String,default:""},disabled:{type:Boolean,default:!1},border:{type:Boolean,default:!1},data:{type:String,default:""},edit:{type:Boolean,default:!0},rules:{type:Array,default:function(){return[]}},columns:{type:Array,default:function(){return[]}},labelKey:{default:"name"},valueKey:{default:"id"},dropDown:{type:Boolean,default:!1}},data:function(){return{showPicker:!1}},methods:{showSelect:function(){this.edit&&(this.showPicker=!0)},onConfirm:function(t){t=t.value;this.$emit("input",t),this.$emit("change",t),this.showPicker=!1}}},a=r,d=o("2877"),c=Object(d["a"])(a,n,i,!1,null,"6cfad04c",null);e["a"]=c.exports},"25f0d":function(t,e,o){"use strict";o("b137")},"3f7e":function(t,e,o){"use strict";var n=o("b5db"),i=n.match(/firefox\/(\d+)/i);t.exports=!!i&&+i[1]},"4de4":function(t,e,o){"use strict";var n=o("23e7"),i=o("b727").filter,r=o("1dde"),a=r("filter");n({target:"Array",proto:!0,forced:!a},{filter:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}})},"4e82":function(t,e,o){"use strict";var n=o("23e7"),i=o("e330"),r=o("59ed"),a=o("7b0b"),d=o("07fa"),c=o("083a"),s=o("577e"),u=o("d039"),l=o("addb"),f=o("a640"),h=o("3f7e"),m=o("99f4"),g=o("1212"),p=o("ea83"),v=[],b=i(v.sort),w=i(v.push),k=u((function(){v.sort(void 0)})),y=u((function(){v.sort(null)})),S=f("sort"),$=!u((function(){if(g)return g<70;if(!(h&&h>3)){if(m)return!0;if(p)return p<603;var t,e,o,n,i="";for(t=65;t<76;t++){switch(e=String.fromCharCode(t),t){case 66:case 69:case 70:case 72:o=3;break;case 68:case 71:o=4;break;default:o=2}for(n=0;n<47;n++)v.push({k:e+n,v:o})}for(v.sort((function(t,e){return e.v-t.v})),n=0;n<v.length;n++)e=v[n].k.charAt(0),i.charAt(i.length-1)!==e&&(i+=e);return"DGBEFHACIJK"!==i}})),L=k||!y||!S||!$,O=function(t){return function(e,o){return void 0===o?-1:void 0===e?1:void 0!==t?+t(e,o)||0:s(e)>s(o)?1:-1}};n({target:"Array",proto:!0,forced:L},{sort:function(t){void 0!==t&&r(t);var e=a(this);if($)return void 0===t?b(e):b(e,t);var o,n,i=[],s=d(e);for(n=0;n<s;n++)n in e&&w(i,e[n]);l(i,O(t)),o=d(i),n=0;while(n<o)e[n]=i[n++];while(n<s)c(e,n++);return e}})},"7db0":function(t,e,o){"use strict";var n=o("23e7"),i=o("b727").find,r=o("44d2"),a="find",d=!0;a in[]&&Array(1)[a]((function(){d=!1})),n({target:"Array",proto:!0,forced:d},{find:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),r(a)},"99f4":function(t,e,o){"use strict";var n=o("b5db");t.exports=/MSIE|Trident/.test(n)},ae79:function(t,e,o){"use strict";o.d(e,"a",(function(){return n})),o.d(e,"b",(function(){return i})),o.d(e,"c",(function(){return r}));o("d401"),o("4de4"),o("4160"),o("b64b"),o("d3b7"),o("4d63"),o("c607"),o("ac1f"),o("2c3e"),o("25f0"),o("4d90"),o("5319"),o("159b");function n(t,e){var o,n={"Y+":e.getFullYear().toString(),"m+":(e.getMonth()+1).toString(),"d+":e.getDate().toString(),"H+":e.getHours().toString(),"M+":e.getMinutes().toString(),"S+":e.getSeconds().toString()};for(var i in n)o=new RegExp("("+i+")").exec(t),o&&(t=t.replace(o[1],1==o[1].length?n[i]:n[i].padStart(o[1].length,"0")));return t}function i(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],o=0,n=0,i=0;t>86400&&(o=Math.floor(t/86400),t%=86400),t>3600&&(n=Math.floor(t/3600),t%=3600),t>60&&(i=Math.floor(t/60),t%=60);var r=t+"秒";return(i>0||n>0||o>0)&&(r=i+"分"+(e?r:"")),(n>0||o>0)&&(r=n+"小时"+(e?r:"")),o>0&&(r=o+"天"+(e?r:"")),r}function r(t){if("string"===typeof t)try{return JSON.parse(t)}catch(e){return[]}return t instanceof Array?t:[]}},b137:function(t,e,o){},d81d:function(t,e,o){"use strict";var n=o("23e7"),i=o("b727").map,r=o("1dde"),a=r("map");n({target:"Array",proto:!0,forced:!a},{map:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}})},e107:function(t,e,o){"use strict";o.r(e);var n=function(){var t=this,e=t._self._c;return t.worksite.id?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)}},scopedSlots:t._u([{key:"right",fn:function(){return[t.worksite.starttime&&t.checkAuth(["work:worksite:edittime"])&&0!=t.nodes.length?e("van-icon",{attrs:{name:"plus"},on:{click:t.addNode}}):t._e()]},proxy:!0}],null,!1,2878913450)})],1):t._e()},i=[],r=(o("e17f"),o("2241")),a=(o("4e82"),o("e25e"),o("09bb")),d=o("da1a"),c=o("46e0"),s=o("1d32"),u=o("ae79"),l={components:{Select:s["a"]},data:function(){return{nodes:[],processs:[],worksite:{},worksitenodes:[],editTimeShow:!1,nodeShow:!1,nodeForm:{},nodeState:{0:"未完工",1:"已开工",2:"待验收",3:"已验收",4:"已取消"},returnvisits:[],qualityaccepts:[]}},created:function(){this.$route.params&&this.$route.params.id&&(this.id=this.$route.params.id),this.loadWorksite()},methods:{checkAuth:c["a"],dateFormat:u["a"],addNode:function(){this.nodeForm={site_id:parseInt(this.id),node_id:this.nodes[0].id,name:this.nodes[0].name,return_visit_id:0,quality_accept_id:0},this.nodeShow=!0},editNode:function(t){Object(c["a"])(["work:worksite:edittime"])&&(this.nodeForm=Object.assign({},t),this.nodeShow=!0)},loadNodes:function(){var t=this;this.$store.commit("loading/showLoading"),Object(d["getWorkNodes"])().then((function(e){t.nodes=e.data.list,t.$store.commit("loading/hideLoading")})).catch((function(){t.$store.commit("loading/hideLoading")}))},loadProcesss:function(){var t=this;this.$store.commit("loading/showLoading"),Object(d["getWorkProcesss"])().then((function(e){t.$store.commit("loading/hideLoading"),t.processs=e.data.list})).catch((function(){t.$store.commit("loading/hideLoading")}))},loadReturnVisits:function(){var t=this;this.$store.commit("loading/showLoading"),Object(d["getWorkReturnVisits"])().then((function(e){t.$store.commit("loading/hideLoading"),t.returnvisits=e.data.list})).catch((function(){t.$store.commit("loading/hideLoading")}))},loadQualityAccepts:function(){var t=this;this.$store.commit("loading/showLoading"),Object(d["getWorkQualityAccepts"])().then((function(e){t.$store.commit("loading/hideLoading"),t.qualityaccepts=e.data.list})).catch((function(){t.$store.commit("loading/hideLoading")}))},loadWorksite:function(){var t=this;this.$store.commit("loading/showLoading"),Object(a["d"])(this.id).then((function(e){t.worksite=e.data,t.loadWorksiteNodes()})).catch((function(){t.$store.commit("loading/hideLoading")}))},loadWorksiteNodes:function(){var t=this;this.$store.commit("loading/showLoading"),Object(a["c"])({site_id:this.id}).then((function(e){t.$store.commit("loading/hideLoading"),t.worksitenodes=e.data.list.sort((function(t,e){return t.starttime-e.starttime}))})).catch((function(){t.$store.commit("loading/hideLoading")}))},editTime:function(t){var e=this;console.log(t),this.$store.commit("loading/showLoading"),Object(d["workSiteTime"])(this.id,{starttime:parseInt(t[0].getTime()/1e3),endtime:parseInt(t[1].getTime()/1e3)}).then((function(t){e.loadWorksite(),e.editTimeShow=!1})).catch((function(){e.$store.commit("loading/hideLoading")}))},saveNode:function(){var t=this;this.$store.commit("loading/showLoading"),this.nodeForm.id?Object(d["editWorkSiteNode"])(this.nodeForm.id,this.nodeForm).then((function(e){t.loadWorksite(),t.nodeShow=!1})).catch((function(){t.$store.commit("loading/hideLoading")})):Object(d["addWorkSiteNode"])(this.nodeForm).then((function(e){t.loadWorksite(),t.nodeShow=!1})).catch((function(){t.$store.commit("loading/hideLoading")}))},delNode:function(){var t=this;r["a"].confirm({message:"确认删除此项目节点吗"}).then((function(){t.$store.commit("loading/showLoading"),Object(d["delWorkSiteNode"])(t.nodeForm.id).then((function(e){t.loadWorksite(),t.nodeShow=!1})).catch((function(){t.$store.commit("loading/hideLoading")}))})).catch((function(){}))}}},f=l,h=(o("25f0d"),o("2877")),m=Object(h["a"])(f,n,i,!1,null,"10ebe290",null);e["default"]=m.exports},ea83:function(t,e,o){"use strict";var n=o("b5db"),i=n.match(/AppleWebKit\/(\d+)\./);t.exports=!!i&&+i[1]}}]);