Pārlūkot izejas kodu

UI风格改造coding...

刘洋 1 gadu atpakaļ
vecāks
revīzija
94d7857429
53 mainītis faili ar 1060 papildinājumiem un 180 dzēšanām
  1. 6 4
      package.json
  2. 12 0
      src/assets/icons/daoru.svg
  3. 12 0
      src/assets/icons/jinyong.svg
  4. 12 0
      src/assets/icons/qiyong.svg
  5. 16 0
      src/assets/icons/tongbu.svg
  6. 12 0
      src/assets/icons/xinzeng.svg
  7. 16 16
      src/assets/styles/adaptive.scss
  8. 8 0
      src/assets/styles/base.scss
  9. 70 49
      src/assets/styles/element-ui-costom.scss
  10. 43 18
      src/components/ImportFileDialog.vue
  11. 1 1
      src/components/ModifyRichText.vue
  12. 85 0
      src/components/SvgBtn.vue
  13. 39 0
      src/components/svgIcon/index.vue
  14. 9 0
      src/components/svgIcon/svgIcon.js
  15. 1 0
      src/main.js
  16. 1 1
      src/modules/card/components/BatchBuildCardDialog.vue
  17. 1 1
      src/modules/card/components/ModifyCard.vue
  18. 1 1
      src/modules/paper/components/AutoBuildPaperStructManage.vue
  19. 1 1
      src/modules/paper/components/ModifyAutoBuildPaperStruct.vue
  20. 1 1
      src/modules/paper/components/ModifyDetailStruct.vue
  21. 1 1
      src/modules/paper/components/PaperAuditInfo.vue
  22. 1 1
      src/modules/paper/components/PaperBaseInfo.vue
  23. 1 1
      src/modules/paper/components/PaperBlueInfo.vue
  24. 1 1
      src/modules/paper/components/PaperQuestypeInfo.vue
  25. 1 1
      src/modules/portal/views/home/Home.vue
  26. 1 1
      src/modules/question/components/FolderQuestionManageDialog.vue
  27. 1 1
      src/modules/question/components/ModifyFolder.vue
  28. 1 1
      src/modules/question/components/ModifySourceDetail.vue
  29. 1 1
      src/modules/question/components/QuestionFolderDialog.vue
  30. 1 1
      src/modules/question/components/QuestionImportDialog.vue
  31. 1 1
      src/modules/question/components/QuestionStatisticsDialog.vue
  32. 1 1
      src/modules/questions/views/Course.vue
  33. 1 1
      src/modules/questions/views/CourseProperty.vue
  34. 9 9
      src/modules/questions/views/EditPaper.vue
  35. 10 10
      src/modules/questions/views/EditPaperPendingTrial.vue
  36. 1 1
      src/modules/questions/views/ExamPaperPendingTrial.vue
  37. 1 1
      src/modules/questions/views/ExportTemplate.vue
  38. 2 2
      src/modules/questions/views/GenPaper.vue
  39. 3 3
      src/modules/questions/views/ImportPaper.vue
  40. 1 1
      src/modules/questions/views/InsertBluePaperStructure.vue
  41. 1 1
      src/modules/questions/views/InsertPaperStructure.vue
  42. 2 2
      src/modules/questions/views/InsertPaperStructureInfo.vue
  43. 1 1
      src/modules/questions/views/InsertPaperTitle.vue
  44. 1 1
      src/modules/questions/views/PaperPendingTrial.vue
  45. 1 1
      src/modules/questions/views/PropertyInfo.vue
  46. 1 1
      src/modules/questions/views/QuestionPreview.vue
  47. 28 15
      src/modules/questions/views/School.vue
  48. 1 1
      src/modules/questions/views/SynthesisPaperStorage.vue
  49. 1 1
      src/modules/questions/views/ViewPaper.vue
  50. 1 1
      src/modules/questions/views/data_previllege_add_course.vue
  51. 24 12
      src/modules/questions/views/user.vue
  52. 16 0
      vue.config.js
  53. 595 10
      yarn.lock

+ 6 - 4
package.json

@@ -18,17 +18,17 @@
     "axios-progress-bar": "^1.2.0",
     "bootstrap": "^4.6.0",
     "core-js": "^3.8.3",
+    "crypto-js": "^4.1.1",
     "element-ui": "2.15.6",
     "html2canvas": "^1.4.1",
     "js-md5": "^0.7.3",
     "lodash": "^4.17.15",
     "moment": "^2.29.1",
+    "spark-md5": "^3.0.2",
     "vue": "^2.6.12",
     "vue-awesome": "^4.1.0",
     "vue-router": "^3.5.1",
-    "vuex": "^3.6.2",
-    "crypto-js": "^4.1.1",
-    "spark-md5": "^3.0.2"
+    "vuex": "^3.6.2"
   },
   "devDependencies": {
     "@babel/core": "^7.12.16",
@@ -47,6 +47,8 @@
     "prettier": "^2.4.1",
     "sass": "^1.32.7",
     "sass-loader": "^12.0.0",
+    "svg-sprite-loader": "^6.0.11",
+    "svgo-loader": "^4.0.0",
     "vue-cli-plugin-axios": "0.0.4",
     "vue-cli-plugin-element": "^1.0.1",
     "vue-template-compiler": "^2.6.14"
@@ -60,4 +62,4 @@
       "git add"
     ]
   }
-}
+}

+ 12 - 0
src/assets/icons/daoru.svg

