1 line
7.3 KiB
JavaScript
1 line
7.3 KiB
JavaScript
|
webpackJsonp([157],{GyGQ:function(t,e){},PK7c:function(t,e){},PejF:function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=a("d7EF"),o=a.n(i),n=a("//Fk"),l=a.n(n),r=a("woOf"),s=a.n(r),c=a("Dd8w"),m=a.n(c),u=a("NYxO"),d=a("HeHh"),f=a("lbHh"),p=a.n(f),h=a("bzuE"),g=a("Dod7"),v={name:"schedule_weekplan_add",components:{SearchMulitUsers:d.a},data:function(){return{uploadUrl:g.a.uploadUrl,ftpPrefix:g.a.ftpPrefix,formData:{targetList:[],taglocationappearanceImage:[],deletetag_appearanceImage:[]},tableData:[],getUserList:[],initFileList:[],selectUserList:[],btnShow:!1,dialogImageUrl:"",dialogVisible:!1,loading:!1,readonly:!1,commentList:[],dialogVisible3:!1,comment:"",from:"",config:h.a}},mounted:function(){this.initialize(),this.$route.query.id?(this.formData.id=this.$route.query.id,this.from=this.$route.query.from,this.getDetail(),this.btnShow=!1):this.btnShow=!0},methods:m()({},Object(u.d)({removeTagNav:"tagNav/removeTagNav"}),{getDetail:function(){var t=this,e=JSON.parse(p.a.get("userInfo")),a=this;this.loading=!0,this.$api.weekReportAPI.detail({id:this.formData.id}).then(function(i){if(0===i.code){if(t.commentList=i.commentList,t.formData=s()({},t.formData,i.weekReport),i.targetList&&i.targetList.forEach(function(e){var i={id:e.user_id,name:e.name};a.selectUserList.push(i),t.formData.targetList.push(e.user_id)}),i.weekReport.createBy!==e.userId&&(t.btnShow=!1,t.readonly=!0),i.initFileList&&i.initFileList.length>0){t.initFileList=[];for(var o=0;o<i.initFileList.length;o++){var n={name:i.initFileList[o].id,url:t.ftpPrefix+i.initFileList[o].filePath};t.initFileList.push(n)}}if(i.itemList&&i.itemList.length>0){t.tableData=[];for(o=0;o<i.itemList.length;o++){var l={id:i.itemList[o].id,reportDate:i.itemList[o].reportDate.split(" ")[0],week:i.itemList[o].week,mustContent:i.itemList[o].mustContent,waitContet:i.itemList[o].waitContet,needSource:i.itemList[o].needSource};a.tableData.push(l)}}else{t.getDates().forEach(function(e){var a={reportDate:e.date,week:e.week};t.tableData.push(a)})}t.loading=!1}}).catch(function(e){t.loading=!1})},commentFun:function(){var t=this,e={weekReportId:this.formData.id,comment:this.comment};this.$api.weekReportAPI.comment(e).then(function(e){0===e.code?(t.$message({message:e.msg,type:"success"}),location.reload(),t.dialogVisible3=!1,t.comment=""):t.$message({message:e.msg,type:"error"})})},initialize:function(){var t=this;l.a.all([this.$api.commonAPI.getUsers()]).then(function(e){var a=o()(e,1)[0];0===a.code&&(t.getUserList=a.datas)}).catch(function(t){console.log(t)})},back:function(){this.removeTagNav({path:this.$route.path,title:this.$route.meta.name}),this.$router.push({path:"/schedule/weekplan",query:{active:this.from,t:Date.now()}})},handlePictureCardPreview:function(t){this.dialogImageUrl=t.url,this.dialogVisible=!0},getDates:function(){for(var t=new Date,e=t.getTime(),a=t.getDay(),i=[],o=0;o<7;o++){var n=new Date(e+864e5*(o-(a+6)%7)),l=n.getFullYear(),r=n.getMonth(),s=n.getDate(),c=l+"-"+(r=this.doHandleMonth(r+1))+"-"+(s=this.doHandleMonth(s)),m="星期"+"日一二三四五六".charAt(n.getDay());i.push({date:c,week:m})}return i},doHandleMonth:function(t){var e=t;return 1==t.toString().length&&(e="0"+t),e}})},b={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"sys-box plan-box"},[a("div",{staticClass:"sys-operate"},[a("el-button",{attrs:{type:"primary"},on:{click:function(e){return t.back()}}},[t._v(t._s(t.config.cancelText))]),t._v(" "),1==t.from?a("el-button",{attrs:{type:"primary"},on:{click:function(e){t.dialogVisible3=!0}}},[t._v("回复")]):t._e()],1),t._v(" "),a("div",{staticClass:"sys-form"},[a("el-form",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],ref:"form",attrs:{"label-width":"130px",model:t.formData}},[a("el-form-item",{attrs:{label:"本周完成工作",prop:"comContent"}},[a("el-input",{attrs:{type:"textarea",readonly:"",autosize:{minRows:4}},model:{value:t.formData.comContent,callback:function(e){t.$set(t.formData,"comContent",e)},expression:"formData.comContent"
|