markDialog.vue 48 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699
  1. <template>
  2. <div class="markDialog" v-loading="vLoading">
  3. <div
  4. style="overflow: auto;overflow-x: hidden;width: 315px;box-sizing: content-box;border-right: 1px rgba(231, 231, 231, 1) solid;"
  5. >
  6. <div class="left">
  7. <div
  8. v-loading="ScLoading"
  9. >
  10. <div class="scoreTit">
  11. <div>任务得分</div>
  12. <div>
  13. <span style="color: rgba(54, 129, 252, 1);margin-right: 3px;">{{
  14. totalScore ? totalScore : 0
  15. }}</span
  16. >分
  17. </div>
  18. </div>
  19. <div class="allD" :style="{marginLeft: isMarkSco ? '0' :'17px'}">
  20. <div class="scoreStar">
  21. <div
  22. v-show="reveal"
  23. v-for="(e, index) in scoTitList"
  24. :key="index + 'a'"
  25. >
  26. <div class="scoreStarBack" >
  27. <el-tooltip
  28. class="item"
  29. effect="dark"
  30. :content="e.detail"
  31. placement="top"
  32. >
  33. <div class="briefTit" >
  34. <img v-if="e.isai == 1 || !e.isai" class="titRoot" src="../../../assets/icon/newIcons/blueRoot.png" alt="">
  35. {{ e.detail }}
  36. </div>
  37. </el-tooltip>
  38. <el-rate @change="submit" v-model="e.cog"></el-rate>
  39. </div>
  40. </div>
  41. <div
  42. v-show="!reveal"
  43. v-for="(e, index) in scoTitList.slice(0, 3)"
  44. :key="index + 'b'"
  45. >
  46. <div class="scoreStarBack">
  47. <el-tooltip
  48. class="item"
  49. effect="dark"
  50. :content="e.detail"
  51. placement="top"
  52. >
  53. <div class="briefTit">
  54. <img class="titRoot" v-if="e.isai == 1 || !e.isai" src="../../../assets/icon/newIcons/blueRoot.png" alt="">
  55. {{ e.detail }}
  56. </div>
  57. </el-tooltip>
  58. <el-rate @change="submit" v-model="e.cog"></el-rate>
  59. </div>
  60. </div>
  61. </div>
  62. <div
  63. v-if="reveal && scoTitList.length > 3"
  64. class="scoreStar2"
  65. @click="revealBtn"
  66. >
  67. 折叠 <i class="el-icon-arrow-up"></i>
  68. </div>
  69. <div
  70. v-if="!reveal && scoTitList.length > 3"
  71. class="scoreStar2"
  72. @click="revealBtn"
  73. >
  74. 全部 <i class="el-icon-arrow-down"></i>
  75. </div>
  76. </div>
  77. <div class="AreaCss">
  78. <el-input
  79. type="textarea"
  80. placeholder="您可在此输入评语"
  81. v-model="textarea"
  82. @blur="submit"
  83. >
  84. </el-input>
  85. </div>
  86. <div
  87. style="width:100%;display:flex;height: 25px;;justify-content: space-between;"
  88. >
  89. <div ></div>
  90. <div style="display: flex;">
  91. <div
  92. class="ScrBtn"
  93. @click="reset"
  94. style="color: rgba(0, 0, 0, 0.6);background-color: rgba(243, 247, 253, 1);border: none;"
  95. >
  96. 清空
  97. </div>
  98. <div
  99. class="ScrBtn"
  100. style="margin-left: 10px;"
  101. @click="AIsubmit(currentUid)"
  102. v-if="
  103. (currentUid.type == 1 ||currentUid.type == 10 || currentUid.type == 13 || isMarkCom == 1) && !isMarkSco
  104. "
  105. >
  106. <img
  107. src="../../../assets/icon/newIcons/rootImg.png"
  108. alt=""
  109. />AI评分
  110. </div>
  111. <div
  112. class="ScrBtn"
  113. style="margin-left: 10px;"
  114. v-if="
  115. (currentUid.type == 1 ||currentUid.type == 10 || currentUid.type == 13 || isMarkCom == 1) && isMarkSco
  116. "
  117. @click="noIsAi"
  118. >
  119. <img
  120. src="../../../assets/icon/newIcons/rootImg.png"
  121. alt=""
  122. />AI评分
  123. </div>
  124. </div>
  125. </div>
  126. </div>
  127. <!-- 提交列表 -->
  128. <div style="flex: 1;display: flex;flex-direction: column;overflow: auto;">
  129. <div class="workListTit" @click="workListTitBtn">
  130. <i class="el-icon-arrow-down"></i>提交列表 ({{ workList.length }})
  131. </div>
  132. <div style="overflow: auto;flex: 1;">
  133. <div
  134. v-if="workListShow"
  135. v-for="(i, index) in workList"
  136. :key="index"
  137. :class="['schPer', i.userid == DgUid ? 'selBlock' : '']"
  138. style="cursor: pointer;"
  139. @click="cutPer(i.userid,index)"
  140. >
  141. <img v-if="i.headportrait" :src="i.headportrait" alt="" />
  142. <img
  143. v-else
  144. src="https://beta.pbl.cocorobo.cn/pbl-teacher-table/dist/static/img/portal.b3cf7fa.png"
  145. alt=""
  146. />
  147. <div class="con">
  148. <div class="tit">
  149. <span
  150. style="font-size: 14px;color: rgba(0, 0, 0, 0.9);font-weight: 400;"
  151. >{{ i.name }}</span
  152. >
  153. <span
  154. style="font-size: 14px;color:rgba(0, 0, 0, 0.4);"
  155. v-if="i.markSco == null"
  156. >未评分</span
  157. >
  158. <span
  159. v-else
  160. style="font-size: 16px;color: rgba(0, 0, 0, 0.9);font-weight: 600;"
  161. >{{ i.markSco }}</span
  162. >
  163. </div>
  164. <div class="Timer">{{ i.time }}</div>
  165. </div>
  166. </div>
  167. </div>
  168. </div>
  169. </div>
  170. </div>
  171. <!-- 作业展示区 -->
  172. <div class="Rig">
  173. <div class="RigTop">
  174. <div
  175. style="display: flex;align-items: center;justify-content: space-between;width: 100%;"
  176. >
  177. <div
  178. class="schPer"
  179. style="border: none;width: 300px;padding: 0;margin: 0;"
  180. >
  181. <img
  182. v-if="currentUid.headportrait"
  183. :src="currentUid.headportrait"
  184. alt=""
  185. />
  186. <img
  187. v-else
  188. src="https://beta.pbl.cocorobo.cn/pbl-teacher-table/dist/static/img/portal.b3cf7fa.png"
  189. alt=""
  190. />
  191. <div class="con">
  192. <div class="tit">
  193. <span
  194. style="font-size: 14px;color: rgba(0, 0, 0, 0.9);font-weight: 400;"
  195. >{{ currentUid.name }}</span
  196. >
  197. </div>
  198. <div class="Timer">{{ currentUid.time }}</div>
  199. </div>
  200. </div>
  201. <div class="cutStuBtn">
  202. <div>
  203. <span v-if="current == 0" style="cursor: pointer;color:#ccc">上一个</span>
  204. <span v-else @click="prevStu" style="cursor: pointer;color: rgba(54, 129, 252, 1)">上一个</span>
  205. </div>
  206. <div>
  207. <span v-if="current >= workList.length -1" style="cursor: pointer;color: #ccc">下一个</span>
  208. <span v-else @click="nextStu" style="cursor: pointer;color: rgba(54, 129, 252, 1)">下一个</span>
  209. </div>
  210. <!-- <div><span @click="prevStu" v-if="this.current > 0">上一个</span></div>
  211. <div><span @click="nextStu" v-if="this.current < this.workList.length-1">下一个</span></div> -->
  212. </div>
  213. </div>
  214. </div>
  215. <div class="RigConTit">
  216. <div :class="[cutNum ? '' : 'RigConTitOn']" @click="cutPage(0)">
  217. 学生作业
  218. </div>
  219. <div :class="[cutNum ? 'RigConTitOn' : '']" @click="cutPage(1)">
  220. 点赞与评论
  221. </div>
  222. </div>
  223. <div class="RigCon">
  224. <!-- 作业内容 -->
  225. <div v-if="cutNum == 0" style="height: 97%;">
  226. <div
  227. v-if="
  228. currentUid.type == 13 || currentUid.type == 10
  229. // currentUid.type == 15
  230. "
  231. >
  232. <div class="cont" v-html="currentUid.content.text"></div>
  233. </div>
  234. <div v-if="currentUid.type == 1">
  235. <img
  236. @click="previewImg(currentUid.content)"
  237. style="max-width: 100%;object-fit: cover;"
  238. :src="currentUid.content"
  239. alt=""
  240. />
  241. </div>
  242. <div v-if="currentUid.type == 3">
  243. <div style="width: 100%;text-align: center;">
  244. <div
  245. style="margin-bottom: 20px;font-weight: 600;font-size: 16px;"
  246. >
  247. {{ currentUid.content[0].answerTitle }}
  248. </div>
  249. <div>{{ currentUid.content[0].answer }}</div>
  250. </div>
  251. </div>
  252. <div v-if="currentUid.type == 4" style="height: 100%;">
  253. <iframe
  254. v-if="ifPdf == 1"
  255. style="width: 100%; height: 99%; border: none"
  256. :src="
  257. 'https://cloud.cocorobo.cn/pdf.js/web/viewer.html?file=' +
  258. encodeURIComponent(currentUid.content)
  259. "
  260. ></iframe>
  261. <iframe
  262. v-else
  263. style="width: 100%; height: 100%; border: none"
  264. :src="
  265. 'https://view.officeapps.live.com/op/view.aspx?src=' +
  266. encodeURIComponent(currentUid.content)
  267. "
  268. frameborder="0"
  269. ></iframe>
  270. </div>
  271. <div v-if="currentUid.type == 12" style="height: 100%;">
  272. <div>{{ TxtMd }}</div>
  273. </div>
  274. <div v-if="currentUid.type == 15" style="height: 100%;">
  275. <div
  276. class="worksAnswer"
  277. v-if="currentUid.content"
  278. @click="
  279. openCocoPi(57, toolIndex, currentUid.userid, currentUid.name)
  280. "
  281. >
  282. <img src="../../../assets/icon/codeFile.png" />
  283. <div>点击打开CocoPi</div>
  284. </div>
  285. </div>
  286. <div v-if="currentUid.type == 5" style="height: 100%;">
  287. <video-player
  288. class="video-player vjs-custom-skin"
  289. :playsinline="true"
  290. :options="playerOptions"
  291. @play="onPlayerPlay($event)"
  292. style="width: 90%; height: 95%; margin: 0 0 0 30px"
  293. ></video-player>
  294. </div>
  295. </div>
  296. <!-- 点赞与评论 -->
  297. <div v-if="cutNum == 1">
  298. <div style="display: flex;align-items: center;">
  299. <img
  300. style="margin-right: 3px;"
  301. src="../../../assets/icon/newIcons/likeG.png"
  302. alt=""
  303. />点赞({{ likeList.length }})
  304. </div>
  305. <div class="likeList">
  306. <div v-for="i in likeList" :key="i.id">{{ i.username }}</div>
  307. </div>
  308. <div style="display: flex;align-items: center;">
  309. <img
  310. style="margin-right: 3px;"
  311. src="../../../assets/icon/newIcons/commG.png"
  312. alt=""
  313. />评论({{ commentList.length }})
  314. </div>
  315. <div class="commentListCss" v-if="commentList.length">
  316. <div
  317. style="padding-bottom: 25px;display: flex;justify-content: space-between;"
  318. v-for="i in commentList"
  319. :key="i.id"
  320. >
  321. <div class="schPer2" style="border: none;width: 90%;padding: 0;">
  322. <img v-if="i.headportrait" :src="i.headportrait" alt="" />
  323. <img
  324. v-else
  325. src="https://beta.pbl.cocorobo.cn/pbl-teacher-table/dist/static/img/portal.b3cf7fa.png"
  326. alt=""
  327. />
  328. <div class="con">
  329. <div class="tit2">
  330. <div class="TitName">{{ i.username }}</div>
  331. <span
  332. style="font-size: 14px;color: rgba(0, 0, 0, 0.9);font-weight: 400;width: 200px;"
  333. >{{ i.time }}</span
  334. >
  335. </div>
  336. <div class="Timer">{{ i.comment }}</div>
  337. </div>
  338. </div>
  339. <div>
  340. <span
  341. style="color: #3B7BD7;cursor: pointer;"
  342. @click="deleteComment(i.id)"
  343. >删除</span
  344. >
  345. </div>
  346. </div>
  347. </div>
  348. </div>
  349. </div>
  350. </div>
  351. </div>
  352. </template>
  353. <script>
  354. import { v4 as uuidv4 } from "uuid";
  355. import MarkdownIt from "markdown-it";
  356. const getFile = (url) => {
  357. return new Promise((resolve, reject) => {
  358. var credentials = {
  359. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  360. secretAccessKey: "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",
  361. }; //秘钥形式的登录上传
  362. window.AWS.config.update(credentials);
  363. window.AWS.config.region = "cn-northwest-1"; //设置区域
  364. let url2 = url;
  365. let _url2 = "";
  366. if (
  367. url2.indexOf("https://view.officeapps.live.com/op/view.aspx?src=") != -1
  368. ) {
  369. _url2 = url2.split(
  370. "https://view.officeapps.live.com/op/view.aspx?src="
  371. )[1];
  372. } else {
  373. _url2 = url2;
  374. }
  375. var s3 = new window.AWS.S3({ params: { Bucket: "ccrb" } });
  376. let name = decodeURIComponent(
  377. _url2.split("https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/")[1]
  378. );
  379. var params = {
  380. Bucket: "ccrb",
  381. Key: name,
  382. };
  383. s3.getObject(params, function (err, data) {
  384. if (err) {
  385. console.log(err, err.stack);
  386. resolve({ data: 1 });
  387. } else {
  388. const fileContent = data.Body.toString('utf-8');
  389. resolve({ data: fileContent });
  390. } // sxuccessful response
  391. });
  392. // axios({
  393. });
  394. };
  395. export default {
  396. props: [
  397. "uid",
  398. "stage",
  399. "toolIndex",
  400. "task",
  401. "scoTit",
  402. "markScoreVisible",
  403. "markScoreworksStudent",
  404. "languageSetting",
  405. "taskDetail",
  406. "tool"
  407. ],
  408. data() {
  409. return {
  410. textarea: "",
  411. reveal: false, //得分详情框全部与折叠
  412. workListShow: true, //作业显示
  413. cutNum: 0, //作业与评论切换
  414. scoTitList: [], //得分详情框数据
  415. workList: [], //作业列表
  416. cid: this.$route.query.courseId,
  417. cUserid: this.$route.query.userid, //账号登录人id
  418. cuScoCon: "", //学生作业内容
  419. TxtMd:'', //txt,md作业内容
  420. currentUid: {}, //当前评分框学生信息
  421. current: "", //上一位下一位中的第几位
  422. DgUid: this.uid, //当前评分框学生id
  423. likeList: [], //喜欢list
  424. commentList: [], //评分list
  425. workId: "", //作业id。用于分类评论与点赞list
  426. vLoading: false,
  427. allSco: 0,
  428. ifPdf: 1,
  429. ScLoading: false,
  430. playerOptions: {
  431. playbackRates: [0.7, 1.0, 1.5, 2.0], //播放速度
  432. autoplay: false, //如果true,浏览器准备好时开始回放。
  433. muted: false, // 默认情况下将会消除任何音频。
  434. loop: false, // 导致视频一结束就重新开始。
  435. preload: "auto", // 建议浏览器在<video>加载元素后是否应该开始下载视频数据。auto浏览器选择最佳行为,立即开始加载视频(如果浏览器支持)
  436. language: "zh-CN",
  437. aspectRatio: "16:9", // 将播放器置于流畅模式,并在计算播放器的动态大小时使用该值。值应该代表一个比例 - 用冒号分隔的两个数字(例如"16:9"或"4:3")
  438. fluid: true, // 当true时,Video.js player将拥有流体大小。换句话说,它将按比例缩放以适应其容器。
  439. sources: [
  440. {
  441. type: "video/mp4", //这里的种类支持很多种:基本视频格式、直播、流媒体等,具体可以参看git网址项目 || "video/ogg"|| "video/webm"
  442. src: "" //url地址require("../../../assets/media/aaa.mp4")
  443. }
  444. ],
  445. // poster: require("../../../assets/tu31.png"), //你的封面地址
  446. // poster: dataRes.imgUrl, //你的封面地址
  447. notSupportedMessage: "此视频暂无法播放,请稍后再试", //允许覆盖Video.js无法播放媒体源时显示的默认信息。
  448. controlBar: {
  449. timeDivider: true, //当前时间和持续时间的分隔符
  450. durationDisplay: true, //显示持续时间
  451. remainingTimeDisplay: false, //是否显示剩余时间功能
  452. fullscreenToggle: true //全屏按钮
  453. }
  454. },
  455. xianObj: ["DOCX", "MD", "TXT", "PDF",'JPG',"PNG"]
  456. };
  457. },
  458. watch: {
  459. markScoreVisible(newVal) {
  460. this.workListShow = true;
  461. this.reveal = false;
  462. this.cutNum = 0;
  463. this.textarea = "";
  464. if (this.tool.eList && this.tool.eList.length) {
  465. this.scoTitList = this.tool.eList;
  466. }else{
  467. this.scoTitList = JSON.parse(JSON.stringify(this.scoTit));
  468. }
  469. // this.scoTitList = JSON.parse(JSON.stringify(this.scoTit));
  470. this.selectSWorksData();
  471. }
  472. },
  473. computed: {
  474. totalScore() {
  475. let a = 0;
  476. this.scoTitList.forEach(e => {
  477. if (e.cog) {
  478. a += e.cog * 1;
  479. }
  480. });
  481. return (a / this.scoTitList.length).toFixed(1);
  482. },
  483. isMarkCom() {
  484. // console.log('this.currentUid',this.currentUid);
  485. if (this.currentUid.type == 1 || this.currentUid.type == 4 || this.currentUid.type == 12 ) {
  486. let a = this.currentUid.content.slice(
  487. this.currentUid.content.lastIndexOf(".") + 1
  488. );
  489. if (this.xianObj.indexOf(a.toUpperCase()) != -1) {
  490. return 1;
  491. } else {
  492. return 0;
  493. }
  494. } else {
  495. return 0;
  496. }
  497. },
  498. // 如果评价标准都不是ai评分的话
  499. isMarkSco(){
  500. let c = 0
  501. this.scoTitList.forEach(e=>{
  502. if (e.isai == 2) {
  503. c++
  504. }
  505. })
  506. // console.log(c , this.scoTitList.length);
  507. this.$forceUpdate()
  508. if (c == this.scoTitList.length) return c
  509. return 0
  510. }
  511. },
  512. mounted() {
  513. if (this.tool.eList && this.tool.eList.length) {
  514. this.scoTitList = this.tool.eList;
  515. }else{
  516. this.scoTitList = JSON.parse(JSON.stringify(this.scoTit));
  517. }
  518. // this.scoTitList = JSON.parse(JSON.stringify(this.scoTit));
  519. // console.log('toolIndex',this.toolIndex);
  520. this.selectSWorksData();
  521. },
  522. methods: {
  523. noIsAi(){
  524. this.$message.info('您暂未设置AI评分,请修改该工具的评价设置后使用。')
  525. },
  526. // 预览图片
  527. previewImg(url) {
  528. //预览图片
  529. this.$hevueImgPreview(url);
  530. },
  531. onPlayerPlay() {},
  532. // 获取文档id
  533. createFileid(url) {
  534. let _this = this;
  535. return new Promise((resolve, reject) => {
  536. try {
  537. _this.ajax
  538. .put("https://gpt4.cocorobo.cn/upload_file_knowledge", {
  539. url: url
  540. })
  541. .then(res => {
  542. let _data = res.data.FunctionResponse;
  543. if (_data.result && _data.result.id) {
  544. resolve(_data.result.id);
  545. } else {
  546. resolve(1);
  547. }
  548. })
  549. .catch(function(error) {
  550. resolve(1);
  551. });
  552. } catch (e) {
  553. resolve(1);
  554. }
  555. });
  556. },
  557. // 老师提交评分
  558. submit() {
  559. let data = this.scoTitList.map(e => {
  560. return e.detail + ":" + e.cog;
  561. });
  562. // console.log("data", data);
  563. const processedData = {};
  564. data.forEach(item => {
  565. const [key, value] = item.split(":");
  566. processedData[key] = Number(value) ? Number(value) : 0;
  567. });
  568. processedData.content = this.textarea;
  569. // console.log(processedData);
  570. let params = {
  571. cid: this.cid,
  572. s: this.stage,
  573. t: this.task,
  574. tool: this.toolIndex ? this.toolIndex : '',
  575. rate: JSON.stringify(processedData),
  576. uid: this.DgUid
  577. };
  578. // return console.log(params);
  579. this.ajax
  580. .get(this.$store.state.api + "updateWorksEvaTwo", params)
  581. .then(res => {
  582. this.ScLoading = false;
  583. })
  584. .catch(err => {
  585. this.$message.error("评价失败");
  586. console.error(err);
  587. });
  588. },
  589. // 重置
  590. reset() {
  591. this.$confirm("是否清空评分和评语?", "提示", {
  592. confirmButtonText: "确定",
  593. cancelButtonText: "取消",
  594. type: "warning"
  595. })
  596. .then(() => {
  597. this.scoTitList.forEach(e => {
  598. e.cog = 0;
  599. });
  600. this.textarea = "";
  601. })
  602. .catch(() => {});
  603. // this.scoTitList = JSON.parse(JSON.stringify(this.scoTit));
  604. },
  605. // ai评分
  606. async AIsubmit(work) {
  607. console.log('work',work);
  608. this.ScLoading = true;
  609. let _fileid = "";
  610. if (work.type == 1 || work.type == 4 || work.type == 12) {
  611. _fileid = await this.createFileid(work.content);
  612. }
  613. let tit = []
  614. if (this.tool.eList && this.tool.eList.length) {
  615. tit = JSON.parse(JSON.stringify(this.tool.eList));
  616. }else{
  617. tit = JSON.parse(JSON.stringify(this.scoTit));
  618. let titRule = 0
  619. let titRule2 = 0
  620. tit.forEach((e, index) => {
  621. if (!e.isai) {
  622. e.isai = 1;
  623. }
  624. });
  625. tit.forEach((e, index) => {
  626. if (e.isai == 1) {
  627. titRule2++
  628. if (e.rule) {
  629. titRule++
  630. }
  631. }
  632. });
  633. if (titRule != titRule2) {
  634. this.ScLoading = false;
  635. this.$message.info('细则努力生成中,请稍候……')
  636. return
  637. }
  638. }
  639. console.log('tit',JSON.parse(JSON.stringify(tit)));
  640. let con = this.cuScoCon;
  641. let laws = ""
  642. let std = ""
  643. let text = ''
  644. if(this.tool.eList && this.tool.eList.length){
  645. for (let i = 0; i < this.tool.eList.length; i++) {
  646. if(this.tool.eList[i].isai == 1){
  647. laws += ` 细则${i}:${this.tool.eList[i].rule}, \n`;
  648. }
  649. }
  650. for (let i = 0; i < this.tool.eList.length; i++) {
  651. if(this.tool.eList[i].isai == 1){
  652. let a = this.tool.eList[i].detail
  653. let result = ''
  654. if (isNaN(parseFloat(a)) && a) {
  655. result = a.match(/[\u4e00-\u9fa5a-zA-Z]+/g).join("");
  656. }else{
  657. result = a
  658. }
  659. std += `纬度${i}:“${result}”, \n`;
  660. }
  661. }
  662. for (let i = 0; i < this.tool.eList.length; i++) {
  663. if(this.tool.eList[i].isai == 1){
  664. let a = this.tool.eList[i].detail
  665. let result = ''
  666. if (isNaN(parseFloat(a)) && a) {
  667. result = a.match(/[\u4e00-\u9fa5a-zA-Z]+/g).join("");
  668. }else{
  669. result = a
  670. }
  671. text += `{'${result}' : '评价等级0-5(数字)'},`;
  672. }
  673. }
  674. }else{
  675. for (let i = 0; i < tit.length; i++) {
  676. if(tit[i].isai == 1){
  677. let a = tit[i].detail
  678. let result = ''
  679. if (isNaN(parseFloat(a)) && a) {
  680. result = a.match(/[\u4e00-\u9fa5a-zA-Z]+/g).join("");
  681. }else{
  682. result = a
  683. }
  684. laws += ` 细则${i}:${tit[i].rule}, \n`;
  685. }
  686. }
  687. for (let i = 0; i < tit.length; i++) {
  688. if(tit[i].isai == 1){
  689. let a = tit[i].detail
  690. let result = ''
  691. if (isNaN(parseFloat(a)) && a) {
  692. result = a.match(/[\u4e00-\u9fa5a-zA-Z]+/g).join("");
  693. }else{
  694. result = a
  695. }
  696. std += `纬度${i}:“${result}”, \n`;
  697. }
  698. }
  699. for (let i = 0; i < tit.length; i++) {
  700. if(tit[i].isai == 1){
  701. let a = tit[i].detail
  702. let result = ''
  703. if (isNaN(parseFloat(a)) && a) {
  704. result = a.match(/[\u4e00-\u9fa5a-zA-Z]+/g).join("");
  705. }else{
  706. result = a
  707. }
  708. text += `{'${result}' : '评价等级0-5(数字)'},`;
  709. }
  710. }
  711. }
  712. let msg = `NOTICE
  713. Role: 你是一个资深的教师,你有丰富的项目式学习、跨学科学习、STEAM导师经验,你要对学生的评价高度负责。
  714. Language: ${this.getLang()}
  715. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced the "Format example".
  716. Instruction: Based on the context, follow "Format example", write content.
  717. #目标#
  718. 你要根据“六级评价细则”点评学生作品,并生成需要的JSON数据。
  719. 你要根据<评价细则>和<作业内容>的相关性评价作业,判断该作业属于六级中的哪个等级。
  720. 你要结合<评价标准><评价细则>和<你判断的等级>写评语。
  721. 如果作业内容与评价细则无关,则直接评为0星。如果作业内容与<任务描述>或<工具描述>一致或者相似,则直接评为0星,并输出评语“期待看到你自己的想法!必要时,可以请教老师哦~”
  722. #评分资料#
  723. 评价标准:${std}
  724. 评价细则:${laws}
  725. 作业内容:${_fileid ? "上传的文件内容" : con}
  726. 任务描述:${this.taskDetail ? this.taskDetail :''}
  727. 工具描述:${this.tool.toolDetail ? this.tool.toolDetail : ''}
  728. #输出要求#
  729. 输出每个评价标准角度的“等级”和作业的综合性“评语”。
  730. “评语”控制在150字左右。
  731. 评价标准要按原样输出,严格按照输出格式输出json格式。只输出json格式的内容,其他内容不要输出!
  732. #输出格式#
  733. [${text}{'comment':'评语(150个汉字左右)'}]
  734. `;
  735. // console.log(msg);
  736. this.aiGet2(msg, _fileid,work);
  737. },
  738. // ai打分
  739. aiGet2(messages, _fileid,work) {
  740. let _this = this;
  741. let params = {
  742. assistant_id: "6063369f-289a-11ef-8bf4-12e77c4cb76b",
  743. message: [
  744. {
  745. type: "text",
  746. text: messages.replaceAll("\n", " ").replaceAll("*", "")
  747. }
  748. ],
  749. session_name: uuidv4(),
  750. userId: this.cUserid,
  751. file_ids: _fileid ? [_fileid] : [],
  752. isImage: work.type == 1 ? true : '',
  753. model: "gpt-4o-2024-08-06"
  754. };
  755. this.ajax
  756. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", params)
  757. .then(response => {
  758. let data = response.data.FunctionResponse;
  759. console.log("data", data);
  760. if (data.message) {
  761. let dArray = {};
  762. try {
  763. dArray = JSON.parse(
  764. data.message.replaceAll("```json", "").replaceAll("```", "")
  765. );
  766. } catch (error) {
  767. console.log("error_________________" + error);
  768. try {
  769. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  770. let match = data.message.match(regex);
  771. dArray = JSON.parse(
  772. match[0]
  773. .replace(/\n/g, "")
  774. .replace(/\s{2,}/g, "")
  775. .replace(/\'/g, '"')
  776. );
  777. } catch (error) {
  778. try {
  779. dArray = JSON.parse(
  780. data.message
  781. .replaceAll("```json", "")
  782. .replaceAll("# Solution", "")
  783. .replaceAll("```", "")
  784. .replace(/\n/g, "")
  785. .replace(/\s{2,}/g, "")
  786. .replace(/\'/g, '"')
  787. );
  788. } catch (error) {
  789. console.log("error_________________" + error);
  790. }
  791. console.log("error_________________" + error);
  792. }
  793. }
  794. let processedData = {};
  795. // console.log(JSON.parse(JSON.stringify(dArray)));
  796. dArray.forEach(function(item) {
  797. let key = Object.keys(item)[0];
  798. let value = item[key];
  799. processedData[key] = value;
  800. });
  801. // 判断返回数据正确数量
  802. let IsAIsuccess = 0
  803. for (const tKey in this.scoTitList) {
  804. for (const key in processedData) {
  805. if (isNaN(parseFloat(this.scoTitList[tKey].detail)) && this.scoTitList[tKey].detail) {
  806. var result = this.scoTitList[tKey].detail.match(/[\u4e00-\u9fa5a-zA-Z]+/g).join("");
  807. }else{
  808. var result = this.scoTitList[tKey].detail
  809. }
  810. if (isNaN(parseFloat(key)) && key) {
  811. var key2 = key.match(/[\u4e00-\u9fa5a-zA-Z]+/g).join("");
  812. }else{
  813. var key2 = key
  814. }
  815. if (key != "comment") {
  816. let isNumK = /^\d+(\.\d+)?$/.test(processedData[key]);
  817. if (result.indexOf(key2) != -1 && isNumK) {
  818. IsAIsuccess++
  819. }
  820. continue;
  821. }
  822. }
  823. continue;
  824. }
  825. // 计算可以ai评分的评价标准数量
  826. let scotNum = 0
  827. this.scoTitList.forEach(e=>{
  828. if (e.isai == 1 || !e.isai) {
  829. scotNum++
  830. }
  831. })
  832. if (IsAIsuccess != scotNum) {
  833. console.log('评价失败');
  834. this.aiGet2(messages,_fileid)
  835. return
  836. }
  837. // for (const key in processedData) {
  838. // if (key == "评语") {
  839. // processedData.content = processedData[key];
  840. // }
  841. // }
  842. // delete processedData["评语"];
  843. let processedDataCopy = {}
  844. for (const tKey in _this.scoTitList) {
  845. for (const key in processedData) {
  846. if (isNaN(parseFloat(_this.scoTitList[tKey].detail)) && _this.scoTitList[tKey].detail) {
  847. var result = _this.scoTitList[tKey].detail.match(/[\u4e00-\u9fa5a-zA-Z]+/g).join("");
  848. }else{
  849. var result = _this.scoTitList[tKey].detail
  850. }
  851. if (isNaN(parseFloat(key)) && key) {
  852. var key2 = key.match(/[\u4e00-\u9fa5a-zA-Z]+/g).join("");
  853. }else{
  854. var key2 = key
  855. }
  856. // let result = _this.scoTitList[tKey].detail.match(/[\u4e00-\u9fa5a-zA-Z]+/g).join("");
  857. // let key2 = key.match(/[\u4e00-\u9fa5a-zA-Z]+/g).join("");
  858. if (result.indexOf(key2) != -1) {
  859. let aaa = _this.scoTitList[tKey].detail
  860. processedDataCopy[aaa] = processedData[key]
  861. }
  862. }
  863. }
  864. for (const key in processedData) {
  865. if (key == "comment") {
  866. processedDataCopy.content = processedData[key];
  867. }
  868. }
  869. let params = {
  870. cid: _this.cid,
  871. s: _this.stage,
  872. t: _this.task,
  873. tool: _this.toolIndex ? _this.toolIndex : '',
  874. rate: JSON.stringify(processedDataCopy),
  875. uid: _this.DgUid
  876. };
  877. // console.log('params',params);
  878. // return _this.ScLoading = false;
  879. _this.ajax
  880. .get(_this.$store.state.api + "updateWorksEvaTwo", params)
  881. .then(res => {
  882. _this.$message({
  883. message: "评价成功",
  884. type: "success"
  885. });
  886. _this.ScLoading = false;
  887. _this.selectSWorksData();
  888. })
  889. .catch(err => {
  890. // _this.ScLoading = false;
  891. // _this.$message.error("评价失败");
  892. this.aiGet2(messages,_fileid)
  893. console.error(err);
  894. });
  895. }
  896. this.$forceUpdate();
  897. })
  898. .catch(error => {
  899. // _this.$message.error("评价失败");
  900. // _this.ScLoading = false;
  901. this.aiGet2(messages,_fileid)
  902. console.log(error);
  903. });
  904. },
  905. // 上一个
  906. prevStu() {
  907. if (this.ScLoading) return this.$message.info("请稍后,正在ai评价中");
  908. if (this.current > 0) {
  909. this.current--;
  910. this.DgUid = this.workList[this.current].userid;
  911. this.selectSWorksData();
  912. } else {
  913. this.$message.info("已经是第一位了");
  914. }
  915. },
  916. // 下一个
  917. nextStu() {
  918. if (this.ScLoading) return this.$message.info("请稍后,正在ai评价中");
  919. if (this.current < this.workList.length - 1) {
  920. this.current++;
  921. this.DgUid = this.workList[this.current].userid;
  922. this.selectSWorksData2();
  923. } else {
  924. this.$message.info("已经是最后一位了");
  925. }
  926. },
  927. // 提交列表点击切换
  928. cutPer(val,index) {
  929. if (this.ScLoading) return this.$message.info("请稍后,正在ai评价中");
  930. this.current = index;
  931. this.DgUid = val;
  932. this.selectSWorksData2();
  933. },
  934. // 任务得分折叠
  935. revealBtn() {
  936. this.reveal = !this.reveal;
  937. },
  938. // 提交列表折叠
  939. workListTitBtn() {
  940. this.workListShow = !this.workListShow;
  941. },
  942. // 点赞与评论切换
  943. cutPage(val) {
  944. this.cutNum = val;
  945. },
  946. // 删除评论
  947. deleteComment(wid) {
  948. this.$confirm("确定删除此评论吗?", "提示", {
  949. confirmButtonText: "确定",
  950. cancelButtonText: "取消",
  951. type: "warning"
  952. })
  953. .then(() => {
  954. let params = {
  955. id: wid
  956. };
  957. this.ajax
  958. .get(this.$store.state.api + "deleteComment2", params)
  959. .then(res => {
  960. this.$message({
  961. message: "删除评论成功",
  962. type: "success"
  963. });
  964. this.selectSWorksData();
  965. })
  966. .catch(err => {
  967. console.error(err);
  968. });
  969. })
  970. .catch(() => {});
  971. },
  972. openCocoPi(tool, i, uid, uname) {
  973. // return console.log('?????',tool, i, uid, uname);
  974. let student = {
  975. userid: uid,
  976. student: uname
  977. };
  978. if (tool == 57) {
  979. window.parent.postMessage(
  980. {
  981. tools: tool + "teacher",
  982. cid: this.cid,
  983. stage: this.stage,
  984. task: this.task,
  985. tool: this.toolIndex,
  986. student: student
  987. },
  988. "*"
  989. );
  990. }
  991. },
  992. getLang(){
  993. let lang = ''
  994. if(this.languageSetting == 0){
  995. lang = 'Chinese.'
  996. }else if(this.languageSetting == 1){
  997. lang = 'Traditional Chinese.'
  998. }else if(this.languageSetting == 2){
  999. lang = 'English.'
  1000. }
  1001. return lang
  1002. },
  1003. //全部作业
  1004. selectSWorksData() {
  1005. this.vLoading = true;
  1006. this.textarea = "";
  1007. // console.log(this.scoTitList);
  1008. // console.log('toolIndex',this.toolIndex);
  1009. let params = {
  1010. uid: this.DgUid,
  1011. cid: this.cid,
  1012. s: this.stage,
  1013. t: this.task,
  1014. g: this.toolIndex
  1015. };
  1016. // return console.log(params);
  1017. this.ajax
  1018. .get(this.$store.state.api + "selectMarkDialogWorksTwo", params)
  1019. .then(res => {
  1020. let data = res.data[0];
  1021. // markSco为提交列表展示的分数
  1022. data.forEach(e => {
  1023. if (e.rate) {
  1024. let data2 = JSON.parse(e.rate);
  1025. e.markSco = 0;
  1026. let k = 0
  1027. for (const key in data2) {
  1028. if (data2[key] && key != "content" || data2[key] == "0" ) {
  1029. e.markSco += data2[key] * 1;
  1030. }else{
  1031. k += 1
  1032. }
  1033. }
  1034. if (k > 1) {
  1035. e.markSco = null;
  1036. }else{
  1037. e.markSco = (e.markSco / this.scoTitList.length).toFixed(1);
  1038. }
  1039. } else {
  1040. e.markSco = null;
  1041. }
  1042. });
  1043. // 提交列表
  1044. this.workList = data;
  1045. data.forEach((e, index) => {
  1046. if (e.userid == this.DgUid) {
  1047. this.currentUid = e;
  1048. // console.log('e',e);
  1049. // 1截图 3问答 4word文档类型 5视频 10表格 13文档
  1050. if (
  1051. this.currentUid.type == 3 ||
  1052. this.currentUid.type == 10 ||
  1053. this.currentUid.type == 13
  1054. // this.currentUid.type == 15
  1055. ) {
  1056. this.currentUid.content = JSON.parse(e.content);
  1057. this.cuScoCon = this.currentUid.content.text;
  1058. }
  1059. if (this.currentUid.type == 4) {
  1060. let a = this.currentUid.content;
  1061. let data = a.slice(a.lastIndexOf(".") + 1);
  1062. this.cuScoCon = this.currentUid.content;
  1063. if (data == "pdf") {
  1064. this.ifPdf = 1;
  1065. } else {
  1066. this.ifPdf = 0;
  1067. }
  1068. }
  1069. if (this.currentUid.type == 5) {
  1070. this.playerOptions.sources[0].src = this.currentUid.content;
  1071. }
  1072. if (this.currentUid.type == 12) {
  1073. this.TxtMd = ''
  1074. getFile(this.currentUid.content).then(res=>{
  1075. this.TxtMd = res.data;
  1076. })
  1077. }
  1078. this.current = index;
  1079. this.workId = e.id;
  1080. this.appraise(e);
  1081. }
  1082. });
  1083. let likeData = res.data[1];
  1084. this.likeList = [];
  1085. likeData.forEach(e => {
  1086. if (e.workId == this.workId) {
  1087. this.likeList.push(e);
  1088. }
  1089. });
  1090. let commentData = res.data[2];
  1091. this.commentList = [];
  1092. commentData.forEach(e => {
  1093. if (e.workId == this.workId) {
  1094. this.commentList.push(e);
  1095. }
  1096. });
  1097. this.vLoading = false;
  1098. });
  1099. },
  1100. selectSWorksData2() {
  1101. this.vLoading = true;
  1102. this.textarea = "";
  1103. let params = {
  1104. uid: this.DgUid,
  1105. cid: this.cid,
  1106. s: this.stage,
  1107. t: this.task,
  1108. g: this.toolIndex
  1109. };
  1110. // return console.log(params);
  1111. this.ajax
  1112. .get(this.$store.state.api + "selectMarkDialogWorksTwo", params)
  1113. .then(res => {
  1114. let data = res.data[0];
  1115. console.log('data',data);
  1116. // 计算markSco提交列表分数
  1117. data.forEach(e => {
  1118. if (e.rate) {
  1119. let data2 = JSON.parse(e.rate);
  1120. e.markSco = 0;
  1121. let k = 0
  1122. for (const key in data2) {
  1123. if (data2[key] && key != "content" || data2[key] == "0" ) {
  1124. e.markSco += data2[key] * 1;
  1125. }else{
  1126. k += 1
  1127. }
  1128. }
  1129. if (k > 1) {
  1130. e.markSco = null;
  1131. }else{
  1132. e.markSco = (e.markSco / this.scoTitList.length).toFixed(1);
  1133. }
  1134. } else {
  1135. e.markSco = null;
  1136. }
  1137. });
  1138. // 提交列表
  1139. this.workList = data;
  1140. // 划分作业类型
  1141. data.forEach((e, index) => {
  1142. if (e.userid == this.DgUid) {
  1143. this.currentUid = e;
  1144. // 1截图 3问答 4word文档类型 5视频 10表格 13文档
  1145. if (
  1146. this.currentUid.type == 3 ||
  1147. this.currentUid.type == 10 ||
  1148. this.currentUid.type == 13
  1149. // this.currentUid.type == 15
  1150. ) {
  1151. this.currentUid.content = JSON.parse(e.content);
  1152. this.cuScoCon = this.currentUid.content.text;
  1153. }
  1154. if (this.currentUid.type == 4) {
  1155. let a = this.currentUid.content;
  1156. let data = a.slice(a.lastIndexOf(".") + 1);
  1157. if (data == "pdf") {
  1158. this.ifPdf = 1;
  1159. } else {
  1160. this.ifPdf = 0;
  1161. }
  1162. this.cuScoCon = this.currentUid.content;
  1163. }
  1164. if (this.currentUid.type == 5) {
  1165. this.playerOptions.sources[0].src = this.currentUid.content;
  1166. }
  1167. if (this.currentUid.type == 12) {
  1168. this.TxtMd = ''
  1169. getFile(this.currentUid.content).then(res=>{
  1170. this.TxtMd = res.data;
  1171. })
  1172. }
  1173. this.workId = e.id;
  1174. this.appraise(e);
  1175. }
  1176. });
  1177. let likeData = res.data[1];
  1178. this.likeList = [];
  1179. likeData.forEach(e => {
  1180. if (e.workId == this.workId) {
  1181. this.likeList.push(e);
  1182. }
  1183. });
  1184. let commentData = res.data[2];
  1185. this.commentList = [];
  1186. commentData.forEach(e => {
  1187. if (e.workId == this.workId) {
  1188. this.commentList.push(e);
  1189. }
  1190. });
  1191. this.vLoading = false;
  1192. });
  1193. },
  1194. downloadFile(url) {
  1195. var credentials = {
  1196. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  1197. secretAccessKey: "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"
  1198. }; //秘钥形式的登录上传
  1199. window.AWS.config.update(credentials);
  1200. window.AWS.config.region = "cn-northwest-1"; //设置区域
  1201. let url2 = url;
  1202. let _url2 = "";
  1203. if (
  1204. url2.indexOf("https://view.officeapps.live.com/op/view.aspx?src=") != -1
  1205. ) {
  1206. _url2 = url2.split(
  1207. "https://view.officeapps.live.com/op/view.aspx?src="
  1208. )[1];
  1209. } else {
  1210. _url2 = url2;
  1211. }
  1212. const loading2 = this.$loading.service({
  1213. background: "rgba(255, 255, 255, 0.7)",
  1214. target: document.body,
  1215. text: "文件加载中..."
  1216. });
  1217. var s3 = new window.AWS.S3({ params: { Bucket: "ccrb" } });
  1218. let name = decodeURIComponent(
  1219. _url2.split("https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/")[1]
  1220. );
  1221. var params = {
  1222. Bucket: "ccrb",
  1223. Key: name
  1224. };
  1225. s3.getObject(params, function(err, data) {
  1226. loading2.close();
  1227. if (err) console.log(err, err.stack);
  1228. // an error occurred
  1229. else {
  1230. let url = window.URL.createObjectURL(new Blob([data.Body]));
  1231. let a = document.createElement("a");
  1232. a.name = name;
  1233. a.href = url;
  1234. a.download = name;
  1235. a.click();
  1236. console.log(data);
  1237. } // sxuccessful response
  1238. });
  1239. },
  1240. // 处理任务的分展示
  1241. appraise(val) {
  1242. if (val.rate) {
  1243. let data = JSON.parse(val.rate);
  1244. this.scoTitList.forEach((e, index) => {
  1245. e.cog = null;
  1246. for (const key in data) {
  1247. if (isNaN(parseFloat(e.detail)) && e.detail) {
  1248. var result = e.detail.match(/[\u4e00-\u9fa5a-zA-Z]+/g).join("");
  1249. }else{
  1250. var result = e.detail
  1251. }
  1252. if (isNaN(parseFloat(key)) && key) {
  1253. var key2 = key.match(/[\u4e00-\u9fa5a-zA-Z]+/g).join("");
  1254. }else{
  1255. var key2 = key
  1256. }
  1257. // let result = e.detail.match(/[\u4e00-\u9fa5a-zA-Z]+/g).join("");
  1258. // let key2 = key.match(/[\u4e00-\u9fa5a-zA-Z]+/g).join("");
  1259. if (result.indexOf(key2) != -1) {
  1260. e.cog = data[key];
  1261. }
  1262. if ("content" == key) {
  1263. this.textarea = data[key];
  1264. }
  1265. }
  1266. });
  1267. } else {
  1268. this.scoTitList.forEach(e => {
  1269. e.cog = 0;
  1270. });
  1271. }
  1272. }
  1273. }
  1274. };
  1275. </script>
  1276. <style scoped>
  1277. .markDialog {
  1278. display: flex;
  1279. /* height: 100%; */
  1280. min-height: 600px;
  1281. height: 100%;
  1282. }
  1283. .left {
  1284. /* overflow: auto; */
  1285. width: 310px;
  1286. /* border-right: 1px rgba(231, 231, 231, 1) solid; */
  1287. padding: 20px 20px 0;
  1288. box-sizing: border-box;
  1289. padding-right: 10px;
  1290. display: flex;
  1291. flex-direction: column;
  1292. height: 100%;
  1293. }
  1294. .Rig {
  1295. flex: 1;
  1296. padding: 15px;
  1297. display: flex;
  1298. flex-direction: column;
  1299. }
  1300. .RigTop {
  1301. border-bottom: 1px rgba(231, 231, 231, 1) solid;
  1302. padding: 0px 0 15px;
  1303. }
  1304. .AreaCss {
  1305. position: relative;
  1306. margin-bottom: 5px;
  1307. }
  1308. .AreaCss >>> .el-textarea__inner {
  1309. min-height: 150px !important;
  1310. /* max-height: 150px; */
  1311. /* padding-bottom: 20px; */
  1312. }
  1313. .AreaBtn {
  1314. position: absolute;
  1315. width: calc(100% - 30px);
  1316. text-align: right;
  1317. background-color: #fff;
  1318. bottom: 11px;
  1319. right: 20px;
  1320. color: rgba(54, 129, 252, 1);
  1321. cursor: pointer;
  1322. }
  1323. .likeList {
  1324. width: 100%;
  1325. display: flex;
  1326. padding: 10px 0;
  1327. flex-wrap: wrap;
  1328. }
  1329. .likeList > div {
  1330. padding: 4px 0px;
  1331. background-color: rgba(243, 247, 253, 1);
  1332. margin-right: 10px;
  1333. width: calc((100% - 60px) / 7);
  1334. text-align: center;
  1335. text-overflow: ellipsis;
  1336. white-space: nowrap;
  1337. overflow: hidden;
  1338. margin-bottom: 10px;
  1339. }
  1340. .likeList > div:nth-child(7n) {
  1341. margin-right: 0px;
  1342. }
  1343. .commentListCss {
  1344. background-color: #fafafa;
  1345. padding: 25px 15px 0;
  1346. box-sizing: border-box;
  1347. margin-top: 10px;
  1348. border-radius: 5px;
  1349. }
  1350. .RigConTit {
  1351. width: 100%;
  1352. display: flex;
  1353. margin: 10px 0;
  1354. }
  1355. .RigConTit > div {
  1356. font-size: 14px;
  1357. color: rgba(0, 0, 0, 0.6);
  1358. padding: 8px;
  1359. cursor: pointer;
  1360. }
  1361. .RigConTitOn {
  1362. border-bottom: 3px solid rgba(54, 129, 252, 1);
  1363. }
  1364. .RigCon {
  1365. width: 100%;
  1366. overflow: auto;
  1367. flex: 1;
  1368. padding: 10px 0;
  1369. box-sizing: border-box;
  1370. /* background-color: aqua; */
  1371. }
  1372. .selBlock {
  1373. background-color: #f3f7fd !important;
  1374. border: 1px #68a0fc solid !important;
  1375. }
  1376. .cutStuBtn {
  1377. display: flex;
  1378. color: rgba(54, 129, 252, 1);
  1379. }
  1380. .cutStuBtn > div {
  1381. margin-left: 10px;
  1382. }
  1383. .scoreTit {
  1384. font-size: 16px;
  1385. font-weight: 600;
  1386. display: flex;
  1387. justify-content: space-between;
  1388. box-sizing: border-box;
  1389. color: rgba(0, 0, 0, 0.9);
  1390. }
  1391. .allD {
  1392. margin: 10px 0;
  1393. min-height: 60px;
  1394. background-color: #f3f7fd;
  1395. }
  1396. .scoreStar2 {
  1397. padding: 0 10px 10px;
  1398. height: 100%;
  1399. flex: 1;
  1400. color: rgba(54, 129, 252, 1);
  1401. cursor: pointer;
  1402. }
  1403. .scoreStar {
  1404. padding: 0px 10px 10px;
  1405. height: 100%;
  1406. flex: 1;
  1407. }
  1408. .scoreStarBack {
  1409. flex: 1;
  1410. display: flex;
  1411. justify-content: space-between;
  1412. padding-top: 10px;
  1413. position: relative;
  1414. }
  1415. /* .scoreStar > div:first-child > .scoreStarBack {
  1416. margin-top: 0;
  1417. } */
  1418. .ScrBtn {
  1419. display: flex;
  1420. justify-content: center;
  1421. align-items: center;
  1422. cursor: pointer;
  1423. padding: 2px 8px;
  1424. border-radius: 5px;
  1425. color: #fff;
  1426. background-color: rgba(54, 129, 252, 1);
  1427. border: 1px rgba(54, 129, 252, 1) solid;
  1428. }
  1429. .worksAnswer {
  1430. color: #4078dd;
  1431. margin: 10px 0;
  1432. font-size: 16px;
  1433. display: flex;
  1434. align-items: center;
  1435. cursor: pointer;
  1436. }
  1437. .worksAnswer > img {
  1438. width: 100%;
  1439. height: 300px;
  1440. object-fit: contain;
  1441. margin: 0 auto;
  1442. display: block;
  1443. }
  1444. .briefTit {
  1445. width: 120px;
  1446. text-overflow: ellipsis;
  1447. overflow: hidden;
  1448. white-space: nowrap;
  1449. }
  1450. .briefTit > .titRoot{
  1451. position: absolute;
  1452. top: 0;
  1453. left: -27px;
  1454. transform: translate(0,10px);
  1455. }
  1456. .workListTit {
  1457. color: rgba(0, 0, 0, 0.6);
  1458. font-size: 12px;
  1459. font-weight: 400;
  1460. margin: 10px 0;
  1461. cursor: pointer;
  1462. }
  1463. .schPer2 {
  1464. padding: 10px;
  1465. box-sizing: border-box;
  1466. display: flex;
  1467. border-radius: 5px;
  1468. border: 1px solid rgba(240, 242, 245, 1);
  1469. /* margin-bottom: 10px; */
  1470. }
  1471. .schPer2 > img {
  1472. width: 45px;
  1473. height: 45px;
  1474. border-radius: 50%;
  1475. object-fit: cover;
  1476. }
  1477. .schPer {
  1478. padding: 10px;
  1479. box-sizing: border-box;
  1480. display: flex;
  1481. border-radius: 5px;
  1482. border: 1px solid rgba(240, 242, 245, 1);
  1483. margin-bottom: 10px;
  1484. }
  1485. .schPer > img {
  1486. width: 40px;
  1487. height: 40px;
  1488. border-radius: 50%;
  1489. object-fit: cover;
  1490. }
  1491. .con {
  1492. flex: 1;
  1493. display: flex;
  1494. flex-direction: column;
  1495. justify-content: space-between;
  1496. padding: 0 10px;
  1497. box-sizing: border-box;
  1498. }
  1499. .con > .tit {
  1500. width: 100%;
  1501. display: flex;
  1502. justify-content: space-between;
  1503. }
  1504. .con > .tit2 {
  1505. width: 100%;
  1506. display: flex;
  1507. margin-bottom: 15px;
  1508. }
  1509. .TitName {
  1510. width: 70px;
  1511. overflow: hidden;
  1512. text-overflow: ellipsis;
  1513. white-space: nowrap;
  1514. margin-right: 10px;
  1515. }
  1516. .worksAnswer {
  1517. color: #4078dd;
  1518. margin: 10px 0;
  1519. font-size: 16px;
  1520. position: relative;
  1521. }
  1522. .worksAnswer > img {
  1523. width: 500px;
  1524. height: 300px;
  1525. object-fit: contain;
  1526. margin: 0 auto;
  1527. display: block;
  1528. }
  1529. .cont {
  1530. overflow-wrap: break-word;
  1531. word-break: break-word;
  1532. white-space: pre-line;
  1533. }
  1534. .cont >>> table {
  1535. border-top: 1px solid #ccc;
  1536. border-left: 1px solid #ccc;
  1537. }
  1538. .cont >>> table td,
  1539. .cont >>> table th {
  1540. border-bottom: 1px solid #ccc;
  1541. border-right: 1px solid #ccc;
  1542. padding: 5px 10px;
  1543. max-width: 0px;
  1544. height: 30px;
  1545. vertical-align: baseline;
  1546. box-sizing: border-box;
  1547. }
  1548. .video-player >>> .video-js {
  1549. height: 100%;
  1550. }
  1551. .markBox{
  1552. padding: 20px 14px;
  1553. line-height: 29px;
  1554. font-size: 16px;
  1555. background: #f4f4f4;
  1556. border-radius: 5px;
  1557. }
  1558. </style>