EditPaper.vue 65 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062
  1. <template>
  2. <div
  3. id="editPaperApp"
  4. v-loading="loading"
  5. class="paper"
  6. element-loading-text="拼命加载中。。。"
  7. >
  8. <!-- <ckeditor v-model="examRemark"></ckeditor> -->
  9. <div class="edit-paper-top">
  10. <div class="edit-paper-top-inline">
  11. <div class="paper-top-div">
  12. <span class="paper-top-title">课程代码:</span>
  13. <span class="paper-top-value">{{ paper.course.code }}</span>
  14. </div>
  15. <div class="paper-top-div">
  16. <span class="paper-top-title">课程名称:</span>
  17. <span class="paper-top-value">{{ paper.course.name }}</span>
  18. </div>
  19. <div class="paper-top-div">
  20. <span class="paper-top-title">试卷名称:</span>
  21. <el-tooltip class="item" effect="dark" placement="top-start">
  22. <div slot="content">{{ paper.name }}</div>
  23. <input
  24. v-model="paper.name"
  25. class="paperName-input font_length"
  26. placeholder="试卷名称"
  27. />
  28. </el-tooltip>
  29. </div>
  30. <div class="paper-top-div">
  31. <span class="paper-top-title">试卷难度:</span>
  32. <span class="paper-top-value">{{ paper.difficultyDegree }}</span>
  33. </div>
  34. <div>
  35. <el-button type="primary" size="small" @click="savePaper">
  36. 保存
  37. </el-button>
  38. <el-button type="danger" size="small" @click="deletePaper(paper.id)">
  39. <i class="el-icon-delete"></i> 删除
  40. </el-button>
  41. <el-dropdown class="button_left">
  42. <el-button type="primary" size="small">
  43. 更多 <i class="el-icon-arrow-down el-icon--right"></i>
  44. </el-button>
  45. <el-dropdown-menu slot="dropdown">
  46. <el-dropdown-item>
  47. <el-button
  48. type="primary"
  49. :loading="duplicateLoading"
  50. size="small"
  51. @click="getreduplicateQuestions"
  52. ><i class="el-icon-zoom-in"></i>查重
  53. </el-button>
  54. </el-dropdown-item>
  55. <el-dropdown-item>
  56. <el-button
  57. v-show="parentView == 'import_paper'"
  58. type="primary"
  59. size="small"
  60. @click="openDialog"
  61. ><i class="el-icon-upload2"></i>上传音频
  62. </el-button>
  63. </el-dropdown-item>
  64. <el-dropdown-item>
  65. <el-button
  66. size="small"
  67. type="primary"
  68. @click="exportPaperAnswer()"
  69. ><i class="el-icon-download"></i>导出答案</el-button
  70. >
  71. </el-dropdown-item>
  72. <el-dropdown-item>
  73. <el-button
  74. v-show="parentView == 'import_paper'"
  75. type="primary"
  76. size="small"
  77. @click="openAnswerDialog"
  78. ><i class="el-icon-upload2"></i>导入答案
  79. </el-button>
  80. </el-dropdown-item>
  81. </el-dropdown-menu>
  82. </el-dropdown>
  83. <el-button
  84. size="small"
  85. type="primary"
  86. style="margin-left: 10px"
  87. @click="back"
  88. ><i class="el-icon-arrow-left"></i> 返回</el-button
  89. >
  90. </div>
  91. </div>
  92. </div>
  93. <div class="paperName">
  94. <div>
  95. <br />
  96. <h3 class="text-center">{{ paper.course.name }}&nbsp;试卷</h3>
  97. <h5 class="text-center">
  98. <span v-show="paper.hasAudio">(含音频试卷)</span>
  99. </h5>
  100. <br />
  101. <h4 class="text-center">(课程代码&nbsp;{{ paper.course.code }})</h4>
  102. <br />
  103. </div>
  104. <div class="text-left">
  105. <el-table :data="paper.paperDetails" border style="width: 100%">
  106. <el-table-column header-align="center" label="大题名称">
  107. <template slot-scope="scope">
  108. <span>{{ scope.row.name }}</span>
  109. </template>
  110. </el-table-column>
  111. <el-table-column header-align="center" label="大题总分">
  112. <template slot-scope="scope">
  113. <span>{{ scope.row.score }}</span>
  114. </template>
  115. </el-table-column>
  116. <el-table-column header-align="center" label="小题数量">
  117. <template slot-scope="scope">
  118. <span>{{ scope.row.unitCount }}</span>
  119. </template>
  120. </el-table-column>
  121. <el-table-column header-align="center" label="公开数量">
  122. <template slot-scope="scope">
  123. <span>{{ scope.row.pubCount }}</span>
  124. </template>
  125. </el-table-column>
  126. <el-table-column header-align="center" label="非公开数量">
  127. <template slot-scope="scope">
  128. <span>{{ scope.row.noPubCount }}</span>
  129. </template>
  130. </el-table-column>
  131. </el-table>
  132. <div class="mainQues" style="margin-top: 20px; margin-left: 0px">
  133. <div class="mainQuesTitle">
  134. <span>考试说明:</span>
  135. <span>
  136. <el-button size="small" @click="openEditExamPaperRemark"
  137. >编辑</el-button
  138. >
  139. </span>
  140. <div style="width: 550px; margin-left: 20px; margin-top: 20px">
  141. <span v-html="paper.examRemark"></span>
  142. </div>
  143. </div>
  144. </div>
  145. <!-- end by wwh -->
  146. <div>
  147. <h1>本试卷满分{{ paper.totalScore }}分。</h1>
  148. </div>
  149. <br />
  150. </div>
  151. </div>
  152. <div>
  153. <!-- 循环大题 -->
  154. <div
  155. v-for="(paperDetail, detailIndex) in paper.paperDetails"
  156. v-show="paperDetailShow(paperDetail)"
  157. :key="detailIndex"
  158. class="mainQues"
  159. >
  160. <div
  161. class="mainQuesTitle"
  162. @mouseover="quesMouseOver(paperDetail.id)"
  163. @mouseout="quesMouseOut(paperDetail.id)"
  164. >
  165. <span>{{ paperDetail.cnNum }}</span> <span>.</span>
  166. <span>{{ paperDetail.name }}</span>
  167. <span>
  168. ({{ !paperDetail.title ? "本大题" : paperDetail.title + "," }}共{{
  169. paperDetail.unitCount
  170. }}小题,满分{{ paperDetail.score }}分)
  171. </span>
  172. <span :id="paperDetail.id" class="btnDiv">
  173. <el-button
  174. v-show="parentView == 'gen_paper'"
  175. size="small"
  176. @click="selectQues(paperDetail.id)"
  177. >选题
  178. </el-button>
  179. <el-button size="small" @click="openEditPaperDetail(paperDetail)"
  180. >编辑
  181. </el-button>
  182. <el-button
  183. v-if="showUp(paperDetail)"
  184. size="small"
  185. @click="movePaperDetail(paperDetail, 'up')"
  186. >上移
  187. </el-button>
  188. <el-button
  189. v-if="showDown(paperDetail)"
  190. size="small"
  191. @click="movePaperDetail(paperDetail, 'down')"
  192. >下移
  193. </el-button>
  194. <el-button
  195. size="small"
  196. type="danger"
  197. @click="deletePaperDetail(paperDetail.id)"
  198. >删除
  199. </el-button>
  200. <el-button
  201. v-show="showButtons[detailIndex].up"
  202. size="small"
  203. icon="el-icon-arrow-up"
  204. @click.stop="hideContent(detailIndex)"
  205. ></el-button>
  206. <el-button
  207. v-show="!showButtons[detailIndex].up"
  208. size="small"
  209. icon="el-icon-arrow-down"
  210. @click.stop="showContent(detailIndex)"
  211. ></el-button>
  212. </span>
  213. </div>
  214. <!-- 循环小题 -->
  215. <div v-show="showQuestions[detailIndex].is_show">
  216. <div
  217. v-for="(paperDetailUnit, unitIndex) in paperDetail.paperDetailUnits"
  218. v-show="quesShow(paperDetailUnit.id)"
  219. :key="unitIndex"
  220. class="ques"
  221. >
  222. <reduplicate_mark
  223. :id="paperDetailUnit.id"
  224. :show="reduplicateMarkShow(paperDetailUnit.id)"
  225. :fill-color="reduplicateMarkColor(paperDetailUnit.id)"
  226. :checked="reduplicateMarkCheck(paperDetailUnit.id)"
  227. @reduplicate_mark_check="reduplicate_mark_check"
  228. >
  229. </reduplicate_mark>
  230. <div
  231. class="quesSelect"
  232. @mouseover="quesMouseOver(paperDetailUnit.id)"
  233. @mouseout="quesMouseOut(paperDetailUnit.id)"
  234. >
  235. <div :id="paperDetailUnit.id" class="btnDiv">
  236. <el-button
  237. size="small"
  238. @click="editQues(paperDetailUnit, paperDetailUnit.question)"
  239. >编辑
  240. </el-button>
  241. <el-button
  242. type="danger"
  243. size="small"
  244. @click="deleteQues(paperDetailUnit)"
  245. >删除
  246. </el-button>
  247. </div>
  248. <div class="quesBody">
  249. <span class="ques-title">{{ paperDetailUnit.number }}.</span>
  250. <span
  251. v-question-audio
  252. class="ques-body"
  253. :hasAudio="paperDetailUnit.question.hasAudio"
  254. :questionId="paperDetailUnit.question.id"
  255. v-html="paperDetailUnit.question.quesBody"
  256. ></span>
  257. <span class="score-span">
  258. ({{ paperDetailUnit.score }}分)
  259. </span>
  260. </div>
  261. <div
  262. v-for="(quesOption, optionIndex) in paperDetailUnit.question
  263. .quesOptions"
  264. :key="optionIndex"
  265. class="quesOption"
  266. >
  267. <span class="ques-title"
  268. >{{ optionIndex | optionOrderWordFilter }}.
  269. </span>
  270. <span
  271. v-question-audio
  272. class="ques-body"
  273. :hasAudio="paperDetailUnit.question.hasAudio"
  274. :questionId="paperDetailUnit.question.id"
  275. v-html="quesOption.optionBody"
  276. ></span>
  277. </div>
  278. </div>
  279. <br />
  280. <div
  281. v-for="(subQuestion, subIndex) in paperDetailUnit.question
  282. .subQuestions"
  283. v-show="quesShow(subQuestion.id)"
  284. :key="subIndex"
  285. class="subQues"
  286. >
  287. <reduplicate_mark
  288. :show="reduplicateMarkShow(subQuestion.id)"
  289. ></reduplicate_mark>
  290. <div
  291. class="quesSelect"
  292. @mouseover="
  293. quesMouseOver(getSubQuesEditId(paperDetailUnit, subQuestion))
  294. "
  295. @mouseout="
  296. quesMouseOut(getSubQuesEditId(paperDetailUnit, subQuestion))
  297. "
  298. >
  299. <div
  300. :id="getSubQuesEditId(paperDetailUnit, subQuestion)"
  301. class="btnDiv"
  302. >
  303. <el-button
  304. size="small"
  305. @click="editQues(paperDetailUnit, subQuestion)"
  306. >编辑
  307. </el-button>
  308. </div>
  309. <div class="quesBody">
  310. <span class="ques-title"
  311. >{{ subQuestion.quesParams.number }}.
  312. </span>
  313. <span v-html="subQuestion.quesBody"></span>
  314. <span
  315. >({{ paperDetailUnit.subScoreList[subIndex] }}分)</span
  316. >
  317. </div>
  318. <div
  319. v-for="(
  320. subQuesOption, subOptIndex
  321. ) in subQuestion.quesOptions"
  322. :key="subOptIndex"
  323. class="quesOption"
  324. >
  325. <span class="ques-title"
  326. >{{ subOptIndex | optionOrderWordFilter }}.
  327. </span>
  328. <span v-html="subQuesOption.optionBody"></span>
  329. </div>
  330. <br />
  331. </div>
  332. </div>
  333. </div>
  334. <br />
  335. </div>
  336. </div>
  337. </div>
  338. <div class="text-left">
  339. <!-- 编辑大题弹框 -->
  340. <el-dialog
  341. v-loading.body="detailLoading"
  342. width="360px"
  343. title="大题名称编辑"
  344. element-loading-text="保存中。。。"
  345. :visible.sync="paperDatailDialog"
  346. @close="closeQuesDialog"
  347. >
  348. <el-form
  349. :model="editpaperDetail"
  350. label-position="right"
  351. label-width="80px"
  352. >
  353. <el-row :gutter="10">
  354. <el-col :xs="10" :sm="10" :md="10" :lg="10">
  355. <el-form-item label="大题名称" placeholder="大题名称">
  356. <el-input
  357. v-model="editpaperDetail.name"
  358. class="dialog_input_width"
  359. />
  360. </el-form-item>
  361. </el-col>
  362. </el-row>
  363. <el-row>
  364. <el-form-item>
  365. <el-button
  366. type="primary"
  367. @click="savePaperDatail(editpaperDetail)"
  368. >保存</el-button
  369. >
  370. <el-button @click="closePaperDatailDialog()">取消</el-button>
  371. </el-form-item>
  372. </el-row>
  373. </el-form>
  374. </el-dialog>
  375. <!-- 编辑试题弹框 -->
  376. <el-dialog
  377. v-loading.body="dialogLoading"
  378. title="试题编辑"
  379. element-loading-text="保存中。。。"
  380. :visible.sync="quesDialog"
  381. @close="closeQuesDialog"
  382. >
  383. <el-form :model="quesModel" label-position="right" label-width="80px">
  384. <el-row :gutter="10">
  385. <el-col :xs="10" :sm="10" :md="10" :lg="10">
  386. <el-form-item label="题型">
  387. <el-select
  388. v-model="quesModel.questionType"
  389. :disabled="true"
  390. placeholder="请输入题型"
  391. >
  392. <el-option
  393. v-for="item in questionTypes"
  394. :key="item.value"
  395. :label="item.label"
  396. :value="item.value"
  397. >
  398. </el-option>
  399. </el-select>
  400. </el-form-item>
  401. </el-col>
  402. <el-col :xs="10" :sm="10" :md="10" :lg="10">
  403. <el-form-item label="分值">
  404. <el-input
  405. v-model="quesModel.score"
  406. placeholder="分值"
  407. :disabled="quesModel.questionType == 'NESTED_ANSWER_QUESTION'"
  408. ></el-input>
  409. </el-form-item>
  410. </el-col>
  411. </el-row>
  412. <!-- create by weiwenhai 添加难度,公开度,试题属性 -->
  413. <el-row :gutter="10">
  414. <el-col :xs="10" :sm="10" :md="10" :lg="10">
  415. <el-form-item label="难度">
  416. <el-select
  417. v-model="quesModel.difficultyDegree"
  418. placeholder="请输入难度"
  419. :disabled="
  420. quesModel.questionType == 'NESTED_ANSWER_QUESTION'
  421. ? true
  422. : updatePorperty
  423. "
  424. >
  425. <el-option
  426. v-for="item in difficultyDegreeList"
  427. :key="item.value"
  428. :label="item.label"
  429. :value="item.value"
  430. >
  431. </el-option>
  432. </el-select>
  433. </el-form-item>
  434. </el-col>
  435. <el-col :xs="10" :sm="10" :md="10" :lg="10">
  436. <el-form-item label="公开度">
  437. <el-select
  438. v-model="quesModel.publicity"
  439. placeholder="请输入公开度"
  440. :disabled="updatePorperty"
  441. >
  442. <el-option
  443. v-for="item in publicityList"
  444. :key="item.value"
  445. :label="item.label"
  446. :value="item.value"
  447. >
  448. </el-option>
  449. </el-select>
  450. </el-form-item>
  451. </el-col>
  452. <el-col
  453. v-if="quesModel.questionType == 'TEXT_ANSWER_QUESTION'"
  454. :xs="10"
  455. :sm="10"
  456. :md="10"
  457. :lg="10"
  458. >
  459. <el-form-item label="作答类型">
  460. <el-select
  461. v-model="quesModel.answerType"
  462. :disabled="updatePorperty"
  463. >
  464. <el-option
  465. v-for="item in answerTypes"
  466. :key="item.value"
  467. :label="item.label"
  468. :value="item.value"
  469. >
  470. </el-option>
  471. </el-select>
  472. </el-form-item>
  473. </el-col>
  474. </el-row>
  475. <el-row :gutter="10">
  476. <el-col :xs="20" :sm="20" :md="20" :lg="20">
  477. <el-form-item label="属性列表">
  478. <el-tooltip
  479. v-for="(content, propIndex) in quesModel.quesProperties"
  480. :key="propIndex"
  481. placement="top"
  482. >
  483. <div slot="content">
  484. <span v-if="content.firstProperty != null"
  485. >一级属性:{{ content.firstProperty.name }}</span
  486. ><br />
  487. <span v-if="content.secondProperty != null"
  488. >二级属性:{{ content.secondProperty.name }}</span
  489. >
  490. </div>
  491. <span>
  492. <el-tag
  493. :key="content.id"
  494. style="margin-right: 5px"
  495. :closable="!updatePorperty"
  496. type="primary"
  497. @close="handleClose(content)"
  498. >
  499. {{ content.coursePropertyName }}
  500. </el-tag>
  501. </span>
  502. </el-tooltip>
  503. </el-form-item>
  504. </el-col>
  505. </el-row>
  506. <el-row>
  507. <el-col :span="6">
  508. <el-form-item label="属性名" label-width="60px">
  509. <el-select
  510. v-model="coursePropertyName"
  511. placeholder="属性名"
  512. class="property_with"
  513. :disabled="updatePorperty"
  514. @change="searchFirst"
  515. >
  516. <el-option label="请选择" value=""></el-option>
  517. <el-option
  518. v-for="item in coursePropertyList"
  519. :key="item.name"
  520. :label="item.name"
  521. :value="item.name"
  522. >
  523. </el-option>
  524. </el-select>
  525. </el-form-item>
  526. </el-col>
  527. <el-col :span="6">
  528. <el-form-item label="一级" label-width="48px">
  529. <el-select
  530. v-model="firstPropertyId"
  531. placeholder="一级"
  532. class="property_with"
  533. :disabled="updatePorperty"
  534. @change="searchSecond"
  535. >
  536. <el-option label="请选择" value=""></el-option>
  537. <el-option
  538. v-for="item in firstPropertyList"
  539. :key="item.id"
  540. :label="item.name"
  541. :value="item.id"
  542. >
  543. </el-option>
  544. </el-select>
  545. </el-form-item>
  546. </el-col>
  547. <el-col :span="6">
  548. <el-form-item label="二级" label-width="48px">
  549. <el-select
  550. v-model="secondPropertyId"
  551. placeholder="二级"
  552. class="property_with"
  553. :disabled="updatePorperty"
  554. >
  555. <el-option label="请选择" value=""></el-option>
  556. <el-option
  557. v-for="item in secondPropertyList"
  558. :key="item.id"
  559. :label="item.name"
  560. :value="item.id"
  561. >
  562. </el-option>
  563. </el-select>
  564. </el-form-item>
  565. </el-col>
  566. <el-col :span="6">
  567. <el-form-item>
  568. <el-button
  569. type="primary"
  570. style="margin-left: -50px"
  571. :disabled="updatePorperty"
  572. @click="insertProperty"
  573. ><i class="el-icon-plus"></i>新增属性
  574. </el-button>
  575. </el-form-item>
  576. </el-col>
  577. </el-row>
  578. <!-- end by weiwenhai -->
  579. <div v-if="paper.paperType != 'IMPORT'">
  580. <el-row>
  581. <el-col>
  582. <el-form-item label="题目">
  583. <span v-html="quesModel.quesBody"></span>
  584. </el-form-item>
  585. </el-col>
  586. </el-row>
  587. <el-form-item
  588. v-for="(quesOption, optIndex) in quesModel.quesOptions"
  589. :key="optIndex"
  590. ><el-col :span="2">
  591. <span>{{ optIndex | optionOrderWordFilter }}</span>
  592. </el-col>
  593. <el-col :span="20">
  594. <span v-html="quesOption.optionBody"></span>
  595. </el-col>
  596. </el-form-item>
  597. <div>
  598. <el-form-item label="答案">
  599. <span v-html="quesModel.quesAnswer"></span>
  600. </el-form-item>
  601. </div>
  602. <!-- 单选或多选 -->
  603. </div>
  604. <div v-if="paper.paperType == 'IMPORT'">
  605. <el-row>
  606. <el-col>
  607. <el-form-item label="题目">
  608. <ckeditor v-model="quesModel.quesBody"></ckeditor>
  609. </el-form-item>
  610. </el-col>
  611. </el-row>
  612. <el-form-item
  613. v-for="(quesOption, optIndex) in quesModel.quesOptions"
  614. :key="optIndex"
  615. >
  616. <el-col :span="2">
  617. <el-radio
  618. v-if="quesModel.questionType === 'SINGLE_ANSWER_QUESTION'"
  619. v-model="singleRightAnswer"
  620. :label="optIndex | optionOrderWordFilter"
  621. ></el-radio>
  622. <el-checkbox
  623. v-if="quesModel.questionType === 'MULTIPLE_ANSWER_QUESTION'"
  624. v-model="multipleRightAnswer"
  625. :label="optIndex | optionOrderWordFilter"
  626. ></el-checkbox>
  627. </el-col>
  628. <el-col :span="20">
  629. <ckeditor v-model="quesOption.optionBody"></ckeditor>
  630. </el-col>
  631. <el-col :span="2">
  632. <i
  633. class="el-icon-delete"
  634. title="删除"
  635. @click.prevent="removeQuesOption(quesOption)"
  636. ></i>
  637. </el-col>
  638. </el-form-item>
  639. <div
  640. v-if="
  641. quesModel.questionType != 'NESTED_ANSWER_QUESTION' &&
  642. quesModel.questionType != 'SINGLE_ANSWER_QUESTION' &&
  643. quesModel.questionType != 'MULTIPLE_ANSWER_QUESTION' &&
  644. quesModel.questionType != 'BOOL_ANSWER_QUESTION'
  645. "
  646. >
  647. <el-form-item label="答案">
  648. <ckeditor v-model="quesModel.quesAnswer"></ckeditor>
  649. </el-form-item>
  650. </div>
  651. <!-- 单选或多选 -->
  652. <div
  653. v-if="
  654. quesModel.questionType == 'SINGLE_ANSWER_QUESTION' ||
  655. quesModel.questionType == 'MULTIPLE_ANSWER_QUESTION'
  656. "
  657. >
  658. <el-form-item label="答案">
  659. <span v-html="answer"></span>
  660. </el-form-item>
  661. </div>
  662. <div v-if="quesModel.questionType == 'BOOL_ANSWER_QUESTION'">
  663. <el-row>
  664. <el-col>
  665. <el-form-item label="答案" prop="quesAnswer">
  666. <el-select
  667. v-model="quesModel.quesAnswer"
  668. placeholder="请选择"
  669. >
  670. <el-option
  671. v-for="op in options"
  672. :key="op"
  673. :label="op"
  674. :value="op"
  675. >
  676. </el-option>
  677. </el-select>
  678. </el-form-item>
  679. </el-col>
  680. </el-row>
  681. </div>
  682. </div>
  683. <div
  684. :class="{
  685. margin_left_30:
  686. paper.paperType == 'IMPORT' &&
  687. (quesModel.questionType == 'SINGLE_ANSWER_QUESTION' ||
  688. quesModel.questionType == 'MULTIPLE_ANSWER_QUESTION'),
  689. margin_left_40: !(
  690. paper.paperType == 'IMPORT' &&
  691. (quesModel.questionType == 'SINGLE_ANSWER_QUESTION' ||
  692. quesModel.questionType == 'MULTIPLE_ANSWER_QUESTION')
  693. ),
  694. }"
  695. >
  696. <el-button
  697. v-if="
  698. paper.paperType == 'IMPORT' &&
  699. (quesModel.questionType == 'SINGLE_ANSWER_QUESTION' ||
  700. quesModel.questionType == 'MULTIPLE_ANSWER_QUESTION')
  701. "
  702. type="primary"
  703. @click="addQuesOption"
  704. ><i class="el-icon-plus"></i> 新增选项
  705. </el-button>
  706. <el-button type="primary" @click="savePaperDetailUnit()"
  707. >保存</el-button
  708. >
  709. <el-button @click="closeQuesDialog">取消</el-button>
  710. </div>
  711. </el-form>
  712. </el-dialog>
  713. <!-- 考试说明弹框 -->
  714. <el-dialog title="考试说明编辑" :visible.sync="paperRemarkDialog">
  715. <el-form label-position="right" label-width="80px">
  716. <el-row :gutter="10">
  717. <el-col :xs="10" :sm="10" :md="10" :lg="10">
  718. <el-form-item label="考试说明">
  719. <div style="width: 550px">
  720. <ckeditor
  721. v-model="examRemark"
  722. :display="display"
  723. :width="wValue"
  724. :height="hValue"
  725. ></ckeditor>
  726. </div>
  727. </el-form-item>
  728. </el-col>
  729. </el-row>
  730. <div style="margin-top: 20px; margin-left: 40%">
  731. <el-button type="primary" @click="savePaperRemark">保存</el-button>
  732. <el-button @click="closPaperRemark">取消</el-button>
  733. </div>
  734. </el-form>
  735. </el-dialog>
  736. <!-- 上传音频弹框 -->
  737. <el-dialog
  738. title="上传音频文件"
  739. :visible.sync="dialogRadioFile"
  740. :before-close="closeAudioDialog"
  741. >
  742. <form
  743. id="radioForm"
  744. method="post"
  745. action=""
  746. enctype="multipart/form-data"
  747. >
  748. <input
  749. id="radioFile"
  750. name="files"
  751. type="file"
  752. value="上传音频文件"
  753. webkitdirectory
  754. />
  755. <el-button type="warning" @click="checkFile">检查文件名</el-button>
  756. <el-button
  757. type="info"
  758. :loading="uploadAudioLoading"
  759. :disabled="isUpload || uploadAudioLoading"
  760. @click="uploadAudioFile"
  761. >
  762. <span v-show="!uploadAudioLoading">开始上传</span>
  763. <span v-show="uploadAudioLoading">正在上传中...</span>
  764. </el-button>
  765. </form>
  766. <div v-if="checkResult" style="margin-top: 20px">
  767. <span>检查结果:</span><br /><br />
  768. <span v-show="message == 'OK!'" style="color: #13ce66">OK!</span>
  769. <span v-show="message != 'OK!'" style="color: #ff4949">{{
  770. message
  771. }}</span>
  772. </div>
  773. </el-dialog>
  774. <el-dialog
  775. title="上传答案文件"
  776. :visible.sync="dialogAnswerFile"
  777. :before-close="closeAnswerDialog"
  778. >
  779. <form
  780. id="answerForm"
  781. method="post"
  782. action=""
  783. enctype="multipart/form-data"
  784. >
  785. <input
  786. id="answerFile"
  787. name="answerFiles"
  788. type="file"
  789. value="上传答案文件"
  790. accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
  791. />
  792. <el-button type="info" @click="downAnswerTemplate">
  793. <span>下载模板</span>
  794. </el-button>
  795. <el-button
  796. type="info"
  797. :loading="uploadAnswerLoading"
  798. :disabled="uploadAnswerLoading"
  799. @click="uploadAnswerFile"
  800. >
  801. <span v-show="!uploadAnswerLoading">开始上传</span>
  802. <span v-show="uploadAnswerLoading">正在上传中...</span>
  803. </el-button>
  804. </form>
  805. <div style="margin-top: 20px">
  806. <span v-show="answerMessage != ''" style="color: #ff4949">{{
  807. answerMessage
  808. }}</span>
  809. </div>
  810. </el-dialog>
  811. </div>
  812. </div>
  813. </template>
  814. <script>
  815. import { QUESTION_API } from "@/constants/constants";
  816. import { isEmptyStr, QUESTION_TYPES } from "../constants/constants";
  817. import { mapState } from "vuex";
  818. import reduplicate_mark from "../component/reduplicate_mark.vue";
  819. import randomColor from "randomcolor";
  820. import ckeditor from "../component/ckeditor.vue";
  821. export default {
  822. name: "EditPaperApp",
  823. components: {
  824. reduplicate_mark,
  825. ckeditor,
  826. },
  827. data() {
  828. return {
  829. hValue: "100px",
  830. wValue: "500px",
  831. display: "block",
  832. uploadAction: "",
  833. fileList: [],
  834. answerFileList: [],
  835. paperId: "",
  836. paperDetailId: "",
  837. editPaperDetailUnit: "",
  838. quesDialog: false,
  839. paperDatailDialog: false,
  840. paperRemarkDialog: false,
  841. parentView: "",
  842. paper: {
  843. course: {
  844. code: "",
  845. name: "",
  846. },
  847. examRemark: "",
  848. },
  849. loading: false,
  850. dialogLoading: false,
  851. detailLoading: false,
  852. uploadAudioLoading: false,
  853. uploadAnswerLoading: false,
  854. questionTypes: QUESTION_TYPES,
  855. questionType: "",
  856. quesModel: { quesProperties: [] },
  857. editpaperDetail: {},
  858. reduplicateQuestions: [],
  859. reduplicateGroup: [],
  860. reduplicateQuesColor: [],
  861. singleRightAnswer: "", //接收单选答案
  862. multipleRightAnswer: [], //接收多选答案
  863. options: ["正确", "错误"],
  864. duplicateLoading: false,
  865. dialogRadioFile: false,
  866. dialogAnswerFile: false,
  867. isUpload: true,
  868. isUploadAnswer: true,
  869. message: "",
  870. answerMessage: "",
  871. checkResult: false,
  872. checkResultAnswer: false,
  873. fileNameList: [],
  874. defaultColor: [
  875. "Red",
  876. "Blue",
  877. "LimeGreen",
  878. "GoldenRod",
  879. "Black",
  880. "BlueViolet",
  881. "Chocolate",
  882. "DarkCyan",
  883. "HotPink",
  884. "Orange",
  885. "IndianRed",
  886. "Indigo",
  887. "Green",
  888. "Aqua",
  889. "CadetBlue",
  890. "SkyBlue",
  891. "SlateBlue",
  892. "SlateGray",
  893. "Tomato",
  894. "VioletRed",
  895. ],
  896. difficultyDegreeList: [
  897. { label: 0.1, value: 0.1 },
  898. { label: 0.2, value: 0.2 },
  899. { label: 0.3, value: 0.3 },
  900. { label: 0.4, value: 0.4 },
  901. { label: 0.5, value: 0.5 },
  902. { label: 0.6, value: 0.6 },
  903. { label: 0.7, value: 0.7 },
  904. { label: 0.8, value: 0.8 },
  905. { label: 0.9, value: 0.9 },
  906. { label: 1.0, value: 1.0 },
  907. ],
  908. publicityList: [
  909. { label: "公开", value: true },
  910. { label: "非公开", value: false },
  911. ],
  912. answerTypes: [
  913. { label: "文本", value: "DIVERSIFIED_TEXT" },
  914. { label: "音频", value: "SINGLE_AUDIO" },
  915. ],
  916. coursePropertyList: [],
  917. coursePropertyName: "", //课程属性名
  918. firstPropertyList: [], //一级属性集合
  919. firstPropertyId: "", //一级属性id
  920. secondPropertyList: [], //二级属性集合
  921. secondPropertyId: "", //二级属性id
  922. examRemark: "",
  923. showQuestions: [],
  924. showButtons: [],
  925. };
  926. },
  927. computed: {
  928. ...mapState({
  929. user: (state) => state.user,
  930. }),
  931. updatePorperty() {
  932. if (this.parentView === "gen_paper") {
  933. return true;
  934. }
  935. return false;
  936. },
  937. answer() {
  938. if (this.quesModel.questionType == "SINGLE_ANSWER_QUESTION") {
  939. return this.singleRightAnswer;
  940. } else if (this.quesModel.questionType == "MULTIPLE_ANSWER_QUESTION") {
  941. var obj = this.multipleRightAnswer;
  942. return obj.sort().toString();
  943. }
  944. return this.quesModel.quesAnswer;
  945. },
  946. },
  947. created() {
  948. // $("body").attr("style", "");
  949. document.getElementsByTagName("body")[0].style = "";
  950. this.paperId = this.$route.params.id;
  951. this.parentView = this.$route.params.parentView;
  952. this.initPaper();
  953. this.getreduplicateQuestions();
  954. this.uploadAction = QUESTION_API + "/uploadRadio/" + this.paperId;
  955. this.uploadHeaders = {
  956. key: this.user.key,
  957. token: this.user.token,
  958. };
  959. },
  960. methods: {
  961. movePaperDetail(detail, vector) {
  962. let vectorStr = vector == "up" ? "上移" : "下移";
  963. this.$alert("您确定" + vectorStr + "吗?", "提示", {
  964. confirmButtonText: "确定",
  965. callback: (action) => {
  966. if (action == "confirm") {
  967. this.loading = true;
  968. this.$http
  969. .put(
  970. QUESTION_API +
  971. "/paperDetail/" +
  972. this.paperId +
  973. "/" +
  974. detail.id +
  975. "/" +
  976. vector
  977. )
  978. .then(() => {
  979. this.initPaper();
  980. this.loading = true;
  981. this.$notify({
  982. message: vectorStr + "成功",
  983. type: "success",
  984. });
  985. this.loading = false;
  986. });
  987. }
  988. },
  989. });
  990. },
  991. showUp(detail) {
  992. if (this.paper.paperDetails.length <= 1) {
  993. return false;
  994. }
  995. if (detail.id != this.paper.paperDetails[0].id) {
  996. return true;
  997. } else {
  998. return false;
  999. }
  1000. },
  1001. showDown(detail) {
  1002. if (this.paper.paperDetails.length <= 1) {
  1003. return false;
  1004. }
  1005. if (
  1006. detail.id !=
  1007. this.paper.paperDetails[this.paper.paperDetails.length - 1].id
  1008. ) {
  1009. return true;
  1010. } else {
  1011. return false;
  1012. }
  1013. },
  1014. downAnswerTemplate() {
  1015. var key = this.user.key;
  1016. var token = this.user.token;
  1017. window.open(
  1018. QUESTION_API + "/paper/answer/template?$key=" + key + "&$token=" + token
  1019. );
  1020. },
  1021. openAnswerDialog() {
  1022. this.checkResultAnswer = false;
  1023. this.isUploadAnswer = true;
  1024. if (document.getElementById("answerFile")) {
  1025. document.getElementById("answerFile").value = "";
  1026. }
  1027. this.dialogAnswerFile = true;
  1028. this.answerFileList = [];
  1029. },
  1030. closeAnswerDialog() {
  1031. this.answerMessage = "";
  1032. this.dialogAnswerFile = this.uploadAnswerLoading;
  1033. },
  1034. uploadAnswerFile() {
  1035. this.answerMessage = "";
  1036. var fileList = document.getElementById("answerFile").files;
  1037. if (fileList.length == 0) {
  1038. this.answerMessage = "请选择文件!";
  1039. return;
  1040. }
  1041. let param = new FormData();
  1042. //循环添加到formData中
  1043. for (var i = 0; i < fileList.length; i++) {
  1044. var file = fileList[i];
  1045. param.append("dataFile", file, file.name);
  1046. }
  1047. let config = {
  1048. headers: { "Content-Type": "multipart/form-data" },
  1049. };
  1050. this.uploadAnswerLoading = true;
  1051. this.$http
  1052. .post(
  1053. QUESTION_API + "/paper/answer/import/" + this.paperId,
  1054. param,
  1055. config
  1056. )
  1057. .then(() => {
  1058. this.dialogAnswerFile = false;
  1059. this.uploadAnswerLoading = false;
  1060. this.checkResultAnswer = false;
  1061. this.isUploadAnswer = true;
  1062. document.getElementById("answerFile").value = "";
  1063. this.initPaper();
  1064. })
  1065. .catch((error) => {
  1066. this.answerMessage = error.response.data.desc;
  1067. document.getElementById("answerFile").value = "";
  1068. this.uploadAnswerLoading = false;
  1069. });
  1070. },
  1071. //隐藏大题下的所有小题
  1072. hideContent(index) {
  1073. console.log("up");
  1074. this.showQuestions[index].is_show = false;
  1075. this.showButtons[index].up = false;
  1076. },
  1077. //展开大题下所有小题
  1078. showContent(index) {
  1079. console.log("down");
  1080. this.showQuestions[index].is_show = true;
  1081. this.showButtons[index].up = true;
  1082. },
  1083. quesMouseOver(index) {
  1084. document.getElementById(index).style.visibility = "visible";
  1085. },
  1086. quesMouseOut(index) {
  1087. document.getElementById(index).style.visibility = "hidden";
  1088. },
  1089. selectQues(id) {
  1090. this.paperDetailId = id;
  1091. var courseCode = this.paper.course.code;
  1092. var courseName = this.paper.course.name;
  1093. this.$router.push({
  1094. path:
  1095. "/select_question/" +
  1096. this.paper.id +
  1097. "/" +
  1098. courseCode +
  1099. "/" +
  1100. encodeURIComponent(courseName) +
  1101. "/" +
  1102. this.paperDetailId +
  1103. "/" +
  1104. this.parentView,
  1105. });
  1106. },
  1107. //打开编辑大题题目弹窗
  1108. openEditPaperDetail(paperDetail) {
  1109. this.paperDatailDialog = true;
  1110. this.editpaperDetail = Object.assign({}, paperDetail); //浅拷贝
  1111. },
  1112. //关闭编辑大题题目弹窗
  1113. closePaperDatailDialog() {
  1114. this.paperDatailDialog = false;
  1115. this.editpaperDetail = {};
  1116. },
  1117. //保存大题题目信息
  1118. savePaperDatail(editpaperDetail) {
  1119. this.detailLoading = true;
  1120. var paperId = this.paper.id;
  1121. this.$http
  1122. .post(QUESTION_API + "/updatePaperDetail/" + paperId, editpaperDetail)
  1123. .then(() => {
  1124. this.$notify({
  1125. message: "保存成功",
  1126. type: "success",
  1127. });
  1128. this.detailLoading = false;
  1129. this.closePaperDatailDialog();
  1130. this.initPaper();
  1131. });
  1132. },
  1133. //初始化试卷
  1134. initPaper() {
  1135. const scrollPosition =
  1136. document.documentElement.scrollTop || document.body.scrollTop;
  1137. this.loading = true;
  1138. this.paper = {
  1139. course: {
  1140. code: "",
  1141. name: "",
  1142. },
  1143. };
  1144. this.$http
  1145. .get(QUESTION_API + "/paper/" + this.paperId)
  1146. .then((response) => {
  1147. this.paper = response.data;
  1148. //查询所有课程属性名
  1149. this.initCourseProperty(this.paper.course.code);
  1150. //将所有小题分为公开和非公开
  1151. if (this.paper.paperDetails && this.paper.paperDetails.length > 0) {
  1152. for (let paperDetil of this.paper.paperDetails) {
  1153. this.showQuestions.push({ is_show: true });
  1154. this.showButtons.push({ up: true });
  1155. paperDetil.pubCount = 0;
  1156. paperDetil.noPubCount = 0;
  1157. if (
  1158. paperDetil.paperDetailUnits &&
  1159. paperDetil.paperDetailUnits.length > 0
  1160. ) {
  1161. for (let paperDetilUt of paperDetil.paperDetailUnits) {
  1162. if (
  1163. paperDetilUt.question.questionType !=
  1164. "NESTED_ANSWER_QUESTION"
  1165. ) {
  1166. //非套题
  1167. if (paperDetilUt.question.publicity) {
  1168. paperDetil.pubCount = paperDetil.pubCount + 1;
  1169. } else {
  1170. paperDetil.noPubCount = paperDetil.noPubCount + 1;
  1171. }
  1172. } else {
  1173. //循环所有子题
  1174. for (let ques of paperDetilUt.question.subQuestions) {
  1175. if (ques.publicity) {
  1176. paperDetil.pubCount = paperDetil.pubCount + 1;
  1177. } else {
  1178. paperDetil.noPubCount = paperDetil.noPubCount + 1;
  1179. }
  1180. }
  1181. }
  1182. }
  1183. }
  1184. }
  1185. }
  1186. setTimeout(() => {
  1187. document.documentElement.scrollTop = document.body.scrollTop = scrollPosition;
  1188. console.log(scrollPosition);
  1189. }, 1000);
  1190. this.loading = false;
  1191. });
  1192. },
  1193. //查询所有课程属性名
  1194. initCourseProperty(courseCode) {
  1195. this.$http
  1196. .get(QUESTION_API + "/courseProperty/enable/" + courseCode)
  1197. .then((response) => {
  1198. this.coursePropertyList = response.data;
  1199. });
  1200. },
  1201. //删除大题
  1202. deletePaperDetail(paperDetailsId) {
  1203. //先判断大题下面是否还有小题
  1204. var count = 0;
  1205. for (var i = 0, imax = this.paper.paperDetails.length; i < imax; i++) {
  1206. if (paperDetailsId == this.paper.paperDetails[i].id) {
  1207. if (this.paper.paperDetails[i].paperDetailUnits) {
  1208. count += this.paper.paperDetails[i].paperDetailUnits.length;
  1209. break;
  1210. }
  1211. }
  1212. }
  1213. if (count == 0) {
  1214. this.$alert("您确定删除吗?", "提示", {
  1215. confirmButtonText: "确定",
  1216. callback: (action) => {
  1217. if (action == "confirm") {
  1218. this.loading = true;
  1219. this.$http
  1220. .delete(
  1221. QUESTION_API +
  1222. "/paperDetail/" +
  1223. this.paperId +
  1224. "/" +
  1225. paperDetailsId
  1226. )
  1227. .then(() => {
  1228. this.initPaper();
  1229. this.loading = true;
  1230. this.$notify({
  1231. message: "删除成功",
  1232. type: "success",
  1233. });
  1234. this.loading = false;
  1235. });
  1236. }
  1237. },
  1238. });
  1239. } else {
  1240. this.$alert("大题下还有小题,不可删除!", "提示", {
  1241. confirmButtonText: "确定",
  1242. callback: () => {},
  1243. });
  1244. }
  1245. },
  1246. quesShow(id) {
  1247. if (this.reduplicateGroup.length < 1) {
  1248. return true;
  1249. }
  1250. for (var i = 0, imax = this.reduplicateGroup.length; i < imax; i++) {
  1251. if (id == this.reduplicateGroup[i]) {
  1252. return true;
  1253. }
  1254. }
  1255. return false;
  1256. },
  1257. reduplicateMarkShow(id) {
  1258. var found = false;
  1259. for (var i = 0, imax = this.reduplicateQuestions.length; i < imax; i++) {
  1260. for (
  1261. var j = 0, jmax = this.reduplicateQuestions[i].length;
  1262. j < jmax;
  1263. j++
  1264. ) {
  1265. if (this.reduplicateQuestions[i][j] == id) {
  1266. found = true;
  1267. break;
  1268. }
  1269. }
  1270. if (found) {
  1271. break;
  1272. }
  1273. }
  1274. return found;
  1275. },
  1276. reduplicateMarkColor(id) {
  1277. for (var i = 0, imax = this.reduplicateQuestions.length; i < imax; i++) {
  1278. for (
  1279. var j = 0, jmax = this.reduplicateQuestions[i].length;
  1280. j < jmax;
  1281. j++
  1282. ) {
  1283. if (this.reduplicateQuestions[i][j] == id) {
  1284. return this.reduplicateQuesColor[i];
  1285. }
  1286. }
  1287. }
  1288. },
  1289. reduplicateMarkCheck(id) {
  1290. for (var i = 0, imax = this.reduplicateGroup.length; i < imax; i++) {
  1291. if (id == this.reduplicateGroup[i]) {
  1292. return true;
  1293. }
  1294. }
  1295. return false;
  1296. },
  1297. reduplicate_mark_check(id, checked) {
  1298. console.log(checked);
  1299. console.log(this.reduplicateQuestions);
  1300. console.log(id);
  1301. if (!checked) {
  1302. for (
  1303. var i = 0, imax = this.reduplicateQuestions.length;
  1304. i < imax;
  1305. i++
  1306. ) {
  1307. for (
  1308. var j = 0, jmax = this.reduplicateQuestions[i].length;
  1309. j < jmax;
  1310. j++
  1311. ) {
  1312. if (this.reduplicateQuestions[i][j] == id) {
  1313. this.reduplicateGroup = [];
  1314. for (
  1315. var k = 0, kmax = this.reduplicateQuestions[i].length;
  1316. k < kmax;
  1317. k++
  1318. ) {
  1319. this.reduplicateGroup.push(this.reduplicateQuestions[i][k]);
  1320. }
  1321. return;
  1322. }
  1323. }
  1324. }
  1325. } else {
  1326. this.reduplicateGroup = [];
  1327. }
  1328. },
  1329. //编辑题目
  1330. editQues(paperDetailUnit, question) {
  1331. console.log("question:", question);
  1332. this.coursePropertyName = "";
  1333. this.firstPropertyId = "";
  1334. this.secondPropertyId = "";
  1335. this.editPaperDetailUnit = paperDetailUnit;
  1336. this.quesModel = JSON.parse(JSON.stringify(question)); //深拷贝
  1337. this.quesModel.score = paperDetailUnit.score;
  1338. //如果是套题下面的小题编辑 ( paperDetailUnit的类型是套题,question的类型不是套题)
  1339. if (
  1340. paperDetailUnit.questionType == "NESTED_ANSWER_QUESTION" &&
  1341. question.questionType != "NESTED_ANSWER_QUESTION"
  1342. ) {
  1343. for (var i = 0; i < paperDetailUnit.question.subQuestions.length; i++) {
  1344. if (
  1345. paperDetailUnit.question.subQuestions[i].id == this.quesModel.id
  1346. ) {
  1347. this.quesModel.score = paperDetailUnit.subScoreList[i];
  1348. break;
  1349. }
  1350. }
  1351. }
  1352. if (isEmptyStr(this.quesModel.answerType)) {
  1353. this.quesModel.answerType = "DIVERSIFIED_TEXT";
  1354. }
  1355. if (this.quesModel.questionType == "FILL_BLANK_QUESTION") {
  1356. this.quesModel.quesBody = this.quesModel.quesBody.replace(
  1357. /______/g,
  1358. "###"
  1359. );
  1360. }
  1361. this.assignAnswers(); //给singleRightAnswer或multipleRightAnswer赋值
  1362. this.openQuesDialog();
  1363. },
  1364. //给singleRightAnswer和multipleRightAnswer赋值
  1365. assignAnswers() {
  1366. if (this.quesModel.quesOptions && this.quesModel.quesOptions.length > 0) {
  1367. this.singleRightAnswer = "";
  1368. this.multipleRightAnswer = [];
  1369. for (let i = 0; i < this.quesModel.quesOptions.length; i++) {
  1370. let option = this.quesModel.quesOptions[i];
  1371. if (
  1372. this.quesModel.questionType == "SINGLE_ANSWER_QUESTION" &&
  1373. option.isCorrect == 1
  1374. ) {
  1375. this.singleRightAnswer = String.fromCharCode(65 + i);
  1376. }
  1377. if (
  1378. this.quesModel.questionType == "MULTIPLE_ANSWER_QUESTION" &&
  1379. option.isCorrect == 1
  1380. ) {
  1381. this.multipleRightAnswer.push(String.fromCharCode(65 + i));
  1382. }
  1383. }
  1384. }
  1385. },
  1386. //打开修改试题编辑框
  1387. openQuesDialog() {
  1388. this.quesDialog = true;
  1389. },
  1390. //关闭试题编辑框
  1391. closeQuesDialog() {
  1392. this.quesDialog = false;
  1393. this.quesModel = {};
  1394. },
  1395. //删除属性
  1396. handleClose(tag) {
  1397. this.quesModel.quesProperties.splice(
  1398. this.quesModel.quesProperties.indexOf(tag),
  1399. 1
  1400. );
  1401. },
  1402. //查询一级属性
  1403. searchFirst() {
  1404. this.firstPropertyId = "";
  1405. this.secondPropertyId = "";
  1406. this.secondPropertyList = [];
  1407. if (this.coursePropertyName) {
  1408. for (let courseProperty of this.coursePropertyList) {
  1409. if (courseProperty.name == this.coursePropertyName) {
  1410. this.$http
  1411. .get(QUESTION_API + "/property/first/" + courseProperty.id)
  1412. .then((response) => {
  1413. this.firstPropertyList = response.data;
  1414. });
  1415. }
  1416. }
  1417. }
  1418. },
  1419. //查询二级属性
  1420. searchSecond() {
  1421. this.secondPropertyId = "";
  1422. if (this.firstPropertyId) {
  1423. this.$http
  1424. .get(QUESTION_API + "/property/second/" + this.firstPropertyId)
  1425. .then((response) => {
  1426. this.secondPropertyList = response.data;
  1427. });
  1428. }
  1429. },
  1430. //新增属性
  1431. insertProperty() {
  1432. if (!this.checkInsertPro()) {
  1433. return false;
  1434. }
  1435. var quesProperty = {
  1436. id: "",
  1437. coursePropertyName: "",
  1438. firstProperty: {},
  1439. secondProperty: {},
  1440. };
  1441. if (
  1442. this.quesModel.quesProperties == null ||
  1443. this.quesModel.quesProperties.length == 0
  1444. ) {
  1445. this.quesModel.quesProperties = [];
  1446. }
  1447. if (this.secondPropertyId) {
  1448. quesProperty.id =
  1449. this.coursePropertyName +
  1450. "-" +
  1451. this.firstPropertyId +
  1452. "-" +
  1453. this.secondPropertyId;
  1454. } else {
  1455. quesProperty.id = this.coursePropertyName + "-" + this.firstPropertyId;
  1456. }
  1457. for (let quesPro of this.quesModel.quesProperties) {
  1458. if (quesPro.id == quesProperty.id) {
  1459. this.$notify({
  1460. message: "该属性已存在,请重新选择",
  1461. type: "error",
  1462. });
  1463. return false;
  1464. }
  1465. }
  1466. quesProperty.coursePropertyName = this.coursePropertyName;
  1467. //取到一级属性对象
  1468. for (let property of this.firstPropertyList) {
  1469. if (property.id == this.firstPropertyId) {
  1470. quesProperty.firstProperty = property;
  1471. }
  1472. }
  1473. //判断是否有二级属性
  1474. if (
  1475. this.secondPropertyList != undefined &&
  1476. this.secondPropertyList.length > 0
  1477. ) {
  1478. if (!this.secondPropertyId) {
  1479. this.$notify({
  1480. message: "请选择二级属性",
  1481. type: "error",
  1482. });
  1483. return false;
  1484. }
  1485. }
  1486. //取到二级属性对象
  1487. for (let property of this.secondPropertyList) {
  1488. if (property.id == this.secondPropertyId) {
  1489. quesProperty.secondProperty = property;
  1490. }
  1491. }
  1492. this.quesModel.quesProperties.push(quesProperty);
  1493. this.quesModel = Object.assign({}, this.quesModel);
  1494. //清空下拉框
  1495. this.coursePropertyName = "";
  1496. this.firstPropertyId = "";
  1497. this.secondPropertyId = "";
  1498. this.firstPropertyList = [];
  1499. this.secondPropertyList = [];
  1500. },
  1501. //新增属性验证
  1502. checkInsertPro() {
  1503. if (!this.coursePropertyName) {
  1504. this.$notify({
  1505. message: "请选择属性",
  1506. type: "error",
  1507. });
  1508. return false;
  1509. }
  1510. if (!this.firstPropertyId) {
  1511. this.$notify({
  1512. message: "请选择一级属性",
  1513. type: "error",
  1514. });
  1515. return false;
  1516. }
  1517. return true;
  1518. },
  1519. //删除选项
  1520. removeQuesOption(option) {
  1521. this.singleRightAnswer = "";
  1522. this.multipleRightAnswer = [];
  1523. let index = this.quesModel.quesOptions.indexOf(option);
  1524. if (index !== -1) {
  1525. this.quesModel.quesOptions.splice(index, 1);
  1526. }
  1527. if (this.quesModel.quesOptions.length > 0) {
  1528. for (var i = 0; i < this.quesModel.quesOptions.length; i++) {
  1529. var quesOption = this.quesModel.quesOptions[i];
  1530. quesOption["number"] = i + 1;
  1531. if (quesOption.isCorrect == 1) {
  1532. var answerOrderNum = String.fromCharCode(65 + i);
  1533. if (this.quesModel.questionType == "SINGLE_ANSWER_QUESTION") {
  1534. this.singleRightAnswer = answerOrderNum;
  1535. }
  1536. if (this.quesModel.questionType == "MULTIPLE_ANSWER_QUESTION") {
  1537. this.multipleRightAnswer.push(answerOrderNum);
  1538. }
  1539. }
  1540. }
  1541. }
  1542. },
  1543. //新增选项
  1544. addQuesOption() {
  1545. this.quesModel.quesOptions.push({
  1546. number: "",
  1547. optionBody: "",
  1548. isCorrect: "",
  1549. });
  1550. for (var i = 0; i < this.quesModel.quesOptions.length; i++) {
  1551. this.quesModel.quesOptions[i]["number"] = i + 1;
  1552. }
  1553. },
  1554. savePaperDetailUnit() {
  1555. //跟新难度值
  1556. if (this.quesModel.difficultyDegree < 0.4) {
  1557. this.quesModel.difficulty = "难";
  1558. } else if (
  1559. this.quesModel.difficultyDegree > 0.3 &&
  1560. this.quesModel.difficultyDegree < 0.8
  1561. ) {
  1562. this.quesModel.difficulty = "中";
  1563. } else {
  1564. this.quesModel.difficulty = "易";
  1565. }
  1566. this.setRightAnswer();
  1567. if (/^\d+(?=\.{0,1}\d+$|$)/.test(this.quesModel.score)) {
  1568. console.log("正确");
  1569. } else {
  1570. this.$notify({
  1571. message: "分数只能为正数",
  1572. type: "error",
  1573. });
  1574. return;
  1575. }
  1576. let paperDetailUnitExp = {
  1577. id: this.editPaperDetailUnit.id,
  1578. question: this.quesModel,
  1579. score: this.quesModel.score,
  1580. };
  1581. if (
  1582. this.quesModel.quesOptions &&
  1583. this.quesModel.quesOptions.length == 0
  1584. ) {
  1585. this.$confirm("无选项将删除该试题, 是否继续?", "提示", {
  1586. confirmButtonText: "确定",
  1587. cancelButtonText: "取消",
  1588. type: "warning",
  1589. }).then(() => {
  1590. this.dialogLoading = true;
  1591. this.$http
  1592. .delete(
  1593. QUESTION_API +
  1594. "/paper/deleteQuestion/" +
  1595. this.editPaperDetailUnit.id +
  1596. "/" +
  1597. this.quesModel.id
  1598. )
  1599. .then((response) => {
  1600. if (response.data.length > 0) {
  1601. var deleteInfo =
  1602. "该试题被试卷:" +
  1603. response.data.join(" , ") +
  1604. "使用,不能删除";
  1605. this.$notify({
  1606. message: deleteInfo,
  1607. type: "error",
  1608. });
  1609. } else {
  1610. this.$notify({
  1611. message: "保存成功",
  1612. type: "success",
  1613. });
  1614. }
  1615. this.dialogLoading = false;
  1616. });
  1617. });
  1618. } else {
  1619. this.dialogLoading = true;
  1620. //校验音频重复
  1621. let audiomap = new Map();
  1622. let regex = new RegExp(
  1623. '<a id="[^<>]+" name="([^<>]+\\.mp3)"></a>',
  1624. "ig"
  1625. );
  1626. let ret = "";
  1627. let quesBodyStr = paperDetailUnitExp.question.quesBody;
  1628. if (quesBodyStr) {
  1629. while ((ret = regex.exec(quesBodyStr))) {
  1630. if (audiomap.get(ret[1])) {
  1631. this.dialogLoading = false;
  1632. this.$notify({
  1633. type: "error",
  1634. message: "题干中存在相同的音频文件",
  1635. });
  1636. return;
  1637. } else {
  1638. audiomap.set(ret[1], ret[1]);
  1639. }
  1640. }
  1641. }
  1642. let quesAnswerStr = paperDetailUnitExp.question.quesAnswer;
  1643. if (quesAnswerStr) {
  1644. while ((ret = regex.exec(quesAnswerStr))) {
  1645. if (audiomap.get(ret[1])) {
  1646. this.dialogLoading = false;
  1647. this.$notify({
  1648. type: "error",
  1649. message: "答案中存在相同的音频文件",
  1650. });
  1651. return;
  1652. } else {
  1653. audiomap.set(ret[1], ret[1]);
  1654. }
  1655. }
  1656. }
  1657. let quesOptions = paperDetailUnitExp.question.quesOptions;
  1658. if (quesOptions) {
  1659. for (let i = 0; i < quesOptions.length; i++) {
  1660. let quesOptionStr = quesOptions[i].optionBody;
  1661. while ((ret = regex.exec(quesOptionStr))) {
  1662. if (audiomap.get(ret[1])) {
  1663. this.dialogLoading = false;
  1664. this.$notify({
  1665. type: "error",
  1666. message: "选项中存在相同的音频文件",
  1667. });
  1668. return;
  1669. } else {
  1670. audiomap.set(ret[1], ret[1]);
  1671. }
  1672. }
  1673. }
  1674. }
  1675. paperDetailUnitExp.question.quesAnswer = this.answer;
  1676. this.$http
  1677. .put(QUESTION_API + "/paperDetailUnit", paperDetailUnitExp)
  1678. .then(() => {
  1679. this.$notify({
  1680. message: "保存成功",
  1681. type: "success",
  1682. });
  1683. this.dialogLoading = false;
  1684. this.closeQuesDialog();
  1685. this.initPaper();
  1686. })
  1687. .catch((err) => {
  1688. this.dialogLoading = false;
  1689. this.$notify({
  1690. type: "error",
  1691. message: err.response.data.desc,
  1692. });
  1693. });
  1694. }
  1695. },
  1696. //在正确的option上设置isCorrect=1
  1697. setRightAnswer() {
  1698. if (
  1699. !this.quesModel.quesOptions ||
  1700. this.quesModel.quesOptions.length == 0
  1701. ) {
  1702. return false;
  1703. }
  1704. for (var i = 0; i < this.quesModel.quesOptions.length; i++) {
  1705. var option = this.quesModel.quesOptions[i];
  1706. var answerOrderNum = String.fromCharCode(65 + i);
  1707. if (this.quesModel.questionType == "SINGLE_ANSWER_QUESTION") {
  1708. option["isCorrect"] =
  1709. answerOrderNum == this.singleRightAnswer ? 1 : 0;
  1710. }
  1711. if (this.quesModel.questionType == "MULTIPLE_ANSWER_QUESTION") {
  1712. option["isCorrect"] =
  1713. this.multipleRightAnswer.indexOf(answerOrderNum) > -1 ? 1 : 0;
  1714. }
  1715. }
  1716. },
  1717. //删除试题
  1718. deleteQues(paperDetailUnit) {
  1719. let paperDetailUnitId = paperDetailUnit.id;
  1720. if (this.paper.paperType == "GENERATE") {
  1721. this.deleteQues01(paperDetailUnitId);
  1722. } else {
  1723. let questionId = paperDetailUnit.question.id;
  1724. this.deleteQues02(questionId, paperDetailUnitId);
  1725. }
  1726. },
  1727. deleteQues01(paperDetailUnitId) {
  1728. this.$alert("您确定删除吗?", "提示", {
  1729. confirmButtonText: "确定",
  1730. callback: (action) => {
  1731. if (action == "confirm") {
  1732. this.loading = true;
  1733. this.$http
  1734. .delete(QUESTION_API + "/paperDetailUnit/" + paperDetailUnitId)
  1735. .then(() => {
  1736. this.initPaper();
  1737. this.getreduplicateQuestions();
  1738. this.reduplicateGroup = [];
  1739. this.loading = true;
  1740. this.$notify({
  1741. message: "删除成功",
  1742. type: "success",
  1743. });
  1744. this.loading = false;
  1745. });
  1746. }
  1747. },
  1748. });
  1749. },
  1750. deleteQues02(questionId, paperDetailUnitId) {
  1751. this.$alert("您确定删除吗?", "提示", {
  1752. confirmButtonText: "确定",
  1753. callback: (action) => {
  1754. if (action == "confirm") {
  1755. this.loading = true;
  1756. this.$http
  1757. .delete(
  1758. QUESTION_API +
  1759. "/paper/deleteQuestion/" +
  1760. paperDetailUnitId +
  1761. "/" +
  1762. questionId
  1763. )
  1764. .then((response) => {
  1765. if (response.data.length > 0) {
  1766. var deleteInfo =
  1767. "该试题被试卷:" +
  1768. response.data.join(" , ") +
  1769. "使用,不能删除";
  1770. this.$notify({
  1771. message: deleteInfo,
  1772. type: "error",
  1773. });
  1774. } else {
  1775. this.initPaper();
  1776. this.getreduplicateQuestions();
  1777. this.reduplicateGroup = [];
  1778. this.loading = true;
  1779. this.$notify({
  1780. message: "保存成功",
  1781. type: "success",
  1782. });
  1783. }
  1784. this.loading = false;
  1785. });
  1786. }
  1787. },
  1788. });
  1789. },
  1790. //获取重复试题
  1791. getreduplicateQuestions() {
  1792. this.duplicateLoading = true;
  1793. this.$http
  1794. .get(QUESTION_API + "/paper/" + this.paperId + "/reduplicate-questions")
  1795. .then((response) => {
  1796. this.reduplicateQuestions = response.data;
  1797. this.duplicateLoading = false;
  1798. this.initReduplicateQuesColor();
  1799. // var ques = document.getElementsByClassName("ques")[0];
  1800. // ques.style.display = "inline";
  1801. });
  1802. },
  1803. exportPaperAnswer() {
  1804. var key = this.user.key;
  1805. var token = this.user.token;
  1806. window.open(
  1807. QUESTION_API +
  1808. "/paper/answer/export/" +
  1809. this.paperId +
  1810. "?$key=" +
  1811. key +
  1812. "&$token=" +
  1813. token
  1814. );
  1815. },
  1816. initReduplicateQuesColor() {
  1817. var colorCount = this.reduplicateQuestions.length;
  1818. if (colorCount > 20) {
  1819. this.reduplicateQuesColor = randomColor({
  1820. luminosity: "bright",
  1821. count: colorCount,
  1822. });
  1823. } else {
  1824. this.reduplicateQuesColor = this.defaultColor;
  1825. }
  1826. },
  1827. getSubQuesEditId(paperDetailUnit, subQuestion) {
  1828. return paperDetailUnit.question.id + "_" + subQuestion.quesParams.number;
  1829. },
  1830. //打开考试说明编辑框
  1831. openEditExamPaperRemark() {
  1832. if (this.paper.examRemark) {
  1833. this.examRemark = this.paper.examRemark;
  1834. } else {
  1835. this.examRemark = "";
  1836. }
  1837. this.paperRemarkDialog = true;
  1838. },
  1839. //保存考试说明
  1840. savePaperRemark() {
  1841. this.paper.examRemark = this.examRemark;
  1842. this.savePaper();
  1843. this.paperRemarkDialog = false;
  1844. },
  1845. //关闭考试说明编辑框
  1846. closPaperRemark() {
  1847. this.examRemark = "";
  1848. this.paperRemarkDialog = false;
  1849. },
  1850. //保存试卷
  1851. savePaper() {
  1852. this.loading = true;
  1853. this.$http
  1854. .put(QUESTION_API + "/paper", this.paper)
  1855. .then(() => {
  1856. this.$notify({
  1857. message: "保存成功",
  1858. type: "success",
  1859. });
  1860. this.loading = false;
  1861. this.initPaper();
  1862. })
  1863. .catch((error) => {
  1864. this.loading = false;
  1865. this.$notify({
  1866. type: "error",
  1867. message: error.response.data.desc,
  1868. });
  1869. });
  1870. },
  1871. //删除试卷
  1872. deletePaper(id) {
  1873. this.$confirm("确认删除试卷吗?", "提示", {
  1874. type: "warning",
  1875. }).then(() => {
  1876. this.loading = true;
  1877. this.$http.delete(QUESTION_API + "/paper/" + id).then(
  1878. () => {
  1879. this.$notify({
  1880. message: "删除成功",
  1881. type: "success",
  1882. });
  1883. this.back();
  1884. },
  1885. (error) => {
  1886. this.$notify({
  1887. message: error.response.data.desc,
  1888. type: "error",
  1889. title: "错误",
  1890. });
  1891. this.loading = false;
  1892. }
  1893. );
  1894. });
  1895. },
  1896. //打开上传音频弹框
  1897. openDialog() {
  1898. this.checkResult = false;
  1899. this.isUpload = true;
  1900. if (document.getElementById("radioFile")) {
  1901. document.getElementById("radioFile").value = "";
  1902. }
  1903. this.dialogRadioFile = true;
  1904. this.fileList = [];
  1905. },
  1906. //关闭音频弹框
  1907. closeAudioDialog() {
  1908. this.dialogRadioFile = this.uploadAudioLoading;
  1909. },
  1910. //返回
  1911. back() {
  1912. if (sessionStorage.getItem("question_back") == "true") {
  1913. this.$router.push({
  1914. path: "/questions/" + this.parentView + "/0",
  1915. });
  1916. } else {
  1917. this.$router.push({
  1918. path: "/questions/" + this.parentView + "/1",
  1919. });
  1920. }
  1921. },
  1922. paperDetailShow(paperDetail) {
  1923. if (this.reduplicateGroup.length == 0) {
  1924. return true;
  1925. }
  1926. let paperDetailUnits = paperDetail.paperDetailUnits;
  1927. for (let i = 0, imax = paperDetailUnits.length; i < imax; i++) {
  1928. for (var j = 0, jmax = this.reduplicateGroup.length; j < jmax; j++) {
  1929. if (paperDetailUnits[i].id == this.reduplicateGroup[j]) {
  1930. return true;
  1931. }
  1932. }
  1933. }
  1934. return false;
  1935. },
  1936. //上传文件检查
  1937. checkFile() {
  1938. this.fileNameList = [];
  1939. //读取选取的文件夹里面的文件
  1940. this.checkResult = true;
  1941. var files = document.getElementById("radioFile").files;
  1942. if (files.length == 0) {
  1943. this.message = "请选择音频文件夹!";
  1944. return;
  1945. }
  1946. var size = 0;
  1947. var isGo = false;
  1948. //取到所有文件的文件名
  1949. for (var i = 0; i < files.length; i++) {
  1950. this.fileNameList.push(files[i].name);
  1951. if (files[i].size > 5 * 1024 * 1024) {
  1952. isGo = true;
  1953. break;
  1954. }
  1955. size = files[i].size + size;
  1956. }
  1957. if (isGo) {
  1958. this.message = "上传单个文件不能超过5M";
  1959. this.isUpload = true;
  1960. }
  1961. if (size > 50 * 1024 * 1024) {
  1962. this.message = "上传文件总和不能超过50M";
  1963. this.isUpload = true;
  1964. return;
  1965. }
  1966. this.$http
  1967. .post(
  1968. QUESTION_API + "/checkRadioFile/" + this.paperId,
  1969. this.fileNameList
  1970. )
  1971. .then((response) => {
  1972. console.log("response:", response);
  1973. this.message = response.data.errorMsg;
  1974. if (this.message == "OK") {
  1975. this.message = "OK!";
  1976. this.isUpload = false;
  1977. } else {
  1978. this.isUpload = true;
  1979. }
  1980. })
  1981. .catch((error) => {
  1982. console.log(error);
  1983. });
  1984. },
  1985. //读取文件
  1986. uploadAudioFile() {
  1987. let param = new FormData();
  1988. var fileList = document.getElementById("radioFile").files;
  1989. //循环添加到formData中
  1990. for (var i = 0; i < fileList.length; i++) {
  1991. var file = fileList[i];
  1992. param.append("files", file, file.name);
  1993. }
  1994. let config = {
  1995. headers: { "Content-Type": "multipart/form-data" },
  1996. };
  1997. this.$http
  1998. .post(QUESTION_API + "/uploadRadio/" + this.paperId, param, config)
  1999. .then(() => {
  2000. this.dialogRadioFile = false;
  2001. this.uploadAudioLoading = false;
  2002. this.checkResult = false;
  2003. this.isUpload = true;
  2004. document.getElementById("radioFile").value = "";
  2005. this.initPaper();
  2006. })
  2007. .catch((error) => {
  2008. this.message = error.response.data.desc;
  2009. this.uploadAudioLoading = false;
  2010. });
  2011. },
  2012. },
  2013. };
  2014. </script>
  2015. <style scoped src="../styles/EditPaper.css">
  2016. .property_with {
  2017. width: 100px;
  2018. }
  2019. .ck-toolbar {
  2020. z-index: 9999;
  2021. }
  2022. #app {
  2023. background-color: white !important;
  2024. }
  2025. </style>
  2026. <style scoped src="../styles/Common.css"></style>