@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg width="16px" height="16px" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+    <title>icon-导入</title>
+    <g id="页面-1" stroke="none" stroke-width="1"  fill-rule="evenodd">
+        <g id="04.01-用户管理" transform="translate(-336, -209)">
+            <g id="icon-导入" transform="translate(336, 209)">
+                <rect id="download-(Background)" opacity="0" x="0" y="0" width="16" height="16"></rect>
+                <path d="M8.5,9.57746124 L8.49998093,0.5 L7.49998093,0.5 L7.5,9.57745647 L3.73641205,5.81387091 L3.02930534,6.5209775 L7.64644661,11.1381191 C7.84170875,11.3333813 8.15829124,11.3333813 8.35355339,11.1381192 C8.35355339,11.1381191 8.3535534,11.1381191 8.3535534,11.1381191 L12.9706955,6.52097702 L12.9706955,6.52097702 L12.2635889,5.81386995 L8.5,9.57746124 Z M2,13.0000238 C2,13.5523081 2.44771534,14.0000238 3,14.0000238 L13,14.0000238 C13.5522842,14.0000238 14,13.552309 14,13.0000238 L14,11.0000238 L13,11.0000238 L13,13.0000238 L3,13.0000238 L3,11.0000238 L2,11.0000238 L2,13.0000238 Z" id="download"></path>
+            </g>
+        </g>
+    </g>
+</svg>

+ 12 - 0
src/assets/icons/jinyong.svg

@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg width="16px" height="16px" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+    <title>icon-禁用</title>
+    <g id="页面-1" stroke="none" stroke-width="1" fill-rule="evenodd">
+        <g id="03.01-顶级机构管理" transform="translate(-406, -209)">
+            <g id="icon-禁用" transform="translate(406, 209)">
+                <rect id="close-circle-(Background)" opacity="0" x="0" y="0" width="16" height="16"></rect>
+                <path d="M7.2928915,7.99995184 L4.9810369,5.688097 L5.68814373,4.98099017 L8,7.29284477 L10.3118525,4.98099017 L11.018959,5.68809748 L8.70710468,7.99995184 L11.0190525,10.3118992 L10.311945,11.0190058 L8,8.70705843 L5.68805075,11.0190058 L4.98094392,10.3118992 L7.2928915,7.99995184 Z M15,8 C15,11.8659954 11.8659916,15 8,15 C4.13400483,15 1,11.8659916 1,8 C1,4.13400459 4.13400912,1 8,1 C11.8659954,1 15,4.13400888 15,8 Z M14,8 C14,11.3137102 11.3137064,14 8,14 C4.68628979,14 2,11.3137074 2,8 C2,4.68629003 4.6862936,2 8,2 C11.3137102,2 14,4.68629384 14,8 Z" id="Union" ></path>
+            </g>
+        </g>
+    </g>
+</svg>

+ 12 - 0
src/assets/icons/qiyong.svg

@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg width="16px" height="16px" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+    <title>icon-启用</title>
+    <g id="页面-1" stroke="none" stroke-width="1"  fill-rule="evenodd">
+        <g id="03.01-顶级机构管理" transform="translate(-336, -209)">
+            <g id="icon-启用" transform="translate(336, 209)">
+                <rect id="play-circle-(Background)" opacity="0" x="0" y="0" width="16" height="16"></rect>
+                <path d="M8,1 C11.866,1 15,4.13401 15,8 C15,11.866 11.866,15 8,15 C4.134,15 1,11.866 1,8 C1,4.134 4.13401,1 8,1 Z M8,2 C4.68629,2 2,4.68629 2,8 C2,11.3137 4.68629,14 8,14 C11.3137,14 14,11.3137 14,8 C14,4.68629 11.3137,2 8,2 Z M6.45,4.79569 L11.55,7.74017 C11.75,7.85564 11.75,8.14432 11.55,8.25979 L6.45,11.2043 C6.25,11.3198 6,11.1754 6,10.9445 L6,5.0555 C6,4.82456 6.25,4.68022 6.45,4.79569 Z" id="play-circle" ></path>
+            </g>
+        </g>
+    </g>
+</svg>

+ 16 - 0
src/assets/icons/tongbu.svg

@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg width="16px" height="16px" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+    <title>icon-同步</title>
+    <g id="页面-1" stroke="none" stroke-width="1"  fill-rule="evenodd">
+        <g id="03.01-顶级机构管理" transform="translate(-260, -209)">
+            <g id="icon-同步" transform="translate(260, 209)">
+                <rect id="add-circle-(Background)" opacity="0" x="0" y="0" width="16" height="16"></rect>
+                <path d="M15,8 C15,4.13400674 11.8659935,1 8,1 C4.13400674,1 1,4.13400674 1,8 C1,11.8659935 4.13400674,15 8,15 C11.8659935,15 15,11.8659935 15,8 Z" id="add-circle" ></path>
+                <g id="编组" transform="translate(8.0005, 8.0068) rotate(-270) translate(-8.0005, -8.0068)translate(3.3737, 3.9563)" fill="#FFFFFF">
+                    <path d="M1,1.66574144 L3.1464529,3.81218886 L3.85355949,3.10508251 L0.904776573,0.156296276 C0.570897102,-0.177584089 -9.09494702e-13,0.0588795475 -9.09494702e-13,0.531062775 L-9.09494702e-13,8.10101318 L1,8.10101318 L1,1.66574144 Z" id="order-ascending备份" transform="translate(1.9268, 4.0505) rotate(-180) translate(-1.9268, -4.0505)"></path>
+                    <path d="M6.4,1.66574144 L8.5464529,3.81218886 L9.25355949,3.10508251 L6.30477657,0.156296276 C5.9708971,-0.177584089 5.4,0.0588795475 5.4,0.531062775 L5.4,8.10101318 L6.4,8.10101318 L6.4,1.66574144 Z" id="order-ascending备份-2" transform="translate(7.3268, 4.0505) rotate(-360) translate(-7.3268, -4.0505)"></path>
+                </g>
+            </g>
+        </g>
+    </g>
+</svg>

+ 12 - 0
src/assets/icons/xinzeng.svg

