baseMessage.vue 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008
  1. <template>
  2. <div class="message">
  3. <div class="m-header" @click.stop="changeShowMain(!showMain)">
  4. <span :class="['m-h-icon', showMain ? 'm-h-icon-active' : '']"></span>
  5. <span class="m-h-title">{{ title }}</span>
  6. </div>
  7. <div class="m-main" v-show="showMain">
  8. <div class="m-m-form">
  9. <div class="m-m-formItem" style="width: clamp(50%, 50%, 50%)">
  10. <div class="m-m-fi-label">课堂名称</div>
  11. <div class="m-m-fi-input">
  12. <el-input
  13. v-model="data.courseName"
  14. placeholder="请输入课堂名称"
  15. @change="changeData()"
  16. ></el-input>
  17. </div>
  18. </div>
  19. <div class="m-m-formItem" style="width: clamp(21%,21%,21%)">
  20. <div class="m-m-fi-label">授课老师</div>
  21. <div class="m-m-fi-input">
  22. <el-input
  23. v-model="data.teacherName"
  24. placeholder="请输入授课老师"
  25. @change="changeData()"
  26. ></el-input>
  27. </div>
  28. </div>
  29. <div class="m-m-formItem" style="width: clamp(22%,22%,22%)"">
  30. <div class="m-m-fi-label">授课时间</div>
  31. <div class="m-m-fi-input">
  32. <el-date-picker
  33. v-model="data.time"
  34. type="datetime"
  35. format="yyyy-MM-dd HH:mm:ss"
  36. value-format="yyyy-MM-dd HH:mm:ss"
  37. style="width: 100%"
  38. @change="changeData()"
  39. placeholder="请选择授课时间"
  40. >
  41. </el-date-picker>
  42. </div>
  43. </div>
  44. <div class="m-m-formItem" style="width: clamp(24%,24%,24%)"">
  45. <div class="m-m-fi-label">授课年级</div>
  46. <div class="m-m-fi-input">
  47. <el-select
  48. style="width: 100%"
  49. v-model="data.grade"
  50. @change="changeData()"
  51. placeholder="请选择年级"
  52. >
  53. <el-option
  54. v-for="(item, index) in gradeList"
  55. :key="index"
  56. :value="item.value"
  57. :label="item.label"
  58. ></el-option>
  59. </el-select>
  60. </div>
  61. </div>
  62. <div class="m-m-formItem" style="width: clamp(24.5%,24.5%,24.5%)">
  63. <div class="m-m-fi-label">授课科目</div>
  64. <div class="m-m-fi-input">
  65. <el-select
  66. style="width: 100%"
  67. v-model="data.subject"
  68. @change="changeData()"
  69. placeholder="请选择年级"
  70. >
  71. <el-option
  72. v-for="(item, index) in subjectList"
  73. :key="index"
  74. :value="item.value"
  75. :label="item.label"
  76. ></el-option>
  77. </el-select>
  78. </div>
  79. </div>
  80. <div class="m-m-formItem" style="width: clamp(21%,21%,21%)"">
  81. <div class="m-m-fi-label">教材版本</div>
  82. <div class="m-m-fi-input">
  83. <el-input
  84. v-model="data.textbook"
  85. placeholder="请输入教材版本"
  86. @change="changeData()"
  87. ></el-input>
  88. </div>
  89. </div>
  90. <div class="m-m-formItem" style="width: clamp(22%,22%,22%)"">
  91. <div class="m-m-fi-label">学生人数</div>
  92. <div class="m-m-fi-input">
  93. <el-input
  94. v-model.number="data.studentNum"
  95. placeholder="请输入学生人数"
  96. @change="changeData()"
  97. ></el-input>
  98. </div>
  99. </div>
  100. </div>
  101. <div class="fileList">
  102. <div class="fl_img">
  103. <div class="imgTit">
  104. <span>课堂图片</span>
  105. <span>(建议图片比例16:9,最多上传3张)</span>
  106. </div>
  107. <div class="m-m-formImage" v-loading="uploadImageLoading">
  108. <div
  109. class="m-m-fi-imageItem"
  110. v-for="(value, key, index) in imageList"
  111. :key="index"
  112. v-if="(key == 'fileList1' || key == 'fileList2' || key == 'fileList3') && value.length >0"
  113. @click.stop="previewImg(value[0].url)"
  114. style="max-width:32%;"
  115. >
  116. <el-image
  117. class="itemUrl"
  118. :src="value[0].url"
  119. fit="cover"
  120. style="width: 100%;"
  121. ></el-image>
  122. <span @click.stop="delImage(key)"></span>
  123. <!-- <img class="itemUrl" :src="value[0].url" alt="" /> -->
  124. </div>
  125. <!-- 图片区域 -->
  126. <div
  127. class="m-m-fi-imageItem"
  128. @click.stop="addImage()"
  129. style="max-width:60%;"
  130. v-if="
  131. imageList.fileList1 &&
  132. imageList.fileList1.length +
  133. imageList.fileList2.length +
  134. imageList.fileList3.length <
  135. 3
  136. "
  137. >
  138. <img
  139. src="../../../../assets/icon/classroomObservation/Union.svg"
  140. alt=""
  141. />
  142. <div
  143. style="
  144. font-size: 12px;
  145. font-weight: 400;
  146. margin-top: 5px;
  147. color: rgba(0, 0, 0, 0.4);
  148. "
  149. >
  150. 点击上传图片
  151. </div>
  152. </div>
  153. <!-- 图片区域 -->
  154. <!-- <div class="m-m-fi-btn" >添加课堂图片</div> -->
  155. </div>
  156. </div>
  157. <div class="fl_video">
  158. <div class="imgTit">
  159. <span>课堂视频</span>
  160. <span></span>
  161. <!-- <span>(建议视频比例16:9,最多上传1个)</span> -->
  162. </div>
  163. <div class="m-m-formImage" v-loading="uploadVideoLoading">
  164. <div
  165. class="m-m-fi-imageItem"
  166. style="max-width:60%;"
  167. v-if="!imageList.videoList.length==0"
  168. v-for="(item, index) in imageList.videoList?imageList.videoList:[]"
  169. :key="index"
  170. @click.stop="previewVideo(item.url)"
  171. >
  172. <!-- <div>{{ item }}</div> -->
  173. <el-image
  174. class="itemUrl"
  175. :src="require('../../../../assets/icon/classroomObservation/isVideo.png')"
  176. fit="cover"
  177. ></el-image>
  178. <span @click.stop="delVideo('videoList')"></span>
  179. </div>
  180. <!-- <el-progress v-if="progressData.uploadVideo && !imageList.videoList.length" class="m_m_fi_progress" :percentage="progressData.value"></el-progress> -->
  181. <div
  182. class="m-m-fi-imageItem"
  183. @click.stop="addVideo()"
  184. style="max-width:60%;"
  185. v-if="(((imageList.videoList&&imageList.videoList.length<=0) || !imageList.videoList) && !progressData.uploadVideo)"
  186. >
  187. <img
  188. src="../../../../assets/icon/classroomObservation/Union.svg"
  189. alt=""
  190. />
  191. <div
  192. style="
  193. font-size: 12px;
  194. font-weight: 400;
  195. margin-top: 5px;
  196. color: rgba(0, 0, 0, 0.4);
  197. "
  198. >
  199. 点击上传视频
  200. </div>
  201. </div>
  202. <div
  203. class="m-m-fi-imageItem"
  204. style="max-width:60%;border-radius: 8px;overflow: hidden;"
  205. v-if="progressData.uploadVideo && !imageList.videoList.length""
  206. >
  207. <el-image
  208. class="itemUrl"
  209. :src="require('../../../../assets/icon/classroomObservation/videoFile.svg')"
  210. fit="cover"
  211. ></el-image>
  212. <div class="m_m_fi_progress">
  213. <div>{{ progressData.value }}%</div>
  214. <span>上传中...</span>
  215. <div class="m_m_fi_p_bar">
  216. <div :style="{width:progressData.value+'%'}"></div>
  217. </div>
  218. </div>
  219. </div>
  220. <!-- <div class="m-m-fi-btn" >添加课堂图片</div> -->
  221. </div>
  222. </div>
  223. <!-- <div class="nephogramArea"> -->
  224. <div class="fl_nephogram">
  225. <div class="imgTit">
  226. <span>词云图</span>
  227. <span></span>
  228. </div>
  229. <div class="m-m-formImage">
  230. <div
  231. class="m-m-fi-nephogramItem"
  232. style="width:100%;"
  233. v-loading="uploadNephogramLoading"
  234. v-if="(imageList.NephogramList&&imageList.NephogramList.length>0)"
  235. >
  236. <wordcloudEChart :data="imageList.NephogramList[0]"/>
  237. <span @click.stop="delNephogram('NephogramList')"></span>
  238. </div>
  239. <div
  240. class="m-m-fi-nephogramItem"
  241. v-loading="uploadNephogramLoading"
  242. @click.stop="addNephogram()"
  243. style="width:60%;max-height: 100px;"
  244. v-if="((imageList.NephogramList&&imageList.NephogramList.length<=0) || !imageList.NephogramList)"
  245. >
  246. <img
  247. :src="require('../../../../assets/icon/classroomObservation/bmRefresh.png')"
  248. alt=""
  249. style="width:20px"
  250. />
  251. <div
  252. style="
  253. font-size: 12px;
  254. font-weight: 400;
  255. margin-top: 5px;
  256. color: rgba(0, 0, 0, 0.4);
  257. "
  258. >
  259. 生成词云图
  260. </div>
  261. </div>
  262. </div>
  263. <!-- </div> -->
  264. </div>
  265. </div>
  266. </div>
  267. <previewVideoDialog ref="previewVideoDialogRef"/>
  268. </div>
  269. </template>
  270. <script>
  271. import previewVideoDialog from './previewVideoDialog.vue';
  272. import wordcloudEChart from './wordcloudEChart.vue'
  273. import { v4 as uuidv4 } from "uuid";
  274. export default {
  275. emits: ["saveData", "saveImage", "saveVideo","delImage","saveNephogram"],
  276. components:{
  277. previewVideoDialog,
  278. wordcloudEChart
  279. },
  280. props: {
  281. data: {
  282. type: Object,
  283. default: () => {
  284. return {};
  285. },
  286. },
  287. tid:{
  288. type:String,
  289. default:"",
  290. },
  291. imageList: {
  292. type: Object,
  293. default: () => {
  294. return {
  295. fileList:[],
  296. fileList1:[],
  297. fileList2:[],
  298. fileList3:[],
  299. videoList:[],
  300. };
  301. },
  302. },
  303. dataList:{
  304. type:Array,
  305. default:()=>[]
  306. }
  307. },
  308. data() {
  309. return {
  310. title: "基本信息",
  311. chartObj:null,
  312. showMain: true,
  313. uploadImageLoading: false,
  314. uploadVideoLoading:false,
  315. uploadNephogramLoading:false,
  316. from: {
  317. courseName: "",
  318. teacherName: "",
  319. grade: "",
  320. subject: "",
  321. class: "",
  322. studentNum: 0,
  323. },
  324. gradeList: [
  325. { value: "小学一年级", label: "小学一年级" },
  326. { value: "小学二年级", label: "小学二年级" },
  327. { value: "小学三年级", label: "小学三年级" },
  328. { value: "小学四年级", label: "小学四年级" },
  329. { value: "小学五年级", label: "小学五年级" },
  330. { value: "小学六年级", label: "小学六年级" },
  331. ],
  332. subjectList: [
  333. { value: "语文", label: "语文" },
  334. { value: "数学", label: "数学" },
  335. { value: "英语", label: "英语" },
  336. { value: "科学", label: "科学" },
  337. { value: "信息技术", label: "信息技术" },
  338. { value: "心理", label: "心理" },
  339. { value: "物理", label: "物理" },
  340. { value: "化学", label: "化学" },
  341. { value: "生物", label: "生物" },
  342. { value: "历史", label: "历史" },
  343. { value: "地理", label: "地理" },
  344. { value: "通用技术", label: "通用技术" },
  345. { value: "政治", label: "政治" },
  346. { value: "STEM", label: "STEM" },
  347. { value: "美术", label: "美术" },
  348. { value: "音乐", label: "音乐" },
  349. { value: "其他", label: "其他" },
  350. ],
  351. progressData:{
  352. uploadVideo:false,
  353. value:0,
  354. }
  355. };
  356. },
  357. watch:{
  358. imageList(){
  359. this.$forceUpdate();
  360. }
  361. },
  362. methods: {
  363. // 添加图片
  364. addImage() {
  365. if(!this.tid)return this.$message.error("请选择课堂")
  366. // 上传录音
  367. let input = document.createElement("input");
  368. input.type = "file";
  369. input.accept = "image/*";
  370. input.click();
  371. input.onchange = () => {
  372. this.uploadImageLoading = true;
  373. let file = input.files[0];
  374. var credentials = {
  375. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  376. secretAccessKey: "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",
  377. }; //秘钥形式的登录上传
  378. window.AWS.config.update(credentials);
  379. window.AWS.config.region = "cn-northwest-1"; //设置区域
  380. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  381. var _this = this;
  382. if (file) {
  383. var params = {
  384. Key:
  385. file.name.split(".")[0] +
  386. new Date().getTime() +
  387. "." +
  388. file.name.split(".")[file.name.split(".").length - 1],
  389. ContentType: file.type,
  390. Body: file,
  391. "Access-Control-Allow-Credentials": "*",
  392. ACL: "public-read",
  393. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  394. var options = {
  395. partSize: 2048 * 1024 * 1024,
  396. queueSize: 2,
  397. leavePartsOnError: true,
  398. };
  399. bucket
  400. .upload(params, options)
  401. .on("httpUploadProgress", function (evt) {
  402. //这里可以写进度条
  403. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  404. })
  405. .send(function (err, data) {
  406. if (err) {
  407. _this.$message.error("上传失败");
  408. } else {
  409. _this.$emit("saveImage", {
  410. name: data.key,
  411. status: "success",
  412. uid: "1",
  413. url: data.Location,
  414. });
  415. // _this.from.audioUrl = data.Location;
  416. // _this.from.audioName = file.name;
  417. // _this.from.audioSize = file.size;
  418. // _this.from.audioTime = file.lastModified;
  419. // console.log(data.Location)
  420. }
  421. _this.uploadImageLoading = false;
  422. });
  423. }
  424. };
  425. // this.mainBtnStatus = 1;
  426. // this.barNum = 4;
  427. },
  428. // 添加视频
  429. addVideo(){
  430. if(!this.tid)return this.$message.error("请选择课堂")
  431. let input = document.createElement("input");
  432. input.type = "file";
  433. input.accept = "video/*";
  434. input.click();
  435. input.onchange = () => {
  436. this.progressData.uploadVideo = true;
  437. // this.uploadVideoLoading = true;
  438. let file = input.files[0];
  439. var credentials = {
  440. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  441. secretAccessKey: "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",
  442. }; //秘钥形式的登录上传
  443. window.AWS.config.update(credentials);
  444. window.AWS.config.region = "cn-northwest-1"; //设置区域
  445. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  446. var _this = this;
  447. if (file) {
  448. var params = {
  449. Key:
  450. file.name.split(".")[0] +
  451. new Date().getTime() +
  452. "." +
  453. file.name.split(".")[file.name.split(".").length - 1],
  454. ContentType: file.type,
  455. Body: file,
  456. "Access-Control-Allow-Credentials": "*",
  457. ACL: "public-read",
  458. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  459. var options = {
  460. partSize: 2048 * 1024 * 1024,
  461. queueSize: 2,
  462. leavePartsOnError: true,
  463. };
  464. bucket
  465. .upload(params, options)
  466. .on("httpUploadProgress", function (evt) {
  467. //这里可以写进度条
  468. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  469. _this.progressData.value = parseInt((evt.loaded * 100) / evt.total)
  470. })
  471. .send(function (err, data) {
  472. if (err) {
  473. _this.$message.error("上传失败");
  474. } else {
  475. _this.$emit('saveVideo',{
  476. name: data.key,
  477. status: "success",
  478. uid: "1",
  479. url: data.Location,
  480. })
  481. }
  482. _this.progressData.uploadVideo = false;
  483. _this.progressData.value = 0;
  484. // _this.uploadVideoLoading = false;
  485. });
  486. }
  487. };
  488. },
  489. //添加云图
  490. addNephogram(){
  491. if(!this.tid)return this.$message.error("请选择课堂")
  492. if(this.uploadNephogramLoading)return this.$message.info("请稍等");
  493. this.uploadNephogramLoading = true;
  494. let _workText = ``;
  495. this.dataList.forEach((i) => {
  496. let _jsonObj = i.jsonData;
  497. _workText += `名称:${_jsonObj.name}\n分析内容:${_jsonObj.content?_jsonObj.content:''}\n\n`;
  498. });
  499. const _msg = `NOTICE
  500. Language: Please use the same language as the user requirement, if the user speaks Chinese, the specific text of your answer should also be in Chinese.
  501. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  502. Instruction: Based on the context, follow "Format example", write content.
  503. ## 参靠内容
  504. ${_workText}
  505. ## 要求
  506. 根据#参考内容 生成词云图数据,2-4个字的短语,选取与课程比较相关的词汇,禁止有重复的词汇,去掉【这里】【哪里】【谁知】之类无指示含义的词汇;格式参考## format example
  507. 输入完整的JSON数据,禁止有重复的词汇;
  508. ## format example
  509. [
  510. {"value":1,"name":"词汇","textStyle":{"color":"随机颜色"}},
  511. {"value":2,"name":"词汇","textStyle":{"color":"随机颜色"}},
  512. {"value":1,"name":"词汇","textStyle":{"color":"随机颜色"}},
  513. {"value":3,"name":"词汇","textStyle":{"color":"随机颜色"}},
  514. {"value":1,"name":"词汇","textStyle":{"color":"随机颜色"}},
  515. {"value":2,"name":"词汇","textStyle":{"color":"随机颜色"}},
  516. {"value":1,"name":"词汇","textStyle":{"color":"随机颜色"}},
  517. {"value":4,"name":"词汇","textStyle":{"color":"随机颜色"}}
  518. ]
  519. `;
  520. const _uuid = uuidv4();
  521. let params = {
  522. model: "gpt-3.5-turbo",
  523. temperature: 0,
  524. max_tokens: 4096,
  525. top_p: 1,
  526. frequency_penalty: 0,
  527. presence_penalty: 0,
  528. messages: [{ role: "user", content: _msg }],
  529. uid: _uuid,
  530. mind_map_question: "",
  531. stream: false,
  532. };
  533. this.ajax
  534. .post("https://gpt4.cocorobo.cn/chat", params)
  535. .then((res) => {
  536. let _data = res.data.FunctionResponse.choices[0];
  537. let _jsonData = _data.message.content;
  538. _jsonData = _jsonData.replaceAll("```json", "").replaceAll("```", "");
  539. let _result = JSON.parse(_jsonData);
  540. console.log(_jsonData)
  541. this.$emit('saveNephogram',{
  542. tooltip: {
  543. show: false,
  544. },
  545. series: [
  546. {
  547. type: 'wordCloud',
  548. sizeRange: [14, 38],
  549. rotationRange: [0, 0],
  550. keepAspect:false,
  551. shape: 'circle',
  552. left: 'center',
  553. top: 'center',
  554. right: null,
  555. bottom: null,
  556. width: '90%',
  557. height: '90%',
  558. // maskImage: maskImage,
  559. // sizeRange: [12, 60],
  560. rotationRange: [-90, 90],
  561. rotationStep: 45,
  562. // gridSize: 12,
  563. // autoSize: {
  564. // enable: true,
  565. // minSize: 12,
  566. // },
  567. // textStyle: {
  568. // color: function () {
  569. // var colors = [
  570. // '#F6A878',
  571. // '#FDCA71',
  572. // '#D9E4E4',
  573. // '#CAE1E6',
  574. // '#8B9ECD',
  575. // '#6CB9FB',
  576. // '#5596F7',
  577. // '#4778FE',
  578. // ];
  579. // return colors[parseInt(Math.random() * 8)];
  580. // },
  581. // },
  582. data: _result,
  583. // [{name: "行政处罚"num: 1324}]
  584. },
  585. ],
  586. })
  587. })
  588. .catch((e) => {
  589. console.log(e);
  590. this.$message.error("生成词云图失败");
  591. })
  592. .finally((_) => {
  593. this.uploadNephogramLoading = false;
  594. });
  595. // this.$emit('saveNephogram',{
  596. // name: "测试",
  597. // status: "success",
  598. // uid: "1",
  599. // url: "测试",
  600. // })
  601. },
  602. // 删除图片
  603. delImage(key) {
  604. this.$confirm("确定删除该图片吗?", "提示", {
  605. confirmButtonText: "确定",
  606. cancelButtonText: "取消",
  607. type: "warning",
  608. }).then(() => {
  609. this.$emit("delImage", key);
  610. });
  611. },
  612. // 删除视频
  613. delVideo(key){
  614. this.$confirm("确定删除该视频吗?", "提示", {
  615. confirmButtonText: "确定",
  616. cancelButtonText: "取消",
  617. type: "warning",
  618. }).then(() => {
  619. this.$emit("delImage", key);
  620. }).catch(e=>{
  621. console.log("取消删除")
  622. });
  623. },
  624. //删除词云图
  625. delNephogram(key){
  626. this.$confirm("确定删除该词云图吗?", "提示", {
  627. confirmButtonText: "确定",
  628. cancelButtonText: "取消",
  629. type: "warning",
  630. }).then(() => {
  631. this.$emit("delImage", key);
  632. }).catch(e=>{
  633. console.log("取消删除")
  634. });
  635. },
  636. changeShowMain(newValue) {
  637. this.showMain = newValue;
  638. },
  639. previewImg(url) {
  640. this.$hevueImgPreview(url);
  641. },
  642. previewVideo(url){
  643. this.$refs.previewVideoDialogRef.open(url)
  644. // this.$message.info(`预览:${url}`)
  645. },
  646. changeData() {
  647. if(!this.tid)return this.$message.error("请选择课堂")
  648. this.$emit("saveData");
  649. },
  650. },
  651. mounted() {
  652. // this.showNephogram();
  653. },
  654. };
  655. </script>
  656. <style scoped>
  657. .message {
  658. width: 100%;
  659. height: auto;
  660. }
  661. .imgTit {
  662. height: 40px;
  663. line-height: 40px;
  664. }
  665. .imgTit :first-child {
  666. font-size: 16px;
  667. font-weight: 400;
  668. line-height: 22px;
  669. text-align: right;
  670. }
  671. .imgTit :last-child {
  672. font-family: PingFang SC;
  673. font-size: 12px;
  674. font-weight: 400;
  675. line-height: 20px;
  676. text-align: left;
  677. color: rgba(0, 0, 0, 0.4);
  678. }
  679. .baseInfoLeft {
  680. display: flex;
  681. width: 70%;
  682. flex-direction: column;
  683. /* justify-content: space-between; */
  684. margin-right: 10px;
  685. }
  686. .baseInfoLeft >>> .baseInfoLeftBot {
  687. display: flex;
  688. justify-content: space-between;
  689. margin: 10px 0;
  690. }
  691. .m-m-formItemBot {
  692. width: 30%;
  693. /* height: auto; */
  694. /* display: flex; */
  695. /* flex-direction: column; */
  696. /* align-items: left; */
  697. /* margin-bottom: 20px; */
  698. }
  699. .baseInfoRight {
  700. display: flex;
  701. flex: 1;
  702. flex-direction: column;
  703. /* justify-content: space-between; */
  704. }
  705. .m-header {
  706. width: 100%;
  707. height: 50px;
  708. display: flex;
  709. align-items: center;
  710. cursor: pointer;
  711. }
  712. .m-h-icon {
  713. width: 16px;
  714. height: 16px;
  715. background: url("../../../../assets/icon/classroomObservation/right.svg")
  716. no-repeat;
  717. background-size: 100% 100%;
  718. margin-right: 5px;
  719. transition: 0.3s;
  720. }
  721. .m-h-icon-active {
  722. transform: rotate(90deg);
  723. }
  724. .m-h-title {
  725. font-size: 18px;
  726. }
  727. .m-main {
  728. width: calc(100% - 10px);
  729. height: auto;
  730. border-radius: 5px;
  731. background-color: #ffffff;
  732. padding: 20px 20px 0 20px;
  733. box-sizing: border-box;
  734. display: flex;
  735. flex-wrap: wrap;
  736. flex-direction: column;
  737. }
  738. .m-m-form {
  739. display: flex;
  740. flex-wrap: wrap;
  741. width: 100%;
  742. }
  743. .m-m-formItem {
  744. width: 100%;
  745. height: auto;
  746. display: flex;
  747. flex-direction: column;
  748. align-items: left;
  749. margin-top: 10px;
  750. margin-right: 1.5%;
  751. /* margin-bottom: 10px; */
  752. }
  753. .m-m-fi-input {
  754. max-width: 100%;
  755. }
  756. .m-m-fi-label {
  757. font-size: 16px;
  758. display: flex;
  759. padding-bottom: 5px;
  760. /* justify-content: center; */
  761. /* align-items: center; */
  762. box-sizing: border-box;
  763. /* padding: 0 10px; */
  764. text-wrap: nowrap;
  765. min-width: fit-content;
  766. }
  767. .m-m-formImage {
  768. width: 100%;
  769. height: auto;
  770. margin-bottom: 20px;
  771. display: flex;
  772. justify-content: flex-start;
  773. flex-wrap: wrap;
  774. }
  775. .m-m-fi-imageList {
  776. width: 100%;
  777. height: auto;
  778. display: flex;
  779. flex-wrap: wrap;
  780. }
  781. .m-m-fi-imageItem {
  782. width: auto;
  783. height: auto;
  784. background-color: rgba(238, 238, 238, 1);
  785. width: 140px;
  786. height: 100px;
  787. min-width: 110px !important;
  788. margin-right: 1%;
  789. display: flex;
  790. justify-content: center;
  791. align-items: center;
  792. flex-direction: column;
  793. box-sizing: border-box;
  794. font-size: 14px;
  795. cursor: pointer;
  796. position: relative;
  797. margin-bottom: 10px;
  798. }
  799. .m-m-fi-imageItem > .itemUrl {
  800. width: 100%;
  801. height: 100%;
  802. }
  803. .m-m-fi-imageItem > span {
  804. width: 20px;
  805. height: 20px;
  806. position: absolute;
  807. right: 4px;
  808. top: 4px;
  809. background-image: url("../../../../assets/icon/classroomObservation/delFile.svg");
  810. background-repeat: no-repeat;
  811. background-size: 100% 100%;
  812. display: none;
  813. z-index: 9999;
  814. /* display: flex;
  815. justify-content: flex-end;
  816. align-items: flex-start;
  817. box-sizing: border-box;
  818. padding: 2px 10px;
  819. color: #666666;
  820. font-size: 18px;
  821. background-color: #FFBBBB;
  822. cursor: pointer;
  823. border-radius: 100%;
  824. display: none; */
  825. }
  826. .m-m-fi-imageItem:hover > span {
  827. display: flex;
  828. }
  829. /* .m-m-fi-i-icon {
  830. width: 20px;
  831. height: 20px;
  832. background: url("../../../../assets/icon/classroomObservation/file.png")
  833. no-repeat;
  834. background-size: 100% 100%;
  835. margin-right: 5px;
  836. } */
  837. .m-m-fi-btn {
  838. width: auto;
  839. height: 35px;
  840. box-sizing: border-box;
  841. display: flex;
  842. justify-content: center;
  843. align-items: center;
  844. border-radius: 18px;
  845. font-size: 14px;
  846. border: solid 1px #c5c5c5;
  847. background-color: white;
  848. cursor: pointer;
  849. padding: 0 10px;
  850. }
  851. .fileList{
  852. width: 100%;
  853. position: relative;
  854. display: flex;
  855. }
  856. .fl_img{
  857. width: 50%;
  858. height: auto;
  859. }
  860. .fl_video{
  861. width: 21.8%;
  862. margin-left: 1.6%;
  863. height: auto;
  864. }
  865. .nephogramArea{
  866. width: 20%;
  867. height: auto;
  868. }
  869. .fl_nephogram{
  870. width: 20%;
  871. /* margin-left: 1.5%; */
  872. height: auto;
  873. margin-left: 1%;
  874. /* margin-top: -2%; */
  875. }
  876. .m_m_fi_progress{
  877. width: 100%;
  878. height: 100%;
  879. position: absolute;
  880. display: flex;
  881. flex-direction: column;
  882. justify-content: center;
  883. align-items: center;
  884. /* 加载 */
  885. cursor:wait !important;
  886. background-color: #00000099;
  887. }
  888. .m_m_fi_progress>div:nth-child(1){
  889. font-size: 20px;
  890. color: white;
  891. }
  892. .m_m_fi_progress>span:nth-child(2){
  893. font-size: 16px;
  894. color: #FFFFFF8C;
  895. }
  896. .m_m_fi_p_bar{
  897. width: 100%;
  898. height: 5px;
  899. position: absolute;
  900. bottom: 0;
  901. background-color: #D8E3F7;
  902. }
  903. .m_m_fi_p_bar>div{
  904. background-color: #3975CE;
  905. max-width: 100%;
  906. height: 100%;
  907. }
  908. .m-m-fi-nephogramItem{
  909. width: 140px;
  910. height: 100px;
  911. background-color: rgba(238, 238, 238, 1);
  912. min-width: 140px;
  913. min-height: 100px;
  914. margin-right: 1%;
  915. display: flex;
  916. justify-content: center;
  917. align-items: center;
  918. flex-direction: column;
  919. box-sizing: border-box;
  920. font-size: 14px;
  921. cursor: pointer;
  922. position: relative;
  923. margin-bottom: 10px;
  924. }
  925. .m-m-fi-nephogramItem> .itemUrl {
  926. width: 100%;
  927. height: 100%;
  928. }
  929. .m-m-fi-nephogramItem > span {
  930. width: 20px;
  931. height: 20px;
  932. position: absolute;
  933. right: 4px;
  934. top: 4px;
  935. background-image: url("../../../../assets/icon/classroomObservation/delFile.svg");
  936. background-repeat: no-repeat;
  937. background-size: 100% 100%;
  938. display: none;
  939. z-index: 99999;
  940. /* display: flex;
  941. justify-content: flex-end;
  942. align-items: flex-start;
  943. box-sizing: border-box;
  944. padding: 2px 10px;
  945. color: #666666;
  946. font-size: 18px;
  947. background-color: #FFBBBB;
  948. cursor: pointer;
  949. border-radius: 100%;
  950. display: none; */
  951. }
  952. .m-m-fi-nephogramItem:hover > span {
  953. display: flex;
  954. }
  955. </style>