mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-10 03:16:44 +08:00
-- bug 面授选择课程
This commit is contained in:
@@ -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 => {
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
<template>
|
||||
<a-drawer
|
||||
:visible="selfacetVisible"
|
||||
class="drawerStyle selfacetDrawer"
|
||||
width="80%"
|
||||
title="添加在线"
|
||||
placement="right"
|
||||
@after-visible-change="afterVisibleChange"
|
||||
:visible="selfacetVisible"
|
||||
class="drawerStyle selfacetDrawer"
|
||||
width="80%"
|
||||
title="添加在线"
|
||||
placement="right"
|
||||
@after-visible-change="afterVisibleChange"
|
||||
>
|
||||
<div class="drawerMain">
|
||||
<div class="header">
|
||||
<div class="headerTitle">选择面授</div>
|
||||
<img
|
||||
style="width: 29px; height: 29px; cursor: pointer"
|
||||
src="../../assets/images/basicinfo/close.png"
|
||||
@click="closeDrawer"
|
||||
style="width: 29px; height: 29px; cursor: pointer"
|
||||
src="../../assets/images/basicinfo/close.png"
|
||||
@click="closeDrawer"
|
||||
/>
|
||||
</div>
|
||||
<div class="contentMain">
|
||||
@@ -23,26 +23,26 @@
|
||||
<div class="ipt_name">课程信息:</div>
|
||||
<div class="fi_input">
|
||||
<a-input
|
||||
v-model:value="name"
|
||||
style="width: 240px; height: 40px; border-radius: 8px"
|
||||
placeholder="请输入项目名称"
|
||||
v-model:value="name"
|
||||
style="width: 240px; height: 40px; border-radius: 8px"
|
||||
placeholder="请输入项目名称"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mii_ipt">
|
||||
<div class="ipt_name">课程状态:</div>
|
||||
<div class="select fitems">
|
||||
<a-select
|
||||
v-model:value="auditStatus"
|
||||
dropdownClassName="dropdown-style"
|
||||
style="width: 200px"
|
||||
placeholder="请选择状态"
|
||||
:options="options1"
|
||||
allowClear
|
||||
showSearch
|
||||
>
|
||||
</a-select>
|
||||
</div>
|
||||
<a-select
|
||||
v-model:value="auditStatus"
|
||||
dropdownClassName="dropdown-style"
|
||||
style="width: 200px"
|
||||
placeholder="请选择状态"
|
||||
:options="options1"
|
||||
allowClear
|
||||
showSearch
|
||||
>
|
||||
</a-select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mi_btns">
|
||||
@@ -57,88 +57,88 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="main_notice">
|
||||
<div class="mntc_left">
|
||||
<div class="notice_icon"></div>
|
||||
<div v-if="offcourse == null">
|
||||
<div class="mntc_left">
|
||||
<div class="notice_icon"></div>
|
||||
<div v-if="offcourse == null">
|
||||
<span class="title"
|
||||
>已选择 <span class="data">0</span> 条</span
|
||||
>已选择 <span class="data">0</span> 条</span
|
||||
>
|
||||
</div>
|
||||
|
||||
<div v-else>
|
||||
</div>
|
||||
|
||||
<div v-else>
|
||||
<span class="title"
|
||||
>已选择 <span class="data">1</span> 条;</span
|
||||
>已选择 <span class="data">1</span> 条;</span
|
||||
>
|
||||
<span class="title"
|
||||
>课程编号:
|
||||
<span class="title"
|
||||
>课程编号:
|
||||
<span class="data">{{ offcourse.offcourseId }}</span>
|
||||
</span>
|
||||
<span class="title"
|
||||
>名称:
|
||||
<span class="title"
|
||||
>名称:
|
||||
<span class="data">{{
|
||||
offcourse.name
|
||||
}}</span>
|
||||
offcourse.name
|
||||
}}</span>
|
||||
</span>
|
||||
<span class="title"
|
||||
>分类:
|
||||
<span class="title"
|
||||
>分类:
|
||||
<span class="data">{{
|
||||
offcourse.categoryId
|
||||
}}</span>
|
||||
offcourse.categoryId
|
||||
}}</span>
|
||||
</span>
|
||||
<span class="title"
|
||||
>授课老师:
|
||||
<span class="title"
|
||||
>授课老师:
|
||||
<span class="data">{{
|
||||
offcourse.teacherId
|
||||
}}</span>
|
||||
offcourse.teacherId
|
||||
}}</span>
|
||||
</span>
|
||||
<span class="title"
|
||||
>创建人:
|
||||
<span class="title"
|
||||
>创建人:
|
||||
<span class="data">{{ offcourse.createUser }}</span>
|
||||
</span>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="main_table">
|
||||
|
||||
|
||||
<a-table
|
||||
class="ant-table-striped"
|
||||
:row-class-name="
|
||||
class="ant-table-striped"
|
||||
:row-class-name="
|
||||
(_record, index) => (index % 2 === 1 ? 'table-striped' : null)
|
||||
"
|
||||
:row-selection="rowSelection"
|
||||
:columns="columns1"
|
||||
:data-source="classTableData"
|
||||
:loading="tableDataTotal === -1 ? true : false"
|
||||
:pagination="false"
|
||||
:row-selection="rowSelection"
|
||||
:columns="columns1"
|
||||
:data-source="classTableData"
|
||||
:loading="tableDataTotal === -1 ? true : false"
|
||||
:pagination="false"
|
||||
/>
|
||||
<div class="pa">
|
||||
<a-pagination
|
||||
v-if="total > 10"
|
||||
showSizeChanger="true"
|
||||
showQuickJumper="true"
|
||||
hideOnSinglePage="true"
|
||||
:pageSize="pageSize"
|
||||
:current="currentPage"
|
||||
:total="tableDataTotal"
|
||||
class="pagination"
|
||||
@change="changePaginationStu"
|
||||
v-if="total > 10"
|
||||
showSizeChanger="true"
|
||||
showQuickJumper="true"
|
||||
hideOnSinglePage="true"
|
||||
:pageSize="pageSize"
|
||||
:current="currentPage"
|
||||
:total="tableDataTotal"
|
||||
class="pagination"
|
||||
@change="changePaginationStu"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</a-drawer>
|
||||
</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";
|
||||
import { toDate } from "../../api/method";
|
||||
import {list} from "../../api/indexTaskadd";
|
||||
import {toDate} from "../../api/method";
|
||||
|
||||
const columns1 = [
|
||||
{
|
||||
@@ -196,6 +196,10 @@ export default {
|
||||
type: Number,
|
||||
default: null,
|
||||
},
|
||||
chooseCourseName: {
|
||||
type: String,
|
||||
default: null,
|
||||
},
|
||||
titleTag: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
@@ -221,59 +225,75 @@ export default {
|
||||
valueContent: null, //内容分类
|
||||
selectedRows: [], //选择的数据
|
||||
selectedRowKeys: [],
|
||||
titleTag:false,
|
||||
offcourse:null,
|
||||
auditStatus:null,
|
||||
name:null,
|
||||
|
||||
titleTag: false,
|
||||
offcourse: null,
|
||||
auditStatus: null,
|
||||
name: null,
|
||||
courseInfo:[]
|
||||
|
||||
});
|
||||
const rowSelection = {
|
||||
type: "radio",
|
||||
onSelect: (selectedRows) => {
|
||||
state.chooseCourse=selectedRows.num;
|
||||
console.log(selectedRows,"==========",state.chooseCourse);
|
||||
closeDrawer();
|
||||
},
|
||||
};
|
||||
|
||||
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;
|
||||
getClassList();
|
||||
getFaceInfo();
|
||||
if (bool) {
|
||||
state.chooseCourse = props.chooseCourse;
|
||||
state.chooseCourseName = props.chooseCourseName;
|
||||
state.selectedRows = props.chooseCourse ? [props.chooseCourse] : [];
|
||||
getClassList();
|
||||
// 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 || {
|
||||
auditStatus:state.auditStatus,
|
||||
name:state.name,
|
||||
pageNo:state.currentPage,
|
||||
pageSize:state.pageSize
|
||||
auditStatus: state.auditStatus,
|
||||
name: state.name,
|
||||
pageNo: state.currentPage,
|
||||
pageSize: state.pageSize
|
||||
};
|
||||
list(objn)
|
||||
.then((res) => {
|
||||
console.log(res.data.data.rows);
|
||||
let result = res.data.data;
|
||||
state.tableDataTotal = result.total;
|
||||
getClassData(result.rows);
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log("获取列表失败", err.data);
|
||||
});
|
||||
.then((res) => {
|
||||
console.log(res.data.data.rows);
|
||||
let result = res.data.data;
|
||||
state.tableDataTotal = result.total;
|
||||
getClassData(result.rows);
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log("获取列表失败", err.data);
|
||||
});
|
||||
};
|
||||
|
||||
const getClassData = (tabledata) => {
|
||||
@@ -317,7 +337,7 @@ export default {
|
||||
console.log("改变了", value, option);
|
||||
console.log(state.valueContent);
|
||||
};
|
||||
//搜索
|
||||
//搜索
|
||||
const search = () => {
|
||||
//重新获取列表
|
||||
getClassList();
|
||||
@@ -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,78 +447,96 @@ 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;
|
||||
align-items: center;
|
||||
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;
|
||||
margin-right: 9px;
|
||||
margin-left: 9px;
|
||||
background-image: url(@/assets/images/coursewareManage/gan.png);
|
||||
background-size: 100% 100%;
|
||||
}
|
||||
}
|
||||
.mntc_right {
|
||||
cursor: pointer;
|
||||
}
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
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;
|
||||
margin-right: 9px;
|
||||
margin-left: 9px;
|
||||
background-image: url(@/assets/images/coursewareManage/gan.png);
|
||||
background-size: 100% 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.mntc_right {
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.main_btns {
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user