fix:项目抽屉添加多条情况已测试成功,项目任务大纲获取列表参数修改 请求成功但无数据

This commit is contained in:
Ggysh-7
2022-11-24 19:32:18 +08:00
parent c2e43611c8
commit 103604c653
9 changed files with 154 additions and 120 deletions

View File

@@ -1189,51 +1189,9 @@ export default {
},
],
//项目抽屉、列表参数
drawertableData: [
{
key: 1,
parentId:1,
name: '123',
manager:'afssfa',
children:[
{
key: 5,
parentId:1,
name: '123',
manager:'afssfa',
},
]
},
{
key: 2,
parentId:2,
name: '123',
manager:'afssfa',
children:[
{
key: 7,
parentId:1,
name: '123',
manager:'afssfa',
children:[
{
key: 9,
parentId:1,
name: '123',
manager:'afssfa',
},
]
},
]
},
{
key: 3,
parentId:3,
name: '123',
manager:'afssfa',
},
],
drawertableData: [],
selectedProjRowKeys:[],
projListData:[],
currentPage: 1,
tableDataTotal: 0,
pageSize: 10,
@@ -1444,6 +1402,7 @@ export default {
state.addevalvisible = true;
state.EditEvalId = id;
state.routerTaskId = eleId;
console.log('id我编辑的测评id',id);
};
//评估抽屉
const showDrawerAddInvist = (id, eleId) => {
@@ -1950,13 +1909,8 @@ export default {
//项目抽屉用的
const onProjSelectChange = (selectedRowKeys,selectedRows) => {
state.selectedProjRowKeys = selectedRowKeys
// if(selectedRowKeys.length>1){
// return
// }
state.projId = selectedRows[0].projectId
state.projName = selectedRows[0].name
console.log(state.projId,'------------------');
// console.log(selectedRowKeys,selectedRows);
state.projListData = selectedRows
console.log(selectedRows,state.projListData);
}
const getTableDate = (data) => {
let array = []
@@ -2012,17 +1966,19 @@ export default {
};
//添加关卡项目
const updateTask = () => {
RouterEditTask({
state.projListData.map((value)=>{
console.log('--------',value);
RouterEditTask({
duration: 0,
flag: true,
chapterId: state.isactive,
courseId: Number(state.projId),
name: state.projName,
chapterId: Number(state.isactive),
courseId: Number(value.projectId),
name: value.name,
routerId: state.routerId,
routerTaskId: state.routerTaskId,
type: 13,
})
.then(( ) => {
.then(() => {
message.success(`${state.editproj ? "编辑" : "新增"}关卡任务成功`);
// ctx.emit("changeData", false);
leaveProjDrawer()
@@ -2032,6 +1988,7 @@ export default {
message.destroy()
message.error("添加关卡任务失败")
});
})
};
//显示切换模式抽屉