Grid.vue 43 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632
  1. <template>
  2. <div class="pb_content g_body">
  3. <div>
  4. <el-image
  5. class="coin coin1"
  6. :src="require('../../assets/grid/coin1.png')"
  7. fit="cover"
  8. ></el-image>
  9. <el-image
  10. class="coin coin2"
  11. :src="require('../../assets/grid/coin2.png')"
  12. fit="cover"
  13. ></el-image>
  14. <el-image
  15. class="coin coin3"
  16. :src="require('../../assets/grid/coin3.png')"
  17. fit="cover"
  18. ></el-image>
  19. <el-image
  20. class="coin coin4"
  21. :src="require('../../assets/grid/coin4.png')"
  22. fit="cover"
  23. ></el-image>
  24. </div>
  25. <div class="grid_member">
  26. <!-- <div class="member_imgbox">
  27. <el-image
  28. v-for="item in 4"
  29. :key="item"
  30. class="member_img"
  31. :src="require('../../assets/grid/portal.png')"
  32. fit="cover"
  33. ></el-image>
  34. </div>-->
  35. <el-button type="text" @click="dialogVisible2 = true">邀请成员</el-button>
  36. <!-- <el-button type="text">成员</el-button> -->
  37. <el-button type="text" v-if="RoomInfo.userid == userid" @click="dismiss"
  38. >解散房间</el-button
  39. >
  40. </div>
  41. <draggable
  42. element="div"
  43. v-model="data"
  44. class="g_body"
  45. @change="handleDraggableFormItemChange"
  46. @end="dragEnd"
  47. :move="checkMove"
  48. >
  49. <div
  50. v-for="(item, index) in data"
  51. :key="index"
  52. class="g_box"
  53. @mouseover="pIndex = index"
  54. @mouseleave="pIndex = ''"
  55. @dragstart="handleDragStart($event, index)"
  56. @dragover.prevent="handleDragOver($event, index)"
  57. @dragenter="handleDragEnter($event, index)"
  58. @dragend="handleDragEnd($event, index)"
  59. >
  60. <div
  61. :class="{
  62. 'left-popover': index < 3,
  63. 'right-popover': index == 3,
  64. 'top-popover': index > 3,
  65. visibleO: pIndex === index && item && (item.video || item.photo),
  66. }"
  67. >
  68. <div class="pChild" @click="check(index)">
  69. <el-image
  70. :src="require('../../assets/grid/upload.png')"
  71. fit="cover"
  72. ></el-image>
  73. <span>修改</span>
  74. </div>
  75. <div class="pChild" @click="deleteGrid(index)">
  76. <el-image
  77. :src="require('../../assets/grid/deleteT.png')"
  78. fit="cover"
  79. ></el-image>
  80. <span>删除</span>
  81. </div>
  82. <div class="pChild" @click="check(index, 2)">
  83. <el-image
  84. :src="require('../../assets/grid/edit.png')"
  85. fit="cover"
  86. ></el-image>
  87. <span>添加备注</span>
  88. </div>
  89. </div>
  90. <div class="rrrrbox" v-if="item && item.remarks && !item.photo && !item.video" @click="check(index, 3)">
  91. <div class="Rbox" v-for="(x, y) in item.remarks" :key="y">
  92. <div v-if="x.remarks != ''" style="display: flex">
  93. <el-image
  94. class="Rportal"
  95. :src="require('../../assets/grid/portal.png')"
  96. fit="cover"
  97. ></el-image>
  98. <div class="RContent">
  99. <div>{{ x.username }}</div>
  100. <div>{{ x.remarks }}</div>
  101. </div>
  102. </div>
  103. </div>
  104. </div>
  105. <div
  106. v-else-if="item && item.remarks"
  107. :class="{
  108. 'remark-right-popover': index > 11 && index != 15,
  109. 'remark-left-popover': index == 15,
  110. 'remark-bottom-popover': index < 12,
  111. visibleO: pIndex === index && item && item.remarks,
  112. }"
  113. >
  114. <div class="Rbox" v-for="(x, y) in item.remarks" :key="y">
  115. <div v-if="x.remarks != ''" style="display: flex">
  116. <el-image
  117. class="Rportal"
  118. :src="require('../../assets/grid/portal.png')"
  119. fit="cover"
  120. ></el-image>
  121. <div class="RContent">
  122. <div>{{ x.username }}</div>
  123. <div>{{ x.remarks }}</div>
  124. </div>
  125. </div>
  126. <div v-else-if="x.remarks == '' && y == 0">
  127. {{ x.username }}暂无备注
  128. </div>
  129. </div>
  130. </div>
  131. <el-image
  132. v-if="item && item.photo"
  133. v-viewer
  134. class="photo_img"
  135. :src="item.photo"
  136. fit="cover"
  137. ></el-image>
  138. <video-player
  139. v-else-if="item && item.video"
  140. class="video-player vjs-custom-skin"
  141. ref="videoPlayer"
  142. :playsinline="true"
  143. :options="item.video"
  144. style="width: 85%"
  145. ></video-player>
  146. <el-image
  147. v-else
  148. class="add_img"
  149. :src="require('../../assets/grid/add.png')"
  150. fit="cover"
  151. @click="check(index, 3)"
  152. ></el-image>
  153. </div>
  154. </draggable>
  155. <el-dialog
  156. title="上传文件"
  157. :visible.sync="dialogVisible"
  158. :append-to-body="true"
  159. width="800px"
  160. :before-close="handleClose"
  161. class="look_notice"
  162. >
  163. <div slot="title" class="header-title">
  164. <div class="title_add_student">上传文件</div>
  165. </div>
  166. <div>
  167. <div class="upload_box" v-show="!file.userid || file.userid == userid">
  168. <el-image
  169. class="list_img"
  170. :src="require('../../assets/grid/list.png')"
  171. fit="cover"
  172. ></el-image>
  173. <div class="upload_content">
  174. <div
  175. @click="addEvent($event)"
  176. @mouseover="file.photo ? (deleteVisible1 = true) : ''"
  177. @mouseleave="file.photo ? (deleteVisible1 = false) : ''"
  178. >
  179. <el-image
  180. class="delete_img"
  181. :src="require('../../assets/grid/delete.png')"
  182. fit="cover"
  183. v-if="deleteVisible1"
  184. @click.stop="deleteFile(1)"
  185. ></el-image>
  186. <el-image
  187. class="upload_img"
  188. :src="
  189. file.photo
  190. ? file.photo
  191. : require('../../assets/grid/image.png')
  192. "
  193. fit="cover"
  194. ></el-image>
  195. <input
  196. type="file"
  197. accept="image/*"
  198. capture="camera"
  199. style="display: none"
  200. ref="pathClear1"
  201. @change="beforeUpload($event, 1)"
  202. />
  203. </div>
  204. <div
  205. style="margin-left: 20px"
  206. @click="addEvent($event)"
  207. @mouseover="file.video ? (deleteVisible2 = true) : ''"
  208. @mouseleave="file.video ? (deleteVisible2 = false) : ''"
  209. >
  210. <el-image
  211. class="delete_img"
  212. :src="require('../../assets/grid/delete.png')"
  213. fit="cover"
  214. v-if="deleteVisible2"
  215. @click.stop="deleteFile(2)"
  216. ></el-image>
  217. <el-image
  218. class="upload_img"
  219. :src="
  220. file.video
  221. ? require('../../assets/grid/videoH.png')
  222. : require('../../assets/grid/video.png')
  223. "
  224. fit="cover"
  225. ></el-image>
  226. <input
  227. type="file"
  228. accept="video/mp4, video/quicktime, video/x-msvideo"
  229. capture="camera"
  230. style="display: none"
  231. ref="pathClear2"
  232. @change="beforeUpload($event, 2)"
  233. />
  234. </div>
  235. </div>
  236. </div>
  237. <div class="textarea_box">
  238. <div class="textarea_title">添加描述</div>
  239. <el-input
  240. type="textarea"
  241. v-model="remarks"
  242. placeholder="请输入描述..."
  243. class="textarea_content"
  244. :rows="5"
  245. resize="none"
  246. ></el-input>
  247. </div>
  248. </div>
  249. <span slot="footer" class="dialog-footer">
  250. <el-button class="close" @click="addGrid()" type="primary"
  251. >确定</el-button
  252. >
  253. </span>
  254. </el-dialog>
  255. <el-dialog
  256. title="邀请成员"
  257. :visible.sync="dialogVisible2"
  258. :append-to-body="true"
  259. width="400px"
  260. :before-close="handleClose"
  261. class="look_notice invite_dialog"
  262. >
  263. <div slot="title" class="header-title">
  264. <div class="title_add_student">邀请成员</div>
  265. </div>
  266. <div>
  267. <div class="invite_box">
  268. <div class="invite_title" ref="inviteT">
  269. {{ userinfo ? this.userinfo.name : "用户" }}邀请您参加思维网格
  270. </div>
  271. <div class="line"></div>
  272. <div class="invite_link">
  273. <div ref="invite1">复制链接加入房间:</div>
  274. <div ref="invite2" style="color:#3E8DE6;">https://cloud.cocorobo.cn/</div>
  275. </div>
  276. <div class="invite_num" ref="invite3">
  277. 房间号:
  278. <span style="color:#3E8DE6;">{{ goNum }}</span>
  279. </div>
  280. <div class="invite_num" ref="invite4">
  281. 复制房间号信息,打开思维网格输入即可加入。
  282. </div>
  283. </div>
  284. </div>
  285. <span slot="footer" class="dialog-footer">
  286. <el-button
  287. class="close tag-read"
  288. @click="copy"
  289. type="primary"
  290. :data-clipboard-text="copyText"
  291. >一键复制信息</el-button
  292. >
  293. </span>
  294. </el-dialog>
  295. <el-dialog
  296. title="创建/加入房间"
  297. :visible.sync="dialogVisible3"
  298. :append-to-body="true"
  299. width="400px"
  300. :before-close="handleClose2"
  301. class="look_notice invite_dialog room_dialog"
  302. >
  303. <div slot="title" class="header-title">
  304. <div class="title_add_student">创建/加入房间</div>
  305. </div>
  306. <div class="addRoom_box">
  307. <div>
  308. <el-input
  309. v-model="goNum"
  310. placeholder="请输入要加入的房间号"
  311. ></el-input>
  312. <div class="room_b">
  313. 备注:输入房间号点击加入房间或点击创建房间直接创建房间
  314. </div>
  315. <div class="room_btn">
  316. <el-button class="roomBtn" type="primary" @click="goRoom(goNum)"
  317. >加入房间</el-button
  318. >
  319. <el-button class="roomBtn" type="primary" @click="checkNum"
  320. >创建房间</el-button
  321. >
  322. </div>
  323. </div>
  324. </div>
  325. </el-dialog>
  326. <div v-if="proVisible" class="mask">
  327. <div class="progressBox">
  328. <div class="lbox">
  329. <img :src="require('../../assets/loading.gif')" />上传中,请稍后
  330. </div>
  331. <el-progress
  332. :text-inside="true"
  333. :stroke-width="20"
  334. :percentage="progress"
  335. style="width: 80%"
  336. ></el-progress>
  337. </div>
  338. </div>
  339. </div>
  340. </template>
  341. <script>
  342. import Clipboard from "clipboard";
  343. import draggable from "vuedraggable";
  344. export default {
  345. components: {
  346. //调用组件
  347. draggable,
  348. },
  349. data() {
  350. return {
  351. timer: null,
  352. userinfo: [],
  353. RoomInfo: [],
  354. copyText: "",
  355. userid: this.$route.query.userid,
  356. data: [],
  357. dialogVisible: false,
  358. dialogVisible2: false,
  359. dialogVisible3: true,
  360. deleteVisible1: false,
  361. deleteVisible2: false,
  362. dialogImgVisible: false,
  363. dialogImageUrl: "",
  364. remarks: "",
  365. goNum: this.$route.query.goNum ? this.$route.query.goNum : "",
  366. numNum: "",
  367. file: {},
  368. gIndex: "",
  369. pIndex: "",
  370. proVisible: false,
  371. progress: 0,
  372. playerOptions: {
  373. playbackRates: [0.7, 1.0, 1.5, 2.0], //播放速度
  374. autoplay: false, //如果true,浏览器准备好时开始回放。
  375. muted: false, // 默认情况下将会消除任何音频。
  376. loop: false, // 导致视频一结束就重新开始。
  377. preload: "auto", // 建议浏览器在<video>加载元素后是否应该开始下载视频数据。auto浏览器选择最佳行为,立即开始加载视频(如果浏览器支持)
  378. language: "zh-CN",
  379. aspectRatio: "16:9", // 将播放器置于流畅模式,并在计算播放器的动态大小时使用该值。值应该代表一个比例 - 用冒号分隔的两个数字(例如"16:9"或"4:3")
  380. fluid: true, // 当true时,Video.js player将拥有流体大小。换句话说,它将按比例缩放以适应其容器。
  381. sources: [
  382. {
  383. type: "video/mp4", //这里的种类支持很多种:基本视频格式、直播、流媒体等,具体可以参看git网址项目 || "video/ogg"|| "video/webm"
  384. src: "", //url地址require("../../assets/media/aaa.mp4")
  385. },
  386. ],
  387. // poster: require("../../assets/tu31.png"), //你的封面地址
  388. // poster: dataRes.imgUrl, //你的封面地址
  389. notSupportedMessage: "此视频暂无法播放,请稍后再试", //允许覆盖Video.js无法播放媒体源时显示的默认信息。
  390. controlBar: {
  391. timeDivider: true, //当前时间和持续时间的分隔符
  392. durationDisplay: true, //显示持续时间
  393. remainingTimeDisplay: false, //是否显示剩余时间功能
  394. fullscreenToggle: true, //全屏按钮
  395. },
  396. },
  397. playerO: {},
  398. dragging: null,
  399. draggingE: null,
  400. };
  401. },
  402. methods: {
  403. handleDragStart(e, items) {
  404. this.dragging = items; //开始拖动时,暂时保存当前拖动的数据。
  405. if (!this.data[items]) {
  406. return;
  407. }
  408. },
  409. handleDragEnd(e, items) {
  410. if (!this.data[this.dragging]) {
  411. return;
  412. }
  413. e.dataTransfer.effectAllowed = "move"; //为需要移动的元素设置dragstart事件
  414. if (this.draggingE == this.dragging) return;
  415. var newItems = [...JSON.parse(JSON.stringify(this.data))]; //拷贝一份数据进行交换操作。
  416. var src = newItems[this.dragging]; //获取数组下标
  417. var dst = newItems[this.draggingE];
  418. // newItems[this.dragging] = dst;
  419. // newItems[this.draggingE] = src;
  420. // // newItems2.splice(dst, 0, ...newItems.splice(src, 1)); //交换位置
  421. // this.data = newItems;
  422. this.data[this.dragging] = dst;
  423. this.data[this.draggingE] = src;
  424. let mindinfo = this.mindInfo2(
  425. this.dragging,
  426. "move",
  427. dst,
  428. "us.mindNetwork",
  429. this.userinfo ? this.userinfo.userid : this.userid,
  430. this.RoomInfo.id,
  431. this.draggingE,
  432. src
  433. );
  434. this.updateSocket(mindinfo);
  435. this.updateRoomData();
  436. this.dragging = null; //拖动结束后,清除数据
  437. this.draggingE = null;
  438. },
  439. handleDragOver(e) {
  440. e.dataTransfer.dropEffect = "move"; //在dragenter中针对放置目标来设置!
  441. },
  442. handleDragEnter(e, items) {
  443. this.draggingE = items;
  444. e.dataTransfer.effectAllowed = "move"; //为需要移动的元素设置dragstart事件
  445. // if (items == this.dragging) return;
  446. // var newItems = [...JSON.parse(JSON.stringify(this.data))]; //拷贝一份数据进行交换操作。
  447. // var src = this.dragging; //获取数组下标
  448. // var dst = items;
  449. // newItems.splice(dst, 0, ...newItems.splice(src, 1)); //交换位置
  450. // this.data = newItems;
  451. // this.updateRoomData();
  452. },
  453. handleDraggableFormItemChange(val) {
  454. // console.log(val);
  455. // console.log(this.data[val.moved.newIndex]);
  456. // console.log(this.data[val.moved.oldIndex]);
  457. },
  458. dragEnd(val) {
  459. // if (this.data[val.newIndex].userid != this.userinfo.userid) {
  460. // this.$message.error("不是您上传的作品不能拖动哦");
  461. // return;
  462. // }
  463. // this.updateRoomData();
  464. },
  465. checkMove(evt) {
  466. // console.log(evt);
  467. // if (evt.draggedContext.element.userid != this.userinfo.userid) {
  468. // return false;
  469. // } else {
  470. // return true;
  471. // }
  472. return false;
  473. },
  474. copy() {
  475. this.copyText =
  476. this.$refs.inviteT.innerHTML +
  477. "\n" +
  478. this.$refs.invite1.innerHTML +
  479. "\n" +
  480. this.$refs.invite2.innerHTML +
  481. "\n" +
  482. this.$refs.invite3.innerText +
  483. "\n" +
  484. this.$refs.invite4.innerHTML;
  485. var clipboard = new Clipboard(".tag-read");
  486. clipboard.on("success", (e) => {
  487. this.$message.success("复制成功");
  488. console.log("复制成功");
  489. clipboard.destroy(); // 释放内存
  490. });
  491. clipboard.on("error", (e) => {
  492. console.log("不支持复制,该浏览器不支持自动复制");
  493. clipboard.destroy(); // 释放内存
  494. });
  495. },
  496. handleClose(done) {
  497. this.restart();
  498. done();
  499. },
  500. handleClose2(done) {
  501. // done();
  502. },
  503. restart() {
  504. this.file = {};
  505. this.gIndex = "";
  506. this.remarks = "";
  507. if (this.$refs.pathClear1) {
  508. this.$refs.pathClear1.value = "";
  509. this.$refs.pathClear2.value = "";
  510. }
  511. },
  512. deleteGrid(index) {
  513. if (this.data[index].userid != this.userid) {
  514. this.$message.error("你不是上传人无权限删除");
  515. return;
  516. }
  517. this.$confirm("确定删除吗?", "提示", {
  518. confirmButtonText: "确定",
  519. cancelButtonText: "取消",
  520. type: "warning",
  521. })
  522. .then(() => {
  523. this.data[index] = "";
  524. let mindinfo = this.mindInfo(
  525. index,
  526. "delete",
  527. this.data[index],
  528. "us.mindNetwork",
  529. this.userinfo ? this.userinfo.userid : this.userid,
  530. this.RoomInfo.id,
  531. ""
  532. );
  533. this.updateSocket(mindinfo);
  534. this.updateRoomData();
  535. this.$forceUpdate();
  536. })
  537. .catch(() => {});
  538. },
  539. updateRoomData() {
  540. let params = [
  541. {
  542. data: JSON.stringify(this.data),
  543. idL: this.RoomInfo.id,
  544. },
  545. ];
  546. this.ajax
  547. .post(this.$store.state.api + "updateRoomData", params)
  548. .then((res) => {})
  549. .catch((err) => {});
  550. },
  551. check(index, type) {
  552. this.gIndex = index;
  553. if (this.data[index].userid != this.userid && type != 2 && type != 3) {
  554. this.$message.error("你不是上传人无权限修改");
  555. return;
  556. }
  557. if (this.data[index] && this.data[index].userid == this.userid) {
  558. if (this.data[index].userid != this.userid) {
  559. this.$message.error("你不是上传人无权限修改");
  560. return;
  561. }
  562. this.file = {
  563. photo: this.data[index].photo,
  564. userid: this.data[index].userid,
  565. video:
  566. this.data[index].video &&
  567. this.data[index].video.sources &&
  568. this.data[index].video.sources[0].src,
  569. };
  570. this.remarks = this.data[index].remarks[0].remarks;
  571. } else if (this.data[index] && type == 2) {
  572. this.file = {
  573. userid: this.data[index].userid,
  574. };
  575. for (var i = 0; i < this.data[index].remarks.length; i++) {
  576. if (this.data[index].remarks[i].userid == this.userid) {
  577. this.remarks = this.data[index].remarks[i].remarks;
  578. break;
  579. }
  580. }
  581. this.remarks = this.remarks ? this.remarks : "";
  582. }
  583. this.dialogVisible = true;
  584. },
  585. addEvent(e) {
  586. var el = e.currentTarget;
  587. el.getElementsByTagName("input")[0].click();
  588. },
  589. deleteFile(type) {
  590. if (type == 1) {
  591. this.file.photo = "";
  592. this.deleteVisible1 = false;
  593. this.$refs.pathClear1.value = "";
  594. } else {
  595. this.file.video = "";
  596. this.deleteVisible2 = false;
  597. this.$refs.pathClear2.value = "";
  598. }
  599. this.$forceUpdate();
  600. },
  601. addGrid() {
  602. if (!this.file.userid || this.file.userid == this.userid) {
  603. if (!this.file.video && !this.file.photo && this.remarks == "") {
  604. this.$message.error("至少上传一个视频、一张图片或者备注");
  605. return;
  606. }
  607. if (!this.data[this.gIndex]) {
  608. this.data[this.gIndex] = {};
  609. }
  610. if (this.file.photo) {
  611. this.data[this.gIndex].photo = this.file.photo;
  612. } else if (this.file.video) {
  613. // this.playerOptions.sources[0].src = ""
  614. var video = JSON.parse(JSON.stringify(this.playerOptions));
  615. video.sources[0].src = this.file.video;
  616. this.data[this.gIndex].video = video;
  617. }
  618. if (this.data[this.gIndex].remarks) {
  619. this.data[this.gIndex].remarks[0] = {
  620. remarks: this.remarks,
  621. userid: this.userinfo ? this.userinfo.userid : this.userid,
  622. username: this.userinfo ? this.userinfo.name : "用户",
  623. };
  624. } else {
  625. this.data[this.gIndex].remarks = [
  626. {
  627. remarks: this.remarks,
  628. userid: this.userinfo ? this.userinfo.userid : this.userid,
  629. username: this.userinfo ? this.userinfo.name : "用户",
  630. },
  631. ];
  632. }
  633. this.data[this.gIndex].userid = this.userinfo
  634. ? this.userinfo.userid
  635. : this.userid;
  636. } else {
  637. if (!this.remarks) {
  638. this.$message.error("备注不能为空");
  639. return;
  640. }
  641. var a = 0;
  642. for (var i = 0; i < this.data[this.gIndex].remarks.length; i++) {
  643. if (this.data[this.gIndex].remarks[i].userid == this.userid) {
  644. a++;
  645. this.data[this.gIndex].remarks[i] = {
  646. remarks: this.remarks,
  647. userid: this.userinfo ? this.userinfo.userid : this.userid,
  648. username: this.userinfo ? this.userinfo.name : "用户",
  649. };
  650. break;
  651. }
  652. }
  653. if (a < 1) {
  654. this.data[this.gIndex].remarks.push({
  655. remarks: this.remarks,
  656. userid: this.userinfo ? this.userinfo.userid : this.userid,
  657. username: this.userinfo ? this.userinfo.name : "用户",
  658. });
  659. }
  660. }
  661. let mindinfo = this.mindInfo(
  662. this.gIndex,
  663. "update",
  664. this.data[this.gIndex],
  665. "us.mindNetwork",
  666. this.userinfo ? this.userinfo.userid : this.userid,
  667. this.RoomInfo.id,
  668. ""
  669. );
  670. this.updateSocket(mindinfo);
  671. this.updateRoomData();
  672. this.dialogVisible = false;
  673. this.$forceUpdate();
  674. this.restart();
  675. },
  676. beforeUpload(event, type) {
  677. // debugger;
  678. if (this.file.photo && type != 1) {
  679. this.$message.error("只能上传一个视频或者一张图片");
  680. this.$refs.pathClear2.value = "";
  681. return;
  682. } else if (this.file.video && type != 2) {
  683. this.$message.error("只能上传一个视频或者一张图片");
  684. this.$refs.pathClear1.value = "";
  685. return;
  686. }
  687. var file = event.target.files[0];
  688. var credentials = {
  689. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  690. secretAccessKey: "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",
  691. }; //秘钥形式的登录上传
  692. window.AWS.config.update(credentials);
  693. window.AWS.config.region = "cn-northwest-1"; //设置区域
  694. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  695. var _this = this;
  696. if (type == 1) {
  697. var mediaFormatList = ["png", "jpg", "jpeg"];
  698. if (
  699. mediaFormatList.indexOf(
  700. file.name
  701. .split(".")
  702. [file.name.split(".").length - 1].toLocaleLowerCase()
  703. ) == "-1"
  704. ) {
  705. _this.$message.error("请上传jpg或者png的图片格式文件");
  706. return;
  707. }
  708. } else {
  709. var mediaFormatList = ["mp4"];
  710. if (
  711. mediaFormatList.indexOf(
  712. file.name
  713. .split(".")
  714. [file.name.split(".").length - 1].toLocaleLowerCase()
  715. ) == "-1"
  716. ) {
  717. _this.$message.error("请上传mp4视频格式文件");
  718. return;
  719. }
  720. }
  721. _this.progress = 0;
  722. _this.proVisible = true;
  723. if (file) {
  724. var params = {
  725. Key:
  726. file.name.split(".")[0] +
  727. new Date().getTime() +
  728. "." +
  729. file.name.split(".")[file.name.split(".").length-1],
  730. ContentType: file.type,
  731. Body: file,
  732. "Access-Control-Allow-Credentials": "*",
  733. ACL: "public-read",
  734. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  735. var options = {
  736. partSize: 2048 * 1024 * 1024,
  737. queueSize: 2,
  738. leavePartsOnError: true,
  739. };
  740. bucket
  741. .upload(params, options)
  742. .on("httpUploadProgress", function (evt) {
  743. //这里可以写进度条
  744. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  745. _this.progress = parseInt((evt.loaded * 80) / evt.total);
  746. })
  747. .send(function (err, data) {
  748. _this.progress = 100;
  749. setTimeout(() => {
  750. _this.proVisible = false;
  751. }, 1000);
  752. if (err) {
  753. _this.$message.error("上传失败");
  754. } else {
  755. if (type == 1) {
  756. _this.file.photo = data.Location;
  757. } else {
  758. _this.file.video = data.Location;
  759. }
  760. _this.$forceUpdate();
  761. console.log(data.Location);
  762. }
  763. });
  764. }
  765. },
  766. getUser() {
  767. let params = { uid: this.userid };
  768. this.ajax
  769. .get(this.$store.state.api + "getUser", params)
  770. .then((res) => {
  771. this.userinfo = res.data[0][0];
  772. if(this.goNum != ""){
  773. this.goRoom(this.goNum);
  774. }else{
  775. this.checkNum();
  776. }
  777. console.log(res.data[0][0]);
  778. })
  779. .catch((err) => {
  780. console.error(err);
  781. });
  782. },
  783. MathRand() {
  784. var Num = "";
  785. for (var i = 0; i < 6; i++) {
  786. Num += Math.floor(Math.random() * 10);
  787. }
  788. return Num;
  789. },
  790. checkNum() {
  791. this.numNum = this.MathRand();
  792. this.goNum = this.numNum;
  793. let params = {
  794. num: this.numNum,
  795. };
  796. this.ajax
  797. .get(this.$store.state.api + "checkRoomNum", params)
  798. .then((res) => {
  799. console.log(res.data[0].length);
  800. if (res.data[0].length) {
  801. this.checkNum();
  802. } else {
  803. this.addRoom();
  804. }
  805. })
  806. .catch((err) => {
  807. console.error(err);
  808. });
  809. },
  810. addRoom() {
  811. let params = [
  812. {
  813. uid: this.userid,
  814. n: this.numNum,
  815. d: JSON.stringify(this.data),
  816. },
  817. ];
  818. this.ajax
  819. .post(this.$store.state.api + "insertRoom", params)
  820. .then((res) => {
  821. this.$message.success("创建成功");
  822. this.getRoom(res.data[0][0].fid);
  823. })
  824. .catch((err) => {
  825. this.$message.error("创建失败");
  826. console.error(err);
  827. });
  828. },
  829. getRoom(fid) {
  830. let params = {
  831. fid: fid,
  832. };
  833. this.ajax
  834. .get(this.$store.state.api + "getRoom", params)
  835. .then((res) => {
  836. if (res.data[0].length) {
  837. // this.RoomInfo = res.data[0][0];
  838. this.data = JSON.parse(res.data[0][0].data);
  839. this.dialogVisible3 = false;
  840. // this.dialogVisible2 = true;//邀请弹窗
  841. // this.getMindNetwork(res.data[0][0].id, this.userinfo.userid);
  842. // this.data.splice(0,1)
  843. // this.updateRoomData()
  844. // this.timer = setInterval(() => {
  845. // this.selectRoom2(uid);
  846. // }, 5000);
  847. } else {
  848. // this.$message.error("此房间不存在或已被解散");
  849. }
  850. })
  851. .catch((err) => {
  852. console.error(err);
  853. });
  854. },
  855. selectRoom(uid) {
  856. let params = {
  857. uid: uid,
  858. };
  859. this.ajax
  860. .get(this.$store.state.api + "selectRoom", params)
  861. .then((res) => {
  862. if (res.data[0].length) {
  863. // this.RoomInfo = res.data[0][0];
  864. // this.data = JSON.parse(res.data[0][0].data);
  865. // this.dialogVisible3 = false;
  866. // this.dialogVisible2 = true;
  867. this.getMindNetwork(res.data[0][0].id, this.userinfo.userid);
  868. // this.data.splice(0,1)
  869. // this.updateRoomData()
  870. // this.timer = setInterval(() => {
  871. // this.selectRoom2(uid);
  872. // }, 5000);
  873. } else {
  874. // this.$message.error("此房间不存在或已被解散");
  875. }
  876. })
  877. .catch((err) => {
  878. console.error(err);
  879. });
  880. },
  881. goRoom(uid) {
  882. let params = {
  883. uid: uid,
  884. };
  885. this.ajax
  886. .get(this.$store.state.api + "selectRoom", params)
  887. .then((res) => {
  888. if (res.data[0].length) {
  889. this.$message.success("加入成功");
  890. // this.RoomInfo = res.data[0][0];
  891. this.data = JSON.parse(res.data[0][0].data);
  892. this.dialogVisible3 = false;
  893. // this.dialogVisible2 = true;//邀请弹窗
  894. // this.getMindNetwork(res.data[0][0].id, this.userinfo.userid);
  895. // this.timer = setInterval(() => {
  896. // this.selectRoom2(uid);
  897. // }, 5000);
  898. } else {
  899. this.$message.error("此房间不存在或已被解散");
  900. }
  901. })
  902. .catch((err) => {
  903. console.error(err);
  904. });
  905. },
  906. selectRoom2(uid) {
  907. let params = {
  908. uid: uid,
  909. };
  910. this.ajax
  911. .get(this.$store.state.api + "selectRoom", params)
  912. .then((res) => {
  913. this.RoomInfo = res.data[0][0];
  914. this.data = JSON.parse(res.data[0][0].data);
  915. })
  916. .catch((err) => {
  917. console.error(err);
  918. });
  919. },
  920. dismiss() {
  921. this.$confirm("确定解散房间吗?", "提示", {
  922. confirmButtonText: "确定",
  923. cancelButtonText: "取消",
  924. type: "warning",
  925. })
  926. .then(() => {
  927. let params = [
  928. {
  929. id: this.RoomInfo.id,
  930. },
  931. ];
  932. this.ajax
  933. .post(this.$store.state.api + "dismiss", params)
  934. .then((res) => {
  935. this.$message.success("解散成功");
  936. this.$router.go(0);
  937. })
  938. .catch((err) => {
  939. console.error(err);
  940. });
  941. })
  942. .catch(() => {});
  943. },
  944. /*
  945. * mind 消息类
  946. * 参数一 : 第几个网格
  947. * 参数二 : type 操作类型
  948. * 参数三 : content 行内容
  949. * 参数四 : next 下一行
  950. */
  951. // messageInfo: {
  952. // sendId: userid,
  953. // moveIndex1: id, //第几个网格
  954. // moveIndex2: moveIndex, //移动到的网格
  955. // type: type, //类型
  956. // data: content, //内容
  957. // docId: roomid, //文档id
  958. // // pageId: US.pageId, //当前页面id
  959. // },
  960. mindInfo(id, type, content, navid, userid, roomid, moveIndex) {
  961. var _data = {
  962. "us.mindNetwork": [
  963. {
  964. sendId: userid, //发送人id
  965. receiveId: roomid, //文件id
  966. type: navid, //消息类型
  967. messageInfo: {
  968. id: id, //操作ID
  969. type: type, //类型
  970. content: content, //内容
  971. docId: roomid, //文档id
  972. pageId: top.US.pageId, //当前页面id
  973. },
  974. },
  975. ],
  976. };
  977. return _data;
  978. },
  979. mindInfo2(id, type, content, navid, userid, roomid, moveIndex, moveData) {
  980. var _data = {
  981. "us.mindNetwork": [
  982. {
  983. sendId: userid, //发送人id
  984. receiveId: roomid, //文件id
  985. type: navid, //消息类型
  986. messageInfo: {
  987. id: id, //操作ID
  988. type: type, //类型
  989. content: content, //内容
  990. docId: roomid, //文档id
  991. pageId: top.US.pageId, //当前页面id
  992. },
  993. },
  994. {
  995. sendId: userid, //发送人id
  996. receiveId: roomid, //文件id
  997. type: navid, //消息类型
  998. messageInfo: {
  999. id: moveIndex, //操作ID
  1000. type: type, //类型
  1001. content: moveData, //内容
  1002. docId: roomid, //文档id
  1003. pageId: top.US.pageId, //当前页面id
  1004. },
  1005. },
  1006. ],
  1007. };
  1008. return _data;
  1009. },
  1010. updateSocket(mindinfo) {
  1011. let params = [
  1012. {
  1013. type: "send",
  1014. mindinfo: encodeURIComponent(
  1015. encodeURIComponent(JSON.stringify(mindinfo))
  1016. ),
  1017. post: 1,
  1018. },
  1019. ];
  1020. this.ajax
  1021. .post(this.$store.state.socket, params)
  1022. .then((res) => {
  1023. console.log(res);
  1024. })
  1025. .catch((err) => {
  1026. console.error(err);
  1027. });
  1028. },
  1029. getMindNetwork(id, uid) {
  1030. let params = [
  1031. {
  1032. type: "getMindNetwork",
  1033. docid: id,
  1034. pageid: window.parent.US.pageId,
  1035. userid: uid,
  1036. post: "1",
  1037. },
  1038. ];
  1039. this.ajax
  1040. .post(this.$store.state.socket, params)
  1041. .then((res) => {
  1042. if (res.data[0].length) {
  1043. this.RoomInfo = res.data[0][0];
  1044. try {
  1045. this.data = JSON.parse(res.data[0][0].data);
  1046. } catch (error) {
  1047. this.data = res.data[0][0].data;
  1048. }
  1049. this.dialogVisible3 = false;
  1050. // this.dialogVisible2 = true;//邀请弹窗
  1051. }
  1052. console.log(res);
  1053. })
  1054. .catch((err) => {
  1055. console.error(err);
  1056. });
  1057. },
  1058. },
  1059. beforeDestroy() {
  1060. // clearInterval(this.timer);
  1061. window.removeEventListener("message");
  1062. },
  1063. created() {
  1064. document.domain = "cocorobo.cn";
  1065. // window.parent.postMessage({ cid: cid, type: "U.MD.O.P.pollingAsyn" }, "*");
  1066. for (var i = 0; i < 16; i++) {
  1067. this.data.push("");
  1068. }
  1069. this.getUser();
  1070. let _this = this;
  1071. window.addEventListener("message", function (e) {
  1072. // 监听 message 事件
  1073. if (
  1074. e.data.type &&
  1075. e.data.type == "mindNetwork_update" &&
  1076. e.data.info.docId == _this.RoomInfo.id &&
  1077. !(e.data.sendId == _this.userinfo.userid)
  1078. ) {
  1079. _this.data[e.data.info.id] = e.data.info.content;
  1080. } else if (
  1081. e.data.type &&
  1082. e.data.type == "mindNetwork_delete" &&
  1083. e.data.info.docId == _this.RoomInfo.id &&
  1084. !(e.data.sendId == _this.userinfo.userid)
  1085. ) {
  1086. _this.data[e.data.info.id] = "";
  1087. } else if (
  1088. e.data.type &&
  1089. e.data.type == "mindNetwork_move" &&
  1090. e.data.info.docId == _this.RoomInfo.id &&
  1091. !(e.data.sendId == _this.userinfo.userid)
  1092. ) {
  1093. _this.data[e.data.info.id] = e.data.info.content;
  1094. // var newItems = [...JSON.parse(JSON.stringify(_this.data))]; //拷贝一份数据进行交换操作。
  1095. // _this.data[e.data.info.id] = newItems[e.data.info.moveIndex2];
  1096. // _this.data[e.data.info.moveIndex2] = newItems[e.data.info.moveIndex1];
  1097. }
  1098. _this.$forceUpdate();
  1099. });
  1100. },
  1101. };
  1102. </script>
  1103. <style scoped>
  1104. .g_body {
  1105. width: 100%;
  1106. height: 100%;
  1107. background: #fff;
  1108. border-radius: 5px;
  1109. display: flex;
  1110. align-items: center;
  1111. justify-content: center;
  1112. flex-wrap: wrap;
  1113. position: relative;
  1114. min-height: 750px;
  1115. }
  1116. .coin {
  1117. position: absolute;
  1118. width: 50px;
  1119. z-index: 1;
  1120. user-select: none;
  1121. }
  1122. .coin1 {
  1123. top: 10px;
  1124. left: 20px;
  1125. }
  1126. .coin2 {
  1127. top: 10px;
  1128. right: 20px;
  1129. }
  1130. .coin3 {
  1131. bottom: 10px;
  1132. left: 20px;
  1133. }
  1134. .coin4 {
  1135. bottom: 10px;
  1136. right: 20px;
  1137. }
  1138. .g_box {
  1139. background: rgb(227 228 232);
  1140. width: calc(100% / 4 - 15px);
  1141. height: calc(100% / 4 - 15px);
  1142. margin: 5px;
  1143. border-radius: 5px;
  1144. cursor: pointer;
  1145. display: flex;
  1146. align-items: center;
  1147. justify-content: center;
  1148. /* overflow: hidden; */
  1149. position: relative;
  1150. user-select: none;
  1151. }
  1152. .photo_img {
  1153. width: 100%;
  1154. height: 100%;
  1155. border-radius: 5px;
  1156. }
  1157. .g_box .add_img {
  1158. width: 100px;
  1159. display: none;
  1160. }
  1161. .g_box:hover .add_img {
  1162. display: block;
  1163. }
  1164. .look_notice >>> .el-dialog__header {
  1165. padding: 10px 20px;
  1166. text-align: center;
  1167. background: #32455b;
  1168. }
  1169. .look_notice >>> .el-dialog__title {
  1170. font-size: 14px !important;
  1171. color: #fff !important;
  1172. }
  1173. .look_notice >>> .el-dialog__headerbtn {
  1174. font-size: 20px !important;
  1175. top: 10px;
  1176. }
  1177. .look_notice >>> .el-form-item__label {
  1178. margin-left: 65px;
  1179. }
  1180. .look_notice >>> .el-form-item {
  1181. display: flex;
  1182. }
  1183. .look_notice >>> .el-form-item__content {
  1184. margin: 0 !important;
  1185. }
  1186. .look_notice >>> .el-dialog__footer {
  1187. text-align: center !important;
  1188. }
  1189. .look_notice >>> .el-dialog {
  1190. min-width: 450px;
  1191. background: #f3f3f3;
  1192. }
  1193. .notice_content {
  1194. width: 100%;
  1195. word-wrap: break-word;
  1196. word-break: break-all;
  1197. overflow: hidden;
  1198. font-size: 18px;
  1199. line-height: 35px;
  1200. text-indent: 35px;
  1201. min-width: 385px;
  1202. }
  1203. .roomBtn {
  1204. background: rgb(112 183 79);
  1205. /* padding: 0 !important; */
  1206. border: none;
  1207. }
  1208. .close {
  1209. width: 150px;
  1210. height: 40px;
  1211. border-radius: 30px;
  1212. line-height: 30px;
  1213. font-size: 14px;
  1214. background: rgb(112 183 79);
  1215. padding: 0 !important;
  1216. border: none;
  1217. }
  1218. .header-title {
  1219. display: flex;
  1220. }
  1221. .logoImg {
  1222. width: 30px;
  1223. }
  1224. .logoImg > img {
  1225. width: 100%;
  1226. height: 100%;
  1227. }
  1228. .title_add_student {
  1229. /* margin: 0 auto; */
  1230. color: #fff;
  1231. }
  1232. .grid_member {
  1233. position: absolute;
  1234. background: #fff;
  1235. right: 70px;
  1236. top: 18px;
  1237. /* min-width: 320px; */
  1238. height: 50px;
  1239. border-radius: 5px;
  1240. padding: 0 10px;
  1241. display: flex;
  1242. align-items: center;
  1243. z-index: 1;
  1244. user-select: none;
  1245. }
  1246. .member_imgbox {
  1247. display: flex;
  1248. align-items: center;
  1249. margin: 0 10px;
  1250. width: 185px;
  1251. }
  1252. .member_img {
  1253. height: 40px;
  1254. width: 40px;
  1255. border-radius: 50px;
  1256. overflow: hidden;
  1257. display: block;
  1258. background: aliceblue;
  1259. }
  1260. .member_img + .member_img {
  1261. margin-left: 8px;
  1262. }
  1263. .upload_box {
  1264. border-radius: 5px;
  1265. background: #fff;
  1266. position: relative;
  1267. }
  1268. .upload_box .list_img {
  1269. position: absolute;
  1270. top: 10px;
  1271. left: 10px;
  1272. }
  1273. .upload_box .upload_content {
  1274. display: flex;
  1275. align-items: center;
  1276. justify-content: center;
  1277. padding: 50px 0 20px;
  1278. }
  1279. .upload_box .upload_content div {
  1280. display: flex;
  1281. align-items: center;
  1282. justify-content: center;
  1283. cursor: pointer;
  1284. position: relative;
  1285. }
  1286. .delete_img {
  1287. position: absolute !important;
  1288. width: 25px;
  1289. transform: translate(50%, -50%);
  1290. top: 0;
  1291. z-index: 1;
  1292. right: 0;
  1293. }
  1294. .upload_img {
  1295. width: 306px;
  1296. height: 206px;
  1297. }
  1298. .textarea_box {
  1299. background: #fff;
  1300. margin-top: 20px;
  1301. display: flex;
  1302. flex-direction: column;
  1303. align-items: center;
  1304. padding: 20px 0;
  1305. }
  1306. .textarea_title {
  1307. width: 95%;
  1308. margin: 0 auto;
  1309. font-size: 16px;
  1310. }
  1311. .textarea_content {
  1312. width: 95%;
  1313. margin: 10px auto 0;
  1314. border-radius: 10px;
  1315. }
  1316. .textarea_content >>> .el-textarea__inner {
  1317. background: rgb(243, 243, 243);
  1318. border: none;
  1319. }
  1320. .invite_dialog >>> .el-dialog__body {
  1321. padding: 15px 20px;
  1322. }
  1323. .room_dialog >>> .el-dialog {
  1324. margin-top: 50vh !important;
  1325. transform: translateY(-50%);
  1326. min-width: unset;
  1327. }
  1328. .invite_box {
  1329. font-size: 16px;
  1330. background: #fff;
  1331. border-radius: 5px;
  1332. padding: 30px 0 150px;
  1333. }
  1334. .invite_title {
  1335. width: 90%;
  1336. margin: 0 auto 20px;
  1337. }
  1338. .line {
  1339. width: 95%;
  1340. border-top: 1px solid rgb(230, 230, 230);
  1341. margin: 0 auto;
  1342. }
  1343. .invite_link {
  1344. width: 90%;
  1345. margin: 20px auto 30px;
  1346. }
  1347. .invite_link div + div {
  1348. margin-top: 15px;
  1349. }
  1350. .invite_num {
  1351. width: 90%;
  1352. margin: 0 auto 50px;
  1353. }
  1354. .invite_num span {
  1355. color: rgb(112 183 79);
  1356. font-size: 28px;
  1357. }
  1358. .addRoom_box {
  1359. background: #fff;
  1360. padding: 30px 20px;
  1361. border-radius: 5px;
  1362. }
  1363. .room_b {
  1364. margin: 5px 0 30px;
  1365. /* width:300px; */
  1366. }
  1367. .room_btn {
  1368. display: flex;
  1369. justify-content: space-around;
  1370. }
  1371. .mask {
  1372. background-color: rgba(0, 0, 0, 0);
  1373. position: fixed;
  1374. top: 0;
  1375. left: 0;
  1376. width: 100%;
  1377. height: 100%;
  1378. z-index: 20000;
  1379. display: flex;
  1380. align-items: center;
  1381. justify-content: center;
  1382. }
  1383. .progressBox {
  1384. width: 500px;
  1385. height: 180px;
  1386. background: #fff;
  1387. border-radius: 10px;
  1388. box-shadow: 0 0 6px 1px #bfbfbf;
  1389. display: flex;
  1390. align-items: center;
  1391. justify-content: center;
  1392. flex-direction: column;
  1393. }
  1394. .progressBox .lbox {
  1395. height: 100px;
  1396. font-size: 19px;
  1397. display: flex;
  1398. align-items: center;
  1399. }
  1400. .progressBox .lbox img {
  1401. width: 40px;
  1402. margin-right: 20px;
  1403. }
  1404. .progressBox >>> .el-progress-bar__outer {
  1405. background-color: #d1dfff !important;
  1406. }
  1407. .top-popover {
  1408. position: absolute;
  1409. top: -50px;
  1410. left: 0;
  1411. background: #fff;
  1412. display: flex;
  1413. height: 45px;
  1414. align-items: center;
  1415. padding: 0px 10px 0 20px;
  1416. border-radius: 5px;
  1417. box-shadow: 0 1px 3px 1px rgb(202, 202, 202);
  1418. z-index: 10;
  1419. transition: 0.5s all;
  1420. opacity: 0;
  1421. visibility: hidden;
  1422. }
  1423. .top-popover .pChild {
  1424. display: flex;
  1425. align-items: center;
  1426. }
  1427. .top-popover .pChild + .pChild {
  1428. margin-left: 10px;
  1429. }
  1430. .left-popover {
  1431. position: absolute;
  1432. top: 0px;
  1433. right: -65px;
  1434. background: #fff;
  1435. display: flex;
  1436. width: 45px;
  1437. align-items: center;
  1438. padding: 10px 5px 20px;
  1439. border-radius: 5px;
  1440. box-shadow: 0 1px 3px 1px rgb(202, 202, 202);
  1441. z-index: 10;
  1442. flex-direction: column;
  1443. justify-content: center;
  1444. transition: 0.5s all;
  1445. opacity: 0;
  1446. visibility: hidden;
  1447. }
  1448. .left-popover .pChild {
  1449. display: flex;
  1450. align-items: center;
  1451. flex-direction: column;
  1452. }
  1453. .left-popover .pChild span {
  1454. display: flex;
  1455. align-items: center;
  1456. flex-direction: column;
  1457. text-align: center;
  1458. }
  1459. .left-popover .pChild + .pChild {
  1460. margin-top: 10px;
  1461. }
  1462. .right-popover {
  1463. position: absolute;
  1464. top: 0px;
  1465. left: -65px;
  1466. background: #fff;
  1467. display: flex;
  1468. width: 45px;
  1469. align-items: center;
  1470. padding: 10px 5px 20px;
  1471. border-radius: 5px;
  1472. box-shadow: 0 1px 3px 1px rgb(202, 202, 202);
  1473. z-index: 10;
  1474. flex-direction: column;
  1475. justify-content: center;
  1476. transition: 0.5s all;
  1477. opacity: 0;
  1478. visibility: hidden;
  1479. }
  1480. .right-popover .pChild {
  1481. display: flex;
  1482. align-items: center;
  1483. flex-direction: column;
  1484. }
  1485. .right-popover .pChild span {
  1486. display: flex;
  1487. align-items: center;
  1488. flex-direction: column;
  1489. text-align: center;
  1490. }
  1491. .right-popover .pChild + .pChild {
  1492. margin-top: 10px;
  1493. }
  1494. .visibleO {
  1495. opacity: 1 !important;
  1496. visibility: visible !important;
  1497. }
  1498. .remark-bottom-popover {
  1499. position: absolute;
  1500. bottom: 0px;
  1501. left: 0;
  1502. background: #fff;
  1503. max-height: 150px;
  1504. width: 100%;
  1505. padding: 10px 20px;
  1506. border-radius: 5px;
  1507. box-shadow: 0 1px 3px 1px rgb(202, 202, 202);
  1508. z-index: 10;
  1509. transition: 0.5s all;
  1510. box-sizing: border-box;
  1511. transform: translateY(calc(100% + 5px));
  1512. overflow: auto;
  1513. opacity: 0;
  1514. visibility: hidden;
  1515. }
  1516. .Rbox {
  1517. display: flex;
  1518. word-break: break-all;
  1519. }
  1520. .Rbox + .Rbox {
  1521. border-top: 1px solid rgb(233, 233, 233);
  1522. margin-top: 10px;
  1523. padding-top: 10px;
  1524. }
  1525. .Rportal {
  1526. height: 45px;
  1527. min-width: 45px;
  1528. border-radius: 50px;
  1529. overflow: hidden;
  1530. display: block;
  1531. background: aliceblue;
  1532. user-select: none;
  1533. }
  1534. .RContent {
  1535. margin-left: 10px;
  1536. }
  1537. .RContent div:nth-child(1) {
  1538. user-select: none;
  1539. color: rgb(80, 80, 80);
  1540. margin-bottom: 5px;
  1541. font-size: 14px;
  1542. }
  1543. .RContent div:nth-child(2) {
  1544. /* font-family: "微软雅黑"; */
  1545. font-size: 15px;
  1546. }
  1547. .remark-right-popover {
  1548. position: absolute;
  1549. top: 0;
  1550. right: 0;
  1551. background: #fff;
  1552. max-height: 100%;
  1553. width: 300px;
  1554. padding: 10px 20px;
  1555. border-radius: 5px;
  1556. box-shadow: 0 1px 3px 1px rgb(202, 202, 202);
  1557. z-index: 10;
  1558. transition: 0.5s all;
  1559. box-sizing: border-box;
  1560. transform: translateX(calc(100% + 5px));
  1561. overflow: auto;
  1562. opacity: 0;
  1563. visibility: hidden;
  1564. }
  1565. .remark-left-popover {
  1566. position: absolute;
  1567. top: 0;
  1568. left: 0;
  1569. background: #fff;
  1570. max-height: 100%;
  1571. width: 300px;
  1572. padding: 10px 20px;
  1573. border-radius: 5px;
  1574. box-shadow: 0 1px 3px 1px rgb(202, 202, 202);
  1575. z-index: 10;
  1576. transition: 0.5s all;
  1577. box-sizing: border-box;
  1578. transform: translateX(calc(-100% - 5px));
  1579. overflow: auto;
  1580. opacity: 0;
  1581. visibility: hidden;
  1582. }
  1583. .rrrrbox {
  1584. width: 95%;
  1585. height: 95%;
  1586. background: #fff;
  1587. padding: 10px 20px;
  1588. box-sizing: border-box;
  1589. border-radius: 5px;
  1590. position: absolute;
  1591. z-index: 9;
  1592. overflow: auto;
  1593. }
  1594. </style>