(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-8c5b"],{"+D+8":function(t,e,s){"use strict";var i=s("M6Gn");s.n(i).a},"+mv6":function(t,e,s){"use strict";var i=s("cV04");s.n(i).a},"/BaV":function(t,e,s){"use strict";var i=s("MI42");s.n(i).a},"/esw":function(t,e,s){"use strict";var i=s("Flj7"),a={name:"TaskCell",components:{},mixins:[s("kK4T").a],props:{data:Object,dataIndex:Number,dataSection:Number},data:function(){return{}},computed:{priority:function(){return 0!=this.data.priority&&this.data.priority?this.getPriorityColor(this.data.priority):this.priorityList[3]},showLabels:function(){return this.data.lableList.length>3?this.data.lableList.slice(0,3):this.data.lableList},hideShowLabels:function(){return this.data.lableList.length>3?this.data.lableList.slice(3):[]}},watch:{},mounted:function(){},methods:{taskOverClick:function(t){var e=this;Object(i.n)({task_id:t.task_id,status:t.checked?5:1}).then(function(t){e.$emit("on-handle","complete",e.data,e.dataIndex,e.dataSection)}).catch(function(){t.checked=!1})},rowFun:function(t){this.$emit("on-handle","view",this.data,this.dataIndex,this.dataSection)},onmouseoverFun:function(t){this.$refs.itemSpan.offsetWidth>this.$refs.listLeft.offsetWidth-21?this.$set(t,"show",!0):this.$set(t,"show",!1)}}},n=(s("+D+8"),s("KHd+")),o=Object(n.a)(a,function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{ref:"taskRow",staticClass:"list task-cell",on:{click:function(e){t.rowFun(t.data)}}},[s("div",{ref:"listLeft",staticClass:"list-left"},[s("div",{class:t.data.checked?"title title-active":"title",on:{click:function(t){t.stopPropagation()}}},[s("el-checkbox",{on:{change:function(e){t.taskOverClick(t.data)}},model:{value:t.data.checked,callback:function(e){t.$set(t.data,"checked",e)},expression:"data.checked"}})],1),t._v(" "),s("span",{staticClass:"priority",style:{backgroundColor:t.priority.color}},[t._v(t._s(t.priority.label))]),t._v(" "),s("el-tooltip",{attrs:{placement:"bottom",effect:"light","popper-class":"task-tooltip tooltip-change-border"}},[s("div",{attrs:{slot:"content"},slot:"content"},[s("span",[t._v(t._s(t.data.task_name||t.data.name))])]),t._v(" "),s("span",{ref:"itemSpan",class:t.data.checked?"item-name-active":"item-name"},[t._v("\n "+t._s(t.data.task_name||t.data.name)+"\n ")])])],1),t._v(" "),s("div",{staticClass:"list-right"},[t.data.lableList&&t.data.lableList.length>0?s("div",{staticClass:"tag-box"},[t._l(t.showLabels,function(e,i){return s("span",{key:i,staticClass:"k-name",style:{background:e.color}},[t._v(t._s(e.name))])}),t._v(" "),t.hideShowLabels.length?s("el-tooltip",{attrs:{placement:"top",effect:"light","popper-class":"tooltip-change-border"}},[s("div",{staticClass:"tooltip-content",attrs:{slot:"content"},slot:"content"},t._l(t.hideShowLabels,function(e,i){return s("div",{key:i,staticClass:"item-label",staticStyle:{display:"inline-block","margin-right":"10px"}},[s("span",{staticClass:"k-name",staticStyle:{"border-radius":"3px",color:"#FFF",padding:"3px 10px"},style:{background:e.color||"#ccc"}},[t._v(t._s(e.name))])])})),t._v(" "),s("el-button",{staticClass:"more-btn",attrs:{icon:"el-icon-more"}})],1):t._e()],2):t._e(),t._v(" "),t.data.stop_time||t.data.stopTime?s("span",{class:["due-time",{"is-past":1==t.data.is_end}]},[t._v("\n 截止时间"+t._s(t.data.stop_time||t.data.stopTime)+"\n ")]):t._e(),t._v(" "),s("div",{staticClass:"img-group"},[t.data.relationCount?s("div",{staticClass:"img-box"},[s("i",{staticClass:"wukong wukong-relevance"}),t._v(" "),s("span",[t._v(t._s(t.data.relationCount))])]):t._e(),t._v(" "),t.data.subdonecount>0||t.data.subcount?s("div",{staticClass:"img-box"},[s("i",{staticClass:"wukong wukong-sub-task"}),t._v(" "),s("span",[t._v(t._s(t.data.subdonecount)+"/"+t._s(t.data.subdonecount+t.data.subcount))])]):t._e(),t._v(" "),t.data.filecount?s("div",{staticClass:"img-box"},[s("i",{staticClass:"wukong wukong-file"}),t._v(" "),s("span",[t._v(t._s(t.data.filecount))])]):t._e(),t._v(" "),t.data.commentcount||t.data.commentCount?s("div",{staticClass:"img-box"},[s("i",{staticClass:"wukong wukong-comment-task"}),t._v(" "),s("span",[t._v(t._s(t.data.commentcount||t.data.commentCount))])]):t._e()]),t._v(" "),t.data.main_user&&t.data.main_user.id?s("xr-avatar",{staticClass:"user-img",attrs:{name:t.data.main_user.realname,id:t.data.main_user.id,size:24,src:t.data.main_user.img,disabled:!1,trigger:"hover"},on:{click:function(t){t.stopPropagation()}}}):t._e()],1)])},[],!1,null,"679b456d",null);o.options.__file="TaskCell.vue";e.a=o.exports},"0/tg":function(t,e,s){"use strict";var i=s("ulYl");s.n(i).a},"3bw5":function(t,e,s){"use strict";var i=s("bUSk");s.n(i).a},"4dIA":function(t,e,s){"use strict";var i=s("Flj7"),a={name:"TaskCell",components:{},mixins:[s("kK4T").a],props:{data:Object,dataIndex:Number,dataSection:Number},data:function(){return{}},mounted:function(){},methods:{taskOverClick:function(t){Object(i.n)({task_id:t.task_id,status:t.checked?5:1}).then(function(t){}).catch(function(){t.checked=!1})},rowFun:function(t){this.$emit("on-handle",{type:"view",data:{item:this.data,index:this.dataIndex,section:this.dataSection}})}}},n=(s("zDjq"),s("KHd+")),o=Object(n.a)(a,function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{ref:"taskRow",staticClass:"list",style:{"border-left-color":t.getPriorityColor(t.data.priority).color},on:{click:function(e){t.rowFun(t.data)}}},[s("div",{ref:"listLeft",staticClass:"list-left"},[s("div",{class:t.data.checked?"title title-active":"title",on:{click:function(t){t.stopPropagation()}}},[s("el-checkbox",{on:{change:function(e){t.taskOverClick(t.data)}},model:{value:t.data.checked,callback:function(e){t.$set(t.data,"checked",e)},expression:"data.checked"}})],1),t._v(" "),s("el-tooltip",{attrs:{placement:"bottom",effect:"light","popper-class":"task-tooltip tooltip-change-border"}},[s("div",{attrs:{slot:"content"},slot:"content"},[s("span",[t._v(t._s(t.data.name))])]),t._v(" "),s("span",{ref:"itemSpan",class:t.data.checked?"item-name-active":"item-name"},[t._v("\n "+t._s(t.data.name)+"\n ")])])],1),t._v(" "),s("div",{staticClass:"list-right"},[t.data.lableList?s("div",{staticClass:"tag-box"},[t.data.lableList.length<=2?t._l(t.data.lableList,function(e,i){return s("div",{key:i,staticClass:"item-label"},[s("span",{staticClass:"k-name",style:{background:e.color}},[t._v(t._s(e.name))])])}):[s("span",{staticClass:"k-name",style:{background:t.data.lableList[0].color}},[t._v(t._s(t.data.lableList[0].name))]),t._v(" "),s("span",{staticClass:"k-name",style:{background:t.data.lableList[1].color}},[t._v(t._s(t.data.lableList[1].name))]),t._v(" "),s("el-tooltip",{attrs:{placement:"top",effect:"light","popper-class":"tooltip-change-border task-tooltip"}},[s("div",{staticClass:"tooltip-content",staticStyle:{margin:"10px 10px 10px 0"},attrs:{slot:"content"},slot:"content"},t._l(t.data.lableList,function(e,i){return s("div",{key:i,staticClass:"item-label",staticStyle:{display:"inline-block","margin-right":"10px"}},[i>=2?s("span",{staticClass:"k-name",staticStyle:{"border-radius":"3px",color:"#FFF",padding:"3px 10px"},style:{background:e.color?e.color:"#ccc"}},[t._v(t._s(e.name))]):t._e()])})),t._v(" "),s("span",{staticClass:"color-label-more"},[s("i",[t._v("...")])])])]],2):t._e(),t._v(" "),s("div",{staticClass:"img-group"},[t.data.relationCount?s("div",{staticClass:"img-box"},[s("i",{staticClass:"wukong wukong-relevance"}),t._v(" "),s("span",[t._v(t._s(t.data.relationCount))])]):t._e(),t._v(" "),t.data.subdonecount>0||t.data.subcount>0?s("div",{staticClass:"img-box"},[s("i",{staticClass:"wukong wukong-sub-task"}),t._v(" "),s("span",[t._v(t._s(t.data.subdonecount)+"/"+t._s(t.data.subdonecount+t.data.subcount))])]):t._e(),t._v(" "),t.data.filecount?s("div",{staticClass:"img-box"},[s("i",{staticClass:"wukong wukong-file"}),t._v(" "),s("span",[t._v(t._s(t.data.filecount))])]):t._e(),t._v(" "),t.data.commentcount?s("div",{staticClass:"img-box"},[s("i",{staticClass:"wukong wukong-comment-task"}),t._v(" "),s("span",[t._v(t._s(t.data.commentcount))])]):t._e(),t._v(" "),t.data.stop_time?s("div",{staticClass:"img-box"},[s("i",{staticClass:"wukong wukong-time-task",style:{color:1!=t.data.is_end||t.data.checked?"#999":"red"}}),t._v(" "),s("span",{style:{color:1!=t.data.is_end||t.data.checked?"#999":"red"}},[t._v(t._s(t._f("moment")(t.data.stop_time,"MM-DD"))+" 截止")])]):t._e()]),t._v(" "),s("div",{staticClass:"item-own-box"},[t.data.main_user&&t.data.main_user.id?s("el-tooltip",{attrs:{placement:"bottom",effect:"light","popper-class":"tooltip-change-border"}},[s("div",{attrs:{slot:"content"},slot:"content"},[s("span",[t._v(t._s(t.data.main_user.realname))])]),t._v(" "),s("xr-avatar",{staticClass:"user-img",attrs:{name:t.data.main_user.realname,size:24,src:t.data.main_user.img}})],1):t._e()],1)])])},[],!1,null,"3071fd8f",null);o.options.__file="TaskCell.vue";e.a=o.exports},"81l/":function(t,e,s){},"9kkH":function(t,e,s){"use strict";var i=s("C8ON");s.n(i).a},BhLs:function(t,e,s){"use strict";var i=s("aLzj");s.n(i).a},C8ON:function(t,e,s){},GcM4:function(t,e,s){"use strict";var i=s("bVJV");s.n(i).a},IKCp:function(t,e,s){"use strict";var i=s("JqEL"),a=s("Kw5r"),n={isDown:!1,coord:{x:0,y:0}},o=null,c=[],l=function(t){this&&this.contains(t.target)&&(o.style.cursor="pointer",n.isDown=!0,n.coord.x=t.pageX,n.coord.y=t.pageY)},r=function(t){o.style.cursor="default",n.isDown=!1,n.coord.x=0,n.coord.y=0},d=function(t){if(n.isDown){var e=n.coord.x-t.pageX;n.coord.x=t.pageX,o.scrollLeft=o.scrollLeft+e}},u=function(t){h(t)?(o.style.cursor="default",n.isDown=!1):this&&this.contains(t.target)&&(o.scrollLeft+=t.deltaY)},h=function(t){var e=!1;return c.forEach(function(s){var i=document.getElementsByClassName(s);if(i&&!e)for(var a=0;an.top&&t.clientYn.left&&t.clientX3&&void 0!==arguments[3])||arguments[3],n=null;if(t.checked){e.list[s].task_id!=t.task_id&&(s=null);for(var o=e.list.length-1;o>=0;o--){var c=e.list[o];if(null===s&&t.task_id==c.task_id&&(s=o),c.checked||(n=o),null!==s&&null!==n)break}n=0;l--){var r=e.list[l];if(null===s&&t.task_id==r.task_id&&(s=l),null!==s)break}n=0}null!=n&&n>=0&&n!=s&&(e.list.splice(s,1),e.list.splice(n,0,t),a&&Object(i.k)({toList:e.list.map(function(t){return t.task_id}),toId:e.class_id,work_id:this.workId}).then(function(t){}).catch(function(){}))},delectTaskListClick:function(t,e){var s=this;this.$confirm("您确定要删除?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){Object(i.l)({class_id:t.class_id,work_id:s.workId}).then(function(i){s.taskList.splice(e,1),s.$message.success("删除成功"),t.taskHandleShow=!1}).catch(function(){})}).catch(function(){s.$message({type:"info",message:"已取消删除"})})},archiveTaskListClick:function(t){var e=this,s={board:i.f,user:i.e}[this.showType||"board"],a={work_id:this.workId,class_id:t.id||t.class_id};a[this.tableField]=t[this.tableField],s(a).then(function(s){e.$message.success("归档成功"),t.taskHandleShow=!1,e.getList()})},renameTaskListClick:function(t){this.editTaskListName=t[this.tableNameField],t.taskHandleShow=!1},renameTaskListSubmit:function(t){var e=this;Object(r.f)({name:this.editTaskListName,class_id:t.class_id,work_id:this.workId}).then(function(s){t[e.tableNameField]=e.editTaskListName,e.$message.success("编辑成功")}).catch(function(){}),t.renameShow=!1},createTaskListSave:function(){var t=this;Object(r.e)({name:this.taskListName,work_id:this.workId}).then(function(e){t.$message.success("新建成功"),t.taskListName="",t.getList()}).catch(function(){}),this.createTaskListShow=!1},addSubTaskSuc:function(){this.createSubTaskClassId="hidden",this.getList()},createSubTaskClick:function(t,e){this.$refs.taskQuickAdd[e].moreClick(),this.createSubTaskClassId=t[this.tableField],t.taskHandleShow&&(t.taskHandleShow=!1)},showDetailView:function(t,e,s){this.taskID=t.task_id,this.detailIndex=s,this.detailSection=e,this.taskDetailShow=!0},detailHandle:function(t){if(0==t.index||t.index)if("title-check"==t.type){var e=this.taskList[t.section];this.$set(e.list[t.index],"checked",t.value),t.value?e.checkedNum++:e.checkedNum--,this.$set(e,"checkedNum",e.checkedNum)}else if("delete"==t.type)this.taskList[t.section].list.splice(t.index,1);else if("change-stop-time"==t.type){new Date(t.value).getTime()/1e3+86399>(new Date).getTime()/1e3?this.taskList[t.section].list[t.index].isEnd=!1:this.taskList[t.section].list[t.index].isEnd=!0,this.taskList[t.section].list[t.index].stopTime=t.value}else if("change-priority"==t.type)this.taskList[t.section].list[t.index].priority=t.value.id;else if("change-name"==t.type)this.taskList[t.section].list[t.index].name=t.value;else if("change-comments"==t.type){var s=this.taskList[t.section].list[t.index].commentCount;"add"==t.value?this.taskList[t.section].list[t.index].commentCount=s+1:this.taskList[t.section].list[t.index].commentCount=s-1}else"change-sub-task"==t.type?(this.taskList[t.section].list[t.index].childWCCount=t.value.subdonecount,this.taskList[t.section].list[t.index].childAllCount=t.value.allcount):"change-main-user"==t.type?this.taskList[t.section].list[t.index].mainUser=t.value:"change-label"==t.type&&(this.taskList[t.section].list[t.index].labelList=t.value)},closeBtn:function(){this.taskDetailShow=!1},taskShowHandle:function(t){if(this.$refs.particulars&&!this.$refs.particulars.$el.contains(t.target)){for(var e=!0,s=document.getElementsByClassName("board-item"),i=0;i0||a.subdonecount>0||a.subcount>0?s("div",{staticClass:"img-box"},[s("i",{staticClass:"wukong wukong-sub-task"}),t._v(" "),s("span",[t._v(t._s(a.childWCCount||a.subdonecount)+"/"+t._s(a.childAllCount||a.subdonecount+a.subcount))])]):t._e(),t._v(" "),a.filecount?s("div",{staticClass:"img-box"},[s("i",{staticClass:"wukong wukong-file"}),t._v(" "),s("span",[t._v(t._s(a.filecount))])]):t._e(),t._v(" "),a.commentcount?s("div",{staticClass:"img-box"},[s("i",{staticClass:"wukong wukong-comment-task"}),t._v(" "),s("span",[t._v(t._s(a.commentcount))])]):t._e(),t._v(" "),a.lableList.length<=2?t._l(a.lableList,function(e,i){return s("div",{key:i,staticClass:"item-label",style:{background:e.color}},[t._v("\n "+t._s(e.name)+"\n ")])}):[s("div",{staticClass:"item-label",style:{background:a.lableList[0].color}},[t._v(t._s(a.lableList[0].name))]),t._v(" "),s("div",{staticClass:"item-label",style:{background:a.lableList[1].color}},[t._v(t._s(a.lableList[1].name))]),t._v(" "),s("el-tooltip",{attrs:{placement:"top",effect:"light","popper-class":"tooltip-change-border task-tooltip"}},[s("div",{staticStyle:{margin:"10px 10px 10px 0"},attrs:{slot:"content"},slot:"content"},t._l(a.lableList,function(e,i){return s("div",{key:i,staticStyle:{display:"inline-block","margin-right":"10px"}},[i>=2?s("span",{staticClass:"k-name",staticStyle:{"border-radius":"4px",color:"#FFF",padding:"3px 10px"},style:{background:e.color?e.color:"#ccc"}},[t._v(t._s(e.name))]):t._e()])})),t._v(" "),s("div",{staticClass:"color-label-more"},[s("i",[t._v("...")])])])]],2)],1)})),t._v(" "),t.permission.saveTask&&-1!=e[t.tableField]?s("task-quick-add",{ref:"taskQuickAdd",refInFor:!0,staticStyle:{margin:"0 10px"},attrs:{params:{work_id:t.workId,class_id:e.class_id},"show-style":"hideBorder"},on:{send:t.addSubTaskSuc}}):t._e()],1)],1)}),t._v(" "),t.permission.saveTaskClass&&t.isBoardShow?s("div",{staticClass:"board-column-new-list"},[t.createTaskListShow||0!=t.loading?t.createTaskListShow&&0==t.loading?s("div",{staticClass:"input-btn"},[s("el-input",{attrs:{maxlength:10,size:"small",placeholder:"列表名"},model:{value:t.taskListName,callback:function(e){t.taskListName=e},expression:"taskListName"}}),t._v(" "),s("div",{staticClass:"button-box"},[s("el-button",{attrs:{size:"mini",type:"primary"},on:{click:t.createTaskListSave}},[t._v("保存")]),t._v(" "),s("el-button",{attrs:{size:"mini"},on:{click:function(e){t.createTaskListShow=!1}}},[t._v("取消")])],1)],1):t._e():s("div",{staticClass:"new-list",on:{click:function(e){t.createTaskListShow=!0}}},[s("span",{staticClass:"el-icon-plus"}),t._v(" "),s("span",[t._v("新建列表")])])]):t._e()],2),t._v(" "),t.taskDetailShow?s("task-detail",{ref:"particulars",attrs:{id:t.taskID,"detail-index":t.detailIndex,"detail-section":t.detailSection,"no-listener-class":["board-item"]},on:{"on-handle":t.detailHandle,close:t.closeBtn}}):t._e()],1)},[],!1,null,"0e273b94",null);f.options.__file="TaskBoard.vue";var _=f.exports,b={name:"TaskListBoard",components:{TaskCell:s("/esw").a},mixins:[p],props:{workId:[String,Number],permission:{type:Object,default:function(){return{}}}},data:function(){return{showType:"board",loading:!1,createTaskListShow:!1,createSubTaskClassId:"hidden",taskListName:"",editTaskListName:"",taskList:[],taskID:"",detailIndex:-1,detailSection:-1,taskDetailShow:!1,collapseValue:[]}},computed:{},watch:{},created:function(){},mounted:function(){},beforeDestroy:function(){},methods:{getListRest:function(){this.collapseValue=this.taskList.map(function(t,e){return e})},taskCellHandle:function(t,e,s,i){if("view"==t)this.taskID=e.task_id,this.detailIndex=s,this.detailSection=i,this.taskDetailShow=!0;else if("complete"==t){var a=this.taskList[i];this.changeListCompleteOrder(e,a,s),this.updateTaskListCheckNum(a)}},taskShowHandle:function(t){if(this.$refs.particulars&&!this.$refs.particulars.$el.contains(t.target)){for(var e=!0,s=document.getElementsByClassName("board-item"),i=0;i(new Date).getTime()/1e3?this.taskList[t.index].isEnd=!1:this.taskList[t.index].isEnd=!0,this.taskList[t.index].stopTime=t.value}else if("change-priority"==t.type)this.taskList[t.index].priority=t.value.id;else if("change-name"==t.type)this.taskList[t.index].name=t.value;else if("change-comments"==t.type){var e=this.taskList[t.index].commentCount;"add"==t.value?this.taskList[t.index].commentCount=e+1:this.taskList[t.index].commentCount=e-1}else"change-sub-task"==t.type?(this.taskList[t.index].childWCCount=t.value.subdonecount,this.taskList[t.index].childAllCount=t.value.allcount):"change-main-user"==t.type?this.taskList[t.index].mainUser=t.value:"change-label"==t.type&&(this.taskList[t.index].labelList=t.value)},closeBtn:function(){this.taskDetailShow=!1},titleCheckbox:function(t){var e=!0,s=!1,i=void 0;try{for(var a,n=l()(this.taskList);!(e=(a=n.next()).done);e=!0){var o=a.value;o.task_id==this.indexObjData.task_id&&this.$set(o,"checked",t)}}catch(t){s=!0,i=t}finally{try{!e&&n.return&&n.return()}finally{if(s)throw i}}},taskCellHandle:function(t){"view"==t.type&&this.showDetailView(t.data.item,t.data.index)},taskShowHandle:function(t){if(this.$refs.particulars&&!this.$refs.particulars.$el.contains(t.target)){for(var e=!0,s=document.getElementsByClassName("list-box"),i=0;i0?t.stepList[2].status="error":t.stepList[2].status="finish")}).catch(function(){})},downloadErrData:function(){var t=this;this.loading=!0,Object(i.a)({name:"导入错误数据",path:this.resultData.error_file_path}).then(function(e){Object(y.c)(e),t.loading=!1}).catch(function(){t.loading=!1})},download:function(){Object(i.b)().then(function(t){Object(y.c)(t)}).catch(function(){})},selectFile:function(){document.getElementById("importInputFile").click()},uploadFile:function(t){var e=t.target.files[0];Object(y.A)(e.name)&&(this.file=e,this.getFirstStepStatus()),t.target.value=""},getFirstStepStatus:function(){var t=this.file&&this.file.size;this.stepList[0].status=t?"finish":"wait"},closeView:function(){this.$emit("update:show",!1),this.$emit("close",3==this.stepsActive?"finish":"")},resetData:function(){this.file={name:""},this.stepsActive=1,this.stepList=[{icon:"wk wk-upload",title:"上传文件",status:"wait"},{icon:"wk wk-data-import",title:"导入数据",status:"wait"},{icon:"wk wk-success",title:"导入完成",status:"wait"}],this.resultData=null}}},G=(s("0/tg"),Object(k.a)(K,function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("el-dialog",{attrs:{visible:t.show,"append-to-body":!0,"close-on-click-modal":!1,title:"导入任务",width:"750px"},on:{close:t.closeView}},[s("div",{staticClass:"dialog-body"},[s("el-steps",{attrs:{active:t.stepsActive,simple:""}},t._l(t.stepList,function(t,e){return s("el-step",{key:e,attrs:{title:t.title,icon:t.icon,status:t.status}})})),t._v(" "),1==t.stepsActive?s("div",{staticClass:"step-section"},[s("div",{staticClass:"sections"},[s("div",{staticClass:"sections__title"},[t._v("一、请按照数据模板的格式准备要导入的数据。"),s("span",{staticClass:"download",on:{click:t.download}},[t._v("点击下载《任务导入模板》")])]),t._v(" "),s("div",{staticClass:"sections__tips"},[t._v("一次最多导入1000条任务,超出的部分不予导入")])]),t._v(" "),s("div",{staticClass:"sections"},[s("div",{staticClass:"sections__title"},[t._v("三、请选择需要导入的文件")]),t._v(" "),s("div",{staticClass:"content"},[s("flexbox",{staticClass:"file-select"},[s("el-input",{attrs:{disabled:!0},model:{value:t.file.name,callback:function(e){t.$set(t.file,"name",e)},expression:"file.name"}}),t._v(" "),s("el-button",{attrs:{type:"primary"},on:{click:t.selectFile}},[t._v("选择文件")])],1)],1)])]):2==t.stepsActive?s("div",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticClass:"step-section",attrs:{"element-loading-text":"数据导入中","element-loading-spinner":"el-icon-loading"}}):3==t.stepsActive?s("div",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticClass:"step-section"},[s("div",{staticClass:"result-info"},[s("i",{staticClass:"wk wk-success result-info__icon"}),t._v(" "),s("p",{staticClass:"result-info__des"},[t._v("数据导入完成")]),t._v(" "),t.resultData?s("p",{staticClass:"result-info__detail"},[t._v("导入总数据"),s("span",{staticClass:"result-info__detail--all"},[t._v(t._s(t.resultData.total))]),t._v("条,导入成功"),s("span",{staticClass:"result-info__detail--suc"},[t._v(t._s(t.resultData.total-t.resultData.error))]),t._v("条,导入失败"),s("span",{staticClass:"result-info__detail--err"},[t._v(t._s(t.resultData.error))]),t._v("条")]):t._e(),t._v(" "),t.resultData&&t.resultData.error>0?s("el-button",{staticClass:"result-info__btn--err",attrs:{type:"text"},on:{click:t.downloadErrData}},[t._v("下载错误数据")]):t._e()],1)]):t._e(),t._v(" "),s("input",{attrs:{id:"importInputFile",type:"file"},on:{change:t.uploadFile}})],1),t._v(" "),s("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[s("el-button",{class:{"is-hidden":!t.showCancel},on:{click:t.closeView}},[t._v("取消")]),t._v(" "),t.sureTitle?s("el-button",{attrs:{type:"primary"},on:{click:t.sureClick}},[t._v(t._s(t.sureTitle))]):t._e()],1)])},[],!1,null,"17bd3fb6",null));G.options.__file="TaskImport.vue";var Y=G.exports,X=s("9GgJ"),J={components:{TaskBoard:_,TaskListBoard:w,Attachment:S,TaskStatistical:N,ArchivingTask:H,ProjectSettings:P,TaskScreening:q.a,Members:W,TaskImport:Y,MembersDep:A.a,XrHeader:X.a},filters:{showTypeName:function(t){return{board:"看板视图",list:"列表视图",user:"负责人视图"}[t]}},data:function(){return{loading:!1,tabShowType:"board",work_id:"",projectName:"",projectColor:"",projectData:{is_open:0},taskConditionObj:{userIds:[],timeId:"",tagIds:[]},activeName:"task-board",projectHandleShow:!1,membersShow:!1,membersList:[],screeningButtonShow:!0,screeningShow:!1,taskImportShow:!1,permission:{}}},computed:{showSet:function(){return this.permission.setTaskOwnerUser&&1!=this.projectData.is_open||this.permission.setWork||this.permission.excelImport||this.permission.excelExport||this.permission.archiveTask||this.permission.deleteTask||0==this.projectData.is_open},showComponent:function(){return"task-board"==this.activeName&&"list"==this.tabShowType?"TaskListBoard":this.activeName}},beforeRouteUpdate:function(t,e,s){this.work_id=t.params.id,this.membersShow=!1,this.screeningShow=!1,this.getDetail(),this.getMemberList(),s()},created:function(){this.activeName="task-board",this.work_id=this.$route.params.id,this.getDetail(),this.getMemberList()},methods:{getDetail:function(){var t=this;Object(i.x)({work_id:this.work_id}).then(function(e){var s=e.data;t.projectData=s,t.projectColor=s.color,t.projectName=s.name,t.permission=s.auth||{}}).catch(function(){})},tabClick:function(t){this.screeningButtonShow="task-board"==this.activeName},getMemberList:function(){var t=this;Object(i.w)({work_id:this.work_id}).then(function(e){t.membersList=e.data||[],t.$bus.$emit("members-update",t.membersList)}).catch(function(){})},userSelectChange:function(t,e){var s=this;Object(i.m)({work_id:this.work_id,owner_user_id:t.map(function(t){return t.id})}).then(function(t){s.membersList=t.data||[],s.$bus.$emit("members-update",s.membersList),s.$message.success("添加成功")}).catch(function(){})},deleteProject:function(){var t=this;this.$confirm("确定要删除项目吗?删除后此项目中的所有任务将一并彻底删除,无法恢复","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){Object(i.r)({work_id:t.work_id}).then(function(e){t.$message({type:"success",message:"删除成功!"}),t.$bus.$emit("delete-project",t.work_id),t.$router.go(-1)}).catch(function(){})}).catch(function(){t.$message({type:"info",message:"已取消删除"})})},exitProject:function(){var t=this;this.$confirm('确认退出 "'+this.projectName+'"',"提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){Object(i.u)({work_id:t.work_id}).then(function(e){t.$message({type:"success",message:"退出成功!"}),t.$bus.$emit("delete-project",t.work_id)}).catch(function(){})}).catch(function(){t.$message({type:"info",message:"取消操作"})})},archiveProject:function(){var t=this;this.$confirm('确认归档项目 "'+this.projectName+'"',"提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){Object(i.p)({work_id:t.work_id,status:3}).then(function(e){t.$message({type:"success",message:"归档成功"}),t.$bus.$emit("delete-project",t.work_id),t.$router.go(-1)}).catch(function(){})}).catch(function(){t.$message({type:"info",message:"取消操作"})})},setSubmite:function(t,e,s){this.projectData.is_open!=s?(this.getDetail(),this.getMemberList()):(this.projectColor=e,this.projectName=t,this.$bus.$emit("project-setting",t,this.work_id))},projectSettingsHandle:function(t,e){"member"==t&&this.getMemberList()},membersHandle:function(t,e){"member"==t&&(this.$bus.$emit("members-update",e),this.membersList=e)},exportClick:function(){var t=this;this.projectHandleShow=!1,this.loading=!0,Object(i.g)({work_id:this.work_id,search:this.taskConditionObj.search,owner_user_id:this.taskConditionObj.userIds,time_type:this.taskConditionObj.timeId,label_id:this.taskConditionObj.tagIds}).then(function(e){Object(y.c)(e),t.loading=!1}).catch(function(){t.loading=!1})},taskImportSuccess:function(){this.$bus.$emit("work-task-import")},taskScreeningChange:function(t,e,s,i){this.taskConditionObj={userIds:t,timeId:e,tagIds:s,search:i}}}},Z=(s("9kkH"),Object(k.a)(J,function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"project-list",attrs:{direction:"column"}},[s("div",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticClass:"nav-box"},[s("xr-header",{staticClass:"xr-header",attrs:{"icon-color":t.projectColor||"#4AB8B8","icon-class":"wk wk-project"}},[s("span",{attrs:{slot:"label"},slot:"label"},[t._v(t._s(t.projectName))]),t._v(" "),t.showSet?s("el-popover",{attrs:{slot:"label",placement:"bottom-start",width:"182"},slot:"label",model:{value:t.projectHandleShow,callback:function(e){t.projectHandleShow=e},expression:"projectHandleShow"}},[s("div",{staticClass:"project-list-popover-btn-list"},[s("members-dep",{attrs:{"user-checked-data":t.membersList,"close-dep":!0},on:{popoverSubmit:t.userSelectChange}},[t.permission.setTaskOwnerUser&&1!=t.projectData.is_open&&t.permission.setWork?s("p",{attrs:{slot:"membersDep"},on:{click:function(e){t.projectHandleShow=!1}},slot:"membersDep"},[t._v("添加项目成员")]):t._e()]),t._v(" "),t.permission.setWork?s("project-settings",{attrs:{"work-id":t.work_id,title:t.projectName,color:t.projectColor,"is-open":t.projectData.is_open,"add-members-data":t.membersList,permission:t.permission},on:{close:function(e){t.projectHandleShow=!1},submite:t.setSubmite,handle:t.projectSettingsHandle,click:function(e){t.projectHandleShow=!1}}}):t._e(),t._v(" "),t.permission.excelImport?s("p",{on:{click:function(e){t.taskImportShow=!0}}},[t._v("导入任务")]):t._e(),t._v(" "),t.permission.excelExport?s("p",{on:{click:t.exportClick}},[t._v("导出任务")]):t._e(),t._v(" "),t.permission.archiveTask&&t.permission.setWork?s("p",{on:{click:t.archiveProject}},[t._v("归档项目")]):t._e(),t._v(" "),t.permission.deleteTask&&t.permission.setWork?s("p",{on:{click:t.deleteProject}},[t._v("删除项目")]):t._e(),t._v(" "),0==t.projectData.is_open?s("p",{on:{click:t.exitProject}},[t._v("退出项目")]):t._e()],1),t._v(" "),s("i",{staticClass:"wk wk-manage set-img",attrs:{slot:"reference"},slot:"reference"})]):t._e(),t._v(" "),s("i",{staticClass:"wk wk-s-seas ft-img",attrs:{slot:"ft"},on:{click:function(e){t.membersShow=!0}},slot:"ft"}),t._v(" "),s("span",{directives:[{name:"show",rawName:"v-show",value:t.screeningButtonShow,expression:"screeningButtonShow"}],staticClass:"ft-btn",attrs:{slot:"ft"},on:{click:function(e){t.screeningShow=!0}},slot:"ft"},[s("i",{staticClass:"wk wk-screening ft-img"}),t._v(" "),s("span",{staticClass:"ft-label"},[t._v("任务筛选")])])],1),t._v(" "),s("div",{staticClass:"nav"},[s("el-tabs",{on:{"tab-click":t.tabClick},model:{value:t.activeName,callback:function(e){t.activeName=e},expression:"activeName"}},[s("el-tab-pane",{attrs:{name:"task-board"}},[s("el-dropdown",{attrs:{slot:"label",trigger:"click"},on:{command:function(e){t.tabShowType=e}},slot:"label"},[s("span",{staticClass:"el-dropdown-link"},[t._v("\n "+t._s(t._f("showTypeName")(t.tabShowType))),s("i",{staticClass:"el-icon-arrow-down el-icon--right"})]),t._v(" "),s("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},[s("el-dropdown-item",{attrs:{command:"board"}},[t._v("看板视图")]),t._v(" "),s("el-dropdown-item",{attrs:{command:"list"}},[t._v("列表视图")]),t._v(" "),s("el-dropdown-item",{attrs:{command:"user"}},[t._v("负责人视图")])],1)],1)],1),t._v(" "),s("el-tab-pane",{attrs:{label:"附件",name:"attachment"}}),t._v(" "),s("el-tab-pane",{attrs:{label:"任务统计",name:"task-statistical"}}),t._v(" "),s("el-tab-pane",{attrs:{label:"归档任务",name:"archiving-task"}})],1)],1)],1),t._v(" "),s("div",{staticClass:"content"},[s("keep-alive",[s(t.showComponent,{tag:"component",attrs:{"condition-data":t.taskConditionObj,"work-id":t.work_id,"show-type":t.tabShowType,permission:t.permission}})],1)],1),t._v(" "),t.screeningShow?s("task-screening",{attrs:{"work-id":t.work_id,data:t.taskConditionObj},on:{change:t.taskScreeningChange,close:function(e){t.screeningShow=!1}}}):t._e(),t._v(" "),s("members",{attrs:{"work-id":t.work_id,list:t.membersList,"is-open":t.projectData.is_open,permission:t.permission,visible:t.membersShow},on:{"update:visible":function(e){t.membersShow=e},handle:t.membersHandle}}),t._v(" "),s("task-import",{attrs:{"work-id":t.work_id,show:t.taskImportShow},on:{"update:show":function(e){t.taskImportShow=e},success:t.taskImportSuccess}})],1)},[],!1,null,"067b77d3",null));Z.options.__file="index.vue";e.default=Z.exports},ulYl:function(t,e,s){},"wo/F":function(t,e,s){},zDjq:function(t,e,s){"use strict";var i=s("wo/F");s.n(i).a}}]);