@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg width="16px" height="16px" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+    <title>icon-新增</title>
+    <g id="页面-1" stroke="none" stroke-width="1"  fill-rule="evenodd">
+        <g id="04.01-用户管理" transform="translate(-260, -209)">
+            <g id="icon-新增" transform="translate(260, 209)">
+                <rect id="add-circle-(Background)" opacity="0" x="0" y="0" width="16" height="16"></rect>
+                <path d="M4.5,8.5 L4.5,7.5 L7.5,7.5 L7.5,4.5 L8.5,4.5 L8.5,7.5 L11.5,7.5 L11.5,8.5 L8.5,8.5 L8.5,11.5 L7.5,11.5 L7.5,8.5 L4.5,8.5 Z M15,8 C15,4.13400674 11.8659935,1 8,1 C4.13400674,1 1,4.13400674 1,8 C1,11.8659935 4.13400674,15 8,15 C11.8659935,15 15,11.8659935 15,8 Z" id="add-circle" ></path>
+            </g>
+        </g>
+    </g>
+</svg>

+ 16 - 16
src/assets/styles/adaptive.scss

@@ -281,22 +281,22 @@
 
   // customize element-ui
   .side-dialog {
-    box-shadow: -15px 15px 15px 0px rgba(212, 220, 243, 0.3);
-    .el-dialog__header {
-      padding: 15px;
-      &::after {
-        left: 15px;
-        right: 15px;
-      }
-    }
-    .el-dialog__body {
-      top: 60px;
-      bottom: 66px;
-      padding: 15px;
-    }
-    .el-dialog__footer {
-      padding: 15px;
-    }
+    // box-shadow: -15px 15px 15px 0px rgba(212, 220, 243, 0.3);
+    // .el-dialog__header {
+    //   padding: 15px;
+    //   &::after {
+    //     left: 15px;
+    //     right: 15px;
+    //   }
+    // }
+    // .el-dialog__body {
+    //   top: 60px;
+    //   bottom: 66px;
+    //   padding: 15px;
+    // }
+    // .el-dialog__footer {
+    //   padding: 15px;
+    // }
   }
   .action-dropdown {
     padding: 0 15px;

+ 8 - 0
src/assets/styles/base.scss

@@ -126,6 +126,14 @@ body {
   // border-radius: 20px;
   border-radius: 8px;
   padding: 16px;
+  .icon-btn-group{
+    padding:0 6px 10px 6px;
+    .svg-btn{
+      &:not(:first-child){
+        margin-left:10px;
+      }
+    }
+  }
 }
 .part-box-border {
   border: 1px solid $--color-border;

+ 70 - 49
src/assets/styles/element-ui-costom.scss

@@ -22,55 +22,55 @@
   }
 }
 .side-dialog {
-  position: absolute;
-  margin: 0 !important;
-  top: 0;
-  right: 0;
-  height: 100%;
-  box-shadow: -20px 20px 20px 0px rgba(212, 220, 243, 0.3);
-  .el-dialog__header {
-    position: absolute;
-    top: 0;
-    left: 0;
-    right: 0;
-    padding: 20px;
-    &::after {
-      content: "";
-      position: absolute;
-      left: 20px;
-      right: 20px;
-      bottom: 0;
-      border-bottom: 1px solid $--color-border;
-    }
-  }
-  .el-dialog__body {
-    position: absolute;
-    left: 0;
-    right: 0;
-    top: 70px;
-    bottom: 80px;
-    padding: 20px;
-    overflow: auto;
-  }
-  .el-dialog__footer {
-    position: absolute;
-    bottom: 0;
-    left: 0;
-    right: 0;
-    padding: 20px;
-  }
-  // other
-  .el-form {
-    &-item {
-      margin-bottom: 16px;
-      &__label {
-        margin: 0;
-      }
-      &__error {
-        padding-top: 2px;
-      }
-    }
-  }
+  // position: absolute;
+  // margin: 0 !important;
+  // top: 0;
+  // right: 0;
+  // height: 100%;
+  // box-shadow: -20px 20px 20px 0px rgba(212, 220, 243, 0.3);
+  // .el-dialog__header {
+  //   position: absolute;
+  //   top: 0;
+  //   left: 0;
+  //   right: 0;
+  //   padding: 20px;
+  //   &::after {
+  //     content: "";
+  //     position: absolute;
+  //     left: 20px;
+  //     right: 20px;
+  //     bottom: 0;
+  //     border-bottom: 1px solid $--color-border;
+  //   }
+  // }
+  // .el-dialog__body {
+  //   position: absolute;
+  //   left: 0;
+  //   right: 0;
+  //   top: 70px;
+  //   bottom: 80px;
+  //   padding: 20px;
+  //   overflow: auto;
+  // }
+  // .el-dialog__footer {
+  //   position: absolute;
+  //   bottom: 0;
+  //   left: 0;
+  //   right: 0;
+  //   padding: 20px;
+  // }
+  // // other
+  // .el-form {
+  //   &-item {
+  //     margin-bottom: 16px;
+  //     &__label {
+  //       margin: 0;
+  //     }
+  //     &__error {
+  //       padding-top: 2px;
+  //     }
+  //   }
+  // }
 }
 .action-dropdown {
   background-color: $--color-text-primary;
@@ -265,6 +265,24 @@
   .thead {
     color: $--color-text-secondary;
   }
+  .el-table__body-wrapper{
+    .cell{
+      .el-button{
+        &.normal{
+          color:#262626;
+          &:hover{
+            color:rgba(38,38,38,.8);
+          }
+        }
+        &.danger{
+          color:#f56c6c;
+          &:hover{
+            color:#f78989;
+          }
+        }
+      }
+    }
+  }
 }
 // el-pagination
 .el-pagination-li {
@@ -331,4 +349,7 @@
 }
 .el-menu{
   border-color:transparent;
+}
+.el-table--small{
+  font-size:14px;
 }

+ 43 - 18
src/components/ImportFileDialog.vue

@@ -1,15 +1,17 @@
 <template>
   <el-dialog
-    custom-class="side-dialog"
+    custom-class="import-file-dialog"
     :visible.sync="modalIsShow"
     :title="dialogTitle"
     width="520px"
-    :modal="false"
+    :modal="true"
     append-to-body
     @open="visibleChange"
