You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 line
9.4 KiB
1 line
9.4 KiB
(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-961c"],{"2f65":function(t,e,a){},"4dIA":function(t,e,a){"use strict";var s=a("Flj7"),i={name:"TaskCell",components:{},mixins:[a("kK4T").a],props:{data:Object,dataIndex:Number,dataSection:Number},data:function(){return{}},mounted:function(){},methods:{taskOverClick:function(t){Object(s.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=(a("zDjq"),a("KHd+")),l=Object(n.a)(i,function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{ref:"taskRow",staticClass:"list",style:{"border-left-color":t.getPriorityColor(t.data.priority).color},on:{click:function(e){t.rowFun(t.data)}}},[a("div",{ref:"listLeft",staticClass:"list-left"},[a("div",{class:t.data.checked?"title title-active":"title",on:{click:function(t){t.stopPropagation()}}},[a("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(" "),a("el-tooltip",{attrs:{placement:"bottom",effect:"light","popper-class":"task-tooltip tooltip-change-border"}},[a("div",{attrs:{slot:"content"},slot:"content"},[a("span",[t._v(t._s(t.data.name))])]),t._v(" "),a("span",{ref:"itemSpan",class:t.data.checked?"item-name-active":"item-name"},[t._v("\n "+t._s(t.data.name)+"\n ")])])],1),t._v(" "),a("div",{staticClass:"list-right"},[t.data.lableList?a("div",{staticClass:"tag-box"},[t.data.lableList.length<=2?t._l(t.data.lableList,function(e,s){return a("div",{key:s,staticClass:"item-label"},[a("span",{staticClass:"k-name",style:{background:e.color}},[t._v(t._s(e.name))])])}):[a("span",{staticClass:"k-name",style:{background:t.data.lableList[0].color}},[t._v(t._s(t.data.lableList[0].name))]),t._v(" "),a("span",{staticClass:"k-name",style:{background:t.data.lableList[1].color}},[t._v(t._s(t.data.lableList[1].name))]),t._v(" "),a("el-tooltip",{attrs:{placement:"top",effect:"light","popper-class":"tooltip-change-border task-tooltip"}},[a("div",{staticClass:"tooltip-content",staticStyle:{margin:"10px 10px 10px 0"},attrs:{slot:"content"},slot:"content"},t._l(t.data.lableList,function(e,s){return a("div",{key:s,staticClass:"item-label",staticStyle:{display:"inline-block","margin-right":"10px"}},[s>=2?a("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(" "),a("span",{staticClass:"color-label-more"},[a("i",[t._v("...")])])])]],2):t._e(),t._v(" "),a("div",{staticClass:"img-group"},[t.data.relationCount?a("div",{staticClass:"img-box"},[a("i",{staticClass:"wukong wukong-relevance"}),t._v(" "),a("span",[t._v(t._s(t.data.relationCount))])]):t._e(),t._v(" "),t.data.subdonecount>0||t.data.subcount>0?a("div",{staticClass:"img-box"},[a("i",{staticClass:"wukong wukong-sub-task"}),t._v(" "),a("span",[t._v(t._s(t.data.subdonecount)+"/"+t._s(t.data.subdonecount+t.data.subcount))])]):t._e(),t._v(" "),t.data.filecount?a("div",{staticClass:"img-box"},[a("i",{staticClass:"wukong wukong-file"}),t._v(" "),a("span",[t._v(t._s(t.data.filecount))])]):t._e(),t._v(" "),t.data.commentcount?a("div",{staticClass:"img-box"},[a("i",{staticClass:"wukong wukong-comment-task"}),t._v(" "),a("span",[t._v(t._s(t.data.commentcount))])]):t._e(),t._v(" "),t.data.stop_time?a("div",{staticClass:"img-box"},[a("i",{staticClass:"wukong wukong-time-task",style:{color:1!=t.data.is_end||t.data.checked?"#999":"red"}}),t._v(" "),a("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(" "),a("div",{staticClass:"item-own-box"},[t.data.main_user&&t.data.main_user.id?a("el-tooltip",{attrs:{placement:"bottom",effect:"light","popper-class":"tooltip-change-border"}},[a("div",{attrs:{slot:"content"},slot:"content"},[a("span",[t._v(t._s(t.data.main_user.realname))])]),t._v(" "),a("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);l.options.__file="TaskCell.vue";e.a=l.exports},"6w/r":function(t,e,a){},"7mY3":function(t,e,a){"use strict";var s=a("2f65");a.n(s).a},"9GgJ":function(t,e,a){"use strict";var s={name:"XrHeader",components:{},props:{iconClass:[String,Array],iconColor:String,label:String,showSearch:{type:Boolean,default:!1},searchIconType:{type:String,default:"text"},placeholder:{type:String,default:"请输入内容"},ftTop:{type:String,default:"15px"},content:[String,Number],inputAttr:{type:Object,default:function(){}}},data:function(){return{search:""}},computed:{},watch:{content:{handler:function(){this.search!=this.content&&(this.search=this.content)},immediate:!0}},mounted:function(){},beforeDestroy:function(){},methods:{inputChange:function(){this.$emit("update:content",this.search)},searchClick:function(){this.$emit("search",this.search)}}},i=(a("7mY3"),a("KHd+")),n=Object(i.a)(s,function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("flexbox",{staticClass:"xr-header"},[t.iconClass?a("div",{staticClass:"xr-header__icon",style:{backgroundColor:t.iconColor}},[a("i",{class:t.iconClass})]):t._e(),t._v(" "),a("div",{staticClass:"xr-header__label"},[t.$slots.label?t._t("label"):[t._v(t._s(t.label))]],2),t._v(" "),t.showSearch?a("el-input",t._b({staticClass:"xr-header__search",class:{"is-text":"text"===t.searchIconType},style:{"margin-top":t.ftTop},attrs:{placeholder:t.placeholder},on:{input:t.inputChange},nativeOn:{keyup:function(e){return"button"in e||!t._k(e.keyCode,"enter",13,e.key,"Enter")?t.searchClick(e):null}},model:{value:t.search,callback:function(e){t.search=e},expression:"search"}},"el-input",t.inputAttr,!1),["text"===t.searchIconType?a("el-button",{attrs:{slot:"append",type:"primary"},nativeOn:{click:function(e){return t.searchClick(e)}},slot:"append"},[t._v("搜索")]):a("el-button",{attrs:{slot:"append",icon:"el-icon-search"},nativeOn:{click:function(e){return t.searchClick(e)}},slot:"append"})],1):t._e(),t._v(" "),a("div",{staticClass:"xr-header__ft",style:{top:t.ftTop}},[t._t("ft")],2)],1)},[],!1,null,"acb6d756",null);n.options.__file="index.vue";e.a=n.exports},Vu4y:function(t,e,a){"use strict";var s=a("6w/r");a.n(s).a},jcXo:function(t,e,a){"use strict";a.r(e);var s=a("FyfS"),i=a.n(s),n=a("2X1c"),l=a("4dIA"),o=a("pKm3"),c=a("9GgJ"),r={components:{TaskDetail:o.a,TaskCell:l.a,XrHeader:c.a},data:function(){return{loading:!0,list:[],taskID:"",detailIndex:-1,taskDetailShow:!1}},created:function(){this.getList()},mounted:function(){document.getElementById("project-container").addEventListener("click",this.taskShowHandle,!1)},methods:{getList:function(){var t=this;Object(n.b)().then(function(e){t.list=e.data.list;var a=!0,s=!1,n=void 0;try{for(var l,o=i()(t.list);!(a=(l=o.next()).done);a=!0){var c=l.value;c.isDeleted=!0,5==c.status&&(c.checked=!0)}}catch(t){s=!0,n=t}finally{try{!a&&o.return&&o.return()}finally{if(s)throw n}}t.loading=!1}).catch(function(){t.loading=!0})},taskCellHandle:function(t){if("view"==t.type){var e=t.data;this.taskID=e.item.task_id,this.detailIndex=e.index,this.taskDetailShow=!0}},detailHandle:function(t){if(0==t.index||t.index)if("title-check"==t.type)this.$set(this.list[t.index],"checked",t.value);else if("delete"==t.type||"activate-task"==t.type||"recover-task"==t.type||"thorough-delete-task"==t.type)this.list.splice(t.index,1);else if("change-stop-time"==t.type){new Date(t.value).getTime()/1e3+86399>(new Date).getTime()/1e3?this.list[t.index].isEnd=!1:this.list[t.index].isEnd=!0,this.list[t.index].stopTime=t.value}else if("change-priority"==t.type)this.list[t.index].priority=t.value.id;else if("change-name"==t.type)this.list[t.index].name=t.value;else if("change-comments"==t.type){var e=this.list[t.index].commentCount;"add"==t.value?this.list[t.index].commentCount=e+1:this.list[t.index].commentCount=e-1}else"change-sub-task"==t.type?(this.list[t.index].childWCCount=t.value.subdonecount,this.list[t.index].childAllCount=t.value.allcount):"change-main-user"==t.type?this.list[t.index].mainUser=t.value:"change-label"==t.type&&(this.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,a=document.getElementsByClassName("item-list"),s=0;s<a.length;s++){if(a[s].contains(t.target)){e=!1;break}}this.taskDetailShow=!e}}}},d=(a("Vu4y"),a("KHd+")),u=Object(d.a)(r,function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"recycle"},[a("xr-header",{attrs:{"icon-class":"wk wk-bin","icon-color":"#fd5b4a",label:"回收站"}}),t._v(" "),a("div",{directives:[{name:"empty",rawName:"v-empty",value:0===t.list.length&&!t.loading,expression:"list.length === 0 && !loading"}],staticClass:"content"},[a("div",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticClass:"task-cells"},t._l(t.list,function(e,s){return a("task-cell",{key:s,staticClass:"item-list",attrs:{data:e,"data-index":s},on:{"on-handle":t.taskCellHandle}})}))]),t._v(" "),t.taskDetailShow?a("task-detail",{ref:"particulars",attrs:{id:t.taskID,"detail-index":t.detailIndex,"is-trash":""},on:{"on-handle":t.detailHandle,close:t.closeBtn}}):t._e()],1)},[],!1,null,"37989e86",null);u.options.__file="index.vue";e.default=u.exports},"wo/F":function(t,e,a){},zDjq:function(t,e,a){"use strict";var s=a("wo/F");a.n(s).a}}]); |