(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2e9504cc"],{"37d3":function(t,e,a){"use strict";a.r(e);a("7f7f");var s=function(){var t=this,e=t._self._c;return e("div",{staticClass:"project-space-task",class:"".concat(t.project.task_board_theme," ").concat(t.viewType)},[e("wrapper-content",{attrs:{showHeader:!1}},[e("div",{directives:[{name:"show",rawName:"v-show",value:"task-board"==t.viewType,expression:"viewType == 'task-board'"}],staticClass:"board-scrum-stages",attrs:{e:"",options:{group:"stages",filter:".undraggables",handle:".ui-sortable-handle",ghostClass:"stage-ghost",animation:200,forceFallback:!1},id:"board-scrum-stages"},on:{end:t.stageSort}},[t._l(t.taskStages,(function(a,s){return e("div",{key:s,staticClass:"scrum-stage",class:{"fixed-creator":1==a.fixedCreator},staticStyle:{width:"32vw","min-width":"400px"},attrs:{id:a.code}},[e("header",{directives:[{name:"show",rawName:"v-show",value:!a.tasksLoading,expression:"!stage.tasksLoading"}],staticClass:"scrum-stage-header ui-sortable-handle"},[e("div",{staticClass:"stage-name hinted"},[t._v("\n "+t._s(a.name)+"\n "),a.tasks.length>0?e("span",{staticClass:"task-count"},[t._v("\n · "+t._s(a.tasks.length))]):t._e()]),t._e()]),e("div",{staticClass:"scrum-stage-wrap ui-sortable",class:{"hidden-creator-bottom":a.showTaskCard}},[e("vue-scroll",{ref:s+"-stage",refInFor:!0,attrs:{ops:t.scrollOps}},[e("section",{staticClass:"scrum-stage-content thin-scroll",attrs:{id:a.code,"task-type-index":s}},[e("a-spin",{attrs:{wrapperClassName:"tasks-loading",spinning:a.tasksLoading}},[e("div",{staticClass:"scrum-stage-tasks",attrs:{options:{group:"task",ghostClass:"task-ghost",dragClass:"task-drag",fallbackClass:"task-drag",forceFallback:!1}},on:{end:t.taskSort}},[t._l(a.unDoneTasks,(function(a,i){return[!a.done&&a.canRead?e("div",{key:a.code,staticClass:"task task-card ui-sortable-handle",class:t.showTaskPri(a.pri),attrs:{index:i,id:a.code},on:{click:function(e){return e.stopPropagation(),t.taskDetail(a.code,s)}}},[e("div",{staticClass:"task-priority bg-priority-0"}),e("a-tooltip",{attrs:{placement:s>0?"top":"right"}},[e("template",{slot:"title"},[a.hasUnDone?e("span",{staticStyle:{"font-size":"12px"}},[t._v("子任务尚未全部完成,无法完成父任务")]):t._e()]),e("div",{staticClass:"check-box-wrapper"})],2),e("div",{staticClass:"task-content-set open-detail"},[e("div",{staticClass:"task-content-wrapper",staticStyle:{"font-size":"17px"}},[e("div",{staticClass:"task-content",style:{overflowWrap:"anywhere"}},[t._v("\n "+t._s(a.name)+"\n ")]),a.executor&&a.executor.avatar?e("a-tooltip",{attrs:{placement:"top"}},[e("template",{slot:"title"},[e("span",[t._v(t._s(a.executor.name))])]),e("img",{staticClass:"avatar img-circle img-24 hinted",attrs:{src:a.executor.avatar,title:a.executor.name}})],2):t._e()],1),e("div",{staticClass:"task-content-wrapper"},[e("div",{staticClass:"task-text",style:{overflowWrap:"anywhere"}},[t._v("\n "+t._s(t.domPaser(a.description))+"\n ")])]),e("div",{staticClass:"task-info-wrapper clearfix"},[e("div",{staticClass:"task-infos"},[a.status?e("span",{staticClass:"icon-wrapper",style:{color:t.getStatusColor(a.status),fontSize:"12px"}},[t._v(t._s(a.statusText))]):t._e(),a.end_time?e("span",{staticClass:"label",class:t.showTimeLabel(a.end_time)},[e("span",{attrs:{title:a.end_time}},[t._v("\n "+t._s(t.showTaskTime(a.begin_time,a.end_time))+"\n ")])]):t._e(),a.description?e("span",{staticClass:"icon-wrapper muted"},[e("a-icon",{attrs:{type:"file-text"}})],1):t._e(),a.hasSource?e("span",{staticClass:"icon-wrapper muted"},[e("a-icon",{attrs:{type:"link"}})],1):t._e(),a.hasComment?e("span",{staticClass:"icon-wrapper muted"},[e("a-icon",{attrs:{type:"message"}})],1):t._e(),a.childCount[0]>0?e("span",{staticClass:"icon-wrapper muted"},[e("a-icon",{attrs:{type:"bars"}}),e("span",[t._v(t._s(a.childCount[1])+"/"+t._s(a.childCount[0]))])],1):t._e(),t._l(a.tags,(function(a){return e("span",{key:a.code,staticClass:"tag muted"},[e("a-badge",{class:"badge-".concat(a.tag.color),attrs:{status:"success"}}),t._v("\n "+t._s(a.tag.name)+"\n ")],1)})),a.execute_state>0?e("span",{class:"icon-wrapper text text-"+a.task_execute.color},[t._v(t._s(a.task_execute_name))]):t._e(),a.like?e("span",{staticClass:"icon-wrapper muted"},[e("a-icon",{attrs:{type:"like"}}),e("span",[t._v(t._s(a.like))])],1):t._e()],2)]),e("div",{staticClass:"task-content-wrapper",staticStyle:{display:"flex","justify-content":"space-between"}},[e("div",{staticClass:"task-tips"},[t._v("\n 发布时间: "+t._s(a.create_time)+"\n ")]),a.timeout?e("div",{staticClass:"task-tips",staticStyle:{color:"red"}},[t._v("\n 已逾期: "+t._s(a.timeout)+"\n ")]):t._e()]),e("div",{staticClass:"task-content-wrapper",staticStyle:{display:"flex"}},[e("span",[t._v("处理部门: "+t._s(a.department_name))])]),e("div",{staticClass:"task-content-wrapper",staticStyle:{display:"flex","flex-wrap":"wrap"}},[e("span",{staticStyle:{"padding-right":"10px"}},[t._v("抄送:")]),t._l(a.copied_info,(function(a,s){return e("div",{key:s,staticStyle:{"margin-right":"10px"}},[e("img",{staticClass:"avatar img-circle img-24 hinted",staticStyle:{"margin-right":"5px"},attrs:{src:a.avatar,title:a.name}}),e("span",[t._v(t._s(a.name))])])}))],2),e("div",{staticClass:"task-content-wrapper",staticStyle:{display:"flex","flex-wrap":"wrap"}},[e("span",{staticStyle:{"padding-right":"10px"}},[t._v("工作流转: ")]),t._l(a.exchange_info,(function(a,s){return e("div",{key:s,staticStyle:{"margin-right":"10px"}},[e("img",{staticClass:"avatar img-circle img-24 hinted",staticStyle:{"margin-right":"5px"},attrs:{src:a.avatar,title:a.name}}),e("span",[t._v(t._s(a.name))]),e("span",{staticStyle:{"margin-left":"5px"}},[t._v(t._s(">>"))])])}))],2),t.project.prefix&&t.project.open_prefix?e("footer",{staticClass:"task-info-footer"},[e("span",{staticClass:"task-id-number"},[t._v("\n "+t._s(t.project.prefix)+"-"+t._s(a.id_num)+"\n ")])]):t._e()])],1):t._e()]}))],2),e("div",{directives:[{name:"show",rawName:"v-show",value:a.showTaskCard,expression:"stage.showTaskCard"}],staticClass:"task-creator-wrap card",attrs:{id:"card"+s}},[e("form",{staticClass:"task-creator"},[e("a-input",{ref:"inputTaskName".concat(s),refInFor:!0,staticClass:"task-content-input",attrs:{type:"textarea",rows:3,placeholder:"任务内容"},on:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.createTask(a.code,s)}},model:{value:t.task.name,callback:function(e){t.$set(t.task,"name",e)},expression:"task.name"}}),e("div",{staticClass:"handler-wrap"},[e("a-dropdown",{attrs:{trigger:["click"]}},[e("a",{staticClass:"executor-handler"},[e("img",{staticClass:"avatar img-circle img-24 hinted",attrs:{src:t.defaultExecutor.avatar}}),e("span",{staticClass:"creator-handler-text name"},[t._v(t._s(t.defaultExecutor.name))])]),e("a-menu",{staticClass:"executor-handler-menu",attrs:{slot:"overlay"},on:{click:t.selectExecutor},slot:"overlay"},t._l(t.projectMembers,(function(a,s){return e("a-menu-item",{key:s},[e("img",{staticClass:"avatar img-circle img-32 pull-left m-r-sm",attrs:{src:a.avatar}}),e("span",{staticClass:"muted",staticStyle:{"line-height":"25px"}},[t._v(t._s(a.name))]),a.code==t.defaultExecutor.code?e("a-icon",{staticClass:"muted",attrs:{type:"check"}}):t._e()],1)})),1)],1)],1),e("div",{staticClass:"submit-set"},[e("a-button",{staticClass:"middle-btn",attrs:{type:"default",size:"large"},on:{click:function(e){return e.stopPropagation(),t.showTaskCard(s,!1)}}},[t._v("取消\n ")]),e("a-button",{staticClass:"middle-btn",class:{"disabled-btn":!t.task.name},attrs:{loading:t.createTaskLoading,disabled:!t.task.name,type:"primary",size:"large"},on:{click:function(e){return e.stopPropagation(),t.createTask(a.code,s)}}},[t._v("创建\n ")])],1)],1)]),e("div",{staticClass:"scrum-stage-tasks-done",attrs:{options:{group:"task-done",ghostClass:"task-ghost",dragClass:"task-drag",fallbackClass:"task-drag",forceFallback:!1}},on:{end:t.taskSort}},[t._l(a.doneTasks,(function(a,i){return[e("div",{key:a.code,staticClass:"task task-card ui-sortable-handle",class:t.showTaskPri(a.pri),attrs:{index:i,id:a.code},on:{click:function(e){return e.stopPropagation(),t.taskDetail(a.code,s)}}},[e("div",{staticClass:"task-priority bg-priority-0"}),e("a-tooltip",{attrs:{placement:s>0?"top":"right"}},[e("template",{slot:"title"},[a.hasUnDone?e("span",{staticStyle:{"font-size":"12px"}},[t._v("子任务尚未全部完成,无法完成父任务")]):t._e()]),e("div",{staticClass:"check-box-wrapper"})],2),e("div",{staticClass:"task-content-set open-detail"},[e("div",{staticClass:"task-content-wrapper",staticStyle:{"font-size":"17px"}},[e("div",{staticClass:"task-content",style:{overflowWrap:"anywhere"}},[t._v("\n "+t._s(a.name)+"\n ")]),a.executor&&a.executor.avatar?e("a-tooltip",{attrs:{placement:"top"}},[e("template",{slot:"title"},[e("span",[t._v(t._s(a.executor.name))])]),e("img",{staticClass:"avatar img-circle img-24 hinted",attrs:{src:a.executor.avatar,title:a.executor.name}})],2):t._e()],1),e("div",{staticClass:"task-content-wrapper"},[e("div",{staticClass:"task-text",style:{overflowWrap:"anywhere"}},[t._v("\n "+t._s(t.domPaser(a.description))+"\n ")])]),e("div",{staticClass:"task-info-wrapper clearfix"},[e("div",{staticClass:"task-infos"},[a.status?e("span",{staticClass:"icon-wrapper",style:{color:t.getStatusColor(a.status),fontSize:"12px"}},[t._v(t._s(a.statusText))]):t._e(),a.end_time?e("span",{staticClass:"label",class:t.showTimeLabel(a.end_time)},[e("span",{attrs:{title:a.end_time}},[t._v("\n "+t._s(t.showTaskTime(a.begin_time,a.end_time))+"\n ")])]):t._e(),a.description?e("span",{staticClass:"icon-wrapper muted"},[e("a-icon",{attrs:{type:"file-text"}})],1):t._e(),a.hasSource?e("span",{staticClass:"icon-wrapper muted"},[e("a-icon",{attrs:{type:"link"}})],1):t._e(),a.hasComment?e("span",{staticClass:"icon-wrapper muted"},[e("a-icon",{attrs:{type:"message"}})],1):t._e(),a.childCount[0]>0?e("span",{staticClass:"icon-wrapper muted"},[e("a-icon",{attrs:{type:"bars"}}),e("span",[t._v(t._s(a.childCount[1])+"/"+t._s(a.childCount[0]))])],1):t._e(),t._l(a.tags,(function(a){return e("span",{key:a.code,staticClass:"tag muted"},[e("a-badge",{class:"badge-".concat(a.tag.color),attrs:{status:"success"}}),t._v("\n "+t._s(a.tag.name)+"\n ")],1)})),a.execute_state>0?e("span",{class:"icon-wrapper text text-"+a.task_execute.color},[t._v(t._s(a.task_execute_name))]):t._e(),a.like?e("span",{staticClass:"icon-wrapper muted"},[e("a-icon",{attrs:{type:"like"}}),e("span",[t._v(t._s(a.like))])],1):t._e()],2)]),e("div",{staticClass:"task-content-wrapper",staticStyle:{display:"flex","justify-content":"space-between"}},[e("div",{staticClass:"task-tips"},[t._v("\n 发布时间: "+t._s(a.create_time)+"\n ")]),a.timeout?e("div",{staticClass:"task-tips",staticStyle:{color:"red"}},[t._v("\n 已逾期: "+t._s(a.timeout)+"\n ")]):t._e()]),e("div",{staticClass:"task-content-wrapper",staticStyle:{display:"flex"}},[e("span",[t._v("处理部门: "+t._s(a.department_name))])]),e("div",{staticClass:"task-content-wrapper",staticStyle:{display:"flex"}},[e("span",[t._v("抄送: ")]),t._l(a.copied_info,(function(a,s){return e("div",{key:s,staticStyle:{"margin-right":"10px"}},[e("img",{staticClass:"avatar img-circle img-24 hinted",staticStyle:{"margin-right":"5px"},attrs:{src:a.avatar,title:a.name}}),e("span",[t._v(t._s(a.name))])])}))],2),e("div",{staticClass:"task-content-wrapper",staticStyle:{display:"flex"}},[e("span",[t._v("工作流转: ")]),t._l(a.exchange_info,(function(a,s){return e("div",{key:s,staticStyle:{"margin-right":"10px"}},[e("img",{staticClass:"avatar img-circle img-24 hinted",staticStyle:{"margin-right":"5px"},attrs:{src:a.avatar,title:a.name}}),e("span",[t._v(t._s(a.name))]),e("span",{staticStyle:{"margin-left":"5px"}},[t._v(t._s(">>"))])])}))],2),t.project.prefix&&t.project.open_prefix?e("footer",{staticClass:"task-info-footer"},[e("span",{staticClass:"task-id-number"},[t._v("\n "+t._s(t.project.prefix)+"-"+t._s(a.id_num)+"\n ")])]):t._e()])],1)]}))],2),e("div",{directives:[{name:"show",rawName:"v-show",value:a.canNotReadCount,expression:"stage.canNotReadCount"}],staticClass:"scrum-stage-tasks-done"},[e("li",{staticClass:"task muted",staticStyle:{margin:"0 10px 8px"}},[e("span",[e("a-icon",{attrs:{type:"lock"}}),t._v(" 有\n "+t._s(a.canNotReadCount)+"\n 个任务被隐藏(因为设置了仅参与者可见)")],1)])]),(a.showTaskCard,t._e()),t.pages[s]>=0?e("div",{staticStyle:{color:"#888","text-align":"center",cursor:"pointer"},on:{click:function(e){return t.loadMoreStage(a,s)}}},[t._v("查看更多")]):e("div",{staticStyle:{color:"#888","text-align":"center",cursor:"pointer"}},[t._v("没有更多了")])])],1)])],1)])})),t._e()],2),"task-table"!=t.viewType||t.loading?t._e():e("task-table",{attrs:{"project-code":this.code}}),e("router-view")],1),e("a-modal",{attrs:{width:360,title:t.stageModal.modalTitle,bodyStyle:{paddingBottom:"1px"},footer:null},model:{value:t.stageModal.modalStatus,callback:function(e){t.$set(t.stageModal,"modalStatus",e)},expression:"stageModal.modalStatus"}},[e("a-form",{attrs:{form:t.stageModal.form},on:{submit:function(e){return e.preventDefault(),t.editStage.apply(null,arguments)}}},[e("a-form-item",[e("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["name",{rules:[{required:!0,message:"请输入列表标题"}]}],expression:"[\n 'name',\n { rules: [{ required: true, message: '请输入列表标题' }] },\n ]"}],ref:"inputStageTitle",attrs:{placeholder:"列表标题"}})],1),e("a-form-item",[e("div",{staticClass:"action-btn pull-right"},[e("a",{staticClass:"cancel-text muted",attrs:{type:"text"},on:{click:function(e){t.stageModal.modalStatus=!1}}},[t._v("\n 取消\n ")]),e("a-button",{staticClass:"middle-btn",attrs:{type:"primary",htmlType:"submit"}},[t._v("保存")])],1)])],1)],1),e("a-drawer",{attrs:{wrapClassName:"info-drawer",title:"项目成员",width:"350",placement:"right",visible:t.inviteMemberDraw.visible},on:{close:function(e){t.inviteMemberDraw.visible=!1}}},[e("div",{staticClass:"search-content"},[e("a-input",{attrs:{size:"large",placeholder:"输入昵称或邮箱查找"},model:{value:t.inviteMemberDraw.keyword,callback:function(e){t.$set(t.inviteMemberDraw,"keyword",e)},expression:"inviteMemberDraw.keyword"}},[e("a-icon",{attrs:{slot:"prefix",type:"search"},slot:"prefix"})],1)],1),e("div",{staticClass:"member-list"},[e("div",{staticClass:"member-list-item ant-list-item header-action"},[e("div",{staticClass:"ant-list-item-meta",on:{click:function(e){t.showInviteMember=!0}}},[e("div",{staticClass:"ant-list-item-meta-avatar"},[e("a-avatar",{attrs:{icon:"plus"}})],1),e("div",{staticClass:"ant-list-item-meta-content"},[e("h4",{staticClass:"ant-list-item-meta-title"},[e("span",[t._v("邀请新成员")])])])])]),e("a-list",{attrs:{itemLayout:"horizontal",loading:t.inviteMemberDraw.searching,dataSource:t.projectMembers,locale:{emptyText:t.inviteMemberDraw.keyword&&t.inviteMemberDraw.keyword.length>1?"没有搜索到相关成员":""}},scopedSlots:t._u([{key:"renderItem",fn:function(a,s){return e("a-list-item",{staticClass:"member-list-item"},[a.is_owner?t._e():e("span",{attrs:{slot:"actions"},slot:"actions"},[e("a",{staticClass:"muted",on:{click:function(e){return t.removeMember(a,s)}}},[e("a-icon",{attrs:{type:"user-delete"}}),t._v(" 移除")],1)]),e("a-list-item-meta",{attrs:{description:a.email}},[e("span",{attrs:{slot:"title"},slot:"title"},[t._v(t._s(a.name))]),e("a-avatar",{attrs:{slot:"avatar",icon:"user",src:a.avatar},slot:"avatar"})],1)],1)}}])})],1)]),e("a-drawer",{attrs:{wrapClassName:"info-drawer",title:"项目设置",width:"350",placement:"right",visible:t.configDraw.visible},on:{close:function(e){t.configDraw.visible=!1}}},[e("div",{staticClass:"config-wrapper"},[e("ul",{staticClass:"config-menus"},[e("li",{staticClass:"menu-item"},[e("a",{on:{click:function(e){t.projectModal.modalStatus=!0}}},[e("a-icon",{attrs:{type:"setting"}}),t._v("\n 项目设置\n ")],1)]),e("li",{staticClass:"menu-item"},[e("a",{on:{click:function(e){t.recycleModal.modalStatus=!0}}},[e("a-icon",{attrs:{type:"delete"}}),t._v("\n 查看回收站\n ")],1)]),e("li",{staticClass:"menu-item"},[e("a",[e("a-icon",{attrs:{type:"logout"}}),t._v("\n 导出任务 *\n ")],1)]),e("li",{staticClass:"menu-item"},[e("a",[e("a-icon",{attrs:{type:"copy"}}),t._v("\n 复制项目 *\n ")],1)]),e("li",{staticClass:"menu-item"},[e("a",[e("a-icon",{attrs:{type:"block"}}),t._v("\n 保存为项目模板 *\n ")],1)])])])]),e("a-modal",{staticClass:"project-config-modal",attrs:{destroyOnClose:"",width:800,title:t.projectModal.modalTitle,footer:null},model:{value:t.projectModal.modalStatus,callback:function(e){t.$set(t.projectModal,"modalStatus",e)},expression:"projectModal.modalStatus"}},[e("project-config",{attrs:{code:t.code},on:{update:t.updateProject,complete:function(e){t.projectModal.modalStatus=!1}}})],1),e("a-modal",{staticClass:"recycle-bin-modal",attrs:{width:800,title:t.recycleModal.modalTitle,footer:null},model:{value:t.recycleModal.modalStatus,callback:function(e){t.$set(t.recycleModal,"modalStatus",e)},expression:"recycleModal.modalStatus"}},[t.recycleModal.modalStatus?e("recycle-bin",{attrs:{code:t.code},on:{update:t.init}}):t._e()],1),e("a-modal",{staticClass:"task-tag-modal",attrs:{width:800,title:t.taskTagModal.modalTitle,footer:null},model:{value:t.taskTagModal.modalStatus,callback:function(e){t.$set(t.taskTagModal,"modalStatus",e)},expression:"taskTagModal.modalStatus"}},[t.taskTagModal.modalStatus?e("task-tag",{attrs:{code:t.code},on:{update:t.init}}):t._e()],1),e("a-modal",{staticClass:"invite-project-member",attrs:{width:360,title:t.projectMemberModal.modalTitle,footer:null},model:{value:t.projectMemberModal.modalStatus,callback:function(e){t.$set(t.projectMemberModal,"modalStatus",e)},expression:"projectMemberModal.modalStatus"}},[e("div",{staticClass:"member-list"},[e("a-list",{staticClass:"project-list",attrs:{itemLayout:"horizontal",loading:t.loading,dataSource:t.projectMembers},scopedSlots:t._u([{key:"renderItem",fn:function(a){return e("a-list-item",{},[e("span",{attrs:{slot:"actions"},slot:"actions"},[e("a-button",{attrs:{size:"small",type:"dashed",icon:"user-add"},on:{click:function(e){return t.setExecutor(a)}}},[t._v("设置")])],1),e("a-list-item-meta",{attrs:{description:a.email}},[e("span",{attrs:{slot:"title"},slot:"title"},[t._v(t._s(a.name))]),e("a-avatar",{attrs:{slot:"avatar",icon:"user",src:a.avatar},slot:"avatar"})],1)],1)}}])})],1)]),e("a-drawer",{attrs:{wrapClassName:"info-drawer task-search",title:"任务筛选",width:"350",placement:"right",visible:t.taskSearch.visible},on:{close:function(e){t.taskSearch.visible=!1}}},[e("task-search",{attrs:{"project-code":t.code},on:{search:t.taskSearchAction}})],1),t.showInviteMember?e("invite-project-member",{attrs:{"project-code":t.code},model:{value:t.showInviteMember,callback:function(e){t.showInviteMember=e},expression:"showInviteMember"}}):t._e()],1)},i=[],n=(a("8e6e"),a("456d"),a("7514"),a("20d6"),a("28a5"),a("55dd"),a("ac6a"),a("ade3")),o=a("2f62"),r=a("2ef0"),c=a.n(r),l=a("c1df"),d=a.n(l),u=a("f93e"),p=a("b76a"),m=a.n(p),h=a("f8c7"),g=a("d3a1"),f=a("58bf"),k=a("51e2"),v=a("b83b"),b=a("e3cc"),_=a("1d80"),w=a("e507"),C=a("24d2"),y=a("9f5d"),S=a("b199"),x=a("2f14"),j=a("81fe"),T=a("4200"),M=a("97a8");function O(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);e&&(s=s.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),a.push.apply(a,s)}return a}function D(t){for(var e=1;e0&&void 0!==arguments[0])||arguments[0],a=this;Object(w["d"])({projectCode:this.code,pageSize:30}).then((function(s){var i=[];if(e?t.taskStages=i=s.data.list:s.data.list.forEach((function(t){t.tasksLoading=!1,i.push(t)})),i){a.taskSearchParams;i.forEach((function(t,s){t.page=1,a.getTasks(t,s,e)}))}}))},getTasks:function(t){var e=this,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,s=arguments.length>2?arguments[2]:void 0,i=this.taskSearchParams,n={};n={stageCode:"1",type:"all",page:this.pages[a]},n=Object.assign(n,i),0==a&&(n.type_name="进行中"),1==a&&(n.type_name="验收中"),2==a&&(n.type_name="已完成"),Object(w["h"])(n).then((function(i){var n=0;i.data.forEach((function(e){e.canRead||n++,t.doneTasks.push(e)})),t.canNotReadCount=n,t.tasksLoading=!1,t.tasks=i.data,i.data.length<10?e.pages[a]=-1:e.pages[a]++,s||e.$set(e.taskStages,a,t)}))},filterTask:function(t,e){return t.filter((function(t){return t.done==e}))},taskSearchAction:function(t){console.log(t),this.taskSearchParams=t,this.getTaskStages()},showTaskCard:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],a=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(this.taskStages.forEach((function(t){t.showTaskCard=!1})),!1===e)return!1;this.taskStages[e].showTaskCard=a,this.$nextTick((function(){t.$refs[e+"-stage"][0].scrollIntoView("#card"+e),t.$refs["inputTaskName".concat(e)][0].focus()}))},selectExecutor:function(t){var e=t.key;this.defaultExecutor=this.projectMembers[e]},addTask:function(){if(!this.taskStages[0].code)return Object(M["b"])({title:"请先创建任务列表"},"error",5e3);this.$router.push("".concat(this.$route.path,"/add/").concat(this.code,"?name=").concat(this.project.name,"&from=",0,"&stage_code=").concat(this.taskStages[0].code))},createTask:function(t,e){if(!this.task.name)return this.$message.warning("任务内容不能为空",2),!1;this.task.stage_code=t,this.task.project_code=this.code,this.task.assign_to=this.defaultExecutor.code,this.confirmCreateTask(e)},confirmCreateTask:function(t){var e=this,a=this;if(a.createTaskLoading)return a.$message.warning("正在添加任务,请稍后...",2),!1;setTimeout((function(){!0===a.createTaskLoading&&a.$message.loading({content:"正在添加任务,请稍后...",duration:5})}),2e3),a.createTaskLoading=!0,Object(S["s"])(a.task).then((function(s){a.createTaskLoading=!1;var i=Object(x["a"])(s);if(i){a.$message.destroy();var n=a.taskStages[t];n.tasks.push(s.data),a.taskStages[t].unDoneTasks.push(s.data),a.task={},e.taskDetail(s.data.code,t),console.log(D({},s.data))}})).catch((function(){a.createTaskLoading=!1}))},taskDone:function(t,e,a,s){var i=this,n=null,o=this.taskStages[e].unDoneTasks,r=this.taskStages[e].doneTasks;if(n=s?o[a]:r[a],n.hasUnDone)return!1;n.done=s,s?(o.splice(a,1),r.push(n),r=r.sort((function(t,e){return t.sort===e.sort?t.id_num-e.id_num:t.sort-e.sort}))):(r.splice(a,1),o.push(n),o=o.sort((function(t,e){return t.sort===e.sort?t.id_num-e.id_num:t.sort-e.sort}))),Object(S["z"])(t,s).then((function(t){var e=Object(x["a"])(t);if(!e)return!1;i.getTaskStages(!1)}))},showInputStrageName:function(){var t=this;this.showCreateStage=!this.showCreateStage,this.$nextTick((function(){t.$refs.inputStageName.focus()}))},doStage:function(t){var e=this,a=this,s=t.key.split("_"),i=s[s.length-2],n=s[s.length-1],o=s[0];switch(o){case"editStage":this.stageModal.stageCode=i,this.stageModal.stageIndex=n,this.$nextTick((function(){e.stageModal.form.setFieldsValue({name:e.taskStages[n].name}),e.$refs.inputStageTitle.focus()})),this.stageModal.modalStatus=!0;break;case"recycleBatch":this.$confirm({title:"移到回收站",content:"您确定要把列表下的所有任务移到回收站吗?",okText:"移到回收站",okType:"danger",cancelText:"再想想",onOk:function(){return a.taskStages[n].tasks=[],a.$set(a.taskStages[n],"doneTasks",[]),Object(S["r"])({stageCode:i}).then((function(t){var e=Object(x["a"])(t);if(!e)return!1;a.$set(a.taskStages[n],"doneTasks",[]),a.$set(a.taskStages[n],"unDoneTasks",[])})),Promise.resolve()}});break;case"setEndTime":this.set_type_endTime_modal=!0;break;case"setExecutor":this.projectMemberModal.currentStageIndex=n,this.projectMemberModal.modalStatus=!0;break;case"delStage":if(this.taskStages[n].tasks.length>0)return this.$warning({title:"删除列表",content:"请先清空此列表上的任务,然后再删除这个列表",okText:"确定"}),!1;this.$confirm({title:"删除列表",content:"您确定要永远删除这个列表吗?",okText:"删除",okType:"danger",cancelText:"再想想",onOk:function(){return Object(w["b"])(i),a.taskStages.splice(n,1),Promise.resolve()}});break}},creteStage:function(){var t=this;if(!this.stageName)return this.$message.warning("请输入列表名称",2),!1;Object(w["e"])({name:this.stageName,projectCode:this.code}).then((function(e){var a=Object(x["a"])(e);if(!a)return!1;var s=e.data;t.taskStages.push(s),t.stageName="",t.$nextTick((function(){document.getElementById("board-scrum-stages").scrollLeft=1e4}))}))},editStage:function(){var t=this,e=this.stageModal.form.getFieldsValue();if(!e.name)return this.$message.warning("请输入列表名称",2),!1;Object(w["c"])({name:e.name,stageCode:this.stageModal.stageCode}).then((function(a){var s=Object(x["a"])(a);if(!s)return!1;t.taskStages[t.stageModal.stageIndex].name=e.name,t.stageModal.modalStatus=!1}))},setExecutor:function(t){var e=this,a=this.taskStages[this.projectMemberModal.currentStageIndex],s=[];a.tasks.forEach((function(t){t.canRead&&s.push(t.code)})),s?Object(S["c"])({taskCodes:JSON.stringify(s),executorCode:t.code}).then((function(t){if(e.projectMemberModal.modalStatus=!1,!Object(x["a"])(t))return!1;Object(w["h"])({stageCode:"1",type:"all"}).then((function(t){var e=0;t.data.forEach((function(t){t.canRead||e++})),a.canNotReadCount=e,a.tasksLoading=!1,a.tasks=t.data}))})):this.projectMemberModal.modalStatus=!1},showTaskPri:function(t){return{warning:1==t,error:2==t}},showTimeLabel:function(t){var e="label-primary";if(null==t)return e;var a=d()(d()(t).format("YYYY-MM-DD")).diff(d()().format("YYYY-MM-DD"),"days");return a<0?e="label-danger":0==a?e="label-warning":a>7&&(e="label-normal"),e},showTaskTime:function(t,e){return Object(j["a"])(t,e)},taskDetail:function(t,e){var a=this;this.$router.push("".concat(this.$route.path,"/detail/").concat(t,"?from=").concat(e)),this.$nextTick((function(){setTimeout((function(){a.showTaskCard(e,!1)}),700)}))},stageSort:function(t){var e=this.getPreAndNextCode(t);Object(w["f"])(e[0],e[1],this.code)},getPreAndNextCode:function(t){for(var e=t.clone.getAttribute("id"),a=[],s="",i=0,n=t.to.children.length;i0&&void 0!==arguments[0]?arguments[0]:"",e=new DOMParser,a=e.parseFromString(t,"text/html");return a.body.textContent},loadMoreStage:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;this.getTasks(t,e,!0)}}},$=P,L=(a("49d6"),a("2877")),N=Object(L["a"])($,s,i,!1,null,null,null);e["default"]=N.exports},"49d6":function(t,e,a){"use strict";a("964d")},"964d":function(t,e,a){}}]);