|
@@ -349,10 +349,10 @@ import {
|
|
|
updateTask,
|
|
|
auditTask,
|
|
|
splitTask,
|
|
|
- projectAuditConfigs, taskAuditConfigs, addTaskFeedback
|
|
|
+ projectAuditConfigs, taskAuditConfigs, addTaskFeedback, delTaskWithReason
|
|
|
} from "@/api/task/task";
|
|
|
import {getProjectTree, listProject} from "@/api/task/project";
|
|
|
-import {getDeptUserTree, getAuditUsers} from "@/api/system/user";
|
|
|
+import {getDeptUserTree, getAuditUsers, resetUserPwd} from "@/api/system/user";
|
|
|
import Treeselect from "@riophae/vue-treeselect";
|
|
|
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
|
|
import DeptUserTree from "@/components/DeptUserTree"
|
|
@@ -662,14 +662,20 @@ export default {
|
|
|
/** 审核按钮操作 */
|
|
|
handleAudit(row) {
|
|
|
getTask(row.id).then(res => {
|
|
|
- this.detailForm = res.data;
|
|
|
- this.auditForm = {
|
|
|
- taskId: row.id,
|
|
|
- auditResult: undefined,
|
|
|
- value: undefined,
|
|
|
- auditOpinion: undefined
|
|
|
+ if (res.data.ancestorsTask && res.data.ancestorsTask.length === 0) {
|
|
|
+ this.detailForm = res.data;
|
|
|
+ this.auditForm = {
|
|
|
+ taskId: row.id,
|
|
|
+ auditResult: undefined,
|
|
|
+ value: undefined,
|
|
|
+ auditOpinion: undefined
|
|
|
+ }
|
|
|
+ this.auditOpen = true;
|
|
|
+ } else {
|
|
|
+ this.detailForm = res.data;
|
|
|
+ this.detailOpen = true;
|
|
|
+ this.detailTitle = "任务详情";
|
|
|
}
|
|
|
- this.auditOpen = true;
|
|
|
})
|
|
|
},
|
|
|
/** 分解按钮操作 */
|
|
@@ -823,24 +829,54 @@ export default {
|
|
|
|
|
|
/** 终止按钮操作 */
|
|
|
handleUpdate(row) {
|
|
|
- this.$confirm('是否确认终止任务编号为"' + row.id + '"的任务?').then(() => {
|
|
|
- return updateTask({id: row.id, status: '5'});
|
|
|
- }).then(() => {
|
|
|
- this.getList();
|
|
|
- this.$message.success("终止成功");
|
|
|
+ let title = '您将终止任务编号为' + row.id + '的数据项'
|
|
|
+ this.$prompt("请输入终止原因", title, {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ closeOnClickModal: false,
|
|
|
+ inputType: 'textarea',
|
|
|
+ inputValidator: (val) => {
|
|
|
+ if (!val) {
|
|
|
+ return "终止原因不能为空"
|
|
|
+ }
|
|
|
+ if (val.length > 500) {
|
|
|
+ return "终止原因不能超过500字符"
|
|
|
+ }
|
|
|
+ },
|
|
|
+ inputErrorMessage: "终止原因不能为空"
|
|
|
+ }).then(({value}) => {
|
|
|
+ updateTask({id: row.id, status: '5', remark: value}).then(response => {
|
|
|
+ this.$message.success("终止成功");
|
|
|
+ this.getList()
|
|
|
+ });
|
|
|
}).catch(() => {
|
|
|
});
|
|
|
},
|
|
|
/** 删除按钮操作 */
|
|
|
handleDelete(row) {
|
|
|
- this.$confirm('是否确认删除任务编号为"' + row.id + '"的数据项?').then(() => {
|
|
|
- return delTask(row.id);
|
|
|
- }).then(() => {
|
|
|
- this.getList();
|
|
|
- this.$message.success("删除成功");
|
|
|
+ let title = '您将删除任务编号为' + row.id + '的数据项'
|
|
|
+ this.$prompt("请输入删除原因", title, {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ closeOnClickModal: false,
|
|
|
+ inputType: 'textarea',
|
|
|
+ inputValidator: (val) => {
|
|
|
+ if (!val) {
|
|
|
+ return "删除原因不能为空"
|
|
|
+ }
|
|
|
+ if (val.length > 500) {
|
|
|
+ return "删除原因不能超过500字符"
|
|
|
+ }
|
|
|
+ },
|
|
|
+ inputErrorMessage: "删除原因不能为空"
|
|
|
+ }).then(({value}) => {
|
|
|
+ delTaskWithReason({id: row.id, remark: value}).then(response => {
|
|
|
+ this.$message.success("删除成功");
|
|
|
+ this.getList()
|
|
|
+ });
|
|
|
}).catch(() => {
|
|
|
});
|
|
|
- }
|
|
|
+ },
|
|
|
|
|
|
}
|
|
|
};
|