+    @close="dialogClose"
   >
     <el-upload
       ref="UploadComp"
+      drag
       :action="uploadUrl"
       :headers="headers"
       :max-size="maxSize"
@@ -20,11 +22,16 @@
       :on-success="handleSuccess"
       :on-change="fileChange"
       :http-request="upload"
-      :show-file-list="false"
       :disabled="loading"
       :auto-upload="false"
+      :multiple="false"
+      style="text-align: center"
     >
-      <el-button
+      <i class="el-icon-upload"></i>
+      <div class="el-upload__text">
+        {{ `点击或将文件拖拽到这里上传(只能上传${format.join("、")}文件)` }}
+      </div>
+      <!-- <el-button
         slot="trigger"
         size="small"
         type="primary"
@@ -61,10 +68,14 @@
         @click="exportFile"
       >
         下载模板
-      </el-button>
+      </el-button> -->
     </el-upload>
-    <p v-if="filename" class="tips-info">{{ filename }}</p>
+    <!-- <p v-if="filename" class="tips-info">{{ filename }}</p> -->
     <p v-if="!res.success" class="tips-info tips-error">{{ res.message }}</p>
+    <div slot="footer">
+      <el-button type="primary" @click="submitUpload">确认</el-button>
+      <el-button @click="cancel">取消</el-button>
+    </div>
   </el-dialog>
 </template>
 
