taskArea.vue 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963
  1. <template>
  2. <div class="task">
  3. <div class="taskTop" v-if="false">
  4. <div class="tt_title">任务时间分配</div>
  5. <div class="tt_item">
  6. <div class="tt_i_title">
  7. <span>课程时间轴</span>
  8. </div>
  9. <div class="tt_i_box">
  10. <img :src="require('../../../assets/icon/course/group.png')" />
  11. </div>
  12. </div>
  13. <div class="tt_item">
  14. <div class="tt_i_title">
  15. <span>任务状态</span>
  16. <span>学生活动中...</span>
  17. </div>
  18. <div class="tt_i_box">
  19. <div class="tt_i_b_item">
  20. <div class="tt_i_b_title">作业提交</div>
  21. <div class="tt_i_b_box">
  22. <div class="tt_i_b_b_item">
  23. <div>提交人数</div>
  24. <span>34<span>人</span></span>
  25. </div>
  26. <div class="tt_i_b_b_item">
  27. <div>正确率</div>
  28. <span>88<span>%</span></span>
  29. </div>
  30. </div>
  31. </div>
  32. <div class="tt_i_b_item">
  33. <div class="tt_i_b_title">交流互动</div>
  34. <div class="tt_i_b_box">
  35. <div class="tt_i_b_b_item">
  36. <div>参与人数</div>
  37. <span>56<span>人</span></span>
  38. </div>
  39. <div class="tt_i_b_b_item">
  40. <div>点赞数</div>
  41. <span>36<span>个</span></span>
  42. </div>
  43. <div class="tt_i_b_b_item">
  44. <div>评论数</div>
  45. <span>128<span>条</span></span>
  46. </div>
  47. </div>
  48. </div>
  49. </div>
  50. </div>
  51. </div>
  52. <div class="t_top" ref="chatRef">
  53. <div class="t_t_chat" v-for="(item, index) in chatList" :key="index">
  54. <div class="t_t_c_user" v-if="item.content">
  55. <div class="t_t_c_u_left">
  56. <div class="t_t_c_u_l_content">{{ item.content }}</div>
  57. <div class="t_t_c_u_l_time">{{ item.createtime }}</div>
  58. </div>
  59. <div class="t_t_c_u_right">
  60. <span>我</span>
  61. </div>
  62. </div>
  63. <div class="t_t_c_ai">
  64. <div class="t_t_c_a_left">
  65. <el-avatar v-if="item.filename" :src="item.filename"></el-avatar>
  66. <span v-else>Ai</span>
  67. </div>
  68. <div class="t_t_c_a_right">
  69. <div class="t_t_c_a_r_content" style="display: flex;justify-content: space-between;flex-wrap: wrap;" v-if="item.content.includes('图片')">
  70. <div
  71. v-if="!pan(item.aiContent).length"
  72. class="d_t_c_a_r_content"
  73. v-loading="item.loading"
  74. v-html="item.aiContent"
  75. ></div>
  76. <div v-else v-for="i in pan(item.aiContent)">
  77. <img style="width: 120px;height: 120px;" :src="i.image" alt="" @click="previewImg(i.image)">
  78. </div>
  79. </div>
  80. <div
  81. v-else
  82. class="t_t_c_a_r_content"
  83. v-loading="item.loading"
  84. v-html="item.aiContent"
  85. ></div>
  86. <div class="t_t_c_a_r_time">{{ item.createtime }}</div>
  87. </div>
  88. </div>
  89. </div>
  90. </div>
  91. <div class="t_bottom">
  92. <div class="t_b_btnArea">
  93. <!-- <div class="s_b_ba-item" @click.stop="choiceRole()">选择角色</div> -->
  94. <div class="t_b_ba_item" @click="sendType('智能总结')">智能总结</div>
  95. <div class="t_b_ba_item" @click="sendType('智能出题')">智能出题</div>
  96. <!-- <div class="t_b_ba_item" @click="sendType('优秀标兵')">优秀标兵</div> -->
  97. <div class="t_b_ba_item" @click="sendType('扩展知识')">扩展知识</div>
  98. <div class="t_b_ba_item" @click="clear()">清空聊天记录</div>
  99. </div>
  100. <div class="t_b_inputArea">
  101. <!-- <div class="t_b_tape" @click="goTape()"></div> -->
  102. <div class="t_b_input">
  103. <el-input
  104. :disabled="loading || chatLoading"
  105. v-loading="loading || chatLoading"
  106. @keyup.enter.native="send()"
  107. class="t_b_i_left"
  108. v-model="text"
  109. ></el-input>
  110. <!-- <div class="t_b_i_right" @click="sendFile()">
  111. <span></span>
  112. </div> -->
  113. </div>
  114. <div class="t_b_btn" @click="send()">
  115. <span></span>
  116. </div>
  117. </div>
  118. </div>
  119. </div>
  120. </template>
  121. <script>
  122. // import { Loading } from 'element-ui';
  123. import { v4 as uuidv4 } from "uuid";
  124. import MarkdownIt from "markdown-it";
  125. export default {
  126. props: {
  127. courseDetail: {
  128. type: Object,
  129. default: () => {}
  130. }
  131. },
  132. data() {
  133. return {
  134. userid: this.$route.query.userid,
  135. courseId: this.$route.query.courseId,
  136. text: "",
  137. loading: false,
  138. chatLoading: false,
  139. chatList: []
  140. };
  141. },
  142. computed: {
  143. pan() {
  144. return (content) => {
  145. try {
  146. return JSON.parse(content)
  147. } catch (error) {
  148. return []
  149. }
  150. };
  151. }
  152. },
  153. methods: {
  154. previewImg(url) {
  155. this.$hevueImgPreview(url);
  156. },
  157. clear(){
  158. this.chatList = [];
  159. },
  160. // 获取ai对话
  161. getAiContent(_uid) {
  162. let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  163. let _allText = "";
  164. let _mdText = "";
  165. const md = new MarkdownIt();
  166. _source.onmessage = _e => {
  167. if (_e.data.replace("'", "").replace("'", "") == "[DONE]") {
  168. //对话已经完成
  169. _mdText = _mdText.replace("_", "");
  170. _source.close();
  171. this.chatLoading = false;
  172. this.scrollBottom();
  173. this.chatList.find(i => i.uid == _uid).aiContent = _mdText;
  174. this.chatList.find(i => i.uid == _uid).isalltext = true;
  175. this.chatList.find(i => i.uid == _uid).isShowSynchronization = true;
  176. this.chatList.find(i => i.uid == _uid).loading = false;
  177. // 这里保存对话
  178. this.insertChat(_uid);
  179. return;
  180. } else {
  181. //对话还在继续
  182. let _text = "";
  183. _text = _e.data.replaceAll("'", "");
  184. if (_allText == "") {
  185. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  186. } else {
  187. _allText += _text;
  188. }
  189. _mdText = _allText + "_";
  190. _mdText = _mdText.replace(/\\n/g, "\n");
  191. _mdText = _mdText.replace(/\\/g, "");
  192. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  193. //转化返回的回复流数据
  194. _mdText = md.render(_mdText);
  195. this.chatList.find(i => i.uid == _uid).aiContent = _mdText;
  196. this.chatList.find(i => i.uid == _uid).loading = false;
  197. this.scrollBottom();
  198. // 处理流数据
  199. }
  200. };
  201. },
  202. //保存消息
  203. insertChat(_uid) {
  204. let _data = this.chatList.find(i => i.uid == _uid);
  205. if (!_data) return;
  206. let params = {
  207. userId: this.userid,
  208. userName: "qgt",
  209. groupId: "602def61-005d-11ee-91d8-005056b8q12w",
  210. answer: _data.aiContent,
  211. problem: _data.content,
  212. file_id: _data.fileid ? _data.fileid : "",
  213. alltext: _data.aiContent,
  214. type: "chat",
  215. filename: _data.filename,
  216. session_name: `${this.courseId}-studyStudent` //这是对话记录位置
  217. };
  218. this.ajax
  219. .post("https://gpt4.cocorobo.cn/insert_chat", params)
  220. .then(res => {});
  221. },
  222. // 获取对应的聊天记录
  223. getChatList() {
  224. return new Promise((resolve, reject) => {
  225. if (this.loading) return this.$message.info("请稍等...");
  226. this.chatList = [];
  227. this.loading = true;
  228. this.chatLoading = true;
  229. let params = {
  230. userid: this.userid,
  231. groupid: "602def61-005d-11ee-91d8-005056b8q12w",
  232. // session_name:``
  233. session_name: `${this.courseId}-studyStudent`
  234. };
  235. this.ajax
  236. .post("https://gpt4.cocorobo.cn/get_agent_park_chat", params)
  237. .then(res => {
  238. let _data = JSON.parse(res.data.FunctionResponse);
  239. if (_data.length > 0) {
  240. let _chatList = [];
  241. for (let i = 0; i < _data.length; i++) {
  242. _chatList.push({
  243. loading: false,
  244. role: "user",
  245. content: _data[i].problem,
  246. uid: _data[i].id,
  247. AI: "AI",
  248. aiContent: _data[i].answer,
  249. oldContent: _data[i].answer,
  250. isShowSynchronization: false,
  251. filename: _data[i].filename,
  252. index: i,
  253. is_mind_map: false,
  254. fileid: _data[i].fileid
  255. });
  256. }
  257. this.chatList = _chatList;
  258. this.loading = false;
  259. this.chatLoading = false;
  260. } else {
  261. //没有对话记录
  262. this.loading = false;
  263. this.chatLoading = false;
  264. }
  265. resolve();
  266. })
  267. .catch(err => {
  268. console.log(err);
  269. this.$message.error("获取对话记录失败");
  270. this.loading = false;
  271. this.chatLoading = false;
  272. resolve();
  273. });
  274. });
  275. },
  276. // choiceRole() {
  277. // this.cardType = 1;
  278. // },
  279. // sendFile() {
  280. // if (this.loading) return this.$message.info("请稍等");
  281. // this.$message.info("点击了附件");
  282. // },
  283. // goTape() {
  284. // if (this.loading) return this.$message.info("请稍等");
  285. // this.$message.info(`点击了语音`);
  286. // },
  287. send(_text = this.text) {
  288. if (this.loading || this.chatLoading) return this.$message.info("请稍等");
  289. if (_text.trim().length == 0) return this.$message.info("请输入内容");
  290. this.chatLoading = true;
  291. let _uuid = uuidv4();
  292. if (_text.indexOf("图片") != -1) {
  293. // console.log("图片");
  294. this.text = "";
  295. let params = {
  296. page: 1,
  297. pagesize: 4,
  298. query: _text
  299. };
  300. // this.$message.info(_text);
  301. this.chatList.push({
  302. role: "user",
  303. content: `${_text}`,
  304. uid: _uuid,
  305. AI: "AI",
  306. aiContent: "",
  307. oldContent: "",
  308. isShowSynchronization: false,
  309. filename: "",
  310. index: this.chatList.length,
  311. is_mind_map: false,
  312. loading: true
  313. });
  314. this.ajax
  315. .post("https://gpt.cocorobo.cn/search_image", params)
  316. .then(res => {
  317. let data = res.data.FunctionResponse.result;
  318. // console.log('res',res.data.FunctionResponse.result);
  319. this.chatList.find(i => i.uid == _uuid).aiContent = JSON.stringify(data);
  320. this.chatList.find(i => i.uid == _uuid).loading = false;
  321. this.chatLoading = false;
  322. this.getAiContent(_uuid);
  323. // console.log('resresresres',res);
  324. // if (res.data.FunctionResponse.result == "发送成功") {
  325. // } else {
  326. // this.$message.warning(res.data.FunctionResponse.result);
  327. // }
  328. });
  329. this.scrollBottom();
  330. return;
  331. }
  332. console.log('没停???');
  333. this.chatList.push({
  334. role: "user",
  335. content: `${_text}`,
  336. uid: _uuid,
  337. AI: "AI",
  338. aiContent: "",
  339. oldContent: "",
  340. isShowSynchronization: false,
  341. filename: "",
  342. index: this.chatList.length,
  343. is_mind_map: false,
  344. loading: true
  345. });
  346. this.scrollBottom();
  347. let params = {
  348. model: "gpt-3.5-turbo",
  349. temperature: 0,
  350. max_tokens: 4096,
  351. top_p: 1,
  352. frequency_penalty: 0,
  353. presence_penalty: 0,
  354. messages: [{ role: "user", content: _text }],
  355. uid: _uuid,
  356. mind_map_question: ""
  357. };
  358. this.text = "";
  359. this.ajax
  360. .post("https://gpt4.cocorobo.cn/chat", params)
  361. .then(res => {
  362. if (res.data.FunctionResponse.result == "发送成功") {
  363. } else {
  364. this.$message.warning(res.data.FunctionResponse.result);
  365. this.chatLoading = false;
  366. }
  367. })
  368. .catch(e => {
  369. console.log(e);
  370. this.chatLoading = false;
  371. });
  372. this.getAiContent(_uuid);
  373. },
  374. sendType(_text) {
  375. if (this.loading || this.chatLoading) return this.$message.info("请稍等");
  376. let _msg = ``;
  377. if (_text == "扩展知识") {
  378. // return console.log(this.courseDetail);
  379. _msg = `
  380. NOTICE
  381. 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.
  382. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  383. Instruction: Based on the context, follow "Format example", write content.
  384. # Context
  385. ## 任务
  386. 你的任务是根据用户的请求,结合以下“课程信息”包含的子条目(“课程标题”,“主题”,“学科”以及“年级”),向用户输出相关的扩展知识点,将结果以有序列表的形式返回给用户。
  387. 课程信息
  388. 课程标题:${this.courseDetail.title}
  389. 分类:${this.courseDetail.name?this.courseDetail.name:"无"}
  390. 学生年级:${this.courseDetail.classname?this.courseDetail.classname:"无"}
  391. ## 规则
  392. 1. 内容应该与“课程信息”相关,避免提供无关的信息。
  393. 2. 当课程信息中的子条目内容为“无”时,无视这些条目进行即可。
  394. 3. 搜索建议的结果应该符合伦理规范。
  395. 4. 一步步思考如何根据“课程信息”来输出“扩展知识点”,但是你不需要“扩展知识点”以外的内容。
  396. ## 格式要求
  397. 1. 应包括5个相关的“扩展知识点”。
  398. 2. 搜索建议应以有序列表形式呈现,每个建议包括关键词和简短描述。
  399. # Format example
  400. ## 课程标题:垃圾回收
  401. 主题:无
  402. 学科:无
  403. 年级:无
  404. 1. 垃圾分类标准:不同国家的垃圾分类标准和方法。
  405. 2. 可回收垃圾处理:可回收垃圾的处理流程和再利用方法。
  406. 3. 有害垃圾的影响:有害垃圾对环境和人体健康的潜在影响。
  407. 4. 垃圾减量化策略:减少垃圾产生的有效策略和实践。
  408. 5. 环保教育活动:在学校中推广环保意识的活动和资源。
  409. `;
  410. } else if (_text == "智能出题") {
  411. _msg = `
  412. NOTICE
  413. 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.
  414. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  415. Instruction: Based on the context, follow "Format example", write content.
  416. # Context
  417. ## 任务
  418. 你的任务是根据用户的请求,结合以下“课程信息”包含的子条目(“课程标题”,“主题”,“学科”以及“年级”),向用户输出相关的练习题目,将结果以有序列表的形式返回给用户。
  419. 课程信息
  420. 课程标题:${this.courseDetail.title}
  421. 分类:${this.courseDetail.name?this.courseDetail.name:"无"}
  422. 学生年级:${this.courseDetail.classname?this.courseDetail.classname:"无"}
  423. ## 规则
  424. 1. 练习题目内容应该与“课程信息”相关,避免提供无关的信息。
  425. 2. 当课程信息中的子条目内容为“无”时,无视这些条目进行输出即可。
  426. 3. 一步步思考如何根据“课程信息”输出“练习题目”,但是你不需要输出“练习题目”以外的内容。
  427. 4.输出练习题目后,提示用户“希望这些题目能帮到你,如果需要其他类型题目或者更多题目,可以随时向我输入你的需求”
  428. ## 格式要求
  429. 1. 输出应包括3道相关的“练习题目”。
  430. 2. 练习题目默认只包含3道4选1的单选题,除非用户在提示词中更具体地指明了题目类型和数量。
  431. 3. 练习题目应以有序列表形式呈现,每个建议包括关键词和简短描述。
  432. # Format example
  433. ## 课程标题:垃圾回收
  434. 主题:无
  435. 学科:无
  436. 年级:无
  437. 1. 垃圾回收的主要目的是: a) 增加垃圾的数量 b) 减少垃圾的数量 c) 提高垃圾的质量 d) 增加垃圾的种类
  438. 2. 以下哪种垃圾是可以回收的? a) 食物残渣 b) 塑料瓶 c) 湿纸巾 d) 动物粪便
  439. 3. 垃圾分类中,玻璃瓶通常属于哪一类? a) 可回收垃圾 b) 厨余垃圾 c) 有害垃圾 d) 其他垃圾
  440. `;
  441. } else if (_text == "智能总结") {
  442. _msg = `
  443. NOTICE
  444. 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.
  445. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  446. Instruction: Based on the context, follow "Format example", write content.
  447. # Context
  448. ## 任务
  449. 你的任务是根据用户的请求,结合以下“课程信息”包含的子条目(“课程标题”,“主题”,“学科”,“年级”以及“学习内容”),对课程进行课程总结,请根据输出格式将内容输出给用户。
  450. 课程信息
  451. 课程标题:${this.courseDetail.title}
  452. 分类:${this.courseDetail.name?this.courseDetail.name:"无"}
  453. 学生年级:${this.courseDetail.classname?this.courseDetail.classname:"无"}
  454. ## 规则
  455. 1. “课程总结”内容应该与“课程信息”相关,避免提供无关的信息。
  456. 2. 当课程信息中的子条目内容为“无”时,无视这些条目进行输出即可。
  457. 3. 一步步思考如何根据“课程信息”输出“课程总结”。
  458. ## 格式要求
  459. 1. 以无序列表的形式输出“课程信息”中的“课程标题”,“主题”,“学科”以及“年级”,若这些条目中的内容为“无”,则不需要输出
  460. # Format example
  461. ## 课程标题:垃圾回收
  462. 学科:无
  463. 年级:无
  464. 课程信息
  465. 课程标题:垃圾回收
  466. 学科:自然科学 语文 数学
  467. 学习内容:学习内容包含一份引导学生思考为何要进行垃圾回收的文档材料
  468. `;
  469. }
  470. if (!_msg) return;
  471. // console.log(_msg)
  472. this.chatLoading = true;
  473. let _uuid = uuidv4();
  474. this.chatList.push({
  475. role: "user",
  476. content: `${_text}`,
  477. uid: _uuid,
  478. AI: "AI",
  479. aiContent: "",
  480. oldContent: "",
  481. isShowSynchronization: false,
  482. filename: "",
  483. index: this.chatList.length,
  484. is_mind_map: false,
  485. loading: true
  486. });
  487. this.scrollBottom();
  488. let params = {
  489. model: "gpt-3.5-turbo",
  490. temperature: 0,
  491. max_tokens: 4096,
  492. top_p: 1,
  493. frequency_penalty: 0,
  494. presence_penalty: 0,
  495. messages: [{ role: "user", content: _msg }],
  496. uid: _uuid,
  497. mind_map_question: ""
  498. };
  499. this.text = "";
  500. this.ajax
  501. .post("https://gpt4.cocorobo.cn/chat", params)
  502. .then(res => {
  503. if (res.data.FunctionResponse.result == "发送成功") {
  504. } else {
  505. this.$message.warning(res.data.FunctionResponse.result);
  506. this.chatLoading = false;
  507. }
  508. })
  509. .catch(e => {
  510. console.log(e);
  511. this.chatLoading = false;
  512. });
  513. this.getAiContent(_uuid);
  514. // this.send(text);
  515. },
  516. // sendImage() {
  517. // this.$message.info("发送图片");
  518. // },
  519. // sendVideo() {
  520. // this.$message.info("发送视频");
  521. // },
  522. scrollBottom() {
  523. this.$nextTick(() => {
  524. this.$refs.chatRef.scrollTop = this.$refs.chatRef.scrollHeight;
  525. });
  526. }
  527. },
  528. mounted() {
  529. this.getChatList().then(_ => {
  530. this.scrollBottom();
  531. });
  532. }
  533. };
  534. </script>
  535. <style scoped>
  536. .task {
  537. width: 100%;
  538. height: 100%;
  539. box-sizing: border-box;
  540. }
  541. .taskTop {
  542. width: 100%;
  543. height: 280px;
  544. box-sizing: border-box;
  545. padding: 10px;
  546. overflow-x: hidden;
  547. }
  548. .tt_title {
  549. font-size: 18px;
  550. font-weight: bold;
  551. margin-bottom: 5px;
  552. }
  553. .tt_item {
  554. width: 100%;
  555. height: auto;
  556. margin-top: 10px;
  557. }
  558. .tt_i_title {
  559. display: flex;
  560. justify-content: space-between;
  561. align-items: center;
  562. }
  563. .tt_i_title > span:nth-of-type(2) {
  564. box-sizing: border-box;
  565. padding: 0 10px;
  566. height: 25px;
  567. background-color: #effcf5;
  568. color: #83e0af;
  569. }
  570. .tt_i_box {
  571. width: 100%;
  572. height: auto;
  573. display: flex;
  574. margin-top: 10px;
  575. justify-content: space-between;
  576. }
  577. .tt_i_box > img {
  578. width: 100%;
  579. height: 50px;
  580. }
  581. .tt_i_b_item {
  582. width: auto;
  583. height: 90px;
  584. background-color: #f6f9ff;
  585. }
  586. .tt_i_b_title {
  587. width: 100%;
  588. height: 30px;
  589. display: flex;
  590. justify-content: center;
  591. align-items: center;
  592. box-sizing: border-box;
  593. border: solid 1px #e0eafb;
  594. color: #626466;
  595. }
  596. .tt_i_b_box {
  597. width: auto;
  598. height: 60px;
  599. box-sizing: border-box;
  600. border: solid 1px #e0eafb;
  601. border-top: none;
  602. display: flex;
  603. }
  604. .tt_i_b_b_item {
  605. width: 70px;
  606. height: 100%;
  607. display: flex;
  608. flex-direction: column;
  609. justify-content: center;
  610. align-items: center;
  611. border-left: solid 1px #e0eafb;
  612. }
  613. .tt_i_b_box > .tt_i_b_b_item:nth-of-type(1) {
  614. border-left: none;
  615. }
  616. .tt_i_b_b_item > div {
  617. font-size: 14px;
  618. color: #949599;
  619. }
  620. .tt_i_b_b_item > span {
  621. font-weight: bold;
  622. }
  623. .tt_i_b_b_item > span > span {
  624. font-size: 12px;
  625. font-weight: 200;
  626. }
  627. .t_top {
  628. width: 100%;
  629. height: calc(100% - 90px);
  630. /* height: calc(100% - 370px); */
  631. overflow: auto;
  632. box-sizing: border-box;
  633. padding: 20px 0;
  634. }
  635. .t_t_chat {
  636. width: 100%;
  637. display: flex;
  638. box-sizing: border-box;
  639. padding: 10px;
  640. flex-direction: column;
  641. }
  642. .t_t_chat > div {
  643. display: flex;
  644. align-items: flex-start;
  645. width: 100%;
  646. }
  647. .t_t_c_user {
  648. box-sizing: border-box;
  649. padding-left: 35px;
  650. }
  651. .t_t_c_u_left {
  652. width: 90%;
  653. height: auto;
  654. }
  655. .t_t_c_u_l_content {
  656. width: auto;
  657. max-width: 100%;
  658. height: auto;
  659. box-sizing: border-box;
  660. padding: 10px;
  661. color: white;
  662. background-color: #3681fc;
  663. border-radius: 8px 2px 8px 8px;
  664. white-space: pre-line;
  665. }
  666. .t_t_c_u_l_time {
  667. width: 100%;
  668. display: flex;
  669. justify-content: flex-end;
  670. font-size: 12px;
  671. color: #9f9f9f;
  672. margin-top: 5px;
  673. }
  674. .t_t_c_u_right {
  675. width: 35px;
  676. height: 35px;
  677. display: flex;
  678. justify-content: center;
  679. margin-left: 5px;
  680. }
  681. .t_t_c_u_right > span {
  682. width: 32px;
  683. height: 32px;
  684. display: flex;
  685. justify-content: center;
  686. align-items: center;
  687. color: white;
  688. background-color: #3681fc;
  689. border-radius: 50%;
  690. }
  691. .t_t_c_ai {
  692. margin-top: 10px;
  693. box-sizing: border-box;
  694. padding-right: 35px;
  695. }
  696. .t_t_c_a_right {
  697. min-width: 90%;
  698. height: auto;
  699. }
  700. .t_t_c_a_r_content {
  701. width: auto;
  702. max-width: 100%;
  703. height: auto;
  704. box-sizing: border-box;
  705. padding: 10px;
  706. background-color: #f6f8ff;
  707. border-radius: 2px 8px 8px 8px;
  708. white-space: pre-line;
  709. word-break: break-all;
  710. }
  711. .t_t_c_a_r_content2 {
  712. background-color: #f6f8ff;
  713. width: 100%;
  714. height: auto;
  715. box-sizing: border-box;
  716. padding: 10px;
  717. border-radius: 2px 8px 8px 8px;
  718. white-space: pre-line;
  719. box-shadow: 0 0px 10px #c5cbee;
  720. }
  721. .t_t_c_a_r_c_title {
  722. display: flex;
  723. align-items: center;
  724. }
  725. .t_t_c_a_r_c_title > img {
  726. width: 16px;
  727. height: 16px;
  728. }
  729. .t_t_c_a_r_c_item {
  730. width: 100%;
  731. height: auto;
  732. box-sizing: border-box;
  733. padding: 10px;
  734. background-color: #ffffff;
  735. border-radius: 5px;
  736. margin-top: 5px;
  737. color: #666666;
  738. font-size: 14px;
  739. cursor: pointer;
  740. }
  741. .t_t_c_a_r_c_item:hover {
  742. border: solid #b8d2fe 1px;
  743. box-shadow: 0 0 5px 2px #b8d2fe;
  744. }
  745. .t_t_c_a_r_c_title > span {
  746. font-weight: bold;
  747. }
  748. .t_t_c_a_r_time {
  749. width: 100%;
  750. display: flex;
  751. justify-content: flex-start;
  752. font-size: 12px;
  753. color: #9f9f9f;
  754. margin-top: 5px;
  755. }
  756. .t_t_c_a_left {
  757. width: 35px;
  758. height: 35px;
  759. display: flex;
  760. justify-content: center;
  761. margin-right: 5px;
  762. }
  763. .t_t_c_a_left > span {
  764. width: 32px;
  765. height: 32px;
  766. display: flex;
  767. justify-content: center;
  768. align-items: center;
  769. color: white;
  770. background-color: #3681fc;
  771. border-radius: 50%;
  772. }
  773. .t_bottom {
  774. width: 100%;
  775. height: 90px;
  776. display: flex;
  777. flex-direction: column;
  778. justify-content: space-between;
  779. }
  780. .t_b_btnArea {
  781. width: 100%;
  782. height: 30px;
  783. display: flex;
  784. align-items: center;
  785. box-sizing: border-box;
  786. padding: 0 10px;
  787. overflow-y: hidden;
  788. }
  789. .t_b_ba_item {
  790. width: auto;
  791. box-sizing: border-box;
  792. padding: 0 10px;
  793. height: 25px;
  794. background-color: white;
  795. display: flex;
  796. justify-content: center;
  797. align-items: center;
  798. /* 阴影 */
  799. box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.363);
  800. border-radius: 15px;
  801. font-size: 14px;
  802. cursor: pointer;
  803. margin-right: 10px;
  804. white-space: nowrap;
  805. transition: 0.3s;
  806. }
  807. .t_b_ba_item:hover {
  808. background-color: rgb(236, 236, 236);
  809. }
  810. .t_b_inputArea {
  811. width: 100%;
  812. height: 55px;
  813. box-sizing: border-box;
  814. border-top: solid 1px #ededed;
  815. display: flex;
  816. justify-content: space-between;
  817. align-items: center;
  818. padding-right: 10px;
  819. }
  820. .t_b_tape {
  821. width: 35px;
  822. height: 35px;
  823. background: url("../../../assets/icon/course/tape.png") no-repeat;
  824. background-size: 50% 60%;
  825. background-position: center;
  826. cursor: pointer;
  827. }
  828. .t_b_input {
  829. /* width: 75%; */
  830. flex: 1;
  831. height: 45px;
  832. background-color: #f3f3f3;
  833. border-radius: 50px;
  834. margin: 0 10px;
  835. display: flex;
  836. overflow: hidden;
  837. align-items: center;
  838. }
  839. .t_b_i_left {
  840. /* width: calc(100% - 45px); */
  841. width: 100%;
  842. line-height: 45px;
  843. height: 100%;
  844. }
  845. .t_b_i_left >>> .el-input__inner {
  846. border: none;
  847. background-color: #f3f3f3;
  848. outline: none;
  849. border-radius: 50px 0 0 50px;
  850. }
  851. .t_b_i_right {
  852. width: 45px;
  853. height: 45px;
  854. display: flex;
  855. justify-content: center;
  856. align-items: center;
  857. }
  858. .t_b_i_right > span {
  859. width: 35px;
  860. height: 35px;
  861. background: url("../../../assets/icon/course/file.png") no-repeat;
  862. background-size: 50% 60%;
  863. background-position: center;
  864. cursor: pointer;
  865. }
  866. .t_b_btn {
  867. width: 40px;
  868. height: 40px;
  869. background-color: #3681fc;
  870. display: flex;
  871. justify-content: center;
  872. align-items: center;
  873. border-radius: 50%;
  874. cursor: pointer;
  875. }
  876. .t_b_btn > span {
  877. width: 30px;
  878. height: 30px;
  879. background: url("../../../assets/icon/course/send.png") no-repeat;
  880. background-size: 70% 70%;
  881. background-position: center;
  882. }
  883. td,
  884. th {
  885. padding: 10px;
  886. }
  887. </style>