12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430 |
- <template>
- <div class="pb_content" style="height: auto; width: 94%; margin: 10px auto;background: unset;">
- <div style="width:100%;padding:0 21px;background:#fff;border-radius: 5px;box-sizing: border-box;">
- <div class="pb_head top">
- <div>
- <span>{{ orgArray.indexOf(org) != -1 || oidArray.indexOf(oid) != -1 ? "师生项目" : "项目管理" }}</span>
- <!-- <span class="subClick" @click="
- goTo('/works?userid=' + userid + '&oid=' + oid + '&org=' + org)
- ">评价管理</span> -->
- </div>
- <div class="student_button">
- <!-- <el-button type="primary" class="bgColor" @click="openCourse">协同编辑</el-button> -->
- <!-- <el-button type="primary" class="bgColor" @click="goToCourse()">添加项目</el-button> -->
- <button class="r_pub_button_course" @click="goToCourse()">
- <span>添加项目</span>
- </button>
- </div>
- </div>
- <div class="reBox">
- <div class="reTop">
- <!-- <div>分类筛选</div> -->
- <div class="reTopCh">
- <el-select v-model="groupA" @change="search" v-if="role != '1'">
- <el-option value="3" label="全部项目"></el-option>
- <el-option value="0" label="我的项目"></el-option>
- <el-option value="1" label="协同项目"></el-option>
- <el-option value="2" label="他人项目" v-if="oid != '1c3b9def-8fbe-11ed-b13d-005056b86db5'"></el-option>
- </el-select>
- <el-select v-model="groupA" @change="search" v-else>
- <el-option value="4" label="全部项目"></el-option>
- </el-select>
- <div class="searchI">
- <!-- @click="getCourse" -->
- <div class="search">
- <img src="../../assets/icon/search.png" alt="" />
- </div>
- <input class="sInput" type="text" placeholder="请输入关键字" v-model="courseName" @input="searchCourse()" />
- </div>
- <el-button type="primary" class="bgColor" style="margin-left: 10px;" @click="clear">重置</el-button>
- </div>
- </div>
- <div class="choose">
- <!-- <div class="student_search">
- <span>项目筛选</span>
- <el-select v-model="groupA" @change="search">
- <el-option value="0" label="我的项目"></el-option>
- <el-option value="1" label="他人项目"></el-option>
- </el-select>
- </div> -->
- <div class="all_choose" v-for="(item, index) in CourseType[0]" :key="index"
- v-if="CourseTypeJson[item.id].length">
- <span>{{ item.name }}</span>
- <el-select v-model="courseTypeId[item.id]" placeholder="请选择" @change="getTypeName">
- <el-option label="全部" value="1">全部</el-option>
- <el-option v-for="item1 in CourseTypeJson[item.id]" :key="item1.id" :label="item1.name" :value="item1.id">
- </el-option>
- </el-select>
- </div>
- <!-- <div @click="clear" class="clear" v-if="CourseType.length">重置</div> -->
- </div>
- </div>
- </div>
- <div class="pb_content_body" style="height: 100%;width: 100%;background: #e6eaf0;margin: 0 auto;">
- <div class="student_head" v-if="false">
- <div class="choose">
- <div class="student_search">
- <span>项目筛选</span>
- <el-select v-model="groupA" @change="search" v-if="role != '1'">
- <el-option value="3" label="全部项目"></el-option>
- <el-option value="0" label="我的项目"></el-option>
- <el-option value="1" label="协同项目"></el-option>
- <el-option value="2" label="他人项目" v-if="oid != '1c3b9def-8fbe-11ed-b13d-005056b86db5'"></el-option>
- </el-select>
- <el-select v-model="groupA" @change="search" v-else>
- <el-option value="4" label="全部项目"></el-option>
- </el-select>
- </div>
- <div class="all_choose" v-for="(item, index) in CourseType[0]" :key="index"
- v-if="CourseTypeJson[item.id].length">
- <span v-if="CourseTypeJson[item.id].length">{{ item.name }}</span>
- <el-select v-if="CourseTypeJson[item.id].length" v-model="courseTypeId[item.id]" placeholder="请选择"
- @change="getTypeName">
- <el-option label="全部" value="1">全部</el-option>
- <el-option v-for="item1 in CourseTypeJson[item.id]" :key="item1.id" :label="item1.name" :value="item1.id">
- </el-option>
- </el-select>
- </div>
- <div @click="clear" class="clear" v-if="CourseType.length">重置</div>
- </div>
- <div class="student_right">
- <div class="head_left">
- <el-input v-model="courseName" class="student_input" placeholder="请输入项目名称"></el-input>
- <el-button class="course_button" @click="searchCourse">查询</el-button>
- </div>
- </div>
- </div>
- <div class="student_table" v-loading="isLoading">
- <div class="course_box">
- <div class="out_box" v-for="(item, index) in course" :key="index">
- <div class="myCourse" v-if="item.userid == userid">
- 我的项目
- </div>
- <div class="myCourse" style="background:#4187f0" v-else-if="!item.course_teacher ||
- (item.course_teacher &&
- item.course_teacher.indexOf(userid) == -1)">
- 他人项目
- </div>
- <div class="xtCourse" v-else>协同项目</div>
- <div class="tup">
- <img :src="item.cover != null && item.cover != ''
- ? JSON.parse(item.cover).length > 0
- ? JSON.parse(item.cover)[0].url
- : mr
- : mr
- " alt />
- </div>
- <div class="bottom_box">
- <div> <el-tooltip :content="item.title" popper-class="text_tooltip" placement="top" effect="dark">
- <span>{{ item.title }}</span>
- </el-tooltip></div>
- <div class="kc_t">
- <span>{{ item.uname }}</span>
- </div>
- <div class="kc_time">
- <span style="color: #4b4b4b">创建日期:</span>{{ item.time }}
- </div>
- <div class="kc_time">
- <span style="color: #4b4b4b">修改日期:</span>{{ item.utime }}
- </div>
- </div>
- <div class="three_bottom">
- <div @click="goToCourse2(item.courseId)" v-if="((item.userid == userid) ||
- (item.course_teacher &&
- item.course_teacher.indexOf(userid) !== -1) || role == '1')">编辑</div>
- <div @click="get(item.courseId)">预览</div>
- <!-- 项目进展 -->
- <div @click="getA(item.courseId)">进展</div>
- <!-- <div @click="jump(item.courseId)">评论</div> -->
- <div @click="copyCourse(item.courseId)">复制</div>
- <div v-if="(item.userid == userid || role == '1')" @click="deleteCourse(item.courseId)">
- 删除
- </div>
- </div>
- </div>
- <div class="course_empty" v-if="course.length == 0">暂无数据</div>
- </div>
- </div>
- </div>
- <div class="student_page">
- <el-pagination background layout="prev, pager, next" :page-size="pageSize" :total="total"
- v-if="page && course.length" style="padding-bottom: 20px" @current-change="handleCurrentChange"></el-pagination>
- </div>
- <el-dialog :visible.sync="dialogVisible1" size="tiny">
- <img width="100%" :src="dialogImageUrl" alt />
- </el-dialog>
- <el-dialog title="查看提问" :visible.sync="dialogVisible" :append-to-body="true" width="750px" :before-close="handleClose"
- class="dialog_diy">
- <div>
- <div class="a_addBox">
- <CourseProblem :problemCourse="problemCourse"></CourseProblem>
- </div>
- </div>
- <span slot="footer" class="dialog-footer">
- <el-button @click="dialogVisible = false">关 闭</el-button>
- </span>
- </el-dialog>
- <el-dialog title="查看协同项目" :visible.sync="dialogVisibleCourse" :append-to-body="true" width="850px"
- :before-close="handleClose" class="dialog_diy">
- <div class="ct_box">
- <div class="out_box" v-for="(item, index) in courseTeam" :key="index" style="margin-left: 15px">
- <div class="tup">
- <img :src="item.cover != null && item.cover != ''
- ? JSON.parse(item.cover).length > 0
- ? JSON.parse(item.cover)[0].url
- : mr
- : mr
- " alt />
- </div>
- <div class="bottom_box">
- <div>{{ item.title }}</div>
- <div class="kc_t">创建人:{{ item.uname }}</div>
- <div class="kc_time">{{ item.time }}</div>
- </div>
- <div class="three_bottom">
- <!-- <div @click="jump(item.courseId)">查看内容</div> -->
- <div @click="
- goTo(
- '/studentAddCourse?cid=' +
- item.courseId +
- '&userid=' +
- userid +
- '&oid=' +
- oid +
- '&org=' +
- org +
- '&role=' +
- role
- )
- ">
- 编辑
- </div>
- </div>
- </div>
- <div class="course_empty" v-if="courseTeam.length == 0">暂无数据</div>
- </div>
- <span slot="footer" class="dialog-footer">
- <el-button @click="dialogVisibleCourse = false">关 闭</el-button>
- </span>
- </el-dialog>
- </div>
- </template>
- <script>
- import "../../common/aws-sdk-2.235.1.min";
- import EditorBar from "../../components/tools/wangEnduit";
- import CourseProblem from "./components/courseProblem";
- export default {
- components: { EditorBar, CourseProblem },
- data() {
- return {
- itemCount: 1,
- courseTitle: "",
- courseText: "",
- courseTime: "",
- isLoading: false,
- fileList: [],
- fileList1: [],
- homeworkList: [{ name: "" }],
- formLabelWidth: "100px",
- dialogVisible: false,
- dialogVisible1: false,
- dialogVisibleCourse: false,
- dialogImageUrl: "",
- group: "",
- userid: this.$route.query.userid,
- oid: this.$route.query.oid,
- org: this.$route.query.org,
- role: this.$route.query.role,
- orgArray: ["150e3120-9195-11ed-b13d-005056b86db5"],
- oidArray: [],
- Juri: "",
- groupList: [],
- JuriList: [],
- page: 1,
- total: 0,
- pageSize: 20,
- tableData: [],
- now: "",
- courseDetail: {},
- addCourse: {},
- groupA: "3",
- classX: "",
- course: [],
- courseName: "",
- mr: require("../../assets/icon/kc1.png"),
- CourseType: [],
- CourseTypeJson: {},
- courseTypeId: {},
- courseTypeSon: [],
- isChoose: 0,
- problemCourse: null, //查看提问的项目
- courseTeam: [],
- };
- },
- methods: {
- change(val) {
- console.log(val);
- },
- time() {
- if (!this.now) {
- this.now = new Date().getTime();
- return true;
- } else {
- let time = new Date().getTime();
- if (time - this.now > 3000) {
- this.now = time;
- return true;
- } else {
- return false;
- }
- }
- },
- addHomeworkBox() {
- this.homeworkList.push({ name: "" });
- this.itemCount++;
- },
- reduceHomeworkBox() {
- var a = this.homeworkList;
- a.splice(a.length - 1);
- this.itemCount--;
- },
- goTo(path) {
- this.$router.push(path);
- },
- goToCourse(courseId) {
- if (courseId) {
- this.$router.push(
- "/studentAddCourse?cid=" +
- courseId +
- "&userid=" +
- this.userid +
- "&oid=" +
- this.oid +
- "&org=" +
- this.org +
- "&role=" +
- this.role
- );
- } else {
- this.$router.push(
- "/studentAddCourse?userid=" +
- this.userid +
- "&oid=" +
- this.oid +
- "&org=" +
- this.org +
- "&role=" +
- this.role
- );
- }
- // this.$router.push(path);
- },
- goToCourse2(cid) {
- this.$router.push(
- "/studentAddCourse?cid=" +
- cid +
- "&userid=" +
- this.userid +
- "&oid=" +
- this.oid +
- "&org=" +
- this.org +
- "&type=2" +
- "&role=" +
- this.role
- );
- },
- tableRowClassName({ row, rowIndex }) {
- if ((rowIndex + 1) % 2 === 0) {
- return "even_row";
- } else {
- return "";
- }
- },
- jump(cid) {
- // window.open(
- // "//pbl.cocorobo.cn/pbl-student-table/dist/#/courseDetail?courseId=" +
- // cid +
- // "&userid=" +
- // this.userid
- // );
- window.parent.postMessage({ cid: cid, screenType: "2s" }, "*");
- },
- get(cid) {
- window.parent.postMessage({ cid: cid, screenType: "3s" }, "*");
- },
- getA(cid) {
- this.$router.push("/courseProgress?cid=" + cid + "&userid=" +
- this.userid +
- "&oid=" +
- this.oid +
- "&org=" +
- this.org)
- },
- handle_remove(file, fileList) {
- var _tmp = this.fileList;
- for (var i = 0, len = _tmp.length; i < len; i++) {
- if (_tmp[i].uid == file.uid) {
- _tmp.splice(i, 1);
- break;
- }
- this.fileList = _tmp;
- }
- },
- handle_remove1(file, fileList) {
- var _tmp = this.fileList1;
- for (var i = 0, len = _tmp.length; i < len; i++) {
- if (_tmp[i].uid == file.uid) {
- _tmp.splice(i, 1);
- break;
- }
- this.fileList1 = _tmp;
- }
- },
- handleCurrentChange(val) {
- // console.log(`当前页: ${val}`);
- this.page = val;
- this.getCourse();
- },
- init() { },
- handleClose(done) {
- done();
- },
- handleRemove(file, fileList) {
- console.log(file, fileList);
- },
- handlePictureCardPreview(file) {
- this.dialogImageUrl = file.url;
- this.dialogVisible1 = true;
- },
- onExceed() {
- this.$message.error("项目海报仅支持上传一张,请删除后再进行上传");
- },
- //uuid生成
- guid() {
- return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(
- /[xy]/g,
- function (c) {
- var r = (Math.random() * 16) | 0,
- v = c == "x" ? r : (r & 0x3) | 0x8;
- return v.toString(16);
- }
- );
- },
- time() {
- if (!this.now) {
- this.now = new Date().getTime();
- return true;
- } else {
- let time = new Date().getTime();
- if (time - this.now > 3000) {
- this.now = time;
- return true;
- } else {
- return false;
- }
- }
- },
- searchCourse() {
- this.page = 1;
- this.getCourse();
- },
- clear() {
- if (this.CourseType.length) {
- for (var i = 0; i < this.CourseType[0].length; i++) {
- this.courseTypeId[this.CourseType[0][i].id] = "";
- }
- }
- this.courseName = ''
- this.getCourse();
- },
- getCourse() {
- var typeE = [];
- var typea, typeb, typec, typed, typef;
- if (this.isChoose == 1) {
- for (var i = 0; i < this.CourseType[0].length; i++) {
- if (this.courseTypeId[this.CourseType[0][i].id] == "1") {
- typeE.push(this.CourseType[0][i].id);
- } else if (this.courseTypeId[this.CourseType[0][i].id] != "") {
- if (this.CourseType[0][i].name == "年级") {
- typea = this.courseTypeId[this.CourseType[0][i].id];
- } else if (this.CourseType[0][i].name == "专栏") {
- typeb = this.courseTypeId[this.CourseType[0][i].id];
- } else if (this.CourseType[0][i].name == "栏目") {
- typeb = this.courseTypeId[this.CourseType[0][i].id];
- } else if (this.CourseType[0][i].name == "学院") {
- typeb = this.courseTypeId[this.CourseType[0][i].id];
- } else if (this.CourseType[0][i].name == "新技能") {
- typec = this.courseTypeId[this.CourseType[0][i].id];
- } else if (this.CourseType[0][i].name == "赛道") {
- typed = this.courseTypeId[this.CourseType[0][i].id];
- } else if (this.CourseType[0][i].name == "学科") {
- typed = this.courseTypeId[this.CourseType[0][i].id];
- } else if (this.CourseType[0][i].name == "项目类型") {
- typed = this.courseTypeId[this.CourseType[0][i].id];
- } else if (this.CourseType[0][i].name == "主题") {
- typef = this.courseTypeId[this.CourseType[0][i].id];
- }
- this.courseTypeSon.push(
- this.courseTypeId[this.CourseType[0][i].id]
- );
- }
- }
- }
- this.isLoading = true;
- let params = {
- type: this.groupA,
- uid: this.userid,
- oid: this.oid,
- org: this.org,
- typea: typea != undefined ? typea : "",
- typeb: typeb != undefined ? typeb : "",
- typec: typec != undefined ? typec : "",
- typed: typed != undefined ? typed : "",
- typef: typef != undefined ? typef : "",
- typeE: typeE.join(","),
- cu: "",
- cn: this.courseName,
- page: this.page,
- pageSize: this.pageSize,
- };
- this.ajax
- .get(this.$store.state.api + "selectStudentCourseNew222", params)
- .then((res) => {
- this.isLoading = false;
- this.total = res.data[0].length > 0 ? res.data[0][0].num : 0;
- this.course = res.data[0];
- })
- .catch((err) => {
- console.error(err);
- });
- },
- getTypeName() {
- this.$forceUpdate();
- this.page = 1;
- this.isChoose = 1;
- this.getCourse();
- },
- // searchCourse() {
- // this.isLoading = true;
- // let params = {
- // cu: "",
- // cn: this.courseName,
- // page: this.page,
- // };
- // this.ajax
- // .get(this.$store.state.api + "searchCourse", params)
- // .then((res) => {
- // this.isLoading = false;
- // this.total = res.data[0].length > 0 ? res.data[0][0].num : 0;
- // this.course = res.data[0];
- // })
- // .catch((err) => {
- // this.isLoading = false;
- // console.error(err);
- // });
- // },
- deleteCourse(cid) {
- // if (this.time()) {
- this.$confirm("确定删除此项目吗?", "提示", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning",
- })
- .then(() => {
- this.isLoading = true;
- let params = {
- cid: cid,
- };
- this.ajax
- .get(this.$store.state.api + "deleteStudentCourse", params)
- .then((res) => {
- this.isLoading = false;
- this.$message.success("删除成功");
- this.getCourse();
- })
- .catch((err) => {
- console.error(err);
- });
- })
- .catch(() => {
- loading.close();
- this.isLoading = false;
- return;
- });
- // }
- },
- selectAllType() {
- let params = {
- org: this.org && this.org != "" ? this.org : "",
- oid: this.oid && this.oid != "" ? this.oid : "",
- };
- this.ajax
- .get(this.$store.state.api + "selectAllTypeS", params)
- .then((res) => {
- this.CourseType = res.data;
- for (var i = 0; i < res.data[0].length; i++) {
- if (res.data[0][i].id == "34629ce3-d02f-11ec-8c78-005056b86db5") {
- res.data[0][i].name = "赛道";
- } else if (res.data[0][i].id == "2f8beae3-d030-11ec-8c78-005056b86db5") {
- res.data[0][i].name = "主题";
- } else if (res.data[0][i].id == "34628934-d02f-11ec-8c78-005056b86db5") {
- res.data[0][i].name = "年级";
- }
- if (!this.cid) {
- this.courseTypeId[res.data[0][i].id] = '';
- }
- if (!this.CourseTypeJson[res.data[0][i].id]) {
- this.CourseTypeJson[res.data[0][i].id] = [];
- }
- if (this.oid == "1c3b9def-8fbe-11ed-b13d-005056b86db5") {
- if (res.data[0][i].id == "34629ce3-d02f-11ec-8c78-005056b86db5") {
- this.CourseType[0][i].name = "项目类型";
- }
- } else if (this.org == '150e3120-9195-11ed-b13d-005056b86db5') {
- } else {
- if (res.data[0][i].name == "赛道") {
- this.CourseType[0][i].name = "学科";
- }
- }
- if (res.data[2].length == 0 && res.data[3].length == 0) {
- // for (var j = 0; j < res.data[1].length; j++) {
- // if (res.data[0][i].id == res.data[1][j].pid) {
- // this.CourseTypeJson[res.data[0][i].id].push(res.data[1][j]); // 去除公共分类
- // }
- // }
- if (this.org == '150e3120-9195-11ed-b13d-005056b86db5') {
- for (var j = 0; j < res.data[1].length; j++) {
- if (res.data[0][i].id == res.data[1][j].pid) {
- this.CourseTypeJson[res.data[0][i].id].push(res.data[1][j]); // 去除公共分类
- }
- }
- } else {
- // this.CourseType = []
- for (var j = 0; j < res.data[1].length; j++) {
- if (res.data[0][i].id == res.data[1][j].pid) {
- this.CourseTypeJson[res.data[0][i].id].push(res.data[1][j]); // 去除公共分类
- }
- }
- }
- } else {
- if (res.data[2].length > 0) {
- for (var j = 0; j < res.data[2].length; j++) {
- if (res.data[0][i].id == res.data[2][j].pid) {
- this.CourseTypeJson[res.data[0][i].id].push(res.data[2][j]); // 去除公共分类
- }
- }
- }
- if (res.data[3].length > 0) {
- for (var j = 0; j < res.data[3].length; j++) {
- if (res.data[0][i].id == res.data[3][j].pid) {
- this.CourseTypeJson[res.data[0][i].id].push(res.data[3][j]); // 去除公共分类
- }
- }
- }
- }
- }
- })
- .catch((err) => {
- console.error(err);
- });
- },
- selectType() {
- this.ajax
- .get(this.$store.state.api + "selectStudentType")
- .then((res) => {
- this.CourseType = res.data;
- for (var i = 0; i < res.data[0].length; i++) {
- if (!this.cid) {
- this.courseTypeId[res.data[0][i].id] = "";
- }
- if (this.oid == "69893dca-1d47-11ed-8c78-005056b86db5") {
- if (res.data[0][i].name == "栏目") {
- this.CourseType[0][i].name = "主题";
- }
- }
- for (var j = 0; j < res.data[1].length; j++) {
- if (res.data[0][i].id == res.data[1][j].pid) {
- if (!this.CourseTypeJson[res.data[0][i].id]) {
- this.CourseTypeJson[res.data[0][i].id] = [];
- }
- this.CourseTypeJson[res.data[0][i].id].push(res.data[1][j]); //去除公共分类
- }
- }
- }
- this.selectTypeByOid();
- this.selectTypeByOrg();
- })
- .catch((err) => {
- console.error(err);
- });
- },
- selectTypeByOid() {
- let params = {
- oid: this.oid,
- };
- this.ajax
- .get(this.$store.state.api + "selectStudentTypeByOid", params)
- .then((res) => {
- for (var i = 0; i < res.data[0].length; i++) {
- for (var j = 0; j < res.data[1].length; j++) {
- if (res.data[0][i].id == res.data[1][j].pid) {
- if (!this.CourseTypeJson[res.data[0][i].id]) {
- this.CourseTypeJson[res.data[0][i].id] = [];
- }
- this.CourseTypeJson[res.data[0][i].id].push(res.data[1][j]);
- }
- }
- }
- this.$forceUpdate();
- })
- .catch((err) => {
- console.error(err);
- });
- },
- selectTypeByOrg() {
- let params = {
- oid: this.org,
- };
- this.ajax
- .get(this.$store.state.api + "selectStudentTypeByOid", params)
- .then((res) => {
- for (var i = 0; i < res.data[0].length; i++) {
- for (var j = 0; j < res.data[1].length; j++) {
- if (res.data[0][i].id == res.data[1][j].pid) {
- if (!this.CourseTypeJson[res.data[0][i].id]) {
- this.CourseTypeJson[res.data[0][i].id] = [];
- }
- this.CourseTypeJson[res.data[0][i].id].push(res.data[1][j]);
- }
- }
- }
- this.$forceUpdate();
- })
- .catch((err) => {
- console.error(err);
- });
- },
- openCourse() {
- this.dialogVisibleCourse = true;
- this.getTeamCourse();
- },
- getTeamCourse() {
- let params = {
- uid: this.userid,
- oid: this.oid,
- };
- this.ajax
- .get(this.$store.state.api + "selectCourseTeam", params)
- .then((res) => {
- this.courseTeam = res.data[0];
- })
- .catch((err) => {
- console.error(err);
- });
- },
- search() {
- this.page = 1;
- this.getCourse();
- },
- checkProblem(res) {
- this.problemCourse = res;
- this.dialogVisible = true;
- },
- copyCourse(cid) {
- let params = [{
- cid: cid,
- uid: this.userid
- }]
- this.ajax
- .post(this.$store.state.api + "copySCourse", params)
- .then((res) => {
- this.page = 1
- if (this.role == "1") {
- this.groupA = "4";
- } else {
- this.groupA = "3";
- }
- this.$message.success("复制成功")
- this.clear()
- })
- .catch((err) => {
- console.error(err);
- });
- }
- },
- created() {
- if (this.role == '1') {
- this.groupA = '4'
- }
- this.page = 1;
- this.selectAllType();
- this.getCourse();
- },
- };
- </script>
- <style scoped>
- @media screen and (max-width: 1380px) {
- .out_box {
- width: calc(100% / 4 - (15px * 3) / 4) !important;
- }
- .out_box:nth-child(5n) {
- margin-right: 15px !important;
- }
- .out_box:nth-child(4n) {
- margin-right: 0 !important;
- }
- }
- @media screen and (max-width: 1080px) {
- .out_box {
- width: calc(100% / 3 - (15px * 2) / 3) !important;
- }
- .out_box:nth-child(5n) {
- margin-right: 15px !important;
- }
- .out_box:nth-child(4n) {
- margin-right: 15px !important;
- }
- .out_box:nth-child(3n) {
- margin-right: 0 !important;
- }
- }
- .dialog_diy>>>.el-dialog__header {
- background: #3d67bc !important;
- padding: 15px 20px;
- }
- .dialog_diy>>>.el-dialog__title {
- color: #fff;
- }
- .dialog_diy>>>.el-dialog__headerbtn {
- top: 19px;
- }
- .dialog_diy>>>.el-dialog__headerbtn .el-dialog__close {
- color: #fff;
- }
- .dialog_diy>>>.el-dialog__headerbtn .el-dialog__close:hover {
- color: #fff;
- }
- .student_head>>>.el-button--primary {
- background-color: #2268bc;
- }
- .xls_button {
- font-size: 14px;
- cursor: pointer;
- text-decoration: underline;
- color: rgb(34, 104, 188);
- }
- .student_head {
- display: flex;
- justify-content: space-between;
- align-items: baseline;
- flex-direction: row;
- flex-wrap: wrap;
- padding: 0 5px;
- box-sizing: border-box;
- width: 100%;
- }
- .top {
- display: flex;
- justify-content: space-between;
- width: 100% !important;
- box-sizing: border-box;
- margin: 0px auto;
- padding: 10px 5px;
- height: 54px;
- }
- .bgColor {
- background: #0061FF;
- }
- .student_search {
- display: flex;
- align-items: center;
- /* width: calc(100% / 3); */
- width: 190px;
- }
- .student_search span {
- margin: 0 10px 0 0;
- min-width: 65px;
- }
- .student_button {
- display: flex;
- overflow: hidden;
- height: 40px;
- }
- .upload-demo {
- display: flex;
- flex-direction: column;
- align-items: end;
- /* position: relative; */
- width: 100px;
- overflow: hidden;
- }
- .student_table {
- padding: 20px 0 0;
- height: 100%;
- /* overflow: auto; */
- min-height: 360px;
- }
- .student_empty {
- display: flex;
- justify-content: center;
- align-items: center;
- }
- .el-table>>>.even_row {
- background-color: #f1f1f1;
- }
- .time {
- font-size: 13px;
- color: #999;
- }
- .course_button {
- padding: 10px 20px;
- }
- .course_button_box {
- display: flex;
- margin-top: 5px;
- justify-content: space-between;
- }
- .course_rate {
- margin-top: 5px;
- }
- .course_view {
- display: flex;
- align-items: center;
- margin: 5px 0 0 0;
- }
- .course_view i {
- background-image: url("../../assets/liulan.png");
- width: 25px;
- height: 25px;
- background-size: 100% 100%;
- /* margin-top: 1px; */
- line-height: 25px;
- vertical-align: text-top;
- background-repeat: no-repeat;
- }
- .image {
- width: 100%;
- height: 150px;
- display: block;
- }
- .course_box {
- display: flex;
- flex-wrap: wrap;
- }
- .student_page {
- width: 100%;
- margin: 0 auto;
- }
- .course_create_box {
- font-size: 18px;
- }
- .course_name {
- margin-top: 10px;
- }
- .course_name span {
- margin-bottom: 10px;
- display: block;
- }
- .homework_box {
- display: flex;
- align-items: center;
- flex-wrap: wrap;
- }
- .course_homework {
- width: 130px;
- display: flex;
- justify-content: center;
- flex-direction: column;
- align-items: center;
- margin: 0 10px 10px 0;
- }
- .course_type {
- margin-top: 10px;
- display: flex;
- }
- .course_type1 span {
- margin-bottom: 10px;
- display: block;
- }
- .course_type2 {
- margin-left: 20px;
- }
- .course_type2 span {
- margin-bottom: 10px;
- display: block;
- }
- .course_empty {
- color: rgb(110, 110, 110);
- width: 100%;
- height: 100%;
- display: flex;
- align-items: center;
- justify-content: center;
- }
- .el_cards>>>.el-card__body {
- height: 100%;
- }
- .courseBtnBox {
- display: flex;
- flex-direction: column;
- justify-content: space-between;
- height: calc(100% - 170px);
- padding: 10px;
- }
- .wordUpload {
- display: flex;
- }
- .wordUpload>.buttonUp {
- margin-right: 5px;
- }
- .out_box {
- display: flex;
- flex-direction: column;
- flex-wrap: nowrap;
- width: calc(100% / 5 - (15px * 4) / 5);
- /* width: 280px; */
- background: #fff;
- margin-right: 15px;
- /* border: 1px solid #ccc; */
- height: fit-content;
- box-sizing: border-box;
- border-radius: 0px 0px 5px 5px;
- /* overflow: hidden; */
- margin-bottom: 15px;
- position: relative;
- border-radius: 8px;
- box-sizing: border-box;
- overflow: hidden;
- border: 1px solid #3682fc00;
- }
- .out_box:hover {
- border: 1px solid #3681FC;
- }
- .out_box:nth-child(5n) {
- margin-right: 0;
- }
- .bottom_box {
- display: flex;
- padding: 10px;
- flex-direction: column;
- box-sizing: border-box;
- height: 121px;
- flex-wrap: nowrap;
- justify-content: space-evenly;
- }
- .bottom_box>div:nth-child(1) {
- width: 100%;
- /* overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- font-weight: bold; */
- display: flex;
- align-items: center;
- justify-content: space-between;
- }
- .bottom_box>div:nth-child(1)>span:nth-child(1) {
- max-width: 100%;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- font-weight: bold;
- }
- .bottom_box>div:nth-child(1)>span:nth-child(2) {
- min-width: fit-content;
- font-size: 14px;
- color: #8c8c8c;
- }
- .tup {
- width: 100%;
- height: 180px;
- margin: 0 auto;
- overflow: hidden;
- display: flex;
- align-items: center;
- padding: 10px;
- box-sizing: border-box;
- }
- .tup>img {
- width: 100%;
- height: 100%;
- object-fit: cover;
- }
- .kc_time {
- margin-top: 8px;
- font-size: 14px;
- color: #717C8D;
- }
- .kc_time+.kc_time {
- margin-top: 0;
- }
- .kc_t {
- margin-top: 5px;
- width: 100%;
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- display: flex;
- align-items: center;
- justify-content: space-between;
- }
- .kc_t>span:nth-child(1) {
- max-width: 100%;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- }
- .kc_t>span:nth-child(2) {
- min-width: fit-content;
- font-size: 14px;
- color: #8c8c8c;
- }
- .three_bottom {
- display: flex;
- flex-direction: row;
- justify-content: space-around;
- height: 45px;
- align-items: center;
- background: #fff;
- font-size: 14px;
- border-top: 1px solid #ddd;
- box-sizing: border-box;
- }
- .three_bottom>div {
- cursor: pointer;
- width: 100%;
- text-align: center;
- }
- .three_bottom>div+div {
- border-left: 1px solid #ddd;
- }
- .three_bottom>div:hover {
- color: #3681FC;
- font-weight: bold;
- }
- .three_bottom .deleteB {
- color: #E96E6E;
- }
- .three_bottom .deleteB:hover {
- color: #E96E6E;
- font-weight: bold;
- }
- .head_left {
- display: flex;
- }
- .student_input>>>.el-input__inner {
- height: 40px;
- width: 190px;
- font-size: 13px;
- padding: 0 10px;
- }
- .course_button {
- color: #fff;
- background: #0061FF;
- width: 75px;
- height: 40px;
- padding: 0 !important;
- font-size: 12px;
- line-height: 40px;
- }
- .all_choose {
- margin: 12px 10px 10px 0;
- height: 20%;
- display: flex;
- flex-direction: row;
- align-items: center;
- /* max-width: calc(100% / 3 - 50px); */
- width: fit-content;
- }
- .all_choose>span {
- min-width: 75px;
- display: block;
- margin-right: 10px;
- text-align-last: justify;
- }
- .choose {
- display: flex;
- flex-direction: row;
- flex-wrap: wrap;
- align-content: space-between;
- height: 100%;
- justify-content: flex-start;
- width: 100%;
- /* min-width: 868px; */
- align-items: center;
- }
- /* .choose>div:nth-child(2) {
- margin-left: 1%;
- width: 32.33333%;
- }
- .choose>div:nth-child(3) {
- margin-left: 1%;
- width: 32.33333%;
- }
- .choose>div:nth-child(5) {
- margin: 5px 0 0 1%;
- } */
- .choose>div:nth-child(4)>span {
- /* width: 74px !important;
- min-width: 74px; */
- }
- .choose>div:nth-child(4)>>>.el-select {
- /* width: 217.5px;
- min-width: 215.06px; */
- }
- .clear {
- width: 70px;
- max-width: 70px;
- height: 35px;
- background: #2268bc;
- color: #fff;
- text-align: center;
- border-radius: 5px;
- line-height: 35px;
- cursor: pointer;
- /* margin-left: 20px; */
- }
- .ct_box {
- height: 500px;
- overflow: auto;
- display: flex;
- flex-wrap: wrap;
- }
- .myCourse {
- position: absolute;
- background: #3c3c3c;
- width: 70px;
- height: 30px;
- border-radius: 5px;
- color: #fff;
- font-size: 14px;
- text-align: center;
- line-height: 30px;
- top: 5px;
- left: 5px;
- }
- .xtCourse {
- position: absolute;
- background: #0061FF;
- width: 70px;
- height: 30px;
- border-radius: 5px;
- color: #fff;
- font-size: 14px;
- text-align: center;
- line-height: 30px;
- top: 5px;
- left: 5px;
- }
- .subClick {
- font-size: 16px;
- cursor: pointer;
- margin-left: 10px;
- /* color: #ab582f; */
- color: #409eff;
- }
- .more {
- position: relative;
- }
- .more:hover div {
- display: block;
- color: #000;
- }
- .more div {
- position: absolute;
- bottom: 0px;
- transform: translate(-50%, 100%);
- background: #f5f4f4;
- padding: 10px 20px;
- z-index: 99;
- width: 40px;
- border-radius: 5px;
- box-shadow: 0 0 3px 3px #80808020;
- display: none;
- }
- .more div>span+span {
- margin-top: 10px;
- }
- .more div>span {
- display: block;
- width: 100%;
- text-align: center;
- }
- .more div>span:hover {
- color: #79a2ff;
- }
- .line {
- width: 100%;
- height: 15px;
- background: #e6eaf0;
- }
- .reBox {
- width: 100%;
- /* padding-left: 20px; */
- margin: 0 auto;
- box-sizing: border-box;
- overflow: hidden;
- padding: 10px 15px 0;
- }
- .reTop {
- padding: 0 0 5px;
- /* padding: 20px 0 0 0; */
- /* border-bottom: 1px solid #eee; */
- display: flex;
- flex-direction: row;
- flex-wrap: nowrap;
- align-items: center;
- justify-content: space-between;
- }
- .reTop>div:nth-child(1) {
- font-weight: bold;
- /* width: 40px; */
- /* border-bottom: 1px solid #205cc6; */
- /* padding-bottom: 20px; */
- color: #205cc6;
- /* font-size: 20px; */
- }
- .reTop .reTopCh {
- display: flex;
- }
- .reTop .searchI {
- display: flex;
- flex-direction: row;
- align-items: center;
- border: 1px solid #ccced3;
- width: 250px;
- border-radius: 8px;
- padding: 5px 0;
- /* margin-bottom: 10px; */
- background: #fafafa;
- margin: 0 0 0 10px;
- }
- .search {
- width: 20px;
- padding: 0 5px;
- display: flex;
- align-items: center;
- }
- .search>img {
- width: 100%;
- height: 100%;
- }
- .sInput {
- border: none;
- width: 85%;
- background: #fafafa;
- }
- .sInput:focus-visible {
- outline: none;
- }</style>
|