@@ -136,13 +147,15 @@ export default {
     };
   },
   methods: {
-    visibleChange() {
+    dialogClose() {
       this.res = {};
       this.loading = false;
       this.uploadDataDict = {};
       this.filename = "";
       this.fileValid = false;
+      this.$refs.UploadComp.clearFiles();
     },
+    visibleChange() {},
     cancel() {
       this.modalIsShow = false;
     },
@@ -155,10 +168,14 @@ export default {
         ? this.format.some((item) => item.toLowerCase() === _file_format)
         : true;
     },
-    fileChange(fileObj) {
-      if (fileObj.status === "ready") {
-        this.handleBeforeUpload(fileObj.raw).catch(() => {});
+    fileChange(fileObj, fileList) {
+      // if (fileObj.status === "ready") {
+      this.handleBeforeUpload(fileObj.raw).catch(() => {});
+      if (fileList.length > 1) {
+        fileList[0] = fileList[1];
+        fileList.splice(1, 1);
       }
+      // }
     },
     async handleBeforeUpload(file) {
       this.res = {};
@@ -240,14 +257,14 @@ export default {
       this.$refs.UploadComp.submit();
       this.loading = true;
     },
-    removeFile() {
-      if (this.loading) return;
-      this.uploadDataDict = {};
-      this.filename = "";
-      this.fileValid = false;
-      this.res = {};
-      this.$refs.UploadComp.clearFiles();
-    },
+    // removeFile() {
+    //   if (this.loading) return;
+    //   this.uploadDataDict = {};
+    //   this.filename = "";
+    //   this.fileValid = false;
+    //   this.res = {};
+    //   this.$refs.UploadComp.clearFiles();
+    // },
     exportFile() {
       if (this.templateUrl) {
         this.toDownload();
@@ -283,3 +300,11 @@ export default {
   },
 };
 </script>
+<style lang="scss">
+.import-file-dialog {
+  .el-dialog__body {
+    background-color: #f0f0f0;
+    padding-bottom: 10px;
+  }
+}
+</style>

+ 1 - 1
src/components/ModifyRichText.vue

@@ -3,7 +3,7 @@
     :title="title"
     :visible.sync="modalIsShow"
     width="520px"
-    :modal="false"
+    :modal="true"
     append-to-body
     custom-class="side-dialog"
     @open="visibleChange"

+ 85 - 0
src/components/SvgBtn.vue

@@ -0,0 +1,85 @@
+<template>
+  <div
+    class="svg-btn"
+    :class="{ disabled: disabled }"
+    @mouseover="itemHover"
+    @mouseout="removeHover"
+    @click="$emit('click')"
+    :style="{ background: bgColor }"
+  >
+    <svg-icon :name="name" :color="color || svgColor"></svg-icon>
+    <span class="svg-btn-text" :style="{ color: color || '#262626' }">
+      <slot />
+    </span>
+  </div>
+</template>
+<script>
+export default {
+  name: "SvgBtn",
+  props: {
+    name: {
+      type: String,
+      require: true,
+    },
+    disabled: {
+      type: Boolean,
+      default: false,
+    },
+    color: {
+      type: String,
+      default: "",
+    },
+    hoverBgColor: {
+      type: String,
+      default: "",
+    },
+  },
+  computed: {
+    svgColor() {
+      return this.disabled ? "#aaa" : this.isHover ? "#262626" : "#595959";
+    },
+    bgColor() {
+      return this.isHover ? this.hoverBgColor || "#f0f0f0" : "transparent";
+    },
+  },
+  data() {
+    return {
+      isHover: false,
+    };
+  },
+  methods: {
+    itemHover() {
+      this.isHover = true;
+    },
+    removeHover() {
+      this.isHover = false;
+    },
+  },
+};
+</script>
+<style lang="scss" scoped>
+.svg-btn {
+  display: inline-flex;
+  align-items: center;
+  height: 30px;
+  padding: 0 8px;
+  cursor: pointer;
+  border-radius: 6px;
+  transition: all 0.3s;
+  // &:hover {
+  //   background: #f0f0f0;
+  // }
+  &.disabled {
+    cursor: not-allowed;
+    .svg-btn-text {
+      color: #aaa;
+    }
+  }
+  .svg-btn-text {
+    margin-left: 3px;
+    // color: #262626;
+    position: relative;
+    top: -1px;
+  }
+}
+</style>

+ 39 - 0
src/components/svgIcon/index.vue

@@ -0,0 +1,39 @@
+<template>
+  <div
+    :style="{ width: width, height: height, display: 'inline-block' }"
+    class="svg-icon-btn"
+  >
+    <svg :style="{ width: width, height: height }">
+      <use :xlink:href="prefix + name" :fill="color"></use>
+    </svg>
+  </div>
+</template>
+
+<script>
+export default {
+  name: "SvgIcon",
+  props: {
+    // xlink:href属性值的前缀
+    prefix: {
+      type: String,
+      default: "#icon-",
+    }, //svg矢量图的名字
+    name: {
+      type: String,
+      require: true,
+    }, //svg图标的颜色
+    color: {
+      type: String,
+      default: "",
+    }, //svg宽度
+    width: {
+      type: String,
+      default: "16px",
+    }, //svg高度
+    height: {
+      type: String,
+      default: "16px",
+    },
+  },
+};
+</script>

+ 9 - 0
src/components/svgIcon/svgIcon.js

@@ -0,0 +1,9 @@
+import Vue from "vue";
+
+import SvgIcon from "@/components/svgIcon/index.vue";
+Vue.component("svg-icon", SvgIcon);
+const requireAll = (requireContext) =>
+  requireContext.keys().map(requireContext);
+const req = require.context("@/assets/icons", false, /.svg$/);
+// 加载目录下的所有 svg 文件
+requireAll(req);

+ 1 - 0
src/main.js

@@ -13,6 +13,7 @@ import "./filters/filters.js";
 import "./assets/styles/index.scss";
 import "./modules/card/assets/styles/module.scss";
 import "./modules/paper-export/assets/styles/module.scss";
+import "@/components/svgIcon/svgIcon";
 
 import globalVuePlugins from "./plugins/globalVuePlugins";
 Vue.use(globalVuePlugins);

+ 1 - 1
src/modules/card/components/BatchBuildCardDialog.vue

@@ -4,7 +4,7 @@
     :visible.sync="modalIsShow"
     title="批量生成题卡"
     width="520px"
-    :modal="false"
+    :modal="true"
     append-to-body
     @open="visibleChange"
   >

+ 1 - 1
src/modules/card/components/ModifyCard.vue

@@ -4,7 +4,7 @@
     :visible.sync="modalIsShow"
     title="编辑"
     width="550px"
-    :modal="false"
+    :modal="true"
     append-to-body
     @open="visibleChange"
   >

+ 1 - 1
src/modules/paper/components/AutoBuildPaperStructManage.vue

@@ -3,7 +3,7 @@
     <el-dialog
       :visible.sync="modalIsShow"
       title="试卷结构列表"
-      :modal="false"
+      :modal="true"
       :close-on-click-modal="false"
       :close-on-press-escape="false"
       append-to-body

+ 1 - 1
src/modules/paper/components/ModifyAutoBuildPaperStruct.vue

@@ -3,7 +3,7 @@
     <el-dialog
       :visible.sync="modalIsShow"
       title="编辑试卷结构"
-      :modal="false"
+      :modal="true"
       :close-on-click-modal="false"
       :close-on-press-escape="false"
       append-to-body

+ 1 - 1
src/modules/paper/components/ModifyDetailStruct.vue

@@ -3,7 +3,7 @@
     :title="dTitle"
     :visible.sync="modalIsShow"
     width="520px"
-    :modal="false"
+    :modal="true"
     append-to-body
     custom-class="side-dialog"
     @open="visibleChange"

+ 1 - 1
src/modules/paper/components/PaperAuditInfo.vue

@@ -3,7 +3,7 @@
     title="审核记录"
     width="700px"
     :visible.sync="modalIsShow"
-    :modal="false"
+    :modal="true"
     append-to-body
     custom-class="side-dialog"
     @open="toPage(1)"

+ 1 - 1
src/modules/paper/components/PaperBaseInfo.vue

@@ -3,7 +3,7 @@
     title="基础构成"
     width="100%"
     :visible.sync="modalIsShow"
-    :modal="false"
+    :modal="true"
     append-to-body
     custom-class="side-dialog"
     @open="getData"

+ 1 - 1
src/modules/paper/components/PaperBlueInfo.vue

@@ -3,7 +3,7 @@
     title="蓝图分布"
     width="100%"
     :visible.sync="modalIsShow"
-    :modal="false"
+    :modal="true"
     append-to-body
     custom-class="side-dialog"
     @open="visibleChange"

+ 1 - 1
src/modules/paper/components/PaperQuestypeInfo.vue

@@ -3,7 +3,7 @@
     title="题型分布"
     width="100%"
     :visible.sync="modalIsShow"
-    :modal="false"
+    :modal="true"
     append-to-body
     custom-class="side-dialog"
     @open="visibleChange"

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

@@ -46,7 +46,7 @@
       title="个人信息"
       width="620px"
       :visible.sync="userDialog"
-      :modal="false"
+      :modal="true"
       append-to-body
       custom-class="side-dialog"
       @close="() => $refs.passForm.clearValidate()"

+ 1 - 1
src/modules/question/components/FolderQuestionManageDialog.vue

@@ -3,7 +3,7 @@
     <el-dialog
       :visible.sync="modalIsShow"
       title="文件夹管理"
-      :modal="false"
+      :modal="true"
       :close-on-click-modal="false"
       :close-on-press-escape="false"
       append-to-body

+ 1 - 1
src/modules/question/components/ModifyFolder.vue

@@ -4,7 +4,7 @@
     :visible.sync="modalIsShow"
     :title="title"
     width="500px"
-    :modal="false"
+    :modal="true"
     :close-on-click-modal="false"
     :close-on-press-escape="false"
     append-to-body

+ 1 - 1
src/modules/question/components/ModifySourceDetail.vue

@@ -4,7 +4,7 @@
     :visible.sync="modalIsShow"
     :title="title"
     width="500px"
-    :modal="false"
+    :modal="true"
     :close-on-click-modal="false"
     :close-on-press-escape="false"
     append-to-body

+ 1 - 1
src/modules/question/components/QuestionFolderDialog.vue

@@ -4,7 +4,7 @@
     :visible.sync="modalIsShow"
     :title="title"
     width="600px"
-    :modal="false"
+    :modal="true"
     :close-on-click-modal="false"
     :close-on-press-escape="false"
     append-to-body

+ 1 - 1
src/modules/question/components/QuestionImportDialog.vue

@@ -5,7 +5,7 @@
       :visible.sync="modalIsShow"
       title="试题导入"
       width="700px"
-      :modal="false"
+      :modal="true"
       :close-on-click-modal="false"
       :close-on-press-escape="false"
       append-to-body

+ 1 - 1
src/modules/question/components/QuestionStatisticsDialog.vue

@@ -3,7 +3,7 @@
     class="question-statistics-dialog"
     :visible.sync="modalIsShow"
     title="试题统计"
-    :modal="false"
+    :modal="true"
     :close-on-click-modal="false"
     :close-on-press-escape="false"
     append-to-body

+ 1 - 1
src/modules/questions/views/Course.vue

@@ -142,7 +142,7 @@
       title="课程"
       width="630px"
       :visible.sync="courseDialog"
-      :modal="false"
+      :modal="true"
       append-to-body
       custom-class="side-dialog"
       @close="dialogBeforeClose"

+ 1 - 1
src/modules/questions/views/CourseProperty.vue

@@ -146,7 +146,7 @@
       title="新增课程属性名称"
       :visible.sync="coursePropertyDialog"
       width="520px"
-      :modal="false"
+      :modal="true"
       append-to-body
       custom-class="side-dialog"
     >

+ 9 - 9
src/modules/questions/views/EditPaper.vue

@@ -559,7 +559,7 @@
       title="大题名称编辑"
       element-loading-text="保存中。。。"
       :visible.sync="paperDatailDialog"
-      :modal="false"
+      :modal="true"
       append-to-body
       custom-class="side-dialog"
       @close="closeQuesDialog"
@@ -594,7 +594,7 @@
       width="900px"
       element-loading-text="保存中。。。"
       :visible.sync="quesDialog"
-      :modal="false"
+      :modal="true"
       append-to-body
       custom-class="side-dialog"
       @close="closeQuesDialog"
@@ -1018,7 +1018,7 @@
       title="考试说明编辑"
       :visible.sync="paperRemarkDialog"
       width="600px"
-      :modal="false"
+      :modal="true"
       append-to-body
       custom-class="side-dialog"
     >
@@ -1037,7 +1037,7 @@
       title="上传音频文件"
       :visible.sync="dialogRadioFile"
       :before-close="closeAudioDialog"
-      :modal="false"
+      :modal="true"
       width="520px"
       append-to-body
       custom-class="side-dialog"
@@ -1086,7 +1086,7 @@
       title="上传答案文件"
       :visible.sync="dialogAnswerFile"
       :before-close="closeAnswerDialog"
-      :modal="false"
+      :modal="true"
       width="520px"
       append-to-body
       custom-class="side-dialog"
@@ -1134,7 +1134,7 @@
       title="基础构成"
       width="100%"
       :visible.sync="basicDialog"
-      :modal="false"
+      :modal="true"
       append-to-body
       custom-class="side-dialog"
     >
@@ -1148,7 +1148,7 @@
       title="题型分布"
       width="100%"
       :visible.sync="typeDialog"
-      :modal="false"
+      :modal="true"
       append-to-body
       custom-class="side-dialog"
     >
@@ -1162,7 +1162,7 @@
       title="蓝图分布"
       width="100%"
       :visible.sync="blueDialog"
-      :modal="false"
+      :modal="true"
       append-to-body
       custom-class="side-dialog"
     >
@@ -1177,7 +1177,7 @@
       title="审核记录"
       width="700px"
       :visible.sync="auditInfoDialog"
-      :modal="false"
+      :modal="true"
       append-to-body
       custom-class="side-dialog"
     >

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

@@ -583,7 +583,7 @@
       title="大题名称编辑"
       element-loading-text="保存中。。。"
       :visible.sync="paperDatailDialog"
-      :modal="false"
+      :modal="true"
       append-to-body
       custom-class="side-dialog"
       @close="closeQuesDialog"
@@ -617,7 +617,7 @@
       title="试题编辑"
       element-loading-text="保存中。。。"
       :visible.sync="quesDialog"
-      :modal="false"
+      :modal="true"
       append-to-body
       custom-class="side-dialog"
       @close="closeQuesDialog"
@@ -1036,7 +1036,7 @@
       title="考试说明编辑"
       :visible.sync="paperRemarkDialog"
       width="600px"
-      :modal="false"
+      :modal="true"
       append-to-body
       custom-class="side-dialog"
     >
@@ -1055,7 +1055,7 @@
       title="上传音频文件"
       :visible.sync="dialogRadioFile"
       :before-close="closeAudioDialog"
-      :modal="false"
+      :modal="true"
       width="520px"
       append-to-body
       custom-class="side-dialog"
@@ -1104,7 +1104,7 @@
       title="上传答案文件"
       :visible.sync="dialogAnswerFile"
       :before-close="closeAnswerDialog"
-      :modal="false"
+      :modal="true"
       width="520px"
       append-to-body
       custom-class="side-dialog"
@@ -1156,7 +1156,7 @@
       title="基础构成"
       width="100%"
       :visible.sync="basicDialog"
-      :modal="false"
+      :modal="true"
       append-to-body
       custom-class="side-dialog"
     >
@@ -1170,7 +1170,7 @@
       title="题型分布"
       width="100%"
       :visible.sync="typeDialog"
-      :modal="false"
+      :modal="true"
       append-to-body
       custom-class="side-dialog"
     >
@@ -1184,7 +1184,7 @@
       title="蓝图分布"
       width="100%"
       :visible.sync="blueDialog"
-      :modal="false"
+      :modal="true"
       append-to-body
       custom-class="side-dialog"
     >
@@ -1199,7 +1199,7 @@
       title="审核记录"
       width="700px"
       :visible.sync="auditInfoDialog"
-      :modal="false"
+      :modal="true"
       append-to-body
       custom-class="side-dialog"
     >
@@ -1210,7 +1210,7 @@
       title="审核试卷"
       width="700px"
       :visible.sync="auditPaperDialog"
-      :modal="false"
+      :modal="true"
       append-to-body
       custom-class="side-dialog"
     >

+ 1 - 1
src/modules/questions/views/ExamPaperPendingTrial.vue

@@ -287,7 +287,7 @@
       title="审核试卷"
       width="50%"
       :visible.sync="auditPaperDialog"
-      :modal="false"
+      :modal="true"
       append-to-body
       custom-class="side-dialog"
     >

+ 1 - 1
src/modules/questions/views/ExportTemplate.vue

@@ -144,7 +144,7 @@
       width="550px"
       :visible.sync="fileModel"
       :close-on-click-modal="false"
-      :modal="false"
+      :modal="true"
       append-to-body
       custom-class="side-dialog"
       @close="closeFileModel"

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

@@ -238,7 +238,7 @@
       title="导出"
       :visible.sync="exportDialog"
       width="600px"
-      :modal="false"
+      :modal="true"
       append-to-body
       custom-class="side-dialog"
     >
@@ -341,7 +341,7 @@
       title="属性修改"
       :visible.sync="quesPropertyDialog"
       width="500px"
-      :modal="false"
+      :modal="true"
       append-to-body
       custom-class="side-dialog"
     >

+ 3 - 3
src/modules/questions/views/ImportPaper.vue

@@ -279,7 +279,7 @@
       title="克隆试卷"
       :visible.sync="copyPaperDialog"
       width="520px"
-      :modal="false"
+      :modal="true"
       append-to-body
       custom-class="side-dialog"
     >
@@ -337,7 +337,7 @@
       title="属性修改"
       :visible.sync="quesPropertyDialog"
       width="500px"
-      :modal="false"
+      :modal="true"
       append-to-body
       custom-class="side-dialog"
     >
@@ -381,7 +381,7 @@
       title="审核记录"
       width="700"
       :visible.sync="auditInfoDialog"
-      :modal="false"
+      :modal="true"
       append-to-body
       custom-class="side-dialog"
     >

+ 1 - 1
src/modules/questions/views/InsertBluePaperStructure.vue

@@ -148,7 +148,7 @@
       title="大题信息"
       :visible.sync="detailDialog"
       width="520px"
-      :modal="false"
+      :modal="true"
       append-to-body
       custom-class="side-dialog"
     >

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

@@ -128,7 +128,7 @@
       title="大题信息"
       :visible.sync="paperDetailStructDialog"
       width="520px"
-      :modal="false"
+      :modal="true"
       append-to-body
       custom-class="side-dialog"
     >

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

@@ -175,7 +175,7 @@
       title="小题信息"
       :visible.sync="paperDetailUnitStructDialog"
       width="700px"
-      :modal="false"
+      :modal="true"
       append-to-body
       custom-class="side-dialog"
     >
@@ -432,7 +432,7 @@
       title="题目数量"
       :visible.sync="propertyDialog"
       width="700px"
-      :modal="false"
+      :modal="true"
       append-to-body
       custom-class="side-dialog"
     >

+ 1 - 1
src/modules/questions/views/InsertPaperTitle.vue

@@ -91,7 +91,7 @@
       title="新增试卷"
       :visible.sync="paperDialog"
       width="520px"
-      :modal="false"
+      :modal="true"
       append-to-body
       custom-class="side-dialog"
     >

+ 1 - 1
src/modules/questions/views/PaperPendingTrial.vue

@@ -287,7 +287,7 @@
       title="审核试卷"
       width="500px"
       :visible.sync="auditPaperDialog"
-      :modal="false"
+      :modal="true"
       append-to-body
       custom-class="side-dialog"
     >

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

@@ -111,7 +111,7 @@
     <el-dialog
       :title="title"
       :visible.sync="propertyDialog"
-      :modal="false"
+      :modal="true"
       width="620px"
       :close-on-click-modal="false"
       :close-on-press-escape="false"

+ 1 - 1
src/modules/questions/views/QuestionPreview.vue

@@ -3,7 +3,7 @@
     class="question-preview"
     title="试题预览"
     :visible.sync="dialogVisible"
-    :modal="false"
+    :modal="true"
     width="800"
     append-to-body
     custom-class="side-dialog"

+ 28 - 15
src/modules/questions/views/School.vue

@@ -5,7 +5,6 @@
     element-loading-text="请稍后..."
   >
     <div class="part-box">
-      <h2 class="part-box-title">顶级机构管理</h2>
       <el-form class="part-filter-form" :inline="true" :model="formSearch">
         <el-form-item label="学校名称">
           <el-input v-model="formSearch.name" placeholder="请输入学校名称" />
@@ -27,9 +26,9 @@
         </el-form-item>
       </el-form>
 
-      <div class="part-box-action">
-        <div>
-          <el-button
+      <!-- <div class="part-box-action">
+        <div> -->
+      <!-- <el-button
             type="success"
             plain
             icon="icon icon-play"
@@ -44,22 +43,31 @@
             :disabled="noBatchSelected"
             @click="disableOrg"
             >禁用</el-button
-          >
-        </div>
-        <!-- <div>
+          > -->
+      <!-- </div> -->
+      <!-- <div>
           <el-button type="primary" icon="icon icon-plus-white" @click="insert"
             >新增</el-button
           >
         </div> -->
-        <div>
+      <!-- <div>
           <el-button type="primary" icon="icon icon-plus-white" @click="syncOrg"
             >同步</el-button
           >
-        </div>
-      </div>
+        </div> -->
+      <!-- </div> -->
     </div>
 
     <div class="part-box">
+      <div class="icon-btn-group">
+        <svg-btn name="tongbu" @click="syncOrg">同步</svg-btn>
+        <svg-btn name="qiyong" @click="enableOrg" :disabled="noBatchSelected"
+          >启用</svg-btn
+        >
+        <svg-btn name="jinyong" @click="disableOrg" :disabled="noBatchSelected"
+          >禁用</svg-btn
+        >
+      </div>
       <!-- 页面列表 -->
       <el-table :data="tableData" resizable @selection-change="selectChange">
         <el-table-column type="selection" width="50" align="center" />
@@ -140,14 +148,18 @@
         </el-table-column>
         <el-table-column width="180" label="操作">
           <div slot-scope="scope">
-            <el-button size="mini" type="primary" plain @click="edit(scope.row)"
+            <el-button
+              type="text"
+              @click="edit(scope.row)"
+              size="medium"
+              class="normal"
               >编辑</el-button
             >
             <el-button
-              size="mini"
-              type="primary"
-              plain
+              type="text"
               @click="orgSet(scope.row)"
+              size="medium"
+              class="normal"
               >机构设置
             </el-button>
           </div>
@@ -171,7 +183,7 @@
       title="学校信息"
       width="520px"
       :visible.sync="schoolDialog"
-      :modal="false"
+      :modal="true"
       append-to-body
       custom-class="side-dialog"
       @close="dialogBeforeClose"
@@ -457,6 +469,7 @@ export default {
       this.$refs.schoolForm.resetFields();
     },
     syncOrg() {
+      alert(1);
       var url = QUESTION_API + "/org/sync";
       this.$httpWithMsg.put(url, this.schoolForm).then(() => {
         this.$notify({

+ 1 - 1
src/modules/questions/views/SynthesisPaperStorage.vue

@@ -196,7 +196,7 @@
       title="下载试卷"
       :visible.sync="exportDialog"
       width="700px"
-      :modal="false"
+      :modal="true"
       append-to-body
       custom-class="side-dialog"
     >

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

@@ -206,7 +206,7 @@
       v-loading.body="dialogLoading"
       title="试题查看"
       :visible.sync="quesDialog"
-      :modal="false"
+      :modal="true"
       append-to-body
       custom-class="side-dialog"
       @close="closeQuesDialog"

+ 1 - 1
src/modules/questions/views/data_previllege_add_course.vue

@@ -4,7 +4,7 @@
     title="添加课程"
     width="800px"
     :visible.sync="visible"
-    :modal="false"
+    :modal="true"
     append-to-body
     custom-class="side-dialog"
     @close="closeDialog"

+ 24 - 12
src/modules/questions/views/user.vue

@@ -88,7 +88,7 @@
         </el-form-item>
       </el-form>
 
-      <div class="part-box-action">
+      <!-- <div class="part-box-action">
         <div>
           <el-button
             type="success"
@@ -123,10 +123,23 @@
             >导入
           </el-button>
         </div>
-      </div>
+      </div> -->
     </div>
 
     <div class="part-box">
+      <div class="icon-btn-group">
+        <svg-btn name="xinzeng" @click="openAddingDialog">新增</svg-btn>
+        <svg-btn name="daoru" @click="importUser">导入</svg-btn>
+        <svg-btn name="qiyong" @click="enableByIds" :disabled="noBatchSelected"
+          >启用</svg-btn
+        >
+        <svg-btn
+          name="jinyong"
+          @click="disableByIds"
+          :disabled="noBatchSelected"
+          >禁用</svg-btn
+        >
+      </div>
       <!-- 页面列表 -->
       <el-table
         ref="table"
@@ -201,25 +214,24 @@
             <div v-if="showBtn(scope.row)">
               <el-button
                 v-if="!scope.row.enable"
-                size="mini"
-                type="primary"
-                plain
+                type="text"
+                size="medium"
                 @click="enableById(scope.row)"
               >
                 启用
               </el-button>
               <el-button
                 v-if="scope.row.enable"
-                size="mini"
-                plain
-                type="danger"
+                size="medium"
+                type="text"
+                class="danger"
                 @click="disableById(scope.row)"
               >
                 禁用
               </el-button>
               <el-dropdown>
-                <el-button type="primary" plain size="mini">
-                  更多<i class="el-icon-more el-icon--right"></i>
+                <el-button type="text" size="medium" class="normal">
+                  更多<i class="el-icon-arrow-down el-icon--right"></i>
                 </el-button>
                 <el-dropdown-menu slot="dropdown" class="action-dropdown">
                   <el-dropdown-item>
@@ -285,7 +297,7 @@
       title="新增用户"
       width="620px"
       :visible.sync="addingDialog"
-      :modal="false"
+      :modal="true"
       :close-on-click-modal="false"
       :close-on-press-escape="false"
       append-to-body
@@ -379,7 +391,7 @@
       title="编辑用户"
       width="620px"
       :visible.sync="updateDialog"
-      :modal="false"
+      :modal="true"
       :close-on-click-modal="false"
       :close-on-press-escape="false"
       append-to-body

+ 16 - 0
vue.config.js

@@ -1,3 +1,5 @@
+const path = require("path");
+const resolve = (dir) => path.join(__dirname, dir);
 const proxy = {
   "/api/uq_basic": {
     target: process.env.VUE_APP_QUESTIONS_HOST_URL,
@@ -36,6 +38,20 @@ let config = {
   },
   transpileDependencies: [/\bvue-awesome\b/],
   productionSourceMap: false,
+  chainWebpack(config) {
+    config.module.rule("svg").exclude.add(resolve("./src/assets/icons")).end();
+    config.module
+      .rule("icons")
+      .test(/\.svg$/)
+      .include.add(resolve("./src/assets/icons"))
+      .end()
+      .use("svg-sprite-loader")
+      .loader("svg-sprite-loader")
+      .options({
+        symbolId: "icon-[name]",
+      })
+      .end();
+  },
 };
 
 if (process.env.NODE_ENV === "production") {

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 595 - 10
yarn.lock


Daži faili netika attēloti, jo izmaiņu fails ir pārāk liels