index.vue 33 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139
  1. <template>
  2. <div class="pb_content" style="height: auto">
  3. <div class="pb_head top">
  4. <div>
  5. <span>评测中心</span>
  6. </div>
  7. <!-- <div class="student_button">
  8. <el-button type="primary" class="bgColor" @click="goToCourse()">新建评测</el-button>
  9. </div> -->
  10. </div>
  11. <div class="pb_content_body" style="height: 100%">
  12. <div class="student_head">
  13. <div class="choose">
  14. <div class="all_choose" v-for="(item, index) in CourseType[0]" :key="index">
  15. <span v-if="CourseTypeJson[item.id].length">{{ item.name }}</span>
  16. <el-select v-if="CourseTypeJson[item.id].length" v-model="courseTypeId[item.id]" placeholder="请选择"
  17. @change="getTypeName">
  18. <el-option label="全部" value="1">全部</el-option>
  19. <el-option v-for="item1 in CourseTypeJson[item.id]" :key="item1.id" :label="item1.name"
  20. :value="item1.id">
  21. </el-option>
  22. </el-select>
  23. </div>
  24. <div class="student_search">
  25. <span>所有者</span>
  26. <el-select v-model="groupA" @change="search">
  27. <el-option value="0" label="我的"></el-option>
  28. <!-- <el-option value="4" label="全部"></el-option> -->
  29. <!-- <el-option value="2" label="他人"
  30. v-if="oid != '1c3b9def-8fbe-11ed-b13d-005056b86db5'"></el-option> -->
  31. </el-select>
  32. <!-- <el-select v-model="groupA" @change="search" v-else>
  33. <el-option value="4" label="全部"></el-option>
  34. </el-select> -->
  35. </div>
  36. <div @click="clear" class="clear" v-if="CourseType.length">重置</div>
  37. </div>
  38. <div class="student_right">
  39. <div class="head_left">
  40. <el-input v-model="courseName" class="student_input" placeholder="请输入项目名称"></el-input>
  41. <el-button class="course_button" @click="searchCourse">查询</el-button>
  42. </div>
  43. </div>
  44. </div>
  45. <div class="student_table" v-loading="isLoading">
  46. <div class="course_box">
  47. <div class="out_box" v-for="(item, index) in course" :key="index">
  48. <div class="bottom_box">
  49. <div>{{ item.title }}</div>
  50. <div class="kc_t">
  51. 创建人:{{ item.uname }}
  52. </div>
  53. <div class="kc_time">
  54. <span style="color: #4b4b4b">创建日期:</span>{{ item.time }}
  55. </div>
  56. <div class="kc_time">
  57. <span style="color: #4b4b4b">修改日期:</span>{{ item.utime }}
  58. </div>
  59. </div>
  60. <div class="three_bottom">
  61. <div @click="goToCourse2(item.courseId)">进入答题</div>
  62. </div>
  63. </div>
  64. <div class="course_empty" v-if="course.length == 0">暂无数据</div>
  65. </div>
  66. </div>
  67. </div>
  68. <div class="student_page">
  69. <el-pagination background layout="prev, pager, next" :page-size="pageSize" :total="total"
  70. v-if="page && course.length" style="padding-bottom: 20px"
  71. @current-change="handleCurrentChange"></el-pagination>
  72. </div>
  73. <el-dialog :visible.sync="dialogVisible1" size="tiny">
  74. <img width="100%" :src="dialogImageUrl" alt />
  75. </el-dialog>
  76. <el-dialog title="查看提问" :visible.sync="dialogVisible" :append-to-body="true" width="750px"
  77. :before-close="handleClose" class="dialog_diy">
  78. <div>
  79. <div class="a_addBox">
  80. <CourseProblem :problemCourse="problemCourse"></CourseProblem>
  81. </div>
  82. </div>
  83. <span slot="footer" class="dialog-footer">
  84. <el-button @click="dialogVisible = false">关 闭</el-button>
  85. </span>
  86. </el-dialog>
  87. <el-dialog title="查看协同项目" :visible.sync="dialogVisibleCourse" :append-to-body="true" width="850px"
  88. :before-close="handleClose" class="dialog_diy">
  89. <div class="ct_box">
  90. <div class="out_box" v-for="(item, index) in courseTeam" :key="index" style="margin-left: 15px">
  91. <div class="tup">
  92. <img :src="item.cover != null && item.cover != ''
  93. ? JSON.parse(item.cover).length > 0
  94. ? JSON.parse(item.cover)[0].url
  95. : mr
  96. : mr
  97. " alt />
  98. </div>
  99. <div class="bottom_box">
  100. <div>{{ item.title }}</div>
  101. <div class="kc_t">创建人:{{ item.uname }}</div>
  102. <div class="kc_time">{{ item.time }}</div>
  103. </div>
  104. <div class="three_bottom">
  105. <!-- <div @click="jump(item.courseId)">查看内容</div> -->
  106. <div @click="
  107. goTo(
  108. '/studentAddCourse?cid=' +
  109. item.courseId +
  110. '&userid=' +
  111. userid +
  112. '&oid=' +
  113. oid +
  114. '&org=' +
  115. org +
  116. '&role=' +
  117. role
  118. )
  119. ">
  120. 编辑
  121. </div>
  122. </div>
  123. </div>
  124. <div class="course_empty" v-if="courseTeam.length == 0">暂无数据</div>
  125. </div>
  126. <span slot="footer" class="dialog-footer">
  127. <el-button @click="dialogVisibleCourse = false">关 闭</el-button>
  128. </span>
  129. </el-dialog>
  130. </div>
  131. </template>
  132. <script>
  133. import "../../../common/aws-sdk-2.235.1.min";
  134. import EditorBar from "../../../components/tools/wangEnduit";
  135. import CourseProblem from "../components/courseProblem";
  136. export default {
  137. components: { EditorBar, CourseProblem },
  138. data() {
  139. return {
  140. itemCount: 1,
  141. courseTitle: "",
  142. courseText: "",
  143. courseTime: "",
  144. isLoading: false,
  145. fileList: [],
  146. fileList1: [],
  147. homeworkList: [{ name: "" }],
  148. formLabelWidth: "100px",
  149. dialogVisible: false,
  150. dialogVisible1: false,
  151. dialogVisibleCourse: false,
  152. dialogImageUrl: "",
  153. group: "",
  154. userid: this.$route.query.userid,
  155. oid: this.$route.query.oid,
  156. org: this.$route.query.org,
  157. role: this.$route.query.role,
  158. classid: this.$route.query.classid,
  159. Juri: "",
  160. groupList: [],
  161. JuriList: [],
  162. page: 1,
  163. total: 0,
  164. pageSize: 20,
  165. tableData: [],
  166. now: "",
  167. courseDetail: {},
  168. addCourse: {},
  169. groupA: "3",
  170. classX: "",
  171. course: [],
  172. courseName: "",
  173. mr: require("../../../assets/icon/kc1.png"),
  174. CourseType: [],
  175. CourseTypeJson: {},
  176. courseTypeId: {},
  177. courseTypeSon: [],
  178. isChoose: 0,
  179. problemCourse: null, //查看提问的项目
  180. courseTeam: [],
  181. };
  182. },
  183. methods: {
  184. change(val) {
  185. console.log(val);
  186. },
  187. time() {
  188. if (!this.now) {
  189. this.now = new Date().getTime();
  190. return true;
  191. } else {
  192. let time = new Date().getTime();
  193. if (time - this.now > 3000) {
  194. this.now = time;
  195. return true;
  196. } else {
  197. return false;
  198. }
  199. }
  200. },
  201. addHomeworkBox() {
  202. this.homeworkList.push({ name: "" });
  203. this.itemCount++;
  204. },
  205. reduceHomeworkBox() {
  206. var a = this.homeworkList;
  207. a.splice(a.length - 1);
  208. this.itemCount--;
  209. },
  210. goTo(path) {
  211. this.$router.push(path);
  212. },
  213. goToCourse(courseId) {
  214. if (courseId) {
  215. this.$router.push(
  216. "/studentAddCourse?cid=" +
  217. courseId +
  218. "&userid=" +
  219. this.userid +
  220. "&oid=" +
  221. this.oid +
  222. "&org=" +
  223. this.org +
  224. "&role=" +
  225. this.role
  226. );
  227. } else {
  228. this.$router.push(
  229. "/addTest?userid=" +
  230. this.userid +
  231. "&oid=" +
  232. this.oid +
  233. "&org=" +
  234. this.org +
  235. "&role=" +
  236. this.role
  237. );
  238. }
  239. // this.$router.push(path);
  240. },
  241. goToCourse2(cid) {
  242. this.$router.push(
  243. "/doTest?cid=" +
  244. cid +
  245. "&userid=" +
  246. this.userid +
  247. "&oid=" +
  248. this.oid +
  249. "&org=" +
  250. this.org +
  251. "&type=2" +
  252. "&role=" +
  253. this.role
  254. );
  255. },
  256. tableRowClassName({ row, rowIndex }) {
  257. if ((rowIndex + 1) % 2 === 0) {
  258. return "even_row";
  259. } else {
  260. return "";
  261. }
  262. },
  263. jump(cid) {
  264. // window.open(
  265. // "//pbl.cocorobo.cn/pbl-student-table/dist/#/courseDetail?courseId=" +
  266. // cid +
  267. // "&userid=" +
  268. // this.userid
  269. // );
  270. window.parent.postMessage({ cid: cid, screenType: "2s" }, "*");
  271. },
  272. get(cid) {
  273. window.parent.postMessage({ cid: cid, screenType: "3s" }, "*");
  274. },
  275. getA(cid) {
  276. this.$router.push("/courseProgress?cid=" + cid + "&userid=" +
  277. this.userid +
  278. "&oid=" +
  279. this.oid +
  280. "&org=" +
  281. this.org)
  282. },
  283. handle_remove(file, fileList) {
  284. var _tmp = this.fileList;
  285. for (var i = 0, len = _tmp.length; i < len; i++) {
  286. if (_tmp[i].uid == file.uid) {
  287. _tmp.splice(i, 1);
  288. break;
  289. }
  290. this.fileList = _tmp;
  291. }
  292. },
  293. handle_remove1(file, fileList) {
  294. var _tmp = this.fileList1;
  295. for (var i = 0, len = _tmp.length; i < len; i++) {
  296. if (_tmp[i].uid == file.uid) {
  297. _tmp.splice(i, 1);
  298. break;
  299. }
  300. this.fileList1 = _tmp;
  301. }
  302. },
  303. handleCurrentChange(val) {
  304. // console.log(`当前页: ${val}`);
  305. this.page = val;
  306. this.getCourse();
  307. },
  308. init() { },
  309. handleClose(done) {
  310. done();
  311. },
  312. handleRemove(file, fileList) {
  313. console.log(file, fileList);
  314. },
  315. handlePictureCardPreview(file) {
  316. this.dialogImageUrl = file.url;
  317. this.dialogVisible1 = true;
  318. },
  319. onExceed() {
  320. this.$message.error("项目海报仅支持上传一张,请删除后再进行上传");
  321. },
  322. //uuid生成
  323. guid() {
  324. return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(
  325. /[xy]/g,
  326. function (c) {
  327. var r = (Math.random() * 16) | 0,
  328. v = c == "x" ? r : (r & 0x3) | 0x8;
  329. return v.toString(16);
  330. }
  331. );
  332. },
  333. time() {
  334. if (!this.now) {
  335. this.now = new Date().getTime();
  336. return true;
  337. } else {
  338. let time = new Date().getTime();
  339. if (time - this.now > 3000) {
  340. this.now = time;
  341. return true;
  342. } else {
  343. return false;
  344. }
  345. }
  346. },
  347. searchCourse() {
  348. this.page = 1;
  349. this.getCourse();
  350. },
  351. clear() {
  352. if (this.CourseType.length) {
  353. for (var i = 0; i < this.CourseType[0].length; i++) {
  354. this.courseTypeId[this.CourseType[0][i].id] = "";
  355. }
  356. }
  357. this.getCourse();
  358. },
  359. getCourse() {
  360. var typeE = [];
  361. var typea, typeb, typec, typed, typef;
  362. if (this.isChoose == 1) {
  363. for (var i = 0; i < this.CourseType[0].length; i++) {
  364. if (this.courseTypeId[this.CourseType[0][i].id] == "1") {
  365. typeE.push(this.CourseType[0][i].id);
  366. } else if (this.courseTypeId[this.CourseType[0][i].id] != "") {
  367. if (this.CourseType[0][i].name == "年级") {
  368. typea = this.courseTypeId[this.CourseType[0][i].id];
  369. } else if (this.CourseType[0][i].name == "学科") {
  370. typeb = this.courseTypeId[this.CourseType[0][i].id];
  371. } else if (this.CourseType[0][i].name == "栏目") {
  372. typeb = this.courseTypeId[this.CourseType[0][i].id];
  373. } else if (this.CourseType[0][i].name == "学院") {
  374. typeb = this.courseTypeId[this.CourseType[0][i].id];
  375. } else if (this.CourseType[0][i].name == "新技能") {
  376. typec = this.courseTypeId[this.CourseType[0][i].id];
  377. } else if (this.CourseType[0][i].name == "赛道") {
  378. typed = this.courseTypeId[this.CourseType[0][i].id];
  379. } else if (this.CourseType[0][i].name == "项目类型") {
  380. typed = this.courseTypeId[this.CourseType[0][i].id];
  381. } else if (this.CourseType[0][i].name == "主题") {
  382. typef = this.courseTypeId[this.CourseType[0][i].id];
  383. }
  384. this.courseTypeSon.push(
  385. this.courseTypeId[this.CourseType[0][i].id]
  386. );
  387. }
  388. }
  389. }
  390. this.isLoading = true;
  391. let params = {
  392. type: this.groupA,
  393. uid: this.userid,
  394. oid: this.oid,
  395. org: this.org,
  396. typea: typea != undefined ? typea : "",
  397. typeb: typeb != undefined ? typeb : "",
  398. typec: typec != undefined ? typec : "",
  399. typed: typed != undefined ? typed : "",
  400. typef: typef != undefined ? typef : "",
  401. typeE: typeE.join(","),
  402. cu: "",
  403. cn: this.courseName,
  404. page: this.page,
  405. pageSize: this.pageSize,
  406. };
  407. this.ajax
  408. .get(this.$store.state.api + "selectTesttCourseCenter", params)
  409. .then((res) => {
  410. this.isLoading = false;
  411. this.total = res.data[0].length > 0 ? res.data[0][0].num : 0;
  412. this.course = res.data[0];
  413. })
  414. .catch((err) => {
  415. console.error(err);
  416. });
  417. },
  418. getTypeName() {
  419. this.$forceUpdate();
  420. this.page = 1;
  421. this.isChoose = 1;
  422. this.getCourse();
  423. },
  424. // searchCourse() {
  425. // this.isLoading = true;
  426. // let params = {
  427. // cu: "",
  428. // cn: this.courseName,
  429. // page: this.page,
  430. // };
  431. // this.ajax
  432. // .get(this.$store.state.api + "searchCourse", params)
  433. // .then((res) => {
  434. // this.isLoading = false;
  435. // this.total = res.data[0].length > 0 ? res.data[0][0].num : 0;
  436. // this.course = res.data[0];
  437. // })
  438. // .catch((err) => {
  439. // this.isLoading = false;
  440. // console.error(err);
  441. // });
  442. // },
  443. deleteCourse(cid) {
  444. // if (this.time()) {
  445. this.$confirm("确定删除此项目吗?", "提示", {
  446. confirmButtonText: "确定",
  447. cancelButtonText: "取消",
  448. type: "warning",
  449. })
  450. .then(() => {
  451. this.isLoading = true;
  452. let params = {
  453. cid: cid,
  454. };
  455. this.ajax
  456. .get(this.$store.state.api + "deleteStudentCourse", params)
  457. .then((res) => {
  458. this.isLoading = false;
  459. this.$message.success("删除成功");
  460. this.getCourse();
  461. })
  462. .catch((err) => {
  463. console.error(err);
  464. });
  465. })
  466. .catch(() => {
  467. loading.close();
  468. this.isLoading = false;
  469. return;
  470. });
  471. // }
  472. },
  473. selectAllType() {
  474. let params = {
  475. org: this.org && this.org != "" ? this.org : "",
  476. oid: this.oid && this.oid != "" ? this.oid : "",
  477. };
  478. this.ajax
  479. .get(this.$store.state.api + "selectAllTypeT", params)
  480. .then((res) => {
  481. this.CourseType = res.data;
  482. for (var i = 0; i < res.data[0].length; i++) {
  483. if (res.data[0][i].id == "34629907-d02f-11ec-8c78-005056b86db5") {
  484. res.data[0][i].name = "学科";
  485. } else if (res.data[0][i].id == "34628934-d02f-11ec-8c78-005056b86db5") {
  486. res.data[0][i].name = "年级";
  487. }
  488. if (!this.cid) {
  489. this.courseTypeId[res.data[0][i].id] = '';
  490. }
  491. if (!this.CourseTypeJson[res.data[0][i].id]) {
  492. this.CourseTypeJson[res.data[0][i].id] = [];
  493. }
  494. if (res.data[2].length == 0 && res.data[3].length == 0) {
  495. // for (var j = 0; j < res.data[1].length; j++) {
  496. // if (res.data[0][i].id == res.data[1][j].pid) {
  497. // this.CourseTypeJson[res.data[0][i].id].push(res.data[1][j]); // 去除公共分类
  498. // }
  499. // }
  500. // if(this.org == '150e3120-9195-11ed-b13d-005056b86db5'){
  501. for (var j = 0; j < res.data[1].length; j++) {
  502. if (res.data[0][i].id == res.data[1][j].pid) {
  503. this.CourseTypeJson[res.data[0][i].id].push(res.data[1][j]); // 去除公共分类
  504. }
  505. }
  506. // }else{
  507. // this.CourseType = []
  508. // }
  509. } else {
  510. if (res.data[2].length > 0) {
  511. for (var j = 0; j < res.data[2].length; j++) {
  512. if (res.data[0][i].id == res.data[2][j].pid) {
  513. this.CourseTypeJson[res.data[0][i].id].push(res.data[2][j]); // 去除公共分类
  514. }
  515. }
  516. }
  517. if (res.data[3].length > 0) {
  518. for (var j = 0; j < res.data[3].length; j++) {
  519. if (res.data[0][i].id == res.data[3][j].pid) {
  520. this.CourseTypeJson[res.data[0][i].id].push(res.data[3][j]); // 去除公共分类
  521. }
  522. }
  523. }
  524. }
  525. }
  526. })
  527. .catch((err) => {
  528. console.error(err);
  529. });
  530. },
  531. selectType() {
  532. this.ajax
  533. .get(this.$store.state.api + "selectStudentType")
  534. .then((res) => {
  535. this.CourseType = res.data;
  536. for (var i = 0; i < res.data[0].length; i++) {
  537. if (!this.cid) {
  538. this.courseTypeId[res.data[0][i].id] = "";
  539. }
  540. if (this.oid == "69893dca-1d47-11ed-8c78-005056b86db5") {
  541. if (res.data[0][i].name == "栏目") {
  542. this.CourseType[0][i].name = "主题";
  543. }
  544. }
  545. for (var j = 0; j < res.data[1].length; j++) {
  546. if (res.data[0][i].id == res.data[1][j].pid) {
  547. if (!this.CourseTypeJson[res.data[0][i].id]) {
  548. this.CourseTypeJson[res.data[0][i].id] = [];
  549. }
  550. this.CourseTypeJson[res.data[0][i].id].push(res.data[1][j]); //去除公共分类
  551. }
  552. }
  553. }
  554. this.selectTypeByOid();
  555. this.selectTypeByOrg();
  556. })
  557. .catch((err) => {
  558. console.error(err);
  559. });
  560. },
  561. selectTypeByOid() {
  562. let params = {
  563. oid: this.oid,
  564. };
  565. this.ajax
  566. .get(this.$store.state.api + "selectStudentTypeByOid", params)
  567. .then((res) => {
  568. for (var i = 0; i < res.data[0].length; i++) {
  569. for (var j = 0; j < res.data[1].length; j++) {
  570. if (res.data[0][i].id == res.data[1][j].pid) {
  571. if (!this.CourseTypeJson[res.data[0][i].id]) {
  572. this.CourseTypeJson[res.data[0][i].id] = [];
  573. }
  574. this.CourseTypeJson[res.data[0][i].id].push(res.data[1][j]);
  575. }
  576. }
  577. }
  578. this.$forceUpdate();
  579. })
  580. .catch((err) => {
  581. console.error(err);
  582. });
  583. },
  584. selectTypeByOrg() {
  585. let params = {
  586. oid: this.org,
  587. };
  588. this.ajax
  589. .get(this.$store.state.api + "selectStudentTypeByOid", params)
  590. .then((res) => {
  591. for (var i = 0; i < res.data[0].length; i++) {
  592. for (var j = 0; j < res.data[1].length; j++) {
  593. if (res.data[0][i].id == res.data[1][j].pid) {
  594. if (!this.CourseTypeJson[res.data[0][i].id]) {
  595. this.CourseTypeJson[res.data[0][i].id] = [];
  596. }
  597. this.CourseTypeJson[res.data[0][i].id].push(res.data[1][j]);
  598. }
  599. }
  600. }
  601. this.$forceUpdate();
  602. })
  603. .catch((err) => {
  604. console.error(err);
  605. });
  606. },
  607. openCourse() {
  608. this.dialogVisibleCourse = true;
  609. this.getTeamCourse();
  610. },
  611. getTeamCourse() {
  612. let params = {
  613. uid: this.userid,
  614. oid: this.oid,
  615. };
  616. this.ajax
  617. .get(this.$store.state.api + "selectCourseTeam", params)
  618. .then((res) => {
  619. this.courseTeam = res.data[0];
  620. })
  621. .catch((err) => {
  622. console.error(err);
  623. });
  624. },
  625. search() {
  626. this.page = 1;
  627. this.getCourse();
  628. },
  629. checkProblem(res) {
  630. this.problemCourse = res;
  631. this.dialogVisible = true;
  632. },
  633. copyCourse(cid) {
  634. let params = [{
  635. cid: cid,
  636. uid: this.userid
  637. }]
  638. this.ajax
  639. .post(this.$store.state.api + "copySCourse", params)
  640. .then((res) => {
  641. this.page = 1
  642. if (this.role == "1") {
  643. this.groupA = "0";
  644. } else {
  645. this.groupA = "0";
  646. }
  647. this.$message.success("复制成功")
  648. this.clear()
  649. })
  650. .catch((err) => {
  651. console.error(err);
  652. });
  653. }
  654. },
  655. created() {
  656. if (this.role == '1') {
  657. this.groupA = '0'
  658. }
  659. this.page = 1;
  660. this.selectAllType();
  661. this.getCourse();
  662. },
  663. };
  664. </script>
  665. <style scoped>
  666. .dialog_diy>>>.el-dialog__header {
  667. background: #3d67bc !important;
  668. padding: 15px 20px;
  669. }
  670. .dialog_diy>>>.el-dialog__title {
  671. color: #fff;
  672. }
  673. .dialog_diy>>>.el-dialog__headerbtn {
  674. top: 19px;
  675. }
  676. .dialog_diy>>>.el-dialog__headerbtn .el-dialog__close {
  677. color: #fff;
  678. }
  679. .dialog_diy>>>.el-dialog__headerbtn .el-dialog__close:hover {
  680. color: #fff;
  681. }
  682. .student_head>>>.el-button--primary {
  683. background-color: #2268bc;
  684. }
  685. .xls_button {
  686. font-size: 14px;
  687. cursor: pointer;
  688. text-decoration: underline;
  689. color: rgb(34, 104, 188);
  690. }
  691. .student_head {
  692. display: flex;
  693. justify-content: space-between;
  694. align-items: baseline;
  695. flex-direction: row;
  696. flex-wrap: wrap;
  697. }
  698. .top {
  699. display: flex;
  700. justify-content: space-between;
  701. }
  702. .bgColor {
  703. background: #466b99;
  704. }
  705. .student_search {
  706. display: flex;
  707. align-items: center;
  708. /* width: calc(100% / 3); */
  709. width: 190px;
  710. }
  711. .student_search span {
  712. margin: 0 10px 0 0;
  713. min-width: 65px;
  714. }
  715. .student_button {
  716. display: flex;
  717. overflow: hidden;
  718. height: 40px;
  719. }
  720. .upload-demo {
  721. display: flex;
  722. flex-direction: column;
  723. align-items: end;
  724. /* position: relative; */
  725. width: 100px;
  726. overflow: hidden;
  727. }
  728. .student_table {
  729. padding: 20px 0;
  730. height: 100%;
  731. /* overflow: auto; */
  732. min-height: 360px;
  733. }
  734. .student_empty {
  735. display: flex;
  736. justify-content: center;
  737. align-items: center;
  738. }
  739. .el-table>>>.even_row {
  740. background-color: #f1f1f1;
  741. }
  742. .time {
  743. font-size: 13px;
  744. color: #999;
  745. }
  746. .course_button {
  747. padding: 10px 20px;
  748. }
  749. .course_button_box {
  750. display: flex;
  751. margin-top: 5px;
  752. justify-content: space-between;
  753. }
  754. .course_rate {
  755. margin-top: 5px;
  756. }
  757. .course_view {
  758. display: flex;
  759. align-items: center;
  760. margin: 5px 0 0 0;
  761. }
  762. .course_view i {
  763. background-image: url("../../../assets/liulan.png");
  764. width: 25px;
  765. height: 25px;
  766. background-size: 100% 100%;
  767. /* margin-top: 1px; */
  768. line-height: 25px;
  769. vertical-align: text-top;
  770. background-repeat: no-repeat;
  771. }
  772. .image {
  773. width: 100%;
  774. height: 150px;
  775. display: block;
  776. }
  777. .course_box {
  778. display: flex;
  779. flex-wrap: wrap;
  780. }
  781. .student_page {
  782. width: 95%;
  783. margin: 0 auto;
  784. }
  785. .course_create_box {
  786. font-size: 18px;
  787. }
  788. .course_name {
  789. margin-top: 10px;
  790. }
  791. .course_name span {
  792. margin-bottom: 10px;
  793. display: block;
  794. }
  795. .homework_box {
  796. display: flex;
  797. align-items: center;
  798. flex-wrap: wrap;
  799. }
  800. .course_homework {
  801. width: 130px;
  802. display: flex;
  803. justify-content: center;
  804. flex-direction: column;
  805. align-items: center;
  806. margin: 0 10px 10px 0;
  807. }
  808. .course_type {
  809. margin-top: 10px;
  810. display: flex;
  811. }
  812. .course_type1 span {
  813. margin-bottom: 10px;
  814. display: block;
  815. }
  816. .course_type2 {
  817. margin-left: 20px;
  818. }
  819. .course_type2 span {
  820. margin-bottom: 10px;
  821. display: block;
  822. }
  823. .course_empty {
  824. color: rgb(110, 110, 110);
  825. width: 100%;
  826. height: 100%;
  827. display: flex;
  828. align-items: center;
  829. justify-content: center;
  830. }
  831. .el_cards>>>.el-card__body {
  832. height: 100%;
  833. }
  834. .courseBtnBox {
  835. display: flex;
  836. flex-direction: column;
  837. justify-content: space-between;
  838. height: calc(100% - 170px);
  839. padding: 10px;
  840. }
  841. .wordUpload {
  842. display: flex;
  843. }
  844. .wordUpload>.buttonUp {
  845. margin-right: 5px;
  846. }
  847. .out_box {
  848. display: flex;
  849. flex-direction: column;
  850. flex-wrap: nowrap;
  851. width: 250px;
  852. background: #fff;
  853. margin-right: 25px;
  854. border: 1px solid #ccc;
  855. height: fit-content;
  856. box-sizing: border-box;
  857. border-radius: 0px 0px 5px 5px;
  858. /* overflow: hidden; */
  859. margin-bottom: 15px;
  860. position: relative;
  861. padding-top: 10px;
  862. }
  863. .bottom_box {
  864. display: flex;
  865. padding: 0 0 10px 10px;
  866. flex-direction: column;
  867. box-sizing: border-box;
  868. height: 140px;
  869. flex-wrap: nowrap;
  870. justify-content: space-evenly;
  871. }
  872. .bottom_box>div:nth-child(1) {
  873. width: 230px;
  874. overflow: hidden;
  875. text-overflow: ellipsis;
  876. white-space: nowrap;
  877. font-weight: bold;
  878. font-size: 18px;
  879. }
  880. .tup {
  881. width: 100%;
  882. height: 141.06px;
  883. margin: 0 auto;
  884. overflow: hidden;
  885. display: flex;
  886. align-items: center;
  887. }
  888. .tup>img {
  889. width: 100%;
  890. height: 100%;
  891. object-fit: contain;
  892. }
  893. .kc_time {
  894. margin-top: 8px;
  895. font-size: 14px;
  896. color: #999;
  897. }
  898. .kc_t {
  899. margin-top: 5px;
  900. width: 100%;
  901. white-space: nowrap;
  902. overflow: hidden;
  903. text-overflow: ellipsis;
  904. }
  905. .three_bottom {
  906. display: flex;
  907. flex-direction: row;
  908. justify-content: space-around;
  909. height: 40px;
  910. align-items: center;
  911. background: #f5f4f4;
  912. font-size: 14px;
  913. }
  914. .three_bottom>div {
  915. cursor: pointer;
  916. }
  917. .three_bottom>div:hover {
  918. color: #79a2ff;
  919. }
  920. .head_left {
  921. display: flex;
  922. }
  923. .student_input>>>.el-input__inner {
  924. height: 40px;
  925. width: 190px;
  926. font-size: 13px;
  927. padding: 0 10px;
  928. }
  929. .course_button {
  930. color: #fff;
  931. background: #2268bc;
  932. width: 75px;
  933. height: 40px;
  934. padding: 0 !important;
  935. font-size: 12px;
  936. line-height: 40px;
  937. }
  938. .all_choose {
  939. margin: 15px 0 10px;
  940. height: 20%;
  941. display: flex;
  942. flex-direction: row;
  943. align-items: center;
  944. max-width: calc(100% / 3 - 50px);
  945. }
  946. .all_choose>span {
  947. min-width: 75px;
  948. display: block;
  949. margin-right: 10px;
  950. text-align-last: justify;
  951. }
  952. .choose {
  953. display: flex;
  954. flex-direction: row;
  955. flex-wrap: wrap;
  956. align-content: space-between;
  957. height: 100%;
  958. justify-content: flex-start;
  959. width: 60%;
  960. min-width: 868px;
  961. align-items: center;
  962. }
  963. .choose>div:nth-child(2) {
  964. margin-left: 1%;
  965. width: 32.33333%;
  966. }
  967. .choose>div:nth-child(3) {
  968. margin-left: 1%;
  969. width: 32.33333%;
  970. }
  971. .choose>div:nth-child(5) {
  972. margin: 5px 0 0 1%;
  973. }
  974. .choose>div:nth-child(4)>span {
  975. /* width: 74px !important;
  976. min-width: 74px; */
  977. }
  978. .choose>div:nth-child(4)>>>.el-select {
  979. /* width: 217.5px;
  980. min-width: 215.06px; */
  981. }
  982. .clear {
  983. width: 70px;
  984. max-width: 70px;
  985. height: 35px;
  986. background: #2268bc;
  987. color: #fff;
  988. text-align: center;
  989. border-radius: 5px;
  990. line-height: 35px;
  991. cursor: pointer;
  992. margin-left: 20px;
  993. }
  994. .ct_box {
  995. height: 500px;
  996. overflow: auto;
  997. display: flex;
  998. flex-wrap: wrap;
  999. }
  1000. .myCourse {
  1001. position: absolute;
  1002. background: #3c3c3c;
  1003. width: 65px;
  1004. height: 25px;
  1005. color: #fff;
  1006. font-size: 12px;
  1007. text-align: center;
  1008. line-height: 25px;
  1009. top: 0;
  1010. right: 0;
  1011. }
  1012. .xtCourse {
  1013. position: absolute;
  1014. background: #466b99;
  1015. width: 70px;
  1016. height: 30px;
  1017. border-radius: 30px;
  1018. color: #fff;
  1019. font-size: 14px;
  1020. text-align: center;
  1021. line-height: 30px;
  1022. top: 5px;
  1023. left: 5px;
  1024. }
  1025. .subClick {
  1026. font-size: 16px;
  1027. cursor: pointer;
  1028. margin-left: 10px;
  1029. /* color: #ab582f; */
  1030. color: #409eff;
  1031. }
  1032. .more {
  1033. position: relative;
  1034. }
  1035. .more:hover div {
  1036. display: block;
  1037. color: #000;
  1038. }
  1039. .more div {
  1040. position: absolute;
  1041. bottom: 0px;
  1042. transform: translate(-50%, 100%);
  1043. background: #f5f4f4;
  1044. padding: 10px 20px;
  1045. z-index: 99;
  1046. width: 40px;
  1047. border-radius: 5px;
  1048. box-shadow: 0 0 3px 3px #80808020;
  1049. display: none;
  1050. }
  1051. .more div>span+span {
  1052. margin-top: 10px;
  1053. }
  1054. .more div>span {
  1055. display: block;
  1056. width: 100%;
  1057. text-align: center;
  1058. }
  1059. .more div>span:hover {
  1060. color: #79a2ff;
  1061. }</style>