| | |
| | | let TaskHandCompletedBtn = this.buttons.find(x => x.value == 'TaskHandCompleted'); |
| | | if (TaskHandCompletedBtn) { |
| | | TaskHandCompletedBtn.onClick = function () { |
| | | this.$confirm("是否确认完成任务","手动任务完成警告",{ |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | center: true, |
| | | }).then(() => { |
| | | let rows = this.$refs.table.getSelected(); |
| | | if (rows.length == 0) return this.$error("请选择数据!"); |
| | | this.$confirm("是否确定要手动完成,手动完成后请删除WCS系统中的任务!", "提示", { |
| | | // iconClass:"el-icon-success",//el-icon-remove自定义图标样式 |
| | | confirmButtonText: "确认",//确认按钮文字更换 |
| | | cancelButtonText: "取消",//取消按钮文字更换 |
| | | // cancelBtn:"取消",//取消按钮文字更换 |
| | | showClose: true,//是否显示右上角关闭按钮 |
| | | type: "warning",//提示类型 success:成功/info:信息/warning:警告/error:报错 |
| | | }).then(() => { |
| | | if (rows.length > 1) return this.$error("请选择一条数据!"); |
| | | var param = rows[0].taskNum; |
| | | this.http |
| | | .get("api/Task/TaskCompleted?taskNum=" + param, "数据处理中...") |
| | | .post("api/Task/TaskCompleted?taskNum="+param, "数据处理中...") |
| | | .then((x) => { |
| | | if (x.status) { |
| | | this.$Message.success('任务手动完成成功.'); |
| | | this.$Message.success('任务手动完成'); |
| | | this.refresh(); |
| | | } else { |
| | | return this.$error(x.message); |
| | | } |
| | | }); |
| | | }) |
| | | |
| | | }); |
| | | } |
| | | } |
| | | |