fix --在线课对接

This commit is contained in:
yuping
2023-02-20 15:46:05 +08:00
parent b08ebff03a
commit cf237363ab
2 changed files with 12 additions and 8 deletions

View File

@@ -17,7 +17,7 @@
</div> </div>
<div> <div>
<div class="contentMain" style="padding:20px"> <div class="contentMain" style="padding:20px">
<CreateOnline> <CreateOnline ref="onlineRef">
<a-button type="primary" style="border-radius: 4px">{{ <a-button type="primary" style="border-radius: 4px">{{
taskIndex === -1 ? '选择/新建课程' : '重新选择' taskIndex === -1 ? '选择/新建课程' : '重新选择'
}} }}
@@ -50,6 +50,7 @@ const props = defineProps({
taskList: [] taskList: []
}) })
const visible = ref(false) const visible = ref(false)
const onlineRef = ref(false)
const taskIndex = ref(-1); const taskIndex = ref(-1);
const rowSelectKeys = ref([]); const rowSelectKeys = ref([]);
const selectsData = ref([]); const selectsData = ref([]);
@@ -73,15 +74,15 @@ const columns = ref([
}, },
{ {
title: "创建人", title: "创建人",
dataIndex: "authorName", dataIndex: "sysCreateBy",
key: "authorName", key: "sysCreateBy",
width: "100px", width: "100px",
align: "center", align: "center",
}, },
{ {
title: "时长", title: "时长",
dataIndex: "authorName", dataIndex: "studyTime",
key: "authorName", key: "studyTime",
width: "80px", width: "80px",
align: "center", align: "center",
}, },
@@ -130,9 +131,11 @@ function confirm() {
closeDrawer() closeDrawer()
} }
function selectCourse({id, name}) { function selectCourse(row) {
rowSelectKeys.value = [id] console.log(row)
selectsData.value = [{id, name}] rowSelectKeys.value = [row.id]
selectsData.value = [row]
onlineRef.value.closeModal()
} }
function openDrawer(i, row) { function openDrawer(i, row) {

View File

@@ -34,6 +34,7 @@ function openModal() {
function closeModal() { function closeModal() {
visible.value = false visible.value = false
} }
defineExpose({closeModal})
</script> </script>
<style lang="scss"> <style lang="scss">