yxk_pc_mdh/gyhl/static/js/157.00d079513819da9afe1e.js

1 line
7.3 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"本周工作总结",prop:"contentSum"}},[a("el-input",{attrs:{type:"textarea",readonly:"",autosize:{minRows:4}},model:{value:t.formData.contentSum,callback:function(e){t.$set(t.formData,"contentSum",e)},expression:"formData.contentSum"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"下周工作计划",prop:"contentPlan"}},[a("el-input",{attrs:{type:"textarea",readonly:"",autosize:{minRows:4}},model:{value:t.formData.contentPlan,callback:function(e){t.$set(t.formData,"contentPlan",e)},expression:"formData.contentPlan"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"备注"}},[a("el-input",{attrs:{type:"textarea",readonly:"",autosize:{minRows:4}},model:{value:t.formData.description,callback:function(e){t.$set(t.formData,"description",e)},expression:"formData.description"}})],1),t._v(" "),a("el-form-item",{attrs:{label:""}},[a("el-table",{attrs:{data:t.tableData,"header-cell-style":{fontWeight:"normal",textAlign:"center",backgroundColor:"#eceff4",color:"#222"},border:""}},[a("el-table-column",{attrs:{prop:"reportDate",width:"100",label:"日期",align:"center"}}),t._v(" "),a("el-table-column",{attrs:{prop:"week",width:"80",align:"center",label:"星期"}}),t._v(" "),a("el-table-column",{attrs:{prop:"mustContent","show-overflow-tooltip":"",align:"center",label:"必做事项"}}),t._v(" "),a("el-table-column",{attrs:{prop:"waitContet","show-overflow-tooltip":"",align:"center",label:"待办事项"}}),t._v(" "),a("el-table-column",{attrs:{prop:"needSource","show-overflow-tooltip":"",align:"center",label:"需求资源"}})],1)],1),t._v(" "),a("el-form-item",{attrs:{label:"图片"}},[a("el-upload",{class:{hide:!0},attrs:{accept:".png,.jpg,.jpeg",action:t.uploadUrl,disabled:"","file-list":t.initFileList,"list-type":"picture-card","on-preview":t.handlePictureCardPreview}},[a("i",{staticClass:"el-icon-plus"})])],1),t._v(" "),a("el-form-item",{attrs:{label:"发给谁"}},[a("SearchMulitUsers",{attrs:{isedit:!1,initcurlists:t.selectUserList}})],1),t._v(" "),t.commentList.length>0?a("el-form-item",{attrs:{label:"回复"}},[a("el-timeline",t._l(t.commentList,function(e,i){return a("el-timeline-item",{key:i,attrs:{color:"#fff",timestamp:e.createTime}},[t._v("\n "+t._s(e.createByName)+""+t._s(e.comment)+"\n ")])}),1)],1):t._e()],1)],1),t._v(" "),a("el-dialog",{attrs:{visible:t.dialogVisible},on:{"update:visible":function(e){t.dialogVisible=e}}},[a("img",{attrs:{width:"100%",src:t.dialogImageUrl,alt:""}})]),t._v(" "),a("el-dialog",{attrs:{center:"",title:"回复",visible:t.dialogVisible3,width:"500px"},on:{"update:visible":function(e){t.dialogVisible3=e}}},[a("el-form",{attrs:{"label-width":"80px"}},[a("el-form-item",{attrs:{label:"回复内容"}},[a("el-input",{attrs:{type:"textarea",autosize:{minRows:4}},model:{value:t.comment,callback:function(e){t.comment=e},expression:"comment"}})],1)],1),t._v(" "),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{attrs:{type:"primary"},on:{click:function(e){t.dialogVisible3=!1}}},[t._v("取消")]),t._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:function(e){return t.commentFun()}}},[t._v("确定")])],1)],1)],1)},staticRenderFns:[]};var w=a("VU/8")(v,b,!1,function(t){a("PK7c"),a("GyGQ")},"data-v-d34aeeb2",null);e.default=w.exports}});