QuestionManage.vue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769
  1. <template>
  2. <div class="content question-manage">
  3. <!-- 正文信息 -->
  4. <div class="part-box">
  5. <!-- <h2 class="part-box-title">题库列表</h2> -->
  6. <div class="search-box">
  7. <el-form class="part-filter-form" :inline="true" :model="filter">
  8. <el-form-item label="课程">
  9. <course-select v-model="filter.courseId" @change="courseChange">
  10. </course-select>
  11. </el-form-item>
  12. <el-form-item label="题型">
  13. <source-detail-select v-model="filter" :course-id="filter.courseId">
  14. </source-detail-select>
  15. </el-form-item>
  16. <el-form-item label="题目内容">
  17. <el-input
  18. v-model="filter.questionBody"
  19. placeholder="题目内容"
  20. ></el-input>
  21. </el-form-item>
  22. <el-form-item label="知识点">
  23. <!-- <property-tree-select
  24. v-model="filter.questionProperty"
  25. :course-id="filter.courseId"
  26. ></property-tree-select> -->
  27. <property-tree-select
  28. v-model="filter.questionProperty"
  29. :course-id="filter.courseId"
  30. ></property-tree-select>
  31. </el-form-item>
  32. <el-form-item>
  33. <el-button type="primary" @click="toPage(1)">查询</el-button>
  34. </el-form-item>
  35. </el-form>
  36. <div class="right-btns">
  37. <tool-tip-btn
  38. name="shititongji"
  39. content="试题统计"
  40. @click="toStatistics"
  41. ></tool-tip-btn>
  42. <tool-tip-btn
  43. name="tixingguanli"
  44. content="题型管理"
  45. @click="toSourceDetailManage"
  46. ></tool-tip-btn>
  47. </div>
  48. </div>
  49. <!-- <div class="part-box-action"> -->
  50. <!-- <div> -->
  51. <!-- <el-button
  52. type="primary"
  53. plain
  54. icon="el-icon-data-analysis"
  55. @click="toStatistics"
  56. >试题统计</el-button
  57. > -->
  58. <!-- <el-button
  59. v-if="authButtons.includes('import_test_paper-safe')"
  60. type="danger"
  61. plain
  62. icon="el-icon-lock"
  63. @click="toSafetySet"
  64. >安全设置</el-button
  65. > -->
  66. <!-- <el-button
  67. type="primary"
  68. plain
  69. icon="el-icon-setting"
  70. @click="toSourceDetailManage"
  71. >题型管理</el-button
  72. > -->
  73. <!-- <el-button
  74. type="danger"
  75. plain
  76. icon="el-icon-delete"
  77. @click="toRecycle"
  78. >回收站</el-button
  79. > -->
  80. <!-- </div> -->
  81. <!-- <div> -->
  82. <!-- <el-button
  83. type="primary"
  84. plain
  85. icon="el-icon-position"
  86. @click="toBatchMove"
  87. >移动</el-button
  88. >
  89. <el-button
  90. type="primary"
  91. plain
  92. icon="el-icon-copy-document"
  93. @click="toBatchCopy"
  94. >复制</el-button
  95. >
  96. <el-button
  97. type="danger"
  98. plain
  99. icon="el-icon-circle-close"
  100. @click="toBatchDelete"
  101. >删除</el-button
  102. > -->
  103. <!-- <el-button
  104. type="primary"
  105. plain
  106. icon="el-icon-folder-opened"
  107. @click="toAddFolder"
  108. >新建文件夹</el-button
  109. > -->
  110. <!-- <el-button
  111. v-if="!gptQuestionEnable"
  112. type="primary"
  113. icon="el-icon-circle-plus-outline"
  114. plain
  115. @click="toCreateQuestion"
  116. >创建试题</el-button
  117. >
  118. <el-dropdown v-if="gptQuestionEnable">
  119. <el-button type="primary" plain icon="el-icon-circle-plus-outline"
  120. >创建试题</el-button
  121. >
  122. <el-dropdown-menu slot="dropdown" class="action-dropdown">
  123. <el-dropdown-item>
  124. <el-button
  125. size="mini"
  126. type="primary"
  127. plain
  128. @click="toCreateQuestion"
  129. >手动创建</el-button
  130. >
  131. </el-dropdown-item>
  132. <el-dropdown-item>
  133. <el-button
  134. size="mini"
  135. type="primary"
  136. plain
  137. @click="toGPTQuestion"
  138. >AI命题</el-button
  139. >
  140. </el-dropdown-item>
  141. </el-dropdown-menu>
  142. </el-dropdown> -->
  143. <!-- <el-button
  144. type="primary"
  145. plain
  146. icon="el-icon-upload2"
  147. @click="toImportQuestion"
  148. >批量导入</el-button
  149. > -->
  150. <!-- </div> -->
  151. <!-- </div> -->
  152. </div>
  153. <div class="folder-question">
  154. <div class="folder-list" :class="{ collapse: treeCollapse }">
  155. <question-folder
  156. ref="QuestionFolder"
  157. is-edit
  158. @selected="folderFilterSelected"
  159. ></question-folder>
  160. </div>
  161. <div class="collapse-icon-box">
  162. <div class="icon-circle" @click="treeCollapse = !treeCollapse">
  163. <i class="el-icon-arrow-right" v-if="treeCollapse"></i>
  164. <i class="el-icon-arrow-left" v-else></i>
  165. </div>
  166. </div>
  167. <div class="question-list">
  168. <div class="icon-btn-group">
  169. <!-- <svg-btn
  170. name="xinzeng"
  171. @click="toCreateQuestion"
  172. v-if="!gptQuestionEnable"
  173. >创建试题</svg-btn
  174. > -->
  175. <el-dropdown>
  176. <svg-btn name="xinzeng">创建试题</svg-btn>
  177. <el-dropdown-menu slot="dropdown" class="action-dropdown">
  178. <el-dropdown-item>
  179. <el-button
  180. size="mini"
  181. type="primary"
  182. plain
  183. @click="toCreateQuestion"
  184. >手动创建</el-button
  185. >
  186. </el-dropdown-item>
  187. <el-dropdown-item>
  188. <el-button
  189. v-if="authButtons.includes('import_test_paper-ai')"
  190. size="mini"
  191. type="primary"
  192. plain
  193. @click="toGPTQuestion"
  194. >AI命题</el-button
  195. >
  196. </el-dropdown-item>
  197. </el-dropdown-menu>
  198. </el-dropdown>
  199. <svg-btn name="daoru" @click="toImportQuestion">批量导入</svg-btn>
  200. <svg-btn name="yidong" @click="toBatchMove">移动</svg-btn>
  201. <svg-btn name="fuzhi" @click="toBatchCopy">复制</svg-btn>
  202. <svg-btn name="shanchu" @click="toBatchDelete">删除</svg-btn>
  203. </div>
  204. <el-table
  205. v-loading="loading"
  206. element-loading-text="加载中"
  207. :data="questionList"
  208. @selection-change="tableSelectChange"
  209. >
  210. <el-table-column
  211. type="selection"
  212. width="50"
  213. align="center"
  214. ></el-table-column>
  215. <el-table-column label="题干" min-width="200">
  216. <div slot-scope="scope" @click="toViewQuestion(scope.row)">
  217. <rich-text
  218. class="row-question-body"
  219. title="点击查看试题"
  220. :text-json="scope.row.quesBody"
  221. ></rich-text>
  222. </div>
  223. </el-table-column>
  224. <el-table-column label="课程" width="120">
  225. <template slot-scope="scope">
  226. <span>{{ scope.row.course.name }}</span>
  227. </template>
  228. </el-table-column>
  229. <el-table-column label="题型" prop="sourceDetailName" width="100">
  230. </el-table-column>
  231. <el-table-column label="难度" prop="difficulty" width="80">
  232. </el-table-column>
  233. <el-table-column label="使用量" prop="usageAmount" width="80">
  234. </el-table-column>
  235. <el-table-column label="创建人" prop="creator" width="120">
  236. </el-table-column>
  237. <el-table-column label="创建时间" width="170" prop="creationTime">
  238. </el-table-column>
  239. <el-table-column label="操作" width="180" fixed="right">
  240. <template slot-scope="scope">
  241. <div class="operate_left">
  242. <el-button
  243. size="medium"
  244. type="text"
  245. class="normal"
  246. @click="toEditQuestion(scope.row)"
  247. >编辑</el-button
  248. >
  249. <el-dropdown>
  250. <el-button type="text" size="medium" class="normal">
  251. 更多<i class="el-icon-arrow-down el-icon--right"></i>
  252. </el-button>
  253. <el-dropdown-menu slot="dropdown" class="action-dropdown">
  254. <el-dropdown-item>
  255. <el-button
  256. size="mini"
  257. type="primary"
  258. plain
  259. @click="toMoveQuestion(scope.row)"
  260. >移动</el-button
  261. >
  262. </el-dropdown-item>
  263. <el-dropdown-item>
  264. <el-button
  265. size="mini"
  266. type="primary"
  267. plain
  268. @click="toCopyQuestion(scope.row)"
  269. >复制</el-button
  270. >
  271. </el-dropdown-item>
  272. <el-dropdown-item>
  273. <el-button
  274. size="mini"
  275. type="danger"
  276. plain
  277. @click="toDeleteQuestion(scope.row)"
  278. >删除</el-button
  279. >
  280. </el-dropdown-item>
  281. </el-dropdown-menu>
  282. </el-dropdown>
  283. </div>
  284. </template>
  285. </el-table-column>
  286. </el-table>
  287. <div class="part-page">
  288. <el-pagination
  289. :current-page="currentPage"
  290. :page-size="pageSize"
  291. :page-sizes="[10, 20, 50, 100, 200, 300]"
  292. layout="total, sizes, prev, pager, next, jumper"
  293. :total="total"
  294. @current-change="toPage"
  295. @size-change="handleSizeChange"
  296. >
  297. </el-pagination>
  298. </div>
  299. </div>
  300. </div>
  301. <!-- QuestionEditDialog -->
  302. <question-edit-dialog
  303. ref="QuestionEditDialog"
  304. :question="curQuestion"
  305. @modified="getList"
  306. ></question-edit-dialog>
  307. <!-- QuestionPreviewDialog -->
  308. <question-preview-dialog
  309. ref="QuestionPreviewDialog"
  310. :question="curQuestion"
  311. ></question-preview-dialog>
  312. <!-- QuestionStatisticsDialog -->
  313. <question-statistics-dialog
  314. ref="QuestionStatisticsDialog"
  315. :course-id="filter.courseId"
  316. ></question-statistics-dialog>
  317. <!-- QuestionSafetySetDialog -->
  318. <question-safety-set-dialog
  319. ref="QuestionSafetySetDialog"
  320. ></question-safety-set-dialog>
  321. <!-- QuestionFolderDialog -->
  322. <question-folder-dialog
  323. ref="QuestionFolderDialog"
  324. :is-edit="false"
  325. @selected="folderSelected"
  326. ></question-folder-dialog>
  327. <!-- QuestionImportDialog -->
  328. <question-import-dialog
  329. ref="QuestionImportDialog"
  330. @modified="questionImported"
  331. ></question-import-dialog>
  332. <!-- FolderQuestionManageDialog -->
  333. <folder-question-manage-dialog
  334. ref="FolderQuestionManageDialog"
  335. ></folder-question-manage-dialog>
  336. <!-- QuestionImportEdit -->
  337. <question-import-edit
  338. ref="QuestionImportEdit"
  339. :data="questionImportData"
  340. @modified="toPage(1)"
  341. ></question-import-edit>
  342. <!-- GptQuestionDialog -->
  343. <gpt-question-dialog
  344. ref="GptQuestionDialog"
  345. :course="{
  346. courseId: curCourse.id,
  347. courseCode: curCourse.code,
  348. courseName: curCourse.name,
  349. }"
  350. @modified="getList"
  351. ></gpt-question-dialog>
  352. <router-view></router-view>
  353. </div>
  354. </template>
  355. <script>
  356. import {
  357. // questionPageListApi,
  358. deleteQuestionApi,
  359. moveQuestionApi,
  360. copyQuestionApi,
  361. checkGptQuestionEnableApi,
  362. aiQuestionConfirmApi,
  363. classifyQuestionPageListApi,
  364. getAiNums,
  365. } from "../api";
  366. import QuestionStatisticsDialog from "../components/QuestionStatisticsDialog.vue";
  367. import QuestionSafetySetDialog from "../components/QuestionSafetySetDialog.vue";
  368. import QuestionFolderDialog from "../components/QuestionFolderDialog.vue";
  369. import QuestionImportDialog from "../components/QuestionImportDialog.vue";
  370. import QuestionEditDialog from "../components/QuestionEditDialog.vue";
  371. import QuestionPreviewDialog from "../components/QuestionPreviewDialog.vue";
  372. import FolderQuestionManageDialog from "../components/FolderQuestionManageDialog.vue";
  373. import PropertyTreeSelect from "../components/PropertyTreeSelect.vue";
  374. import QuestionImportEdit from "../components/QuestionImportEdit.vue";
  375. import GptQuestionDialog from "../components/GptQuestionDialog.vue";
  376. import { mapActions, mapGetters } from "vuex";
  377. import { USER_SIGNIN } from "../../portal/store/user";
  378. import QuestionFolder from "@/modules/question/components/QuestionFolder.vue";
  379. export default {
  380. name: "QuestionMamage",
  381. components: {
  382. QuestionStatisticsDialog,
  383. QuestionSafetySetDialog,
  384. QuestionFolderDialog,
  385. QuestionImportDialog,
  386. QuestionEditDialog,
  387. QuestionPreviewDialog,
  388. FolderQuestionManageDialog,
  389. PropertyTreeSelect,
  390. QuestionImportEdit,
  391. GptQuestionDialog,
  392. QuestionFolder,
  393. },
  394. data() {
  395. return {
  396. treeCollapse: true,
  397. filter: {
  398. courseId: "",
  399. questionType: "",
  400. sourceDetailId: "",
  401. questionBody: "",
  402. // questionProperty: [],
  403. questionProperty: [],
  404. classifyId: "",
  405. // courseId: "",
  406. // questionType: "",
  407. // sourceDetailId: "",
  408. // questionProperty: [],
  409. },
  410. curFolderAction: "",
  411. folderList: [],
  412. questionList: [],
  413. selectedQuestionIds: [],
  414. currentPage: 1,
  415. pageSize: 10,
  416. total: 0,
  417. loading: false,
  418. curQuestion: {},
  419. curFolder: {},
  420. curCourse: {},
  421. curMoveType: "",
  422. questionImportData: {},
  423. gptQuestionEnable: false,
  424. curActionQids: [],
  425. aiWarningMsg: "",
  426. };
  427. },
  428. computed: {
  429. user() {
  430. return this.$store.state.user;
  431. },
  432. ...mapGetters(["authButtons"]),
  433. },
  434. mounted() {
  435. this.$refs.QuestionFolder.selectDefaultNode();
  436. this.checkGptEnable();
  437. this.toPage(1);
  438. },
  439. methods: {
  440. folderFilterSelected(folder) {
  441. console.log("left tree choose folder:", folder);
  442. if (!folder) return;
  443. this.curFolder = folder;
  444. this.filter = {
  445. classifyId: folder.id,
  446. courseId: "",
  447. questionType: "",
  448. sourceDetailId: "",
  449. questionProperty: [],
  450. };
  451. this.toPage(1);
  452. },
  453. ...mapActions([USER_SIGNIN]),
  454. async checkGptEnable() {
  455. const res = await checkGptQuestionEnableApi();
  456. // this.gptQuestionEnable = res.data;
  457. if (res.data) {
  458. let result = await getAiNums({
  459. rootOrgId: this.$store.state.user.rootOrgId,
  460. });
  461. if (result?.data?.leftCount == 0) {
  462. this.aiWarningMsg =
  463. "AI命题出题包已经用完,请联系教务处老师购买试题包后再出题";
  464. }
  465. console.log("result", result);
  466. } else {
  467. this.aiWarningMsg = "未开通AI命题功能,请联系教务处老师进行开通";
  468. }
  469. },
  470. toPage(page) {
  471. this.currentPage = page;
  472. this.getList();
  473. },
  474. async getList() {
  475. this.loading = true;
  476. this.selectedQuestionIds = [];
  477. let data = {
  478. ...this.filter,
  479. // pageNumber: this.currentPage,
  480. pageNumber: this.currentPage,
  481. pageSize: this.pageSize,
  482. };
  483. // data.questionProperty = data.questionProperty.join();
  484. data.questionProperty = data.questionProperty.join();
  485. // const res = await questionPageListApi(data).catch(() => {});
  486. const res = await classifyQuestionPageListApi(data).catch(() => {});
  487. this.loading = false;
  488. if (!res) return;
  489. this.questionList = res.data.content;
  490. this.total = res.data.totalElements;
  491. },
  492. handleSizeChange(val) {
  493. this.pageSize = val;
  494. this.toPage(1);
  495. },
  496. tableSelectChange(selections) {
  497. this.selectedQuestionIds = selections.map((item) => item.id);
  498. },
  499. courseChange(val) {
  500. this.curCourse = val || {};
  501. },
  502. toStatistics() {
  503. if (!this.filter.courseId) {
  504. this.$message.error("请先选择课程!");
  505. return;
  506. }
  507. // this.$refs.QuestionStatisticsDialog.open();
  508. this.$router.push({
  509. name: "QuestionTypeStatistics",
  510. query: {
  511. courseId: this.filter.courseId,
  512. courseName: this.curCourse.name,
  513. },
  514. });
  515. },
  516. toSafetySet() {
  517. this.$refs.QuestionSafetySetDialog.open();
  518. },
  519. toSourceDetailManage() {
  520. if (!this.filter.courseId) {
  521. this.$message.error("请先选择课程!");
  522. return;
  523. }
  524. window.sessionStorage.setItem(
  525. "courseInfo",
  526. JSON.stringify(this.curCourse)
  527. );
  528. this.$router.push({
  529. name: "SourceDetailManage",
  530. });
  531. },
  532. toCreateQuestion() {
  533. if (!this.filter.courseId) {
  534. this.$message.error("请先选择课程!");
  535. return;
  536. }
  537. this.curQuestion = {
  538. courseId: this.curCourse.id,
  539. courseCode: this.curCourse.code,
  540. courseName: this.curCourse.name,
  541. };
  542. this.$refs.QuestionEditDialog.open();
  543. },
  544. toImportQuestion() {
  545. this.$refs.QuestionImportDialog.open();
  546. // this.questionImportData = {
  547. // importData: {
  548. // courseId: 9,
  549. // courseName: "化学",
  550. // },
  551. // };
  552. // this.$refs.QuestionImportEdit.open();
  553. },
  554. toViewQuestion(row) {
  555. this.curQuestion = row;
  556. this.$refs.QuestionPreviewDialog.open();
  557. },
  558. toEditQuestion(row) {
  559. this.curQuestion = row;
  560. this.$refs.QuestionEditDialog.open();
  561. },
  562. toMoveQuestion(row) {
  563. // this.curQuestion = row;
  564. this.curActionQids = [row.id];
  565. this.curFolderAction = "move";
  566. this.$refs.QuestionFolderDialog.open();
  567. },
  568. toCopyQuestion(row) {
  569. // this.curQuestion = row;
  570. this.curActionQids = [row.id];
  571. this.curFolderAction = "copy";
  572. this.$refs.QuestionFolderDialog.open();
  573. },
  574. async folderSelected(folder) {
  575. if (folder.id === this.curFolder.id && this.curFolderAction === "move") {
  576. this.$message.error("内容就在当前当前文件中");
  577. return;
  578. }
  579. let res = null;
  580. // if (this.curFolderAction === "move") {
  581. // res = await moveQuestionApi(this.curQuestion.id, folder.id).catch(
  582. // () => {}
  583. // );
  584. // } else {
  585. // res = await copyQuestionApi(this.curQuestion.id, folder.id).catch(
  586. // () => {}
  587. // );
  588. // }
  589. if (this.curFolderAction === "move") {
  590. res = await moveQuestionApi(this.curActionQids.join(), folder.id).catch(
  591. () => {}
  592. );
  593. } else {
  594. res = await copyQuestionApi(this.curActionQids.join(), folder.id).catch(
  595. () => {}
  596. );
  597. }
  598. if (!res) return;
  599. this.$message.success("操作成功!");
  600. this.getList();
  601. },
  602. async deleteQuestion(ids) {
  603. this.loading = true;
  604. const res = await deleteQuestionApi(ids.join()).catch(() => {});
  605. this.loading = false;
  606. if (!res) return;
  607. this.$notify({
  608. message: "删除成功",
  609. type: "success",
  610. });
  611. this.getList();
  612. },
  613. async toDeleteQuestion(row) {
  614. const confirm = await this.$confirm("确认删除试题吗?", "提示", {
  615. type: "warning",
  616. }).catch(() => {});
  617. if (confirm !== "confirm") return;
  618. this.deleteQuestion([row.id]);
  619. },
  620. toBatchMove() {
  621. if (!this.selectedQuestionIds.length) {
  622. this.$message.error("请选择试题!");
  623. return;
  624. }
  625. this.curActionQids = [...this.selectedQuestionIds];
  626. this.curFolderAction = "move";
  627. this.$refs.QuestionFolderDialog.open();
  628. },
  629. toBatchCopy() {
  630. if (!this.selectedQuestionIds.length) {
  631. this.$message.error("请选择试题!");
  632. return;
  633. }
  634. this.curActionQids = [...this.selectedQuestionIds];
  635. this.curFolderAction = "copy";
  636. this.$refs.QuestionFolderDialog.open();
  637. },
  638. async toBatchDelete() {
  639. if (!this.selectedQuestionIds.length) {
  640. this.$message.error("请选择试题!");
  641. return;
  642. }
  643. const confirm = await this.$confirm("确认删除选中试题吗?", "提示", {
  644. type: "warning",
  645. }).catch(() => {});
  646. if (confirm !== "confirm") return;
  647. this.deleteQuestion(this.selectedQuestionIds);
  648. },
  649. toRecycle() {
  650. this.$router.push({
  651. name: "QuestionRecycle",
  652. });
  653. },
  654. toAddFolder() {
  655. this.$refs.FolderQuestionManageDialog.open();
  656. },
  657. questionImported(data) {
  658. if (data.importType !== "word") {
  659. this.getList();
  660. return;
  661. }
  662. console.log("questionImported data", data);
  663. this.questionImportData = data;
  664. this.$refs.QuestionImportEdit.open();
  665. },
  666. async toGPTQuestion() {
  667. // if (this.aiWarningMsg) {
  668. // this.$message.error(this.aiWarningMsg);
  669. // return;
  670. // }
  671. if (!this.filter.courseId) {
  672. this.$message.error("请先选择课程!");
  673. return;
  674. }
  675. if (!this.user.aiQuestionConfirm) {
  676. const confirm = await this.$confirm(
  677. `请务必仔细阅读本协议内容,若您不同意本协议的任何内容,将无法使用该功能,AI命题功能借助AI工具来辅助出题,提高出题效率,减轻命题老师工作量,并不确保出题的正确性及适用性,请在出题后务必仔细检查核对,以免将有问题的试题加入试卷,用于考试。`,
  678. "提示",
  679. {
  680. type: "warning",
  681. }
  682. ).catch(() => {});
  683. if (confirm !== "confirm") return;
  684. await aiQuestionConfirmApi();
  685. this.USER_SIGNIN(
  686. Object.assign({}, this.user, { aiQuestionConfirm: true })
  687. );
  688. }
  689. this.$refs.GptQuestionDialog.open();
  690. },
  691. },
  692. };
  693. </script>
  694. <style lang="scss" scoped>
  695. .question-manage {
  696. .question-list {
  697. :deep(.row-question-body) {
  698. img {
  699. max-height: 100px;
  700. width: auto !important;
  701. }
  702. }
  703. }
  704. .collapse-icon-box {
  705. width: 0;
  706. position: relative;
  707. overflow: visible;
  708. .icon-circle {
  709. width: 16px;
  710. height: 16px;
  711. border-radius: 50%;
  712. display: flex;
  713. justify-content: center;
  714. align-items: center;
  715. border: 2px solid #6d5ff6;
  716. position: absolute;
  717. left: 50%;
  718. top: 30px;
  719. transform: translateX(-50%) translateY(-50%);
  720. cursor: pointer;
  721. background-color: #6d5ff6;
  722. i {
  723. font-size: 10px;
  724. color: #fff;
  725. }
  726. }
  727. }
  728. .folder-question {
  729. min-height: calc(100vh - 306px);
  730. }
  731. .search-box {
  732. display: flex;
  733. align-items: center;
  734. justify-content: space-between;
  735. .right-btns {
  736. display: flex;
  737. align-items: center;
  738. }
  739. }
  740. }
  741. </style>
  742. <style lang="scss">
  743. @media screen and (max-width: 1366px) {
  744. .question-manage {
  745. .part-filter-form {
  746. .el-form-item {
  747. // width: 180px !important;
  748. }
  749. }
  750. }
  751. }
  752. </style>