Michael Wang 6 жил өмнө
parent
commit
2b308c4e8d
58 өөрчлөгдсөн 460 нэмэгдсэн , 429 устгасан
  1. 8 6
      src/constants/constants.js
  2. 2 2
      src/modules/basic/view/app_list.vue
  3. 10 10
      src/modules/basic/view/campus.vue
  4. 17 17
      src/modules/basic/view/course.vue
  5. 6 6
      src/modules/basic/view/exam_site.vue
  6. 3 3
      src/modules/basic/view/index.vue
  7. 2 2
      src/modules/basic/view/privilege_group_list.vue
  8. 6 6
      src/modules/basic/view/privilege_tree.vue
  9. 8 8
      src/modules/basic/view/role_privilege_settings.vue
  10. 8 8
      src/modules/basic/view/school.vue
  11. 15 15
      src/modules/basic/view/specially.vue
  12. 17 17
      src/modules/basic/view/user.vue
  13. 13 14
      src/modules/examwork/view/student.vue
  14. 3 7
      src/modules/marking/constants/constants.js
  15. 1 1
      src/modules/marking/views/CourseDetail.vue
  16. 2 1
      src/modules/marking/views/MarkGradeMain.vue
  17. 2 5
      src/modules/marking/views/MarkPaperCheck.vue
  18. 1 1
      src/modules/marking/views/MarkSettingFast.vue
  19. 1 1
      src/modules/marking/views/MarkSettingMain.vue
  20. 1 1
      src/modules/marking/views/MarkSettingWork.vue
  21. 1 5
      src/modules/marking/views/MarkWork.vue
  22. 1 1
      src/modules/marking/views/MarkWorkOverview.vue
  23. 1 1
      src/modules/marking/views/Marker.vue
  24. 1 1
      src/modules/marking/views/MarkerDetail.vue
  25. 6 2
      src/modules/marking/views/Marking.vue
  26. 2 1
      src/modules/marking/views/TpScoreBoard.vue
  27. 1 1
      src/modules/marking/views/ViewPaper.vue
  28. 2 2
      src/modules/portal/views/Login.vue
  29. 3 3
      src/modules/portal/views/home/Home.vue
  30. 2 2
      src/modules/portal/views/home/HomeMain.vue
  31. 2 2
      src/modules/portal/views/home/HomeSide.vue
  32. 2 4
      src/modules/print/constants/constants.js
  33. 5 9
      src/modules/print/view/CourseStatistic.vue
  34. 4 3
      src/modules/print/view/ExamStructure.vue
  35. 7 6
      src/modules/print/view/Project.vue
  36. 7 6
      src/modules/print/view/ProjectStatistic.vue
  37. 4 3
      src/modules/print/view/ProjectTemplate.vue
  38. 2 4
      src/modules/questions/constants/constants.js
  39. 4 4
      src/modules/questions/views/BluePaperStructure.vue
  40. 11 7
      src/modules/questions/views/CourseProperty.vue
  41. 2 1
      src/modules/questions/views/EditOtherQuestion.vue
  42. 16 15
      src/modules/questions/views/EditPaper.vue
  43. 32 27
      src/modules/questions/views/EditSelectQuestion.vue
  44. 9 12
      src/modules/questions/views/ExportStructure.vue
  45. 21 9
      src/modules/questions/views/ExtractPaperInfo.vue
  46. 37 37
      src/modules/questions/views/ExtractPaperRule.vue
  47. 17 14
      src/modules/questions/views/GenPaper.vue
  48. 10 10
      src/modules/questions/views/GenPaperDetail.vue
  49. 39 41
      src/modules/questions/views/ImportPaper.vue
  50. 2 2
      src/modules/questions/views/ImportPaperInfo.vue
  51. 10 5
      src/modules/questions/views/InsertBluePaperStructure.vue
  52. 6 5
      src/modules/questions/views/InsertBluePaperStructureInfo.vue
  53. 2 2
      src/modules/questions/views/InsertPaperStructure.vue
  54. 3 2
      src/modules/questions/views/InsertPaperStructureInfo.vue
  55. 7 5
      src/modules/questions/views/InsertPaperTitle.vue
  56. 4 4
      src/modules/questions/views/PaperStructure.vue
  57. 7 7
      src/modules/questions/views/PropertyInfo.vue
  58. 42 33
      src/modules/questions/views/Question.vue

+ 8 - 6
src/constants/constants.js

@@ -1,6 +1,8 @@
-export const core_api = "/api/ecs_core"; //基础信息API
-export const exam_work_api = "/api/ecs_exam_work"; //考务信息系统API
-export const marking_api = "/api/ecs_marking"; //阅卷API
-export const data_process_api = "/api/ecs_data_process"; //数据中间层API
-export const oe_api = "/api/ecs_oe"; //网考API
-export const question_api = "/api/ecs_ques"; //题库API
+export const CORE_API = "/api/ecs_core"; //基础信息API
+export const EXAM_WORK_API = "/api/ecs_exam_work"; //考务信息API
+export const MARKING_API = "/api/ecs_marking"; //阅卷API
+export const DATA_PROCESS_API = "/api/ecs_data_process"; //数据中间层API
+export const OE_API = "/api/ecs_oe"; //网考API
+export const QUESTION_API = "/api/ecs_ques"; //题库API
+export const OUTLET_API = "/api/ecs_outlet";
+export const PRINT_API = "/api/ecs_prt";

+ 2 - 2
src/modules/basic/view/app_list.vue

@@ -29,7 +29,7 @@
 <script>
 import { mapActions, mapState } from "vuex";
 import { USER_SIGNIN } from "../../portal/store/user";
