| 1 |
- (window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-7a24"],{"+M58":function(t,e,s){"use strict";s.r(e);var i={props:["project_id","keyval","fitterList","priority","allState","is_share"],data:function(){return{infoArr:[],addStatus:!1,listName:"",infoData:[],currentLong:"",current:0,currentStatus:!1,currentChildStatus:!0}},mounted:function(){window.addEventListener("mousewheel",this.debounce(this.handleScroll,30),!0)},methods:{childMouse:function(t){this.currentChildStatus=t},debounce:function(t,e){var s=void 0;return function(){var i=this,a=arguments;s&&clearTimeout(s),s=setTimeout(function(){t.apply(i,a)},e)}},handleScroll:function(t){if(this.currentStatus&&this.currentChildStatus){var e=t.deltaY>0?"down":"up";this.currentLong==t.deltaY?this.changeSel(e):this.currentLong=t.deltaY}},changeSel:function(t){"down"==t?(this.current,this.$refs.clasVoW.scrollLeft+=150):(this.current,this.$refs.clasVoW.scrollLeft-=150)},mouseIn:function(t){this.currentStatus=!0},mouseLeave:function(){this.currentStatus=!1},closeDialogMethod:function(){this.$store.commit("hideTask"),this.getData()},getData:function(t,e){var s=this,i={project_id:this.project_id};(t||this.fitterList)&&(i.search=t||this.fitterList),(e||this.keyval)&&(i.keyword=e||this.keyval),$http.pc_post("plugin/project-manager/projectDetail/task",i,"加载中").then(function(t){t.result?s.infoData=t.data:s.$message({type:"error",message:t.msg})},function(t){s.$message({type:"error",message:t.msg})})},updateMethod:function(t){"delete"==t.status?this.deleteUpdeta(t.id):"rech"==t.status?this.rechristen(t.id,t.title):"pige"==t.status?this.pigeonholeMethod(t.id):"update"==t.status&&this.getData()},pigeonholeMethod:function(t){var e=this;$http.pc_post("plugin/project-manager/projectDetail/archiveCompleteTask",{list_id:t,project_id:this.project_id}).then(function(t){t.result?e.getData():e.$message({type:"error",message:t.msg})},function(t){e.$message({type:"error",message:t.msg})})},rechristen:function(t,e){var s=this;$http.pc_method("PUT","plugin/project-manager/projectList/update",{id:t,project_id:this.project_id,list_name:e}).then(function(t){t.result?s.getData():s.$message({type:"error",message:t.msg})},function(t){s.$message({type:"error",message:t.msg})})},deleteUpdeta:function(t){var e=this;$http.pc_method("DELETE","plugin/project-manager/projectList/destroy",{id:t,project_id:this.project_id}).then(function(t){t.result?(e.getData(),e.$message({type:"success",message:t.msg})):e.$message({type:"error",message:t.msg})},function(t){e.$message({type:"error",message:t.msg})})},childEventMove:function(t){var e=this,s=t.ind,i=this.infoData.list[s].task_list,a=this.infoData.list[s].id,o=[];i.forEach(function(t){o.push(t.id)}),$http.pc_post("plugin/project-manager/projectDetail/moveSort",{task_ids:o,project_group_id:a,project_id:this.project_id}).then(function(t){t.result||e.$message({type:"error",message:t.msg})},function(t){e.$message({type:"error",message:t.msg})})},tapSave:function(t){console.log(t);var e={list_name:t.listName,project_id:this.project_id,sort_type:"Befor"==t.addStatus?0:1,list_id:t.listId};this.addListPost(e)},saveAddList:function(){var t={list_name:this.listName,sort_type:0,project_id:this.project_id,list_id:this.infoData.list[this.infoData.list.length-1].id};this.addListPost(t)},addListPost:function(t){var e=this;$http.pc_post("plugin/project-manager/projectList/store",t).then(function(t){t.result?(e.$message({type:"success",message:t.msg}),e.getData(),e.cancelTap()):e.$message({type:"error",message:t.msg})},function(t){e.$message({type:"error",message:t.msg})})},cancelTap:function(){this.listName="",this.addStatus=!1}},watch:{taskDialogVisible:function(t,e){t||this.closeDialogMethod()}},computed:{taskDialogVisible:{get:function(){return this.$store.getters.taskDialogVisible},set:function(){console.log("1")}}},components:{workList:s("sw4z").a}},a=(s("hZCq"),s("KHd+")),o=Object(a.a)(i,function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{attrs:{id:"task"}},[s("div",{ref:"clasVoW",staticClass:"clasVo",on:{mouseover:t.mouseIn,mouseleave:t.mouseLeave}},[t._l(t.infoData.list,function(e,i){return[s("workList",{key:i,attrs:{datas:e,index:i,minType:"project",is_share:t.is_share,priority:t.priority,allState:t.allState,projectId:t.project_id},on:{addSaveList:t.tapSave,childEvent:t.childEventMove,updateArr:t.updateMethod,childOverIn:t.childMouse}})]}),t._v(" "),t.addStatus?s("div",{staticClass:"editAdd"},[s("el-input",{attrs:{type:"textarea",rows:2,placeholder:"列表名",maxlength:"200"},model:{value:t.listName,callback:function(e){t.listName=e},expression:"listName"}}),t._v(" "),s("div",{staticClass:"tapbtnbox"},[s("div",{staticClass:"cle",on:{click:t.cancelTap}},[t._v("取消")]),t._v(" "),s("div",{staticClass:"btn",on:{click:t.saveAddList}},[t._v("保存")])])],1):t._e(),t._v(" "),t.is_share?t._e():s("div",{staticClass:"addlist",on:{click:function(e){t.addStatus=!0}}},[s("i",{staticClass:"el-icon-plus"}),t._v("\n 新建列表\n ")])],2)])},[],!1,null,"5675c500",null);o.options.__file="task.vue";e.default=o.exports},JFV8:function(t,e,s){},hZCq:function(t,e,s){"use strict";var i=s("JFV8");s.n(i).a}}]);
|