fix:修改在线和案例编辑回显问题

This commit is contained in:
wyx
2022-12-05 21:43:41 +08:00
parent 5adc818ed0
commit d370576c23
2 changed files with 15 additions and 18 deletions

View File

@@ -79,24 +79,7 @@
<div class="main_table">
<!-- 编辑的表格 -->
<div v-if="edit">
<div
v-if="choicecourse"
class="main_btns"
style="justify-content: flex-start"
>
<div
class="btn2"
style="
display: flex;
justify-content: center;
align-items: center;
"
@click="ChoiceCourse"
>
选择在线课
</div>
</div>
<div v-else>
<div>
<a-table
class="ant-table-striped"
:row-class-name="
@@ -338,6 +321,7 @@ export default {
};
const handelChangePage = (page) => {
state.currentPage = page;
state.selectedRowKeys = []
getAllOnlineText();
};
const getTableDate = (tableData) => {
@@ -381,6 +365,11 @@ export default {
state.tableDataTotal = res.data.data.count;
if (res.status === 200) {
console.log("获取在线课列表数据", res);
for(let i=0;i<res.data.data.list.length;i++){
if(Number(res.data.data.list[i].onlineClassesId) == props.EditOnlineId){
state.selectedRowKeys = [i+1]
}
}
getTableDate(arr);
}
})