chunk-89d9fea6.440b3fa3.js 8.1 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-89d9fea6"],{"083a":function(t,e,n){"use strict";var a=n("0d51"),o=TypeError;t.exports=function(t,e){if(!delete t[e])throw o("Cannot delete property "+a(e)+" of "+a(t))}},1453:function(t,e,n){"use strict";n.r(e);var a=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"layout"},[n("div",{staticClass:"topHeader"},[n("van-icon",{staticClass:"vanIcon",attrs:{name:"arrow-left"},on:{click:t.backtrack}}),n("span",[t._v("项目计划")]),t.types?t._e():n("div",{staticClass:"uploads",on:{click:t.edit}},[t._v("重新编辑")])],1),n("div",{class:[t.types?"textContent1":"textContent"]},[t.data.status?n("p",{staticClass:"textColor"},[t._v(" 审批状态:"+t._s("1"===t.data.status?"待确认":"2"===t.data.status?"已确认":"已驳回"))]):t._e(),"3"===t.data.status?n("p",{staticClass:"textColor"},[t._v("驳回原因:"+t._s(t.data.dismissReason))]):t._e(),n("ul",{staticClass:"substance"},t._l(t.list,(function(e,a){return n("li",{key:e.id},[n("van-swipe-cell",{staticStyle:{"":"none"},scopedSlots:t._u([{key:"right",fn:function(){return[n("van-button",{staticClass:"delete-button",staticStyle:{"border-radius":".1rem"},attrs:{square:"",type:"danger",text:"删除"},on:{click:function(n){return t.del(e.id)}}})]},proxy:!0}],null,!0)},[n("div",{staticClass:"items"},[n("van-field",{attrs:{required:"",rows:"1",maxlength:"100",autosize:"",label:"工作内容",type:"textarea",placeholder:"请输入工作内容"},model:{value:t.list[a].content,callback:function(e){t.$set(t.list[a],"content",e)},expression:"list[index].content"}}),n("van-cell",{attrs:{required:"",title:"开始时间",value:t.list[a].startTime},on:{click:function(e){t.list[a].startTimeShow=!0}}}),n("van-cell",{attrs:{required:"",title:"结束时间",value:t.list[a].endTime},on:{click:function(e){t.list[a].endTimeShow=!0}}})],1)]),n("van-calendar",{attrs:{color:"#004098","min-date":new Date(2e3,1,1),"default-date":t.list[a].startTime?new Date(t.list[a].startTime):new Date},on:{confirm:function(e){return t.onConfirm(e,a,"start")}},model:{value:t.list[a].startTimeShow,callback:function(e){t.$set(t.list[a],"startTimeShow",e)},expression:"list[index].startTimeShow"}}),n("van-calendar",{attrs:{color:"#004098","min-date":t.getMinDate(t.list[a].startTime),"default-date":t.list[a].endTime?new Date(t.list[a].endTime):new Date},on:{confirm:function(e){return t.onConfirm(e,a,"end")}},model:{value:t.list[a].endTimeShow,callback:function(e){t.$set(t.list[a],"endTimeShow",e)},expression:"list[index].endTimeShow"}})],1)})),0)]),t.types?n("div",{staticClass:"foot"},[n("van-button",{staticClass:"btns",attrs:{type:"default"},on:{click:t.add}},[t._v("添加")]),n("van-button",{staticClass:"btns",staticStyle:{background:"rgb(0, 64, 152)"},attrs:{type:"info"},on:{click:t.submit}},[t._v("提交")])],1):t._e()])},o=[],i=(n("99af"),n("4160"),n("a434"),n("b0c0"),n("d3b7"),n("ac1f"),n("1276"),n("159b"),n("96cf"),n("1da1")),r=n("5530"),s=n("12b5"),c=n.n(s),l=n("ec26"),u=n("2f62"),d=n("3324"),f={name:"VueCli4VantIndex",data:function(){return{list:[{content:"",startTime:null,endTime:null,id:Object(l["a"])(),startTimeShow:!1,endTimeShow:!1}],date:"",data:{},types:!0,show:!1}},computed:Object(r["a"])({getMinDate:function(){return function(t){if(t){var e=t.split("-");return new Date(1*e[0],1*e[1]-1,1*e[2])}return new Date}}},Object(u["b"])("login",["user"])),mounted:function(){this.getProjectPlan()},methods:{edit:function(){this.types=!0},getProjectPlan:function(){var t=this;Object(d["o"])({projectNo:this.user.projectNo}).then((function(e){var n=e.data;200===n.code?(t.data=n.data,n.data.status&&"3"!==n.data.status&&(t.types=!1),console.log(n.data.constructionPlanDetails),t.list=n.data.constructionPlanDetails):t.$router.go(-1)})).catch((function(e){t.$notify({type:"danger",message:e.response.data.msg,duration:1e3}),t.$router.go(-1)}))},backtrack:function(){this.$router.go(-1)},formatDate:function(t){return"".concat(t.getFullYear(),"-").concat(2===String(t.getMonth()+1).length?t.getMonth()+1:"0"+(t.getMonth()+1),"-").concat(2===String(t.getDate()).length?t.getDate():"0"+t.getDate())},onConfirm:function(t,e,n){console.log(t,e),this.list[e][n+"Time"]=this.formatDate(t),this.list[e][n+"TimeShow"]=!1},add:function(){this.list.push({content:"",startTime:null,endTime:null,id:Object(l["a"])(),startTimeShow:!1,endTimeShow:!1})},del:function(t){var e=this;this.$dialog({message:"您将删除当前计划,删除后无法恢复,确认删除吗?",showCancelButton:!0}).then((function(){e.list.forEach((function(n,a){n.id===t&&e.list.splice(a,1)})),e.$notify({type:"warning",message:"已删除",duration:1e3})})).catch((function(t){e.$notify({type:"danger",message:t.response.data.msg,duration:1e3})}))},submit:function(){var t=this;Object(d["G"])({constructionPlanDetailDtoList:this.list,projectNo:this.user.projectNo,createUser:this.user.name}).then((function(e){var n=e.data;200===n.code?(t.$notify({type:"success",message:"提交成功",duration:1e3}),t.$router.go(-1)):t.$notify({type:"danger",message:n.msg,duration:1e3})})).catch((function(e){t.$notify({type:"danger",message:e.response.data.msg,duration:1e3})}))},aaa:function(){console.log(22222)},afterRead:function(t){var e=this;return Object(i["a"])(regeneratorRuntime.mark((function n(){var a,o;return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return console.log(t),n.next=3,e.readFile(t.file);case 3:a=n.sent,console.log(c.a.read(a,{type:"binary"})),o=c.a.read(a,{type:"binary"}),a=c.a.utils.sheet_to_json(o.Sheets[o.SheetNames[0]]),console.log(a),e.list=[],a.forEach((function(t){t["工作内容"]&&e.list.push({content:t["工作内容"],startTime:t["开始时间"]||null,endTime:t["结束时间"]||null,id:Object(l["a"])(),startTimeShow:!1,endTimeShow:!1})})),console.log(e.list);case 11:case"end":return n.stop()}}),n)})))()},readFile:function(t){return new Promise((function(e){var n=new FileReader;n.readAsBinaryString(t),n.onload=function(t){e(t.target.result)}}))}}},m=f,p=(n("c611"),n("2877")),h=Object(p["a"])(m,a,o,!1,null,"68ce8280",null);e["default"]=h.exports},"3a349":function(t,e,n){"use strict";var a=n("83ab"),o=n("e8b5"),i=TypeError,r=Object.getOwnPropertyDescriptor,s=a&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(t){return t instanceof TypeError}}();t.exports=s?function(t,e){if(o(t)&&!r(t,"length").writable)throw i("Cannot set read only .length");return t.length=e}:function(t,e){return t.length=e}},a434:function(t,e,n){"use strict";var a=n("23e7"),o=n("7b0b"),i=n("23cb"),r=n("5926"),s=n("07fa"),c=n("3a349"),l=n("3511"),u=n("65f0"),d=n("8418"),f=n("083a"),m=n("1dde"),p=m("splice"),h=Math.max,g=Math.min;a({target:"Array",proto:!0,forced:!p},{splice:function(t,e){var n,a,m,p,y,b,v=o(this),w=s(v),T=i(t,w),S=arguments.length;for(0===S?n=a=0:1===S?(n=0,a=w-T):(n=S-2,a=g(h(r(e),0),w-T)),l(w+n-a),m=u(v,a),p=0;p<a;p++)y=T+p,y in v&&d(m,p,v[y]);if(m.length=a,n<a){for(p=T;p<w-a;p++)y=p+a,b=p+n,y in v?v[b]=v[y]:f(v,b);for(p=w;p>w-a+n;p--)f(v,p-1)}else if(n>a)for(p=w-a;p>T;p--)y=p+a-1,b=p+n-1,y in v?v[b]=v[y]:f(v,b);for(p=0;p<n;p++)v[p+T]=arguments[p+2];return c(v,w-a+n),m}})},b0a5:function(t,e,n){},c611:function(t,e,n){"use strict";var a=n("b0a5"),o=n.n(a);o.a},ec26:function(t,e,n){"use strict";const a="undefined"!==typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);var o={randomUUID:a};let i;const r=new Uint8Array(16);function s(){if(!i&&(i="undefined"!==typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!i))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return i(r)}const c=[];for(let d=0;d<256;++d)c.push((d+256).toString(16).slice(1));function l(t,e=0){return(c[t[e+0]]+c[t[e+1]]+c[t[e+2]]+c[t[e+3]]+"-"+c[t[e+4]]+c[t[e+5]]+"-"+c[t[e+6]]+c[t[e+7]]+"-"+c[t[e+8]]+c[t[e+9]]+"-"+c[t[e+10]]+c[t[e+11]]+c[t[e+12]]+c[t[e+13]]+c[t[e+14]]+c[t[e+15]]).toLowerCase()}function u(t,e,n){if(o.randomUUID&&!e&&!t)return o.randomUUID();t=t||{};const a=t.random||(t.rng||s)();if(a[6]=15&a[6]|64,a[8]=63&a[8]|128,e){n=n||0;for(let t=0;t<16;++t)e[n+t]=a[t];return e}return l(a)}e["a"]=u}}]);