-- bug 面授选择课程

This commit is contained in:
yuping
2022-12-03 16:55:36 +08:00
parent 6f7001dd03
commit 6f3fc382d9
2 changed files with 194 additions and 143 deletions

View File

@@ -28,11 +28,11 @@
</div>
<span style="margin-right: 3px">选择课程</span>
</div>
<div class="btnbox" @click="showDrawerSelFacet">
<button class="xkbtn">
{{ chooseCourse == null ? "选择" : "修改" }}面授课
<div class="btnbox">
<button class="xkbtn" @click="showDrawerSelFacet">
{{ chooseCourse == null ? "选择" : chooseCourseName }}面授课
</button>
<div v-if="chooseCourse > 0">
<div v-if="chooseCourse">
<a-tag closable color="processing" @close="logC">
<span style="font-size:14px;line-height: 33px;">删除课程</span>
</a-tag>
@@ -41,7 +41,7 @@
</div>
<!-- 选择面授侧弹窗 -->
<div>
<sel-facet v-model:selfacetVisible="selfacetvisible" v-model:chooseCourse="chooseCourse"/>
<sel-facet v-model:selfacetVisible="selfacetvisible" v-model:chooseCourse="chooseCourse" v-model:chooseCourseName="chooseCourseName"/>
</div>
<!-- 选择面授侧弹窗 -->
</div>
@@ -371,6 +371,7 @@ export default {
chooseTime: [],
fileList: [],
chooseCourse: null, //选择的在线课程
chooseCourseName: null, //选择的在线课程
assessmentId: null,
EditTestId: null,
EditWorkId: null,
@@ -419,6 +420,7 @@ export default {
const logC = e => {
state.chooseCourse = null;
state.chooseCourseName = null;
console.log(e);
};
const logW = e => {

View File

@@ -134,7 +134,7 @@
</template>
<script>
//import { ApiFilled } from "@ant-design/icons-vue";
import { reactive, toRefs, ref } from "vue";
import {reactive, toRefs, ref, computed} from "vue";
// import { planList } from "../../api/indexTaskadd";
import {detail} from "../../api/indexCourse";
import {list} from "../../api/indexTaskadd";
@@ -196,6 +196,10 @@ export default {
type: Number,
default: null,
},
chooseCourseName: {
type: String,
default: null,
},
titleTag: {
type: Boolean,
default: false,
@@ -225,37 +229,53 @@ export default {
offcourse: null,
auditStatus: null,
name: null,
courseInfo:[]
});
const rowSelection = {
const rowSelection = computed(() => {
console.log(3333333333)
console.log(state.selectedRows)
return {
type: "radio",
selectedRowKeys: state.selectedRows,
onSelect: (selectedRows) => {
console.log('select')
state.chooseCourse = selectedRows.num;
state.chooseCourseName = selectedRows.name;
console.log(selectedRows, "==========", state.chooseCourse);
closeDrawer();
},
};
onChange: (selectedRows) => {
console.log('onChange')
state.selectedRows = selectedRows
},
}
})
const closeDrawer = () => {
ctx.emit("update:selfacetVisible", false);
ctx.emit("update:chooseCourse", state.chooseCourse);
state.chooseCourse && ctx.emit("update:chooseCourse", state.chooseCourse);
state.chooseCourseName && ctx.emit("update:chooseCourseName", state.chooseCourseName);
};
const afterVisibleChange = (bool) => {
if (bool) {
state.chooseCourse = props.chooseCourse;
state.chooseCourseName = props.chooseCourseName;
state.selectedRows = props.chooseCourse ? [props.chooseCourse] : [];
getClassList();
getFaceInfo();
// getFaceInfo();
}
};
// const showDrawerSelFacet = () => {
// state.selfacetvisible = true;
// };
const getFaceInfo =()=>{
detail({offcourseId:36}).then((res) => {
state.chooseCourse = res.data.data;
}).catch();
}
// const getFaceInfo = () => {
// detail({offcourseId: 36}).then((res) => {
// state.courseInfo = res.data.data;
// }).catch();
// }
//获取面授课列表
const getClassList = (obj) => {
let objn = obj || {
@@ -366,6 +386,7 @@ export default {
display: flex;
justify-content: space-between;
align-items: center;
.headerTitle {
font-size: 18px;
font-weight: 600;
@@ -374,6 +395,7 @@ export default {
margin-left: 24px;
}
}
.contentMain {
.main_items {
display: flex;
@@ -381,23 +403,28 @@ export default {
margin-bottom: 12px;
margin-top: 32px;
flex-wrap: wrap;
.mi_ipts {
display: flex;
margin-bottom: 20px;
.mii_ipt {
display: flex;
align-items: center;
margin-right: 24px;
.ipt_name {
white-space: nowrap;
}
}
}
.mi_btns {
display: flex;
margin-left: 38px;
margin-bottom: 20px;
cursor: pointer;
.btn {
padding: 0px 26px 0px 26px;
height: 38px;
@@ -408,9 +435,11 @@ export default {
justify-content: center;
margin-left: 14px;
flex-shrink: 0;
.search {
background-size: 100%;
}
.btnText {
font-size: 14px;
font-weight: 400;
@@ -418,48 +447,61 @@ export default {
margin-left: 5px;
}
}
.btn1 {
background: rgb(64, 158, 255);
.search {
width: 15px;
height: 17px;
background-image: url("@/assets/images/coursewareManage/search0.png");
}
.btnText {
color: rgb(255, 255, 255);
}
}
.btn2 {
background: rgb(255, 255, 255);
.search {
width: 15px;
height: 17px;
background-image: url("@/assets/images/coursewareManage/reset1.png");
}
.btnText {
color: rgb(64, 158, 255);
}
}
.btn1:hover {
background: rgb(255, 255, 255);
.search {
background-image: url("@/assets/images/courseManage/search1.png");
}
.btnText {
color: #388be1;
}
}
.btn2:hover {
background: rgba(64, 158, 255, 1);
.search {
background-image: url("@/assets/images/courseManage/reset0.png");
}
.btnText {
color: #ffffff;
}
}
}
}
.main_notice {
display: flex;
justify-content: space-between;
@@ -467,16 +509,20 @@ export default {
margin-bottom: 32px;
height: 40px;
background-color: #e9f6fe;
.mntc_left {
display: flex;
align-items: center;
.title {
color: rgba(0, 0, 0, 0.65);
margin-right: 17px;
}
.data {
color: #388be1;
}
.notice_icon {
width: 14px;
height: 14px;
@@ -486,6 +532,7 @@ export default {
background-size: 100% 100%;
}
}
.mntc_right {
cursor: pointer;
}
@@ -501,6 +548,7 @@ export default {
align-items: center;
justify-content: center;
box-shadow: 0px 1px 35px 0px rgba(118, 136, 166, 0.16);
.btn1 {
width: 100px;
height: 40px;
@@ -510,6 +558,7 @@ export default {
background-color: #fff;
cursor: pointer;
}
.btn2 {
cursor: pointer;
width: 100px;