courseList.vue 46 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487
  1. <template>
  2. <div class="container courselist courselistNPC">
  3. <Header />
  4. <!-- <Nav navValue="教材列表" /> -->
  5. <div class="content">
  6. <div class="inner">
  7. <div class="btn-box">
  8. <span @click="handleAdd">
  9. <img src="../assets/common/icon-add.png" />新建教材
  10. </span>
  11. <!-- <el-button @click="handleAdd" size="small" type="primary"
  12. ><img src="../assets/common/icon-add.png">新建教材</el-button
  13. >-->
  14. <!-- <el-input
  15. @keyup.enter.native="handleSearch"
  16. placeholder="请输入内容"
  17. prefix-icon="el-icon-search"
  18. v-model="searchInput"
  19. ></el-input>-->
  20. </div>
  21. <el-form
  22. ref="form"
  23. :inline="true"
  24. :model="form"
  25. class="search-form"
  26. style="margin-left: 10px"
  27. >
  28. <el-form-item>
  29. <el-form-item
  30. class="label-input"
  31. label="名称"
  32. style="margin-right: 30px"
  33. >
  34. <el-input v-model="form.name" maxlength="100" />
  35. </el-form-item>
  36. <!-- <el-form-item class="label-input" label="作者">
  37. <el-input v-model="form.author"></el-input>
  38. </el-form-item>-->
  39. <el-form-item label="所属机构" style="margin-right: 30px">
  40. <el-select
  41. ref="select"
  42. v-model="form.agency"
  43. placeholder="请选择机构"
  44. @change="onSubmit"
  45. >
  46. <el-option
  47. v-for="(statusItem, index) in myOrgList"
  48. :key="'myOrgList' + index"
  49. :label="statusItem.org_name"
  50. :value="statusItem.org_id"
  51. />
  52. </el-select>
  53. </el-form-item>
  54. <el-form-item label="发布状态">
  55. <el-select
  56. v-model="form.publish_status"
  57. placeholder="请选择状态"
  58. @change="onSubmit"
  59. >
  60. <el-option
  61. v-for="statusItem in statusList"
  62. :key="statusItem.value"
  63. :label="statusItem.label"
  64. :value="statusItem.value"
  65. />
  66. </el-select>
  67. </el-form-item>
  68. <el-button size="medium" type="primary" @click="onSubmit"
  69. >查询</el-button
  70. >
  71. </el-form-item>
  72. </el-form>
  73. <div class="table-box">
  74. <el-table
  75. v-loading="tableloading"
  76. :data="tableData"
  77. style="width: 100%"
  78. @sort-change="handleSort"
  79. :default-sort = dataSort
  80. >
  81. <el-table-column
  82. class="table-firstC"
  83. label="名称"
  84. prop="name"
  85. width="150"
  86. sortable='custom'
  87. />
  88. <el-table-column label="英文名" prop="name_english" width="150" sortable='custom' />
  89. <el-table-column label="作者" prop="author" width="100" sortable='custom' />
  90. <el-table-column label="版本" prop="edition" width="100" />
  91. <el-table-column label="出版社" prop="publisher" width="150" />
  92. <el-table-column
  93. label="出版编号"
  94. prop="publish_number"
  95. width="100"
  96. />
  97. <el-table-column label="所属机构" prop="org_name" width="150" />
  98. <el-table-column
  99. :formatter="handleStatus"
  100. label="发布状态"
  101. prop="publish_status"
  102. width="100"
  103. />
  104. <el-table-column
  105. :formatter="handleScope"
  106. label="发布范围"
  107. prop="publish_scope"
  108. width="100"
  109. />
  110. <el-table-column
  111. label="创建时间"
  112. prop="create_time"
  113. width="170"
  114. sortable='custom'
  115. />
  116. <el-table-column fixed="right" label="操作" prop width="370">
  117. <template slot-scope="scope">
  118. <el-button type="text" @click="handleClick(scope.row)"
  119. >编辑</el-button
  120. >
  121. <el-button type="text" @click="handleView(scope.row)"
  122. >预览</el-button
  123. >
  124. <el-button
  125. type="text"
  126. @click="handleUp(scope.row, scope.$index)"
  127. >{{
  128. scope.row.publish_status === 0 ? "上架" : "下架"
  129. }}</el-button
  130. >
  131. <el-button
  132. type="text"
  133. @click="handleEdit(scope.row, scope.$index)"
  134. >教材信息</el-button
  135. >
  136. <el-button type="text" @click="handleDiscount(scope.row)"
  137. >授权码</el-button
  138. >
  139. <el-button type="text" @click="handleCreatLink(scope.row)"
  140. >生成链接</el-button
  141. >
  142. <el-button type="text" @click="handleDel(scope.row)"
  143. >删除</el-button
  144. >
  145. </template>
  146. </el-table-column>
  147. </el-table>
  148. </div>
  149. <el-pagination
  150. :current-page="currentPage"
  151. :page-size="10"
  152. :page-sizes="[1, 10, 20, 30, 40, 50]"
  153. :total="courseTotal"
  154. layout="total, sizes, prev, pager, next, jumper"
  155. @current-change="handleCurrentChange"
  156. @size-change="handleSizeChange"
  157. />
  158. </div>
  159. <div
  160. id="temporaryLinks"
  161. style="
  162. height: 0;
  163. width: 1200px;
  164. opacity: 0;
  165. z-index: -1;
  166. word-break: break-all;
  167. "
  168. ></div>
  169. </div>
  170. <el-dialog
  171. :before-close="handleClose"
  172. :title="titleEdit"
  173. :visible.sync="dialogFlag"
  174. :close-on-click-modal="false"
  175. >
  176. <el-form ref="formDialog" :model="formDialog" :rules="courseListRules">
  177. <el-tabs v-model="activeName">
  178. <el-tab-pane label="教材信息" name="courseInfo">
  179. <el-form-item
  180. class="label-input"
  181. label="名称"
  182. label-width="90px"
  183. prop="name"
  184. >
  185. <el-input
  186. v-model="formDialog.name"
  187. autocomplete="off"
  188. name="name"
  189. maxlength="100"
  190. show-word-limit
  191. />
  192. </el-form-item>
  193. <el-form-item
  194. class="label-input"
  195. label="英文名"
  196. label-width="90px"
  197. prop="name_english"
  198. >
  199. <el-input
  200. v-model="formDialog.name_english"
  201. autocomplete="off"
  202. name="name_english"
  203. maxlength="100"
  204. show-word-limit
  205. />
  206. </el-form-item>
  207. <el-form-item label="教材类型" label-width="90px" prop="type_id">
  208. <!-- -->
  209. <el-select
  210. ref="typeSelects"
  211. v-model="formDialog.type_id"
  212. name="bookType"
  213. placeholder="请选择教材类型"
  214. >
  215. <el-option
  216. v-for="(item, index) in typeList"
  217. :key="'type' + index"
  218. :label="item.name"
  219. :value="item.id"
  220. />
  221. </el-select>
  222. </el-form-item>
  223. <el-form-item
  224. class="label-input"
  225. label="作者"
  226. label-width="90px"
  227. prop="author"
  228. >
  229. <el-input
  230. v-model="formDialog.author"
  231. autocomplete="off"
  232. name="author"
  233. maxlength="20"
  234. show-word-limit
  235. />
  236. </el-form-item>
  237. <el-form-item
  238. class="label-input"
  239. label="版本"
  240. label-width="90px"
  241. prop="edition"
  242. >
  243. <el-input
  244. v-model="formDialog.edition"
  245. autocomplete="off"
  246. name="edition"
  247. maxlength="20"
  248. show-word-limit
  249. />
  250. </el-form-item>
  251. <el-form-item
  252. class="label-input"
  253. label="出版社"
  254. label-width="90px"
  255. prop="publisher"
  256. >
  257. <el-input
  258. v-model="formDialog.publisher"
  259. autocomplete="off"
  260. name="publisher"
  261. maxlength="20"
  262. show-word-limit
  263. />
  264. </el-form-item>
  265. <el-form-item
  266. class="label-input"
  267. label="出版编号"
  268. label-width="90px"
  269. prop="publish_number"
  270. >
  271. <el-input
  272. v-model="formDialog.publish_number"
  273. autocomplete="off"
  274. name="publish_number"
  275. maxlength="30"
  276. show-word-limit
  277. />
  278. </el-form-item>
  279. <el-form-item
  280. class="label-input"
  281. label="丛书编号"
  282. label-width="90px"
  283. prop="series_code"
  284. >
  285. <el-input
  286. autocomplete="off"
  287. name="series_code"
  288. v-model="formDialog.series_code"
  289. maxlength="26"
  290. show-word-limit
  291. ></el-input>
  292. </el-form-item>
  293. <el-form-item
  294. class="label-input"
  295. label="价格"
  296. label-width="90px"
  297. prop="price"
  298. >
  299. <el-input
  300. v-model="formDialog.price"
  301. autocomplete="off"
  302. name="price"
  303. type="number"
  304. @blur="blurPrice"
  305. @input="inputPrice"
  306. />
  307. </el-form-item>
  308. <el-form-item label="所属机构" label-width="90px" prop="org_id">
  309. <!-- -->
  310. <el-select
  311. ref="selects"
  312. v-model="formDialog.org_id"
  313. name="agency"
  314. placeholder="请选择机构"
  315. @change="changeAgency"
  316. >
  317. <el-option
  318. v-for="(statusItem, index) in diaMyOrgList"
  319. :key="'diaMyOrgList' + index"
  320. :label="statusItem.org_name"
  321. :value="statusItem.org_id"
  322. />
  323. </el-select>
  324. </el-form-item>
  325. <el-form-item
  326. label="教材描述"
  327. label-width="90px"
  328. prop="description"
  329. >
  330. <el-input
  331. v-model="formDialog.description"
  332. type="textarea"
  333. maxlength="500"
  334. show-word-limit
  335. />
  336. </el-form-item>
  337. <!-- <el-form-item label="发布状态" label-width="90px">
  338. <el-radio label="0" v-model="formDialog.publish_status">下架</el-radio>
  339. <el-radio label="1" v-model="formDialog.publish_status">上架</el-radio>
  340. </el-form-item>-->
  341. <!-- <el-form-item
  342. label="发布范围"
  343. label-width="90px"
  344. prop="publish_scope"
  345. >
  346. <el-radio v-model="formDialog.publish_scope" :label="1"
  347. >所有用户可见</el-radio
  348. >
  349. <el-radio v-model="formDialog.publish_scope" :label="0"
  350. >机构内用户可见</el-radio
  351. >
  352. </el-form-item> -->
  353. <el-form-item
  354. label="主题颜色"
  355. label-width="90px"
  356. prop="theme_color"
  357. >
  358. <el-radio v-model="formDialog.theme_color" label="red"
  359. >红色</el-radio
  360. >
  361. <el-radio v-model="formDialog.theme_color" label="green"
  362. >绿色</el-radio
  363. >
  364. <el-radio v-model="formDialog.theme_color" label="brown"
  365. >棕色</el-radio
  366. >
  367. </el-form-item>
  368. <el-form-item label="教材图片" label-width="90px" prop="fileList">
  369. <el-upload
  370. :action="url"
  371. :file-list="fileList"
  372. :limit="1"
  373. :before-upload="beforeUpload"
  374. :on-exceed="handleExceed"
  375. :on-preview="handlePreview"
  376. :on-remove="handleRemove"
  377. :on-success="handleSuccess"
  378. accept=".jpg, .jpeg, .png"
  379. class="upload-demo"
  380. list-type="picture"
  381. multiple
  382. style="width: 500px"
  383. >
  384. <el-button size="mini" type="success">上传封面</el-button>
  385. <div
  386. style="display: inline; padding-left: 30px"
  387. slot="tip"
  388. class="el-upload__tip"
  389. >
  390. 只能上传.jpg, .jpeg, .png文件,大小不超过2MB
  391. </div>
  392. </el-upload>
  393. </el-form-item>
  394. </el-tab-pane>
  395. <el-tab-pane label="教材资源" name="courseResource">
  396. <el-form-item
  397. label="视频资源"
  398. label-width="90px"
  399. prop="fileListVideo"
  400. >
  401. <el-upload
  402. :action="url"
  403. :file-list="fileListVideo"
  404. :limit="100"
  405. :before-upload="beforeUploadVideo"
  406. :on-exceed="handleExceedVideo"
  407. :on-remove="handleRemoveVideo"
  408. :on-success="handleSuccessVideo"
  409. :before-remove="beforeRemoveVideo"
  410. accept="video/*"
  411. class="upload-demo"
  412. multiple
  413. style="width: 500px"
  414. >
  415. <el-button size="mini" type="success" :loading="uploadingVideo"
  416. >上传视频</el-button
  417. >
  418. <div
  419. style="display: inline; padding-left: 30px"
  420. slot="tip"
  421. class="el-upload__tip"
  422. >
  423. 只能上传视频文件,大小不超过500MB
  424. </div>
  425. </el-upload>
  426. </el-form-item>
  427. <el-form-item
  428. label="课文音频"
  429. label-width="90px"
  430. prop="fileListAudio"
  431. >
  432. <el-upload
  433. :action="url"
  434. :file-list="fileListAudio"
  435. :limit="100"
  436. :before-upload="beforeUploadAudio"
  437. :on-exceed="handleExceedVideo"
  438. :on-remove="handleRemoveAudio"
  439. :on-success="handleSuccessAudio"
  440. :before-remove="beforeRemoveVideo"
  441. accept="audio/*"
  442. class="upload-demo"
  443. multiple
  444. style="width: 500px"
  445. >
  446. <el-button size="mini" type="success" :loading="uploadingAudio"
  447. >上传音频</el-button
  448. >
  449. <div
  450. style="display: inline; padding-left: 30px"
  451. slot="tip"
  452. class="el-upload__tip"
  453. >
  454. 只能上传音频文件,大小不超过20MB
  455. </div>
  456. </el-upload>
  457. </el-form-item>
  458. <el-form-item
  459. label="其他音频"
  460. label-width="90px"
  461. prop="fileListOtheraudio"
  462. >
  463. <el-upload
  464. :action="url"
  465. :file-list="fileListOtheraudio"
  466. :limit="100"
  467. :before-upload="beforeUploadOtherAudio"
  468. :on-exceed="handleExceedVideo"
  469. :on-remove="handleRemoveOtheraudio"
  470. :on-success="handleSuccesOthersAudio"
  471. :before-remove="beforeRemoveVideo"
  472. accept="audio/*"
  473. class="upload-demo"
  474. multiple
  475. style="width: 500px"
  476. >
  477. <el-button
  478. size="mini"
  479. type="success"
  480. :loading="uploadingOtherAudio"
  481. >上传音频</el-button
  482. >
  483. <div
  484. style="display: inline; padding-left: 30px"
  485. slot="tip"
  486. class="el-upload__tip"
  487. >
  488. 只能上传音频文件,大小不超过20MB
  489. </div>
  490. </el-upload>
  491. </el-form-item>
  492. <el-form-item label="试读PDF" label-width="90px" prop="fileListDoc">
  493. <el-upload
  494. :action="url"
  495. :file-list="fileListDoc"
  496. :limit="100"
  497. :before-upload="beforeUploadDoc"
  498. :on-exceed="handleExceedVideo"
  499. :on-remove="handleRemoveDoc"
  500. :on-success="handleSuccessDoc"
  501. :before-remove="beforeRemoveVideo"
  502. accept=".pdf"
  503. class="upload-demo"
  504. multiple
  505. style="width: 500px"
  506. >
  507. <el-button size="mini" type="success" :loading="uploadingDoc"
  508. >上传PDF</el-button
  509. >
  510. <div
  511. style="display: inline; padding-left: 30px"
  512. slot="tip"
  513. class="el-upload__tip"
  514. >
  515. 只能上传pdf文件,大小不超过20MB
  516. </div>
  517. </el-upload>
  518. </el-form-item>
  519. </el-tab-pane>
  520. </el-tabs>
  521. </el-form>
  522. <div slot="footer" class="dialog-footer">
  523. <el-button @click="dialogFlag = false">取 消</el-button>
  524. <el-button :loading="loading" type="primary" @click="submitCourse"
  525. >确 定</el-button
  526. >
  527. </div>
  528. </el-dialog>
  529. </div>
  530. </template>
  531. <script>
  532. import Header from "@/components/Header";
  533. import { validNull, validPrice } from "@/utils/validate";
  534. // import Nav from "@/components/inputModules/common/Nav";
  535. import { getContent, getContentFile } from "@/api/ajax";
  536. import { getToken } from "@/utils/auth";
  537. export default {
  538. name: "Courselist",
  539. components: {
  540. // Nav,
  541. Header
  542. },
  543. data() {
  544. const validateNull = (rule, value, callback) => {
  545. if (!validNull(value)) {
  546. callback(new Error("请输入相应内容"));
  547. } else {
  548. callback();
  549. }
  550. };
  551. const validatePrice = (rule, value, callback) => {
  552. if (!validPrice(value)) {
  553. callback(new Error("请输入价格"));
  554. } else {
  555. callback();
  556. }
  557. };
  558. return {
  559. tableData: [], // 数据内容
  560. currentPage: 1, // 当前页码
  561. page_capacity: 10, // 每页条数
  562. courseTotal: 0, // 数据总条数
  563. searchInput: "", // 搜索内容
  564. form: {
  565. author: "",
  566. status: "",
  567. agency: "",
  568. name: "",
  569. name_english: "",
  570. edition: "",
  571. publisher: "",
  572. publish_number: "",
  573. series_code: "",
  574. publish_status: -1
  575. },
  576. dialogFlag: false, // 新建教材弹出层
  577. agency: "",
  578. formDialog: {
  579. name: "",
  580. name_english: "",
  581. edition: "",
  582. description: "",
  583. author: "",
  584. price: null,
  585. org_id: "",
  586. org_name: "",
  587. publish_scope: 1,
  588. publish_number: "",
  589. series_code: "",
  590. picture_id: "",
  591. resource_file_id_list_video: [],
  592. resource_file_id_list_audio: [],
  593. resource_file_id_list_otheraudio: [],
  594. resource_file_id_list_doc: [],
  595. id: "",
  596. publisher: "",
  597. theme_color: "",
  598. type_id: ""
  599. },
  600. agencyList: [
  601. {
  602. id: "",
  603. name: "请选择"
  604. }
  605. ],
  606. agencyLists: [
  607. {
  608. id: "",
  609. name: "请选择"
  610. }
  611. ],
  612. publishStatus: {
  613. 0: "下架",
  614. 1: "上架"
  615. },
  616. publishScope: {
  617. 0: "机构内用户",
  618. 1: "所有用户"
  619. },
  620. fileList: [], // 上传图片数组
  621. fileListVideo: [], // 教材资源视频数组
  622. fileListAudio: [], // 教材资源视频数组
  623. fileListOtheraudio: [],
  624. fileListDoc: [], // 教材资源视频数组
  625. pageIndex: 1,
  626. courseListRules: {
  627. // 填写规则
  628. name: [{ required: true, trigger: "blur", validator: validateNull }],
  629. author: [{ required: true, trigger: "blur", validator: validateNull }],
  630. edition: [{ required: true, trigger: "blur", validator: validateNull }],
  631. publisher: [
  632. { required: true, trigger: "blur", validator: validateNull }
  633. ],
  634. publish_number: [
  635. { required: true, trigger: "blur", validator: validateNull }
  636. ],
  637. org_id: [{ required: true, message: "请选择机构", trigger: "change" }],
  638. type_id: [
  639. { required: true, message: "请选择教材类型", trigger: "change" }
  640. ],
  641. price: [{ required: true, validator: validatePrice }]
  642. },
  643. loading: false,
  644. uploadingVideo: false,
  645. uploadingAudio: false,
  646. uploadingOtherAudio: false,
  647. uploadingDoc: false,
  648. titleEdit: "新建教材",
  649. rowIndex: 0, // 记录编辑教材的index
  650. tableloading: true,
  651. selectLoading: false,
  652. noMore: false,
  653. statusList: [
  654. {
  655. label: "全部",
  656. value: -1
  657. },
  658. {
  659. label: "上架",
  660. value: 1
  661. },
  662. {
  663. label: "下架",
  664. value: 0
  665. }
  666. ],
  667. myOrgList: [
  668. {
  669. org_id: "",
  670. org_name: "全部"
  671. }
  672. ],
  673. diaMyOrgList: [],
  674. typeList: [],
  675. activeName: "courseInfo", // 教材信息tabs
  676. dataSort: localStorage.getItem("dataSort")?JSON.parse(localStorage.getItem("dataSort")):{}
  677. };
  678. },
  679. computed: {
  680. url() {
  681. let userInfor = getToken();
  682. let SessionID = "";
  683. let UserCode = "";
  684. let UserType = "";
  685. if (userInfor) {
  686. let user = JSON.parse(getToken());
  687. UserCode = user.user_code;
  688. UserType = user.user_type;
  689. SessionID = user.session_id;
  690. }
  691. return (
  692. process.env.VUE_APP_BASE_API +
  693. "/GCLSFileServer/WebFileUpload?UserCode=" +
  694. UserCode +
  695. "&UserType=" +
  696. UserType +
  697. "&SessionID=" +
  698. SessionID +
  699. "&SecurityLevel=Mid"
  700. );
  701. }
  702. },
  703. mounted() {
  704. this.getList();
  705. this.getTypeList();
  706. this.getMyOrgList();
  707. this.getMyOrgListAgree();
  708. // this.createOptions(1);
  709. // this.$refs.select.$refs.scrollbar.$refs.wrap.addEventListener(
  710. // "scroll",
  711. // this.selectScroll
  712. // );
  713. },
  714. methods: {
  715. createOptions(len, start = 0) {
  716. // this.getAgencList();
  717. },
  718. selectScroll() {
  719. let e = this.$refs.select.$refs.scrollbar.$refs.wrap;
  720. if (this.noMore) return;
  721. let loadMore = e.scrollHeight - e.scrollTop <= e.clientHeight;
  722. if (loadMore) {
  723. this.loadMore();
  724. }
  725. },
  726. loadMore() {
  727. if (this.selectLoading) return;
  728. this.selectLoading = true;
  729. this.getAgencList();
  730. },
  731. // 切换每页条数
  732. handleSizeChange(val) {
  733. this.currentPage = 1;
  734. this.page_capacity = val;
  735. this.getList();
  736. },
  737. // 切换页码
  738. handleCurrentChange(val) {
  739. this.currentPage = val;
  740. this.getList();
  741. },
  742. // 回车搜索
  743. handleSearch() {
  744. console.log(this.searchInput);
  745. },
  746. // 点击查询按钮
  747. onSubmit() {
  748. this.currentPage = 1;
  749. this.getList();
  750. },
  751. handleClick(row) {
  752. if (row.publish_status == 1) {
  753. this.$message({
  754. type: "warning",
  755. message: "此教材处于上架状态不可以进行编辑"
  756. });
  757. return false;
  758. }
  759. sessionStorage.setItem("Bookdetail", JSON.stringify(row));
  760. this.$router.push("/adultInput?bookId=" + row.id);
  761. },
  762. // 预览
  763. handleView(row) {
  764. sessionStorage.setItem("Bookdetail", JSON.stringify(row));
  765. this.$router.push("/courseview?bookId=" + row.id);
  766. },
  767. // 授权码
  768. handleDiscount(row) {
  769. this.$router.push("/discountCodeList?bookId=" + row.id);
  770. }, // 生成临时链接
  771. handleCreatLink(row) {
  772. var date1 = new Date();
  773. var date2 = new Date(date1);
  774. date2.setDate(date1.getDate() + 30);
  775. let endtime = date2.getFullYear() + "-" + (date2.getMonth() + 1) + "-" + date2.getDate()
  776. getContentFile('login_control-CreateValidDateEncryptionString', {
  777. end_date: endtime,
  778. })
  779. .then((res) => {
  780. let link =
  781. "https://" +
  782. window.location.host +
  783. "/GCLS-Book/#/BookBrowsing?bookId=" +
  784. row.id+"&encryption="+res.encryption_string;
  785. document.getElementById("temporaryLinks").innerHTML = link;
  786. var doc = document,
  787. text = doc.getElementById("temporaryLinks"),
  788. range,
  789. selection;
  790. if (doc.body.createTextRange) {
  791. range = doc.body.createTextRange();
  792. range.moveToElementText(text);
  793. range.select();
  794. } else if (window.getSelection) {
  795. selection = window.getSelection();
  796. range = doc.createRange();
  797. range.selectNodeContents(text);
  798. selection.removeAllRanges();
  799. selection.addRange(range);
  800. }
  801. document.execCommand("copy");
  802. this.$message({
  803. message: "复制成功",
  804. type: "success",
  805. });
  806. window.getSelection().removeAllRanges();
  807. })
  808. .catch(() => {
  809. this.$message({
  810. message: "生成失败,请稍后重试",
  811. type: "warning",
  812. });
  813. });
  814. },
  815. // 新建教材
  816. handleAdd() {
  817. this.titleEdit = "新建教材";
  818. this.activeName = "courseInfo";
  819. this.formDialog = {
  820. name: "",
  821. name_english: "",
  822. edition: "",
  823. description: "",
  824. author: "",
  825. price: null,
  826. org_id: "",
  827. org_name: "",
  828. publish_scope: 1,
  829. publish_number: "",
  830. series_code: "",
  831. picture_id: "",
  832. resource_file_id_list_video: [],
  833. resource_file_id_list_audio: [],
  834. resource_file_id_list_otheraudio: [],
  835. resource_file_id_list_doc: [],
  836. id: "",
  837. publisher: "",
  838. theme_color: "",
  839. type_id: ""
  840. };
  841. this.agency = "";
  842. this.fileList = [];
  843. this.fileListVideo = [];
  844. this.fileListAudio = [];
  845. this.fileListOtheraudio = [];
  846. this.fileListDoc = [];
  847. this.dialogFlag = true;
  848. },
  849. // 新建教材提交
  850. submitCourse() {
  851. const _this = this;
  852. if (
  853. this.uploadingVideo ||
  854. this.uploadingAudio ||
  855. this.uploadingOtherAudio ||
  856. this.uploadingDoc
  857. ) {
  858. this.$message.warning("有文件尚未上传成功,请耐心等待");
  859. return false;
  860. }
  861. _this.$refs.formDialog.validate(valid => {
  862. _this.formDialog.name = _this.formDialog.name.trim();
  863. _this.formDialog.author = _this.formDialog.author.trim();
  864. if (_this.formDialog.description !== "") {
  865. _this.formDialog.description = _this.formDialog.description.trim();
  866. }
  867. if (valid) {
  868. _this.loading = true;
  869. let MethodName;
  870. if (_this.formDialog.id) {
  871. MethodName = "book-book_manager-UpdateBook";
  872. } else {
  873. MethodName = "book-book_manager-AddBook";
  874. }
  875. // this.formDialog.publish_status = 1;
  876. this.formDialog.publish_status = this.tableData[this.rowIndex].publish_status ? this.tableData[this.rowIndex].publish_status : 0
  877. let data = JSON.parse(JSON.stringify(_this.formDialog));
  878. getContent(MethodName, data)
  879. .then(res => {
  880. this.$message.success("操作成功");
  881. if (_this.formDialog.id) {
  882. this.$set(_this.tableData, this.rowIndex, data);
  883. } else {
  884. _this.currentPage = 1;
  885. _this.getList();
  886. _this.resetForm("formDialog");
  887. }
  888. _this.dialogFlag = false;
  889. this.loading = false;
  890. })
  891. .catch(() => {
  892. this.loading = false;
  893. });
  894. } else {
  895. this.loading = false;
  896. return false;
  897. }
  898. });
  899. },
  900. // 查询数据列表
  901. getList() {
  902. let MethodName = "book-book_manager-PageQueryBookList";
  903. // let order_column = ""
  904. // if(this.dataSort != {}){
  905. // if(this.dataSort.order=='descending'){
  906. // order_column = this.dataSort.prop + ':desc'
  907. // }else if(this.dataSort.order=='ascending'){
  908. // // 升序不传值
  909. // order_column = this.dataSort.prop
  910. // }else{
  911. // order_column = 'create_time:desc'
  912. // }
  913. // }else{
  914. // order_column = 'create_time:desc'
  915. // }
  916. let order_column_list = []
  917. if(this.dataSort != {}){
  918. if(this.dataSort.order=='descending'){
  919. order_column_list = [this.dataSort.prop + ':desc']
  920. }else if(this.dataSort.order=='ascending'){
  921. // 升序不传值
  922. order_column_list = [this.dataSort.prop]
  923. }else{
  924. order_column_list = ['create_time:desc']
  925. }
  926. }else{
  927. order_column_list = ['create_time:desc']
  928. }
  929. let data = {
  930. name: this.form.name,
  931. page_capacity: this.page_capacity,
  932. cur_page: this.currentPage,
  933. org_id: this.form.agency,
  934. // order_column: order_column,
  935. order_column_list:order_column_list,
  936. publish_status: this.form.publish_status,
  937. is_control_publish_scope: "false"
  938. };
  939. getContent(MethodName, data).then(res => {
  940. let _this = this;
  941. _this.tableData = res.book_list;
  942. _this.courseTotal = res.total_count;
  943. _this.tableloading = false;
  944. });
  945. },
  946. // 机构列表
  947. getAgencList() {
  948. let MethodName = "org_manager-PageQueryOrgList";
  949. let data = {
  950. name: "",
  951. page_capacity: 50,
  952. cur_page: this.pageIndex
  953. };
  954. let dataList = [];
  955. getContentFile(MethodName, data)
  956. .then(res => {
  957. dataList = res.org_list;
  958. if (this.pageIndex === res.total_page) {
  959. // 获取到最后的值时,不再监听滚动条的动作,移除滚动事件
  960. this.$refs.select.$refs.scrollbar.$refs.wrap.removeEventListener(
  961. "scroll",
  962. this.selectScroll()
  963. );
  964. this.noMore = true;
  965. }
  966. this.pageIndex++;
  967. this.agencyList = this.agencyList.concat(dataList);
  968. this.agencyLists = this.agencyList;
  969. })
  970. .finally(() => (this.selectLoading = false));
  971. },
  972. // 得到我的机构列表-org_manager-GetMyOrgList
  973. getMyOrgList() {
  974. let MethodName = "org_manager-GetMyOrgList";
  975. let data = {
  976. audited_status: 1
  977. };
  978. getContentFile(MethodName, data).then(res => {
  979. if (res && res.org_list.length > 0) {
  980. this.myOrgList = this.myOrgList.concat(res.org_list);
  981. this.diaMyOrgList = res.org_list;
  982. }
  983. });
  984. },
  985. // 得到我的机构列表-org_manager-GetMyOrgList--审核通过的
  986. getMyOrgListAgree() {
  987. let MethodName = "org_manager-GetMyOrgList";
  988. let data = {
  989. audited_status: 1
  990. };
  991. getContentFile(MethodName, data).then(res => {
  992. if (res && res.org_list.length > 0) {
  993. this.diaMyOrgList = res.org_list;
  994. }
  995. });
  996. },
  997. // 教材类型列表
  998. getTypeList() {
  999. let MethodName = "dict_manager-GetBookTypeList";
  1000. let data = {};
  1001. getContentFile(MethodName, data).then(res => {
  1002. this.typeList = res.type_list;
  1003. });
  1004. },
  1005. // 处理发布状态
  1006. handleStatus(row) {
  1007. if (row) {
  1008. return this.publishStatus[row.publish_status];
  1009. }
  1010. },
  1011. // 处理发布范围
  1012. handleScope(row) {
  1013. if (row) {
  1014. return this.publishScope[row.publish_scope];
  1015. }
  1016. },
  1017. // 选择机构
  1018. changeAgency(row) {
  1019. for (let i = 0; i < this.diaMyOrgList.length; i++) {
  1020. let item = this.diaMyOrgList[i];
  1021. if (item.org_id === row) {
  1022. this.formDialog.org_name = item.org_name;
  1023. break;
  1024. }
  1025. }
  1026. },
  1027. // 处理教材价格 最多两位小数
  1028. inputPrice(e) {
  1029. e = e.match(/^\d*(\.?\d{0,2})/g)[0] || "";
  1030. this.formDialog.price = e;
  1031. },
  1032. // 处理教材价格 失去焦点保留两位小数
  1033. blurPrice() {
  1034. if (this.formDialog.price) {
  1035. this.formDialog.price = Number(this.formDialog.price).toFixed(2);
  1036. }
  1037. },
  1038. handleSuccess(response, file, fileList) {
  1039. if (response.status == 1) {
  1040. this.$message.success("上传成功");
  1041. this.formDialog.picture_id = response.file_info_list[0].file_id;
  1042. } else {
  1043. this.fileList = [];
  1044. this.$message.warning(response.msg);
  1045. }
  1046. },
  1047. handleSuccessVideo(response, file, fileList) {
  1048. this.uploadingVideo = false;
  1049. if (response.status == 1) {
  1050. this.$message.success("上传成功");
  1051. this.formDialog.resource_file_id_list_video.push(
  1052. response.file_info_list[0].file_id
  1053. );
  1054. } else {
  1055. this.$message.warning(response.msg);
  1056. }
  1057. },
  1058. handleSuccessAudio(response, file, fileList) {
  1059. this.uploadingAudio = false;
  1060. if (response.status == 1) {
  1061. this.$message.success("上传成功");
  1062. this.formDialog.resource_file_id_list_audio.push(
  1063. response.file_info_list[0].file_id
  1064. );
  1065. } else {
  1066. this.$message.warning(response.msg);
  1067. }
  1068. },
  1069. handleSuccesOthersAudio(response, file, fileList) {
  1070. this.uploadingOtherAudio = false;
  1071. if (response.status == 1) {
  1072. this.$message.success("上传成功");
  1073. this.formDialog.resource_file_id_list_otheraudio.push(
  1074. response.file_info_list[0].file_id
  1075. );
  1076. } else {
  1077. this.$message.warning(response.msg);
  1078. }
  1079. },
  1080. handleSuccessDoc(response, file, fileList) {
  1081. this.uploadingDoc = false;
  1082. if (response.status == 1) {
  1083. this.$message.success("上传成功");
  1084. this.formDialog.resource_file_id_list_doc.push(
  1085. response.file_info_list[0].file_id
  1086. );
  1087. } else {
  1088. this.$message.warning(response.msg);
  1089. }
  1090. },
  1091. handleRemove(file, fileList) {
  1092. this.fileList = fileList;
  1093. this.formDialog.picture_id = "";
  1094. },
  1095. handleRemoveVideo(file, fileList) {
  1096. this.fileListVideo = fileList;
  1097. this.formDialog.resource_file_id_list_video = [];
  1098. fileList.forEach(item => {
  1099. this.formDialog.resource_file_id_list_video.push(item.file_id);
  1100. });
  1101. },
  1102. handleRemoveAudio(file, fileList) {
  1103. this.fileListAudio = fileList;
  1104. this.formDialog.resource_file_id_list_audio = [];
  1105. fileList.forEach(item => {
  1106. this.formDialog.resource_file_id_list_audio.push(item.file_id);
  1107. });
  1108. },
  1109. handleRemoveOtheraudio(file, fileList) {
  1110. this.fileListOtheraudio = fileList;
  1111. this.formDialog.resource_file_id_list_otheraudio = [];
  1112. fileList.forEach(item => {
  1113. this.formDialog.resource_file_id_list_otheraudio.push(item.file_id);
  1114. });
  1115. },
  1116. handleRemoveDoc(file, fileList) {
  1117. this.fileListDoc = fileList;
  1118. this.formDialog.resource_file_id_list_doc = [];
  1119. fileList.forEach(item => {
  1120. this.formDialog.resource_file_id_list_doc.push(item.file_id);
  1121. });
  1122. },
  1123. handlePreview(file) {
  1124. console.log(file);
  1125. },
  1126. beforeUpload(file) {
  1127. if (file.size > 2 * 1024 * 1024) {
  1128. this.$message.warning("上传图片大小不能超过2M");
  1129. return false; //必须返回false
  1130. }
  1131. },
  1132. beforeUploadVideo(file) {
  1133. if (this.uploadingVideo) {
  1134. return false;
  1135. } else {
  1136. this.uploadingVideo = true;
  1137. if (file.size > 500 * 1024 * 1024) {
  1138. this.$message.warning("上传视频大小不能超过500M");
  1139. this.uploadingVideo = false;
  1140. return false; //必须返回false
  1141. }
  1142. }
  1143. },
  1144. beforeUploadAudio(file) {
  1145. if (this.uploadingAudio) {
  1146. return false;
  1147. } else {
  1148. this.uploadingAudio = true;
  1149. if (file.size > 20 * 1024 * 1024) {
  1150. this.$message.warning("上传音频大小不能超过20M");
  1151. this.uploadingAudio = false;
  1152. return false; //必须返回false
  1153. }
  1154. }
  1155. },
  1156. beforeUploadOtherAudio(file) {
  1157. if (this.uploadingOtherAudio) {
  1158. return false;
  1159. } else {
  1160. this.uploadingOtherAudio = true;
  1161. if (file.size > 20 * 1024 * 1024) {
  1162. this.$message.warning("上传音频大小不能超过20M");
  1163. this.uploadingOtherAudio = false;
  1164. return false; //必须返回false
  1165. }
  1166. }
  1167. },
  1168. beforeUploadDoc(file) {
  1169. if (this.uploadingDoc) {
  1170. return false;
  1171. } else {
  1172. this.uploadingDoc = true;
  1173. if (file.size > 20 * 1024 * 1024) {
  1174. this.$message.warning("上传文件大小不能超过20M");
  1175. this.uploadingDoc = false;
  1176. return false; //必须返回false
  1177. }
  1178. }
  1179. },
  1180. handleExceed(files, fileList) {
  1181. this.$message.warning(
  1182. `当前限制选择 1 个文件,本次选择了 ${
  1183. files.length
  1184. } 个文件,共选择了 ${files.length + fileList.length} 个文件`
  1185. );
  1186. },
  1187. handleExceedVideo(files, fileList) {
  1188. this.uploadingVideo = false;
  1189. this.uploadingAudio = false;
  1190. this.uploadingOtherAudio = false;
  1191. this.uploadingDoc = false;
  1192. this.$message.warning(
  1193. `当前限制选择 100 个文件,本次选择了 ${
  1194. files.length
  1195. } 个文件,共选择了 ${files.length + fileList.length} 个文件`
  1196. );
  1197. },
  1198. beforeRemoveVideo(file) {
  1199. return this.$confirm(`确定移除 ${file.name}?`);
  1200. },
  1201. // 清空表单
  1202. resetForm(formName) {
  1203. this.$refs[formName].resetFields();
  1204. this.formDialog.price = null;
  1205. this.agency = "";
  1206. this.fileList = [];
  1207. this.fileListVideo = [];
  1208. this.fileListAudio = [];
  1209. this.fileListOtheraudio = [];
  1210. this.fileListDoc = [];
  1211. this.formDialog.description = "";
  1212. },
  1213. // 编辑书籍信息
  1214. handleEdit(row, index) {
  1215. this.$nextTick(() => {
  1216. if (this.$refs["formDialog"] !== undefined) {
  1217. this.$refs["formDialog"].resetFields();
  1218. }
  1219. });
  1220. this.rowIndex = index;
  1221. this.titleEdit = "编辑教材";
  1222. this.activeName = "courseInfo";
  1223. this.fileList = [];
  1224. this.fileListVideo = [];
  1225. this.fileListAudio = [];
  1226. this.fileListOtheraudio = [];
  1227. this.fileListDoc = [];
  1228. let MethodName = "book-book_manager-GetBook";
  1229. let data = {
  1230. id: row.id
  1231. };
  1232. getContent(MethodName, data)
  1233. .then(res => {
  1234. this.formDialog = {
  1235. id: res.id,
  1236. name: res.name,
  1237. description: res.description,
  1238. author: res.author,
  1239. price: res.price.toFixed(2),
  1240. org_id: res.org_id,
  1241. org_name: res.org_name,
  1242. publish_scope: res.publish_scope,
  1243. picture_id: res.picture_id,
  1244. name_english: res.name_english,
  1245. publish_number: res.publish_number,
  1246. series_code: res.series_code,
  1247. publisher: res.publisher,
  1248. theme_color: res.theme_color,
  1249. edition: res.edition,
  1250. type_id: res.type_id
  1251. };
  1252. sessionStorage.setItem("Bookdetail", JSON.stringify(this.formDialog));
  1253. if (res.picture_url) {
  1254. let obj = {
  1255. name: "",
  1256. url: res.picture_url
  1257. };
  1258. this.fileList.push(obj);
  1259. }
  1260. this.agency = res.org_id;
  1261. let MethodNames = "book-resource_manager-GetBookResourceList";
  1262. let datas = {
  1263. book_id: row.id
  1264. };
  1265. getContent(MethodNames, datas).then(res => {
  1266. if (res.status == 1) {
  1267. this.formDialog.resource_file_id_list_video = [];
  1268. this.formDialog.resource_file_id_list_audio = [];
  1269. this.formDialog.resource_file_id_list_otheraudio = [];
  1270. this.formDialog.resource_file_id_list_doc = [];
  1271. res.video_list.forEach(item => {
  1272. let obj = {
  1273. name: item.file_name,
  1274. file_id: item.file_id
  1275. };
  1276. this.fileListVideo.push(obj);
  1277. this.formDialog.resource_file_id_list_video.push(item.file_id);
  1278. });
  1279. res.audio_list.forEach(item => {
  1280. let obj = {
  1281. name: item.file_name,
  1282. file_id: item.file_id
  1283. };
  1284. this.fileListAudio.push(obj);
  1285. this.formDialog.resource_file_id_list_audio.push(item.file_id);
  1286. });
  1287. res.otheraudio_list.forEach(item => {
  1288. let obj = {
  1289. name: item.file_name,
  1290. file_id: item.file_id
  1291. };
  1292. this.fileListOtheraudio.push(obj);
  1293. this.formDialog.resource_file_id_list_otheraudio.push(
  1294. item.file_id
  1295. );
  1296. });
  1297. res.doc_list.forEach(item => {
  1298. let obj = {
  1299. name: item.file_name,
  1300. file_id: item.file_id
  1301. };
  1302. this.fileListDoc.push(obj);
  1303. this.formDialog.resource_file_id_list_doc.push(item.file_id);
  1304. });
  1305. }
  1306. });
  1307. })
  1308. .catch(() => {
  1309. this.loading = false;
  1310. });
  1311. this.dialogFlag = true;
  1312. // 循环select 有没有选中数据 没有插入
  1313. },
  1314. // 删除书籍
  1315. handleDel(row) {
  1316. if (row.publish_status == 1) {
  1317. this.$message({
  1318. type: "warning",
  1319. message: "此教材处于上架状态不可以进行删除"
  1320. });
  1321. return false;
  1322. }
  1323. this.$confirm("确定要删除此书籍吗?", "提示", {
  1324. confirmButtonText: "确定",
  1325. cancelButtonText: "取消",
  1326. type: "warning"
  1327. })
  1328. .then(() => {
  1329. let MethodName = "book-book_manager-DeleteBook";
  1330. let data = {
  1331. id: row.id,
  1332. is_force_delete: "true"
  1333. };
  1334. getContent(MethodName, data)
  1335. .then(res => {
  1336. this.currentPage = 1;
  1337. this.getList();
  1338. this.$message({
  1339. type: "success",
  1340. message: "删除成功!"
  1341. });
  1342. })
  1343. .catch(() => {});
  1344. })
  1345. .catch(() => {});
  1346. },
  1347. // 上架
  1348. handleUp(row, index) {
  1349. let Mname = "book-book_manager-SetPublishStatusForBook";
  1350. let updataData = JSON.parse(JSON.stringify(row));
  1351. let data = {
  1352. book_id: row.id
  1353. };
  1354. if (row.publish_status == 0) {
  1355. // 下架状态
  1356. data.publish_status = 1;
  1357. updataData.publish_status = 1;
  1358. } else if (row.publish_status == 1) {
  1359. data.publish_status = 0;
  1360. updataData.publish_status = 0;
  1361. }
  1362. getContent(Mname, data).then(res => {
  1363. this.$message.success("操作成功");
  1364. this.$set(this.tableData, index, updataData);
  1365. });
  1366. },
  1367. // 关闭弹窗
  1368. handleClose(done) {
  1369. this.loading = false;
  1370. this.formDialog.price = null;
  1371. this.agency = "";
  1372. this.fileList = [];
  1373. this.fileListVideo = [];
  1374. this.fileListAudio = [];
  1375. this.fileListOtheraudio = [];
  1376. this.fileListDoc = [];
  1377. this.formDialog.description = "";
  1378. done();
  1379. },
  1380. handleSort(value){
  1381. let dataSort = {
  1382. prop: value.prop,
  1383. order: value.order
  1384. }
  1385. this.dataSort = dataSort
  1386. localStorage.setItem("dataSort", JSON.stringify(dataSort));
  1387. this.getList()
  1388. }
  1389. }
  1390. };
  1391. </script>
  1392. <style lang="scss" scoped>
  1393. .container {
  1394. width: 100%;
  1395. background: #f5f5f5;
  1396. .content {
  1397. width: 100%;
  1398. display: flex;
  1399. justify-content: flex-start;
  1400. align-items: flex-start;
  1401. max-width: 1200px;
  1402. margin: 0 auto;
  1403. height: auto;
  1404. .inner {
  1405. width: 100%;
  1406. margin: 0 auto;
  1407. box-sizing: border-box;
  1408. padding: 20px 0;
  1409. position: relative;
  1410. .btn-box {
  1411. font-size: 0;
  1412. position: absolute;
  1413. right: 0;
  1414. top: 40px;
  1415. span {
  1416. height: 36px;
  1417. line-height: 36px;
  1418. padding: 0 15px;
  1419. display: flex;
  1420. justify-content: center;
  1421. align-items: center;
  1422. background: #ff9900;
  1423. border-radius: 4px;
  1424. font-size: 14px;
  1425. color: #ffffff;
  1426. cursor: pointer;
  1427. &:hover {
  1428. opacity: 0.8;
  1429. }
  1430. }
  1431. img {
  1432. width: 20px;
  1433. margin-right: 4px;
  1434. }
  1435. }
  1436. .search-form {
  1437. display: flex;
  1438. justify-content: flex-start;
  1439. align-items: center;
  1440. flex-wrap: wrap;
  1441. font-size: 0;
  1442. margin-top: 20px;
  1443. .el-cascader .el-input .el-input__inner {
  1444. width: 240px;
  1445. }
  1446. }
  1447. }
  1448. }
  1449. .el-dialog__body {
  1450. padding-right: 20px;
  1451. }
  1452. .table-box {
  1453. background: #fff;
  1454. padding: 10px 32px 0 32px;
  1455. border-radius: 4px;
  1456. }
  1457. }
  1458. </style>
  1459. <style lang="scss">
  1460. .el-table th.is-leaf {
  1461. border-color: #d5d5d5;
  1462. }
  1463. .el-table td {
  1464. padding: 0.05rem 0;
  1465. }
  1466. .el-dialog {
  1467. font-size: 0;
  1468. }
  1469. .courselistNPC {
  1470. .el-dialog__body {
  1471. padding: 0 20px;
  1472. }
  1473. .el-tabs__nav-wrap::after {
  1474. height: 0;
  1475. }
  1476. .el-upload-list {
  1477. max-height: 400px;
  1478. overflow-y: auto;
  1479. }
  1480. }
  1481. </style>