course.vue 53 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018
  1. <template>
  2. <div class="pb_content" style="height: auto; width: 94%; margin: 10px auto;background: unset;">
  3. <div style="width:100%;padding:0 21px;background:#fff;border-radius: 5px;box-sizing: border-box;">
  4. <div class="pb_head top">
  5. <div style="
  6. display: flex;
  7. align-items: center;
  8. ">
  9. <span class="sub_head">课程管理</span>
  10. <span class="subClick" @click="
  11. goTo(
  12. '/works?userid=' +
  13. userid +
  14. '&oid=' +
  15. oid +
  16. '&org=' +
  17. org +
  18. '&role=' +
  19. role
  20. )
  21. ">评价管理</span>
  22. </div>
  23. <div class="student_button">
  24. <!-- <el-button type="primary" class="bgColor" @click="openCourse">协同编辑</el-button> -->
  25. <!-- <el-button type="primary" class="bgColor" @click="goToCourse3()">创建极简式课程</el-button>
  26. <el-button type="primary" class="bgColor" @click="goToCourse2()">创建任务式课程</el-button>
  27. <el-button type="primary" class="bgColor" @click="goToCourse()">创建阶段式课程</el-button> -->
  28. <button class="r_pub_button_course" @mouseenter="btnDisplay = true" @mouseleave="btnDisplay = false">
  29. <span>创建课程</span>
  30. <div v-show="btnDisplay" class="buttonBox">
  31. <div type="primary" @click="goToCourse3()">极简式课程</div>
  32. <!-- <div type="primary" @click="goToCourse2()">任务式课程</div> -->
  33. <!-- <div type="primary" @click="goToCourse()">阶段式课程</div> -->
  34. <div type="primary" @click="goToCourse4()">阶段式课程</div>
  35. <div type="primary" @click="goToCourse5()">ai模式</div>
  36. </div>
  37. </button>
  38. </div>
  39. </div>
  40. <div class="reBox">
  41. <div class="reTop">
  42. <!-- <div>分类筛选</div> -->
  43. <div class="reTopCh">
  44. <el-select v-model="groupA" @change="search" v-if="role == '1'">
  45. <el-option value="4" label="全部"></el-option>
  46. <el-option value="2" label="我的课程"></el-option>
  47. <el-option value="3" label="协同课程"></el-option>
  48. <el-option value="1" label="他人课程"></el-option>
  49. </el-select>
  50. <el-select v-model="groupA" @change="search" v-else>
  51. <el-option value="0" label="全部"></el-option>
  52. <el-option value="2" label="我的课程"></el-option>
  53. <el-option value="3" label="协同课程"></el-option>
  54. </el-select>
  55. <div class="searchI">
  56. <!-- @click="getCourse" -->
  57. <div class="search">
  58. <img src="../../assets/icon/search.png" alt="" />
  59. </div>
  60. <input class="sInput" type="text" placeholder="请输入关键字" v-model="courseName" @input="getCourse()" />
  61. </div>
  62. <el-button type="primary" class="bgColor" style="margin-left: 10px;" @click="reset">重置</el-button>
  63. </div>
  64. </div>
  65. <div class="pType_box all_choose" v-if="oid == '69893dca-1d47-11ed-8c78-005056b86db5'">
  66. <span><span>类型</span></span>
  67. <el-radio-group v-model="pTypeCheckName" style="display: flex; align-items: center">
  68. <div class="all_choose" style="width: 100px" v-for="(item, index) in CourseType2" :key="index">
  69. <el-radio :label="item.name" @click.native.prevent="CourseType2Click(item.name)">{{ item.name }}</el-radio>
  70. </div>
  71. </el-radio-group>
  72. </div>
  73. <div class="choose">
  74. <div class="all_choose" v-for="(item, index) in CourseType[0]" :key="index"
  75. :style="{ margin: !CourseTypeJson[item.id].length && 0 }">
  76. <span v-if="CourseTypeJson[item.id].length &&
  77. (oid == '69893dca-1d47-11ed-8c78-005056b86db5'
  78. ? pTypeCheck.indexOf(item.id) != -1
  79. : true)
  80. "><span>{{ item.name }}</span></span>
  81. <div class="typeCss" v-if="CourseTypeJson[item.id].length &&
  82. (oid == '69893dca-1d47-11ed-8c78-005056b86db5'
  83. ? pTypeCheck.indexOf(item.id) != -1
  84. : true)
  85. ">
  86. <div class="cName" @click="getCourse2(item.name, '', item.id, 1)"
  87. :class="typeE.indexOf(item.id) != -1 ? 'isCType' : ''">
  88. 全部
  89. </div>
  90. <div v-for="(item1, index1) in CourseTypeJson[item.id]" :key="index + '-' + index1" :label="item1.id"
  91. @click="getCourse2(item.name, item.id, item1.id, 2)">
  92. <div class="cName" :class="typea == item1.id || typeb == item1.id || typed == item1.id
  93. ? 'isCType'
  94. : ''
  95. ">
  96. {{ item1.name }}
  97. </div>
  98. </div>
  99. </div>
  100. </div>
  101. <div class="all_choose" v-if="role == '1'">
  102. <span><span>所有者</span></span>
  103. <div class="typeCss">
  104. <div class="cName" :class="groupA == '4' ? 'isCType' : ''" @click="groupA = '4'; search();">
  105. 全部
  106. </div>
  107. <div class="cName" :class="groupA == '2' ? 'isCType' : ''" @click="groupA = '2'; search();">
  108. 我的课程
  109. </div>
  110. <div class="cName" :class="groupA == '3' ? 'isCType' : ''" @click="groupA = '3'; search();">
  111. 协同课程
  112. </div>
  113. <div class="cName" :class="groupA == '1' ? 'isCType' : ''" @click="groupA = '1'; search();">
  114. 他人课程
  115. </div>
  116. </div>
  117. </div>
  118. <div class="all_choose" v-else>
  119. <span><span>所有者</span></span>
  120. <div class="typeCss">
  121. <div class="cName" :class="groupA == '0' ? 'isCType' : ''" @click="groupA = '0'; search();">
  122. 全部
  123. </div>
  124. <div class="cName" :class="groupA == '2' ? 'isCType' : ''" @click="groupA = '2'; search();">
  125. 我的课程
  126. </div>
  127. <div class="cName" :class="groupA == '3' ? 'isCType' : ''" @click="groupA = '3'; search();">
  128. 协同课程
  129. </div>
  130. </div>
  131. </div>
  132. </div>
  133. </div>
  134. </div>
  135. <div class="line"></div>
  136. <div class="pb_content_body" style="height: 100%;width: 100%;background: #e6eaf0;margin: 0 auto;">
  137. <div class="student_head" v-if="false">
  138. <div class="choose">
  139. <div class="student_search">
  140. <span>课程筛选</span>
  141. <el-select v-model="groupA" @change="search">
  142. <el-option value="0" label="我的课程"></el-option>
  143. <el-option value="1" label="他人课程"></el-option>
  144. </el-select>
  145. </div>
  146. <div class="all_choose" v-for="(item, index) in CourseType[0]" :key="index">
  147. <span v-if="CourseTypeJson[item.id].length">{{ item.name }}</span>
  148. <el-select v-if="CourseTypeJson[item.id].length" v-model="courseTypeId[item.id]" placeholder="请选择"
  149. @change="getTypeName">
  150. <el-option label="全部" value="1">全部</el-option>
  151. <el-option v-for="item1 in CourseTypeJson[item.id]" :key="item1.id" :label="item1.name" :value="item1.id">
  152. </el-option>
  153. </el-select>
  154. </div>
  155. <div @click="clear" class="clear">重置</div>
  156. </div>
  157. <div class="student_right">
  158. <div class="head_left">
  159. <el-input v-model="courseName" class="student_input" placeholder="请输入课程名称"></el-input>
  160. <el-button class="course_button" @click="searchCourse">查询</el-button>
  161. </div>
  162. </div>
  163. </div>
  164. <div class="student_table">
  165. <div class="course_box">
  166. <div class="out_box" v-for="(item, index) in course" :key="index">
  167. <!-- <div class="myCourse" v-if="item.isCourseType == 1 && groupA == 0">
  168. 我的课程
  169. </div>
  170. <div class="myCourse" v-else-if="groupA == 1">
  171. 他人课程
  172. </div>
  173. <div class="xtCourse" v-else>协同课程</div> -->
  174. <div class="myCourse" v-if="item.userid == userid">我的课程</div>
  175. <div class="myCourse" style="background: #4187f0" v-else-if="!item.course_teacher ||
  176. (item.course_teacher &&
  177. item.course_teacher.indexOf(userid) == -1)
  178. ">
  179. 他人课程
  180. </div>
  181. <div class="xtCourse" v-else>协同课程</div>
  182. <div class="tup">
  183. <img :src="item.cover != null && item.cover != ''
  184. ? JSON.parse(item.cover).length > 0
  185. ? JSON.parse(item.cover)[0].url
  186. : mr
  187. : mr
  188. " alt />
  189. </div>
  190. <!-- <div class="bottom_box">
  191. <div>{{ item.title }}</div>
  192. <div class="kc_t" v-if="groupA == '1'">
  193. 创建老师:{{ item.uname }}
  194. </div>
  195. <div class="kc_time">{{ item.time }}</div>
  196. </div> -->
  197. <div class="bottom_box">
  198. <div>
  199. <el-tooltip :content="item.title" popper-class="text_tooltip" placement="top" effect="dark">
  200. <span>{{ item.title }}</span>
  201. </el-tooltip>
  202. </div>
  203. <!-- v-if="item.isCourseType == 2 || groupA == 1" -->
  204. <div class="kc_t">
  205. <span>{{ item.uname }}</span>
  206. <span>{{ item.state == 1 ? '阶段模式' : item.state == 2 ? '任务模式' : '极简模式' }}</span>
  207. </div>
  208. <div class="kc_time">
  209. <span style="color: #717C8D">创建日期:</span>{{ item.time }}
  210. </div>
  211. <div class="kc_time">
  212. <span style="color: #717C8D">修改日期:</span>{{ item.utime }}
  213. </div>
  214. </div>
  215. <div class="three_bottom">
  216. <!-- v-if="role == '1'" -->
  217. <div @click="get(item)">预览</div>
  218. <!-- <div @click="jump(item.courseId)" v-else>评课</div> -->
  219. <div v-if="((item.userid == userid) ||
  220. (item.course_teacher &&
  221. item.course_teacher.indexOf(userid) !== -1) || role == '1') &&
  222. item.state == 1
  223. " @click="goToCourse(item.courseId)">
  224. 修改
  225. </div>
  226. <div v-if="((item.userid == userid) ||
  227. (item.course_teacher &&
  228. item.course_teacher.indexOf(userid) !== -1) || role == '1') &&
  229. item.state == 2
  230. " @click="goToCourse(item.courseId)">
  231. 修改
  232. </div>
  233. <div v-if="((item.userid == userid) ||
  234. (item.course_teacher &&
  235. item.course_teacher.indexOf(userid) !== -1) || role == '1') &&
  236. item.state == 3
  237. " @click="goToCourse3(item.courseId)">
  238. 修改
  239. </div>
  240. <!-- <div v-if="groupA == '0'" @click="
  241. goTo(
  242. '/works?cid=' +
  243. item.courseId +
  244. '&userid=' +
  245. userid +
  246. '&oid=' +
  247. oid +
  248. '&org=' +
  249. org +
  250. '&role=' +
  251. role
  252. )
  253. ">
  254. 评价
  255. </div> -->
  256. <div @click="copyCourse(item.courseId)">
  257. 复制
  258. </div>
  259. <div v-if="item.isCourseType == 1 || role == '1'" @click="deleteCourse(item.courseId)">
  260. 删除
  261. </div>
  262. <!-- <div class="more">
  263. <span style="font-size: 18px; font-weight: 700">...</span>
  264. <div>
  265. <span @click="copyCourse(item.courseId)">复制</span>
  266. <span @click="jump(item.courseId)" v-if="role == '1'">评课</span>
  267. <span @click="get(item.courseId)" v-else>预览</span>
  268. <span @click="getNT(item.courseId)">无终端</span>
  269. </div>
  270. </div> -->
  271. </div>
  272. </div>
  273. <div class="course_empty" v-if="course.length == 0">暂无数据</div>
  274. </div>
  275. </div>
  276. </div>
  277. <div class="student_page">
  278. <el-pagination background layout="prev, pager, next" :page-size="pageSize" :total="total"
  279. v-if="page && course.length" style="padding-bottom: 20px" @current-change="handleCurrentChange"></el-pagination>
  280. </div>
  281. <el-dialog :visible.sync="dialogVisible1" size="tiny">
  282. <img width="100%" :src="dialogImageUrl" alt />
  283. </el-dialog>
  284. <el-dialog title="查看提问" :visible.sync="dialogVisible" :append-to-body="true" width="750px" :before-close="handleClose"
  285. class="dialog_diy">
  286. <div>
  287. <div class="a_addBox">
  288. <CourseProblem :problemCourse="problemCourse"></CourseProblem>
  289. </div>
  290. </div>
  291. <span slot="footer" class="dialog-footer">
  292. <el-button @click="dialogVisible = false">关 闭</el-button>
  293. </span>
  294. </el-dialog>
  295. <el-dialog title="查看协同课程" :visible.sync="dialogVisibleCourse" :append-to-body="true" width="850px"
  296. :before-close="handleClose" class="dialog_diy">
  297. <div class="ct_box">
  298. <div class="out_box" v-for="(item, index) in courseTeam" :key="index" style="margin-left: 15px">
  299. <div class="tup">
  300. <img :src="item.cover != null && item.cover != ''
  301. ? JSON.parse(item.cover).length > 0
  302. ? JSON.parse(item.cover)[0].url
  303. : mr
  304. : mr
  305. " alt />
  306. </div>
  307. <div class="bottom_box">
  308. <div>{{ item.title }}</div>
  309. <div class="kc_t">创建老师:{{ item.uname }}</div>
  310. <div class="kc_time">{{ item.time }}</div>
  311. </div>
  312. <div class="three_bottom">
  313. <div @click="jump(item.courseId)">查看内容</div>
  314. <div @click="
  315. goTo(
  316. '/course/addCourse?cid=' +
  317. item.courseId +
  318. '&userid=' +
  319. userid +
  320. '&oid=' +
  321. oid +
  322. '&org=' +
  323. org
  324. )
  325. ">
  326. 编辑
  327. </div>
  328. </div>
  329. </div>
  330. <div class="course_empty" v-if="courseTeam.length == 0">暂无数据</div>
  331. </div>
  332. <span slot="footer" class="dialog-footer">
  333. <el-button @click="dialogVisibleCourse = false">关 闭</el-button>
  334. </span>
  335. </el-dialog>
  336. </div>
  337. </template>
  338. <script>
  339. import "../../common/aws-sdk-2.235.1.min";
  340. import EditorBar from "../../components/tools/wangEnduit";
  341. import CourseProblem from "./components/courseProblem";
  342. export default {
  343. components: { EditorBar, CourseProblem },
  344. data() {
  345. return {
  346. itemCount: 1,
  347. courseTitle: "",
  348. courseText: "",
  349. courseTime: "",
  350. isLoading: false,
  351. fileList: [],
  352. fileList1: [],
  353. homeworkList: [{ name: "" }],
  354. formLabelWidth: "100px",
  355. dialogVisible: false,
  356. dialogVisible1: false,
  357. dialogVisibleCourse: false,
  358. dialogImageUrl: "",
  359. group: "",
  360. userid: this.$route.query.userid,
  361. oid: this.$route.query.oid,
  362. org: this.$route.query.org,
  363. role: this.$route.query.role,
  364. Juri: "",
  365. groupList: [],
  366. JuriList: [],
  367. page: 1,
  368. total: 0,
  369. pageSize: 20,
  370. tableData: [],
  371. now: "",
  372. courseDetail: {},
  373. addCourse: {},
  374. groupA: "0",
  375. classX: "",
  376. course: [],
  377. courseName: "",
  378. mr: require("../../assets/icon/kc1.png"),
  379. CourseType: [],
  380. CourseType2: [],
  381. CourseTypeJson: {},
  382. courseTypeId: {},
  383. courseTypeSon: [],
  384. isChoose: 0,
  385. problemCourse: null, //查看提问的课程
  386. courseTeam: [],
  387. typeE: [],
  388. typea: "",
  389. typeb: "",
  390. typed: "",
  391. pTypeCheck: [],
  392. pTypeCheckName: [],
  393. btnDisplay: false
  394. };
  395. },
  396. methods: {
  397. change(val) {
  398. console.log(val);
  399. },
  400. time() {
  401. if (!this.now) {
  402. this.now = new Date().getTime();
  403. return true;
  404. } else {
  405. let time = new Date().getTime();
  406. if (time - this.now > 3000) {
  407. this.now = time;
  408. return true;
  409. } else {
  410. return false;
  411. }
  412. }
  413. },
  414. addHomeworkBox() {
  415. this.homeworkList.push({ name: "" });
  416. this.itemCount++;
  417. },
  418. reduceHomeworkBox() {
  419. var a = this.homeworkList;
  420. a.splice(a.length - 1);
  421. this.itemCount--;
  422. },
  423. goTo(path) {
  424. this.$router.push(path);
  425. },
  426. CourseType2Change(val) {
  427. this.pTypeCheck = [];
  428. for (var i = 0; i < this.CourseType2.length; i++) {
  429. let typeA = this.CourseType2[i];
  430. if (val.indexOf(typeA.name) != -1) {
  431. this.pTypeCheck.push(...typeA.id);
  432. }
  433. }
  434. this.typea = "";
  435. this.typeb = "";
  436. this.typed = "";
  437. this.getCourse();
  438. },
  439. CourseType2Click(val) {
  440. this.pTypeCheck = [];
  441. this.typeE = [];
  442. if (val === this.pTypeCheckName) {
  443. this.pTypeCheckName = "";
  444. } else {
  445. this.pTypeCheckName = val;
  446. for (var i = 0; i < this.CourseType2.length; i++) {
  447. let typeA = this.CourseType2[i];
  448. if (val.indexOf(typeA.name) != -1) {
  449. this.pTypeCheck.push(...typeA.id);
  450. this.typeE = [...typeA.id];
  451. }
  452. }
  453. }
  454. this.typea = "";
  455. this.typeb = "";
  456. this.typed = "";
  457. this.getCourse();
  458. },
  459. goToCourse(courseId) {
  460. // if(this.org !== '16ace517-b5c7-4168-a9bb-a9e0035df840'){
  461. // if (courseId) {
  462. // this.$router.push(
  463. // "/course/addCourse?cid=" +
  464. // courseId +
  465. // "&userid=" +
  466. // this.userid +
  467. // "&oid=" +
  468. // this.oid +
  469. // "&org=" +
  470. // this.org +
  471. // "&role=" +
  472. // this.role
  473. // );
  474. // } else {
  475. // this.$router.push(
  476. // "/course/addCourse?userid=" +
  477. // this.userid +
  478. // "&oid=" +
  479. // this.oid +
  480. // "&org=" +
  481. // this.org +
  482. // "&role=" +
  483. // this.role
  484. // );
  485. // }
  486. // }else{
  487. this.goToCourse4(courseId)
  488. // }
  489. // this.$router.push(path);
  490. },
  491. goToCourse4(courseId) {
  492. if (courseId) {
  493. this.$router.push(
  494. "/newAddCourse?cid=" +
  495. courseId +
  496. "&userid=" +
  497. this.userid +
  498. "&oid=" +
  499. this.oid +
  500. "&org=" +
  501. this.org +
  502. "&role=" +
  503. this.role
  504. );
  505. } else {
  506. this.$router.push(
  507. "/newAddCourse?userid=" +
  508. this.userid +
  509. "&oid=" +
  510. this.oid +
  511. "&org=" +
  512. this.org +
  513. "&role=" +
  514. this.role
  515. );
  516. }
  517. // this.$router.push(path);
  518. },
  519. goToCourse5(courseId) {
  520. if (courseId) {
  521. this.$router.push(
  522. "/aiAddCourse?cid=" +
  523. courseId +
  524. "&userid=" +
  525. this.userid +
  526. "&oid=" +
  527. this.oid +
  528. "&org=" +
  529. this.org +
  530. "&role=" +
  531. this.role
  532. );
  533. } else {
  534. this.$router.push(
  535. "/aiAddCourse?userid=" +
  536. this.userid +
  537. "&oid=" +
  538. this.oid +
  539. "&org=" +
  540. this.org +
  541. "&role=" +
  542. this.role
  543. );
  544. }
  545. // this.$router.push(path);
  546. },
  547. reset() {
  548. this.typeE = []
  549. this.typea = ''
  550. this.typeb = ''
  551. this.typed = ''
  552. this.courseName = ''
  553. if (this.role == "1") {
  554. this.groupA = "4";
  555. } else {
  556. this.groupA = "0";
  557. }
  558. this.getCourse();
  559. },
  560. goToCourse2(courseId) {
  561. if (courseId) {
  562. this.$router.push(
  563. "/course/addCourseT?cid=" +
  564. courseId +
  565. "&userid=" +
  566. this.userid +
  567. "&oid=" +
  568. this.oid +
  569. "&org=" +
  570. this.org +
  571. "&role=" +
  572. this.role
  573. );
  574. } else {
  575. this.$router.push(
  576. "/course/addCourseT?userid=" +
  577. this.userid +
  578. "&oid=" +
  579. this.oid +
  580. "&org=" +
  581. this.org +
  582. "&role=" +
  583. this.role
  584. );
  585. }
  586. },
  587. goToCourse3(courseId) {
  588. if (courseId) {
  589. this.$router.push(
  590. "/course/addCourseE?cid=" +
  591. courseId +
  592. "&userid=" +
  593. this.userid +
  594. "&oid=" +
  595. this.oid +
  596. "&org=" +
  597. this.org +
  598. "&role=" +
  599. this.role
  600. );
  601. } else {
  602. this.$router.push(
  603. "/course/addCourseE?userid=" +
  604. this.userid +
  605. "&oid=" +
  606. this.oid +
  607. "&org=" +
  608. this.org +
  609. "&role=" +
  610. this.role
  611. );
  612. }
  613. },
  614. tableRowClassName({ row, rowIndex }) {
  615. if ((rowIndex + 1) % 2 === 0) {
  616. return "even_row";
  617. } else {
  618. return "";
  619. }
  620. },
  621. jump(cid) {
  622. // window.open(
  623. // "//pbl.cocorobo.cn/pbl-student-table/dist/#/courseDetail?courseId=" +
  624. // cid +
  625. // "&userid=" +
  626. // this.userid
  627. // );
  628. top.postMessage({ cid: cid, screenType: "2" }, "*");
  629. },
  630. get(item) {
  631. top.postMessage({ cid: item.courseId, screenType: "3" }, "*");
  632. },
  633. getNT(cid) {
  634. top.postMessage({ cid: cid, screenType: "3NT" }, "*");
  635. },
  636. handle_remove(file, fileList) {
  637. var _tmp = this.fileList;
  638. for (var i = 0, len = _tmp.length; i < len; i++) {
  639. if (_tmp[i].uid == file.uid) {
  640. _tmp.splice(i, 1);
  641. break;
  642. }
  643. this.fileList = _tmp;
  644. }
  645. },
  646. handle_remove1(file, fileList) {
  647. var _tmp = this.fileList1;
  648. for (var i = 0, len = _tmp.length; i < len; i++) {
  649. if (_tmp[i].uid == file.uid) {
  650. _tmp.splice(i, 1);
  651. break;
  652. }
  653. this.fileList1 = _tmp;
  654. }
  655. },
  656. handleCurrentChange(val) {
  657. // console.log(`当前页: ${val}`);
  658. this.page = val;
  659. this.getCourse();
  660. },
  661. init() { },
  662. handleClose(done) {
  663. done();
  664. },
  665. handleRemove(file, fileList) {
  666. console.log(file, fileList);
  667. },
  668. handlePictureCardPreview(file) {
  669. this.dialogImageUrl = file.url;
  670. this.dialogVisible1 = true;
  671. },
  672. onExceed() {
  673. this.$message.error("课程海报仅支持上传一张,请删除后再进行上传");
  674. },
  675. //uuid生成
  676. guid() {
  677. return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(
  678. /[xy]/g,
  679. function (c) {
  680. var r = (Math.random() * 16) | 0,
  681. v = c == "x" ? r : (r & 0x3) | 0x8;
  682. return v.toString(16);
  683. }
  684. );
  685. },
  686. time() {
  687. if (!this.now) {
  688. this.now = new Date().getTime();
  689. return true;
  690. } else {
  691. let time = new Date().getTime();
  692. if (time - this.now > 3000) {
  693. this.now = time;
  694. return true;
  695. } else {
  696. return false;
  697. }
  698. }
  699. },
  700. searchCourse() {
  701. this.page = 1;
  702. this.getCourse();
  703. },
  704. clear() {
  705. for (var i = 0; i < this.CourseType[0].length; i++) {
  706. this.courseTypeId[this.CourseType[0][i].id] = "";
  707. }
  708. this.getCourse();
  709. },
  710. getCourse2(typeName, ftypeId, typeid, type) {
  711. this.page = 1;
  712. if (typeid == "34628934-d02f-11ec-8c78-005056b86db5" || ftypeId == '34628934-d02f-11ec-8c78-005056b86db5' || typeid == "34628934-d02f-11ec-8c78-005056b86ac5" || ftypeId == "34628934-d02f-11ec-8c78-005056b86ac5") {
  713. if (type == 1) {
  714. if (this.typeE.indexOf(typeid) != -1) {
  715. if (this.oid == "69893dca-1d47-11ed-8c78-005056b86db5") {
  716. return;
  717. } else {
  718. this.typeE.splice(this.typeE.indexOf(typeid), 1);
  719. }
  720. } else {
  721. this.typeE.push(typeid);
  722. if (this.typea != "") {
  723. this.typea = "";
  724. }
  725. }
  726. } else {
  727. if (this.typea == typeid) {
  728. this.typea = "";
  729. if (this.oid == "69893dca-1d47-11ed-8c78-005056b86db5") {
  730. this.typeE.push(ftypeId);
  731. }
  732. } else {
  733. this.typea = typeid;
  734. if (this.typeE.indexOf(ftypeId) != -1) {
  735. this.typeE.splice(this.typeE.indexOf(ftypeId), 1);
  736. }
  737. }
  738. }
  739. } else if (typeName == "专栏") {
  740. if (type == 1) {
  741. if (this.typeE.indexOf(typeid) != -1) {
  742. if (this.oid == "69893dca-1d47-11ed-8c78-005056b86db5") {
  743. return;
  744. } else {
  745. this.typeE.splice(this.typeE.indexOf(typeid), 1);
  746. }
  747. } else {
  748. this.typeE.push(typeid);
  749. if (this.typeb != "") {
  750. this.typeb = "";
  751. }
  752. }
  753. } else {
  754. if (this.typeb == typeid) {
  755. this.typeb = "";
  756. if (this.oid == "69893dca-1d47-11ed-8c78-005056b86db5") {
  757. this.typeE.push(ftypeId);
  758. }
  759. } else {
  760. this.typeb = typeid;
  761. if (this.typeE.indexOf(ftypeId) != -1) {
  762. this.typeE.splice(this.typeE.indexOf(ftypeId), 1);
  763. }
  764. }
  765. }
  766. } else if (typeName == "栏目") {
  767. if (type == 1) {
  768. if (this.typeE.indexOf(typeid) != -1) {
  769. if (this.oid == "69893dca-1d47-11ed-8c78-005056b86db5") {
  770. return;
  771. } else {
  772. this.typeE.splice(this.typeE.indexOf(typeid), 1);
  773. }
  774. } else {
  775. this.typeE.push(typeid);
  776. if (this.typeb != "") {
  777. this.typeb = "";
  778. }
  779. }
  780. } else {
  781. if (this.typeb == typeid) {
  782. this.typeb = "";
  783. if (this.oid == "69893dca-1d47-11ed-8c78-005056b86db5") {
  784. this.typeE.push(ftypeId);
  785. }
  786. } else {
  787. this.typeb = typeid;
  788. if (this.typeE.indexOf(ftypeId) != -1) {
  789. this.typeE.splice(this.typeE.indexOf(ftypeId), 1);
  790. }
  791. }
  792. }
  793. } else if (typeid == "34629bcc-d02f-11ec-8c78-005056b86db5" || ftypeId == '34629bcc-d02f-11ec-8c78-005056b86db5') {
  794. if (type == 1) {
  795. if (this.typeE.indexOf(typeid) != -1) {
  796. if (this.oid == "69893dca-1d47-11ed-8c78-005056b86db5") {
  797. return;
  798. } else {
  799. this.typeE.splice(this.typeE.indexOf(typeid), 1);
  800. }
  801. } else {
  802. this.typeE.push(typeid);
  803. if (this.typeb != "") {
  804. this.typeb = "";
  805. }
  806. }
  807. } else {
  808. if (this.typeb == typeid) {
  809. this.typeb = "";
  810. if (this.oid == "69893dca-1d47-11ed-8c78-005056b86db5") {
  811. this.typeE.push(ftypeId);
  812. }
  813. } else {
  814. this.typeb = typeid;
  815. if (this.typeE.indexOf(ftypeId) != -1) {
  816. this.typeE.splice(this.typeE.indexOf(ftypeId), 1);
  817. }
  818. }
  819. }
  820. } else if (typeName == "学院") {
  821. if (type == 1) {
  822. if (this.typeE.indexOf(typeid) != -1) {
  823. if (this.oid == "69893dca-1d47-11ed-8c78-005056b86db5") {
  824. return;
  825. } else {
  826. this.typeE.splice(this.typeE.indexOf(typeid), 1);
  827. }
  828. } else {
  829. this.typeE.push(typeid);
  830. if (this.typeb != "") {
  831. this.typeb = "";
  832. }
  833. }
  834. } else {
  835. if (this.typeb == typeid) {
  836. this.typeb = "";
  837. if (this.oid == "69893dca-1d47-11ed-8c78-005056b86db5") {
  838. this.typeE.push(ftypeId);
  839. }
  840. } else {
  841. this.typeb = typeid;
  842. if (this.typeE.indexOf(ftypeId) != -1) {
  843. this.typeE.splice(this.typeE.indexOf(ftypeId), 1);
  844. }
  845. }
  846. }
  847. } else if (typeid == "34629907-d02f-11ec-8c78-005056b86db5" || ftypeId == '34629907-d02f-11ec-8c78-005056b86db5' || typeid == "34629907-d02f-11ec-8c78-005056b86ac5" || ftypeId == "34629907-d02f-11ec-8c78-005056b86ac5") {
  848. if (type == 1) {
  849. if (this.typeE.indexOf(typeid) != -1) {
  850. if (this.oid == "69893dca-1d47-11ed-8c78-005056b86db5") {
  851. return;
  852. } else {
  853. this.typeE.splice(this.typeE.indexOf(typeid), 1);
  854. }
  855. } else {
  856. this.typeE.push(typeid);
  857. if (this.typed != "") {
  858. this.typed = "";
  859. }
  860. }
  861. } else {
  862. if (this.typed == typeid) {
  863. this.typed = "";
  864. if (this.oid == "69893dca-1d47-11ed-8c78-005056b86db5") {
  865. this.typeE.push(ftypeId);
  866. }
  867. } else {
  868. this.typed = typeid;
  869. if (this.typeE.indexOf(ftypeId) != -1) {
  870. this.typeE.splice(this.typeE.indexOf(ftypeId), 1);
  871. }
  872. }
  873. }
  874. }
  875. // this.loading = true;
  876. this.getCourse();
  877. },
  878. getCourse() {
  879. if (!this.loading) {
  880. this.loading = this.openLoading(
  881. document.querySelector(".student_table")
  882. );
  883. }
  884. // var typeE = [];
  885. // var typea, typeb, typec, typed;
  886. // if (this.isChoose == 1) {
  887. // for (var i = 0; i < this.CourseType[0].length; i++) {
  888. // if (this.courseTypeId[this.CourseType[0][i].id] == "1") {
  889. // typeE.push(this.CourseType[0][i].id);
  890. // } else if (this.courseTypeId[this.CourseType[0][i].id] != "") {
  891. // if (this.CourseType[0][i].name == "年级") {
  892. // typea = this.courseTypeId[this.CourseType[0][i].id];
  893. // } else if (this.CourseType[0][i].name == "专栏") {
  894. // typeb = this.courseTypeId[this.CourseType[0][i].id];
  895. // } else if (this.CourseType[0][i].name == "栏目") {
  896. // typeb = this.courseTypeId[this.CourseType[0][i].id];
  897. // } else if (this.CourseType[0][i].name == "学院") {
  898. // typeb = this.courseTypeId[this.CourseType[0][i].id];
  899. // } else if (this.CourseType[0][i].name == "主题") {
  900. // typeb = this.courseTypeId[this.CourseType[0][i].id];
  901. // } else if (this.CourseType[0][i].name == "新技能") {
  902. // typec = this.courseTypeId[this.CourseType[0][i].id];
  903. // } else if (this.CourseType[0][i].name == "学科") {
  904. // typed = this.courseTypeId[this.CourseType[0][i].id];
  905. // }
  906. // this.courseTypeSon.push(
  907. // this.courseTypeId[this.CourseType[0][i].id]
  908. // );
  909. // }
  910. // }
  911. // }
  912. console.log("typea", this.typea);
  913. this.isLoading = true;
  914. let params = {
  915. type: this.groupA,
  916. uid: this.userid,
  917. oid: this.oid,
  918. org: this.org,
  919. typea: this.typea != undefined ? this.typea : "",
  920. typeb: this.typeb != undefined ? this.typeb : "",
  921. typec: "",
  922. typed: this.typed != undefined ? this.typed : "",
  923. typeE: this.typeE.join(","),
  924. cu: "",
  925. cn: this.courseName,
  926. page: this.page,
  927. pageSize: this.pageSize,
  928. };
  929. this.ajax
  930. .get(this.$store.state.api + "selectCourseNew2", params)
  931. .then((res) => {
  932. this.loading.close();
  933. this.loading = "";
  934. this.isLoading = false;
  935. this.total = res.data[0].length > 0 ? res.data[0][0].num : 0;
  936. this.course = res.data[0];
  937. })
  938. .catch((err) => {
  939. console.error(err);
  940. });
  941. },
  942. getTypeName() {
  943. this.$forceUpdate();
  944. this.page = 1;
  945. this.isChoose = 1;
  946. this.getCourse();
  947. },
  948. // searchCourse() {
  949. // this.isLoading = true;
  950. // let params = {
  951. // cu: "",
  952. // cn: this.courseName,
  953. // page: this.page,
  954. // };
  955. // this.ajax
  956. // .get(this.$store.state.api + "searchCourse", params)
  957. // .then((res) => {
  958. // this.isLoading = false;
  959. // this.total = res.data[0].length > 0 ? res.data[0][0].num : 0;
  960. // this.course = res.data[0];
  961. // })
  962. // .catch((err) => {
  963. // this.isLoading = false;
  964. // console.error(err);
  965. // });
  966. // },
  967. deleteCourse(cid) {
  968. // if (this.time()) {
  969. this.$confirm("确定删除此课程吗?", "提示", {
  970. confirmButtonText: "确定",
  971. cancelButtonText: "取消",
  972. type: "warning",
  973. })
  974. .then(() => {
  975. const loading = this.openLoading(
  976. document.querySelector(".student_table")
  977. );
  978. this.isLoading = true;
  979. let params = {
  980. cid: cid,
  981. };
  982. this.ajax
  983. .get(this.$store.state.api + "deleteCourse", params)
  984. .then((res) => {
  985. loading.close();
  986. this.isLoading = false;
  987. this.$message.success("删除成功");
  988. this.getCourse();
  989. })
  990. .catch((err) => {
  991. console.error(err);
  992. });
  993. })
  994. .catch(() => {
  995. loading.close();
  996. this.isLoading = false;
  997. return;
  998. });
  999. // }
  1000. },
  1001. selectAllType() {
  1002. let params = {
  1003. org: this.org && this.org != "" ? this.org : "",
  1004. oid: this.oid && this.oid != "" ? this.oid : "",
  1005. };
  1006. this.ajax
  1007. .get(this.$store.state.api + "selectAllType", params)
  1008. .then((res) => {
  1009. if (this.oid == "69893dca-1d47-11ed-8c78-005056b86db5") {
  1010. res.data[0] = [...res.data[0], ...res.data[4]]
  1011. }
  1012. this.CourseType = res.data;
  1013. this.CourseType2 = [
  1014. { name: "智见课程", id: [] },
  1015. { name: "智行课程", id: [] },
  1016. { name: "智创课程", id: [] },
  1017. ];
  1018. for (var cti = 0; cti < res.data[0].length; cti++) {
  1019. if (
  1020. res.data[0][cti].id == "34628934-d02f-11ec-8c78-005056b86db5" ||
  1021. res.data[0][cti].id == "34629907-d02f-11ec-8c78-005056b86db5"
  1022. ) {
  1023. this.CourseType2[0].id.push(res.data[0][cti].id);
  1024. } else if (res.data[0][cti].id == "34628934-d02f-11ec-8c78-005056b86ac5" ||
  1025. res.data[0][cti].id == "34629907-d02f-11ec-8c78-005056b86ac5") {
  1026. this.CourseType2[1].id.push(res.data[0][cti].id);
  1027. } else if (res.data[0][cti].id == "34629bcc-d02f-11ec-8c78-005056b86db5") {
  1028. this.CourseType2[2].id.push(res.data[0][cti].id);
  1029. }
  1030. if (res.data[0][cti].id == "34628934-d02f-11ec-8c78-005056b86db5" || res.data[0][cti].id == "34628934-d02f-11ec-8c78-005056b86ac5") {
  1031. res.data[0][cti].name = "年级";
  1032. } else if (res.data[0][cti].id == "34629907-d02f-11ec-8c78-005056b86db5" || res.data[0][cti].id == "34629907-d02f-11ec-8c78-005056b86ac5") {
  1033. res.data[0][cti].name = "学科";
  1034. } else if (res.data[0][cti].id == "34629bcc-d02f-11ec-8c78-005056b86db5") {
  1035. res.data[0][cti].name = "主题";
  1036. }
  1037. }
  1038. for (var i = 0; i < res.data[0].length; i++) {
  1039. if (!this.cid) {
  1040. this.courseTypeId[res.data[0][i].id] = [];
  1041. }
  1042. if (!this.CourseTypeJson[res.data[0][i].id]) {
  1043. this.CourseTypeJson[res.data[0][i].id] = [];
  1044. }
  1045. if (this.oid == "69893dca-1d47-11ed-8c78-005056b86db5") {
  1046. if (res.data[0][i].name == "栏目") {
  1047. this.CourseType[0][i].name = "主题";
  1048. }
  1049. }
  1050. if (res.data[2].length == 0 && res.data[3].length == 0) {
  1051. for (var j = 0; j < res.data[1].length; j++) {
  1052. if (res.data[0][i].id == res.data[1][j].pid) {
  1053. this.CourseTypeJson[res.data[0][i].id].push(res.data[1][j]); // 去除公共分类
  1054. }
  1055. }
  1056. } else {
  1057. if (res.data[2].length > 0) {
  1058. for (var j = 0; j < res.data[2].length; j++) {
  1059. if (res.data[0][i].id == res.data[2][j].pid) {
  1060. this.CourseTypeJson[res.data[0][i].id].push(res.data[2][j]); // 去除公共分类
  1061. }
  1062. }
  1063. }
  1064. if (res.data[3].length > 0) {
  1065. for (var j = 0; j < res.data[3].length; j++) {
  1066. if (res.data[0][i].id == res.data[3][j].pid) {
  1067. this.CourseTypeJson[res.data[0][i].id].push(res.data[3][j]); // 去除公共分类
  1068. }
  1069. }
  1070. }
  1071. }
  1072. }
  1073. })
  1074. .catch((err) => {
  1075. console.error(err);
  1076. });
  1077. },
  1078. selectType() {
  1079. this.ajax
  1080. .get(this.$store.state.api + "selectType")
  1081. .then((res) => {
  1082. this.CourseType = res.data;
  1083. for (var i = 0; i < res.data[0].length; i++) {
  1084. if (!this.cid) {
  1085. this.courseTypeId[res.data[0][i].id] = "";
  1086. }
  1087. // if (this.oid == "69893dca-1d47-11ed-8c78-005056b86db5") {
  1088. // if (res.data[0][i].name == "栏目") {
  1089. // this.CourseType[0][i].name = "主题";
  1090. // }
  1091. // }
  1092. for (var j = 0; j < res.data[1].length; j++) {
  1093. if (res.data[0][i].id == res.data[1][j].pid) {
  1094. if (!this.CourseTypeJson[res.data[0][i].id]) {
  1095. this.CourseTypeJson[res.data[0][i].id] = [];
  1096. }
  1097. this.CourseTypeJson[res.data[0][i].id].push(res.data[1][j]); //去除公共分类
  1098. }
  1099. }
  1100. }
  1101. this.selectTypeByOid();
  1102. this.selectTypeByOrg();
  1103. })
  1104. .catch((err) => {
  1105. console.error(err);
  1106. });
  1107. },
  1108. selectTypeByOid() {
  1109. let params = {
  1110. oid: this.oid,
  1111. };
  1112. this.ajax
  1113. .get(this.$store.state.api + "selectTypeByOid", params)
  1114. .then((res) => {
  1115. for (var i = 0; i < res.data[0].length; i++) {
  1116. for (var j = 0; j < res.data[1].length; j++) {
  1117. if (res.data[0][i].id == res.data[1][j].pid) {
  1118. if (!this.CourseTypeJson[res.data[0][i].id]) {
  1119. this.CourseTypeJson[res.data[0][i].id] = [];
  1120. }
  1121. this.CourseTypeJson[res.data[0][i].id].push(res.data[1][j]);
  1122. }
  1123. }
  1124. }
  1125. this.$forceUpdate();
  1126. })
  1127. .catch((err) => {
  1128. console.error(err);
  1129. });
  1130. },
  1131. selectTypeByOrg() {
  1132. let params = {
  1133. oid: this.org,
  1134. };
  1135. this.ajax
  1136. .get(this.$store.state.api + "selectTypeByOrg", params)
  1137. .then((res) => {
  1138. for (var i = 0; i < res.data[0].length; i++) {
  1139. for (var j = 0; j < res.data[1].length; j++) {
  1140. if (res.data[0][i].id == res.data[1][j].pid) {
  1141. if (!this.CourseTypeJson[res.data[0][i].id]) {
  1142. this.CourseTypeJson[res.data[0][i].id] = [];
  1143. }
  1144. this.CourseTypeJson[res.data[0][i].id].push(res.data[1][j]);
  1145. }
  1146. }
  1147. }
  1148. this.$forceUpdate();
  1149. })
  1150. .catch((err) => {
  1151. console.error(err);
  1152. });
  1153. },
  1154. openCourse() {
  1155. this.dialogVisibleCourse = true;
  1156. this.getTeamCourse();
  1157. },
  1158. getTeamCourse() {
  1159. let params = {
  1160. uid: this.userid,
  1161. oid: this.oid,
  1162. };
  1163. this.ajax
  1164. .get(this.$store.state.api + "selectCourseTeam", params)
  1165. .then((res) => {
  1166. this.courseTeam = res.data[0];
  1167. })
  1168. .catch((err) => {
  1169. console.error(err);
  1170. });
  1171. },
  1172. search() {
  1173. this.page = 1;
  1174. this.getCourse();
  1175. },
  1176. checkProblem(res) {
  1177. this.problemCourse = res;
  1178. this.dialogVisible = true;
  1179. },
  1180. copyCourse(cid) {
  1181. let params = [
  1182. {
  1183. cid: cid,
  1184. uid: this.userid,
  1185. },
  1186. ];
  1187. this.ajax
  1188. .post(this.$store.state.api + "copyCourse", params)
  1189. .then((res) => {
  1190. this.page = 1;
  1191. if (this.role == "1") {
  1192. this.groupA = "4";
  1193. } else {
  1194. this.groupA = "0";
  1195. }
  1196. this.$message.success("复制成功")
  1197. this.clear();
  1198. })
  1199. .catch((err) => {
  1200. console.error(err);
  1201. });
  1202. },
  1203. },
  1204. created() {
  1205. if (this.role == "1") {
  1206. this.groupA = "4";
  1207. }
  1208. this.page = 1;
  1209. // this.selectType();
  1210. this.selectAllType();
  1211. this.getCourse();
  1212. let _this = this
  1213. window.goToCourse3 = function(){
  1214. _this.goToCourse3()
  1215. }
  1216. window.goToCourse = function(){
  1217. _this.goToCourse()
  1218. }
  1219. },
  1220. };
  1221. </script>
  1222. <style scoped>
  1223. @media screen and (max-width: 1380px) {
  1224. .out_box {
  1225. width: calc(100% / 4 - (15px * 3) / 4) !important;
  1226. }
  1227. .out_box:nth-child(5n) {
  1228. margin-right: 15px !important;
  1229. }
  1230. .out_box:nth-child(4n) {
  1231. margin-right: 0 !important;
  1232. }
  1233. }
  1234. @media screen and (max-width: 1080px) {
  1235. .out_box {
  1236. width: calc(100% / 3 - (15px * 2) / 3) !important;
  1237. }
  1238. .out_box:nth-child(5n) {
  1239. margin-right: 15px !important;
  1240. }
  1241. .out_box:nth-child(4n) {
  1242. margin-right: 15px !important;
  1243. }
  1244. .out_box:nth-child(3n) {
  1245. margin-right: 0 !important;
  1246. }
  1247. }
  1248. .dialog_diy>>>.el-dialog__header {
  1249. background: #3d67bc !important;
  1250. padding: 15px 20px;
  1251. }
  1252. .dialog_diy>>>.el-dialog__title {
  1253. color: #fff;
  1254. }
  1255. .dialog_diy>>>.el-dialog__headerbtn {
  1256. top: 19px;
  1257. }
  1258. .dialog_diy>>>.el-dialog__headerbtn .el-dialog__close {
  1259. color: #fff;
  1260. }
  1261. .dialog_diy>>>.el-dialog__headerbtn .el-dialog__close:hover {
  1262. color: #fff;
  1263. }
  1264. .student_head>>>.el-button--primary {
  1265. background-color: #2268bc;
  1266. }
  1267. .xls_button {
  1268. font-size: 14px;
  1269. cursor: pointer;
  1270. text-decoration: underline;
  1271. color: rgb(34, 104, 188);
  1272. }
  1273. .student_head {
  1274. display: flex;
  1275. justify-content: space-between;
  1276. align-items: baseline;
  1277. flex-direction: row;
  1278. flex-wrap: wrap;
  1279. }
  1280. .top {
  1281. display: flex;
  1282. justify-content: space-between;
  1283. width: 100% !important;
  1284. box-sizing: border-box;
  1285. margin: 0px auto;
  1286. padding: 10px 5px;
  1287. height: 54px;
  1288. }
  1289. .bgColor {
  1290. background: #0061FF;
  1291. }
  1292. .student_search {
  1293. display: flex;
  1294. align-items: center;
  1295. width: calc(100% / 3);
  1296. }
  1297. .student_search span {
  1298. margin: 0 10px 0 0;
  1299. min-width: 65px;
  1300. }
  1301. .student_button {
  1302. display: flex;
  1303. /* overflow: hidden; */
  1304. height: 40px;
  1305. }
  1306. .upload-demo {
  1307. display: flex;
  1308. flex-direction: column;
  1309. align-items: end;
  1310. /* position: relative; */
  1311. width: 100px;
  1312. overflow: hidden;
  1313. }
  1314. .student_table {
  1315. /* padding: 20px 0; */
  1316. height: 100%;
  1317. /* overflow: auto; */
  1318. min-height: 360px;
  1319. }
  1320. .student_empty {
  1321. display: flex;
  1322. justify-content: center;
  1323. align-items: center;
  1324. }
  1325. .el-table>>>.even_row {
  1326. background-color: #f1f1f1;
  1327. }
  1328. .time {
  1329. font-size: 13px;
  1330. color: #999;
  1331. }
  1332. .course_button {
  1333. padding: 10px 20px;
  1334. }
  1335. .course_button_box {
  1336. display: flex;
  1337. margin-top: 5px;
  1338. justify-content: space-between;
  1339. }
  1340. .course_rate {
  1341. margin-top: 5px;
  1342. }
  1343. .course_view {
  1344. display: flex;
  1345. align-items: center;
  1346. margin: 5px 0 0 0;
  1347. }
  1348. .course_view i {
  1349. background-image: url("../../assets/liulan.png");
  1350. width: 25px;
  1351. height: 25px;
  1352. background-size: 100% 100%;
  1353. /* margin-top: 1px; */
  1354. line-height: 25px;
  1355. vertical-align: text-top;
  1356. background-repeat: no-repeat;
  1357. }
  1358. .image {
  1359. width: 100%;
  1360. height: 150px;
  1361. display: block;
  1362. }
  1363. .course_box {
  1364. display: flex;
  1365. flex-wrap: wrap;
  1366. }
  1367. .student_page {
  1368. width: 100%;
  1369. margin: 0 auto;
  1370. background: #e6eaf0;
  1371. }
  1372. .course_create_box {
  1373. font-size: 18px;
  1374. }
  1375. .course_name {
  1376. margin-top: 10px;
  1377. }
  1378. .course_name span {
  1379. margin-bottom: 10px;
  1380. display: block;
  1381. }
  1382. .homework_box {
  1383. display: flex;
  1384. align-items: center;
  1385. flex-wrap: wrap;
  1386. }
  1387. .course_homework {
  1388. width: 130px;
  1389. display: flex;
  1390. justify-content: center;
  1391. flex-direction: column;
  1392. align-items: center;
  1393. margin: 0 10px 10px 0;
  1394. }
  1395. .course_type {
  1396. margin-top: 10px;
  1397. display: flex;
  1398. }
  1399. .course_type1 span {
  1400. margin-bottom: 10px;
  1401. display: block;
  1402. }
  1403. .course_type2 {
  1404. margin-left: 20px;
  1405. }
  1406. .course_type2 span {
  1407. margin-bottom: 10px;
  1408. display: block;
  1409. }
  1410. .course_empty {
  1411. color: rgb(110, 110, 110);
  1412. width: 100%;
  1413. height: 100%;
  1414. display: flex;
  1415. align-items: center;
  1416. justify-content: center;
  1417. }
  1418. .el_cards>>>.el-card__body {
  1419. height: 100%;
  1420. }
  1421. .courseBtnBox {
  1422. display: flex;
  1423. flex-direction: column;
  1424. justify-content: space-between;
  1425. height: calc(100% - 170px);
  1426. padding: 10px;
  1427. }
  1428. .wordUpload {
  1429. display: flex;
  1430. }
  1431. .wordUpload>.buttonUp {
  1432. margin-right: 5px;
  1433. }
  1434. .out_box {
  1435. display: flex;
  1436. flex-direction: column;
  1437. flex-wrap: nowrap;
  1438. width: calc(100% / 5 - (15px * 4) / 5);
  1439. /* width: 280px; */
  1440. background: #fff;
  1441. margin-right: 15px;
  1442. /* border: 1px solid #ccc; */
  1443. height: fit-content;
  1444. box-sizing: border-box;
  1445. border-radius: 0px 0px 5px 5px;
  1446. /* overflow: hidden; */
  1447. margin-bottom: 15px;
  1448. position: relative;
  1449. border-radius: 8px;
  1450. box-sizing: border-box;
  1451. overflow: hidden;
  1452. border: 1px solid #3682fc00;
  1453. }
  1454. .out_box:hover {
  1455. border: 1px solid #3681FC;
  1456. }
  1457. .out_box:nth-child(5n) {
  1458. margin-right: 0;
  1459. }
  1460. .bottom_box {
  1461. display: flex;
  1462. padding: 10px;
  1463. flex-direction: column;
  1464. box-sizing: border-box;
  1465. height: 121px;
  1466. flex-wrap: nowrap;
  1467. justify-content: space-evenly;
  1468. }
  1469. .bottom_box>div:nth-child(1) {
  1470. width: 100%;
  1471. /* overflow: hidden;
  1472. text-overflow: ellipsis;
  1473. white-space: nowrap;
  1474. font-weight: bold; */
  1475. display: flex;
  1476. align-items: center;
  1477. justify-content: space-between;
  1478. }
  1479. .bottom_box>div:nth-child(1)>span:nth-child(1) {
  1480. max-width: 100%;
  1481. overflow: hidden;
  1482. text-overflow: ellipsis;
  1483. white-space: nowrap;
  1484. font-weight: bold;
  1485. }
  1486. .bottom_box>div:nth-child(1)>span:nth-child(2) {
  1487. min-width: fit-content;
  1488. font-size: 14px;
  1489. color: #8c8c8c;
  1490. }
  1491. .tup {
  1492. width: 100%;
  1493. height: 180px;
  1494. margin: 0 auto;
  1495. overflow: hidden;
  1496. display: flex;
  1497. align-items: center;
  1498. padding: 10px;
  1499. box-sizing: border-box;
  1500. }
  1501. .tup>img {
  1502. width: 100%;
  1503. height: 100%;
  1504. object-fit: cover;
  1505. }
  1506. .kc_time {
  1507. margin-top: 8px;
  1508. font-size: 14px;
  1509. color: #717C8D;
  1510. }
  1511. .kc_time+.kc_time {
  1512. margin-top: 0;
  1513. }
  1514. .kc_t {
  1515. margin-top: 5px;
  1516. width: 100%;
  1517. white-space: nowrap;
  1518. overflow: hidden;
  1519. text-overflow: ellipsis;
  1520. display: flex;
  1521. align-items: center;
  1522. justify-content: space-between;
  1523. }
  1524. .kc_t>span:nth-child(1) {
  1525. max-width: 100%;
  1526. overflow: hidden;
  1527. text-overflow: ellipsis;
  1528. white-space: nowrap;
  1529. }
  1530. .kc_t>span:nth-child(2) {
  1531. min-width: fit-content;
  1532. font-size: 14px;
  1533. color: #8c8c8c;
  1534. }
  1535. .three_bottom {
  1536. display: flex;
  1537. flex-direction: row;
  1538. justify-content: space-around;
  1539. height: 45px;
  1540. align-items: center;
  1541. background: #fff;
  1542. font-size: 14px;
  1543. border-top: 1px solid #ddd;
  1544. box-sizing: border-box;
  1545. }
  1546. .three_bottom>div {
  1547. cursor: pointer;
  1548. width: 100%;
  1549. text-align: center;
  1550. }
  1551. .three_bottom>div+div {
  1552. border-left: 1px solid #ddd;
  1553. }
  1554. .three_bottom>div:hover {
  1555. color: #3681FC;
  1556. font-weight: bold;
  1557. }
  1558. .three_bottom .deleteB {
  1559. color: #E96E6E;
  1560. }
  1561. .three_bottom .deleteB:hover {
  1562. color: #E96E6E;
  1563. font-weight: bold;
  1564. }
  1565. .head_left {
  1566. display: flex;
  1567. }
  1568. .student_input>>>.el-input__inner {
  1569. height: 40px;
  1570. width: 190px;
  1571. font-size: 13px;
  1572. padding: 0 10px;
  1573. }
  1574. .course_button {
  1575. color: #fff;
  1576. background: #2268bc;
  1577. width: 75px;
  1578. height: 40px;
  1579. padding: 0 !important;
  1580. font-size: 12px;
  1581. line-height: 40px;
  1582. }
  1583. /* .all_choose {
  1584. margin: 15px 0 10px;
  1585. height: 20%;
  1586. display: flex;
  1587. flex-direction: row;
  1588. align-items: center;
  1589. max-width: calc(100% / 3);
  1590. }
  1591. .all_choose > span {
  1592. width: 50px;
  1593. display: block;
  1594. }
  1595. .choose {
  1596. display: flex;
  1597. flex-direction: row;
  1598. flex-wrap: wrap;
  1599. align-content: space-between;
  1600. height: 100%;
  1601. justify-content: flex-start;
  1602. width: 60%;
  1603. min-width: 868px;
  1604. align-items: center;
  1605. } */
  1606. /* .choose > div:nth-child(2) {
  1607. margin-left: 1%;
  1608. width: 32.33333%;
  1609. }
  1610. .choose > div:nth-child(4) {
  1611. margin-right: 1%;
  1612. width: 32.33333%;
  1613. }
  1614. .choose > div:nth-child(5) {
  1615. margin: 5px 0 0 1%;
  1616. }
  1617. .choose > div:nth-child(4) > span {
  1618. width: 74px !important;
  1619. min-width: 74px;
  1620. }
  1621. .choose > div:nth-child(4) >>> .el-select {
  1622. width: 217.5px;
  1623. min-width: 215.06px;
  1624. } */
  1625. .clear {
  1626. width: 70px;
  1627. height: 35px;
  1628. background: #0061FF;
  1629. color: #fff;
  1630. text-align: center;
  1631. border-radius: 5px;
  1632. line-height: 35px;
  1633. cursor: pointer;
  1634. margin-left: 20px;
  1635. }
  1636. .ct_box {
  1637. height: 500px;
  1638. overflow: auto;
  1639. display: flex;
  1640. flex-wrap: wrap;
  1641. }
  1642. .myCourse {
  1643. position: absolute;
  1644. background: #3c3c3c;
  1645. width: 70px;
  1646. height: 30px;
  1647. border-radius: 5px;
  1648. color: #fff;
  1649. font-size: 14px;
  1650. text-align: center;
  1651. line-height: 30px;
  1652. top: 5px;
  1653. left: 5px;
  1654. }
  1655. .xtCourse {
  1656. position: absolute;
  1657. background: #0061FF;
  1658. width: 70px;
  1659. height: 30px;
  1660. border-radius: 5px;
  1661. color: #fff;
  1662. font-size: 14px;
  1663. text-align: center;
  1664. line-height: 30px;
  1665. top: 5px;
  1666. left: 5px;
  1667. }
  1668. .sub_head {
  1669. position: relative;
  1670. }
  1671. .sub_head::after {
  1672. content: "";
  1673. width: 100%;
  1674. background: #5a9cea;
  1675. height: 2px;
  1676. position: absolute;
  1677. left: 0;
  1678. bottom: -10px;
  1679. }
  1680. .subClick {
  1681. /* font-size: 16px; */
  1682. font-size: 26px;
  1683. cursor: pointer;
  1684. margin-left: 17.5px;
  1685. /* color: #ab582f; */
  1686. /* color: #409eff; */
  1687. color: #999;
  1688. }
  1689. .subClick:hover {
  1690. color: #000;
  1691. }
  1692. .more {
  1693. position: relative;
  1694. }
  1695. .more:hover div {
  1696. display: block;
  1697. color: #000;
  1698. }
  1699. .more div {
  1700. position: absolute;
  1701. bottom: 0px;
  1702. transform: translate(-50%, 100%);
  1703. background: #f5f4f4;
  1704. padding: 10px 20px;
  1705. z-index: 99;
  1706. width: 50px;
  1707. border-radius: 5px;
  1708. box-shadow: 0 0 3px 3px #80808020;
  1709. display: none;
  1710. }
  1711. .more div>span+span {
  1712. margin-top: 10px;
  1713. }
  1714. .more div>span {
  1715. display: block;
  1716. width: 100%;
  1717. text-align: center;
  1718. }
  1719. .more div>span:hover {
  1720. color: #79a2ff;
  1721. }
  1722. .line {
  1723. width: 100%;
  1724. height: 15px;
  1725. background: #e6eaf0;
  1726. }
  1727. .reBox {
  1728. width: 100%;
  1729. /* padding-left: 20px; */
  1730. margin: 0 auto;
  1731. box-sizing: border-box;
  1732. overflow: hidden;
  1733. padding: 10px 15px 0;
  1734. }
  1735. .reTop {
  1736. padding: 0 0 5px;
  1737. /* padding: 20px 0 0 0; */
  1738. /* border-bottom: 1px solid #eee; */
  1739. display: flex;
  1740. flex-direction: row;
  1741. flex-wrap: nowrap;
  1742. align-items: center;
  1743. justify-content: space-between;
  1744. }
  1745. .reTop>div:nth-child(1) {
  1746. font-weight: bold;
  1747. /* width: 40px; */
  1748. /* border-bottom: 1px solid #205cc6; */
  1749. /* padding-bottom: 20px; */
  1750. color: #205cc6;
  1751. /* font-size: 20px; */
  1752. }
  1753. .reTop .reTopCh {
  1754. display: flex;
  1755. }
  1756. .reTop .searchI {
  1757. display: flex;
  1758. flex-direction: row;
  1759. align-items: center;
  1760. border: 1px solid #ccced3;
  1761. width: 250px;
  1762. border-radius: 8px;
  1763. padding: 5px 0;
  1764. /* margin-bottom: 10px; */
  1765. background: #fafafa;
  1766. margin: 0 0 0 10px;
  1767. }
  1768. .search {
  1769. width: 20px;
  1770. padding: 0 5px;
  1771. display: flex;
  1772. align-items: center;
  1773. }
  1774. .search>img {
  1775. width: 100%;
  1776. height: 100%;
  1777. }
  1778. .sInput {
  1779. border: none;
  1780. width: 85%;
  1781. background: #fafafa;
  1782. }
  1783. .sInput:focus-visible {
  1784. outline: none;
  1785. }
  1786. .typeCss {
  1787. display: flex;
  1788. flex-direction: row;
  1789. flex-wrap: wrap;
  1790. justify-content: flex-start;
  1791. align-items: center;
  1792. }
  1793. .choose {
  1794. display: flex;
  1795. flex-direction: column;
  1796. flex-wrap: nowrap;
  1797. height: 100%;
  1798. justify-content: space-evenly;
  1799. align-items: flex-start;
  1800. padding: 10px 0;
  1801. }
  1802. .all_choose {
  1803. display: flex;
  1804. flex-direction: row;
  1805. align-items: baseline;
  1806. margin: 2px 0;
  1807. width: 100%;
  1808. }
  1809. .all_choose>span {
  1810. display: flex;
  1811. margin-right: 5px;
  1812. }
  1813. .all_choose>span>span {
  1814. min-width: 65px;
  1815. max-width: 65px;
  1816. display: block;
  1817. text-align-last: justify;
  1818. }
  1819. .all_choose>span::after {
  1820. content: ':';
  1821. }
  1822. .all_choose>span:nth-child(1) {
  1823. font-weight: bold;
  1824. }
  1825. .all_choose>>>.el-checkbox-group {
  1826. display: flex;
  1827. flex-direction: row;
  1828. width: 820px;
  1829. flex-wrap: wrap;
  1830. align-content: center;
  1831. justify-content: flex-start;
  1832. align-items: center;
  1833. margin-top: 3px;
  1834. }
  1835. .all_choose>.el-checkbox-group>>>.el-checkbox {
  1836. margin-bottom: 10px;
  1837. display: flex;
  1838. flex-direction: row;
  1839. align-items: center;
  1840. }
  1841. .all_choose>.el-checkbox-group>.el-checkbox>>>.el-checkbox__label {
  1842. min-width: 80px;
  1843. overflow: hidden;
  1844. width: 80px;
  1845. text-overflow: ellipsis;
  1846. white-space: nowrap;
  1847. }
  1848. .all_choose>.el-checkbox-group>.el-checkbox>>>.el-checkbox__label:hover {
  1849. width: auto;
  1850. }
  1851. .cName {
  1852. cursor: pointer;
  1853. margin: 0 10px 5px 0;
  1854. color: #b9b6b9;
  1855. min-width: 80px;
  1856. width: 80px;
  1857. white-space: nowrap;
  1858. overflow: hidden;
  1859. text-overflow: ellipsis;
  1860. }
  1861. .isCType {
  1862. color: #6282c2;
  1863. }
  1864. .pType_box {
  1865. margin-top: 0;
  1866. }
  1867. .pType_box>>>.el-radio:focus:not(.is-focus):not(:active):not(.is-disabled) .el-radio__inner {
  1868. -webkit-box-shadow: none !important;
  1869. box-shadow: none !important;
  1870. }
  1871. .buttonBox {
  1872. position: absolute;
  1873. bottom: -0;
  1874. transform: translateY(100%);
  1875. background: #fff;
  1876. border-radius: 5px;
  1877. box-shadow: 0 0 3px 1px #e3e3e3;
  1878. width: 100%;
  1879. }
  1880. .buttonBox>div {
  1881. height: 40px;
  1882. line-height: 40px;
  1883. width: 100%;
  1884. text-align: center;
  1885. color: #000;
  1886. box-sizing: border-box;
  1887. }
  1888. .buttonBox>div+div {
  1889. border-top: 1px solid #e0e0e0;
  1890. }
  1891. .buttonBox>div:hover {
  1892. background: #f6f8ff;
  1893. }</style>