-import { core_api } from "@/constants/constants.js";
+import { CORE_API } from "@/constants/constants.js";
 
 export default {
   data() {
@@ -44,7 +44,7 @@ export default {
     ...mapActions([USER_SIGNIN]),
 
     queryAppList: function() {
-      var url = core_api + "/app/getAllApp";
+      var url = CORE_API + "/app/getAllApp";
       this.$http
         .get(url)
         .then(response => {

+ 10 - 10
src/modules/basic/view/campus.vue

@@ -290,7 +290,7 @@
   </div>
 </template>
 <script>
-import { core_api } from "@/constants/constants.js";
+import { CORE_API } from "@/constants/constants.js";
 import { mapState } from "vuex";
 
 export default {
@@ -323,7 +323,7 @@ export default {
       total: 10,
 
       impDialog: false,
-      uploadAction: core_api + "/org/importSubOrg",
+      uploadAction: CORE_API + "/org/importSubOrg",
       uploadHeaders: {},
       uploadData: {},
       errMessages: [],
@@ -379,7 +379,7 @@ export default {
       return status;
     },
     import() {
-      this.imp = core_api + "/org/" + 0 + "/import";
+      this.imp = CORE_API + "/org/" + 0 + "/import";
     },
     handleCurrentChange(val) {
       this.currentPage = val;
@@ -390,7 +390,7 @@ export default {
       this.loading = true;
       var param = new URLSearchParams(this.formSearch);
       var url =
-        core_api +
+        CORE_API +
         "/org/subOrgPage/" +
         (this.currentPage - 1) +
         "/" +
@@ -423,7 +423,7 @@ export default {
           cancelButtonText: "取消",
           type: "warning"
         }).then(() => {
-          var url = core_api + "/org/enable/" + this.orgIds;
+          var url = CORE_API + "/org/enable/" + this.orgIds;
           this.$http
             .put(url)
             .then(() => {
@@ -457,7 +457,7 @@ export default {
           cancelButtonText: "取消",
           type: "warning"
         }).then(() => {
-          var url = core_api + "/org/disable/" + this.orgIds;
+          var url = CORE_API + "/org/disable/" + this.orgIds;
           this.$http
             .put(url, {})
             .then(() => {
@@ -495,7 +495,7 @@ export default {
       this.$refs.campusForm.validate(valid => {
         if (valid) {
           if (null != this.campusForm.id) {
-            url = core_api + "/org/updateSubOrg";
+            url = CORE_API + "/org/updateSubOrg";
             this.$http.put(url, this.campusForm).then(
               () => {
                 this.$notify({
@@ -518,7 +518,7 @@ export default {
             );
           } else {
             //新增
-            var url = core_api + "/org/addSubOrg";
+            var url = CORE_API + "/org/addSubOrg";
             this.$http.post(url, this.campusForm).then(
               () => {
                 this.$notify({
@@ -655,7 +655,7 @@ export default {
     //下载模板
     exportFile() {
       window.location.href =
-        core_api +
+        CORE_API +
         "/org/importTemplate?$key=" +
         this.user.key +
         "&$token=" +
@@ -669,7 +669,7 @@ export default {
         }
       }
 
-      this.$http.get(core_api + "/org/getRootOrgList").then(response => {
+      this.$http.get(CORE_API + "/org/getRootOrgList").then(response => {
         this.rootOrgList = response.data;
         this.formSearch.parentId = this.user.rootOrgId;
         this.searchForm();

+ 17 - 17
src/modules/basic/view/course.vue

@@ -435,7 +435,7 @@
 </template>
 
 <script>
-import { core_api } from "@/constants/constants.js";
+import { CORE_API } from "@/constants/constants.js";
 import { ENABLE_TYPE, LEVEL_TYPE } from "../constants/constants.js";
 import { mapState } from "vuex";
 
@@ -472,7 +472,7 @@ export default {
       specialtyAll: [],
 
       impDialog: false,
-      uploadAction: core_api + "/course/import",
+      uploadAction: CORE_API + "/course/import",
       uploadHeaders: {},
       uploadData: {},
       errMessages: [],
@@ -605,7 +605,7 @@ export default {
         courseId: courseId,
         specialtyId: specialtyId
       });
-      var url = core_api + "/courseSpeciatlyRelation/delete?" + param;
+      var url = CORE_API + "/courseSpeciatlyRelation/delete?" + param;
       this.$http
         .delete(url)
         .then(() => {
@@ -629,7 +629,7 @@ export default {
       this.$refs.addRelationForm.validate(valid => {
         if (valid) {
           var param = new URLSearchParams(this.addRelationForm);
-          var url = core_api + "/courseSpeciatlyRelation/add?" + param;
+          var url = CORE_API + "/courseSpeciatlyRelation/add?" + param;
           this.$http.post(url, this.speciallyForm).then(
             () => {
               this.$notify({
@@ -658,7 +658,7 @@ export default {
     getSpecialtyList4AddRelation(query) {
       this.specialtyLoading4AddRelation = true;
       this.$http
-        .get(core_api + "/specialty/query?name=" + query)
+        .get(CORE_API + "/specialty/query?name=" + query)
         .then(response => {
           this.specialtyList4AddRelation = response.data;
           this.specialtyLoading4AddRelation = false;
@@ -679,7 +679,7 @@ export default {
     searchSpecialtyPage() {
       var param = new URLSearchParams(this.specialtySearchForm);
       var url =
-        core_api +
+        CORE_API +
         "/specialty/specialtyPage/" +
         (this.currentPage - 1) +
         "/" +
@@ -721,7 +721,7 @@ export default {
     getSpecialtyList4Search(query) {
       this.specialtyLoading4Search = true;
       this.$http
-        .get(core_api + "/specialty/query?name=" + query)
+        .get(CORE_API + "/specialty/query?name=" + query)
         .then(response => {
           this.specialtyList4Search = response.data;
           this.specialtyLoading4Search = false;
@@ -730,7 +730,7 @@ export default {
     searchForm() {
       var param = new URLSearchParams(this.formSearch);
       var url =
-        core_api +
+        CORE_API +
         "/course/coursePage/" +
         (this.currentPage - 1) +
         "/" +
@@ -774,7 +774,7 @@ export default {
     exportCourse() {
       var param = new URLSearchParams(this.formSearch);
       window.open(
-        core_api +
+        CORE_API +
           "/course/export?$key=" +
           this.user.key +
           "&$token=" +
@@ -805,7 +805,7 @@ export default {
     saveRelation() {},
     //保存(新增/修改)
     submitForm() {
-      var url = core_api + "/course";
+      var url = CORE_API + "/course";
       if (null != this.courseForm.id) {
         //修改
         this.$refs.courseForm.validate(valid => {
@@ -876,7 +876,7 @@ export default {
         cancelButtonText: "取消",
         type: "warning"
       }).then(() => {
-        var url = core_api + "/course/" + row.id;
+        var url = CORE_API + "/course/" + row.id;
         this.$http
           .delete(url)
           .then(() => {
@@ -910,7 +910,7 @@ export default {
           cancelButtonText: "取消",
           type: "error"
         }).then(() => {
-          var url = core_api + "/course/" + this.courseIds;
+          var url = CORE_API + "/course/" + this.courseIds;
           this.$http
             .delete(url)
             .then(() => {
@@ -945,7 +945,7 @@ export default {
           cancelButtonText: "取消",
           type: "warning"
         }).then(() => {
-          var url = core_api + "/course/enable/" + this.courseIds;
+          var url = CORE_API + "/course/enable/" + this.courseIds;
           this.$http
             .put(url, {})
             .then(() => {
@@ -973,7 +973,7 @@ export default {
         cancelButtonText: "取消",
         type: "warning"
       }).then(() => {
-        var url = core_api + "/course/enable/" + row.id;
+        var url = CORE_API + "/course/enable/" + row.id;
         this.$http
           .put(url, {})
           .then(() => {
@@ -1007,7 +1007,7 @@ export default {
           cancelButtonText: "取消",
           type: "error"
         }).then(() => {
-          var url = core_api + "/course/disable/" + this.courseIds;
+          var url = CORE_API + "/course/disable/" + this.courseIds;
           this.$http
             .put(url, {})
             .then(() => {
@@ -1036,7 +1036,7 @@ export default {
         cancelButtonText: "取消",
         type: "error"
       }).then(() => {
-        var url = core_api + "/course/disable/" + row.id;
+        var url = CORE_API + "/course/disable/" + row.id;
         this.$http
           .put(url, {})
           .then(() => {
@@ -1142,7 +1142,7 @@ export default {
     //下载模板
     exportFile() {
       window.location.href =
-        core_api +
+        CORE_API +
         "/course/importTemplate?$key=" +
         this.user.key +
         "&$token=" +

+ 6 - 6
src/modules/basic/view/exam_site.vue

@@ -193,7 +193,7 @@
 </template>
 
 <script>
-import { core_api } from "@/constants/constants.js";
+import { CORE_API } from "@/constants/constants.js";
 import { mapState } from "vuex";
 
 export default {
@@ -261,7 +261,7 @@ export default {
       this.loading = true;
       var param = new URLSearchParams(this.formSearch);
       var url =
-        core_api +
+        CORE_API +
         "/examSite/examSitePage/" +
         (this.currentPage - 1) +
         "/" +
@@ -289,7 +289,7 @@ export default {
     submitForm() {
       this.$refs.examSiteForm.validate(valid => {
         if (valid) {
-          var url = core_api + "/examSite";
+          var url = CORE_API + "/examSite";
           if (this.examSiteForm.id) {
             this.$http.put(url, this.examSiteForm).then(
               () => {
@@ -370,7 +370,7 @@ export default {
         cancelButtonText: "取消",
         type: "warning"
       }).then(() => {
-        var url = core_api + "/examSite/" + row.id;
+        var url = CORE_API + "/examSite/" + row.id;
         this.$http
           .delete(url)
           .then(() => {
@@ -404,7 +404,7 @@ export default {
           cancelButtonText: "取消",
           type: "error"
         }).then(() => {
-          var url = core_api + "/examSite/" + this.examSiteIds;
+          var url = CORE_API + "/examSite/" + this.examSiteIds;
           this.$http
             .delete(url)
             .then(() => {
@@ -427,7 +427,7 @@ export default {
       }
     },
     init() {
-      var url = core_api + "/org/subOrg/" + this.orgId;
+      var url = CORE_API + "/org/subOrg/" + this.orgId;
       this.$http
         .get(url)
         .then(response => {

+ 3 - 3
src/modules/basic/view/index.vue

@@ -85,7 +85,7 @@
 
 <script>
 import { mapState } from "vuex";
-import { core_api } from "@/constants/constants.js";
+import { CORE_API } from "@/constants/constants.js";
 
 export default {
   data() {
@@ -100,7 +100,7 @@ export default {
   methods: {
     logout() {
       this.$http
-        .post(core_api + "/auth/logout")
+        .post(CORE_API + "/auth/logout")
         .then(() => {
           window.location.href = sessionStorage.getItem("loginUrl");
         })
@@ -120,7 +120,7 @@ export default {
     }
   },
   created() {
-    var url = core_api + "/rolePrivilege/getUserPrivileges";
+    var url = CORE_API + "/rolePrivilege/getUserPrivileges";
     this.$http
       .post(
         url,

+ 2 - 2
src/modules/basic/view/privilege_group_list.vue

@@ -39,7 +39,7 @@
 
 <script>
 import { mapState } from "vuex";
-import { core_api } from "@/constants/constants.js";
+import { CORE_API } from "@/constants/constants.js";
 
 export default {
   data() {
@@ -52,7 +52,7 @@ export default {
   },
   methods: {
     async queryAppList() {
-      var url = core_api + "/rolePrivilege/getPrivilegeGroupList";
+      var url = CORE_API + "/rolePrivilege/getPrivilegeGroupList";
       const response = await this.$http.get(url);
       this.privilegeGroupList = response.data;
     },

+ 6 - 6
src/modules/basic/view/privilege_tree.vue

@@ -247,7 +247,7 @@
 </template>
 
 <script type="text/jsx">
-import { core_api } from "@/constants/constants.js";
+import { CORE_API } from "@/constants/constants.js";
 
 let checkWeight = (rule, value, callback) => {
     if (('0' != value) && (!value)) {
@@ -394,7 +394,7 @@ export default {
                 if (!valid) {
                     return;
                 }
-                var url = core_api + '/rolePrivilege/addPrivilege';
+                var url = CORE_API + '/rolePrivilege/addPrivilege';
                 this.$http.post(url, this.addingDialog.privilege).then((response) => {
                     this.$notify({
                         message: '添加成功',
@@ -424,7 +424,7 @@ export default {
                     return;
                 }
                 console.log(this.updateDialog.privilege);
-                var url = core_api + '/rolePrivilege/updatePrivilege';
+                var url = CORE_API + '/rolePrivilege/updatePrivilege';
                 this.$http.put(url, this.updateDialog.privilege).then(() => {
                     this.$notify({
                         message: '修改成功',
@@ -457,7 +457,7 @@ export default {
             this.getPrivilege(data.id, "for-show");
         },
         getPrivilege(id, type) {
-            var url = core_api + '/rolePrivilege/getPrivilege/' + id;
+            var url = CORE_API + '/rolePrivilege/getPrivilege/' + id;
             this.$http.get(url).then((response) => {
                 var resp = response.data;
 
@@ -510,7 +510,7 @@ export default {
                 cancelButtonText: '取消',
                 type: 'warning'
             }).then(() => {
-                var url = core_api + '/rolePrivilege/deletePrivilege/' + data.id;
+                var url = CORE_API + '/rolePrivilege/deletePrivilege/' + data.id;
                 this.$http.delete(url).then(() => {
                     this.$notify({
                         message: '删除成功',
@@ -563,7 +563,7 @@ export default {
         },
 
         async initTree() {
-            var url = core_api + '/rolePrivilege/getPrivilegeTree/' + this.privilegeGroupId;
+            var url = CORE_API + '/rolePrivilege/getPrivilegeTree/' + this.privilegeGroupId;
             const response = await this.$httpWithMsg.get(url);
             this.rootTreeNode.id = response.data.id;
             this.rootTreeNode.label = response.data.label;

+ 8 - 8
src/modules/basic/view/role_privilege_settings.vue

@@ -101,7 +101,7 @@
 
 <script>
 import { mapState } from "vuex";
-import { core_api } from "@/constants/constants.js";
+import { CORE_API } from "@/constants/constants.js";
 
 export default {
   data() {
@@ -139,10 +139,10 @@ export default {
         }
       }
 
-      var url1 = core_api + "/org/getRootOrgList";
+      var url1 = CORE_API + "/org/getRootOrgList";
       var url2 =
-        core_api + "/rolePrivilege/getRoles?includeSuperAdmin=" + false;
-      var url3 = core_api + "/rolePrivilege/getPrivilegeGroupList";
+        CORE_API + "/rolePrivilege/getRoles?includeSuperAdmin=" + false;
+      var url3 = CORE_API + "/rolePrivilege/getPrivilegeGroupList";
 
       Promise.all([
         this.$http.get(url1),
@@ -171,9 +171,9 @@ export default {
     /*初始化权限树*/
     initTree(orgId, roleId, privilegeGroupId) {
       var url1 =
-        core_api + "/rolePrivilege/getPrivilegeTree/" + privilegeGroupId;
+        CORE_API + "/rolePrivilege/getPrivilegeTree/" + privilegeGroupId;
       var url2 =
-        core_api + "/rolePrivilege/getPrivilegeIdList/" + orgId + "/" + roleId;
+        CORE_API + "/rolePrivilege/getPrivilegeIdList/" + orgId + "/" + roleId;
 
       Promise.all([this.$http.get(url1), this.$http.get(url2)]).then(
         ([resp1, resp2]) => {
@@ -203,7 +203,7 @@ export default {
       }
 
       var url =
-        core_api +
+        CORE_API +
         "/rolePrivilege/getRoles?includeSuperAdmin=false&rootOrgId=" +
         this.form.orgId;
       this.$http
@@ -265,7 +265,7 @@ export default {
     },
     save() {
       console.log("save(). checkedKeys:", this.checkedKeys);
-      var url = core_api + "/rolePrivilege/updateRolePrivilegeRelations";
+      var url = CORE_API + "/rolePrivilege/updateRolePrivilegeRelations";
       this.$http
         .post(url, {
           rootOrgId: this.form.orgId,

+ 8 - 8
src/modules/basic/view/school.vue

@@ -316,7 +316,7 @@
 </template>
 
 <script>
-import { core_api } from "@/constants/constants.js";
+import { CORE_API } from "@/constants/constants.js";
 import { mapState } from "vuex";
 
 export default {
@@ -415,7 +415,7 @@ export default {
       this.loading = true;
       var param = new URLSearchParams(this.formSearch);
       var url =
-        core_api +
+        CORE_API +
         "/org/rootOrgPage/" +
         (this.currentPage - 1) +
         "/" +
@@ -441,7 +441,7 @@ export default {
           cancelButtonText: "取消",
           type: "warning"
         }).then(() => {
-          var url = core_api + "/org/enable/" + this.orgIds;
+          var url = CORE_API + "/org/enable/" + this.orgIds;
           this.$http
             .put(url)
             .then(() => {
@@ -475,7 +475,7 @@ export default {
           cancelButtonText: "取消",
           type: "warning"
         }).then(() => {
-          var url = core_api + "/org/disable/" + this.orgIds;
+          var url = CORE_API + "/org/disable/" + this.orgIds;
           this.$http
             .put(url, {})
             .then(() => {
@@ -514,7 +514,7 @@ export default {
         if (valid) {
           if (null != this.schoolForm.id) {
             //修改
-            url = core_api + "/org/updateRootOrg";
+            url = CORE_API + "/org/updateRootOrg";
             this.$http.put(url, this.schoolForm).then(
               () => {
                 this.$notify({
@@ -536,7 +536,7 @@ export default {
             );
           } else {
             //新增
-            var url = core_api + "/org/addRootOrg";
+            var url = CORE_API + "/org/addRootOrg";
             this.$http.post(url, this.schoolForm).then(
               () => {
                 this.$notify({
@@ -587,7 +587,7 @@ export default {
       this.schoolForm.properties.OE_STUDENT_SYS_NAME = "";
       this.schoolForm.enable = row.enable ? "true" : "false";
 
-      var url = core_api + "/org/allProperties/" + row.id;
+      var url = CORE_API + "/org/allProperties/" + row.id;
       this.$http.get(url).then(
         response => {
           this.schoolForm.properties = Object.assign(
@@ -608,7 +608,7 @@ export default {
     saveOrgFunction() {},
     //设置logo
     setLogo(row) {
-      this.uploadAction = core_api + "/org/importLogo/" + row.id;
+      this.uploadAction = CORE_API + "/org/importLogo/" + row.id;
       this.removeFile();
       this.curSchool.name = row.name;
       this.curSchool.code = row.code;

+ 15 - 15
src/modules/basic/view/specially.vue

@@ -352,7 +352,7 @@
 </template>
 
 <script>
-import { core_api } from "@/constants/constants.js";
+import { CORE_API } from "@/constants/constants.js";
 import { mapState } from "vuex";
 
 export default {
@@ -384,7 +384,7 @@ export default {
       courseAll: [],
 
       impDialog: false,
-      uploadAction: core_api + "/specialty/import",
+      uploadAction: CORE_API + "/specialty/import",
       uploadHeaders: {},
       uploadData: {},
       errMessages: [],
@@ -464,7 +464,7 @@ export default {
         courseId: courseId,
         specialtyId: specialtyId
       });
-      var url = core_api + "/courseSpeciatlyRelation/delete?" + param;
+      var url = CORE_API + "/courseSpeciatlyRelation/delete?" + param;
       this.$http
         .delete(url)
         .then(() => {
@@ -488,7 +488,7 @@ export default {
       this.$refs.addRelationForm.validate(valid => {
         if (valid) {
           var param = new URLSearchParams(this.addRelationForm);
-          var url = core_api + "/courseSpeciatlyRelation/add?" + param;
+          var url = CORE_API + "/courseSpeciatlyRelation/add?" + param;
           this.$http.post(url, this.speciallyForm).then(
             () => {
               this.$notify({
@@ -524,7 +524,7 @@ export default {
     searchCoursePage() {
       var param = new URLSearchParams(this.courseSearchForm);
       var url =
-        core_api +
+        CORE_API +
         "/course/coursePage/" +
         (this.currentPage - 1) +
         "/" +
@@ -540,7 +540,7 @@ export default {
     getCourses(query) {
       this.courseLoading = true;
       this.$http
-        .get(core_api + "/course/query?name=" + query)
+        .get(CORE_API + "/course/query?name=" + query)
         .then(response => {
           this.courseList4Search = response.data;
           this.courseLoading = false;
@@ -549,7 +549,7 @@ export default {
     getCourses4AddRelation(query) {
       this.courseLoading4AddRelation = true;
       this.$http
-        .get(core_api + "/course/query?name=" + query)
+        .get(CORE_API + "/course/query?name=" + query)
         .then(response => {
           this.courseList4AddRelation = response.data;
           this.courseLoading4AddRelation = false;
@@ -559,7 +559,7 @@ export default {
     searchForm() {
       var param = new URLSearchParams(this.formSearch);
       var url =
-        core_api +
+        CORE_API +
         "/specialty/specialtyPage/" +
         (this.currentPage - 1) +
         "/" +
@@ -604,7 +604,7 @@ export default {
       }).then(() => {
         this.loading = true;
         var vm = this;
-        var url = core_api;
+        var url = CORE_API;
         vm.$http.delete(url).then(() => {
           this.loading = false;
           this.$notify({
@@ -619,7 +619,7 @@ export default {
     submitForm(formData) {
       this.$refs[formData].validate(valid => {
         if (valid) {
-          var url = core_api + "/specialty";
+          var url = CORE_API + "/specialty";
           //修改
           if (null != this.speciallyForm.id) {
             this.$http.put(url, this.speciallyForm).then(
@@ -703,7 +703,7 @@ export default {
         cancelButtonText: "取消",
         type: "error"
       }).then(() => {
-        var url = core_api + "/specialty/" + row.id;
+        var url = CORE_API + "/specialty/" + row.id;
         this.$http
           .delete(url)
           .then(() => {
@@ -741,7 +741,7 @@ export default {
           for (var i = 0; i < this.multipleSelection.length; i++) {
             ids.push(this.multipleSelection[i].id);
           }
-          var url = core_api + "/specialty/" + ids;
+          var url = CORE_API + "/specialty/" + ids;
           this.$http
             .delete(url)
             .then(() => {
@@ -783,7 +783,7 @@ export default {
     },
     saveCourse() {
       //debugger;
-      var url = core_api + "/CourseSpeciatly/addCourse/" + this.speciatlyId;
+      var url = CORE_API + "/CourseSpeciatly/addCourse/" + this.speciatlyId;
       this.$http.post(url, this.courseList).then(
         () => {
           this.$notify({
@@ -806,7 +806,7 @@ export default {
     exportSpeciatly() {
       let param = new URLSearchParams(this.formSearch);
       window.open(
-        core_api +
+        CORE_API +
           "/specialty/export?$key=" +
           this.user.key +
           "&$token=" +
@@ -900,7 +900,7 @@ export default {
     //下载模板
     exportFile() {
       window.location.href =
-        core_api +
+        CORE_API +
         "/specialty/importTemplate?$key=" +
         this.user.key +
         "&$token=" +

+ 17 - 17
src/modules/basic/view/user.vue

@@ -451,7 +451,7 @@
 </template>
 
 <script>
-import { core_api } from "@/constants/constants.js";
+import { CORE_API } from "@/constants/constants.js";
 import { mapState } from "vuex";
 
 export default {
@@ -605,7 +605,7 @@ export default {
     },
     rootOrgChanged4Search() {
       var url =
-        core_api +
+        CORE_API +
         "/rolePrivilege/getRoles?includeSuperAdmin=" +
         true +
         "&rootOrgId=" +
@@ -629,7 +629,7 @@ export default {
       this.orgList4InsertOrUpdate = [];
 
       var url =
-        core_api +
+        CORE_API +
         "/rolePrivilege/getRoles?includeSuperAdmin=" +
         true +
         "&rootOrgId=" +
@@ -653,7 +653,7 @@ export default {
     getOrgList4InsertOrUpdate(query) {
       this.orgLoading4InsertOrUpdate = true;
       var url =
-        core_api +
+        CORE_API +
         "/org/query?" +
         new URLSearchParams({
           name: query,
@@ -704,7 +704,7 @@ export default {
       this.loading = true;
       var param = new URLSearchParams(this.searchForm);
       var url =
-        core_api +
+        CORE_API +
         "/user/all/" +
         this.currentPage +
         "/" +
@@ -780,11 +780,11 @@ export default {
     },
     exportUser() {
       var param = new URLSearchParams(this.searchForm);
-      window.open(core_api + "/user/export?" + param);
+      window.open(CORE_API + "/user/export?" + param);
     },
     //保存
     add() {
-      var url = core_api + "/user";
+      var url = CORE_API + "/user";
       this.$refs.addingForm.validate(valid => {
         if (valid) {
           this.userForm.enable = this.enableStr == "true";
@@ -811,7 +811,7 @@ export default {
     },
     //保存
     update() {
-      var url = core_api + "/user";
+      var url = CORE_API + "/user";
       this.$refs.updateForm.validate(valid => {
         if (valid) {
           this.userForm.enable = this.enableStr == "true";
@@ -843,7 +843,7 @@ export default {
         cancelButtonText: "取消",
         type: "warning"
       }).then(() => {
-        var url = core_api + "/user/resetPass/" + row.id;
+        var url = CORE_API + "/user/resetPass/" + row.id;
         this.$http
           .put(url)
           .then(() => {
@@ -871,7 +871,7 @@ export default {
         cancelButtonText: "取消",
         type: "warning"
       }).then(() => {
-        var url = core_api + "/user/" + row.id;
+        var url = CORE_API + "/user/" + row.id;
         this.$http
           .delete(url)
           .then(() => {
@@ -905,7 +905,7 @@ export default {
           cancelButtonText: "取消",
           type: "error"
         }).then(() => {
-          var url = core_api + "/user/" + this.userIds;
+          var url = CORE_API + "/user/" + this.userIds;
           this.$http
             .delete(url)
             .then(() => {
@@ -940,7 +940,7 @@ export default {
           cancelButtonText: "取消",
           type: "warning"
         }).then(() => {
-          var url = core_api + "/user/enable/" + this.userIds;
+          var url = CORE_API + "/user/enable/" + this.userIds;
           this.$http
             .put(url, {})
             .then(() => {
@@ -968,7 +968,7 @@ export default {
         cancelButtonText: "取消",
         type: "warning"
       }).then(() => {
-        var url = core_api + "/user/enable/" + row.id;
+        var url = CORE_API + "/user/enable/" + row.id;
         this.$http
           .put(url, {})
           .then(() => {
@@ -1002,7 +1002,7 @@ export default {
           cancelButtonText: "取消",
           type: "error"
         }).then(() => {
-          var url = core_api + "/user/disable/" + this.userIds;
+          var url = CORE_API + "/user/disable/" + this.userIds;
           this.$http
             .put(url, {})
             .then(() => {
@@ -1031,7 +1031,7 @@ export default {
         cancelButtonText: "取消",
         type: "error"
       }).then(() => {
-        var url = core_api + "/user/disable/" + row.id;
+        var url = CORE_API + "/user/disable/" + row.id;
         this.$http
           .put(url, {})
           .then(() => {
@@ -1065,9 +1065,9 @@ export default {
       this.searchForm.rootOrgId = this.user.rootOrgId;
       this.userForm.rootOrgId = this.user.rootOrgId;
 
-      var url1 = core_api + "/org/getRootOrgList";
+      var url1 = CORE_API + "/org/getRootOrgList";
       var url2 =
-        core_api +
+        CORE_API +
         "/rolePrivilege/getRoles?includeSuperAdmin=true&rootOrgId=" +
         this.user.rootOrgId;
 

+ 13 - 14
src/modules/examwork/view/student.vue

@@ -417,7 +417,7 @@
 </template>
 
 <script>
-import { core_api, exam_work_api, outlet_api } from "../constants/constants.js";
+import { CORE_API, EXAM_WORK_API, OUTLET_API } from "@/constants/constants.js";
 import { mapState } from "vuex";
 
 export default {
@@ -462,7 +462,7 @@ export default {
       photo: { url: "" },
 
       errMessages: [],
-      uploadAction: outlet_api + "/facepp/add",
+      uploadAction: OUTLET_API + "/facepp/add",
       uploadData: {},
       fileLoading: false,
       fileList: [],
@@ -516,7 +516,7 @@ export default {
         this.queryExams4SearchLoading = true;
       }
       this.$http
-        .get(exam_work_api + "/exam/queryByNameLike?name=" + name)
+        .get(EXAM_WORK_API + "/exam/queryByNameLike?name=" + name)
         .then(response => {
           if ("search" == where) {
             this.queryExams4SearchLoading = false;
@@ -550,7 +550,7 @@ export default {
       var param = new URLSearchParams(this.stuExamSearch);
       this.stuExamLoading = true;
       var url =
-        exam_work_api +
+        EXAM_WORK_API +
         "/exam_student/examStudentPage/" +
         (this.stuExamCurPage - 1) +
         "/" +
@@ -626,7 +626,7 @@ export default {
     searchForm() {
       var param = new URLSearchParams(this.formSearch);
       var url =
-        core_api +
+        CORE_API +
         "/student/studentPage/" +
         (this.currentPage - 1) +
         "/" +
@@ -672,7 +672,7 @@ export default {
         cancelButtonText: "取消",
         type: "warning"
       }).then(() => {
-        var url = core_api + "/student/unbindStudentCode/" + stuIds;
+        var url = CORE_API + "/student/unbindStudentCode/" + stuIds;
         this.$http.put(url).then(response => {
           console.log(response);
           this.$notify({
@@ -691,7 +691,7 @@ export default {
         cancelButtonText: "取消",
         type: "warning"
       }).then(() => {
-        var url = core_api + "/student/unbindSecurityPhone/" + stuIds;
+        var url = CORE_API + "/student/unbindSecurityPhone/" + stuIds;
         this.$http.put(url).then(response => {
           console.log(response);
           this.$notify({
@@ -711,7 +711,7 @@ export default {
         cancelButtonText: "取消",
         type: "warning"
       }).then(() => {
-        var url = core_api + "/student/resetPass/" + stuIds;
+        var url = CORE_API + "/student/resetPass/" + stuIds;
         this.$http.put(url).then(response => {
           console.log(response);
           this.$notify({
@@ -732,7 +732,7 @@ export default {
         cancelButtonText: "取消",
         type: "warning"
       }).then(() => {
-        var url = core_api + "/student/disable/" + stuIds;
+        var url = CORE_API + "/student/disable/" + stuIds;
         this.$http.put(url).then(response => {
           console.log(response);
           this.$notify({
@@ -753,7 +753,7 @@ export default {
         cancelButtonText: "取消",
         type: "warning"
       }).then(() => {
-        var url = core_api + "/student/enable/" + stuIds;
+        var url = CORE_API + "/student/enable/" + stuIds;
         this.$http.put(url).then(response => {
           console.log(response);
           this.$notify({
@@ -865,7 +865,7 @@ export default {
       let params = new URLSearchParams({
         privilegeCodes: Object.keys(this.rolePrivileges).toString()
       });
-      let url = core_api + "/rolePrivilege/checkPrivileges?" + params;
+      let url = CORE_API + "/rolePrivilege/checkPrivileges?" + params;
       this.$http.post(url).then(response => {
         this.rolePrivileges = response.data;
       });
@@ -880,7 +880,7 @@ export default {
         }
       }
 
-      var url = core_api + "/org/getRootOrgList";
+      var url = CORE_API + "/org/getRootOrgList";
 
       this.$http.get(url).then(response => {
         this.rootOrgList = response.data;
@@ -898,5 +898,4 @@ export default {
   }
 };
 </script>
-<style scoped>
-</style>
+<style scoped></style>

+ 3 - 7
src/modules/marking/constants/constants.js

@@ -1,16 +1,12 @@
-export const CORE_API = "/api/ecs_core"; //基础信息API
-export const EXAM_WORK_API = "/api/ecs_exam_work"; //考务信息API
-export const MARKING_API = "/api/ecs_marking"; //阅卷API
-export const DATA_PROCESS_API = "/api/ecs_data_process"; //数据中间层API
-export const OE_API = "/api/ecs_oe"; //网考API
-export const Q_API = "/api/ecs_ques"; //题库API
+import Vue from "vue";
+
 export const UPAI_YUN = "http://exam-cloud-test.b0.upaiyun.com"; //又拍云前端显示
+
 export const LEVEL_TYPE = [
   { label: "专升本", value: "ZSB" },
   { label: "高起专", value: "GQZ" },
   { label: "不限", value: "ALL" }
 ];
-import Vue from "vue";
 //标记卷类型
 export const TAGS = [
   { label: "雷同卷", value: "SAME" },

+ 1 - 1
src/modules/marking/views/CourseDetail.vue

@@ -98,7 +98,7 @@
 </template>
 
 <script>
-import { DATA_PROCESS_API } from "../constants/constants";
+import { DATA_PROCESS_API } from "@/constants/constants";
 import { mapState } from "vuex";
 export default {
   data() {

+ 2 - 1
src/modules/marking/views/MarkGradeMain.vue

@@ -185,7 +185,8 @@
 
 <script>
 import { mapState } from "vuex";
-import { CORE_API, DATA_PROCESS_API, LEVEL_TYPE } from "../constants/constants";
+import { CORE_API, DATA_PROCESS_API } from "@/constants/constants";
+import { LEVEL_TYPE } from "../constants/constants";
 export default {
   data() {
     return {

+ 2 - 5
src/modules/marking/views/MarkPaperCheck.vue

@@ -201,11 +201,8 @@
 
 <script>
 import { mapState } from "vuex";
-import {
-  CORE_API,
-  MARKING_API,
-  DATA_PROCESS_API
-} from "../constants/constants";
+import { CORE_API, MARKING_API, DATA_PROCESS_API } from "@/constants/constants";
+
 export default {
   data() {
     return {

+ 1 - 1
src/modules/marking/views/MarkSettingFast.vue

@@ -105,7 +105,7 @@
 </template>
 
 <script>
-import { MARKING_API, DATA_PROCESS_API } from "../constants/constants";
+import { MARKING_API, DATA_PROCESS_API } from "@/constants/constants";
 import { mapState } from "vuex";
 export default {
   data() {

+ 1 - 1
src/modules/marking/views/MarkSettingMain.vue

@@ -186,7 +186,7 @@
 </template>
 
 <script>
-import { MARKING_API, DATA_PROCESS_API } from "../constants/constants";
+import { MARKING_API, DATA_PROCESS_API } from "@/constants/constants";
 import { mapState } from "vuex";
 export default {
   data() {

+ 1 - 1
src/modules/marking/views/MarkSettingWork.vue

@@ -128,7 +128,7 @@
 </template>
 
 <script>
-import { DATA_PROCESS_API } from "../constants/constants";
+import { DATA_PROCESS_API } from "@/constants/constants";
 import { mapState } from "vuex";
 export default {
   data() {

+ 1 - 5
src/modules/marking/views/MarkWork.vue

@@ -211,11 +211,7 @@
 
 <script>
 import { mapState } from "vuex";
-import {
-  CORE_API,
-  MARKING_API,
-  DATA_PROCESS_API
-} from "../constants/constants";
+import { CORE_API, MARKING_API, DATA_PROCESS_API } from "@/constants/constants";
 export default {
   data() {
     return {

+ 1 - 1
src/modules/marking/views/MarkWorkOverview.vue

@@ -107,7 +107,7 @@
 </template>
 
 <script>
-import { MARKING_API } from "../constants/constants";
+import { MARKING_API } from "@/constants/constants";
 import { mapState } from "vuex";
 // import IEcharts from 'vue-echarts-v3/src/full.vue'
 export default {

+ 1 - 1
src/modules/marking/views/Marker.vue

@@ -101,7 +101,7 @@
 </template>
 
 <script>
-import { DATA_PROCESS_API } from "../constants/constants";
+import { DATA_PROCESS_API } from "@/constants/constants";
 import { mapState } from "vuex";
 export default {
   data() {

+ 1 - 1
src/modules/marking/views/MarkerDetail.vue

@@ -95,7 +95,7 @@
 </template>
 
 <script>
-import { MARKING_API } from "../constants/constants";
+import { MARKING_API } from "@/constants/constants";
 import { mapState } from "vuex";
 export default {
   data() {

+ 6 - 2
src/modules/marking/views/Marking.vue

@@ -260,7 +260,11 @@
 import { mapState } from "vuex";
 import TpMain from "./TpMain.vue";
 import TpScoreBoard from "./TpScoreBoard.vue";
-import { MARKING_API, DATA_PROCESS_API, Q_API } from "../constants/constants";
+import {
+  MARKING_API,
+  DATA_PROCESS_API,
+  QUESTION_API
+} from "@/constants/constants";
 export default {
   components: {
     tpMain: TpMain,
@@ -612,7 +616,7 @@ export default {
       if (this.studentPaper.basePaperId) {
         var paperId = this.studentPaper.basePaperId;
         await this.$http
-          .get(Q_API + "/extract/getAnswerHtml/" + paperId)
+          .get(QUESTION_API + "/extract/getAnswerHtml/" + paperId)
           .then(response => {
             this.answerHtml = response.data;
           });

+ 2 - 1
src/modules/marking/views/TpScoreBoard.vue

@@ -202,7 +202,8 @@
 import { mapActions } from "vuex";
 import { USER_SIGNOUT } from "../../portal/store/user";
 import { mapState } from "vuex";
-import { CORE_API, MARKING_API, EVENTHUB } from "../constants/constants";
+import { CORE_API, MARKING_API } from "@/constants/constants";
+import { EVENTHUB } from "../constants/constants";
 export default {
   data() {
     return {

+ 1 - 1
src/modules/marking/views/ViewPaper.vue

@@ -9,7 +9,7 @@
 </template>
 <script>
 import { mapState } from "vuex";
-import { DATA_PROCESS_API } from "../constants/constants";
+import { DATA_PROCESS_API } from "@/constants/constants";
 export default {
   data() {
     return {

+ 2 - 2
src/modules/portal/views/Login.vue

@@ -44,7 +44,7 @@
 <script>
 import { mapActions } from "vuex";
 import { USER_SIGNIN } from "../store/user";
-import { core_api } from "../constants/constants";
+import { CORE_API } from "@/constants/constants";
 
 export default {
   data() {
@@ -103,7 +103,7 @@ export default {
       if (!this.checkPassword()) {
         return;
       }
-      var url = core_api + "/auth/login";
+      var url = CORE_API + "/auth/login";
       this.$httpWithMsg.post(url, this.loginInfo).then(response => {
         var user = response.data;
         this.USER_SIGNIN(user);

+ 3 - 3
src/modules/portal/views/home/Home.vue

@@ -103,7 +103,7 @@
 <script>
 import { mapActions, mapState } from "vuex";
 import { USER_SIGNOUT } from "../../store/user";
-import { core_api } from "@/constants/constants";
+import { CORE_API } from "@/constants/constants";
 import HomeSide from "./HomeSide.vue";
 
 export default {
@@ -161,7 +161,7 @@ export default {
           var userId = this.user.userId;
           var password = encodeURIComponent(this.passForm.pass);
           var url =
-            core_api +
+            CORE_API +
             "/user/password?userId=" +
             userId +
             "&password=" +
@@ -197,7 +197,7 @@ export default {
     },
     logout() {
       this.$http
-        .post(core_api + "/auth/logout")
+        .post(CORE_API + "/auth/logout")
         .then(() => {
           const orgId = this.user.rootOrgId;
           this.USER_SIGNOUT();

+ 2 - 2
src/modules/portal/views/home/HomeMain.vue

@@ -15,7 +15,7 @@
 
 <script>
 import { mapState } from "vuex";
-import { core_api } from "@/constants/constants";
+import { CORE_API } from "@/constants/constants";
 
 export default {
   name: "HomeMain",
@@ -30,7 +30,7 @@ export default {
   },
   methods: {
     async getUserPrivileges(groupCode) {
-      var url = core_api + "/rolePrivilege/getUserPrivileges";
+      var url = CORE_API + "/rolePrivilege/getUserPrivileges";
       const params = new URLSearchParams();
       params.append("groupCode", groupCode);
       params.append("full", false);

+ 2 - 2
src/modules/portal/views/home/HomeSide.vue

@@ -41,7 +41,7 @@
 
 <script>
 import { mapState } from "vuex";
-import { core_api } from "@/constants/constants";
+import { CORE_API } from "@/constants/constants";
 
 const routesToMenu = [
   {
@@ -98,7 +98,7 @@ export default {
   },
   methods: {
     async getUserPrivileges(groupCode) {
-      var url = core_api + "/rolePrivilege/getUserPrivileges";
+      var url = CORE_API + "/rolePrivilege/getUserPrivileges";
       const params = new URLSearchParams();
       params.append("groupCode", groupCode);
       params.append("full", false);

+ 2 - 4
src/modules/print/constants/constants.js

@@ -1,9 +1,7 @@
 import Vue from "vue";
 
-/* 基础信息平台-API */
-export const core_api = "/api/ecs_core";
 /* 印刷平台-API */
-export const print_api = "/api/ecs_prt";
+export const PRINT_API = "/api/ecs_prt";
 
 /* 试题类型-客观题 */
 export const questionTypeList = [
@@ -111,7 +109,7 @@ Vue.prototype.loadSupplierInfo = function(loginUser) {
 };
 
 Vue.prototype.loadOrgList = function() {
-  var url = print_api + "/printing/project/org/list";
+  var url = PRINT_API + "/printing/project/org/list";
   this.$http.post(url).then(
     response => {
       this.orgList = response.data;

+ 5 - 9
src/modules/print/view/CourseStatistic.vue

@@ -193,12 +193,8 @@
 </template>
 
 <script>
-import {
-  print_api,
-  core_api,
-  userRole,
-  coursePaperStatusList
-} from "../constants/constants.js";
+import { CORE_API, PRINT_API } from "@/constants/constants";
+import { userRole, coursePaperStatusList } from "../constants/constants.js";
 import { mapState } from "vuex";
 
 export default {
@@ -252,7 +248,7 @@ export default {
       }
 
       this.loading = true;
-      let url = print_api + "/course/statistic/list";
+      let url = PRINT_API + "/course/statistic/list";
       this.$http.post(url, this.formSearch).then(
         response => {
           this.tableData = response.data.content;
@@ -271,7 +267,7 @@ export default {
       this.examList = [];
 
       if (!this.isEmptyNumber(orgId)) {
-        let url = print_api + "/printing/project/exam/list?orgId=" + orgId;
+        let url = PRINT_API + "/printing/project/exam/list?orgId=" + orgId;
         this.$http.post(url).then(response => {
           this.examList = response.data;
         });
@@ -280,7 +276,7 @@ export default {
     searchCourseList(query) {
       /* 查询课程列表 */
       this.courseList = [];
-      let url = core_api + "/course/query?enable=true";
+      let url = CORE_API + "/course/query?enable=true";
 
       if (!this.isEmptyStr(query)) {
         url += "&name=" + query;

+ 4 - 3
src/modules/print/view/ExamStructure.vue

@@ -126,7 +126,8 @@
 </template>
 
 <script>
-import { print_api, userRole } from "../constants/constants.js";
+import { PRINT_API } from "@/constants/constants";
+import { userRole } from "../constants/constants.js";
 import { mapState } from "vuex";
 
 export default {
@@ -175,7 +176,7 @@ export default {
       }
 
       this.loading = true;
-      let url = print_api + "/examStructure/list";
+      let url = PRINT_API + "/examStructure/list";
       this.$http.post(url, this.formSearch).then(
         response => {
           this.tableData = response.data.content;
@@ -194,7 +195,7 @@ export default {
       this.examList = [];
 
       if (!this.isEmptyNumber(orgId)) {
-        let url = print_api + "/printing/project/exam/list?orgId=" + orgId;
+        let url = PRINT_API + "/printing/project/exam/list?orgId=" + orgId;
         this.$http.post(url).then(response => {
           this.examList = response.data;
         });

+ 7 - 6
src/modules/print/view/Project.vue

@@ -324,7 +324,8 @@
 </template>
 
 <script>
-import { print_api, core_api, userRole } from "../constants/constants.js";
+import { CORE_API, PRINT_API } from "@/constants/constants";
+import { userRole } from "../constants/constants.js";
 import { mapState } from "vuex";
 
 export default {
@@ -582,7 +583,7 @@ export default {
       }
 
       this.loading = true;
-      let url = print_api + "/printing/project/list";
+      let url = PRINT_API + "/printing/project/list";
       this.$http.post(url, this.formSearch).then(
         response => {
           this.tableData = response.data.content;
@@ -601,7 +602,7 @@ export default {
       this.examList = [];
 
       if (!this.isEmptyNumber(orgId)) {
-        let url = print_api + "/printing/project/exam/list?orgId=" + orgId;
+        let url = PRINT_API + "/printing/project/exam/list?orgId=" + orgId;
         this.$http.post(url).then(response => {
           this.examList = response.data;
         });
@@ -611,7 +612,7 @@ export default {
       /* 查询项目经理列表 */
       this.pmList = [];
       let url =
-        core_api + "/user/query?rootOrgCode=qmth&roleCode=PRINT_PROJECT_LEADER";
+        CORE_API + "/user/query?rootOrgCode=qmth&roleCode=PRINT_PROJECT_LEADER";
 
       if (!this.isEmptyStr(query)) {
         url += "&name=" + query;
@@ -625,7 +626,7 @@ export default {
       /* 查询印刷供应商列表 */
       this.supplierList = [];
       let url =
-        core_api + "/user/query?rootOrgCode=qmth-print&roleCode=PRINT_SUPPLIER";
+        CORE_API + "/user/query?rootOrgCode=qmth-print&roleCode=PRINT_SUPPLIER";
 
       if (!this.isEmptyStr(query)) {
         url += "&name=" + query;
@@ -669,7 +670,7 @@ export default {
           this.projectSettingForm.mailEndTime
         );
 
-        let url = print_api + "/printing/project/update";
+        let url = PRINT_API + "/printing/project/update";
         this.$http.post(url, this.projectSettingForm).then(
           () => {
             this.$notify({

+ 7 - 6
src/modules/print/view/ProjectStatistic.vue

@@ -180,7 +180,8 @@
 </template>
 
 <script>
-import { print_api, userRole } from "../constants/constants.js";
+import { PRINT_API } from "@/constants/constants";
+import { userRole } from "../constants/constants.js";
 import { mapState } from "vuex";
 
 export default {
@@ -233,7 +234,7 @@ export default {
 
       this.loading = true;
       let url =
-        print_api + "/printing/project/statistic/" + orgId + "/" + examId;
+        PRINT_API + "/printing/project/statistic/" + orgId + "/" + examId;
 
       this.$http.post(url, this.formSearch).then(
         response => {
@@ -287,7 +288,7 @@ export default {
       this.examList = [];
 
       if (!this.isEmptyNumber(orgId)) {
-        let url = print_api + "/printing/project/exam/list?orgId=" + orgId;
+        let url = PRINT_API + "/printing/project/exam/list?orgId=" + orgId;
         this.$http.post(url).then(response => {
           this.examList = response.data;
         });
@@ -312,7 +313,7 @@ export default {
     loadOtherSetting(projectId) {
       /* 查询其它事项列表 */
       let url =
-        print_api + "/project/other/setting/list?projectId=" + projectId;
+        PRINT_API + "/project/other/setting/list?projectId=" + projectId;
 
       this.$http.post(url).then(
         response => {
@@ -338,7 +339,7 @@ export default {
         if (!valid) {
           return false;
         }
-        let url = print_api + "/project/other/setting/save";
+        let url = PRINT_API + "/project/other/setting/save";
         this.$http.post(url, this.otherSettingForm).then(
           () => {
             this.$notify({
@@ -365,7 +366,7 @@ export default {
         cancelButtonText: "取消",
         type: "warning"
       }).then(() => {
-        var url = print_api + "/project/other/setting/delete/" + row.id;
+        var url = PRINT_API + "/project/other/setting/delete/" + row.id;
         this.$http.post(url).then(
           () => {
             this.$notify({

+ 4 - 3
src/modules/print/view/ProjectTemplate.vue

@@ -108,7 +108,8 @@
 </template>
 
 <script>
-import { print_api, userRole } from "../constants/constants.js";
+import { PRINT_API } from "@/constants/constants";
+import { userRole } from "../constants/constants.js";
 import { mapState } from "vuex";
 
 export default {
@@ -149,7 +150,7 @@ export default {
       }
 
       this.loading = true;
-      let url = print_api + "/project/template/" + orgId + "/" + examId;
+      let url = PRINT_API + "/project/template/" + orgId + "/" + examId;
       this.$http.post(url, this.formSearch).then(
         response => {
           this.tableData = response.data;
@@ -167,7 +168,7 @@ export default {
       this.examList = [];
 
       if (!this.isEmptyNumber(orgId)) {
-        let url = print_api + "/printing/project/exam/list?orgId=" + orgId;
+        let url = PRINT_API + "/printing/project/exam/list?orgId=" + orgId;
         this.$http.post(url).then(response => {
           this.examList = response.data;
         });

+ 2 - 4
src/modules/questions/constants/constants.js

@@ -1,9 +1,7 @@
 import Vue from "vue";
 import _ from "lodash";
 import CKEditor from "@ckeditor/ckeditor5-vue";
-export const CORE_API = "/api/ecs_core"; //基础信息API
-export const EXAM_WORK_API = "/api/ecs_exam_work"; //考务信息API
-export const Q_API = "/api/ecs_ques"; //题库API
+export const QUESTION_API = "/api/ecs_ques"; //题库API
 export const LEVEL_TYPE = [
   { label: "专升本", value: "ZSB" },
   { label: "高起专", value: "GQZ" },
@@ -78,7 +76,7 @@ function addAudio(el, binding, vnode) {
     if (questionAudioId) {
       console.log("come in");
       vnode.context.$http
-        .get(Q_API + "/questionAudio/" + questionAudioId)
+        .get(QUESTION_API + "/questionAudio/" + questionAudioId)
         .then(response => {
           console.log("response:", response);
           if (response && response.data) {

+ 4 - 4
src/modules/questions/views/BluePaperStructure.vue

@@ -169,7 +169,7 @@
   </div>
 </template>
 <script>
-import { CORE_API, Q_API } from "../constants/constants";
+import { CORE_API, QUESTION_API } from "@/constants/constants";
 export default {
   data() {
     return {
@@ -212,7 +212,7 @@ export default {
     searchAll() {
       this.loading = true;
       var url =
-        Q_API + "/paperStruct/" + this.currentPage + "/" + this.pageSize;
+        QUESTION_API + "/paperStruct/" + this.currentPage + "/" + this.pageSize;
       this.$http.get(url, { params: this.formSearch }).then(response => {
         this.tableData = response.data.content;
         this.total = response.data.totalElements;
@@ -234,7 +234,7 @@ export default {
           type: "error"
         }).then(() => {
           this.loading = true;
-          var url = Q_API + "/paperStruct/" + this.selectedIds;
+          var url = QUESTION_API + "/paperStruct/" + this.selectedIds;
           this.$http
             .delete(url)
             .then(() => {
@@ -288,7 +288,7 @@ export default {
       }).then(() => {
         this.loading = true;
         this.$http
-          .delete(Q_API + "/paperStruct/" + row.id)
+          .delete(QUESTION_API + "/paperStruct/" + row.id)
           .then(() => {
             this.$notify({
               message: "删除成功",

+ 11 - 7
src/modules/questions/views/CourseProperty.vue

@@ -199,7 +199,7 @@
 </template>
 
 <script>
-import { CORE_API, Q_API } from "../constants/constants";
+import { CORE_API, QUESTION_API } from "@/constants/constants";
 export default {
   data() {
     return {
@@ -230,7 +230,11 @@ export default {
     searchCourseProperty() {
       this.loading = true;
       var url =
-        Q_API + "/courseProperty/all/" + this.currentPage + "/" + this.pageSize;
+        QUESTION_API +
+        "/courseProperty/all/" +
+        this.currentPage +
+        "/" +
+        this.pageSize;
       this.$http.get(url, { params: this.formSearch }).then(response => {
         this.tableData = response.data.content;
         this.total = response.data.totalElements;
@@ -265,7 +269,7 @@ export default {
       }).then(() => {
         this.loading = true;
         this.$http
-          .put(Q_API + "/courseProperty/open/" + row.id)
+          .put(QUESTION_API + "/courseProperty/open/" + row.id)
           .then(() => {
             this.$notify({
               message: "开启成功",
@@ -296,7 +300,7 @@ export default {
           type: "error"
         }).then(() => {
           this.loading = true;
-          var url = Q_API + "/courseProperty/opens/" + this.selectedIds;
+          var url = QUESTION_API + "/courseProperty/opens/" + this.selectedIds;
           this.$http
             .put(url)
             .then(() => {
@@ -325,7 +329,7 @@ export default {
       }).then(() => {
         this.loading = true;
         this.$http
-          .put(Q_API + "/courseProperty/close/" + row.id)
+          .put(QUESTION_API + "/courseProperty/close/" + row.id)
           .then(() => {
             this.$notify({
               message: "禁用成功",
@@ -356,7 +360,7 @@ export default {
           type: "error"
         }).then(() => {
           this.loading = true;
-          var url = Q_API + "/courseProperty/closes/" + this.selectedIds;
+          var url = QUESTION_API + "/courseProperty/closes/" + this.selectedIds;
           this.$http
             .put(url)
             .then(() => {
@@ -405,7 +409,7 @@ export default {
         }
       }
       this.$http
-        .post(Q_API + "/courseProperty/save", this.coursePropertyForm)
+        .post(QUESTION_API + "/courseProperty/save", this.coursePropertyForm)
         .then(() => {
           this.$notify({
             message: "新增成功",

+ 2 - 1
src/modules/questions/views/EditOtherQuestion.vue

@@ -235,7 +235,8 @@
   </section>
 </template>
 <script>
-import { CORE_API, QUESTION_TYPES } from "../constants/constants";
+import { CORE_API } from "@/constants/constants";
+import { QUESTION_TYPES } from "../constants/constants";
 import ClassicEditor from "@ckeditor/ckeditor5-build-inline";
 export default {
   data() {

+ 16 - 15
src/modules/questions/views/EditPaper.vue

@@ -675,7 +675,8 @@
 </template>
 
 <script>
-import { Q_API, QUESTION_TYPES } from "../constants/constants";
+import { QUESTION_API } from "@/constants/constants";
+import { QUESTION_TYPES } from "../constants/constants";
 import { mapState } from "vuex";
 import reduplicate_mark from "../component/reduplicate_mark.vue";
 import randomColor from "randomcolor";
@@ -846,7 +847,7 @@ export default {
       var paperId = this.paper.id;
       var param = JSON.stringify(editpaperDetail);
       this.$http
-        .post(Q_API + "/updatePaperDetail/" + paperId, param)
+        .post(QUESTION_API + "/updatePaperDetail/" + paperId, param)
         .then(() => {
           this.$notify({
             message: "保存成功",
@@ -866,7 +867,7 @@ export default {
           name: ""
         }
       };
-      this.$http.get(Q_API + "/paper/" + this.paperId).then(response => {
+      this.$http.get(QUESTION_API + "/paper/" + this.paperId).then(response => {
         this.paper = response.data;
         //查询所有课程属性名
         this.initCourseProperty(this.paper.course.code);
@@ -910,7 +911,7 @@ export default {
     //查询所有课程属性名
     initCourseProperty(courseCode) {
       this.$http
-        .get(Q_API + "/courseProperty/enable/" + courseCode)
+        .get(QUESTION_API + "/courseProperty/enable/" + courseCode)
         .then(response => {
           this.coursePropertyList = response.data;
         });
@@ -934,7 +935,7 @@ export default {
             if (action == "confirm") {
               this.loading = true;
               this.$http
-                .delete(Q_API + "/paperDetail/" + paperDetailsId)
+                .delete(QUESTION_API + "/paperDetail/" + paperDetailsId)
                 .then(() => {
                   this.initPaper();
                   this.loading = true;
@@ -1110,7 +1111,7 @@ export default {
         for (let courseProperty of this.coursePropertyList) {
           if (courseProperty.name == this.coursePropertyName) {
             this.$http
-              .get(Q_API + "/property/first/" + courseProperty.id)
+              .get(QUESTION_API + "/property/first/" + courseProperty.id)
               .then(response => {
                 this.firstPropertyList = response.data;
               });
@@ -1123,7 +1124,7 @@ export default {
       this.secondPropertyId = "";
       if (this.firstPropertyId) {
         this.$http
-          .get(Q_API + "/property/second/" + this.firstPropertyId)
+          .get(QUESTION_API + "/property/second/" + this.firstPropertyId)
           .then(response => {
             this.secondPropertyList = response.data;
           });
@@ -1291,7 +1292,7 @@ export default {
         }).then(() => {
           this.dialogLoading = true;
           this.$http
-            .delete(Q_API + "/paper/deleteQuestion/" + this.quesModel.id)
+            .delete(QUESTION_API + "/paper/deleteQuestion/" + this.quesModel.id)
             .then(response => {
               if (response.data.length > 0) {
                 var deleteInfo =
@@ -1314,7 +1315,7 @@ export default {
       } else {
         this.dialogLoading = true;
         this.$http
-          .put(Q_API + "/paperDetailUnit", paperDetailUnitExp)
+          .put(QUESTION_API + "/paperDetailUnit", paperDetailUnitExp)
           .then(() => {
             this.$notify({
               message: "保存成功",
@@ -1364,7 +1365,7 @@ export default {
           if (action == "confirm") {
             this.loading = true;
             this.$http
-              .delete(Q_API + "/paperDetailUnit/" + paperDetailUnitId)
+              .delete(QUESTION_API + "/paperDetailUnit/" + paperDetailUnitId)
               .then(() => {
                 this.initPaper();
                 this.getreduplicateQuestions();
@@ -1387,7 +1388,7 @@ export default {
           if (action == "confirm") {
             this.loading = true;
             this.$http
-              .delete(Q_API + "/paper/deleteQuestion/" + questionId)
+              .delete(QUESTION_API + "/paper/deleteQuestion/" + questionId)
               .then(response => {
                 if (response.data.length > 0) {
                   var deleteInfo =
@@ -1418,7 +1419,7 @@ export default {
     getreduplicateQuestions() {
       this.duplicateLoading = true;
       this.$http
-        .get(Q_API + "/paper/" + this.paperId + "/reduplicate-questions")
+        .get(QUESTION_API + "/paper/" + this.paperId + "/reduplicate-questions")
         .then(response => {
           this.reduplicateQuestions = response.data;
           this.duplicateLoading = false;
@@ -1465,7 +1466,7 @@ export default {
     savePaper() {
       this.loading = true;
       this.$http
-        .put(Q_API + "/paper", this.paper)
+        .put(QUESTION_API + "/paper", this.paper)
         .then(() => {
           this.$notify({
             message: "保存成功",
@@ -1488,7 +1489,7 @@ export default {
         type: "warning"
       }).then(() => {
         this.loading = true;
-        this.$http.delete(Q_API + "/paper/" + id).then(
+        this.$http.delete(QUESTION_API + "/paper/" + id).then(
           () => {
             this.$notify({
               message: "删除成功",
@@ -1563,7 +1564,7 @@ export default {
     this.parentView = this.$route.params.parentView;
     this.initPaper();
     this.getreduplicateQuestions();
-    this.uploadAction = Q_API + "/uploadRadio/" + this.paperId;
+    this.uploadAction = QUESTION_API + "/uploadRadio/" + this.paperId;
     this.uploadHeaders = {
       key: this.user.key,
       token: this.user.token

+ 32 - 27
src/modules/questions/views/EditSelectQuestion.vue

@@ -225,7 +225,8 @@
   </div>
 </template>
 <script>
-import { Q_API, QUESTION_TYPES } from "../constants/constants";
+import { QUESTION_API } from "@/constants/constants";
+import { QUESTION_TYPES } from "../constants/constants";
 import ClassicEditor from "@ckeditor/ckeditor5-build-inline";
 export default {
   data() {
@@ -285,27 +286,29 @@ export default {
   },
   methods: {
     findQuestionById(questionId) {
-      this.$http.get(Q_API + "/question/" + questionId).then(response => {
-        this.quesModel = response.body;
-        if (this.quesModel.quesOptions) {
-          for (var i = 0; i < this.quesModel.quesOptions.length; i++) {
-            var option = this.quesModel.quesOptions[i];
-            if (
-              this.quesModel.questionType == "SINGLE_ANSWER_QUESTION" &&
-              option.isCorrect == 1
-            ) {
-              this.singleRightAnswer = String.fromCharCode(65 + i);
-            }
-            if (
-              this.quesModel.questionType == "MULTIPLE_ANSWER_QUESTION" &&
-              option.isCorrect == 1
-            ) {
-              this.multipleRightAnswer.push(String.fromCharCode(65 + i));
+      this.$http
+        .get(QUESTION_API + "/question/" + questionId)
+        .then(response => {
+          this.quesModel = response.body;
+          if (this.quesModel.quesOptions) {
+            for (var i = 0; i < this.quesModel.quesOptions.length; i++) {
+              var option = this.quesModel.quesOptions[i];
+              if (
+                this.quesModel.questionType == "SINGLE_ANSWER_QUESTION" &&
+                option.isCorrect == 1
+              ) {
+                this.singleRightAnswer = String.fromCharCode(65 + i);
+              }
+              if (
+                this.quesModel.questionType == "MULTIPLE_ANSWER_QUESTION" &&
+                option.isCorrect == 1
+              ) {
+                this.multipleRightAnswer.push(String.fromCharCode(65 + i));
+              }
             }
           }
-        }
-        this.initCourseProperty();
-      });
+          this.initCourseProperty();
+        });
     },
     submitForm(formName) {
       this.$refs[formName].validate(valid => {
@@ -332,7 +335,9 @@ export default {
           .then(() => {
             this.fullscreenLoading = true;
             this.$http
-              .delete(Q_API + "/paper/deleteQuestion/" + this.quesModel.id)
+              .delete(
+                QUESTION_API + "/paper/deleteQuestion/" + this.quesModel.id
+              )
               .then(response => {
                 if (response.body.length > 0) {
                   this.deleteInfo =
@@ -352,7 +357,7 @@ export default {
           .catch(() => {});
       } else {
         this.fullscreenLoading = true;
-        this.$http.put(Q_API + "/question", this.quesModel).then(() => {
+        this.$http.put(QUESTION_API + "/question", this.quesModel).then(() => {
           this.$notify({
             message: "保存成功",
             type: "success"
@@ -373,7 +378,7 @@ export default {
       this.fullscreenLoading = true;
       this.$http
         .post(
-          Q_API +
+          QUESTION_API +
             "/paper/addQuestion/" +
             this.paperId +
             "/" +
@@ -456,7 +461,7 @@ export default {
       console.log(this.quesModel);
       var code = this.quesModel.course.code;
       this.$http
-        .get(Q_API + "/courseProperty/enable/" + code)
+        .get(QUESTION_API + "/courseProperty/enable/" + code)
         .then(response => {
           this.coursePropertyList = response.body;
         });
@@ -469,7 +474,7 @@ export default {
       for (let courseProperty of this.coursePropertyList) {
         if (courseProperty.name == this.coursePropertyName) {
           this.$http
-            .get(Q_API + "/property/first/" + courseProperty.id)
+            .get(QUESTION_API + "/property/first/" + courseProperty.id)
             .then(response => {
               this.firstPropertyList = response.body;
             });
@@ -481,7 +486,7 @@ export default {
       this.secondPropertyId = "";
       if (this.firstPropertyId) {
         this.$http
-          .get(Q_API + "/property/second/" + this.firstPropertyId)
+          .get(QUESTION_API + "/property/second/" + this.firstPropertyId)
           .then(response => {
             this.secondPropertyList = response.body;
           });
@@ -624,7 +629,7 @@ export default {
     }
     if (this.courseNo) {
       this.$http
-        .get(Q_API + "/courseProperty/enable/" + this.courseNo)
+        .get(QUESTION_API + "/courseProperty/enable/" + this.courseNo)
         .then(response => {
           this.coursePropertyList = response.body;
         });

+ 9 - 12
src/modules/questions/views/ExportStructure.vue

@@ -318,12 +318,8 @@
 </template>
 
 <script>
-import {
-  Q_API,
-  EXAM_WORK_API,
-  EXAM_TYPES,
-  EXPORT_TYPES
-} from "../constants/constants";
+import { QUESTION_API, EXAM_WORK_API } from "@/constants/constants";
+import { EXAM_TYPES, EXPORT_TYPES } from "../constants/constants";
 import { mapState } from "vuex";
 import _ from "lodash";
 export default {
@@ -398,7 +394,7 @@ export default {
       this.tableData = [];
       this.loading = true;
       var url =
-        Q_API +
+        QUESTION_API +
         "/findPageByExportStructure/" +
         this.currentPage +
         "/" +
@@ -480,7 +476,7 @@ export default {
         return item.id == examId;
       })[0].name;
       this.$http
-        .post(Q_API + "/saveExportStructure", this.exportStructure)
+        .post(QUESTION_API + "/saveExportStructure", this.exportStructure)
         .then(() => {
           this.$notify({
             title: "提示",
@@ -533,7 +529,8 @@ export default {
           });
       }
       if (this.exportStructure.examType && this.exportStructure.examId) {
-        var url = Q_API + "/findExportStructure/" + this.exportStructure.examId;
+        var url =
+          QUESTION_API + "/findExportStructure/" + this.exportStructure.examId;
         this.$http
           .get(url)
           .then(response => {
@@ -580,7 +577,7 @@ export default {
           .then(response => {
             let examListFilter = response.data;
             var url =
-              Q_API +
+              QUESTION_API +
               "/findExportStructureByExamType/" +
               this.exportStructureCopy.examType;
             this.$http.get(url).then(response => {
@@ -612,7 +609,7 @@ export default {
         return item.id == examId;
       })[0].name;
       this.$http
-        .post(Q_API + "/saveExportStructure", this.exportStructure)
+        .post(QUESTION_API + "/saveExportStructure", this.exportStructure)
         .then(() => {
           this.$notify({
             title: "提示",
@@ -631,7 +628,7 @@ export default {
         type: "warning"
       }).then(() => {
         this.loading = true;
-        var url = Q_API + "/deleteExportStructure/" + row.id;
+        var url = QUESTION_API + "/deleteExportStructure/" + row.id;
         this.$http.delete(url).then(
           () => {
             this.$notify({

+ 21 - 9
src/modules/questions/views/ExtractPaperInfo.vue

@@ -258,7 +258,7 @@
   </div>
 </template>
 <script>
-import { EXAM_WORK_API, Q_API } from "../constants/constants";
+import { EXAM_WORK_API, QUESTION_API } from "@/constants/constants";
 import { mapState } from "vuex";
 import _ from "lodash";
 export default {
@@ -321,7 +321,9 @@ export default {
           //查询该考试下的课程
           this.$http
             .get(
-              Q_API + "/findCourseByExtractConfig/" + this.extractConfig.examId
+              QUESTION_API +
+                "/findCourseByExtractConfig/" +
+                this.extractConfig.examId
             )
             .then(response => {
               this.courseList = response.data;
@@ -410,7 +412,11 @@ export default {
     getPaperList() {
       if (this.extractConfig.courseCode) {
         this.$http
-          .get(Q_API + "/getGenPaper?courseNo=" + this.extractConfig.courseCode)
+          .get(
+            QUESTION_API +
+              "/getGenPaper?courseNo=" +
+              this.extractConfig.courseCode
+          )
           .then(response => {
             this.paperList = response.data;
           });
@@ -444,7 +450,10 @@ export default {
         }
       }
       this.$http
-        .post(Q_API + "/audioTimeConfig/all", this.audioTimeConfigModelList)
+        .post(
+          QUESTION_API + "/audioTimeConfig/all",
+          this.audioTimeConfigModelList
+        )
         .then(response => {
           this.audioTimeConfigList = response.data;
         });
@@ -528,7 +537,7 @@ export default {
         this.extractConfig.examPaperList = myExamPaperList;
         this.$http
           .put(
-            Q_API + "/extractConfig" + "/" + this.isbuildFile,
+            QUESTION_API + "/extractConfig" + "/" + this.isbuildFile,
             this.extractConfig
           )
           .then(
@@ -563,7 +572,7 @@ export default {
         /* 未设置时则清理已存在的数据 */
         this.$http
           .post(
-            Q_API +
+            QUESTION_API +
               "/deleteAudioTimeConfig/" +
               this.extractConfig.examId +
               "/" +
@@ -572,7 +581,7 @@ export default {
           .then(() => {});
       } else {
         this.$http
-          .post(Q_API + "/addAudioTimeConfig", this.audioTimeConfigList)
+          .post(QUESTION_API + "/addAudioTimeConfig", this.audioTimeConfigList)
           .then(() => {});
       }
     },
@@ -680,7 +689,7 @@ export default {
     //修改调卷规则
     getExtractConfig(extractConfigId) {
       this.$http
-        .get(Q_API + "/extractConfig/" + extractConfigId)
+        .get(QUESTION_API + "/extractConfig/" + extractConfigId)
         .then(response => {
           this.extractConfig = response.data;
           //查询该考试下的课程
@@ -797,7 +806,10 @@ export default {
         }
       }
       this.$http
-        .post(Q_API + "/audioTimeConfig/update", this.audioTimeConfigModelList)
+        .post(
+          QUESTION_API + "/audioTimeConfig/update",
+          this.audioTimeConfigModelList
+        )
         .then(response => {
           this.audioTimeConfigList = response.data;
         });

+ 37 - 37
src/modules/questions/views/ExtractPaperRule.vue

@@ -265,12 +265,8 @@
 </template>
 
 <script>
-import {
-  CORE_API,
-  EXAM_WORK_API,
-  LEVEL_TYPE,
-  Q_API
-} from "../constants/constants";
+import { CORE_API, EXAM_WORK_API, QUESTION_API } from "@/constants/constants";
+import { LEVEL_TYPE } from "../constants/constants";
 import { mapState } from "vuex";
 import _ from "lodash";
 export default {
@@ -334,7 +330,7 @@ export default {
       let currentPage = this.currentPage;
       this.$http
         .get(
-          Q_API +
+          QUESTION_API +
             "/findPageExtractConfig/" +
             currentPage +
             "/" +
@@ -427,34 +423,38 @@ export default {
         courseId: this.exportModel.courseId ? this.exportModel.courseId : null
       };
       this.resetDisabled();
-      this.$http.post(Q_API + "/findExamFile", examFile).then(response => {
-        let examFiles = response.data;
-        if (examFiles != null && examFiles.length > 0) {
-          this.paperDisabled = this.isDisabled(examFiles, "PAPER");
-          this.answerDisabled = this.isDisabled(examFiles, "ANSWER");
-          this.onlineDisabled = this.isDisabled(
-            examFiles,
-            "COMPUTERTEST_PACKAGE"
-          );
+      this.$http
+        .post(QUESTION_API + "/findExamFile", examFile)
+        .then(response => {
+          let examFiles = response.data;
+          if (examFiles != null && examFiles.length > 0) {
+            this.paperDisabled = this.isDisabled(examFiles, "PAPER");
+            this.answerDisabled = this.isDisabled(examFiles, "ANSWER");
+            this.onlineDisabled = this.isDisabled(
+              examFiles,
+              "COMPUTERTEST_PACKAGE"
+            );
 
-          this.$http
-            .get(Q_API + "/findExportStructure/" + this.exportModel.examId)
-            .then(response => {
-              this.exportModel.exportType = response.data
-                ? response.data.exportType
-                : "NORMAL";
-              this.structureDisabled = !response.data;
-              if (this.exportModel.exportWay == "SINGLE") {
-                this.structureDisabled = this.isDisabled(
-                  examFiles,
-                  "PAPER_STRUCTURE_OBJECTIVE"
-                );
-              }
-            });
-        } else {
-          this.resetDisabled();
-        }
-      });
+            this.$http
+              .get(
+                QUESTION_API + "/findExportStructure/" + this.exportModel.examId
+              )
+              .then(response => {
+                this.exportModel.exportType = response.data
+                  ? response.data.exportType
+                  : "NORMAL";
+                this.structureDisabled = !response.data;
+                if (this.exportModel.exportWay == "SINGLE") {
+                  this.structureDisabled = this.isDisabled(
+                    examFiles,
+                    "PAPER_STRUCTURE_OBJECTIVE"
+                  );
+                }
+              });
+          } else {
+            this.resetDisabled();
+          }
+        });
     },
     isDisabled(examFiles, fileType) {
       return (
@@ -502,7 +502,7 @@ export default {
       var token = this.user.token;
       this.$http
         .get(
-          Q_API +
+          QUESTION_API +
             "/exportBatchExamPaperInfoCheck/" +
             exportWay +
             "/" +
@@ -525,7 +525,7 @@ export default {
               var token = this.user.token;
               if (exportWay == "SINGLE") {
                 window.location.href =
-                  Q_API +
+                  QUESTION_API +
                   "/exportSingleExamPaperInfo/" +
                   this.user.rootOrgName +
                   "/" +
@@ -546,7 +546,7 @@ export default {
                   token;
               } else if (exportWay == "BATCH") {
                 window.location.href =
-                  Q_API +
+                  QUESTION_API +
                   "/exportBatchExamPaperInfo/" +
                   this.user.rootOrgName +
                   "/" +

+ 17 - 14
src/modules/questions/views/GenPaper.vue

@@ -290,12 +290,8 @@
 </template>
 
 <script>
-import {
-  CORE_API,
-  EXAM_WORK_API,
-  LEVEL_TYPE,
-  Q_API
-} from "../constants/constants";
+import { CORE_API, QUESTION_API, EXAM_WORK_API } from "@/constants/constants";
+import { LEVEL_TYPE } from "../constants/constants";
 import { mapState } from "vuex";
 export default {
   data() {
@@ -345,7 +341,8 @@ export default {
   methods: {
     searchGenPaper() {
       this.loading = true;
-      var url = Q_API + "/genPaper/" + this.currentPage + "/" + this.pageSize;
+      var url =
+        QUESTION_API + "/genPaper/" + this.currentPage + "/" + this.pageSize;
       this.$http.get(url, { params: this.formSearch }).then(response => {
         this.tableData = response.data.content;
         this.total = response.data.totalElements;
@@ -391,7 +388,7 @@ export default {
     },
     exportGenPaper(row) {
       window.open(
-        Q_API + "/paper/export/" + row.id + "/" + this.user.rootOrgName
+        QUESTION_API + "/paper/export/" + row.id + "/" + this.user.rootOrgName
       );
     },
     editGenPaper(row) {
@@ -409,7 +406,7 @@ export default {
         type: "warning"
       }).then(() => {
         this.loading = true;
-        this.$http.delete(Q_API + "/paper/" + row.id).then(
+        this.$http.delete(QUESTION_API + "/paper/" + row.id).then(
           () => {
             this.$notify({
               message: "删除成功",
@@ -441,7 +438,7 @@ export default {
           type: "warning"
         }).then(() => {
           this.loading = true;
-          this.$http.delete(Q_API + "/paper/" + paperIds).then(
+          this.$http.delete(QUESTION_API + "/paper/" + paperIds).then(
             () => {
               this.$notify({
                 message: "删除成功",
@@ -539,7 +536,7 @@ export default {
       if (this.isShow) {
         console.log("单个导出");
         window.location.href =
-          Q_API +
+          QUESTION_API +
           "/paper/export/" +
           this.exportModel.id +
           "/" +
@@ -561,7 +558,7 @@ export default {
         var paperIds = this.paperIds;
         console.log(paperIds);
         window.location.href =
-          Q_API +
+          QUESTION_API +
           "/paper/batch_export/" +
           paperIds +
           "/" +
@@ -586,7 +583,7 @@ export default {
       sessionStorage.removeItem("gen_paper_currentPage");
     },
     previewPDF2(row) {
-      window.open(Q_API + "/paper/pdf/" + row.id);
+      window.open(QUESTION_API + "/paper/pdf/" + row.id);
     },
     openPrint(row) {
       this.dialogModel = true;
@@ -607,7 +604,13 @@ export default {
       }
       if (orgId != "") {
         this.$http.get(
-          Q_API + "/sendPrint/" + this.rowId + "/" + this.examId + "/" + orgId
+          QUESTION_API +
+            "/sendPrint/" +
+            this.rowId +
+            "/" +
+            this.examId +
+            "/" +
+            orgId
         );
         this.$notify({
           message: "已推送",

+ 10 - 10
src/modules/questions/views/GenPaperDetail.vue

@@ -606,7 +606,7 @@
 </template>
 
 <script>
-import { Q_API } from "../constants/constants";
+import { QUESTION_API } from "@/constants/constants";
 
 export default {
   data() {
@@ -686,7 +686,7 @@ export default {
       if (this.paperType == "IMPORT") {
         this.$http
           .get(
-            Q_API +
+            QUESTION_API +
               "/importPaper/" +
               this.tempPaperIds +
               "/" +
@@ -705,7 +705,7 @@ export default {
       } else if (this.paperType == "GENERATE") {
         this.$http
           .get(
-            Q_API +
+            QUESTION_API +
               "/genPaper/" +
               this.tempPaperIds +
               "/" +
@@ -734,7 +734,7 @@ export default {
     searchPaperStructs() {
       console.log("bbb");
       var courseNo = this.genPaper.courseNo;
-      var url = Q_API + "/paperStruct?courseNo=" + courseNo;
+      var url = QUESTION_API + "/paperStruct?courseNo=" + courseNo;
       this.loading = true;
       this.$http.get(url).then(response => {
         this.paperStructs = response.data;
@@ -834,11 +834,11 @@ export default {
       } else {
         var url = "";
         if (this.genType == "SIMPLE") {
-          url = Q_API + "/genPaper/simple";
+          url = QUESTION_API + "/genPaper/simple";
         } else if (this.genType == "NORMAL") {
-          url = Q_API + "/genPaper/normal";
+          url = QUESTION_API + "/genPaper/normal";
         } else {
-          url = Q_API + "/genPaper/blue";
+          url = QUESTION_API + "/genPaper/blue";
         }
         console.log("this.setSimpleParams():", this.setSimpleParams());
         if (!this.setSimpleParams()) {
@@ -1011,7 +1011,7 @@ export default {
     getCoursePropertyList() {
       var courseNo = this.genPaper.courseNo;
       this.$http
-        .get(Q_API + "/courseProperty/enable/" + courseNo)
+        .get(QUESTION_API + "/courseProperty/enable/" + courseNo)
         .then(response => {
           this.coursePropertyList = response.data;
           this.searchPaperStructs();
@@ -1065,7 +1065,7 @@ export default {
       if (this.genPaper.simpleGenPaperPolicy == "BY_QUESTIONNUM") {
         this.$http
           .get(
-            Q_API +
+            QUESTION_API +
               "/paper/questionNumbers/" +
               row.id +
               "/" +
@@ -1080,7 +1080,7 @@ export default {
       if (this.genPaper.simpleGenPaperPolicy == "BY_SCORE") {
         this.$http
           .get(
-            Q_API +
+            QUESTION_API +
               "/paper/questionScores/" +
               row.id +
               "/" +

+ 39 - 41
src/modules/questions/views/ImportPaper.vue

@@ -308,12 +308,8 @@
 </template>
 
 <script>
-import {
-  CORE_API,
-  Q_API,
-  LEVEL_TYPE,
-  PUBLICITY_LIST
-} from "../constants/constants";
+import { CORE_API, QUESTION_API } from "@/constants/constants";
+import { LEVEL_TYPE, PUBLICITY_LIST } from "../constants/constants";
 import { mapState } from "vuex";
 export default {
   data() {
@@ -368,7 +364,7 @@ export default {
     searchImportPaper() {
       this.loading = true;
       var url =
-        Q_API + "/importPaper/" + this.currentPage + "/" + this.pageSize;
+        QUESTION_API + "/importPaper/" + this.currentPage + "/" + this.pageSize;
       this.$http.get(url, { params: this.formSearch }).then(response => {
         this.tableData = response.data.content;
         this.total = response.data.totalElements;
@@ -395,7 +391,7 @@ export default {
         type: "warning"
       }).then(() => {
         this.loading = true;
-        this.$http.delete(Q_API + "/paper/" + row.id).then(
+        this.$http.delete(QUESTION_API + "/paper/" + row.id).then(
           () => {
             this.$notify({
               message: "删除成功",
@@ -426,7 +422,7 @@ export default {
           type: "warning"
         }).then(() => {
           this.loading = true;
-          this.$http.delete(Q_API + "/paper/" + paperIds).then(
+          this.$http.delete(QUESTION_API + "/paper/" + paperIds).then(
             () => {
               this.$notify({
                 message: "删除成功",
@@ -481,36 +477,38 @@ export default {
         });
       } else {
         this.loading = true;
-        this.$http.put(Q_API + "/useBasePaper/" + this.selectedPaperIds).then(
-          response => {
-            console.log("come in response:", response);
-            if (!response.data.desc) {
-              this.$notify({
-                message: "操作成功",
-                type: "success"
-              });
-            } else {
+        this.$http
+          .put(QUESTION_API + "/useBasePaper/" + this.selectedPaperIds)
+          .then(
+            response => {
+              console.log("come in response:", response);
+              if (!response.data.desc) {
+                this.$notify({
+                  message: "操作成功",
+                  type: "success"
+                });
+              } else {
+                this.$notify({
+                  message: response.data.desc,
+                  type: "error"
+                });
+              }
+              this.loading = false;
+            },
+            error => {
+              console.log("com in error:", error.body);
+              var message = error.body.desc;
+              var err = message
+                .replace("[", "")
+                .replace("]", "")
+                .substring(message.indexOf("desc") + 4);
               this.$notify({
-                message: response.data.desc,
+                message: err,
                 type: "error"
               });
+              this.loading = false;
             }
-            this.loading = false;
-          },
-          error => {
-            console.log("com in error:", error.body);
-            var message = error.body.desc;
-            var err = message
-              .replace("[", "")
-              .replace("]", "")
-              .substring(message.indexOf("desc") + 4);
-            this.$notify({
-              message: err,
-              type: "error"
-            });
-            this.loading = false;
-          }
-        );
+          );
       }
     },
     //克隆试卷
@@ -544,7 +542,7 @@ export default {
       this.cloneLoading = true;
       this.$http
         .post(
-          Q_API +
+          QUESTION_API +
             "/clonePaper/" +
             this.copyPaperId +
             "/" +
@@ -592,7 +590,7 @@ export default {
       var key = this.user.key;
       var token = this.user.token;
       window.location.href =
-        Q_API +
+        QUESTION_API +
         "/paper/export/course/question/" +
         this.formSearch.courseNo +
         "?$key=" +
@@ -603,9 +601,9 @@ export default {
     exportOriginalPaper(row) {
       var key = this.user.key;
       var token = this.user.token;
-      //window.location.href = Q_API+"/originalPaper/export/"+row.id+"/"+ this.user.displayName;
+      //window.location.href = QUESTION_API+"/originalPaper/export/"+row.id+"/"+ this.user.displayName;
       window.open(
-        Q_API +
+        QUESTION_API +
           "/originalPaper/export/" +
           row.id +
           "/" +
@@ -649,7 +647,7 @@ export default {
       this.quesLoading = true;
       this.$http
         .put(
-          Q_API +
+          QUESTION_API +
             "/question/updatePro/paperIds/" +
             this.selectedPaperIds +
             "/" +
@@ -680,7 +678,7 @@ export default {
       var orgId = this.user.rootOrgId;
       this.$http
         .put(
-          Q_API +
+          QUESTION_API +
             "/question/updatePro/courseCode/" +
             this.formSearch.courseNo +
             "/" +

+ 2 - 2
src/modules/questions/views/ImportPaperInfo.vue

@@ -140,7 +140,7 @@
   </div>
 </template>
 <script>
-import { CORE_API, Q_API } from "../constants/constants";
+import { CORE_API, QUESTION_API } from "@/constants/constants";
 import { mapState } from "vuex";
 export default {
   data() {
@@ -318,7 +318,7 @@ export default {
     }
   },
   created() {
-    this.uploadAction = Q_API + "/importPaper";
+    this.uploadAction = QUESTION_API + "/importPaper";
     this.uploadData = { name: this.formSearch.name };
     this.uploadHeaders = {
       key: this.user.key,

+ 10 - 5
src/modules/questions/views/InsertBluePaperStructure.vue

@@ -221,7 +221,8 @@
   </div>
 </template>
 <script>
-import { CORE_API, Q_API, QUESTION_TYPES } from "../constants/constants";
+import { CORE_API, QUESTION_API } from "@/constants/constants";
+import { QUESTION_TYPES } from "../constants/constants";
 import ClassicEditor from "@ckeditor/ckeditor5-build-inline";
 export default {
   data() {
@@ -278,7 +279,9 @@ export default {
         var blueStruct = JSON.parse(blueStructStorge);
         this.blueStruct = blueStruct;
         this.$http
-          .get(Q_API + "/courseProperty/enable/" + this.blueStruct.courseNo)
+          .get(
+            QUESTION_API + "/courseProperty/enable/" + this.blueStruct.courseNo
+          )
           .then(response => {
             this.coursePropertyList = response.data;
             if (this.coursePropertyList && this.coursePropertyList.length > 0) {
@@ -299,7 +302,7 @@ export default {
         if (this.blueStruct.courseNo == course.code) {
           var courseId = course.id;
           this.$http
-            .get(Q_API + "/courseProperty/all/" + courseId)
+            .get(QUESTION_API + "/courseProperty/all/" + courseId)
             .then(response => {
               this.coursePropertyList = response.data;
               console.log("this.coursePropertyList:", this.coursePropertyList);
@@ -310,7 +313,9 @@ export default {
     //查询课程下的课程属性
     getCoursePropertyList() {
       this.$http
-        .get(Q_API + "/courseProperty/enable/" + this.blueStruct.courseNo)
+        .get(
+          QUESTION_API + "/courseProperty/enable/" + this.blueStruct.courseNo
+        )
         .then(response => {
           this.coursePropertyList = response.data;
           console.log("this.coursePropertyList:", this.coursePropertyList);
@@ -390,7 +395,7 @@ export default {
         return false;
       }
       this.loading = true;
-      var url = Q_API + "/paperStruct";
+      var url = QUESTION_API + "/paperStruct";
       if (this.paperStructId != "add") {
         //假如没ID就是新增
         this.$http

+ 6 - 5
src/modules/questions/views/InsertBluePaperStructureInfo.vue

@@ -328,7 +328,8 @@
   </div>
 </template>
 <script>
-import { Q_API, QUESTION_TYPES } from "../constants/constants";
+import { QUESTION_API } from "@/constants/constants";
+import { QUESTION_TYPES } from "../constants/constants";
 export default {
   data() {
     return {
@@ -399,7 +400,7 @@ export default {
             if (this.paperDetailStruct.coursePropertyNumberDtos.length == 0) {
               //查询课程下的所有属性
               this.$http
-                .get(Q_API + "/property/" + blueStruct.coursePropertyId)
+                .get(QUESTION_API + "/property/" + blueStruct.coursePropertyId)
                 .then(response => {
                   this.properties = response.body;
                   this.init();
@@ -459,7 +460,7 @@ export default {
     //初始化来源大题名称
     initQuesNameList() {
       var url =
-        Q_API +
+        QUESTION_API +
         "/paperStruct/quesNames?quesType=" +
         this.paperDetailStruct.questionType +
         "&courseNo=" +
@@ -472,7 +473,7 @@ export default {
     getQuesNameList(quesType) {
       if (quesType && quesType.length > 0) {
         var url =
-          Q_API +
+          QUESTION_API +
           "/paperStruct/quesNames?quesType=" +
           quesType +
           "&courseNo=" +
@@ -771,7 +772,7 @@ export default {
       }
       //参数序列化
       this.$http
-        .get(Q_API + "/question/count", { params: this.question })
+        .get(QUESTION_API + "/question/count", { params: this.question })
         .then(response => {
           this.message = response.data;
           console.log("this.message:", this.message);

+ 2 - 2
src/modules/questions/views/InsertPaperStructure.vue

@@ -200,7 +200,7 @@
 </template>
 
 <script>
-import { CORE_API, Q_API } from "../constants/constants";
+import { CORE_API, QUESTION_API } from "@/constants/constants";
 import ClassicEditor from "@ckeditor/ckeditor5-build-inline";
 export default {
   data() {
@@ -279,7 +279,7 @@ export default {
         return false;
       }
       this.loading = true;
-      var url = Q_API + "/paperStruct";
+      var url = QUESTION_API + "/paperStruct";
       console.log(this.paperStructId);
       if (this.paperStructId != "add") {
         //假如没ID就是新增

+ 3 - 2
src/modules/questions/views/InsertPaperStructureInfo.vue

@@ -662,7 +662,8 @@
 </template>
 
 <script>
-import { Q_API, QUESTION_TYPES } from "../constants/constants";
+import { QUESTION_API } from "@/constants/constants";
+import { QUESTION_TYPES } from "../constants/constants";
 import _ from "lodash";
 export default {
   data() {
@@ -776,7 +777,7 @@ export default {
     getQuesNameList(quesType) {
       if (quesType && quesType.length > 0) {
         var quesTypeObj = {};
-        var url = Q_API + "/paperStruct/quesNames";
+        var url = QUESTION_API + "/paperStruct/quesNames";
         if (this.courseNo !== "all") {
           quesTypeObj = {
             quesType: quesType,

+ 7 - 5
src/modules/questions/views/InsertPaperTitle.vue

@@ -137,7 +137,7 @@
   </div>
 </template>
 <script>
-import { CORE_API, Q_API } from "../constants/constants";
+import { CORE_API, QUESTION_API } from "@/constants/constants";
 import { mapState } from "vuex";
 export default {
   data() {
@@ -190,7 +190,9 @@ export default {
     searchGenPaper() {
       this.$http
         .get(
-          Q_API + "/importPaper/1/500/?courseNo=" + this.paperTitleForm.courseNo
+          QUESTION_API +
+            "/importPaper/1/500/?courseNo=" +
+            this.paperTitleForm.courseNo
         )
         .then(response => {
           this.tableData = response.data.content;
@@ -201,7 +203,7 @@ export default {
     //根据试卷查询大题
     searchPaperDetail() {
       this.$http
-        .get(Q_API + "/paperDetail/paper/" + this.paperTitleForm.paperId)
+        .get(QUESTION_API + "/paperDetail/paper/" + this.paperTitleForm.paperId)
         .then(response => {
           this.detailsData = response.data;
           for (var i = 0; i < this.detailsData.length; i++) {
@@ -232,7 +234,7 @@ export default {
           console.log("课程名称:" + this.paperTitleForm.courseName);
           this.$http
             .post(
-              Q_API +
+              QUESTION_API +
                 "/importPaper/saveBlankPaper/" +
                 this.paperTitleForm.courseNo +
                 "/" +
@@ -243,7 +245,7 @@ export default {
               var paperId = response.data.paper.id;
               this.$http
                 .get(
-                  Q_API +
+                  QUESTION_API +
                     "/importPaper/1/500/?courseNo=" +
                     this.paperTitleForm.courseNo
                 )

+ 4 - 4
src/modules/questions/views/PaperStructure.vue

@@ -176,7 +176,7 @@
 </template>
 
 <script>
-import { CORE_API, Q_API } from "../constants/constants";
+import { CORE_API, QUESTION_API } from "@/constants/constants";
 export default {
   data() {
     return {
@@ -203,7 +203,7 @@ export default {
     searchPaperStructs() {
       this.loading = true;
       var url =
-        Q_API + "/paperStruct/" + this.currentPage + "/" + this.pageSize;
+        QUESTION_API + "/paperStruct/" + this.currentPage + "/" + this.pageSize;
       this.$http.get(url, { params: this.formSearch }).then(response => {
         this.tableData = response.data.content;
         this.total = response.data.totalElements;
@@ -234,7 +234,7 @@ export default {
         cancelButtonText: "取消",
         type: "warning"
       }).then(() => {
-        var url = Q_API + "/paperStruct/" + row.id;
+        var url = QUESTION_API + "/paperStruct/" + row.id;
         this.loading = true;
         this.$http.delete(url).then(
           () => {
@@ -269,7 +269,7 @@ export default {
           type: "error"
         }).then(() => {
           this.loading = true;
-          var url = Q_API + "/paperStruct/" + this.selectedIds;
+          var url = QUESTION_API + "/paperStruct/" + this.selectedIds;
           this.$http
             .delete(url)
             .then(() => {

+ 7 - 7
src/modules/questions/views/PropertyInfo.vue

@@ -148,7 +148,7 @@
 </template>
 
 <script>
-import { CORE_API, Q_API } from "../constants/constants";
+import { CORE_API, QUESTION_API } from "@/constants/constants";
 export default {
   data() {
     return {
@@ -231,7 +231,7 @@ export default {
         this.getCourses(this.courseProperty.courseId);
       }
       this.$http
-        .get(Q_API + "/property/all/" + this.coursePropertyId)
+        .get(QUESTION_API + "/property/all/" + this.coursePropertyId)
         .then(response => {
           this.data = response.data;
           for (var i = 0; i < this.data.length; i++) {
@@ -312,7 +312,7 @@ export default {
       this.property.remark = this.propertyForm.remark;
       if (this.property.id) {
         this.$http
-          .put(Q_API + "/property/save", this.property)
+          .put(QUESTION_API + "/property/save", this.property)
           .then(() => {
             this.$notify({
               message: "修改成功",
@@ -329,7 +329,7 @@ export default {
           });
       } else {
         this.$http
-          .post(Q_API + "/property/save", this.property)
+          .post(QUESTION_API + "/property/save", this.property)
           .then(() => {
             this.$notify({
               message: "新增成功",
@@ -356,7 +356,7 @@ export default {
         this.loading = true;
         this.$http
           .delete(
-            Q_API +
+            QUESTION_API +
               "/property/delete/" +
               this.property.id +
               "/" +
@@ -403,7 +403,7 @@ export default {
     //上移
     moveUp() {
       this.$http
-        .put(Q_API + "/property/moveUp", this.property)
+        .put(QUESTION_API + "/property/moveUp", this.property)
         .then(() => {
           this.searchProperty();
           this.showMoveButtton = true;
@@ -419,7 +419,7 @@ export default {
     //下移
     moveDown() {
       this.$http
-        .put(Q_API + "/property/moveDown", this.property)
+        .put(QUESTION_API + "/property/moveDown", this.property)
         .then(() => {
           this.searchProperty();
           this.showMoveButtton = true;

+ 42 - 33
src/modules/questions/views/Question.vue

@@ -358,12 +358,8 @@
   </div>
 </template>
 <script>
-import {
-  CORE_API,
-  Q_API,
-  QUESTION_TYPES,
-  LEVEL_TYPE
-} from "../constants/constants";
+import { CORE_API, QUESTION_API } from "@/constants/constants";
+import { QUESTION_TYPES, LEVEL_TYPE } from "../constants/constants";
 export default {
   data() {
     return {
@@ -421,7 +417,8 @@ export default {
     //查询列表
     searchQuestionPaper() {
       this.tableData = [];
-      var url = Q_API + "/question/" + this.currentPage + "/" + this.pageSize;
+      var url =
+        QUESTION_API + "/question/" + this.currentPage + "/" + this.pageSize;
       this.loading = true;
       this.$http.get(url, { params: this.formSearch }).then(response => {
         this.tableData = response.data.content;
@@ -464,29 +461,33 @@ export default {
         type: "warning"
       }).then(() => {
         this.loading = true;
-        this.$http.delete(Q_API + "/paper/deleteQuestion/" + row.id).then(
-          response => {
-            if (response.body.length > 0) {
-              this.loading = false;
-              this.deleteInfo =
-                "该试题被试卷:" + response.data.join(" , ") + "使用,不能删除";
-              this.deleteDialogVisible = true;
-            } else {
+        this.$http
+          .delete(QUESTION_API + "/paper/deleteQuestion/" + row.id)
+          .then(
+            response => {
+              if (response.body.length > 0) {
+                this.loading = false;
+                this.deleteInfo =
+                  "该试题被试卷:" +
+                  response.data.join(" , ") +
+                  "使用,不能删除";
+                this.deleteDialogVisible = true;
+              } else {
+                this.$notify({
+                  message: "删除成功",
+                  type: "success"
+                });
+                this.searchQuestionPaper();
+              }
+            },
+            () => {
               this.$notify({
-                message: "删除成功",
-                type: "success"
+                message: "删除失败",
+                type: "error"
               });
-              this.searchQuestionPaper();
+              this.loading = false;
             }
-          },
-          () => {
-            this.$notify({
-              message: "删除失败",
-              type: "error"
-            });
-            this.loading = false;
-          }
-        );
+          );
       });
     },
     //打开弹窗
@@ -517,7 +518,9 @@ export default {
             if (this.formSearch.courseNo) {
               this.$http
                 .get(
-                  Q_API + "/courseProperty/enable/" + this.formSearch.courseNo
+                  QUESTION_API +
+                    "/courseProperty/enable/" +
+                    this.formSearch.courseNo
                 )
                 .then(response => {
                   this.coursePropertyList = response.data;
@@ -603,7 +606,9 @@ export default {
       this.formSearch.secondPropertyId = "";
       if (this.formSearch.courseNo) {
         this.$http
-          .get(Q_API + "/courseProperty/enable/" + this.formSearch.courseNo)
+          .get(
+            QUESTION_API + "/courseProperty/enable/" + this.formSearch.courseNo
+          )
           .then(response => {
             this.coursePropertyList = response.data;
           });
@@ -620,7 +625,7 @@ export default {
         for (let courseProperty of this.coursePropertyList) {
           if (courseProperty.name == this.formSearch.coursePropertyName) {
             this.$http
-              .get(Q_API + "/property/first/" + courseProperty.id)
+              .get(QUESTION_API + "/property/first/" + courseProperty.id)
               .then(response => {
                 console.log(response);
                 this.firstPropertyList = response.data;
@@ -634,7 +639,9 @@ export default {
       if (this.formSearch.firstPropertyId) {
         this.formSearch.secondPropertyId = "";
         this.$http
-          .get(Q_API + "/property/second/" + this.formSearch.firstPropertyId)
+          .get(
+            QUESTION_API + "/property/second/" + this.formSearch.firstPropertyId
+          )
           .then(response => {
             console.log(response);
             this.secondPropertyList = response.data;
@@ -646,7 +653,7 @@ export default {
         for (let courseProperty of this.coursePropertyList) {
           if (courseProperty.name == this.formSearch.coursePropertyName) {
             this.$http
-              .get(Q_API + "/property/first/" + courseProperty.id)
+              .get(QUESTION_API + "/property/first/" + courseProperty.id)
               .then(response => {
                 console.log(response);
                 this.firstPropertyList = response.data;
@@ -660,7 +667,9 @@ export default {
     getSecond() {
       if (this.formSearch.firstPropertyId) {
         this.$http
-          .get(Q_API + "/property/second/" + this.formSearch.firstPropertyId)
+          .get(
+            QUESTION_API + "/property/second/" + this.formSearch.firstPropertyId
+          )
           .then(response => {
             console.log(response);
             this.secondPropertyList = response.data;