|
|
(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;a<i.length;a++){var n=i[a].getBoundingClientRect();if(t.clientY>n.top&&t.clientY<n.top+n.height&&t.clientX>n.left&&t.clientX<n.left+n.width){e=!0;break}}}),e};e.a=a.default.directive("scrollx",{bind:function(t,e,s){var i=e.value;c=i.ignoreClass},inserted:function(t){o=t,Object(i.b)(document,"mousedown",l.bind(t)),Object(i.b)(document,"wheel",u.bind(t)),Object(i.b)(document,"mouseup",r.bind(t)),Object(i.b)(document,"mousemove",d.bind(t))},unbind:function(t){Object(i.a)(document,"mousedown",l.bind(t)),Object(i.a)(document,"mouseup",r.bind(t)),Object(i.a)(document,"wheel",u.bind(t)),Object(i.a)(document,"mousemove",d.bind(t)),n={isDown:!1,coord:{x:0,y:0}}}})},M6Gn:function(t,e,s){},MI42:function(t,e,s){},Mzjh:function(t,e,s){"use strict";var i=s("FyfS"),a=s.n(i),n=s("QbLZ"),o=s.n(n),c=s("LWkM"),l=s("Ajln"),r=s("7Qib"),d=s("ehos"),u=s("jtZb"),h={searchShow:!0,userRequest:null,userParams:null},m={props:{workId:[Number,String],data:Object,props:Object},data:function(){return{zIndex:Object(r.q)(),search:"",menuList:[{label:"成员",id:"1",expand:!1,list:[]},{label:"截止时间",id:"2",expand:!1,list:[{id:1,name:"今天",type:"time",checked:!1},{id:2,name:"明天",type:"time",checked:!1},{id:3,name:"本周",type:"time",checked:!1},{id:4,name:"本月",type:"time",checked:!1},{id:5,name:"未设置截止时间",type:"time",checked:!1},{id:6,name:"已延期",type:"time",checked:!1},{id:7,name:"今日更新",type:"time",checked:!1}]},{label:"标签",id:3,expand:!1,list:[]}]}},computed:{config:function(){return Object(u.a)(o()({},h),this.props||{})}},created:function(){var t=this;this.debouncedSeach=Object(d.debounce)(500,function(){t.searchChange()}),this.search=this.data.search,this.getUserList(),this.getTagList(),this.menuList[1].list.forEach(function(e){e.checked=t.data&&t.data.timeId==e.id})},mounted:function(){document.getElementById("app").addEventListener("click",this.taskShowHandle,!1)},methods:{getUserList:function(){var t=this;this.menuList[0].list=[];var e=this.config.userRequest||c.w,s=this.config.userParams;null===s&&(s={work_id:this.workId}),e(s).then(function(e){t.menuList[0].list=e.data.map(function(e){return e.checked=t.data&&t.data.userIds&&t.data.userIds.includes(e.id),e.name=e.name,e.type="user",e})})},getTagList:function(){var t=this;this.menuList[2].list=[],Object(l.c)().then(function(e){t.menuList[2].list=e.data.list.map(function(e){return e.id=e.lable_id,e.checked=t.data&&t.data.tagIds&&t.data.tagIds.includes(e.lable_id),e.type="tag",e})}).catch(function(){})},close:function(){this.$emit("close")},rowChecked:function(t){if("time"==t.type){var e=!0,s=!1,i=void 0;try{for(var n,o=a()(this.menuList[1].list);!(e=(n=o.next()).done);e=!0){var c=n.value;t.id==c.id?c.checked=!c.checked:c.checked=!1}}catch(t){s=!0,i=t}finally{try{!e&&o.return&&o.return()}finally{if(s)throw i}}}else t.checked=!t.checked;var l=[],r=!0,d=!1,u=void 0;try{for(var h,m=a()(this.menuList[0].list);!(r=(h=m.next()).done);r=!0){var p=h.value;p.checked&&l.push(p.id)}}catch(t){d=!0,u=t}finally{try{!r&&m.return&&m.return()}finally{if(d)throw u}}var v="",k=!0,f=!1,_=void 0;try{for(var b,g=a()(this.menuList[1].list);!(k=(b=g.next()).done);k=!0){var w=b.value;if(w.checked){v=w.id;break}}}catch(t){f=!0,_=t}finally{try{!k&&g.return&&g.return()}finally{if(f)throw _}}var C=[],y=!0,x=!1,L=void 0;try{for(var S,T=a()(this.menuList[2].list);!(y=(S=T.next()).done);y=!0){var j=S.value;j.checked&&C.push(j.id)}}catch(t){x=!0,L=t}finally{try{!y&&T.return&&T.return()}finally{if(x)throw L}}this.$emit("change",l,v,C,this.search)},searchChange:function(){this.$emit("change",this.data.userIds,this.data.timeId,this.data.tagIds,this.search)},resetBtn:function(){var t=!0,e=!1,s=void 0;try{for(var i,n=a()(this.menuList);!(t=(i=n.next()).done);t=!0){var o=i.value,c=!0,l=!1,r=void 0;try{for(var d,u=a()(o.list);!(c=(d=u.next()).done);c=!0){d.value.checked=!1}}catch(t){l=!0,r=t}finally{try{!c&&u.return&&u.return()}finally{if(l)throw r}}}}catch(t){e=!0,s=t}finally{try{!t&&n.return&&n.return()}finally{if(e)throw s}}this.search="",this.$emit("change",[],"",[],this.search)},rowFun:function(t){t.expand?t.expand=!1:t.expand=!0},taskShowHandle:function(t){this.$el.contains(t.target)||this.close()}}},p=(s("ne5x"),s("KHd+")),v=Object(p.a)(m,function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("transition",{attrs:{name:"slide-fade"}},[s("el-card",{staticClass:"project-screening",style:{"z-index":t.zIndex}},[s("p",{staticClass:"header"},[s("span",{staticClass:"label"},[t._v("任务筛选")]),t._v(" "),s("el-button",{attrs:{type:"text"},on:{click:t.resetBtn}},[t._v("重置")]),t._v(" "),s("span",{staticClass:"rt el-icon-close",on:{click:t.close}})],1),t._v(" "),s("div",{staticClass:"content"},[t.config.searchShow?s("el-input",{attrs:{placeholder:"搜索项目内任务"},on:{input:t.debouncedSeach},model:{value:t.search,callback:function(e){t.search=e},expression:"search"}}):t._e(),t._v(" "),t._l(t.menuList,function(e,i){return s("div",{key:i,staticClass:"menu-list"},[s("p",{staticClass:"item-label",on:{click:function(s){t.rowFun(e)}}},[t._v("\n "+t._s(e.label)+"\n "),s("span",{class:e.expand?"el-icon-arrow-right item-expand":"el-icon-arrow-down item-expand"})]),t._v(" "),t._l(e.list,function(a,n){return s("div",{directives:[{name:"show",rawName:"v-show",value:0==e.expand,expression:"item.expand == false"}],key:n,class:["item-list",a.checked?"item-list-active":"",{"time-item-list":1==i}],on:{click:function(e){t.rowChecked(a)}}},["user"==a.type?s("xr-avatar",{staticClass:"user-img",attrs:{name:a.realname,size:24,src:a.img}}):t._e(),t._v(" "),"tag"==a.type?s("span",{staticClass:"tag-icon",style:{backgroundColor:a.color}},[s("i",{staticClass:"wk wk-label"})]):t._e(),t._v(" "),s("span",{staticClass:"item-list-label",class:{"is-tag":"tag"==a.type}},[t._v(t._s(a.name||a.realname))]),t._v(" "),s("span",{staticClass:"el-icon-check rt"})],1)})],2)})],2)])],1)},[],!1,null,"7eff73ec",null);v.options.__file="TaskScreening.vue";e.a=v.exports},PUXc:function(t,e,s){"use strict";var i=s("81l/");s.n(i).a},THkR:function(t,e,s){},aLzj:function(t,e,s){},bUSk:function(t,e,s){},bVJV:function(t,e,s){},cV04:function(t,e,s){},i8yE:function(t,e,s){},lg4G:function(t,e,s){"use strict";var i=s("i8yE");s.n(i).a},ne5x:function(t,e,s){"use strict";var i=s("THkR");s.n(i).a},q1aG:function(t,e,s){"use strict";s.r(e);var i=s("LWkM"),a=s("t2rG"),n=s.n(a),o=s("IKCp"),c=s("FyfS"),l=s.n(c),r=s("Flj7"),d=s("C3Po"),u=s("pKm3"),h=s("kK4T"),m=s("ehos"),p={components:{TaskQuickAdd:d.a,TaskDetail:u.a},directives:{},mixins:[h.a],props:{workId:[String,Number],permission:{type:Object,default:function(){return{}}},conditionData:{type:Object,default:function(){return{userIds:[],timeId:[],tagIds:[]}}}},data:function(){return{loading:!1,createTaskListShow:!1,createSubTaskClassId:"hidden",taskListName:"",editTaskListName:"",taskList:[],taskID:"",detailIndex:-1,detailSection:-1,taskDetailShow:!1}},computed:{showMoreBtn:function(){return this.permission.updateTaskClass&&this.isBoardShow||this.permission.saveTask||this.permission.archiveTask||this.permission.deleteTaskClass&&this.isBoardShow},orderTaskClassDisabled:function(){return!this.permission.updateClassOrder||!this.isBoardShow},orderTaskDisabled:function(){return!this.permission.setTaskOrder||!this.isBoardShow},tableNameField:function(){return{board:"class_name",user:"realname"}[this.showType||"board"]},tableField:function(){return{board:"class_id",user:"userId"}[this.showType||"board"]},isBoardShow:function(){return"board"==this.showType}},watch:{workId:function(){this.createTaskListShow=!1,this.taskDetailShow=!1,this.taskList=[],this.getList()},conditionData:function(){this.getList()}},created:function(){var t=this;this.debouncedCheckboxChange=Object(m.throttle)(500,function(e,s,i){t.checkboxChange(e,s,i)}),this.getList(),this.$bus.$on("work-task-import",function(e,s,i){t.getList()})},mounted:function(){document.getElementById("project-container").addEventListener("click",this.taskShowHandle,!1)},beforeDestroy:function(){this.$bus.$off("work-task-import")},methods:{getList:function(){var t=this,e={work_id:this.workId};this.conditionData&&(e.main_user_id=this.conditionData.userIds,e.stop_time_type=this.conditionData.timeId,e.lable_id=this.conditionData.tagIds,e.search=this.conditionData.search),this.loading=!0,(0,{board:i.h,user:i.i}[this.showType||"board"])(e).then(function(e){t.loading=!1;var s=!0,i=!1,a=void 0;try{for(var n,o=l()(e.data);!(s=(n=o.next()).done);s=!0){var c=n.value;c.checkedNum=0;var r=!0,d=!1,u=void 0;try{for(var h,m=l()(c.list);!(r=(h=m.next()).done);r=!0){var p=h.value;5==p.status?(p.checked=!0,c.checkedNum+=1):p.checked=!1}}catch(t){d=!0,u=t}finally{try{!r&&m.return&&m.return()}finally{if(d)throw u}}}}catch(t){i=!0,a=t}finally{try{!s&&o.return&&o.return()}finally{if(i)throw a}}t.taskList=e.data||[]}).catch(function(){t.loading=!1})},getListRest:function(){},moveEndParentTask:function(t){document.dispatchEvent(new MouseEvent("mouseup")),t&&t.oldIndex!=t.newIndex&&Object(i.j)({work_id:this.workId,class_ids:this.taskList.map(function(t){return t.class_id})}).then(function(t){}).catch(function(){})},moveParentTask:function(t){if(0==t.draggedContext.futureIndex&&-1==this.taskList[0].class_id)return!1},moveEndSonTask:function(t){if(document.dispatchEvent(new MouseEvent("mouseup")),t){var e=t.from.id,s=t.to.id;if(e==s&&t.oldIndex==t.newIndex)return;var a=this.taskList.filter(function(t){return t.class_id==e})[0],n=a.list;this.updateTaskListCheckNum(a);var o=this.taskList.filter(function(t){return t.class_id==s})[0],c=o.list;this.updateTaskListCheckNum(o);var l={};l=e==s?{toList:c.map(function(t){return t.task_id}),toId:s,work_id:this.workId}:{fromlist:n.map(function(t){return t.task_id}),fromid:e,tolist:c.map(function(t){return t.task_id}),toid:s,work_id:this.workId},Object(i.k)(l).then(function(t){}).catch(function(){})}},updateTaskListCheckNum:function(t){t.checkedNum=t.list.filter(function(t){return t.checked}).length},checkboxChange:function(t,e,s){var i=this;Object(r.n)({work_id:this.workId,task_id:t.task_id,status:t.checked?5:1}).then(function(a){i.changeListCompleteOrder(t,e,s,"board"==i.showType),i.updateTaskListCheckNum(e)}).catch(function(){t.checked=!t.checked,i.updateTaskListCheckNum(e)})},changeListCompleteOrder:function(t,e,s){var a=!(arguments.length>3&&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<s&&(n=null)}else{e.list[s].task_id!=t.task_id&&(s=null);for(var l=e.list.length-1;l>=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;i<s.length;i++){if(s[i].contains(t.target)){e=!1;break}}this.taskDetailShow=!e}}}},v={components:{draggable:n.a},directives:{scrollx:o.a},mixins:[p],props:{showType:String},data:function(){return{}},computed:{},watch:{showType:function(){this.createTaskListShow=!1,this.taskDetailShow=!1,this.taskList=[],this.getList()}},created:function(){},mounted:function(){document.body.ondrop=function(t){t.preventDefault(),t.stopPropagation()}},methods:{}},k=(s("PUXc"),s("KHd+")),f=Object(k.a)(v,function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticClass:"content-box"},[s("draggable",{directives:[{name:"scrollx",rawName:"v-scrollx",value:{ignoreClass:["ignoreClass"]},expression:"{ ignoreClass :['ignoreClass']}"}],staticClass:"board-column-content-parent",attrs:{id:"task-board-body",list:t.taskList,options:{group:"mission",forceFallback:!1,disabled:t.orderTaskClassDisabled,dragClass:"sortable-parent-drag",filter:".ignore-elements"},move:t.moveParentTask,handle:".board-column-wrapper"},on:{end:t.moveEndParentTask}},[t._l(t.taskList,function(e,i){return s("div",{key:i,staticClass:"board-column",class:{"ignore-elements":-1==e.class_id}},[s("flexbox",{staticClass:"board-column-wrapper ignoreClass",attrs:{orient:"vertical",align:"stretch"}},[s("div",{staticClass:"board-column-header"},[s("div",[s("span",{staticClass:"text"},[t._v(" "+t._s(e.class_name)+" ")]),t._v(" "),s("span",{staticClass:"text-num"},[t._v(t._s(e.checkedNum)+" / "+t._s(e.list.length))]),t._v(" "),t.showMoreBtn&&-1!=e.class_id?s("el-popover",{attrs:{placement:"bottom-start",width:"150",trigger:"click"},model:{value:e.taskHandleShow,callback:function(s){t.$set(e,"taskHandleShow",s)},expression:"item.taskHandleShow"}},[s("div",{staticClass:"omit-popover-box"},[t.permission.updateTaskClass&&t.isBoardShow?s("el-popover",{attrs:{"visible-arrow":!1,placement:"bottom-start",width:"250","popper-class":"task-board-rechristen-popover",trigger:"click"},model:{value:e.renameShow,callback:function(s){t.$set(e,"renameShow",s)},expression:"item.renameShow"}},[s("div",{staticClass:"task-board-rechristen-box"},[s("div",{staticClass:"title"},[s("span",[t._v("重命名")]),t._v(" "),s("span",{staticClass:"el-icon-close rt",on:{click:function(t){e.renameShow=!1}}})]),t._v(" "),s("div",{staticClass:"content"},[s("el-input",{attrs:{maxlength:10,size:"mini"},model:{value:t.editTaskListName,callback:function(e){t.editTaskListName=e},expression:"editTaskListName"}}),t._v(" "),s("div",{staticClass:"btn-box"},[s("el-button",{attrs:{size:"mini",type:"primary"},on:{click:function(s){t.renameTaskListSubmit(e)}}},[t._v("保存")]),t._v(" "),s("el-button",{attrs:{size:"mini"},on:{click:function(t){e.renameShow=!1}}},[t._v("取消")])],1)],1)]),t._v(" "),s("p",{attrs:{slot:"reference"},on:{click:function(s){t.renameTaskListClick(e)}},slot:"reference"},[t._v("重命名")])]):t._e(),t._v(" "),t.permission.saveTask?s("p",{on:{click:function(s){t.createSubTaskClick(e,i)}}},[t._v("新建任务")]):t._e(),t._v(" "),t.permission.archiveTask?s("p",{on:{click:function(s){t.archiveTaskListClick(e)}}},[t._v("归档已完成任务")]):t._e(),t._v(" "),t.permission.deleteTaskClass&&t.isBoardShow?s("p",{on:{click:function(s){t.delectTaskListClick(e,i)}}},[t._v("删除列表")]):t._e()],1),t._v(" "),s("i",{staticClass:"el-icon-more img-gd",attrs:{slot:"reference"},slot:"reference"})]):t._e()],1),t._v(" "),0==e.checkedNum?s("el-progress",{attrs:{percentage:0}}):s("el-progress",{attrs:{percentage:e.checkedNum/e.list.length*100}})],1),t._v(" "),s("draggable",{staticClass:"board-column-content",attrs:{list:e.list,options:{group:{name:"missionSon",put:-1!=e.class_id},forceFallback:!1,disabled:t.orderTaskDisabled,filter:".board-item-active",dragClass:"sortable-drag"},id:e.class_id},on:{end:t.moveEndSonTask}},t._l(e.list,function(a,n){return s("div",{key:n,ref:"taskRow",refInFor:!0,class:a.checked?"board-item board-item-active":"board-item",style:{"border-color":t.getPriorityColor(a.priority).color},on:{click:function(e){t.showDetailView(a,i,n)}}},[a.main_user?s("xr-avatar",{staticClass:"head-png",attrs:{name:a.main_user.realname,id:a.main_user.id,size:24,src:a.main_user.img,disabled:!1,trigger:"hover"}}):t._e(),t._v(" "),s("flexbox",{attrs:{align:"stretch"}},[s("div",{staticStyle:{display:"inline-block"},on:{click:function(t){t.stopPropagation()}}},[s("el-checkbox",{attrs:{disabled:!t.permission.setTaskStatus},on:{change:function(s){t.debouncedCheckboxChange(a,e,n)}},model:{value:a.checked,callback:function(e){t.$set(a,"checked",e)},expression:"element.checked"}})],1),t._v(" "),s("div",{staticClass:"element-label"},[t._v(t._s(a.name))])]),t._v(" "),s("div",{staticClass:"img-group"},[a.stop_time?s("div",{staticClass:"img-box"},[s("i",{staticClass:"wukong wukong-time-task",style:{color:1!=a.is_end||a.checked?"#999":"red"}}),t._v(" "),s("span",{style:{color:1!=a.is_end||a.checked?"#999":"red"}},[t._v(t._s(t._f("moment")(a.stop_time,"YYYY-MM-DD"))+"截止")])]):t._e(),t._v(" "),a.childAllCount>0||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<s.length;i++){if(s[i].contains(t.target)){e=!1;break}}this.taskDetailShow=!e}}}},g=(s("+mv6"),Object(k.a)(b,function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"task-list-board"},[s("el-collapse",{model:{value:t.collapseValue,callback:function(e){t.collapseValue=e},expression:"collapseValue"}},[t._l(t.taskList,function(e,i){return[s("el-collapse-item",{key:i,attrs:{name:i}},[s("template",{slot:"title"},[s("span",{staticClass:"list-text"},[t._v(" "+t._s(e[t.tableNameField])+" ")]),t._v(" "),s("span",{staticClass:"list-text-num"},[t._v(t._s(e.checkedNum)+" / "+t._s(e.list.length))]),t._v(" "),t.showMoreBtn&&-1!=e.classId?s("el-popover",{attrs:{placement:"bottom-start",width:"150",trigger:"click"},model:{value:e.taskHandleShow,callback:function(s){t.$set(e,"taskHandleShow",s)},expression:"item.taskHandleShow"}},[s("div",{staticClass:"omit-popover-box"},[t.permission.updateTaskClass&&t.isBoardShow?s("el-popover",{attrs:{"visible-arrow":!1,placement:"bottom-start",width:"250","popper-class":"task-board-rechristen-popover",trigger:"click"},model:{value:e.renameShow,callback:function(s){t.$set(e,"renameShow",s)},expression:"item.renameShow"}},[s("div",{staticClass:"task-board-rechristen-box"},[s("div",{staticClass:"title"},[s("span",[t._v("重命名")]),t._v(" "),s("span",{staticClass:"el-icon-close rt",on:{click:function(t){e.renameShow=!1}}})]),t._v(" "),s("div",{staticClass:"content"},[s("el-input",{attrs:{maxlength:10,size:"mini"},model:{value:t.editTaskListName,callback:function(e){t.editTaskListName=e},expression:"editTaskListName"}}),t._v(" "),s("div",{staticClass:"btn-box"},[s("el-button",{attrs:{size:"mini",type:"primary"},on:{click:function(s){t.renameTaskListSubmit(e)}}},[t._v("保存")]),t._v(" "),s("el-button",{attrs:{size:"mini"},on:{click:function(t){e.renameShow=!1}}},[t._v("取消")])],1)],1)]),t._v(" "),s("p",{attrs:{slot:"reference"},on:{click:function(s){t.renameTaskListClick(e)}},slot:"reference"},[t._v("重命名")])]):t._e(),t._v(" "),t.permission.saveTask?s("p",{on:{click:function(s){t.createSubTaskClick(e,i)}}},[t._v("新建任务")]):t._e(),t._v(" "),t.permission.archiveTask?s("p",{on:{click:function(s){t.archiveTaskListClick(e)}}},[t._v("归档已完成任务")]):t._e(),t._v(" "),t.permission.deleteTaskClass&&t.isBoardShow?s("p",{on:{click:function(s){t.delectTaskListClick(e,i)}}},[t._v("删除列表")]):t._e()],1),t._v(" "),s("i",{staticClass:"el-icon-more img-gd",attrs:{slot:"reference"},on:{click:function(t){t.stopPropagation()}},slot:"reference"})]):t._e()],1),t._v(" "),t._l(e.list,function(e,a){return s("task-cell",{key:a,attrs:{"data-section":i,data:e,"data-index":a},on:{"on-handle":t.taskCellHandle}})})],2),t._v(" "),s("div",{key:"add"+i},[t.permission.saveTask&&-1!=e[t.tableField]?s("task-quick-add",{ref:"taskQuickAdd",refInFor:!0,staticStyle:{width:"280px"},attrs:{params:{work_id:t.workId,class_id:e.class_id},"show-style":"hideBorder"},on:{send:t.addSubTaskSuc}}):t._e()],1)]})],2),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(),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,"33bddb0f",null));g.options.__file="TaskListBoard.vue";var w=g.exports,C=s("KTTK"),y=s("7Qib"),x={props:{workId:[Number,String]},data:function(){return{firstRequst:!0,list:[],loading:!1,currentPage:1,pageSize:15,pageSizes:[15,30,45,60],total:0,fieldList:[],tableHeight:document.documentElement.clientHeight-250,editDialog:!1,editForm:{name:"",data:{}}}},watch:{workId:function(){this.currentPage=1,this.list=[],this.getList(!0)}},mounted:function(){this.firstRequst?(this.firstRequst=!1,this.getList(!0)):this.getList(!1)},activated:function(){this.getList(!1)},deactivated:function(){},created:function(){var t=this;window.onresize=function(){t.tableHeight=document.documentElement.clientHeight-250},this.fieldList.push({prop:"name",width:"200",label:"附件名称"}),this.fieldList.push({prop:"size",width:"200",label:"附件大小"}),this.fieldList.push({prop:"createName",width:"200",label:"上传人"}),this.fieldList.push({prop:"create_time",width:"200",label:"上传时间"})},methods:{handleSizeChange:function(t){this.pageSize=t,this.getList(!1)},handleCurrentChange:function(t){this.currentPage=t,this.getList(!1)},getList:function(t){var e=this;this.loading=t,Object(i.s)({page:this.currentPage,limit:this.pageSize,work_id:this.workId}).then(function(t){e.list=t.data.list.map(function(t){return t.size=Object(y.h)(t.size),t}),e.total=t.data.totalRow,e.loading=!1}).catch(function(){e.loading=!1})},headerRowStyle:function(t){t.row,t.column,t.rowIndex,t.columnIndex;return{textAlign:"center"}},cellStyle:function(t){t.row,t.column,t.rowIndex,t.columnIndex;return{textAlign:"center"}},confirmEdit:function(){var t=this;this.editForm.name&&Object(C.i)({file_id:this.editForm.data.row.file_id,name:this.editForm.name,save_name:this.editForm.data.row.save_name}).then(function(e){t.$message.success("编辑成功"),t.editDialog=!1,t.list[t.editForm.data.$index].name=t.editForm.name}).catch(function(){})},handleFile:function(t,e){var s=this;"preview"===t?this.$bus.emit("preview-image-bus",{index:e.$index,data:this.list.map(function(t){return{url:t.filePath||t.url||t.file_path,name:t.name,save_name:t.save_name}})}):"delete"===t?this.$confirm("您确定要删除该文件吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){Object(C.c)({file_id:e.row.file_id,module:"crm_customer",module_id:e.row.file_id,save_name:e.row.save_name,work_id:s.workId}).then(function(t){s.list.splice(e.$index,1),s.$message.success("操作成功")}).catch(function(){})}).catch(function(){s.$message({type:"info",message:"已取消操作"})}):(this.editForm.data=e,this.editForm.name=e.row.name,this.editDialog=!0)}}},L=(s("3bw5"),Object(k.a)(x,function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticClass:"attachment"},[s("div",{staticClass:"attachment-body"},[s("el-table",{staticStyle:{width:"100%",border:"1px solid #E6E6E6"},attrs:{data:t.list,height:t.tableHeight,"header-cell-style":t.headerRowStyle,"cell-style":t.cellStyle,align:"center","header-align":"center",stripe:""}},[t._l(t.fieldList,function(t,e){return s("el-table-column",{key:e,attrs:{prop:t.prop,label:t.label,"show-overflow-tooltip":""}})}),t._v(" "),s("el-table-column",{attrs:{label:"操作",width:"150"},scopedSlots:t._u([{key:"default",fn:function(e){return[s("flexbox",{attrs:{justify:"center"}},[s("el-button",{attrs:{type:"text"},nativeOn:{click:function(s){t.handleFile("preview",e)}}},[t._v("预览")]),t._v(" "),s("el-button",{attrs:{type:"text"},nativeOn:{click:function(s){t.handleFile("edit",e)}}},[t._v("重命名")]),t._v(" "),s("el-button",{attrs:{type:"text"},nativeOn:{click:function(s){t.handleFile("delete",e)}}},[t._v("删除")])],1)]}}])})],2)],1),t._v(" "),s("el-dialog",{attrs:{"append-to-body":!0,"close-on-click-modal":!1,visible:t.editDialog,title:"编辑",width:"30%"},on:{"update:visible":function(e){t.editDialog=e}}},[s("el-form",{attrs:{model:t.editForm}},[s("el-form-item",{attrs:{label:"新名称","label-width":"100"}},[s("el-input",{attrs:{autocomplete:"off"},model:{value:t.editForm.name,callback:function(e){t.$set(t.editForm,"name",e)},expression:"editForm.name"}})],1)],1),t._v(" "),s("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[s("el-button",{on:{click:function(e){t.editDialog=!1}}},[t._v("取 消")]),t._v(" "),s("el-button",{attrs:{type:"primary"},on:{click:t.confirmEdit}},[t._v("确 定")])],1)],1),t._v(" "),s("div",{staticClass:"p-contianer"},[s("el-pagination",{staticClass:"p-bar",attrs:{"current-page":t.currentPage,"page-sizes":t.pageSizes,"page-size":t.pageSize,total:t.total,background:"",layout:"prev, pager, next, sizes, total, jumper"},on:{"update:pageSize":function(e){t.pageSize=e},"size-change":t.handleSizeChange,"current-change":t.handleCurrentChange}})],1)],1)},[],!1,null,"02c077ad",null));L.options.__file="Attachment.vue";var S=L.exports,T=s("2bXq"),j=s("dGSA"),I=s("W5iH"),D=s("zvRq"),O={components:{StatisticalOverview:T.a,StatisticalTask:j.a,StatisticalMember:I.a},props:{workId:[Number,String]},data:function(){return{loading:!1,detailData:{},firstRequst:!0}},watch:{workId:function(){this.getDetail(!0)}},mounted:function(){},activated:function(){this.firstRequst?(this.firstRequst=!1,this.getDetail(!0)):this.getDetail(!1)},methods:{getDetail:function(t){var e=this;this.loading=t,Object(D.a)({work_id:this.workId}).then(function(t){e.detailData=t.data,e.loading=!1}).catch(function(){e.loading=!1})}}},$=(s("BhLs"),Object(k.a)(O,function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticClass:"statistical"},[s("statistical-overview",{staticClass:"statistical-overview",attrs:{data:t.detailData.dataCount,list:t.detailData.ownerList}}),t._v(" "),s("flexbox",{staticClass:"statistical-task"},[s("statistical-task",{staticClass:"statistical-task-item",attrs:{list:t.detailData.classList,type:"task",title:"任务列表"}}),t._v(" "),s("statistical-task",{staticClass:"statistical-task-item",attrs:{list:t.detailData.labelList,type:"label",title:"标签分析"}})],1),t._v(" "),s("statistical-member",{staticClass:"statistical-member",attrs:{list:t.detailData.userList}})],1)},[],!1,null,"4ea6892a",null));$.options.__file="TaskStatistical.vue";var N=$.exports,F=s("4dIA"),B={components:{TaskDetail:u.a,TaskCell:F.a},props:{workId:[Number,String]},data:function(){return{loading:!1,taskList:[],firstRequst:!0,taskID:"",detailIndex:-1,taskDetailShow:!1}},watch:{workId:function(){this.taskList=[],this.getList(!0)}},activated:function(){this.firstRequst?(this.firstRequst=!1,this.getList(!0)):this.getList(!1)},mounted:function(){document.getElementById("project-container").addEventListener("click",this.taskShowHandle,!1)},methods:{getList:function(t){var e=this;this.loading=t,Object(i.d)({work_id:this.workId}).then(function(t){e.loading=!1;var s=!0,i=!1,a=void 0;try{for(var n,o=l()(t.data);!(s=(n=o.next()).done);s=!0){var c=n.value;c.checked=5==c.status}}catch(t){i=!0,a=t}finally{try{!s&&o.return&&o.return()}finally{if(i)throw a}}e.taskList=t.data}).catch(function(){e.loading=!1})},changeCheckbox:function(t){Object(r.n)({work_id:this.workId,task_id:t.task_id,status:t.checked?5:1}).then(function(t){}).catch(function(){t.checked=!1})},showDetailView:function(t,e){this.taskID=t.task_id,this.detailIndex=e,this.taskDetailShow=!0},detailHandle:function(t){if(0==t.index||t.index)if("title-check"==t.type)this.$set(this.taskList[t.index],"checked",t.value);else if("delete"==t.type||"activate-task"==t.type)this.taskList.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.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;i<s.length;i++){if(s[i].contains(t.target)){e=!1;break}}this.taskDetailShow=!e}}}},E=(s("GcM4"),Object(k.a)(B,function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticClass:"archiving-task"},[s("div",{directives:[{name:"empty",rawName:"v-empty",value:t.taskList,expression:"taskList"}],staticClass:"archiving-task-body"},t._l(t.taskList,function(e,i){return s("task-cell",{key:i,attrs:{data:e,"data-index":i},on:{"on-handle":t.taskCellHandle}})})),t._v(" "),t.taskDetailShow?s("task-detail",{ref:"particulars",attrs:{id:t.taskID,"detail-index":t.detailIndex},on:{"on-handle":t.detailHandle,close:t.closeBtn}}):t._e()],1)},[],!1,null,"3b17943d",null));E.options.__file="ArchivingTask.vue";var H=E.exports,z=s("Rb0w"),A=s("U8n8"),R={components:{MembersDep:A.a},props:{workId:[Number,String],title:String,color:String,isOpen:[Number,String],addMembersData:Array,name:{type:Array,default:function(){return[]}},permission:{type:Object,default:function(){return{}}}},data:function(){return{loading:!1,projectSetShow:!1,colorList:["#53D397","#20C1BD","#58DADA","#0FC9E7","#3498DB","#4586FF","#8983F3","#AEA1EA","#FF6699","#F24D70","#FF6F6F"],tabType:"base",setColor:"",setTitle:"",setIsOpen:0,openOptions:[{value:0,label:"私有:只有加入的成员才能看见此项目"},{value:1,label:"公开:企业所有成员都可以看见此项目"}],membersList:[],optionList:[],ownerRole:"",projectRoleList:[]}},watch:{addMembersData:function(){this.membersList=Object(y.t)(this.addMembersData||[])},projectSetShow:function(t){t&&(this.membersList=Object(y.t)(this.addMembersData||[]))},tabType:function(t){"member"==t&&0==this.optionList.length&&this.getGroupList()}},created:function(){this.membersList=Object(y.t)(this.addMembersData||[]),this.getProjectRoleList()},beforeDestroy:function(){},methods:{getGroupList:function(){var t=this;Object(i.t)().then(function(e){t.optionList=e.data||[]}).catch(function(){})},projectSetting:function(){this.setColor=this.color,this.setTitle=this.title,this.setIsOpen=this.isOpen,this.tabType="base",this.$emit("click")},submite:function(){var t=this;if("base"==this.tabType){this.loading=!0;var e={name:this.setTitle,color:this.setColor,is_open:this.setIsOpen,work_id:this.workId};1==this.setIsOpen&&(e.group_id=this.ownerRole),Object(i.z)(e).then(function(e){t.loading=!1,t.$message.success("操作成功"),t.$emit("submite",t.setTitle,t.setColor,t.setIsOpen),t.close()}).catch(function(){t.loading=!1})}else{for(var s=0;s<this.membersList.length;s++){if(!this.membersList[s].id)return}this.loading=!0,Object(i.n)({list:this.membersList,work_id:this.workId}).then(function(e){t.loading=!1,t.$message.success("操作成功"),t.$emit("handle","member"),t.close()}).catch(function(){t.loading=!1})}},close:function(){this.projectSetShow=!1,this.$emit("close")},userSelectChange:function(t,e){var s=this;Object(i.m)({work_id:this.workId,owner_user_id:t.map(function(t){return t.id})}).then(function(t){s.membersList=t.data})},getSelectMemberRole:function(t,e){return t.includes(e.id)?this.membersList.find(function(t){return t.id}):null},deleteMember:function(t,e){var s=this;Object(i.v)({work_id:this.workId,owner_user_id:t.id}).then(function(t){s.membersList.splice(e,1),s.$message.success("删除成功")}).catch(function(){})},getProjectRoleList:function(){var t=this;this.loading=!0,Object(z.c)().then(function(e){t.projectRoleList=e.data||[],t.projectRoleList.length&&(t.ownerRole=t.projectRoleList[0].id),t.loading=!1}).catch(function(){t.loading=!1})}}},M=(s("lg4G"),Object(k.a)(R,function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"project-settings"},[s("el-popover",{attrs:{placement:"bottom-start",width:"400","popper-class":"no-padding-popover",trigger:"click"},model:{value:t.projectSetShow,callback:function(e){t.projectSetShow=e},expression:"projectSetShow"}},[s("div",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticClass:"project-settings-box"},[s("p",{staticClass:"project-settings-title-top"},[s("span",[t._v("项目设置")]),t._v(" "),s("span",{staticClass:"el-icon-close rt",on:{click:t.close}})]),t._v(" "),s("div",{staticClass:"content"},[s("p",{staticClass:"title-checked"},[s("span",{staticClass:"span-item",class:{"is-select ":"base"==t.tabType},on:{click:function(e){t.tabType="base"}}},[t._v("基础设置")]),t._v(" "),0==t.isOpen?s("span",{staticClass:"span-item",class:{"is-select ":"member"==t.tabType},on:{click:function(e){t.tabType="member"}}},[t._v("成员管理")]):t._e()]),t._v(" "),s("div",{directives:[{name:"show",rawName:"v-show",value:"base"==t.tabType,expression:"tabType == 'base'"}],staticClass:"infrastructure"},[s("div",{staticClass:"row"},[s("span",{staticClass:"label name"},[t._v("项目名称")]),t._v(" "),s("div",{staticClass:"color-dynamic"},[s("el-input",{attrs:{maxlength:50,size:"mini"},model:{value:t.setTitle,callback:function(e){t.setTitle=e},expression:"setTitle"}}),t._v(" "),s("span",{staticClass:"dynamic-span",style:{background:t.setColor}})],1)]),t._v(" "),s("div",{staticClass:"row"},[s("span",{staticClass:"label"},[t._v("图标颜色")]),t._v(" "),s("div",{staticClass:"color-box"},t._l(t.colorList,function(e,i){return s("span",{key:i,style:{background:e},on:{click:function(s){t.setColor=e}}})}))]),t._v(" "),s("div",{staticClass:"row"},[s("span",{staticClass:"label name"},[t._v("可见范围")]),t._v(" "),s("div",{staticClass:"color-dynamic"},[s("el-select",{model:{value:t.setIsOpen,callback:function(e){t.setIsOpen=e},expression:"setIsOpen"}},t._l(t.openOptions,function(t){return s("el-option",{key:t.value,attrs:{label:t.label,value:t.value}})}))],1)]),t._v(" "),1==t.setIsOpen?s("div",{staticClass:"row"},[s("span",{staticClass:"label name"},[t._v("成员权限")]),t._v(" "),s("div",{staticClass:"color-dynamic"},[s("el-select",{model:{value:t.ownerRole,callback:function(e){t.ownerRole=e},expression:"ownerRole"}},t._l(t.projectRoleList,function(t){return s("el-option",{key:t.id,attrs:{label:t.title+":"+t.remark,value:t.id}})}))],1)]):t._e()]),t._v(" "),s("div",{directives:[{name:"show",rawName:"v-show",value:"member"==t.tabType,expression:"tabType == 'member'"}],staticClass:"add-members"},[t.permission.setTaskOwnerUser&&t.projectSetShow?s("members-dep",{attrs:{"close-dep":!0,"content-block":!1,"user-checked-data":t.membersList},on:{popoverSubmit:t.userSelectChange}},[s("div",{staticClass:"img-span",attrs:{slot:"membersDep"},slot:"membersDep"},[s("el-button",{staticClass:"add-btn",attrs:{type:"text",icon:"wk wk-add"}},[t._v("添加成员")])],1)]):t._e(),t._v(" "),s("div",{staticClass:"member-section"},t._l(t.membersList,function(e,i){return s("div",{key:i,staticClass:"member-row"},[s("xr-avatar",{staticClass:"user-img",attrs:{name:e.realname,size:24,src:e.img||e.thumb_img}}),t._v(" "),s("span",{staticClass:"member-row-name"},[t._v(t._s(e.realname))]),t._v(" "),s("div",{staticClass:"rt"},[s("el-select",{attrs:{size:"mini"},model:{value:e.group_id,callback:function(s){t.$set(e,"group_id",s)},expression:"item.group_id"}},t._l(t.optionList,function(t){return s("el-option",{key:t.id,attrs:{label:t.title,value:t.id}})})),t._v(" "),t.permission.setTaskOwnerUser?s("span",{staticClass:"el-icon-close",on:{click:function(s){t.deleteMember(e,i)}}}):t._e()],1)],1)}))],1)]),t._v(" "),s("div",{staticClass:"footer"},[s("el-button",{attrs:{type:"primary"},on:{click:t.submite}},[t._v("确定")]),t._v(" "),s("el-button",{on:{click:t.close}},[t._v("取消")])],1)]),t._v(" "),s("p",{staticClass:"title",attrs:{slot:"reference"},on:{click:t.projectSetting},slot:"reference"},[t._v("项目设置")])])],1)},[],!1,null,"09ebccf6",null));M.options.__file="ProjectSettings.vue";var P=M.exports,q=s("Mzjh"),U={name:"Members",components:{MembersDep:A.a},props:{visible:{type:Boolean,default:!1},workId:[Number,String],list:Array,isOpen:[String,Number],permission:{type:Object,default:function(){return{}}}},data:function(){return{zIndex:Object(y.q)(),loading:!1,userList:[]}},computed:{canUpdateWork:function(){return 1!=this.isOpen&&this.permission.setTaskOwnerUser}},watch:{visible:function(t){t?this.userList=this.list||[]:this.$emit("close")},userList:function(){this.$bus.$emit("members-update",this.userList)}},mounted:function(){document.getElementById("app").addEventListener("click",this.taskShowHandle,!1)},methods:{userSelectChange:function(t,e){var s=this;this.loading=!0,Object(i.m)({work_id:this.workId,owner_user_id:t.map(function(t){return t.id})}).then(function(t){s.loading=!1,s.userList=t.data||[],s.$emit("handle","member",s.userList),s.$message.success("添加成功")}).catch(function(){s.loading=!1})},deleteUser:function(t,e){var s=this;this.$confirm("确定删除?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){Object(i.v)({work_id:s.workId,owner_user_id:t.id}).then(function(t){s.userList.splice(e,1),s.$message.success("删除成功")})}).catch(function(){s.$message({type:"info",message:"已取消删除"})})},close:function(){this.$emit("update:visible",!1),this.$emit("close")},taskShowHandle:function(t){this.visible&&!this.$el.contains(t.target)&&this.close()}}},V=(s("/BaV"),Object(k.a)(U,function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("transition",{attrs:{name:"slide-fade"}},[s("el-card",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"},{name:"show",rawName:"v-show",value:t.visible,expression:"visible"}],staticClass:"add-members-project-screening",style:{"z-index":t.zIndex}},[s("div",{staticClass:"header"},[s("span",{staticClass:"label"},[t._v("成员"),s("span",{staticClass:"color-a"},[t._v("("+t._s(t.userList.length)+")")])]),t._v(" "),s("i",{staticClass:"rt el-icon-close",on:{click:t.close}})]),t._v(" "),s("div",{staticClass:"content"},[t.canUpdateWork?s("members-dep",{attrs:{"user-checked-data":t.userList,"close-dep":!0},on:{popoverSubmit:t.userSelectChange}},[s("div",{staticClass:"img-span",attrs:{slot:"membersDep"},slot:"membersDep"},[s("el-button",{staticClass:"add-btn",attrs:{type:"text",icon:"wk wk-add"}},[t._v("添加成员")])],1)]):t._e(),t._v(" "),t._l(t.userList,function(e,i){return s("div",{key:i,staticClass:"item-list"},[s("xr-avatar",{staticClass:"user-img",attrs:{name:e.realname,size:24,src:e.img||e.thumb_img}}),t._v(" "),s("span",[t._v(t._s(e.realname)+"\n ")]),t._v(" "),t.canUpdateWork?s("i",{staticClass:"el-icon-close",on:{click:function(s){t.deleteUser(e,i)}}}):t._e()],1)})],2)])],1)},[],!1,null,"125846a8",null));V.options.__file="Members.vue";var W=V.exports,Q=s("4XAY"),K={name:"TaskImport",components:{},props:{show:{type:Boolean,default:!1},workId:{require:!0,type:[String,Number]}},data:function(){return{loading:!1,file:{name:""},stepsActive:1,stepList:[{icon:"wk wk-upload",title:"上传文件",status:"wait"},{icon:"wk wk-data-import",title:"导入数据",status:"wait"},{icon:"wk wk-success",title:"导入完成",status:"wait"}],resultData:null,processData:{count:0,status:""},messageId:null,intervalTimer:null,historyPopoverShow:!1}},computed:{sureTitle:function(){return{1:"立即导入",2:"",3:"确定"}[this.stepsActive]},showCancel:function(){return 2!=this.stepsActive}},watch:{show:function(t){t||3==this.stepsActive&&this.resetData()},stepsActive:function(){this.$emit("status",{1:"wait",2:"process",3:"finish"}[this.stepsActive])}},created:function(){},methods:{sureClick:function(){var t=this;1==this.stepsActive?"finish"==this.stepList[0].status?(this.stepList[1].status="process",this.stepsActive=2,this.firstUpdateFile(function(e){t.messageId=e.data,t.loopSecondQueryNum()})):this.file.name||this.$message.error("请选择导入文件"):this.closeView()},firstUpdateFile:function(t){var e=this,s={};s.work_id=this.workId,s.file=this.file,this.loading=!0,Object(i.c)(s).then(function(e){t&&t(e)}).catch(function(){t&&t(!1),e.loading=!1})},loopSecondQueryNum:function(){var t=this;this.secondQueryNum(),this.intervalTimer=setInterval(function(){"end"==t.processData.status?(clearInterval(t.intervalTimer),t.intervalTimer=null,t.thirdQueryResult()):t.secondQueryNum()},2e3)},secondQueryNum:function(){var t=this;Object(Q.p)({messageId:this.messageId}).then(function(e){""===e.data?t.processData.status="end":(t.processData.status="",t.processData.count=e.data)}).catch(function(){})},thirdQueryResult:function(){var t=this;Object(Q.o)({messageId:this.messageId}).then(function(e){t.loading=!1,t.stepList[1].status="finish",t.stepsActive=3,t.$emit("status","finish"),e&&(t.resultData=e.data,e.data.error>0?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}}]); |