소스 검색

paper center - function missing fixed

hare8999@163.com 2 년 전
부모
커밋
d46dd321b9
1개의 변경된 파일22개의 추가작업 그리고 2개의 파일을 삭제
  1. 22 2
      src/views/questioncenter/components/generate-tabs/paper-record.vue

+ 22 - 2
src/views/questioncenter/components/generate-tabs/paper-record.vue

@@ -48,7 +48,13 @@
 <script>
 import PaperWorkIdentifierMixin from './paper-work-identifier-mixin'
 import MxCondition from '@/components/MxCondition/mx-condition'
-import { deletePaper, download, listCustomerPaperQeustions, paperRecords } from '@/api/webApi/webQue'
+import {
+  deletePaper,
+  download,
+  listCustomerPaperQeustions,
+  paperRecords,
+  saveToPersonResources, updateNameById
+} from '@/api/webApi/webQue'
 import consts from '@/common/mx-const'
 import { mapGetters } from 'vuex'
 
@@ -129,10 +135,24 @@ export default {
       this.getPaperRecords()
     },
     clickSendToResource(paperId) {
-
+      this.tableLoading = true;
+      saveToPersonResources(paperId).then((res) => {
+        this.tableLoading = false;
+        this.msgSuccess("发送成功");
+      });
     },
     savePaperName() {
+      const paperName = this.dialogPaperName?.trim();
+      if (!paperName) {
+        this.msgError("试卷标题不能为空");
+        return;
+      }
 
+      updateNameById(this.dialogPager.paperId, paperName).then((res) => {
+        this.dialogPager.name = paperName;
+        this.dialogPaperNameVisible = false;
+        this.msgSuccess("修改成功");
+      });
     }
   }
 }