raceOverview.vue 37 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300
  1. <template>
  2. <!-- 项目概况 -->
  3. <div class="pb_content">
  4. <div class="race_content_body">
  5. <div class="raceBox">
  6. <div class="stepBg">
  7. <div class="steps">
  8. <div>
  9. <img src="../../../../assets/icon/race/progress.png" alt="" />
  10. </div>
  11. <div class="stepRightNav">
  12. <div>项目简介</div>
  13. <div>说明</div>
  14. </div>
  15. </div>
  16. <div class="steps">
  17. <div>
  18. <img src="../../../../assets/icon/race/progress.png" alt="" />
  19. </div>
  20. <div class="stepRightNav">
  21. <div>驱动说明</div>
  22. <div>说明</div>
  23. </div>
  24. </div>
  25. <div class="steps">
  26. <div>
  27. <img src="../../../../assets/icon/race/progress.png" alt="" />
  28. </div>
  29. <div class="stepRightNav">
  30. <div>平台案例实施(选填)</div>
  31. <div>协同人员</div>
  32. </div>
  33. </div>
  34. <div class="steps">
  35. <div>
  36. <img src="../../../../assets/icon/race/progress.png" alt="" />
  37. </div>
  38. <div class="stepRightNav">
  39. <div>案例评审</div>
  40. <div>评审状态、反馈</div>
  41. </div>
  42. </div>
  43. </div>
  44. <div class="right">
  45. <div class="whiteBg">
  46. <div class="firstTop">
  47. <div class="right_title">驱动问题</div>
  48. <div class="rightNav">
  49. 可包括阶段性问题和学科问题:阶段性问题是指在核心问题解决的不同阶段,通过提出驱动性问题,明确阶段子任务。学科问题是指从不同学科的角度以及分解和提出要研究解决的主要问题。
  50. </div>
  51. </div>
  52. <div class="basic_box1">
  53. <div class="editorCss">
  54. <editor-bar
  55. v-model="raceOver.driQuestion.brief"
  56. @change="upRaceOver"
  57. ></editor-bar>
  58. </div>
  59. <div>
  60. <div class="basic_box">
  61. <div class="lineBox">
  62. <div class="lineTitle">附件内容</div>
  63. <div class="strLine"></div>
  64. </div>
  65. <div>
  66. <div
  67. class="add_chapters_box"
  68. v-if="
  69. raceOver.driQuestion.data &&
  70. raceOver.driQuestion.data.length == 0
  71. "
  72. style="height: 185px"
  73. ></div>
  74. <div
  75. v-else
  76. class="add_chapters_box"
  77. style="display: flex; flex-direction: column"
  78. >
  79. <div
  80. class="chapter_upload"
  81. v-for="(item, index) in raceOver.driQuestion.data"
  82. :key="item.id"
  83. >
  84. <div class="chapter_upload_t"></div>
  85. <div class="chapter_upload_o">
  86. <div class="chapter_upload_l">
  87. <div
  88. v-if="item.type == 2"
  89. class="chapter_upload_l_i1"
  90. ></div>
  91. <div
  92. v-if="item.type == 1 || item.type == 3"
  93. class="chapter_upload_l_i5"
  94. ></div>
  95. </div>
  96. <div class="chapter_upload_ic">
  97. <div class="chapter_upload_ic_l"></div>
  98. <div
  99. class="chapter_upload_ic_r"
  100. @click.stop="deleteChapterData($event, index, 0)"
  101. >
  102. <div></div>
  103. </div>
  104. </div>
  105. <div class="chapter_upload_n">
  106. <input
  107. class="first"
  108. v-if="item.type == 1 || item.type == 3"
  109. :placeholder="item.name"
  110. />
  111. <input
  112. class="first"
  113. v-if="item.type == 2"
  114. :placeholder="item.name"
  115. />
  116. <div class="chapter_upload_ud">
  117. <div class="chapter_upload_up"></div>
  118. <div class="chapter_upload_down"></div>
  119. </div>
  120. </div>
  121. </div>
  122. </div>
  123. </div>
  124. </div>
  125. <div class="add_info_box">
  126. <button class="info_btn" @click="addImg($event)">
  127. 上传附件
  128. <input
  129. type="file"
  130. accept="application/pdf, application/.ppt, .ppt, .pptx, .xlsx, .xls, application/msword, application/vnd.openxmlformats-officedocument.wordprocessingml.document,video/mp4, video/quicktime, video/x-msvideo,image/*"
  131. style="display: none"
  132. @change="beforeUpload($event, null, 0)"
  133. />
  134. </button>
  135. </div>
  136. <div v-if="raceOver.driQuestion.data.proVisible" class="mask">
  137. <div class="progressBox">
  138. <div class="lbox">
  139. <img
  140. src="../../../../assets/loading.gif"
  141. />上传中,请稍后
  142. </div>
  143. <el-progress
  144. :text-inside="true"
  145. :stroke-width="20"
  146. :percentage="
  147. raceOver.driQuestion.data.progress
  148. ? raceOver.driQuestion.data.progress
  149. : 0
  150. "
  151. style="width: 80%"
  152. ></el-progress>
  153. </div>
  154. </div>
  155. </div>
  156. </div>
  157. </div>
  158. </div>
  159. <div class="whiteBg">
  160. <div class="firstTop">
  161. <div class="right_title">学习目标</div>
  162. <div class="rightNav">
  163. 学习目标提倡用核心素养来分类概括再描述,具体表述时应行为化、具体化、操作化,可以用“通过什么,达到什么,培养什么”的句式来进行表述
  164. </div>
  165. </div>
  166. <div class="basic_box1">
  167. <div class="editorCss">
  168. <editor-bar
  169. v-model="raceOver.tarDesign.brief"
  170. @change="upRaceOver"
  171. ></editor-bar>
  172. </div>
  173. <div>
  174. <div class="basic_box">
  175. <div class="lineBox">
  176. <div class="lineTitle">附件内容</div>
  177. <div class="strLine"></div>
  178. </div>
  179. <div>
  180. <div
  181. class="add_chapters_box"
  182. v-if="
  183. raceOver.tarDesign.data &&
  184. raceOver.tarDesign.data.length == 0
  185. "
  186. style="height: 185px"
  187. ></div>
  188. <div
  189. v-else
  190. class="add_chapters_box"
  191. style="display: flex; flex-direction: column"
  192. >
  193. <div
  194. class="chapter_upload"
  195. v-for="(item1, index1) in raceOver.tarDesign.data"
  196. :key="item1.id"
  197. >
  198. <div class="chapter_upload_t"></div>
  199. <div class="chapter_upload_o">
  200. <div class="chapter_upload_l">
  201. <div
  202. v-if="item1.type == 2"
  203. class="chapter_upload_l_i1"
  204. ></div>
  205. <div
  206. v-if="item1.type == 1 || item1.type == 3"
  207. class="chapter_upload_l_i5"
  208. ></div>
  209. </div>
  210. <div class="chapter_upload_ic">
  211. <div class="chapter_upload_ic_l"></div>
  212. <div
  213. class="chapter_upload_ic_r"
  214. @click.stop="deleteChapterData($event, index1, 1)"
  215. >
  216. <div></div>
  217. </div>
  218. </div>
  219. <div class="chapter_upload_n">
  220. <input
  221. class="first"
  222. v-if="item1.type == 1 || item1.type == 3"
  223. :placeholder="item1.name"
  224. />
  225. <input
  226. class="first"
  227. v-if="item1.type == 2"
  228. :placeholder="item1.name"
  229. />
  230. <div class="chapter_upload_ud">
  231. <div class="chapter_upload_up"></div>
  232. <div class="chapter_upload_down"></div>
  233. </div>
  234. </div>
  235. </div>
  236. </div>
  237. </div>
  238. </div>
  239. <div class="add_info_box">
  240. <button class="info_btn" @click="addImg($event)">
  241. 上传附件
  242. <input
  243. type="file"
  244. accept="application/pdf, application/.ppt, .ppt, .pptx, .xlsx, .xls, application/msword, application/vnd.openxmlformats-officedocument.wordprocessingml.document,video/mp4, video/quicktime, video/x-msvideo,image/*"
  245. style="display: none"
  246. @change="beforeUpload($event, null, 1)"
  247. />
  248. </button>
  249. </div>
  250. <div v-if="raceOver.tarDesign.data.proVisible" class="mask">
  251. <div class="progressBox">
  252. <div class="lbox">
  253. <img
  254. src="../../../../assets/loading.gif"
  255. />上传中,请稍后
  256. </div>
  257. <el-progress
  258. :text-inside="true"
  259. :stroke-width="20"
  260. :percentage="
  261. raceOver.tarDesign.data.progress
  262. ? raceOver.tarDesign.data.progress
  263. : 0
  264. "
  265. style="width: 80%"
  266. ></el-progress>
  267. </div>
  268. </div>
  269. </div>
  270. </div>
  271. </div>
  272. </div>
  273. <div class="whiteBg">
  274. <div class="firstTop">
  275. <div class="right_title">评价设计</div>
  276. <div class="rightNav">
  277. 项目学习评价方式需要体现过程性评价与总结性评价相结合,积极使用表现性评价。本次征集案例中,需要将学生的作品和报告作为附件呈现作品评价。
  278. </div>
  279. </div>
  280. <div class="basic_box1">
  281. <div class="editorCss">
  282. <editor-bar
  283. v-model="raceOver.actiDesign.brief"
  284. @change="upRaceOver"
  285. ></editor-bar>
  286. </div>
  287. <div>
  288. <div class="basic_box">
  289. <div class="lineBox">
  290. <div class="lineTitle">附件内容</div>
  291. <div class="strLine"></div>
  292. </div>
  293. <div>
  294. <div
  295. class="add_chapters_box"
  296. v-if="
  297. raceOver.actiDesign.data &&
  298. raceOver.actiDesign.data.length == 0
  299. "
  300. style="height: 185px"
  301. ></div>
  302. <div
  303. v-else
  304. class="add_chapters_box"
  305. style="display: flex; flex-direction: column"
  306. >
  307. <div
  308. class="chapter_upload"
  309. v-for="(item2, index2) in raceOver.actiDesign.data"
  310. :key="item2.id"
  311. >
  312. <div class="chapter_upload_t"></div>
  313. <div class="chapter_upload_o">
  314. <div class="chapter_upload_l">
  315. <div
  316. v-if="item2.type == 2"
  317. class="chapter_upload_l_i1"
  318. ></div>
  319. <div
  320. v-if="item2.type == 1 || item2.type == 3"
  321. class="chapter_upload_l_i5"
  322. ></div>
  323. </div>
  324. <div class="chapter_upload_ic">
  325. <div class="chapter_upload_ic_l"></div>
  326. <div
  327. class="chapter_upload_ic_r"
  328. @click.stop="deleteChapterData($event, index2, 2)"
  329. >
  330. <div></div>
  331. </div>
  332. </div>
  333. <div class="chapter_upload_n">
  334. <input
  335. class="first"
  336. v-if="item2.type == 1 || item2.type == 3"
  337. :placeholder="item2.name"
  338. />
  339. <input
  340. class="first"
  341. v-if="item2.type == 2"
  342. :placeholder="item2.name"
  343. />
  344. <div class="chapter_upload_ud">
  345. <div class="chapter_upload_up"></div>
  346. <div class="chapter_upload_down"></div>
  347. </div>
  348. </div>
  349. </div>
  350. </div>
  351. </div>
  352. </div>
  353. <div class="add_info_box">
  354. <button class="info_btn" @click="addImg($event)">
  355. 上传附件
  356. <input
  357. type="file"
  358. accept="application/pdf, application/.ppt, .ppt, .pptx, .xlsx, .xls, application/msword, application/vnd.openxmlformats-officedocument.wordprocessingml.document,video/mp4, video/quicktime, video/x-msvideo,image/*"
  359. style="display: none"
  360. @change="beforeUpload($event, null, 2)"
  361. />
  362. </button>
  363. </div>
  364. <div v-if="raceOver.actiDesign.data.proVisible" class="mask">
  365. <div class="progressBox">
  366. <div class="lbox">
  367. <img
  368. src="../../../../assets/loading.gif"
  369. />上传中,请稍后
  370. </div>
  371. <el-progress
  372. :text-inside="true"
  373. :stroke-width="20"
  374. :percentage="
  375. raceOver.actiDesign.data.progress
  376. ? raceOver.actiDesign.data.progress
  377. : 0
  378. "
  379. style="width: 80%"
  380. ></el-progress>
  381. </div>
  382. </div>
  383. </div>
  384. </div>
  385. </div>
  386. </div>
  387. </div>
  388. </div>
  389. </div>
  390. <el-dialog
  391. title="添加富文本"
  392. :visible.sync="dialogVisible"
  393. :append-to-body="true"
  394. width="500px"
  395. :before-close="handleClose"
  396. class="dialog_diy"
  397. >
  398. <el-form>
  399. <el-form-item label="文本标题">
  400. <el-input
  401. v-model="AttText.title"
  402. auto-complete="off"
  403. @input="change1"
  404. placeholder="请输入文本标题..."
  405. ></el-input>
  406. </el-form-item>
  407. <div>富文本内容</div>
  408. <editor-bar v-model="AttText.text" @change="change"></editor-bar>
  409. </el-form>
  410. <span slot="footer" class="dialog-footer">
  411. <el-button @click="clearAttText">取 消</el-button>
  412. <el-button type="primary" @click="isAddOrUpdateAttText">确定</el-button>
  413. </span>
  414. </el-dialog>
  415. <el-dialog
  416. title="添加链接"
  417. :visible.sync="dialogVisible1"
  418. :append-to-body="true"
  419. width="500px"
  420. :before-close="handleClose"
  421. class="dialog_diy lineCss"
  422. >
  423. <el-form>
  424. <el-form-item label="链接" :label-width="formLabelWidth">
  425. <span>
  426. <el-input
  427. placeholder="请输入链接"
  428. clearable
  429. v-model="line"
  430. class="add_input"
  431. ></el-input>
  432. </span>
  433. </el-form-item>
  434. </el-form>
  435. <span slot="footer" class="dialog-footer">
  436. <el-button @click="clearLine">取 消</el-button>
  437. <el-button type="primary" @click="isAddOrUpdateLine">确定</el-button>
  438. </span>
  439. </el-dialog>
  440. </div>
  441. </template>
  442. <script>
  443. import EditorBar from "../../../tools/wangEnduit";
  444. export default {
  445. components: { EditorBar },
  446. props: ["raceOverView"],
  447. data() {
  448. return {
  449. chapterData: [],
  450. formLabelWidth: "100px",
  451. noneBtnImg: false,
  452. raceOver: {
  453. driQuestion: { brief: "", data: [] },
  454. tarDesign: { brief: "", data: [] },
  455. actiDesign: { brief: "", data: [] },
  456. },
  457. AttText: {},
  458. task: 0,
  459. AttTextType: 0,
  460. AttTextIndex: 0,
  461. dialogVisible: false,
  462. dialogVisible1: false,
  463. line: "",
  464. lineCount: 0,
  465. };
  466. },
  467. methods: {
  468. handleClose(done) {
  469. done();
  470. },
  471. change(val) {
  472. console.log(val);
  473. },
  474. change1(val) {
  475. console.log(val);
  476. this.$forceUpdate();
  477. },
  478. addImg(e) {
  479. var el = e.currentTarget;
  480. el.getElementsByTagName("input")[0].click();
  481. },
  482. imgChange(file, fileList, type, jT) {
  483. if (jT == 0) {
  484. var _tmp = this.raceOver.driQuestion.data;
  485. } else if (jT == 1) {
  486. var _tmp = this.raceOver.tarDesign.data;
  487. } else {
  488. var _tmp = this.raceOver.actiDesign.data;
  489. }
  490. this.noneBtnImg = _tmp.length >= 1;
  491. },
  492. deleteChapterData(e, i, t) {
  493. e.stopPropagation();
  494. if (t == 0) {
  495. this.raceOver.driQuestion.data.splice(i, 1);
  496. } else if (t == 1) {
  497. this.raceOver.tarDesign.data.splice(i, 1);
  498. } else {
  499. this.raceOver.actiDesign.data.splice(i, 1);
  500. }
  501. },
  502. beforeUpload(event, type, jsonType) {
  503. var file = event.target.files[0];
  504. var credentials = {
  505. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  506. secretAccessKey: "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",
  507. }; //秘钥形式的登录上传
  508. window.AWS.config.update(credentials);
  509. window.AWS.config.region = "cn-northwest-1"; //设置区域
  510. var type1 = type;
  511. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  512. var _this = this;
  513. var b = [
  514. "DOC",
  515. "DOCX",
  516. "DOCM",
  517. "DOTM",
  518. "DOTX",
  519. "PPTX",
  520. "PPSX",
  521. "PPT",
  522. "PPS",
  523. "PPTM",
  524. "POTM",
  525. "PPAM",
  526. "POTX",
  527. "PPSM",
  528. ];
  529. var c = ["PDF", "DOT", "DOC", "DOCX", "PPT", "PPTX", "XLSX", "XLS"];
  530. var d = [
  531. "BMP",
  532. "PJP",
  533. "APNG",
  534. "PNG",
  535. "JPG",
  536. "GIF",
  537. "SVG",
  538. "JPEG",
  539. "JPG",
  540. "ICO",
  541. "PGPEG",
  542. "AVIF",
  543. ];
  544. if (
  545. b.indexOf(
  546. file.name
  547. .split(".")
  548. [file.name.split(".").length - 1].toLocaleUpperCase()
  549. ) != -1
  550. ) {
  551. if (file.size / 1024 / 1024 > 10) {
  552. this.$message.error("上传文件大于10兆,请重新选择文件!");
  553. return;
  554. }
  555. } else if (
  556. file.name
  557. .split(".")
  558. [file.name.split(".").length - 1].toLocaleUpperCase() != "PDF"
  559. ) {
  560. if (file.size / 1024 / 1024 > 5) {
  561. this.$message.error("添加成上传文件大于5兆,请重新选择文件!");
  562. return;
  563. }
  564. }
  565. if (
  566. c.indexOf(
  567. file.name
  568. .split(".")
  569. [file.name.split(".").length - 1].toLocaleUpperCase()
  570. ) != -1
  571. ) {
  572. type1 = 1;
  573. } else if (
  574. d.indexOf(
  575. file.name
  576. .split(".")
  577. [file.name.split(".").length - 1].toLocaleUpperCase()
  578. ) != -1
  579. ) {
  580. type1 = 3;
  581. } else {
  582. type1 = 2;
  583. }
  584. if (jsonType == 0) {
  585. _this.raceOver.driQuestion.data.progress = 0;
  586. _this.raceOver.driQuestion.data.proVisible = true;
  587. } else if (jsonType == 1) {
  588. _this.raceOver.tarDesign.data.progress = 0;
  589. _this.raceOver.tarDesign.data.proVisible = true;
  590. } else {
  591. _this.raceOver.actiDesign.data.progress = 0;
  592. _this.raceOver.actiDesign.data.proVisible = true;
  593. }
  594. if (file) {
  595. var params = {
  596. Key:
  597. file.name.split(".")[0] +
  598. new Date().getTime() +
  599. "." +
  600. file.name.split(".")[file.name.split(".").length - 1],
  601. ContentType: file.type,
  602. Body: file,
  603. "Access-Control-Allow-Credentials": "*",
  604. ACL: "public-read",
  605. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  606. var options = {
  607. partSize: 2048 * 1024 * 1024,
  608. queueSize: 2,
  609. leavePartsOnError: true,
  610. };
  611. bucket
  612. .upload(params, options)
  613. .on("httpUploadProgress", function (evt) {
  614. //这里可以写进度条
  615. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  616. if (jsonType == 0) {
  617. _this.raceOver.driQuestion.data.progress = parseInt(
  618. (evt.loaded * 80) / evt.total
  619. );
  620. } else if (jsonType == 1) {
  621. _this.raceOver.tarDesign.data.progress = parseInt(
  622. (evt.loaded * 80) / evt.total
  623. );
  624. } else {
  625. _this.raceOver.actiDesign.data.progress = parseInt(
  626. (evt.loaded * 80) / evt.total
  627. );
  628. }
  629. })
  630. .send(function (err, data) {
  631. if (jsonType == 0) {
  632. _this.raceOver.driQuestion.data.progress = 100;
  633. } else if (jsonType == 1) {
  634. _this.raceOver.tarDesign.data.progress = 100;
  635. } else {
  636. _this.raceOver.actiDesign.data.progress = 100;
  637. }
  638. setTimeout(() => {
  639. if (jsonType == 0) {
  640. _this.raceOver.driQuestion.data.proVisible = false;
  641. } else if (jsonType == 1) {
  642. _this.raceOver.tarDesign.data.proVisible = false;
  643. } else {
  644. _this.raceOver.actiDesign.data.proVisible = false;
  645. }
  646. _this.$forceUpdate();
  647. }, 1000);
  648. if (err) {
  649. _this.$message.error("上传失败");
  650. } else {
  651. if (jsonType == 0) {
  652. _this.raceOver.driQuestion.data.push({
  653. name: file.name,
  654. url: data.Location,
  655. type: type1,
  656. });
  657. _this.imgChange(null, null, type1, jsonType);
  658. } else if (jsonType == 1) {
  659. _this.raceOver.tarDesign.data.push({
  660. name: file.name,
  661. url: data.Location,
  662. type: type1,
  663. });
  664. _this.imgChange(null, null, type1, jsonType);
  665. } else {
  666. _this.raceOver.actiDesign.data.push({
  667. name: file.name,
  668. url: data.Location,
  669. type: type1,
  670. });
  671. _this.imgChange(null, null, type1, jsonType);
  672. }
  673. console.log(data.Location);
  674. }
  675. });
  676. }
  677. },
  678. upRaceOver() {
  679. this.$emit("upRaceOver", this.raceOver);
  680. },
  681. addAttText(i) {
  682. this.AttText = {
  683. title: "",
  684. text: "",
  685. };
  686. this.task = i;
  687. this.AttTextType = 0;
  688. this.$forceUpdate();
  689. this.dialogVisible = true;
  690. },
  691. clearAttText() {
  692. this.AttText = {
  693. title: "",
  694. text: "",
  695. };
  696. this.dialogVisible = false;
  697. },
  698. isAddOrUpdateAttText() {
  699. if (this.AttTextType == 0) {
  700. this.addAttTextMessage();
  701. } else {
  702. this.updateAttText();
  703. }
  704. },
  705. addAttTextMessage() {
  706. if (this.task == 0) {
  707. this.raceOver.driQuestion.data.push({
  708. name: this.AttText.title,
  709. url: this.AttText.text,
  710. type: 3,
  711. });
  712. this.imgChange(null, null, 3, this.task);
  713. } else if (this.task == 1) {
  714. this.raceOver.tarDesign.data.push({
  715. name: this.AttText.title,
  716. url: this.AttText.text,
  717. type: 3,
  718. });
  719. this.imgChange(null, null, 3, this.task);
  720. } else {
  721. this.raceOver.actiDesign.data.push({
  722. name: this.AttText.title,
  723. url: this.AttText.text,
  724. type: 3,
  725. });
  726. this.imgChange(null, null, 3, this.task);
  727. }
  728. this.dialogVisible = false;
  729. this.upRaceOver();
  730. },
  731. updateAttText() {
  732. if (this.task == 0) {
  733. this.raceOver.driQuestion.data[this.AttTextIndex].name =
  734. this.AttText.title;
  735. this.raceOver.driQuestion.data[this.AttTextIndex].url =
  736. this.AttText.text;
  737. } else if (this.task == 1) {
  738. this.raceOver.tarDesign.data[this.AttTextIndex].name =
  739. this.AttText.title;
  740. this.raceOver.tarDesign.data[this.AttTextIndex].url = this.AttText.text;
  741. } else {
  742. this.raceOver.actiDesign.data[this.AttTextIndex].name =
  743. this.AttText.title;
  744. this.raceOver.actiDesign.data[this.AttTextIndex].url =
  745. this.AttText.text;
  746. }
  747. this.dialogVisible = false;
  748. this.upRaceOver();
  749. },
  750. selectAttText(t, i) {
  751. if (t == 0) {
  752. this.AttText.title = this.raceOver.driQuestion.data[i].name;
  753. this.AttText.text = this.raceOver.driQuestion.data[i].url;
  754. } else if (t == 1) {
  755. this.AttText.title = this.raceOver.tarDesign.data[i].name;
  756. this.AttText.text = this.raceOver.tarDesign.data[i].url;
  757. } else {
  758. this.AttText.title = this.raceOver.actiDesign.data[i].name;
  759. this.AttText.text = this.raceOver.actiDesign.data[i].url;
  760. }
  761. this.task = t;
  762. this.AttTextIndex = i;
  763. this.AttTextType = 1;
  764. this.dialogVisible = true;
  765. },
  766. openLine(i) {
  767. this.line = "";
  768. this.task = i;
  769. this.lineCount = i;
  770. this.lineType = 0;
  771. this.$forceUpdate();
  772. this.dialogVisible1 = true;
  773. },
  774. clearLine() {
  775. this.line = "";
  776. this.dialogVisible1 = false;
  777. },
  778. isAddOrUpdateLine() {
  779. if (this.lineType == 0) {
  780. this.addLine();
  781. } else {
  782. this.updateLine();
  783. }
  784. },
  785. addLine() {
  786. if (this.task == 0) {
  787. this.raceOver.driQuestion.data.push({
  788. name: "链接",
  789. url: this.line,
  790. type: 4,
  791. });
  792. this.imgChange(null, null, 4, this.task);
  793. } else if (this.task == 1) {
  794. this.raceOver.tarDesign.data.push({
  795. name: "链接",
  796. url: this.line,
  797. type: 4,
  798. });
  799. this.imgChange(null, null, 4, this.task);
  800. } else {
  801. this.raceOver.actiDesign.data.push({
  802. name: "链接",
  803. url: this.line,
  804. type: 4,
  805. });
  806. this.imgChange(null, null, 4, this.task);
  807. }
  808. this.dialogVisible1 = false;
  809. this.upRaceOver();
  810. },
  811. updateLine() {
  812. if (this.task == 0) {
  813. this.raceOver.driQuestion.data[this.lineCount].url = this.line;
  814. } else if (this.task == 1) {
  815. this.raceOver.tarDesign.data[this.lineCount].url = this.line;
  816. } else {
  817. this.raceOver.actiDesign.data[this.lineCount].url = this.line;
  818. }
  819. this.dialogVisible1 = false;
  820. this.upRaceOver();
  821. },
  822. selectLine(t, i) {
  823. if (t == 0) {
  824. this.line = this.raceOver.driQuestion.data[i].url;
  825. } else if (t == 1) {
  826. this.line = this.raceOver.tarDesign.data[i].url;
  827. } else {
  828. this.line = this.raceOver.actiDesign.data[i].url;
  829. }
  830. this.task = t;
  831. this.lineCount = i;
  832. this.lineType = 1;
  833. this.dialogVisible1 = true;
  834. },
  835. },
  836. created() {
  837. this.raceOver.driQuestion = this.raceOverView.driQuestion;
  838. this.raceOver.tarDesign = this.raceOverView.tarDesign;
  839. this.raceOver.actiDesign = this.raceOverView.actiDesign;
  840. },
  841. };
  842. </script>
  843. <style scoped>
  844. @media screen and (max-width: 1280px) {
  845. }
  846. .dialog_diy >>> .el-dialog__header {
  847. background: #3c3c3c !important;
  848. padding: 15px 20px;
  849. }
  850. .dialog_diy >>> .el-dialog__title {
  851. color: #fff;
  852. }
  853. .pb_content {
  854. width: 100%;
  855. height: 100%;
  856. }
  857. .race_content_body {
  858. width: 100%;
  859. position: relative;
  860. margin: 0;
  861. height: 100%;
  862. }
  863. .raceBox {
  864. width: 100%;
  865. height: 100%;
  866. display: flex;
  867. flex-direction: row;
  868. flex-wrap: nowrap;
  869. align-items: flex-start;
  870. }
  871. .stepBg {
  872. padding: 80px 0 0 0;
  873. margin: 0 25px 0 0;
  874. width: 20%;
  875. display: flex;
  876. justify-content: flex-start;
  877. align-items: center;
  878. flex-wrap: nowrap;
  879. background: #fff;
  880. /* min-height: 800px; */
  881. height: calc(100% - 80px);
  882. border-radius: 15px;
  883. overflow: auto;
  884. min-width: 260px;
  885. flex-direction: column;
  886. }
  887. .steps {
  888. display: flex;
  889. flex-direction: row;
  890. flex-wrap: nowrap;
  891. position: relative;
  892. width: 210px;
  893. height: 130px;
  894. }
  895. .steps > div:nth-child(1) > img {
  896. z-index: 9;
  897. position: relative;
  898. }
  899. .stepLeft,
  900. .isSteps {
  901. width: 30px;
  902. height: 30px;
  903. border-radius: 50%;
  904. text-align: center;
  905. line-height: 30px;
  906. border: 2px solid #eee;
  907. color: #c0c0c0;
  908. }
  909. .isSteps {
  910. background: #1990ff;
  911. color: #fff;
  912. border: none;
  913. }
  914. .stepRightNav {
  915. display: flex;
  916. flex-direction: column;
  917. flex-wrap: nowrap;
  918. justify-content: space-between;
  919. align-items: flex-start;
  920. margin-left: 10px;
  921. height: 50px;
  922. }
  923. .line,
  924. .isLine {
  925. position: absolute;
  926. width: 5px;
  927. height: 50px;
  928. border-left: 1px solid #dadada;
  929. top: 38px;
  930. left: 15px;
  931. }
  932. .isLine {
  933. border-left: 1px solid #1d92ff !important;
  934. }
  935. .right {
  936. width: calc(100% - 20%);
  937. background: rgb(255, 255, 255);
  938. border-radius: 10px;
  939. overflow: auto;
  940. height: 100%;
  941. border-radius: 15px;
  942. /* max-height: 800px; */
  943. }
  944. .allBox {
  945. padding: 25px;
  946. }
  947. .allBox > div:nth-child(1) {
  948. color: #0f40f5;
  949. font-size: 18px;
  950. font-weight: bold;
  951. }
  952. .raceTop > div:nth-child(2) {
  953. width: 80%;
  954. margin-top: 10px;
  955. }
  956. .titleTop {
  957. display: flex;
  958. flex-direction: row;
  959. flex-wrap: nowrap;
  960. align-items: center;
  961. width: 100%;
  962. }
  963. .titleTop > div:nth-child(2) {
  964. width: 82%;
  965. margin-left: 20px;
  966. }
  967. .editorCss {
  968. width: 90% !important;
  969. }
  970. .basic_box {
  971. position: relative;
  972. margin: 0;
  973. min-height: 0;
  974. width: 90%;
  975. }
  976. .basic_box1 {
  977. margin: 10px auto;
  978. position: relative;
  979. padding: 0 20px 0 20px;
  980. }
  981. .add_info_box {
  982. margin: 20px 0;
  983. }
  984. .add_info_box button {
  985. margin: 0 10px 10px 0;
  986. }
  987. .add_chapters_box {
  988. text-align: left;
  989. background-color: rgb(232 234 237);
  990. width: 100%;
  991. padding: 0px 15px;
  992. border-radius: 15px;
  993. font-size: 16px;
  994. box-sizing: border-box;
  995. position: relative;
  996. padding: 0 10px 5px 10px;
  997. height: 185px;
  998. overflow-y: auto;
  999. overflow-x: hidden;
  1000. }
  1001. .chapter_upload {
  1002. height: 50px;
  1003. margin-top: 12px;
  1004. position: relative;
  1005. display: flex;
  1006. align-items: center;
  1007. width: 100%;
  1008. min-height: 50px;
  1009. }
  1010. .chapter_upload_t {
  1011. background-color: #fff;
  1012. position: absolute;
  1013. height: 100%;
  1014. top: 0px;
  1015. left: 0px;
  1016. border-radius: 40px;
  1017. box-sizing: border-box;
  1018. box-shadow: 0 0 3px 3px #dfdfdf;
  1019. width: 100%;
  1020. }
  1021. .chapter_upload_o {
  1022. width: 100%;
  1023. height: 100%;
  1024. position: relative;
  1025. z-index: 1;
  1026. display: flex;
  1027. align-items: center;
  1028. }
  1029. .chapter_upload_ic {
  1030. height: 30px;
  1031. float: right;
  1032. cursor: pointer;
  1033. position: absolute;
  1034. width: 45px;
  1035. right: 0;
  1036. top: 0;
  1037. }
  1038. .chapter_upload_ic_l {
  1039. width: 50px;
  1040. height: 50px;
  1041. float: left;
  1042. }
  1043. .chapter_upload_ic_l div {
  1044. width: 30px;
  1045. height: 35px;
  1046. background: url("../../../../assets/icon/icon.png");
  1047. }
  1048. .chapter_upload_ic_r {
  1049. width: 50px;
  1050. height: 50px;
  1051. float: left;
  1052. margin-left: 0px;
  1053. display: flex;
  1054. align-items: center;
  1055. position: absolute;
  1056. }
  1057. .chapter_upload_ic_r div {
  1058. width: 25px;
  1059. height: 25px;
  1060. background-image: url("../../../../assets/delete.png");
  1061. background-size: 100% 100%;
  1062. }
  1063. .chapter_upload_n {
  1064. display: flex;
  1065. text-indent: 10px;
  1066. text-decoration: none;
  1067. text-overflow: ellipsis;
  1068. white-space: nowrap;
  1069. overflow: hidden;
  1070. width: 55%;
  1071. margin-left: 10px;
  1072. cursor: pointer;
  1073. margin-top: 2px;
  1074. }
  1075. .chapter_upload_l_i1 {
  1076. background-image: url("../../../../assets/icon/video.png");
  1077. width: 28px;
  1078. height: 28px;
  1079. background-size: 100% 100%;
  1080. }
  1081. .chapter_upload_l_i5 {
  1082. background-image: url("../../../../assets/icon/word.png");
  1083. width: 24px;
  1084. height: 24px;
  1085. background-size: 100% 100%;
  1086. margin-left: 1px;
  1087. }
  1088. .chapter_upload_l_i8 {
  1089. background-image: url("../../../../assets/icon/line.png");
  1090. width: 24px;
  1091. height: 24px;
  1092. background-size: 100% 100%;
  1093. margin-left: 1px;
  1094. }
  1095. .chapter_upload_ud {
  1096. display: flex;
  1097. flex-direction: column;
  1098. margin-left: 5px;
  1099. justify-content: center;
  1100. z-index: 99;
  1101. }
  1102. .chapter_upload_up {
  1103. background-image: url("../../../../assets/icon/up.png");
  1104. width: 17px;
  1105. height: 15px;
  1106. background-size: 100% 100%;
  1107. cursor: pointer;
  1108. }
  1109. .chapter_upload_down {
  1110. background-image: url("../../../../assets/icon/down.png");
  1111. width: 17px;
  1112. height: 15px;
  1113. margin: 2px auto 0 auto;
  1114. background-size: 100% 100%;
  1115. cursor: pointer;
  1116. }
  1117. .chapter_upload_l {
  1118. padding: 1px 0 0 10px;
  1119. }
  1120. .first {
  1121. border: none;
  1122. outline: none;
  1123. width: 80%;
  1124. min-width: 215px;
  1125. z-index: 99;
  1126. font-size: 14px;
  1127. white-space: nowrap;
  1128. overflow: hidden;
  1129. text-overflow: ellipsis;
  1130. }
  1131. .info_btn {
  1132. color: #fff;
  1133. background-color: #0f7eff;
  1134. padding: 8px 24px;
  1135. font-size: 0.9375rem;
  1136. box-shadow: 0px 1px 3px 0px rgb(0 0 0 / 20%), 0px 2px 2px 0px rgb(0 0 0 / 14%),
  1137. 0px 3px 1px -2px rgb(0 0 0 / 12%);
  1138. min-width: 64px;
  1139. font-weight: 500;
  1140. border-radius: 4px;
  1141. box-sizing: border-box;
  1142. border: none;
  1143. cursor: pointer;
  1144. }
  1145. .info_btn:hover {
  1146. background-color: #4f7cd5 !important;
  1147. }
  1148. .right_title {
  1149. height: 30px;
  1150. font-size: 1.5em;
  1151. font-weight: bold;
  1152. color: #0f7eff;
  1153. width: 10%;
  1154. min-width: 100px;
  1155. }
  1156. .whiteBg {
  1157. background: #fff;
  1158. border-radius: 10px;
  1159. }
  1160. .lineBox {
  1161. display: flex;
  1162. margin: 0 0 20px 0;
  1163. flex-direction: row;
  1164. justify-content: flex-start;
  1165. align-items: center;
  1166. }
  1167. .lineTitle {
  1168. margin-top: 15px;
  1169. width: 110px;
  1170. }
  1171. .strLine {
  1172. width: 85%;
  1173. margin: 0 auto;
  1174. border-top: 1px solid #e5e5e5;
  1175. margin-top: 20px;
  1176. }
  1177. .stepBg .steps:nth-child(1) ::after,
  1178. .stepBg .steps:nth-child(2) ::after,
  1179. .stepBg .steps:nth-child(3) ::after {
  1180. content: "";
  1181. height: 100%;
  1182. background: #eee;
  1183. width: 4px;
  1184. position: absolute;
  1185. left: 15px;
  1186. top: calc(50% + (35px / 2));
  1187. transform: translateY(-50%);
  1188. z-index: 1;
  1189. }
  1190. .mask {
  1191. background-color: rgb(0 0 0 / 30%);
  1192. /* position: fixed; */
  1193. position: absolute;
  1194. top: 0;
  1195. left: 0;
  1196. width: 100%;
  1197. height: 100%;
  1198. z-index: 20000;
  1199. display: flex;
  1200. align-items: center;
  1201. justify-content: center;
  1202. }
  1203. .progressBox {
  1204. width: 300px;
  1205. height: 150px;
  1206. background: #fff;
  1207. border-radius: 10px;
  1208. box-shadow: 0 0 6px 1px #bfbfbf;
  1209. display: flex;
  1210. align-items: center;
  1211. justify-content: center;
  1212. flex-direction: column;
  1213. }
  1214. .progressBox .lbox {
  1215. height: 100px;
  1216. font-size: 16px;
  1217. display: flex;
  1218. align-items: center;
  1219. }
  1220. .progressBox .lbox img {
  1221. width: 40px;
  1222. margin-right: 20px;
  1223. }
  1224. .progressBox >>> .el-progress-bar__outer {
  1225. background-color: #d1dfff !important;
  1226. }
  1227. .progressBox .lbox {
  1228. height: 100px;
  1229. font-size: 19px;
  1230. display: flex;
  1231. align-items: center;
  1232. }
  1233. .progressBox .lbox img {
  1234. width: 40px;
  1235. margin-right: 20px;
  1236. }
  1237. .firstTop {
  1238. display: flex;
  1239. flex-direction: row;
  1240. flex-wrap: nowrap;
  1241. align-items: center;
  1242. width: 90%;
  1243. padding: 20px 0 20px 20px;
  1244. }
  1245. .rightNav {
  1246. width: 87%;
  1247. margin-left: 15px;
  1248. }
  1249. </style>