feat:修改移动任务

This commit is contained in:
岳佳鑫
2022-11-07 14:29:51 +08:00
parent a99de61fba
commit 9db6624197
2 changed files with 27 additions and 37 deletions

View File

@@ -1683,14 +1683,9 @@ export default {
} }
//移动任务到关卡 //移动任务到关卡
const moveTask = () => { const moveTask = () => {
let arr = state.selectRow;
console.log("选择的行信息",arr);
console.log("选择的关卡id",state.isactive);
arr.map( value => {
console.log("value:",value);
let obj = { let obj = {
chapterId: state.isactive, chapterId: state.isactive,
routerTaskIdList: [value], routerTaskIdList: state.selectRow,
} }
api api
.moveTask(obj) .moveTask(obj)
@@ -1702,8 +1697,7 @@ export default {
.catch((err) => { .catch((err) => {
console.log("移动失败",err); console.log("移动失败",err);
}) })
}) }
};
return { return {
...toRefs(state), ...toRefs(state),
tableDataFunc, tableDataFunc,

View File

@@ -1715,15 +1715,10 @@ export default {
}; };
//移动任务到阶段 //移动任务到阶段
const moveTask = () => { const moveTask = () => {
let arr = state.selectRow; let obj ={
console.log("选择的行信息", arr);
arr.map((value) => {
//console.log("value:", value);
let obj = {
stageId: state.chooseStageId, stageId: state.chooseStageId,
projectTaskId: [value], projectTaskId: state.selectRow,
} }
console.log("routerTaskIdList",obj.routerTaskIdList);
apimove apimove
.moveTask(obj) .moveTask(obj)
.then((res) => { .then((res) => {
@@ -1734,16 +1729,16 @@ export default {
}) })
.catch((err) => { .catch((err) => {
console.log("移动失败", err); console.log("移动失败", err);
}); })
}); }
};
//批量删除 //批量删除
const deleteTaskAll = () => { const deleteTaskAll = () => {
//let arr = state.selectRow; let arr = state.selectRow;
console.log("selectRow数组",state.selectRow); console.log("选择的行信息", arr);
arr.map((value) => {
let obj = { let obj = {
projectTaskIds: state.selectRow, projectTaskIds: value,
} };
api api
.deleteTask(obj) .deleteTask(obj)
.then((res) => { .then((res) => {
@@ -1755,6 +1750,7 @@ export default {
.catch((err) => { .catch((err) => {
console.log(err); console.log(err);
}); });
})
} }
const onSelectChange = (selectedRowKeys) => { const onSelectChange = (selectedRowKeys) => {
console.log("selectedRowKeys changed: ", selectedRowKeys); console.log("selectedRowKeys changed: ", selectedRowKeys);