|  |  |  | 
|---|
|  |  |  | <el-dropdown @command="(command)=>{handleCommand(command, scope.row)}"> | 
|---|
|  |  |  | <el-button icon="el-icon-more" size="mini" type="primary"></el-button> | 
|---|
|  |  |  | <el-dropdown-menu slot="dropdown"> | 
|---|
|  |  |  | <el-dropdown-item command="resubmitTheTask">重新上报任务完结</el-dropdown-item> | 
|---|
|  |  |  | <el-dropdown-item command="showCommand">查看指令</el-dropdown-item> | 
|---|
|  |  |  | </el-dropdown-menu> | 
|---|
|  |  |  | </el-dropdown> | 
|---|
|  |  |  | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | handleCommand(command, row) { | 
|---|
|  |  |  | switch (command) { | 
|---|
|  |  |  |  | 
|---|
|  |  |  | case "resubmitTheTask": | 
|---|
|  |  |  | //重新上报任务完结 | 
|---|
|  |  |  | this.resubmitTheTask(row) | 
|---|
|  |  |  | break; | 
|---|
|  |  |  | case "showCommand": | 
|---|
|  |  |  | //查看指令 | 
|---|
|  |  |  | this.showCommand(row) | 
|---|
|  |  |  | 
|---|
|  |  |  | success: function(layero, index) {} | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | resubmitTheTask(row){ | 
|---|
|  |  |  | //重新上报任务完结 | 
|---|
|  |  |  | let that = this | 
|---|
|  |  |  | $.ajax({ | 
|---|
|  |  |  | url: baseUrl + "/taskWrkLog/resubmitTheTask/auth", | 
|---|
|  |  |  | headers: { | 
|---|
|  |  |  | 'token': localStorage.getItem('token') | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | data: { | 
|---|
|  |  |  | taskNo: row.taskNo | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | method: 'POST', | 
|---|
|  |  |  | success: function(res) { | 
|---|
|  |  |  | if (res.code == 200) { | 
|---|
|  |  |  | that.$message({ | 
|---|
|  |  |  | message: "取消成功", | 
|---|
|  |  |  | type: 'success' | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | that.getTableData() | 
|---|
|  |  |  | } else if (res.code === 403) { | 
|---|
|  |  |  | top.location.href = baseUrl + "/"; | 
|---|
|  |  |  | } else { | 
|---|
|  |  |  | that.$message({ | 
|---|
|  |  |  | message: res.msg, | 
|---|
|  |  |  | type: 'error' | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | </script> | 
|---|