webpackJsonp([50],{"3k71":function(t,e){},dXSd:function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=a("Dd8w"),n=a.n(i),l=a("NYxO"),o=a("mtWM"),s=a.n(o),r=a("uBmv"),c={created:function(){this.getData()},data:function(){return{tab:"toClaim",tableData:[],name:"",multipleMode:!1,loading:!1,taskForm:[],taskFormData:{},dialogVisible:!1,selectedTaskId:null,toClaim:[],todo:[]}},computed:n()({},Object(l.b)(["userInfo"]),{selection:function(){return this.$refs.table.selection.map(function(t){return t.id})}}),methods:{pageSizeChange:function(t){this.pageSize=t,this.getData()},currentPageChange:function(t){this.currentPage=t,this.getData()},getData:function(){var t=this;s.a.post("/rest/query/tasks",{candidateUser:this.userInfo.id}).then(function(e){t.toClaim=e.data.data}),s.a.post("/rest/query/tasks",{assignee:this.userInfo.id}).then(function(e){t.todo=e.data.data})},handle:function(t){this.$router.push({name:"CompleteTaskDynamic",query:{id:t.id}})},claim:function(t){var e=this;s.a.post("/rest/runtime/tasks/"+t.id,{action:"claim",assignee:this.userInfo.id}).then(function(t){e.$message.success("签收成功"),e.getData()}).catch(function(t){e.$message.error("签收失败")})},completeTask:function(){var t=this;this.$refs.taskForm.validate(function(e){e&&(t.loading=!0,s.a.post("rest/form/form-data",{taskId:t.selectedTaskId,properties:t.$refs.taskForm.getData()}).then(function(e){t.loading=!1,t.dialogVisible=!1,t.$message.success("成功"),t.getData()}).catch(function(e){t.loading=!1,t.$message.error("失败")}))})},toggleMultipleMode:function(t){this.multipleMode=t,t||this.$refs.table.clearSelection()},operation1:function(){this.$notify({title:"提示",message:this.selection})},operation2:function(){this.$message("操作2")}},components:{DynamicForm:r.a}},u={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("el-tabs",{attrs:{type:"card"},model:{value:t.tab,callback:function(e){t.tab=e},expression:"tab"}},[a("el-tab-pane",{attrs:{label:"待签收",name:"toClaim"}},[a("el-table",{ref:"table",attrs:{data:t.toClaim,"row-key":"id"}},[t.multipleMode?a("el-table-column",{attrs:{align:"center",type:"selection","min-width":"50"}}):t._e(),t._v(" "),a("el-table-column",{attrs:{prop:"id",label:"id",width:"150"}}),t._v(" "),a("el-table-column",{attrs:{prop:"name",label:"名称"}}),t._v(" "),a("el-table-column",{attrs:{prop:"createTime",label:"创建时间",formatter:t.datetimeFormatter}}),t._v(" "),a("el-table-column",{attrs:{label:"操作",align:"center",width:"100"},scopedSlots:t._u([{key:"default",fn:function(e){var i=e.row;return[i.assignee?a("el-button",{attrs:{type:"primary",size:"mini",plain:""},on:{click:function(e){t.handle(i)}}},[t._v("办理")]):a("el-button",{attrs:{type:"primary",size:"mini",plain:""},on:{click:function(e){t.claim(i)}}},[t._v("签收")])]}}])})],1)],1),t._v(" "),a("el-tab-pane",{attrs:{label:"待办",name:"todo"}},[a("el-table",{ref:"table",attrs:{data:t.todo,"row-key":"id"}},[t.multipleMode?a("el-table-column",{attrs:{align:"center",type:"selection","min-width":"50"}}):t._e(),t._v(" "),a("el-table-column",{attrs:{prop:"id",label:"id",width:"150"}}),t._v(" "),a("el-table-column",{attrs:{prop:"name",label:"名称"}}),t._v(" "),a("el-table-column",{attrs:{prop:"createTime",label:"创建时间",formatter:t.datetimeFormatter}}),t._v(" "),a("el-table-column",{attrs:{label:"操作",align:"center",width:"100"},scopedSlots:t._u([{key:"default",fn:function(e){var i=e.row;return[i.assignee?a("el-button",{attrs:{type:"primary",size:"mini",plain:""},on:{click:function(e){t.handle(i)}}},[t._v("办理")]):a("el-button",{attrs:{type:"primary",size:"mini",plain:""},on:{click:function(e){t.claim(i)}}},[t._v("签收")])]}}])})],1)],1)],1),t._v(" "),a("el-dialog",{attrs:{visible:t.dialogVisible,title:"办理"},on:{"update:visible":function(e){t.dialogVisible=e}}},[a("dynamic-form",{ref:"taskForm",attrs:{formProps:t.taskForm},model:{value:t.taskFormData,callback:function(e){t.taskFormData=e},expression:"taskFormData"}}),t._v(" "),a("div",{attrs:{slot:"footer"},slot:"footer"},[a("el-button",{attrs:{size:"small"},on:{click:function(e){t.dialogVisible=!1}}},[t._v("取消")]),t._v(" "),a("el-button",{attrs:{type:"primary",loading:t.loading,size:"small"},on:{click:t.completeTask}},[t._v("确定")])],1)],1)],1)},staticRenderFns:[]};var m=a("VU/8")(c,u,!1,function(t){a("3k71")},"data-v-0be39be8",null);e.default=m.exports}});
//# sourceMappingURL=50.5ac8aceb8df0ff9cef53.js.map